------
## 最终结论
```python
def countUniqueChars(s):
    unique_count = 0
    char_count = {}
    
    for char in s:
        if char in char_count:
            char_count[char] += 1
        else:
            char_count[char] = 1
            
    for count in char_count.values():
        if count == 1:
            unique_count += 1
            
    return unique_count

def sumUniqueCharsInSubstrings(s):
    MOD = 10**9 + 7
    total_sum = 0
    n = len(s)
    
    for i in range(n):
        for j in range(i + 1, n + 1):
            substring = s[i:j]
            unique_count = countUniqueChars(substring)
            total_sum = (total_sum + unique_count) % MOD
            
    return total_sum
```