Rule teacher and behavior weak supervision dual-path model training method and device

CN122947952APending Publication Date: 2026-10-20GUANGLU TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611156717.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

CN116863917A公开了教师伪标签、置信度筛选和动态损失权重,但没有公开由自然行为事件映射到多维连续标签的不同子集,也没有公开行为事件到输入片段的时间回溯机制及逐维融合机制

Benefits of technology

(1)通过将目标模型输入限定为推理阶段可获得的数据,并将事后行为事件置于监督构造链路,能够降低标签泄漏以及训练阶段与推理阶段条件不一致的风险;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a dual-path model training method and apparatus using rule-based teacher and behavioral weak supervision. The method involves acquiring input segments composed of device event data or their temporal features obtainable during target model inference; generating first supervision information covering the target output space using rule-based teacher data; and back-associating behavioral events or statistical signals with the input segments according to their identifiers and temporal relationships to generate weakly supervised records covering only the basis dimension. Fusion labels are formed dimension-wise based on dimension masks, signal confidence, and association confidence. Effective training weights or disabling masks for each dimension are determined based on sample weights, effective support, and the degree of label conflict within the same dimension to form second supervision information. In the first training phase, a baseline model is established using the first supervision information. In the second training phase, the baseline parameters are inherited, and the model is updated using the second supervision information while retaining the first supervision constraints. This invention reduces unbased supervision and lowers the risk of the model deviating from the rule-based baseline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence model training and interactive device data processing technology, and in particular to a dual-path model training method and apparatus using rule-based teacher and weakly supervised behavior. Background Technology

[0002] In continuously interactive devices such as digital musical instruments and interactive performance equipment, the continuous state expressed by an input segment can be inferred from timestamped events such as key presses, dynamics, rhythm, and gestures. The target model used for this inference typically needs to output multiple continuous parameters with independent semantics, such as arousal, valence, tension, and performance intention. Training labels for multidimensional continuous states are difficult to obtain directly and on a large scale; manual labeling of each segment is costly and suffers from poor consistency; and requiring users to recall the labels afterwards can easily introduce memory bias. Therefore, a rule teacher can be constructed using pre-defined rules, which outputs continuous labels for the input segments to establish the initial training baseline for the target model.

[0003] The closest prior art to this invention To define the technical solution of this invention, relevant publicly available information was retrieved. The following is an analysis of representative prior art.

[0004] 1. Knowledge distillation and teacher-student model training CN113901224B discloses a method for training a classified text recognition model based on knowledge distillation, which uses a pre-trained language model as the teacher and a lightweight model as the student for knowledge distillation. This scheme illustrates the general idea of ​​using the teacher's output to train the student model, but it does not disclose how behavioral signals generated during the operation of the interactive product form the second supervision information, how the second supervision information only covers a portion of the output dimensions, or how the second supervision information is fused dimension-by-dimensionally using dimension masks and confidence scores before correcting the student model.

[0005] 2. Pseudo-label screening and weakly supervised training CN115204381A discloses a weakly supervised model training method that distinguishes clean and noisy samples by learning the loss value distribution. This scheme provides an idea for filtering weakly supervised data based on sample quality, but its supervision object is sample-level labels. It does not establish a data structure that covers different dimensions of the output vector with multiple behavioral signals, nor does it disclose the collaborative update of rule-based teacher supervision and behavioral weak supervision in the two training phases. CN116863917A discloses teacher pseudo-labels, confidence filtering, and dynamic loss weights, but it does not disclose different subsets of natural behavioral events mapped to multidimensional continuous labels, nor does it disclose the time backtracking mechanism from behavioral events to input segments or the dimension-by-dimensional fusion mechanism.

[0006] 3. Phased training and loss weight switching CN114782859B discloses a method for establishing a target behavior perception spatiotemporal localization model, which employs a two-stage training approach and uses different loss terms in different stages. Its staged weight switching is formally similar to that of this invention, but it does not disclose rules for teachers to generate first supervision information in the same output space, nor does it disclose how to correct the first-stage model after mapping multiple behavioral events or statistical signals to partial dimensional labels.

[0007] 4. Music Emotion Recognition Model CN113129871A discloses a method for music emotion recognition based on audio signals and lyrics, which trains audio and lyrics networks separately and then merges them for output. This approach does not address the problem of lacking reliable labels for real-time performance expression data, nor does it disclose a combination of first-level supervision information formed by rule-based teachers, second-level supervision information formed by behavioral events or statistical signals, partial dimensional masks, and phased training.

[0008] Search results show that knowledge distillation, pseudo-label screening, confidence weighting, and phased training are all publicly available. The essential difference of this invention lies in forming a mutually constraining technical chain: limiting the input of the target model to data available during the inference stage; generating first-level supervision information by a rule teacher in the complete output space; tracing back post-event behavioral events to the input fragments according to the label chain; generating weakly supervised records with dimensional masks and independent confidence only after completing attribution, calibration, and anomaly filtering; fusing and handling label conflicts according to dimensional reliability; establishing a rule baseline first, and then using behavioral weak supervision for correction while retaining teacher constraints.

[0009] The existing technology has the following drawbacks: (1) Inconsistent training and inference data conditions. In the prior art, saving, sharing and other behavioral events occur after the system inference or response. If they are directly used as input to the target model, it will cause the training phase to use data that is not available in the inference phase, resulting in inconsistent conditions.

[0010] (2) Post-event behavioral events lack traceable connections to input fragments. Actions such as saving and sharing directly affect the system response rather than the input fragments. Without tracing back through the identifier chain and time relationship, effective training pairs cannot be formed, leading to sample mismatch.

[0011] (3) Weak signals do not fully cover the output dimensions. Different behavioral events or statistical signals can only support some dimensions of the output vector. Existing technologies expand all signals into complete labels, which will impose incorrect supervision on dimensions without semantic basis.

[0012] (4) Multiple conflicting signals are mistakenly used as neutral labels. Multiple weak signals corresponding to the same input segment may have different confidence levels or conflicting directions. Simple averaging will cause the conflict mean to be used as a high-confidence neutral label for training, and the impact of low-confidence records on fusion statistics is not limited.

[0013] (5) There is a lack of coordination mechanism between rule-based teacher supervision and behavioral weak supervision. Directly using both types of supervision at the same time can easily cause the model to be perturbed by weak labels before a basic mapping is established; completely removing teacher constraints may cause the model to deviate from the existing baseline.

[0014] (6) Signals that do not directly express a continuous state are fabricated as complete labels. Signals such as repeated performance and pauses do not directly express a continuous state. Existing technologies lack a functional hierarchical mechanism for such signals, which can easily lead to their improper extension into complete supervision.

[0015] (7) The training pipeline lacks stability guarantees. Existing technologies lack stability mechanisms such as zero loss prevention, conflict masking, quality gating, and version rollback in cases of weak label batches, abnormal behavior records, or candidate model degradation. Summary of the Invention

[0016] Technical problems to be solved The purpose of this invention is to provide a method and apparatus for training a dual-path model using rule-based teacher and weakly supervised behavior, in order to at least solve the following technical problems: (1) In the absence of large-scale reliable manual continuous labels, construct first and second supervision information that correspond to the traceability of the input segment; (2) Strictly separate the model inputs available during inference from the behavioral events generated after execution to avoid label leakage and inconsistencies between training and inference conditions; (3) For cases where weak signals only cover part of the output dimensions, weak supervision records with dimension masks are formed, and multiple weak labels are fused dimension by dimension. (4) When weak labels have different confidence levels or conflicting directions, reduce the impact of low-confidence records on label fusion statistics and make high-conflict dimensions obtain lower training weights to avoid mistaking conflict as neutrality. (5) The target model is first established based on rule-based teacher supervision, and then corrected using behavioral weak supervision, while retaining rule-based teacher constraints during the correction phase.

