Multi-condition label grouping method and system based on slot sequence matching

CN123012923APending Publication Date: 2026-10-30SHANGHAI RUIKU DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611493549.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]现有技术方案中,标签分组方式主要采取独立随机抽签方案及简单预生成序列方案,其中,独立随机抽签方案是在每个用户接入时,调用随机函数按配置比例独立抽取分组;该方案实现简单,但在样本量较小时,实际分组比例容易偏离配置比例,例如配置30%的用户进入A组,但前100个用户中可能仅有25个进入A组,导致分组比例失真;简单预生成序列方案则是系统预先按比例生成一个槽位数组,再进行一次洗牌,新用户按顺序消费槽位;该方案能保证长期总量精确,但简单洗牌仅保证全局比例,不能保证任意短滑动窗口内的局部比例稳定,例如长度为100的序列中全局有30个A,但前10个槽位可能一个A都没有,导致短期分组比例波动较大

Benefits of technology

本发明中槽位序列中每个分组元素数量严格等于配置比例对应的数量,因此满足长期精确配比;通过滑动窗口偏差张量约束重排,进一步保证短期局部比例稳定;全局随机置乱和局部搜索中的随机交换保证用户无法预测下一个分组;采用顺序游标取模查表的方式,使得在线开销较低;通过规则依赖显式化,避免隐式顺序导致标签必定缺失;同时满足状态转移可仲裁及热更新支持。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012923A_ABST
    Figure CN123012923A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer software, and discloses a multi-condition label grouping method based on slot sequence matching, which comprises the following steps: generating a slot sequence according to a preset grouping proportion parameter, the length of the slot sequence is fixed, and the number of each grouping element accurately matches the proportion parameter; performing a random permutation operation on the slot sequence; allocating an order cursor value which is increased according to a preset rule to each newly accessed user; performing a modulus operation on the length of the slot sequence according to the order cursor value to obtain an index, and searching a table in the permuted slot sequence according to the index to obtain a label grouping result of the user. In the application, the number of each grouping element in the slot sequence is strictly equal to the number corresponding to the configuration proportion, so that the long-term accurate proportion is met, and the short-term local proportion is stable; the random exchange in the global random permutation and the local search ensures that the next grouping cannot be predicted by the user, and short-term unpredictability is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer software technology, and in particular to a multi-condition label grouping method and system based on slot order matching. Background Technology

[0002] In application scenarios such as game lobbies, content platforms, and marketing systems, it is usually necessary to allocate newly connected users to different groups according to the configuration ratio and to label users accordingly.

[0003] In existing technical solutions, tag grouping methods mainly adopt independent random sampling and simple pre-generated sequence schemes. The independent random sampling scheme involves calling a random function to independently draw groups according to a configured ratio when each user joins. This scheme is simple to implement, but when the sample size is small, the actual grouping ratio can easily deviate from the configured ratio. For example, if 30% of users are configured to enter group A, only 25 out of the first 100 users may enter group A, resulting in a distorted grouping ratio. The simple pre-generated sequence scheme involves the system pre-generating a slot array according to a ratio and then shuffling it. New users consume slots sequentially. This scheme can ensure long-term accuracy of the total number of slots, but simple shuffling only guarantees the global ratio and cannot guarantee the stability of the local ratio within any short sliding window. For example, in a sequence of length 100, there may be 30 A's globally, but the first 10 slots may not have any A's, leading to large fluctuations in the short-term grouping ratio. Furthermore, existing multi-condition tagging rules typically employ hard-coded if-else sequential judgments, implicitly establishing dependencies between rules. This can easily lead to issues where "placing a tag above a dependent tag is equivalent to the tag never existing." Forced tag removal, conditional removal, and fixed overriding also lack unified priority arbitration for state transitions, making already assigned users susceptible to disruptions during rule hot updates. Therefore, the fundamental problem this invention aims to solve is how to provide a user grouping and tag allocation method that simultaneously satisfies long-term accurate allocation, short-term stable local proportions, unpredictable short-term order, low online allocation overhead, explicit rule dependencies, arbitrable state transitions, and support for hot updates. Summary of the Invention

