Generate a set of random feature values for objects, each feature value within its specified range.
Feature values are encoded into a bitmap, with each feature occupying 8 bits.
Args:
feature_count (int): Number of features to generate
feature_max_values (List[int]): List of maximum values for each feature, length must equal feature_count
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing feature values and bitmap, formatted as:
{
"requestId": "Generated request ID",
"features": [List of feature values],
"featureBitmap": Feature bitmap value
}
Application Scenarios:
1. Game character attribute generation (strength, agility, intelligence, etc.)
2. Equipment attribute randomization (attack, defense, speed, etc.)
3. Biological trait simulation (genes, traits, etc.)
4. Random scene generation (terrain, weather, environment, etc.)