[0017] Technical solution To address the aforementioned technical problems, one aspect of the present invention provides a dual-path model training method, comprising: S101, Obtain the original input event with timestamp, and divide or aggregate the original input event into multiple input segments; construct the input feature sequence of the target model for each input segment and assign sample identifiers, wherein the input feature sequence only includes the data that the target model can obtain during the inference stage, and does not include behavioral events generated later based on the model inference results or system responses; S102, input the input segment or its input feature sequence into the rule teacher to obtain the first supervision label vector corresponding to the output space of the target model and the optional teacher confidence, forming the first supervision information; S103, acquire behavioral events generated during device operation and / or statistical signals calculated for the input segments, and back-associate the corresponding signals to one or more input segments based on at least one of session identifier, sample identifier, inference record identifier, response identifier and time relationship, and determine the association confidence level; S104, based on the supervisory function undertaken by each signal, the signal is processed into a label signal, a weighted signal, a correlation signal, or a boundary signal; for the label signal that meets the preset mapping conditions, a weak supervision record is formed, the weak supervision record includes at least a weak label vector, a dimension mask, a signal confidence, a correlation confidence and a sample weight, the dimension mask is used to identify the target output dimension of the signal that has a supervisory basis; S105, when the same input segment corresponds to multiple weak supervision records, for each output dimension of the target model, the corresponding dimension mask is used to filter the weak labels covering the output dimension, and the fused weak labels of the output dimension are obtained by fusing the signal confidence and the association confidence; the effective training weights are determined according to the effective support, sample weights and the label conflict degree represented by the weighted dispersion degree, or the fused dimension mask of the output dimension is turned off when hard conflict gating is used and the label conflict degree reaches the conflict threshold, thereby forming the second supervision information; S106, In the first training phase, the baseline model parameters are obtained by using the first supervision information as the supervised training target model. S107, in the second training phase, the baseline model parameters are used as initial parameters, the target model is updated based on the second supervision information, and the first supervision loss with weights greater than zero is retained in the second training phase to obtain the target model corrected by weak behavioral supervision.

[0018] Here, "dual path" means that the first and second supervision information are formed from different sources and processing links, and it does not require that the two paths be executed synchronously, be independent of each other, or generate training data simultaneously. Behavioral events can be generated later than the corresponding input segments and can be asynchronously backtracked through step S103; the weighted signals can also reference the first supervision information, so there can be a clear data correlation between the two paths.

[0019] In some implementations, the target model outputs a K-dimensional continuous vector with mutually independent semantics, where the output dimensions do not constitute mutually exclusive probability distributions that sum to 1. Accordingly, the first and second supervision losses can employ mean squared error, mean absolute error, Huber loss, or other difference functions suitable for continuous outputs, without applying probability normalization to the K-dimensional continuous vector that would cause the dimensions to compete with each other.

[0020] In some implementations, step S103 establishes a correlation chain of "input fragment - inference record - system response - behavioral event". If a behavioral event may correspond to multiple input fragments, the correlation confidence of each candidate fragment is determined based on the time distance, response contribution ratio, or fragment boundary; events with a correlation confidence lower than a preset threshold are not used to form labeled supervision and can be retained as records to be reviewed.

[0021] In some implementations, the label-type signal refers to a signal that, after satisfying calibration and correlation conditions, can provide candidate continuous labels for one or more output dimensions; the weighted signal is used to adjust the importance of existing supervised records without independently generating labels; the correlation signal is used to indicate that adjacent input segments may be continuous; and the boundary signal is used to indicate that a new segment or a new state may begin. The performance statistics signal calculated for the input segments can be converted into a label-type signal after benchmark centering and scale normalization.

[0022] In some implementations, saving, sharing, or other feedback to the system response is converted into a labeled signal only if the following conditions are met simultaneously: the behavioral event can be reliably traced back to the input segment; the mapping between the behavioral type and the output dimension to be covered has been determined through prior rules, small-scale calibration data, or correlation analysis; and the behavioral event is checked for accidental touches, anomaly frequency, and time windows. If the above conditions are not met, the behavior is only used as a normal operation record, sample selection information, or weight information, and does not directly generate continuous weak labels.

[0023] The above conversion is based on the verifiable event attribution relationship between behavioral events and input fragments, as well as the registered mapping calibration relationship, rather than interpreting saving, sharing, or other behaviors themselves as a definite expression of user approval, preference, or a certain continuous state.

[0024] In some implementations, repeated input segments that have not undergone calibration of the relationship between repeated performance and training contribution are only used for sample selection or inclusion in the set to be reviewed, without directly changing the loss weights. After the calibration is completed, repeated performances can serve as weighted signals; regardless of whether the calibration is completed, the repeated performance signal does not independently generate new continuous weak label values, nor does it open the previously invalid output dimension mask. In a first optional implementation, the weighted signal increases the importance weight of the corresponding teacher-supervised samples; in a second optional implementation, the weighted signal increases the sample weight of the corresponding existing labeled weak supervision records. Either implementation can be used, or they can be combined after separate calibration and setting contribution limits. Short pauses can be considered correlational signals, and long pauses can be considered boundary signals; pauses between the short pause limit and the long pause threshold belong to the uncertainty region, do not automatically propagate labels, and do not automatically determine new state boundaries.

[0025] In some implementations, when generating continuous weak labels based on non-negative strength statistics, the non-negative strength statistics are first centered using a neutral benchmark, and then normalized using a positive scale, so that samples below the neutral benchmark can obtain negative labels, and samples above the neutral benchmark can obtain positive labels.

[0026] In some implementations, step S105 includes: calculating the effective support and fused weak labels for each output dimension based on signal confidence and correlation confidence; characterizing the label conflict degree by the weighted dispersion of the corresponding weak labels relative to the fused weak labels; aggregating sample weights so that the dimension-wise effective training weights are positively correlated with the effective support and aggregated sample weights, and negatively correlated with the label conflict degree, and setting an upper limit on the dimension-wise effective training weights. The second supervision loss is normalized according to the number of effective dimensions in the fused dimension mask, rather than according to the sum of the dimension-wise effective training weights, so that the reduction in dimension-wise effective training weights will not be offset by re-normalization. Thus, for a dimension with only one weak label, when other factors are the same and there is no weight cap, the lower effective support resulting from the lower confidence reduces the absolute contribution of that dimension to the second supervision loss and parameter updates; for multiple weak labels, signal confidence and correlation confidence are also used to limit the influence of the corresponding records on the fusion statistics; high-weight weak labels with multiple directional conflicts will not be trained as high-confidence neutral labels because their mean is close to zero.

[0027] In some implementations, the first training phase satisfies that the weight of the first supervised loss is greater than zero and the weight of the second supervised loss is zero; the second training phase satisfies that the weight of the first supervised loss is greater than zero and the weight of the second supervised loss is greater than zero. The second training phase may alternately sample first supervised samples and second supervised samples, or combine the two types of samples in the same training batch. For samples in the current training batch lacking first supervised information, the corresponding teacher confidence is set to zero and the missing first supervised label is set as a finite placeholder value; for samples lacking second supervised information, the corresponding fusion dimension mask and the dimension-wise effective training weights are set to zero and the missing fusion weak label is set as a finite placeholder value. The placeholder value does not participate in the corresponding loss. When a weakly supervised batch does not have any effective mask dimension, the weak supervised update for that batch is skipped; a positive zero-prevention constant is set in the loss normalization denominator.

[0028] The formation of the first and second supervisory information does not require synchronous completion before the start of the first training phase. In one embodiment, the first training phase can be completed first using the already formed first supervisory information, and then the second supervisory information can be formed after the device operation records meet preset conditions; the second supervisory information should be formed before the corresponding records are called to calculate the second supervisory loss in the second training phase. Except for the order required by data dependencies, the step numbers and the order of enumeration in the claims do not require that the two supervisory construction paths must be executed synchronously.

[0029] In some implementations, the method further includes an optional active sample selection step: selecting samples to be reviewed based on the degree of divergence between the rule-based teacher output and the target model output, as well as the uncertainty of the target model; converting the review results into supervision records consistent with the continuous output space, or excluding or transferring samples that cannot form continuous supervision to a further labeling queue; and then using the converted supervision records for the next round of training. The review results are not used as independent class losses that have no correspondence with the continuous output heads to directly train the target model.

[0030] Another aspect of the present invention provides a dual-path model training apparatus, comprising: (0) Input fragment construction module, used to acquire raw input events and form input fragments with sample labels and input feature sequences available in the inference stage; (0) A first supervision generation module, used by a teacher to generate first supervision information for the input fragment using rules; (0) Signal acquisition and backtracking module, used to acquire behavioral events and / or statistical signals, and backtrack the signals to the corresponding input segments; (0) Weak supervision construction module, used to generate weak supervision records containing weak label vectors, dimension masks, signal confidence, correlation confidence and sample weights based on the functional classification and mapping conditions of the signal; (0) Dimensional fusion module, used to fuse multiple weakly supervised records dimensionally, and perform soft conflict reduction or hard conflict gating based on the degree of conflict of the dimensional labels represented by the weighted dispersion degree; (0) A staged training module is used to obtain baseline model parameters based on first supervision information in the first training stage, and update the target model based on second supervision information while retaining the first supervision constraint in the second training stage, starting from the baseline model parameters.