[0004] To provide a user grouping and label allocation method that simultaneously satisfies long-term accurate proportioning, short-term local ratio stability, short-term unpredictable ordering, low online allocation overhead, explicit rule dependencies, arbitrable state transitions, and support for hot updates, this application provides a multi-condition label grouping method and system based on slot order matching, employing the following technical solution: In a first aspect, the present invention provides a multi-condition label grouping method based on slot order matching, including: A slot sequence is generated according to a preset grouping ratio parameter, wherein the length of the slot sequence is fixed and the number of each grouping element precisely matches the ratio parameter; Perform a random scrambling operation on the slot sequence; Assign each newly connected user a sequential cursor value that increments according to a preset rule; The index is obtained by taking the modulo of the length of the slot sequence based on the sequential cursor value, and the user's tag grouping result is obtained by looking up the table in the scrambled slot sequence using the index.

[0005] Optionally, the process of generating the slot sequence includes: Get the total number of slots and the percentage of each group; The number of slots in the i-th group is calculated based on the total number of slots and the proportion of each group. Generate a slot sequence for the i-th group containing the number of slots.

[0006] Optionally, the random shuffling operation employs the Fisher-Yates shuffling algorithm.

[0007] Optionally, after the random scrambling operation, the method further includes: Traverse the scrambled slot sequence using a sliding window of length W, count the deviation between the actual number and the expected number of each group element in each window, and construct the sliding window deviation tensor. The objective function is constructed using the sliding window bias tensor, the sequence randomness measure, and the label dependency constraint. A local search algorithm that keeps the total number of elements in each group constant is used to swap elements in the slot sequence, and the objective function is minimized to obtain a constrained optimized slot sequence; The table lookup process for the label grouping results includes: The user's tag grouping result is obtained by looking up the table in the constrained optimization slot sequence using the index.

[0008] Optionally, the local search algorithm is a simulated annealing algorithm; The simulated annealing algorithm randomly swaps the positions of two different grouping elements, calculates the change in the objective function, and accepts the swap if the change is less than zero; otherwise, it accepts the swap according to the Metropolis criterion and reduces the temperature according to the cooling coefficient.

[0009] Optionally, the sliding window length W is dynamically adjusted according to the number of minimum grouping elements, satisfying: Where `round()` is the rounding function, `k` is the adjustment coefficient, `Base` is the total number of slots, and `minG` is the minimum number of grouped elements. , These are the lower and upper limits of the window length, respectively.

[0010] Optionally, the method further includes: Use the label grouping results as the initial grouping; Obtain user attributes, evaluate multi-condition rules in the order of declaration, terminate the evaluation of subsequent rules after the first rule that meets the conditions is hit, and obtain candidate tags and state transitions. The candidate tags include a set of target tags and a set of prohibited tags. Candidate labels are arbitrated according to state transition priority, and user labels are updated in conjunction with the initial grouping.

[0011] Optionally, the process of evaluating multi-condition rules in the order of declaration includes: Construct a directed acyclic graph of label dependencies based on the label dependencies, and perform topological sorting on the multi-condition rules; Multi-condition rules are evaluated according to topological sorting and declaration order; if a cycle of dependencies is detected, an alarm is output and the rules are rolled back to their declaration order.

[0012] Optionally, each conditional rule is configured with an effective timestamp; conditional rules that have not yet taken effect are filtered by the current time, and only conditional rules that have taken effect are evaluated; If the label grouping result obtained by the table lookup is marked as a preset prohibited grouping set by the multi-condition rule, then the sequential cursor value is incremented and the table lookup is performed again by taking the modulus; the number of consecutive increments is recorded, and when the number of consecutive increments exceeds the threshold, an adjustment strategy is triggered, and the adjustment strategy includes at least one of constrained rearrangement of slot sequence and adjustment of sliding window length.

[0013] Secondly, the present invention provides a multi-condition label grouping system based on slot order matching, comprising: The configuration acquisition module is used to obtain the preset grouping ratio parameters; The slot sequence generation module is used to generate a slot sequence with a fixed length and the number of each group element precisely matching the ratio parameter, based on the grouping ratio parameter. The random scrambling module is used to perform a random scrambling operation on the slot sequence; The cursor management module is used to assign a sequential cursor value that increments according to preset rules to each newly connected user. The grouping and allocation module is used to obtain an index by taking the modulo of the slot sequence length based on the sequential cursor value, and to look up the user's tag grouping result in the scrambled slot sequence using the index.

[0014] In summary, this application includes at least one of the following beneficial technical effects: In this invention, the number of elements in each group in the slot sequence is strictly equal to the number corresponding to the configuration ratio, thus satisfying the long-term accurate allocation; the rearrangement by sliding window bias tensor constraint further ensures the stability of the local ratio in the short term; global random scrambling and random swapping in local search ensure that users cannot predict the next group; the use of sequential cursor modulo lookup table makes the online overhead low; the explicit rule dependency avoids the implicit order that will inevitably lead to missing labels; and it also satisfies the requirements of arbitrable state transition and hot update support. Attached Figure Description

[0015] Figure 1 This is a flowchart of the steps of the multi-condition label grouping method based on slot order matching in this invention.

[0016] Figure 2 This is a flowchart of the steps for performing constraint rearrangement in an embodiment of the present invention.

[0017] Figure 3 This is a flowchart illustrating the further steps of tag allocation in an embodiment of the present invention.

[0018] Figure 4 This is a logical schematic diagram of a multi-condition label grouping system based on slot order matching in an embodiment of the present invention. Detailed Implementation

[0019] The embodiments of this application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.

[0020] In the description of this specification, the references to "certain embodiments," "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples" refer to specific features, structures, materials, or characteristics described in connection with the described embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0021] Please see Figure 1 This invention discloses a multi-condition label grouping method based on slot order matching, comprising: S1. Generate a slot sequence according to a preset grouping ratio parameter, wherein the length of the slot sequence is fixed and the number of each grouping element precisely matches the ratio parameter; S2. Perform a random scrambling operation on the slot sequence; S3. Assign each newly connected user a sequential cursor value that increments according to a preset rule; S4. Obtain an index by taking the modulo of the length of the slot sequence based on the sequential cursor value, and use the index to look up the user's tag grouping result in the scrambled slot sequence.

[0022] Example 1 S1. Obtain the preset grouping ratio parameters, configure the central storage tag configuration, the group set is {A,B,C}, the ratio parameter is [0.30,0.30,0.40], and the total number of slots Base=100; Generate a slot sequence based on the ratio parameter, and obtain the total number of slots (Base) and the proportion of each group. ;according to Calculate the number of slots in the i-th group; adjust for rounding errors to ensure... , generate containing The slot sequence of the i-th group element has A appearing 30 times, B appearing 30 times, and C appearing 40 times.

[0023] S2. The slot sequence is randomly shuffled once using the Fisher-Yates shuffle algorithm.

[0024] S3. Assign a sequential cursor value to each newly connected user, which increments according to a preset rule. Each tag configuration maintains a sequential cursor sequence, which is initially 0 and increments after each user is assigned, and is cyclically modified by the length of the slot sequence.

[0025] S4. Obtain the index by taking the modulo of the slot sequence length from the sequential cursor value; use the index to look up the user's tag grouping result in the scrambled slot sequence; read the current sequential cursor sequence; calculate... ; Retrieve S1[index] from the slot sequence S1 as the label grouping result; After successful allocation, Where mod represents the modulo operation and index represents the resulting index.

[0026] In this invention, the number of elements in each group in the slot sequence is strictly equal to the number corresponding to the configuration ratio, thus satisfying the long-term accurate allocation; global random scrambling and random swapping in local search ensure that users cannot predict the next group; the use of sequential cursor modulo lookup table results in low online overhead; explicit rule dependencies avoid the implicit order that would inevitably lead to missing tags; and it also satisfies the requirements of arbitrable state transitions and hot update support.