[0031] The device may further include an active sample selection module and a quality gating module. The active sample selection module is used to select samples to be reviewed and convert the available review results into continuous supervision records; the quality gating module is used to perform filtering, temporary storage or rollback processing on low-confidence samples, abnormal training processes and models to be released.

[0032] The present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, which, when executed by the processor, implements the above-described method.

[0033] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0034] The present invention also provides a computer program product, including a computer program or computer instructions, which implement the above-described method when executed by a processor.

[0035] Beneficial effects The present invention has the following beneficial effects: (1) By limiting the input of the target model to the data available in the inference stage and placing the post-event behavioral events in the supervised construction link, the risk of label leakage and inconsistency between the training and inference stages can be reduced. (2) By linking events back to the source, actions such as saving and sharing that occur later than the input fragment can establish a traceable training relationship with the input fragment that triggers the corresponding reasoning or response, which helps to reduce mismatched samples. (3) By using dimension masking to calculate weak supervision loss only on output dimensions with semantic basis, we can avoid forcibly expanding local information into complete labels; (4) By limiting the influence of corresponding weak supervision records on fusion statistics through signal confidence and correlation confidence, and by using weighted dispersion to characterize the degree of label conflict, the influence of high-conflict supervision on model parameter updates can be reduced; in the implementation of normalizing the second supervision loss according to the number of effective fusion dimensions, the effective training weights of each dimension are directly applied to the second supervision loss term and are not normalized by the sum of the same weights, which can avoid the reduction of the effective training weights of each dimension being offset by normalization again; (5) By establishing a rule baseline in the first training phase and introducing running signal supervision after event attribution and mapping calibration in the second training phase while retaining non-zero rule teacher constraints, the risk of the model deviating too much from the baseline can be reduced while using traceable running records to correct rule boundaries. (6) By distinguishing between label-type, weight-type, correlation-type and boundary-type signals, it is possible to avoid fabricating complete labels for signals that do not directly express continuous states, such as repetition and pauses; (7) By using mechanisms such as zero loss prevention, conflict masking, quality gating and version rollback, the stability of the training pipeline can be improved in the case of empty weak label batches, abnormal behavior records and candidate model degradation.

[0036] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0037] Figure 1 This is a flowchart illustrating the overall relationship between steps S101 to S107 and input data, two types of supervision information, and staged training in one embodiment of the present invention. Figure 2 This is a flowchart of the signal backtracking association in step S103 and the weak supervision record formation in step S104 in one embodiment of the present invention. Figure 3 This is a flowchart of step S105 of the present invention, which involves the dimensional fusion and conflict handling of multiple weakly supervised records. Figure 4 This is a flowchart of steps S106 and S107 of an embodiment of the present invention, showing the two-stage training, optional active sample selection, and model quality gating. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be understood that the following embodiments are used to illustrate the present invention, and not to limit the present invention to a specific network structure, behavior type, output dimension, or parameter value. Unless otherwise stated, the technical features of the various embodiments can be combined with each other.

[0039] like Figure 1As shown, steps S101 to S107 constitute the main training chain of this embodiment: Step S101 constructs the input segment and the input feature sequence of the target model; Step S102 generates the first supervision information; Step S103 acquires behavioral events or statistical signals and back-associates them to the input segment; Step S104 forms weak supervision records according to the signal function and mapping conditions; Step S105 performs dimension-by-dimensional fusion and conflict processing on the weak supervision records to form the second supervision information; Step S106 executes the first training phase and obtains the baseline model parameters; Step S107 initializes the second training phase with the baseline model parameters, and updates the target model using the second supervision information while retaining the first supervision constraints. Figure 2 Further, one implementation of steps S103 and S104 is shown. Figure 3 One implementation of step S105 is further shown. Figure 4 Steps S106 and S107, as well as subsequent optional processing, are further illustrated. The step numbers are used to establish the correspondence between the text of the specification and the figures, and do not indicate that the post-event signal in step S103 must be generated synchronously with steps S101 and S102; behavioral events can be generated asynchronously and backtracked after the corresponding input segment has completed reasoning.

[0040] I. Terminology, Data Objects, and Boundaries In this implementation, the "rule teacher" can be a rule engine, a teacher model with deterministic or parameterized rules, or a combination of both. The rule teacher maps input segments into continuous vectors in the target output space based on preset psychological rules, musicological rules, calibrated statistical thresholds, or combinations thereof. The rule teacher and the target model do not need to have the same internal structure, but the dimensional definitions, units, and value ranges of their output vectors should be aligned.

[0041] In this implementation, the "target model" is the continuously output model to be trained. The target model can be a one-dimensional convolutional network, a recurrent neural network, a gated recurrent unit, a temporal convolutional network, a Transformer temporal encoder, or a combination thereof. The core limitation of the target model is not in the specific network type, but in the construction of the two types of supervision information, the dimensional fusion, and the staged parameter update relationship.

[0042] In this embodiment, "weak behavioral supervision" refers to supervisory information constructed using behavioral events or statistical signals that are naturally generated during device operation and have a traceable relationship with the input segment. "Weak behavioral supervision path" does not mean that all signals belong to user behavior, nor does it mean that all signals directly generate labels; performance statistics calculated within the same input segment can be used as statistical signals to enter this path, and signals such as repetition and pauses can only serve as weights, correlations, or boundary functions.

[0043] To avoid conceptual confusion, at least the following four types of data objects should be distinguished: Input fragment Sample identifier, time range, original event reference, feature sequence Target model training and inference yes First Supervision Information Sample identifier, teacher label, teacher confidence level, rule version Establish and maintain rule baselines no Operation signal recording Session identifier, event identifier, response identifier, timestamp, signal type Retrospection and Construction of the Second Supervisor No; especially, post-event actions must not be input into the target model. Weak supervision record Sample identifier, signal identifier, signal source, signal time, weak label, dimension mask, signal confidence, correlation confidence, sample weight. Forming a second supervisory information no If a statistical feature is a predefined input feature of the target model and is also used to generate candidate weak labels, then the role of that statistical feature in both the "input feature" and "supervision mapping basis" should be saved separately. The input fields of the target model during the training phase should not be temporarily changed simply because it is used for supervision. Data that can only be saved or shared after inference or response should not be concatenated into the input feature sequence of the target model.

[0044] II. Implementation Method 1: Construction of Dual-Path Supervision Data 1. Input fragment and target output space The device collects button press events, button release events, force values, pitch values, gesture events, and their timestamps. The input segment construction module divides the raw event stream into multiple input segments using a fixed window, sliding window, phrase boundary, or a combination thereof. Each input segment records at least: session identifier, sample identifier, start time, end time, original event reference, and feature version.

[0045] Input feature sequences can include pitch, intervals, rhythmic patterns, modal tendencies, dynamics, legato or staccato features, micro-tense variations, event density, and gesture features. If an input segment includes... Each input frame includes 1 input frame, and each input frame includes 1 input frame. If there are features, then the input to the target model can be represented as take The characteristic matrix of , where, This indicates the frame number of the input segment. This represents the number of features per frame; both are determined by the sampling method, window length, and feature configuration, respectively.

[0046] In one example, the target model outputs a four-dimensional continuous vector, with the four dimensions being arousal (A), valence (V), tension (T), and performance intention (I), each ranging from -1 to +1. A represents the activity or activation level of the performance expression; V represents positive or negative valence, without using "tension" to describe valence; T represents tension or the degree of tension; and I represents the clarity of the performance expression's goal. This example consistently uses an "exploration-determination" semantic axis for I, with lower values ​​indicating a greater exploratory tendency and higher values ​​indicating a clearer goal. If a specific product uses other semantic axes such as "engagement-intention," a new version of the label definition should be established and consistently replaced in teacher rules, weak label mapping, training data, and evaluation metrics. Different semantics should not be mixed within the same version.

[0047] The four-dimensional vector above is merely an example. The target model can also output other numbers or other defined continuous parameters, as long as the rule teacher, weakly labeled data structure, and target model use the same output dimension definition.

[0048] 2. First Supervision Information For input fragment i, the rule teacher calculates the complete K-dimensional teacher label based on the events or features in the input fragment. The rule teacher can set the rule hit items, rule source, rule version, and teacher confidence. Teacher confidence can be set per sample or per output dimension; when only sample-level teacher confidence is available, the same confidence can be used for all output dimensions of that sample.

[0049] For example, rule-based teachers can generate continuous labels based on preset combinations of modal tendencies, tempo, dynamic variations, rhythmic density, and degree of dissonance. Thresholds obtained from external sample statistics can be used as the basis for adjusting rule parameters or confidence levels, without being limited to a specific dataset or fixed values. If multiple teacher rules produce inconsistent results for the same dimension, the teacher confidence level for that dimension can be reduced, or the sample can be moved to a set awaiting review.

[0050] Therefore, the first supervision record should include at least: sample identifier, teacher label vector, teacher confidence score, rule version, and generation time. The first supervision record may also include the start time, end time, or equivalent time range field for the corresponding input segment. The input received by the rule teacher and the input received by the target model correspond to the same input segment, but their internal calculation methods may differ.

[0051] 3. Behavioral event retrospective correlation After completing inference on the input fragment, the device can generate or select a system response based on the inference result. The system records the sample identifier of the input fragment, the inference record identifier, and the system response identifier, respectively. When the user subsequently performs actions such as saving, sharing, or other feedback, the action record includes at least the action event identifier, action type, action time, and the response identifier applied.

[0052] The signal acquisition and backtracking module first uses response identifiers to locate inference records, and then uses sample identifiers in the inference records to locate the input segment that triggered the response, thus forming a direct association of "input segment - inference record - system response - behavioral event". If the device does not save a complete identifier chain, candidate input segments can be determined within the same session based on the difference between the behavior time and the response time, the contribution relationship between the input segment and the response, and the preset maximum backtracking window.

[0053] A behavioral event may correspond to multiple input segments. For example, a long response can be triggered by multiple consecutive input segments. In this case, the association confidence score can be calculated separately for each candidate input segment. The association confidence score can be determined by comprehensively considering the integrity of the label chain, temporal distance, number of candidate segments, and contribution ratio of the response. The association confidence score with a direct label chain can be higher than the association confidence score inferred solely based on a time window. If the association confidence score is lower than the association threshold, the corresponding behavioral event is not converted into labeled weak supervision.

[0054] For performance statistics calculated from the current input segment itself, the correlation confidence can be set to a preset high value or one, but the statistics window, feature version, and calculation time should still be retained for recalculation and auditing.

[0055] 4. Classification of signal sources and monitoring functions In this implementation, post-event behavioral events and segment-based statistical signals are first distinguished based on their source, and then classified according to their function in training. Source classification and function classification are not the same concept; segment-based statistical signals can serve as labels after calibration, while post-event behaviors may only serve as sample selection or weighting functions.

[0056] Save, share Behavioral events following system response Conditional labeling or sample selection Weak labels for some dimensions are only generated after backtracking, calibration, and anomaly checking. Session duration Session-level runtime statistics Conditional tag type After excluding background pauses and abnormal interruptions, candidate labels can be generated for the calibrated preset dimensions. Repeatedly playing similar passages Similarity and temporal relationship between input segments Sample selection type or calibrated weighted type When uncalibrated, it is only used for sampling or verification; after calibration, it can increase the importance weight of teacher-monitored samples or increase the sample weight of existing labeled weak supervision records; regardless of whether calibration is completed, it does not independently generate new continuous weak label values, nor does it open the previously invalid output dimension mask. Continue after a short pause Temporal relationship between adjacent input segments Related This indicates that the preceding and following segments may be continuous, and tag propagation or segment merging can be controlled. Resume playing after a long pause Temporal relationship between adjacent input segments Boundary type This indicates that a new segment or new state may begin. Peak intensity density and peak intensity Statistical signals within the same input segment Centralized tag type First calculate the nonnegativity statistic, then center it relative to the neutral benchmark. The weakly supervised record generated by the tagged signal can be represented as: WeakRecord = {sample_id, window, signal_id, source_id, source_type, source_time, weak_vector, dimension_mask, source_confidence, association_confidence, sample_weight, mapping_version}.

[0057] In this context, `signal_id`, `source_id`, and `source_time` represent the signal identifier, signal source, and signal time, respectively; `weak_vector` is a K-dimensional candidate weak label vector; and `dimension_mask` is a K-dimensional binary vector. A mask value of one indicates that the corresponding dimension has a supervisory basis, while a mask value of zero indicates that the placeholder value of the corresponding dimension does not participate in label fusion and weak supervision loss. `source_confidence` represents the reliability of the signal itself and its mapping rules, and can be stored as a K-dimensional confidence vector; when only record-level scalars are stored, this scalar is used in each dimension where the dimension mask is valid. `association_confidence` represents the reliability of the correspondence between the signal and the input segment; `sample_weight` represents the importance of the sample, and is only used to control the strength of the corresponding supervisory record's impact on training loss and parameter updates, not to determine the fusion direction of multiple candidate weak labels. The confidence and weight fields mentioned above are independent of each other and are not expressed in the same "weight or confidence" field.

[0058] 5. Conditional mapping of save and share behaviors Saving or sharing typically operates directly on the system response, rather than on the continuous state represented by the input fragment. Therefore, this implementation does not deterministically interpret saving or sharing as an increase in a certain state dimension. The corresponding mapping function is invoked only if the following conditions are met:

[0059] (1) The confidence level of the association between the behavioral event and the input fragment reaches the preset threshold; (0) The behavior occurs within a preset effective time window and is detected through accidental touch, batch operation, and high-frequency abnormal checks; (0) The relationship between behavior type and candidate output dimension has been supported by prior evidence, small-scale questionnaires, correlation analysis or calibration samples; (0) The mapping function and its version have been registered and can determine the weak label orientation, scale and signal confidence.

[0060] For example, in a calibrated mapping version, the first action event can form candidate weak labels only for one or more statistically supported continuous output dimensions, while the dimension masks for the remaining dimensions remain invalid. The specific action type, coverage dimension, label direction, and scale are determined by the mapping version; if there is no corresponding calibration basis before the application, the corresponding dimension mask remains zero, and this action event is only used to select samples to be reviewed and does not enter the weak supervision loss.

[0061] In one candidate mapping implementation, saving events can form candidate supervision for the valence and performance intention dimensions, sharing events can form candidate supervision for the arousal and valence dimensions, and session duration can form candidate supervision for the performance intention dimension. The above mappings are only enabled when the corresponding relationships are supported by real calibration data and meet the conditions of event attribution, anomaly filtering, and mapping version. Before calibration is completed, the corresponding dimension masks remain invalid, and no negative weak labels are generated based on the absence of saving or sharing events.

[0062] 6. Repeated performance and pause signals For repeated performances, the system can calculate the event fingerprint or feature similarity between two input segments and determine whether they appear within a preset repetition window. Before the relationship between repeated performances and training contributions is determined through calibration data, repeated performance records are only used to select samples or enter the set to be reviewed, without adjusting the weights of teacher-supervised samples or weakly supervised records. When the similarity, number of repetitions, and calibration conditions all meet the preset requirements, repeated performance records can be used as weighted signals; regardless of whether calibration is completed, repeated performance signals do not independently generate new continuous weak label values, nor do they open the previously invalid output dimension mask.

[0063] In one optional implementation, the weighted signal generated by repeated performances only increases the importance weight of the corresponding teacher-supervised samples in the second training phase, and sets an upper limit for the contribution of teacher samples. In another optional implementation, the weighted signal only increases the weight of samples with existing label-based weak supervision records for the corresponding input segment, and sets a cumulative contribution upper limit based on signal identifier or signal source. The two implementations can be deployed and calibrated separately; when combined, the source, version, and upper limit of the two types of weights are recorded separately to avoid repeated weighting of the same repetition. Regardless of the implementation method, the sample weights only control the training intensity and do not participate in the calculation of the fusion of weak labels.

[0064] For pause duration, a first pause threshold and a second pause threshold greater than the first pause threshold are set. Pauses not exceeding the first pause threshold can be used as prompts for consecutive adjacent segments, while pauses not less than the second pause threshold can be used as prompts for new segments or new state boundaries. Pauses in between are considered uncertain and do not automatically propagate the previous segment label to the next segment, nor are they automatically identified as the start of a new state. Each threshold can be determined based on the device sampling method, session interval distribution, and verification results; shorter segment intervals can be handled by the input segment segmentation module.

[0065] 0. Centralization of force statistical signals Both peak intensity density and peak intensity are non-negative quantities, and their product or ratio cannot naturally produce a negative number. Therefore, it is not possible to directly crop non-negative statistics to between -1 and +1 and claim that they cover negative labels. In this embodiment, non-negative intensity statistics are calculated first, and then centering and scale normalization are performed relative to a neutral benchmark, as detailed in the formulas below. The neutral benchmark and scale can be determined based on the training set, device type, or user calibration data, and the calibration version is recorded. Thus, input segments below the neutral benchmark can obtain negative arousal candidate labels, and input segments above the neutral benchmark can obtain positive candidate labels.