[0027] Example 2 Building upon Example 1, to further ensure short-term local proportion stability, a constraint rearrangement is performed after the random scrambling operation and before the table lookup. For example... Figure 2 As shown, it specifically includes: S31. Traverse the scrambled slot sequence using a sliding window of length W. The window slides position by position from the beginning of the sequence. For each window w, count the actual number of groups g. Expected quantity ,in The configuration ratio and deviation for group g. The sliding window length W is dynamically adjusted based on the number of minimum grouping elements, satisfying the following: Where `round()` is the rounding function, `k` is the adjustment coefficient, and `minG` is the minimum number of elements in the group. , These represent the lower and upper limits of the window length, respectively. In this embodiment, k=0.5, B=100, and minG=30. It is 5. Since the result is 10, round(0.5×100 / 30)=round(1.67)=2<5, therefore W=5.

[0028] S32. Construct a sliding window bias tensor, representing the biases of all windows and all groups. The organization is in tensor form. It should be noted that the sliding window bias tensor is a two-dimensional matrix, where the rows correspond to the sliding window index w, the columns correspond to the grouping identifier g, and the elements... Tensors are used to quantify the deviation between the actual number and the expected number of each group within each window.

[0029] S33. Construct the objective function J. The objective function simultaneously penalizes sliding window bias, maximum bias, insufficient randomness, and dependency violation. The objective function is constructed using this bias tensor, the sequence randomness measure, and the label dependency constraint: in, Let G be the total number of sliding windows, G be the total number of groups, and H(S) be the randomness entropy of the slot sequence S. Let E be the maximum entropy; E be the set of label-dependent edges; (u,v) be a single dependent edge. This is the dependency violation indicator function, which takes the value 1 if the dependency violation condition is true, and 0 otherwise; E is the set of label dependency edges. Indicates the total number of dependent edges; , , , , These are non-negative weighting coefficients.

[0030] It should be noted that label dependency constraints are determined based on a directed acyclic graph constructed from label dependencies. If a contradiction occurs in the slot sequence or label allocation result with the directed acyclic graph, it is recorded as a "dependency violation," and the objective function is used to... Penalize violations of dependencies.

[0031] S34. A local search algorithm that maintains the total number of elements in each group is used to swap elements in the slot sequence, minimizing the objective function. In this embodiment, the local search algorithm is simulated annealing. The simulated annealing algorithm randomly selects two positions i and j. If... If the two are swapped, the change in the objective function ΔJ is calculated. If ΔJ < 0, the swap is accepted; otherwise, the exchange is carried out with probability. Accept the exchange, where T is the temperature. In this embodiment, the initial temperature T is set to 100, and the cooling coefficient is set to 0.95. 100 exchange attempts are made at each temperature, followed by one cooling attempt (temperature multiplied by the cooling coefficient). The iteration count is 10,000. If one or more of the following occurs: the temperature is lower than the preset lower limit and the change in the objective function is less than the preset threshold, the process is terminated early. The exchange operation does not change the total number of elements in each group, so the global precise proportional hard constraint is always satisfied. After the iteration is completed, the constraint-optimized slot sequence S* is output.

[0032] S35. Use the index to look up the table in the constrained optimization slot sequence to obtain the user's label grouping result.

[0033] With the help of the above complex algorithm, S* not only globally satisfies A=30, B=30, C=40, but also ensures that the deviation between the number of each group and the expected ratio within a sliding window of any length W=5 does not exceed the preset threshold.