[0066] III. Implementation Method Two: Dimensional Fusion and Phased Training 1. Symbol Definition For ease of explanation, the following symbols are used. The same symbols have the same meaning in the subsequent formulas and embodiments of this specification.

[0067] Number of samples in the current training batch Positive integers; when a certain type of supervision is missing, the corresponding weight or mask is set to zero. Target model output dimension positive integer Input fragment or training sample index Output dimension index Weakly supervised record index associated with samples The set of weakly supervised records associated with sample i Finite sets Input feature sequence of sample i Data available during the inference phase The rule teacher labels the d-th dimension of sample i For example, located in Teacher confidence level in dimension d Important weights of teacher supervision samples Positive numbers can be adjusted by weighted signals. The candidate labels given by the weakly supervised record r for the d-th dimension For example, located in Does the weakly supervised record r cover the d-th dimension? Take zero or one Weakly supervised records and their mappings to the signal confidence in the d-th dimension Record-level scalars can be broadcast to the effective dimensions of the mask. Confidence of association between weakly supervised records and samples Untruncation sample weights of weakly supervised records Positive numbers, according to equation (7) Cut off Reliability of a single weakly supervised record in the d-th dimension nonnegative numbers Effective support quantity in the d-th dimension nonnegative numbers Does the d-th dimension meet the minimum valid support condition? Determined by the indicator function, taking the value of zero or one. Indicator function If the condition is true, return 1; otherwise, return 0. The d-th dimension of the fusion weak label For example, located in Label conflict level in dimension d Non-negative numbers; weighted squared dispersion can be used, or one of the following calculable alternative statistics can be used: weighted absolute deviation, weighted paired difference, or effective label range. The aggregated sample weights of the d-th dimension Non-negative numbers; The time is right. Time is zero Fusion dimensionality mask after effective support and conflict handling Hard gating is determined by both support conditions and a conflict threshold, while soft gating is weighted equally. The d-th dimension is the effective training weight that directly affects the loss term. Normalize again without summing according to their weights. Upper limit of effective training weights for each dimension positive numbers Upper limit of sample weight for a single weakly supervised record positive numbers Conflict punishment intensity positive numbers Minimum effective support threshold nonnegative numbers Tag conflict threshold positive numbers The parameters are Target Model Output K-dimensional continuous vector The target model outputs the d-th dimension of sample i. The target model function outputs the d-th dimension of the input feature sequence. Zero-prevention constant for loss normalization When the number of positive numbers makes the effective dimension number zero, equation (11) is still defined. First supervisory loss nonnegative numbers Second supervisory loss nonnegative numbers Regularization term with model parameters as independent variables nonnegative numbers Loss weights in training phase j non-negative numbers For force statistics signals, a different definition is defined: Let i be the peak intensity density per unit time. To normalize the average peak intensity, It is a non-negative force intensity statistic. As a neutral benchmark, The scale parameter is positive. This represents the wakefulness dimension, which is the output dimension index. One example value.

[0068] 0. Strength Statistical Mapping We can first form a non-negative statistic based on peak density and normalized average peak strength: Then, candidate weak labels are formed for the arousal dimension: The clip function truncates the first parameter to a closed interval defined by the second and third parameters; it takes the lower limit when the parameter is below the lower limit of the interval, takes the upper limit when the parameter is above the upper limit of the interval, and keeps the first parameter unchanged when the parameter is within the interval. When the scale is estimated from the data, a positive lower bound can be set to avoid the scale being zero. The centering step in equation (2) makes... It can generate negative candidate labels. and The median and robust scale of the training set, device-level calibration values, or user-level calibration values ​​can be used, and should not be written as a unique fixed value when there is a lack of experimental evidence. If the input segment does not meet the minimum number of valid peaks required to calculate the average peak intensity, the arousal dimension mask of that record is set to invalid, and the average is not calculated on an empty set.

[0069] 3. Dimensional Integration For a weakly supervised record r associated with sample i and an output dimension d, the dimension-wise reliability is: Equation (3) preserves both signal mapping reliability and event attribution reliability. Sample weights do not participate in determining the fusion label direction, but rather control the intensity of parameter updates for the corresponding records in the following effective training weights. Calculate the effective support quantity and preliminary effective label for the d-th dimension:

[0070] in, This is an indicator function; it takes the value 1 if the condition is true, and 0 otherwise. At that time, the weak tags are fused as follows:

[0071] when hour, It can be set to a finite placeholder value that does not participate in the loss, and the subsequent aggregated sample weights, fusion dimension mask, and dimension-wise effective training weights are all set to zero according to the invalid branch. Since equation (5) only applies to... The calculation is performed in real time, so there is no division by zero in the denominator, and the fused label will not shift to zero due to the addition of a zero-prevention constant in the effective denominator. Using a non-negative minimum effective support threshold also avoids opening the fused mask for records with only a mask of one but a signal confidence or correlation confidence of zero.

[0072] A weighted dispersion measure used to characterize the degree of label conflict within the same dimension is specifically the weighted squared dispersion measure, which is calculated as follows: Equation (6) is also only applicable to Calculate in time; otherwise, let The weighted squared dispersion is used to characterize the degree of label conflict within the same output dimension.

[0073] In other alternative implementations, the degree of label conflict can also be calculated using one of the following statistical measures. This represents the set of weakly supervised record indexes with positive reliability in the d-th dimension. The first alternative statistic is the weighted absolute bias relative to the fused weak labels:

[0074] The second alternative statistic is the weighted pairwise difference between weak labels. Let Then, when the sum of the paired weights is positive:

[0075] The third alternative statistic is the range of the effective weak labels: Equations (6a) to (6c) are also only applicable to Calculate at time; when When, do not calculate the corresponding fraction, maximum or minimum value, and let Records with zero reliability in each dimension, i.e., records with zero weight in fusion and conflict statistics, are not included in the valid record set of the aforementioned substitution statistics, nor are they added to the corresponding numerator or denominator. When When empty, let , , Set the fusion weak labels to finite placeholder values ​​and reset the fusion dimension mask and dimensional effective training weights to zero. When there is only one record, the weighted absolute deviation and label range are both zero, the pairwise weight sum is zero, and the pairwise difference statistic is defined as zero, so that label conflict processing is not triggered due to only one record.

[0076] The numerical scales of equations (6a) to (6c) can be different from those of equation (6). Therefore, when using any alternative statistic, the conflict threshold and conflict penalty intensity should be determined for each statistic, and the selected statistic type and parameter version should be written into the mapping or training configuration. The weights in equations (6a) and (6b) are the dimension-wise reliability formed by the dimension mask, signal confidence, and association confidence. Equation (6c) determines the effective label set based on records with positive dimension-wise reliability. The sample weights are not used to determine the direction of fusion labels or the degree of label conflict, but only to control the training intensity in the subsequent dimension-wise effective training weights. When using any alternative statistic, the subsequent equations (8) and (9) This indicates the calculation result of the selected statistic.

[0077] The aggregated sample weights of the d-th dimension can be expressed as: Equation (7) only applies when Calculation at this time There is no division by zero case; when When not calculating the fractions in equation (7), let The fusion dimensionality masks for the two implementations, hard conflict gating and soft conflict deweighting, are as follows:

[0078] When using hard conflict gating, in equation (9) Pick Once the conflict threshold is reached, the corresponding dimension is closed; when only soft conflict reduction is used, Pick and through The exponential term continuously decreases the effective training weights as the degree of label conflict increases, and samples can be sent to the set to be reviewed when the degree of conflict reaches the review threshold. Equation (9) has the following properties: for a dimension with only one weak label, the fused label is equal to that label; reducing the signal confidence or association confidence of a weak supervision record will reduce the dimension-wise reliability of that record, thereby limiting the influence of that record on the effective support, fused label and label conflict degree; when the aggregated sample weights and conflict penalty terms remain unchanged and are not truncated by the upper limit of weights, the reduction of effective support makes Correspondingly reduced; when multiple weakly supervised records work together, The confidence level is determined by factors such as the effective support level and the degree of label conflict, and is not required to be globally monotonic for any single record. Sample weights can change the training intensity, but will not change the fusion direction of different labels; for multiple labels with conflicting directions, Increase, make The mask is closed by dropping or under hard gating. Because equation (11) does not follow... By normalizing the sum, the reduction of the effective training weights will directly reduce the absolute contribution of the corresponding dimension to the second supervised loss and parameter updates.

[0079] To prevent a single signal identifier or source from accumulating excessively large cumulative contributions within a training batch or a preset statistical period, the effective support quantity, aggregated sample weights, or dimensionally effective training weights of the corresponding record for that signal identifier or source can be accumulated. When the accumulated value exceeds the source contribution cap, the excess portion is truncated, or the contributions of each record from that source are normalized proportionally. The source contribution cap limits the total impact of records from the same source on model updates without altering the direction of weak labels from other sources.

[0080] 4. First supervisory loss and second supervisory loss Taking mean squared error as an example, the first supervised loss is: The second supervisory loss is: in, Equation (9) has already made the invalid dimension The result is zero. Equation (11) normalizes based on the number of effective dimensions in the fused dimension mask, rather than the sum of the effective training weights for each dimension. Therefore, the effective training weights for each dimension directly control the absolute contribution of the corresponding dimension to the second supervision loss and parameter updates. If all fused dimension masks in a batch are zero, then the numerator of equation (11) is zero and the denominator is positive. The second supervision loss is zero. In this case, the training control module can directly skip the weak supervision backpropagation of this batch, avoiding the mistaken inclusion of empty weak label batches as valid updates.

[0081] When no separate weight is set for the importance of teacher supervision samples, it can be made Equation (10) uses the sum of teacher weights for normalization. Therefore, teacher confidence and teacher sample importance weights mainly adjust the relative contributions between the first supervised samples. The overall strength of the first supervised loss in the total loss is controlled by the loss weights of the corresponding stages. The squared difference in Equations (10) and (11) can be replaced by mean absolute error, Huber loss, or other continuous difference functions. Regardless of the continuous difference function used, teacher confidence, dimension mask, effective training weights, and zero-prevention are all maintained. For the independent continuous output dimensions in this implementation, normalization or divergence loss based on the premise that each output dimension constitutes a mutually exclusive class probability distribution is not used.

[0082] 5. Two-stage parameter update relationship The total loss in the first training phase can be expressed as: Baseline model parameters are obtained by minimizing equation (12). The second training phase uses the baseline model parameters obtained in the first training phase as initial parameters, and adopts the following approach:

[0083] Equation (13) clearly states that the first supervisory constraint is retained and the second supervisory correction is enabled simultaneously in the second training phase. The value is not zero to prevent the target model from completely deviating from the regular baseline under the influence of weak label noise. and The specific values ​​should be determined by combining the dimensions of the two losses, the number of valid samples, and the verification results. It is not appropriate to judge which supervision makes a greater actual contribution by simply comparing the magnitudes of the two values.

[0084] In one training scheduling method, a teacher-supervised batch is executed after several weakly supervised batches in the second training phase; in another method, the same batch contains both first-supervised samples and second-supervised samples. As long as the first-supervised constraint can be continuously computed in the second training phase, it is an optional implementation of the present invention. An anchoring term relative to the baseline parameter can also be added to equation (13), but this anchoring term does not replace the first-supervised loss.

[0085] IV. Implementation Method 3: A Computational Example from Original Events to Model Updates 1. Form input segments and first-level supervised records. Assume the device records an input segment of preset duration during a session and assigns a sample identifier `sample_i` to this segment, retaining the start time, end time, and original event index. The input segment construction module converts the original events into a feature sequence under a preset sampling method, which serves as the input to the target model. Subsequent behavioral events are not added to this feature sequence.

[0086] The rule-based teacher generates a teacher label vector z_i and corresponding teacher confidence for sample_i, aligned with the output space of the target model. The target model, the currently stable model, or the running rule system generates an inference record record_i for sample_i, and the system forms a response_i based on this inference record. After a behavioral event occurs, the system finds record_i through the response identifier, and then finds sample_i from record_i, thus completing the backtracking from the post-event behavioral event to the input segment.

[0087] 0. Create anonymous, weakly supervised records To illustrate the fields and computational relationships, an anonymous example is constructed below; the record names and parameter values ​​are for illustrative purposes only and do not constitute a limitation on actual signal types, mapping relationships, or parameter values. Two calibrated weakly supervised records, r1 and r2, are both associated with sample i and only cover the first output dimension d1:

[0088] r1 0.6 Only d1 is valid 0.8 0.9 positive number w1 r2 0.2 Only d1 is valid 0.6 0.8 positive number w2 Equation (3) yields the next-dimension reliability of 0.72 and 0.48 for the two records in the first output dimension, respectively, and Equation (4) yields the effective support quantity of 1.20. When the effective support quantity meets the support condition, Equation (5) yields the fused weak label of 0.44, and Equation (6) yields the weighted dispersion of 0.0384. The sample weights w1 and w2 do not participate in the determination of the fused label direction, but instead affect the next-dimension effective training weights according to Equations (7) to (9). The next-dimension effective training weights are directly multiplied into the corresponding loss term in Equation (11) and are not normalized again by their own weight sum. For other output dimensions not covered by any weakly supervised records, the fused dimension mask is invalid, and this dimension does not participate in the second supervised loss, but can still be trained by the first supervised path.

[0089] 0. Batch processing of conflicting and weak labels Suppose there are two weak labels with the same sequential reliability but opposite label directions in the same output dimension. The fused label of the two labels may be located in the middle of the output interval, but the weighted dispersion used to characterize the degree of label conflict increases. When using hard conflict gating, Equation (8) takes the hard gating branch, and closes the fusion dimension mask of that dimension after reaching the calibrated conflict threshold; when only using soft conflict weighting, Equation (8) takes the soft conflict weighting branch, and the fusion dimension mask remains valid. Equation (9) continuously reduces the effective training weights through the exponential term corresponding to the positive conflict penalty intensity. Thus, the fusion value in the middle is identified as the "mean after directional conflict" instead of being directly used as a high-confidence neutral label for training.

[0090] When a training batch contains only weighted, correlational, or boundary-type records, and there is no label-based weak supervision, all records in that batch... and The numerator is zero. After the training control module detects that the effective weak label dimension is zero, it skips the weak supervision backpropagation; if equation (11) is still calculated, its numerator is zero and its denominator is positive. Therefore, the second supervision loss is zero and will not be divided by zero. The second training phase can still utilize the first supervision samples for calculation. .

[0091] 0. Phased training relationship The first training phase meets the requirements. and This allows the target model to establish a baseline using rule-based teacher supervision. After completing the preset training rounds or meeting validation conditions, the baseline parameters are saved. The second training phase begins Load the model and satisfy and This approach utilizes the fused weak supervision for correction while retaining non-zero teacher constraints. The non-zero weights are determined based on the dimensions of the two types of losses, the effective sample size, and the independent validation results; this implementation does not limit their specific values.

[0092] 0. Implementation Method Four: Optional Structures of the Target Model In a feasible example, input events are processed into a temporal feature sequence according to a preset sampling method and window configuration. The target model includes a temporal feature encoder and one or more consecutive output heads. The temporal feature encoder can employ a one-dimensional convolutional network, a recurrent neural network, a gated recurrent unit, a temporal convolutional network, an attention encoder, or a combination of at least two of these. The consecutive output heads are used to generate bounded continuous values ​​with independent semantics, and their range can be limited using hyperbolic tangent activation or output pruning. No probability normalization is performed on the consecutive output dimensions to ensure that the dimensions compete with each other and sum to one.

[0093] The sampling rate, window length, number of network layers, hidden dimension, number of output heads, and specific temporal coding structure are determined based on the characteristics of the input events, the resources of the target device, and the verification results, and do not constitute necessary limitations on the core training method of this invention.

[0094] The target model's network input is a sequence of features from the input segment, and the network output is a continuous state vector. First and second supervision are used only to calculate the training loss and are not used as additional inputs during inference. Therefore, the trained target model can perform inference on new input segments without any future actions such as saving or sharing.

[0095] 0. Implementation Method 5: Optional Active Sample Selection and Transformation Closed Loop Active sample selection is not a necessary step in the main training chain of this invention and can be enabled after the second training phase or during model iteration. In this embodiment, samples are selected first, and then the verification results are converted into supervision records corresponding to the continuous output space. Discrete categories that only represent the priority relationship of results are not directly used as training labels for the continuous output head of the target model.

[0096] The sample selection module can determine the priority order of samples to be reviewed based on the output discrepancy between the rule teacher and the target model in one or more continuous output dimensions, as well as the uncertainty of the target model. The output discrepancy and uncertainty can be normalized and combined separately, or they can be used as parallel screening conditions; the specific calculation and combination methods are determined based on the verification results and do not constitute a necessary limitation of the main training chain of this invention.