[0034] It should be noted that H(S) is used to measure the unpredictability of a sequence. The higher the entropy, the more disordered and random the sequence. It is obtained by statistically analyzing the occurrence pairs of adjacent elements in the slot sequence S to obtain the probability distribution. And thus obtain , This is the theoretical maximum entropy of adjacent pairs when the grouping ratio is fixed and the sequence is completely randomized; dependency violation refers to a slot sequence or label allocation result that does not satisfy the preset label dependency relationship. The directed acyclic graph constructed based on the label dependency relationship includes, but is not limited to: the label "Returning User" depending on "Login Days" and "Existing Labels"; users in group A should not appear simultaneously with the label "VIP"; an element in one group must appear before an element in another group; if a situation contradicting the directed acyclic graph occurs in the actual sequence or allocation result, it is called a "dependency violation". Non-negative weight coefficients , , , , Set the initial value based on business priorities. If short-term local proportion stability is the most important factor, then increase it. , , If the unpredictability of the sequence is the most important factor, then increase the value. The result was obtained after adjustments through online testing. Furthermore, the preset threshold is set according to business requirements; in this embodiment, it is a sliding window with a length W=5. It requires that the absolute value of the deviation between the actual quantity and the expected quantity in each group does not exceed 1. If this condition is met, the simulated annealing iteration is terminated; otherwise, iteration continues until the maximum number of iterations is reached.

[0035] This embodiment traverses the scrambled slot sequence through a sliding window of length W, constructing a sliding window bias tensor. An objective function is then constructed using this bias tensor, a sequence randomness measure, and label dependency constraints. A local search algorithm that maintains the total number of elements in each group is employed for constraint rearrangement. As a result, not only does the number of each group globally precisely match the configured ratio, but the ratio of each group within a sliding window of arbitrary length W also closely approximates the configured ratio, avoiding the problem of excessive fluctuations in the group ratio of the first few slots caused by simple shuffling.

[0036] Example 3 Based on Example 1 or Example 2, the label grouping results are used as initial groupings, followed by further label allocation. For example... Figure 3 As shown, it specifically includes: S51. Obtain user attributes, including level, recharge amount, version number, login days, source channel, and existing tags.

[0037] S52. Evaluate the multi-condition rules in the order of declaration. This process constructs a directed acyclic graph of label dependencies based on the label dependencies and performs topological sorting on the multi-condition rules. Evaluate the multi-condition rules in the order of topological sorting and declaration. If a cycle in the dependency relationship is detected, an alarm is output and the rule declaration order is reverted. The directed acyclic graph of label dependencies uses labels as nodes and dependencies as directed edges. For example, if the label "returning user" depends on "login days" and "existing labels", then there are directed edges in the graph pointing from "login days" and "existing labels" to "returning user".

[0038] Once the first rule that meets the conditions is matched, the evaluation of subsequent rules is terminated, and candidate labels and state transitions are obtained. Each rule includes a condition field, operator, target value, action type, priority, and effective timestamp.

[0039] It should be noted that the candidate tags include a set of target tags and a set of prohibited tags. The set of target tags includes tags whose action type is to add or fix the overlay, and the set of prohibited tags includes tags whose action type is to force removal or conditional removal.

[0040] Conditional rules are a collective term for conditions and rules. Each conditional rule is configured with an effective timestamp. Conditional rules that have not yet taken effect are filtered by the current time, and only effective conditional rules are evaluated. For example, if rule R1 is configured with an effective timestamp of 2026-08-01T00:00:00Z, then rules before that time will not be evaluated.

[0041] Tag dependencies are configured in key-value pairs by the configuration center, for example, {"Returning User": ["Login Days", "Existing Tags"], "Highly Active": ["Login Days"]}. The system constructs a directed acyclic graph based on this configuration: with tags as nodes, if tag A depends on tag B, a directed edge B→A is added. Topological sorting is used to detect cycles; if a cycle is detected, an alarm is output and the system reverts to the rule declaration order.

[0042] S53. Arbitrate candidate tags according to state transition priority and update user tags in conjunction with the initial group. State transition types include fixed overwrite, forced removal, conditional removal, conditional addition, and default addition. The priority order is: fixed overwrite > forced removal > conditional removal > conditional addition > default addition. For the same priority, arbitration is based on the configured priority value.