[0097] The review results are only converted into continuous supervision records usable for the next round of training if they contain confirmed continuous values ​​or corrected continuous vectors and corresponding dimensional masks. If the reviewer only makes a discrete choice of "rule teacher is better" or "target model is better" without confirming continuous values ​​or effective dimensions, the discrete choice will not be directly included in the continuous loss, but will be used for further annotation or sample selection; if no usable continuous values ​​are obtained, the corresponding samples will be excluded or added to the annotation queue. This forms a functional closed loop of "sample selection - continuous value and dimension confirmation - supervision record generation - next round of parameter update".

[0098] 0. Implementation Method Six: Quality Gating, Model Release and Rollback Quality gating can be applied to the data, the training process, and the candidate models.

[0099] On the data side, at least one of the following checks can be performed: (0) Check whether the identification chain of input fragments, reasoning records, system responses, and behavioral events is complete; (0) Check whether the behavioral event is within the valid backtracking time window and whether the association confidence level reaches the threshold; (0) Check whether the weak label mapping version, output dimension definition and target model version are consistent; (0) Filter out records that are abnormally frequently saved, shared in batches, left in the background, or disconnected from the device, which may not indicate normal feedback; (0) Check whether the weak label value is within the preset range, whether the dimension mask is binary, and whether the signal confidence and correlation confidence are between zero and one; (0) Reduce the weight of conflict records, close the mask, or send them for review based on the degree of dispersion of each dimension.

[0100] During training, the following can be monitored: whether the loss is finite, the number of effective weak label dimensions, the gradient norm, teacher validation set metrics, and the weak supervision coverage ratio. If non-numerical loss, a persistently zero number of effective masks, data version mismatch, or other training anomalies occur, the current training task can be stopped and the previous baseline model retained. The stage controller should also check the loss activation relationship between the first and second stages to avoid misusing weak supervision in the first stage or mistakenly setting the teacher constraint weights to zero in the second stage.

[0101] On the candidate model side, the continuous regression error, output stability, and performance on verified samples of the candidate model and the previous stable model can be compared on an independent validation set. For models intended for deployment on resource-constrained devices, it is also possible to check whether the model size, peak memory, inference latency, and energy consumption meet preset thresholds. These thresholds should be determined through actual device testing, and it is not permissible to pre-declare that a candidate model has met specific metrics.

[0102] If a candidate model fails the data consistency check, offline evaluation, or resource testing, it will be kept in a temporary state and will not replace the running stable model. If a pre-defined metric is found to degrade during optional gray-scale validation, the validation scope will be stopped and the previous stable version will be restored. The model version record should include at least the training data version, rule teacher version, weak label mapping version, loss weights, model parameter summary, and evaluation results to support traceability and rollback.

[0103] 0. Implementation Method Seven: Training Device and Storage Structure The training device provided in this embodiment can be deployed on a server, an edge computing device, or a training platform composed of multiple computing nodes. The training device includes:

[0104] (0) Input fragment construction module, used to receive raw input events with timestamps, perform window partitioning, feature extraction and sample label allocation, and form an input feature sequence that the target model can obtain in both the training and inference phases; (0) The first supervision generation module is used to call the rule teacher to generate teacher labels, teacher confidence and rule version records in the complete output space; (0) Signal acquisition and backtracking module, used to receive operational behavior events and statistical signals, establish the association chain between input segments, inference records, system responses and behavior events, and generate association confidence; (0) Weak supervision construction module, used to distinguish between label type, weight type, correlation type and boundary type signals, and generate weak label vector, dimension mask, signal confidence and sample weight for label type signals that meet the mapping conditions; (0) Dimensional fusion module, used to filter weak labels according to the output dimension, calculate fused labels, weighted dispersion degree used to characterize the degree of label conflict, dimension mask after conflict processing and dimensional effective training weights; (0) A staged training module is used to execute the first training stage and the second training stage. The baseline model parameters are obtained in the first training stage, and the baseline model parameters are loaded in the second training stage and the second supervised loss and the non-zero first supervised loss are calculated at the same time. (0) An optional active sample selection module for selecting samples based on divergence and uncertainty, and converting available verification results into continuous supervision records; (0) Optional quality gating module for performing data inspection, training anomaly inspection, candidate model evaluation, temporary storage and rollback.

[0105] Each module can be implemented by different program functions on the same processor, or by different processors, services, or computing nodes. Modules maintain a correspondence through sample identifiers, model versions, and data versions. The module names are used to distinguish functions and are not required to be physically independent of each other.

[0106] To support the above modules, the storage system may include the following logical data tables or equivalent data structures: Input fragment table Session ID, Sample ID, Start and End Time, Original Event Reference, Feature Version Teacher Supervision Form Sample identifier, teacher label vector, teacher confidence score, rule version Behavioral Event Table Behavior event identifier, response identifier, behavior type, behavior time, anomaly marker Related Tables Behavioral event identifier, sample identifier, association confidence level, backtracking method Weak supervision table Sample identifier, signal identifier, signal source, signal time, weak label vector, dimension mask, signal confidence, correlation confidence, sample weight, mapping version Model version table Model version, baseline version, training data version, loss configuration, evaluation status The tables described above can be merged, split, or implemented using object storage, message logging, relational databases, or key-value databases. The key is to maintain a traceable relationship between the input fragments, the two types of supervision information, and the model version.

[0107] 0. Implementation Method Eight: Electronic Devices, Storage Media, and Computer Program Products An electronic device may include at least one processor, a memory, a communication interface, and a bus. The memory stores a computer program and at least a portion of the aforementioned data structures. When the processor executes the computer program, it performs steps such as input segment construction, first-supervised generation, signal backtracking, weak-supervised construction, dimension-by-dimensional fusion, and phased training.

[0108] The processor may be a central processing unit, a graphics processing unit, a neural network processor, a digital signal processor, or a combination thereof. The memory may include volatile memory and non-volatile memory. The training process may be executed entirely on the server, or the event acquisition and feature formation may be completed on the device side, the server may complete the supervised construction and model training, and then the gated model may be deployed to the device side.

[0109] The computer-readable storage medium may be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, or other non-transitory medium capable of storing program instructions. When the program instructions are executed by the processor, they cause the processor to implement the method of any of the above embodiments.

[0110] The computer program product may include a computer program or computer instructions that, when run on a computing device, cause the computing device to perform the method of any of the above embodiments.

[0111] The behavior types, output dimensions, time thresholds, confidence levels, loss weights, network layers, and device types listed in the above embodiments are all optional examples. For uncalibrated behavior mappings and untested performance parameters, conditional configuration should be used. The core of this invention lies in: forming a first-level supervision by a rule-based teacher and a second-level supervision by backtracking correlation for the same input segment; using dimension masks, independent confidence fields, and conflict information to complete dimension-by-dimensional fusion; and updating the target model by first establishing a rule baseline and then performing weakly supervised behavior correction while retaining the rule-based teacher constraints.

[0112] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0113] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A training method for a dual-path model using rule-based teachers and weak behavioral supervision, characterized in that, include: Multiple training input segments are acquired. Each training input segment includes a sample identifier, a time range, and an input sequence of the target model. The input sequence consists of device event data that the target model can obtain during the inference phase or time-series features obtained based on the device event data. The target model is used to output a state vector with multiple continuous output dimensions based on the input sequence. The training input segment is input into the rule teacher to obtain first supervision information aligned with each consecutive output dimension of the state vector; Acquire behavioral events generated during device operation or statistical signals obtained from the device event data, and associate the behavioral events or statistical signals with corresponding training input segments based on at least one of identification correlation and time relationship, and determine the correlation confidence between the behavioral events or statistical signals and the training input segments; The associated, labeled behavioral events or statistical signals are mapped to weakly supervised records. The weakly supervised records include at least a weak label vector, a dimension mask, a signal confidence score, the association confidence score, and sample weights. The dimension mask only sets the continuous output dimensions that have a supervisory basis for the corresponding behavioral event or statistical signal to be valid. For each consecutive output dimension of the same training input segment, weak supervision records that are effective in the consecutive output dimension are first screened using the dimension mask. The dimensional reliability is determined based on the signal confidence and correlation confidence of the screened weak supervision records, and the effective support is obtained by summing the dimensional reliability. When the effective support reaches a preset support condition, weak labels are determined to be fused. Based on the effective support, the sample weights, and the label conflict degree represented by weighted dispersion, the dimensional effective training weights are determined as coefficients of the corresponding loss terms. The dimensional effective training weights are reduced as the label conflict degree increases, or the fused dimension mask of the consecutive output dimension is set to invalid when the label conflict degree meets a preset conflict condition, so as to form second supervision information. The process involves executing a first training phase and a second training phase. In the first training phase, the first supervision loss corresponding to the first supervision information is enabled while the second supervision loss corresponding to the second supervision information is disabled to train the target model and obtain baseline model parameters. In the second training phase, the baseline model parameters are used as initial parameters, first supervision samples and second supervision samples are sampled, the second supervision loss is enabled to update the target model, and the first supervision loss with non-zero loss weights is continuously calculated as a rule teacher constraint.