[0043] If the label grouping result obtained from the table lookup is marked as a preset prohibited grouping set by multi-condition rules, the sequential cursor value is incremented and the table lookup is performed again using the modulo operation. The number of consecutive increments is recorded. When the number of consecutive increments exceeds a threshold, an adjustment strategy is triggered. The adjustment strategy includes at least one of the following: constraint rearrangement of the slot sequence and adjustment of the sliding window length. If the number of consecutive skips exceeds a preset number (set to 5 times in this embodiment according to business adjustments), simulated annealing constraint rearrangement is re-executed, or the sliding window length W is reduced to enhance short-term stability.

[0044] It should be noted that the preset prohibited group set is pre-configured by the configuration center and includes group identifiers that are not allowed to be assigned to users; when the tag group result obtained from the table lookup belongs to this set, it is determined to be a conflict. Furthermore, in the adjustment strategy of this embodiment, the constraint rearrangement of the slot sequence is to re-execute the simulated annealing constraint rearrangement in Embodiment 2 to generate a new constraint-optimized slot sequence; adjusting the sliding window length is to recalculate according to the sliding window length W formula in Embodiment 2 and re-execute the constraint rearrangement. In addition, this embodiment records the skipped group requirements and prioritizes compensation during subsequent user allocation to maintain the total number of elements in each group unchanged in the long term.

[0045] This embodiment constructs a directed acyclic graph of tag dependencies and performs topological sorting on multi-condition rules. Evaluation is performed according to the topological sorting and declaration order, avoiding the problem that "if a tag is placed above a dependent tag, it's equivalent to the tag definitely not existing" when rule dependencies are implicitly present. If a cycle in the dependency relationship is detected, an alarm is output and the rule declaration order is reverted, ensuring the rule engine can still run even with abnormal configurations. Tag state transitions have a clear priority order; rules with the same priority are arbitrated according to the configured priority value, thus avoiding the problem of uncertain tag states when multiple rules are hit simultaneously.

[0046] Example 4 When the grouping ratio parameter or multi-condition rule is updated, the system generates a new version slot sequence S*_v2 and maintains a new sequential cursor sequence_v2=0 for the new version; newly connected users use the new version slot sequence and the new sequential cursor; already assigned users continue to use the old version slot sequence and the old sequential cursor, and tagged users are not affected, thus achieving uninterrupted service operation when the rule is hot updated.

[0047] It should be noted that the generation method of the new version slot sequence S*_v is the same as that of the old version, that is, the initial slot sequence is regenerated according to the updated grouping ratio parameters, random scrambling is performed, and constraint rearrangement is performed; the new version sequential cursor sequence_v2 is initialized to 0; the new and old versions are distinguished by version numbers. New users read the current latest version number and use the corresponding slot sequence and sequential cursor; allocated users record the version number used when they were allocated, and continue to use the slot sequence and sequential cursor of that version; when all users of the old version are offline or the preset expiration time is reached, the old version resources are reclaimed.

[0048] Example 5 like Figure 4 As shown, this embodiment provides a multi-condition label grouping system based on slot order matching, including: The configuration acquisition module is used to obtain the preset grouping ratio parameters; The slot sequence generation module is used to generate a slot sequence with a fixed length and the number of each group element precisely matching the ratio parameter, based on the grouping ratio parameter. The random scrambling module is used to perform a random scrambling operation on the slot sequence; The cursor management module is used to assign a sequential cursor value that increments according to preset rules to each newly connected user. The grouping and allocation module is used to obtain an index by taking the modulo of the slot sequence length based on the sequential cursor value, and to look up the user's tag grouping result in the scrambled slot sequence using the index.

[0049] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A multi-condition label grouping method based on slot order matching, characterized in that, include: A slot sequence is generated according to a preset grouping ratio parameter, wherein the length of the slot sequence is fixed and the number of each grouping element precisely matches the ratio parameter; Perform a random scrambling operation on the slot sequence; Assign each newly connected user a sequential cursor value that increments according to a preset rule; The index is obtained by taking the modulo of the length of the slot sequence based on the sequential cursor value, and the user's tag grouping result is obtained by looking up the table in the scrambled slot sequence using the index.

2. The multi-condition label grouping method based on slot order matching according to claim 1, characterized in that, The process of generating a slot sequence includes: Get the total number of slots and the percentage of each group; The number of slots in the i-th group is calculated based on the total number of slots and the proportion of each group. Generate a slot sequence for the i-th group containing the number of slots.

3. The multi-condition label grouping method based on slot order matching according to claim 1, characterized in that, The random shuffling operation uses the Fisher-Yates shuffling algorithm.

4. The multi-condition label grouping method based on slot order matching according to claim 1, characterized in that, Following the random scrambling operation, the method further includes: Traverse the scrambled slot sequence using a sliding window of length W, count the deviation between the actual number and the expected number of each group element in each window, and construct the sliding window deviation tensor. The objective function is constructed using the sliding window bias tensor, the sequence randomness measure, and the label dependency constraint. A local search algorithm that keeps the total number of elements in each group constant is used to swap elements in the slot sequence, and the objective function is minimized to obtain a constrained optimized slot sequence; The table lookup process for the label grouping results includes: The user's tag grouping result is obtained by looking up the table in the constrained optimization slot sequence using the index.

5. The multi-condition label grouping method based on slot order matching according to claim 4, characterized in that, The local search algorithm is a simulated annealing algorithm; The simulated annealing algorithm randomly swaps the positions of two different grouping elements, calculates the change in the objective function, and accepts the swap if the change is less than zero; otherwise, it accepts the swap according to the Metropolis criterion and reduces the temperature according to the cooling coefficient.

6. The multi-condition label grouping method based on slot order matching according to claim 4, characterized in that, The sliding window length W is dynamically adjusted according to the number of minimum grouping elements, satisfying: Where `round()` is the rounding function, `k` is the adjustment coefficient, `Base` is the total number of slots, and `minG` is the minimum number of grouped elements. , These are the lower and upper limits of the window length, respectively.

7. The multi-condition label grouping method based on slot order matching according to claim 4, characterized in that, The method further includes: Use the label grouping results as the initial grouping; Obtain user attributes, evaluate multi-condition rules in the order of declaration, terminate the evaluation of subsequent rules after the first rule that meets the conditions is hit, and obtain candidate tags and state transitions. The candidate tags include a set of target tags and a set of prohibited tags. Candidate labels are arbitrated according to state transition priority, and user labels are updated in conjunction with the initial grouping.

8. The multi-condition label grouping method based on slot order matching according to claim 7, characterized in that, The process of evaluating multi-condition rules in the order of their declarations includes: Construct a directed acyclic graph of label dependencies based on the label dependencies, and perform topological sorting on the multi-condition rules; Multi-condition rules are evaluated according to topological sorting and declaration order; if a cycle of dependencies is detected, an alarm is output and the rules are rolled back to their declaration order.

9. The multi-condition label grouping method based on slot order matching according to claim 7, characterized in that, Each conditional rule is configured with an effective timestamp; ineffective conditional rules are filtered by the current time, and only effective conditional rules are evaluated; If the label grouping result obtained by the table lookup is marked as a preset prohibited grouping set by the multi-condition rule, then the sequential cursor value is incremented and the table lookup is performed again by taking the modulus; the number of consecutive increments is recorded, and when the number of consecutive increments exceeds the threshold, an adjustment strategy is triggered, and the adjustment strategy includes at least one of constrained rearrangement of slot sequence and adjustment of sliding window length.

10. A multi-condition label grouping system based on slot order matching, characterized in that, The system is used to execute the multi-condition label grouping method based on slot order matching as described in any one of claims 1-9, including: The configuration acquisition module is used to obtain the preset grouping ratio parameters; The slot sequence generation module is used to generate a slot sequence with a fixed length and the number of each group element precisely matching the ratio parameter, based on the grouping ratio parameter. The random scrambling module is used to perform a random scrambling operation on the slot sequence; The cursor management module is used to assign a sequential cursor value that increments according to preset rules to each newly connected user. The grouping and allocation module is used to obtain an index by taking the modulo of the slot sequence length based on the sequential cursor value, and to look up the user's tag grouping result in the scrambled slot sequence using the index.