2. The method according to claim 1, characterized in that, The first supervision information includes the sample identifier, the time range, the teacher label vector, the teacher confidence level, and the rule version information, wherein the teacher label vector has the same dimension as the output space of the target model; The weakly supervised record also includes a signal identifier, signal source, signal timestamp, and mapping version; for behavioral events acting on device responses, the association confidence is determined according to the identifier chain and time relationship of "training input fragment - inference record - device response - behavioral event"; for statistical signals directly calculated from the training input fragment, direct association is performed using the sample identifier.

3. The method according to claim 1, characterized in that, The behavioral events or statistical signals are classified according to their supervisory role as follows: Labeled signals are used to generate weak label values ​​for one or more consecutive output dimensions after mapping calibration. Weighted signals are used to adjust the sample weights of existing supervisory information without independently generating weak label values. Correlation signals are used to determine the continuity between adjacent training input segments; Boundary signals are used to determine the initial boundaries of new training input segments or new states; The labeled signals include at least one of calibrated saved events, shared events, session duration, or statistical signals. When the statistical signal is a non-negative statistic, it is first centered and scaled relative to a neutral benchmark value, so that statistics below the neutral benchmark value generate negative weak label values ​​and statistics above the neutral benchmark value generate positive weak label values. For repeated performance signals, they are not used as one of the above four types of signals in the formation of second supervision information before calibration is completed, but are only used for sample selection or verification. After calibration of the relationship between repeated performance and training contribution is completed, they are used as the weighted signals. Regardless of whether the calibration is completed, the repeated performance signals do not independently generate new continuous weak label values, nor do they open the originally invalid output dimension mask. The interrupted continuation signal is used as the correlation signal or the boundary signal.

4. The method according to claim 1, characterized in that, For a training input segment, continuous output dimensions, and weakly supervised records associated with the training input segment, the dimension-wise reliability of a single weakly supervised record is determined according to the following formula: in, This represents the training input segment. Indicates continuous output dimension. This represents a weakly supervised record associated with the training input segment. To match the training input fragment A set of weakly supervised records associated with each other. For dimension mask values ​​that are either zero or one, For the confidence level of a dimension-by-dimensional signal located between zero and one, The correlation confidence is between zero and one; when a weakly supervised record only stores the record-level signal confidence, the record-level signal confidence is used for each consecutive output dimension where its dimension mask is valid; First, sum the dimension-by-dimensional reliability according to the following formula to define the effective support quantity. : When the effective support amount is greater than the support threshold, the fused weak label is determined according to the following formula. : The degree of label conflict is determined according to the following formula. : in, For weak supervision records In continuous output dimension Weak label values ​​on The degree of label conflict is represented by a weighted dispersion measure; Based on the effective support quantity, the aggregated sample weights formed by the sample weights, and the conflict penalty function that monotonically decreases with the degree of label conflict, the effective training weights for each dimension are determined, and an upper limit is set for the effective training weights for each dimension. The effective training weights for each dimension are directly used as the coefficients of the second supervised loss term for the corresponding continuous output dimension. When the effective support quantity is not greater than the support threshold or when hard conflict gating is used and the degree of label conflict reaches the conflict threshold, the corresponding fusion dimension mask is set to invalid. When the fusion dimension mask is invalid, the corresponding effective training weights for each dimension are set to zero, and the corresponding weak fusion labels are set to finite placeholders that do not participate in the loss.

5. The method according to claim 4, characterized in that, The first supervision loss and the second supervision loss are respectively: in, This represents the number of samples in the current training batch. The number of the continuous output dimensions. For teacher confidence, The input sequence for training input segments, For the first supervision information in the continuous output dimension The label value on To obtain a fusion dimension mask that takes zeros or ones, For the dimensionally effective training weights that directly affect the loss term, For parameters The target model, For continuous-valued difference functions, The result is a positive number; the second supervision loss is normalized according to the number of effective dimensions of the fusion dimension mask, rather than according to the sum of the effective training weights of each dimension; for samples in the current training batch that lack first supervision information, the corresponding teacher confidence is set to zero, and the missing first supervision label is set to a finite placeholder value that does not participate in the loss; for samples that lack second supervision information, the corresponding fusion dimension mask and the effective training weights of each dimension are set to zero, and the missing weak fusion label is set to a finite placeholder value that does not participate in the loss; No. The total loss for each training phase is: in, For regularization terms with model parameters as independent variables, , and For the first Non-negative loss weights for each training phase; the first training phase satisfies... and The second training phase meets the requirements. and And the initial model parameters for the second training phase are the same as the baseline model parameters obtained in the first training phase.

6. The method according to claim 5, characterized in that, Also includes: The first supervisory information is filtered or downweighted based on the teacher's confidence level. The weak supervisory records are filtered or downweighted based on at least one of the correlation confidence level, signal time window and signal frequency. An upper limit is set for the cumulative contribution of the same signal identifier or the same signal source. When all fused dimension masks in a training batch are invalid, skip the second supervision backpropagation of that training batch or set the second supervision loss to zero. Offline evaluation and resource constraint evaluation are performed on the candidate models obtained in the second training phase. If the candidate model does not meet the preset release conditions, the release of the candidate model is stopped and the previous stable model version is retained.

7. A training device for a dual-path model of rule-based teacher and weak behavioral supervision, characterized in that, include: The input segment construction module is configured to acquire multiple training input segments. Each training input segment includes a sample identifier, a time range, and an input sequence of the target model. The input sequence is composed of device event data that the target model can obtain during the inference phase or temporal features obtained based on the device event data. The target model is used to output a state vector with multiple continuous output dimensions based on the input sequence. The first supervised generation module is configured to input the training input fragment into a rule teacher to obtain first supervised information aligned with each consecutive output dimension of the state vector; The signal acquisition and backtracking module is configured to acquire behavioral events generated during device operation or statistical signals obtained from the device event data, and associate the behavioral events or statistical signals with corresponding training input segments based on at least one of identification correlation and time relationship, and determine the correlation confidence. The weak supervision construction module is configured to map the associated, labeled behavioral events or statistical signals into weak supervision records. The weak supervision records include at least a weak label vector, a dimension mask, a signal confidence score, the association confidence score, and sample weights. The dimension mask only sets the continuous output dimensions that have a supervisory basis for the corresponding behavioral event or statistical signal to be valid. The dimension-wise fusion module is configured to, for each consecutive output dimension of the same training input segment, first filter weak supervision records that are valid in the consecutive output dimension using the dimension mask, determine the dimension-wise reliability based on the signal confidence and correlation confidence of the filtered weak supervision records, and sum the dimension-wise reliability to obtain the effective support quantity; when the effective support quantity reaches a preset support condition, determine the fusion weak label, and determine the dimension-wise effective training weight as the coefficient of the corresponding loss term based on the effective support quantity, the sample weight, and the label conflict degree represented by the weighted dispersion degree. The dimension-wise effective training weight is reduced as the label conflict degree increases, or the fusion dimension mask of the consecutive output dimension is set to invalid when the label conflict degree meets a preset conflict condition, so as to form the second supervision information. The phased training module is configured to enable the first supervision loss corresponding to the first supervision information and disable the second supervision loss corresponding to the second supervision information in the first training phase to train the target model and obtain baseline model parameters; in the second training phase, the baseline model parameters are used as initial parameters, the first supervision samples and the second supervision samples are sampled, the second supervision loss is enabled to update the target model, and the first supervision loss with non-zero loss weight is continuously calculated as the rule teacher constraint.

8. An electronic device, characterized in that, The system includes a processor and a memory communicatively connected to the processor. The memory stores a computer program that, when executed by the processor, causes the processor to implement the rule-based teacher and behavior-based weakly supervised dual-path model training method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the dual-path model training method of rule teacher and weakly supervised behavior as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the dual-path model training method of rule teacher and weakly supervised behavior as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Music emotion recognition method and system based on audio signals and lyrics

    CN113129871A

  • Confidential text recognition model training method, system and device based on knowledge distillation

    CN113901224B

  • Weak supervision model training method and device and electronic equipment

    CN115204381A

  • Vietnamese speech recognition data screening method based on acoustic spatial distribution constraint

    CN116863917A