A personalized traditional Chinese five-tone audio generation system and method

CN122991126APending Publication Date: 2026-10-27JIANGXI YOUCHUANG WEIYE MEDICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611296304.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

因此,单纯采用人工智能生成五音音乐,或者根据生理和情绪反馈调整音乐参数,已难以解决生成依据不透明、参数来源难以审阅的问题

Benefits of technology

[0083]1.本发明通过按药物记录和穴位记录分别构建方药贡献数据对象与针灸经络贡献数据对象,并将数值贡献字段同标识、禁忌、医生锁定及版本字段分开保存,使不同单位、不同语义的处方数据能够在各自行内完成标准化和一次赋权;当药物、剂量、穴位或刺激参数发生变化时,只需重算受影响记录及其下游对象,减少对未变化数据的重复处理。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122991126A_ABST
    Figure CN122991126A_ABST
Patent Text Reader

Abstract

A personalized traditional Chinese medicine five-tone audio generation system and method, the system acquires confirmed syndromes, treatment principles, prescriptions and acupuncture data under the same prescription version, and generates prescription contribution data objects and acupuncture meridian contribution data objects respectively; through the Chinese medicine side atlas, audio attribute atlas and cross-atlas mapping edge, the source block is executed for deduplication and intra-block weighted normalization, the improving direction, the reducing direction and the constraint edge are processed separately and once cross-source aggregation is performed, and a unique audio attribute control object is formed; according to this, five-tone target proportion, continuous music parameters, discrete music state and constraint set are generated, and a multi-track digital score with prescription source, rule and version label is generated; in sequence, score level checking and pre-rendered acoustic level checking are performed, affected objects are determined according to the label, unaffected events are retained, and only conflicting phrases, parts, configurations or time windows are locally regenerated, corrected or re-rendered to reduce repeated weighting and overall regeneration range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to digital audio generation, knowledge graphs, and computer data processing technologies. Specifically, it relates to a personalized TCM five-tone audio generation system and method that converts confirmed TCM syndromes, treatment principles, prescriptions, and acupuncture prescriptions into traceable digital audio control parameters, and performs rule verification and local regeneration on the generated musical scores. Background Technology

[0002] Traditional Chinese medicine's five-tone theory uses the correspondences between the five musical notes (Gong, Shang, Jiao, Zhi, Yu) and the five elements, internal organs, and emotions as a reference for music selection and organization. With the development of digital audio processing, artificial intelligence music generation, and medical information technology, five-tone related audio has gradually expanded from manual selection and fixed music library playback to automatic recommendation or generation of music based on syndrome tags, emotional state, physiological signals, or user preferences.

[0003] Existing technologies can utilize knowledge bases, machine learning models, or generative models to generate musical parameters such as pitch, rhythm, and timbre based on electronic medical records, diagnostic information, multimodal state data, or text prompts. These parameters can further be used to generate MIDI events or audio waveforms. Some systems can also dynamically adjust the music track, tempo, loudness, or frequency based on heart rate, EEG, emotion recognition results, or user feedback. Therefore, simply using artificial intelligence to generate pentatonic music or adjusting musical parameters based on physiological and emotional feedback is insufficient to address the issues of opaque generation criteria and difficulty in verifying the source of the parameters.

[0004] In existing solutions, traditional Chinese medicine prescriptions are typically summarized only as syndromes, efficacy, or textual prompts, while acupuncture prescriptions are usually only converted into meridians, acupoints, or frequency tags. There is a lack of processing mechanisms to construct structured contribution data objects for each herb's dosage, role, processing method, five-element and meridian attributes, as well as for each acupoint's meridian, tonification / sedation, stimulation intensity, duration of action, and eight extraordinary meridians connections. Therefore, the generation system struggles to determine which herb, acupoint, or rule a particular audio parameter specifically originates from, and it also struggles to recalculate only the affected data when prescription versions change.

[0005] Furthermore, existing music generation systems typically use rules as pre-generation prompts or internal model constraints, resulting in digital music score events lacking source labels such as syndromes, treatment principles, prescriptions, acupoints, risks, doctor lock-in, and version. When the generated result deviates from the target pentatonic ratio, tempo, spectrum, or voice range, a complete regeneration or replacement is often used, which can easily alter musical phrases and voices that already meet the rules, leading to increased version differences and hindering doctors from locating the source of conflicts.

[0006] The current technical problem to be solved is how to convert confirmed syndromes, treatment principles, prescriptions and acupuncture prescriptions into calculable, traceable and non-repeating digital audio control parameters, and how to enable the generated multitrack digital scores to be checked according to prescription rules, doctor locks and security boundaries, and to correct only conflicting musical phrases, voices or time windows when deviations are found. Summary of the Invention

[0007] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is to provide a personalized TCM five-tone audio generation system and method, which converts confirmed syndrome, treatment principle, prescription and acupuncture data into audio control parameters with traceable source and avoidance of duplicate weighting, and performs local correction only on the affected musical phrase, voice part or time window when the generated result does not meet the constraints.

[0008] To address the aforementioned technical problems, this invention provides a personalized TCM five-tone audio generation system, comprising:

[0009] The data acquisition and structuring module is used to acquire confirmed syndrome data, treatment principle data, prescription data, and acupuncture prescription data for the same user and the same prescription version, assign source identifiers and version identifiers to each original fact, and generate structured input data objects.

[0010] A TCM assessment intelligent agent is used to generate syndrome evidence objects and treatment principle target objects based on the structured input data objects.

[0011] The prescription parsing and contribution object generation module is used to generate prescription contribution data objects based on drug records and acupuncture meridian contribution data objects based on acupoint records.

[0012] The dual-map mapping module is used to receive the syndrome evidence object, the treatment principle target object, the prescription contribution data object, and the acupuncture meridian contribution data object. It calls the TCM side map, the audio attribute map, and the cross-map mapping edges connecting the two. It performs deduplication on the valid mapping edges according to the source identifier, source version, stage identifier, source dimension, target dimension, mapping direction, and rule version. It performs normalization within each source block, separates the positive direction numerical edges, negative direction numerical edges, and constraint edges, and performs a cross-source aggregation according to the source block fusion weight to generate a unique audio attribute control object with numerical load, constraint set, and for the same user, the same prescription version, and the same audio prescription stage.

[0013] The parameter generation module is used to generate the five-tone target ratio, continuous music parameters, discrete music states, and constraint sets based on the audio attribute control object.

[0014] A music generation agent is used to generate candidate multitrack digital scores based on the five-tone target ratio, the continuous music parameters, the discrete music state and the constraint set, and to write rule source tags for each score event, which correspond to its numerical source, such as syndrome, treatment principle, drug record, acupoint record, cross-graph mapping edge, rule and version.

[0015] The rule verification and local regeneration module is used to perform score-level verification on the candidate multitrack digital scores. When a score-level conflict is found, it generates a list of affected objects and a local regeneration instruction based on the rule source tags, so that the music generation agent retains the unaffected score events and their rule source tags, and only performs local regeneration on the affected phrases, voices or time windows. It is also used to perform acoustic-level verification on the candidate pre-rendered results. When an acoustic-level conflict suitable for local configuration correction or local re-rendering is found, it generates a local configuration correction instruction or a local re-rendering instruction, respectively.

[0016] The timbre control agent is used to generate timbre configuration objects and rendering parameter objects for the candidate multitrack digital scores that have passed the score-level verification, and to perform local corrections only on the affected timbre configuration objects or rendering parameter objects according to the local configuration correction instructions.

[0017] The audio rendering and output module is used to perform candidate pre-rendering based on the candidate multitrack digital score, the timbre configuration object and the rendering parameter object, extract actual acoustic features, perform local re-rendering only on the affected voice parts or time windows according to the local re-rendering instruction, and output a publishable audio file or playback control sequence when both the score-level verification and the acoustic-level verification pass.

[0018] As a further improvement to the present invention, it also includes:

[0019] The collaborative control and message routing module is used to perform object routing, task status management, version consistency verification, message deduplication, exception degradation and control priority management based on the input and output dependencies of each data object.

[0020] The version management module is used to assign version identifiers to input objects, intermediate objects, candidate objects and output objects, save parent-child version relationships, input-output dependencies and rollback pointers, and trigger incremental recalculation of affected objects when the root object changes;

[0021] The feedback acquisition module is used to construct the actual playback timeline based on the playback context object and the actual playback status, collect feedback data, and perform preprocessing, feature extraction, time alignment, and single-modal quality calculation.

[0022] The feedback analysis and control module is used to generate feedback state vectors, overall feedback quality, feedback conflict markers, and candidate adjustment instructions based on the feedback characteristics that are of acceptable quality and synchronized with time.

[0023] The candidate adjustment instruction only generates continuous music parameter candidate sub-versions, discrete music state candidate sub-versions, local score versions, timbre configuration sub-versions, or rendering parameter sub-versions. It does not modify the confirmed syndrome evidence object, treatment principle target object, prescription contribution data object, acupuncture meridian contribution data object, or audio attribute control object, and causes the candidate sub-versions to re-enter the corresponding score-level verification or acoustic-level verification.

[0024] This invention also discloses a personalized method for generating TCM five-tone audio, characterized by comprising:

[0025] S100: Obtain confirmed syndrome data, treatment principle data, prescription data, and acupuncture prescription data under the same user and the same prescription version, as well as authorized and doctor-confirmed hospital information system data; assign source identifiers and version identifiers to each original fact; and generate structured input data objects.

[0026] S200: Generate syndrome evidence objects and treatment principle target objects based on the structured input data objects; generate prescription contribution data objects based on drug records; generate acupuncture meridian contribution data objects based on acupoint records; call the TCM side map, audio attribute map, and the cross-map mapping edges connecting the two; perform deduplication, source block normalization, increase directional numerical edges, decrease directional numerical edges, and separate processing of constraint edges on each source block, as well as one cross-source aggregation, to form a unique audio attribute control object with numerical load, constraint set, and for the same user, the same prescription version, and the same audio prescription stage; generate five-tone target ratios, continuous music parameters, discrete music states, and constraint sets based on the audio attribute control object;

[0027] S300: Generate candidate multitrack digital scores based on the five-tone target ratio, the continuous music parameters, the discrete music state, and the constraint set; write the referenced syndrome, treatment principle, drug record, acupoint record, cross-graph mapping edge, rule, and version corresponding rule source tag for each score event; perform score-level verification on the candidate multitrack digital scores, and determine whether to pass, partially regenerate, stage reconstruct, rollback, or review based on the score-level verification result; wherein, when determining to perform partial regeneration, generate a list of affected objects based on the rule source tag, retain the unaffected score events and their rule source tags, and perform partial regeneration only on the affected musical phrases, voice parts, or time windows;

[0028] S400: Select timbre resources for the candidate multitrack digital scores that have passed the score-level verification, and generate a timbre configuration object and a rendering parameter object;

[0029] S500: Based on the candidate multitrack digital score, the timbre configuration object, the rendering parameter object, and the device capability information, perform candidate pre-rendering to generate candidate track audio and candidate mixed audio, extract actual acoustic features, and perform acoustic level verification; based on the acoustic level verification result, determine whether to pass, perform local configuration correction, perform local re-rendering, return to S400 to reconfigure the timbre, roll back, or review; wherein, when determining to perform local configuration correction or local re-rendering, only the affected timbre configuration, rendering parameters, voice parts, or time windows are processed accordingly; when both the score-level verification and the acoustic level verification pass, output a publishable audio file or playback control sequence.

[0030] As a further improvement of the present invention, S200 further includes:

[0031] S210. Standardize the symptoms, tongue appearance, facial appearance, pulse appearance, constitution, emotions, prescriptions, acupuncture prescriptions and hospital information system data in the structured input data object, and record the original fact identifier, source, time, completeness, confidence level, confirmation status and version;

[0032] S220. Generate contributions of excessive five elements and insufficient five elements respectively according to the rule chain of "characteristics-symptoms-organs or meridians-five elements", and save the contributions in different directions separately.

[0033] S230. Generate visceral susceptibility modification objects based on physical constitution, lifestyle habits, duration of emotional states, historical records and environmental information;

[0034] S240. Generate the prescription contribution data object based on the actual dose, normalized reference dose, prescription role, processing method, data confidence, five-element attribute vector, meridian affiliation vector, and direction of action vector of each drug record.

[0035] S250. Generate the acupuncture meridian contribution data object based on the stimulation type, stimulation intensity, duration of action, acupoint role, data confidence, five-element attribution vector, meridian attribution vector, tonification and sedation direction vector, and eight-vessel association vector recorded for each acupoint; wherein, for equipment stimulation intensity with physical dimensions, the stimulation intensity is normalized proportionally according to the equipment stimulation reference value, and for manual acupuncture techniques without unified physical dimensions, the stimulation intensity is directly mapped to a standardized stimulation intensity according to a versioned level mapping table, and the two standardization paths are mutually exclusive.

[0036] S260. When all the data objects required for the cross-map mapping have been formed, the status is confirmed to meet the requirements, and the versions are compatible, the TCM side map, the audio attribute map, and the cross-map mapping edges are called. Deduplication is performed according to the source type, source identifier, source version, stage identifier, source dimension, target dimension, mapping direction, and rule version. For each source block, the sum of the products of the basic weights and edge confidence of each effective mapping edge in the source block is used as the normalized denominator, and the normalized source values ​​referenced by each effective mapping edge in the source block are weighted and averaged. Edges that increase the direction value, edges that decrease the direction value, and constraint edges are processed separately, and a cross-source aggregation is performed according to the source block fusion weight to generate the audio attribute control object.

[0037] S270. Obtain the non-negative five-element demand intensity arranged in the order of wood, fire, earth, metal, and water from the audio attribute control object, and normalize it according to the relationship between earth and palace, metal and shang, wood and jiao, fire and zhi, and water and yu to obtain the target proportion of the five tones.

[0038] S280. Generate the continuous music parameters, the discrete music state, and the constraint set according to the audio attribute control object, wherein the continuous music parameters are updated progressively within an allowable range, and the discrete music state is determined by candidate filtering and state machine switching;

[0039] S290, Output the syndrome evidence object, the treatment principle target object, the prescription contribution data object, the acupuncture meridian contribution data object, the effective mapping edge list, the audio attribute control object, the five-tone target ratio, the continuous music parameter, the discrete music state, the constraint set, and the rule source index object; the rule source index object is only used for tracing, verification, and version dependency, and does not participate in the second numerical summation.

[0040] 5. The personalized TCM five-tone audio generation method according to claim 3, characterized in that, step S300 further includes:

[0041] S310. Establish a set of permissible pitches according to the target mode. The set of permissible pitches includes the target pentatonic scale pitches and passing tones or ornaments that meet the conditions of weak beat position, maximum duration, resolution direction, upper limit of usage frequency and applicable musical phrase.

[0042] S320. Based on the five-tone target ratio, at least two of the following are subject to quota control: the number of events, cumulative duration, strong beat structure weight, phrase termination and theme accent weight, event intensity or target event gain for the musical score events corresponding to Gong, Shang, Jiao, Zhi and Yu.

[0043] S330. Based on the total duration and audio prescription stage, establish a segment plan that includes at least an introduction, a main modulation segment, and a closing segment, and record the start and end times, target key, pentatonic ratio, tempo, range, rhythm density, harmonic tension, theme motif, voice part, and ending condition for each segment.

[0044] S340. Based on the correspondence between wood and jiao, fire and zhi, earth and gong, metal and shang, water and yu, and the order of mutual generation, candidate five-tone harmonic relationships are generated, and the actual interval is determined by combining the current mode, octave, degree of consonance, voice connection, harmonic tension and section function.

[0045] S350. Generate a music score event record, wherein the music score event record includes at least the track identifier, voice part identifier, section identifier, start and end time, pitch, duration, dynamics, gain, timbre suggestion, envelope, sound image, rule source label, risk label, doctor lock field and version identifier;

[0046] S360: First, perform a score-level hard constraint check, then calculate the score-level soft constraint comprehensive compliance. If the score-level hard constraint check fails, proceed to correction, rollback, or review. If the score-level soft constraint comprehensive compliance is lower than a first threshold but not lower than a second threshold, freeze the event identifier, time location, rule source label, doctor lock field, and version identifier of unaffected score events based on the conflict location record and the list of affected objects, and use the conflict rule identifier and the parameter to be corrected as local regeneration conditions. If the score-level soft constraint comprehensive compliance is lower than the second threshold, proceed to stage reconstruction or doctor review, wherein the first threshold is higher than the second threshold.

[0047] As a further improvement of the present invention, S400 further includes:

[0048] S410: Select candidate timbre resources according to the vocal functions of the main melody, harmony, low frequency, ordinary meridian auxiliary track and extraordinary meridian auxiliary track;

[0049] S420. Among the candidate timbre resources that meet the five elements candidate attributes, effective range, doctor lock, equipment capability and taboo, compare the spectral centroid, harmonics, attack, sustain, brightness, roughness and variation cost to determine the timbre resources that match the target acoustic parameters.

[0050] S430: Generate candidate rendering parameters for equalization, filtering, harmonic gain, dynamic envelope, imaging, and reverberation based on the target spectrum, harmonics, envelope, gain, imaging, and reverberation range.

[0051] S440. Generate a track-by-track rendering task object based on the score event record that has passed the score-level verification and the determined timbre resources. The track-by-track rendering task object includes at least the sound source identifier, candidate synthesis method, pitch, duration, velocity, harmonic parameters, envelope, filtering, gain, image, reverberation, resource version, and target track.

[0052] S450: Read the ordinary meridian auxiliary tracks and extraordinary meridian auxiliary tracks that have passed the score-level verification from the candidate multi-track digital score, and generate timbre configuration objects and rendering parameter objects for the ordinary meridian auxiliary tracks and extraordinary meridian auxiliary tracks; when it is necessary to add, delete or change the pitch, duration, event density, entry time or exit time of the auxiliary track, return to S300 to generate the corresponding auxiliary track score event, and re-execute the score-level verification. After the score-level verification passes, proceed to S400.

[0053] S460. Read the offline measurement characteristics of the timbre resource, perform configuration-level pre-check on the timbre configuration object and the rendering parameter object, and check the effective range, target frequency range, harmonic parameters, envelope, gain, sound image, reverberation, resource integrity and device compatibility conditions; if it does not meet the target range, reselect the timbre resource or correct the rendering parameters.

[0054] As a further improvement of the present invention, S500 further includes:

[0055] S510. Based on the start and end times of the music score event, the uniform sampling rate, the sampling clock, and the delays of each sound source and processing chain, calculate the target sampling position and delay compensation plan for each music score event and track.

[0056] S520. Based on the track rendering task object, call the corresponding sampled sound source or synthesizer to generate each track audio. Perform filtering, equalization, dynamic envelope, compression or limiting, sound panning and reverberation processing on the track audio. Place each track audio on a unified time axis according to the target sampling position and the delay compensation plan.

[0057] S530 mixes the audio of each track according to mono, stereo or multi-channel configuration, and according to the retention priority of the main melody, main five-tone support, rhythm, ordinary meridian auxiliary track and extraordinary meridian auxiliary track, and turns off, merges or reduces the spatial effects of low priority tracks in turn when the channel capacity is insufficient.

[0058] S540: Perform loudness normalization, peak limit, and rate of change limit on the mixing result, and set the start fade-in and pause or stop fade-out.

[0059] S550 performs device calibration based on the number of channels, frequency response, maximum output of the playback device, and headphone wearing status, and generates a device adaptation sub-version when the device capability is insufficient.

[0060] S560. Extract at least one of the following from the candidate track audio and candidate mixed audio as the actual acoustic features: loudness, peak value, spectral centroid, harmonic distribution, sound image, dynamic envelope, voice part gain, reverberation, track synchronization and voice part masking degree. First, perform acoustic-level hard constraint check, and then calculate the acoustic-level soft constraint comprehensive compliance.

[0061] Specifically, the score-level verification uses only score-level statistical values ​​calculated from the candidate multitrack digital scores, and the acoustic-level verification uses only the actual acoustic features. The score-level verification and the acoustic-level verification employ independent sets of hard constraints, soft constraints, and comprehensive compliance, respectively, without adding, multiplying, or weighting the actual values ​​or comprehensive compliance of the two. Score-level conflicts trigger local regeneration, timbre or spectral configuration conflicts trigger local configuration correction, and mixing, track synchronization, loudness, device adaptation, or channel layout conflicts trigger local re-rendering.

[0062] As a further improvement of the present invention, S600 is included after S500, wherein S600 includes:

[0063] S610. Before playback, collect physiological feedback and subjective scores in a resting or stable state, establish an individual baseline, and record the device model, sampling rate, wearing or contact status, collection time, and proportion of effective data.

[0064] S620: Construct the actual playback timeline based on the playback context object and playback status record, and add audio version, musical phrase, musical sentence, track, voice part, score event index and actual playback position to each feedback time window;

[0065] S630 performs preprocessing matching with the corresponding feedback modality for ECG or photoplethysmography pulse waves, EEG, skin conductance, respiration, facial or voice feedback respectively;

[0066] S640. Extract at least one of heart rate, heart rate variability, relative power of EEG frequency band, skin conductance, respiration, facial features, voice or subjective scale features from the preprocessed feedback data.

[0067] S650: Convert the effective data ratio, normalized signal-to-noise ratio, artifact quality score, time synchronization degree, and available quality sub-items in the wearing or contact state of each feedback mode to zero to one, and calculate the single-mode quality according to the versioned non-negative weight; mark the feedback mode with single-mode quality below the minimum quality threshold as unusable;

[0068] S660: Based on the quality of each single mode, the availability of the mode, and the time synchronization status, form an active feedback mode set and an active feedback feature set, and encapsulate the feature identifier, the feedback mode to which each active feedback feature belongs, the feature value, the quality of the single mode, the availability of the mode, the integrity flag, the time synchronization status, the device status, the security event flag, the feedback time window, and the playback context association information of each active feedback feature into a feedback data packet.

[0069] As a further improvement of the present invention, S700 is included after S600, wherein S700 includes:

[0070] S710. Read the feedback data packet and the stage target state object, and perform individual baseline correction, state semantic direction unification, normalization, state mapping and semantic state fusion on the activity feedback features that are of qualified quality and synchronized in time, to generate feedback state vector, overall feedback quality and feedback conflict marker.

[0071] S720. When the quality gate, safety gate, and continuous window conditions are met, candidate adjustment instructions are generated based on the versioned feedback-continuous parameter sensitivity rules, the current stage rules, and individual response records.

[0072] S730. For the candidate adjustment instructions, single amplitude limiting, rate of change limiting, cumulative change limiting and feasible region projection are performed on the continuous music parameters. The discrete music state is switched at the boundary of musical phrase or musical segment through candidate screening and state machine. An observation window and cooling time are set after each adjustment.

[0073] S740. When using the same target version, activity state dimension, state weight, window length and statistical method before and after adjustment, compare the state differences; when the state differences decrease and the quality and safety conditions are met, retain the candidate sub-version; when the state differences increase or become inappropriate, generate rollback candidates.

[0074] S750 identifies the root objects that have changed, and only recalculates the affected syndromes, treatment principles, drug records, acupoint records, cross-graph mapping edges and their downstream objects. Unaffected objects retain the original version. It saves the parent-child version relationship, input-output dependency relationship and rollback pointer for each input object, intermediate object, candidate object and output object, and re-verifies whether the historical stable version meets the current doctor lockout, contraindications, safety boundaries and device capabilities before rollback.

[0075] The candidate adjustment instruction only generates continuous music parameter candidate sub-versions, discrete music state candidate sub-versions, local score versions, timbre configuration sub-versions, or rendering parameter sub-versions. It does not modify the confirmed syndrome evidence object, treatment principle target object, prescription contribution data object, acupuncture meridian contribution data object, or audio attribute control object, and causes the candidate sub-versions to re-enter the corresponding score-level verification or acoustic-level verification.

[0076] As a further improvement of the present invention, S710 further includes:

[0077] S711. Verify the validity, time synchronization status, and single-modal quality of activity feedback features, and mark activity feedback features that do not meet the validity, time synchronization, or minimum single-modal quality conditions as unavailable;

[0078] S712. Based on the individual baseline, positive reference change scale, and state semantic direction coefficient, perform baseline correction, state semantic direction unification, and zero-to-one normalization on each effective feedback feature; assign each normalized activity feedback feature to a main state dimension according to the versioned feature-state mapping table; perform semantic state fusion within each feedback modality and between different feedback modalities; identify directional conflicts from different feedback modalities in the same state dimension; and generate the current feedback state vector, overall feedback quality, and feedback conflict marker.

[0079] S713. Generate a state error vector and a weighted Euclidean difference quantity based on the current feedback state vector and the stage target state vector, and determine the automatic adjustment permission based on the overall feedback quality, feedback conflict flag, safety event flag, current safety boundary and deviation persistence window;

[0080] S714. The state error vector is mapped to the continuous music parameter sensitivity matrix, parameter permission mask and personal response matrix through the version-fixed feedback state to become a continuous music parameter candidate increment, and the mode, timbre category, paragraph state, track start / stop and channel layout are used as discrete music state candidates.

[0081] S715. When the overall feedback quality is lower than the first gating threshold, only the feedback data is recorded. When the overall feedback quality is not lower than the first gating threshold and is lower than the second gating threshold, the feedback conflict is marked as false and no safety event is detected, only the low-disturbance continuous music parameters are enabled. When the overall feedback quality is not lower than the second gating threshold, the feedback conflict is marked as false, no safety event is detected, the current parameters meet the safety boundary and the deviation continuously reaches the preset window number, the adjustment permissions for rhythm parameters, local musical phrases, personal response records or discrete music state candidates are enabled.

[0082] The beneficial effects of this invention are:

[0083] 1. This invention constructs prescription contribution data objects and acupuncture meridian contribution data objects according to drug records and acupoint records respectively, and saves the numerical contribution field separately from the identification, contraindication, doctor lock and version fields, so that prescription data with different units and different semantics can be standardized and weighted once in their respective rows; when the drug, dosage, acupoint or stimulation parameters change, only the affected record and its downstream objects need to be recalculated, reducing the repeated processing of unchanged data.

[0084] 2. This invention uses composite source deduplication, weighted normalization within the source block, pooling of increasing and decreasing directions, independent storage of constraint edges, and cross-source aggregation to ensure that the same original fact forms only one effective numerical path under the same target dimension and rule version. This avoids the amplification of source block weights caused by differences in the number of effective mapping edges and prevents the direct cancellation of contributions from opposite directions from masking conflicts.

[0085] 3. This invention generates a unique audio attribute control object with a fixed numerical load, constraint set, and for the same user, the same prescription version, and the same audio prescription stage after cross-source aggregation. It also limits the generation of subsequent parameters to read only the aggregated values ​​and constraints of this object, so that prescription, acupuncture, and syndrome data no longer undergo a second numerical accumulation along the source path, thereby maintaining the input consistency between the five-tone target ratio, continuous music parameters, discrete music states, and candidate scores.

[0086] 4. This invention writes prescription records, effective mapping edges, rules, risks, doctor locks, and version-corresponding source tags to candidate multitrack digital music score events, and generates a list of affected objects based on the tags when the music score level verification fails. It can freeze and retain unaffected music score events and their source tags, and only replace conflicting musical phrases, voices, or time windows, thereby reducing the number of regenerated events and the calculation scope, and reducing the melody and version drift caused by overall regeneration.

[0087] 5. This invention performs score-level and acoustic-level verification on candidate multitrack digital scores and candidate pre-rendered audio respectively, and the two levels use independent actual values, constraint sets and comprehensive compliance, which can avoid replacing actual audio measurement values ​​with symbolic score target values ​​or double-weighting in the two levels; different conflicts trigger local score regeneration, local timbre configuration correction or local re-rendering respectively, improving the correspondence between correction path and conflict type.

[0088] 6. This invention establishes a correlation between feedback data and the actual playback timeline, audio version, score events, and parameter versions. It also utilizes single-modal quality, time synchronization, conflict flags, and safety conditions for gating, ensuring that feedback adjustments only generate candidate sub-versions of continuous parameters, discrete states, local scores, timbre configurations, or rendering parameters, without overwriting confirmed upstream prescription objects. By combining parent-child version relationships, input-output dependencies, incremental recalculation, and pre-rollback constraint verification, it can reduce abrupt adjustments caused by low-quality feedback and improve the repeatability and reliability of candidate versions and anomaly recovery. Attached Figure Description

[0089] Figure 1 This is a schematic block diagram of the personalized TCM five-tone audio generation system of the present invention;

[0090] Figure 2 This is a schematic block diagram of the personalized TCM five-tone audio generation method of the present invention. Detailed Implementation

[0091] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0092] See Figure 1 The personalized TCM five-tone audio generation system provided in this embodiment includes a data acquisition and structuring module, a TCM assessment intelligent agent, a prescription analysis and contribution object generation module, a dual-spectrum mapping module, a parameter generation module, a music generation intelligent agent, a timbre control intelligent agent, a rule verification and local regeneration module, and an audio rendering and output module. Preferably, the system further includes at least one of the following additional function groups: a mode and auxiliary voice function group, including at least one of a mode conversion intelligent agent and an eight extraordinary meridians voice function group; a timbre resource function group, including a timbre resource management module; a feedback closed-loop function group, including a feedback acquisition module, a feedback analysis and control module, and a version management module; a human-computer and medical information interaction function group, including at least one of a user terminal, a doctor terminal, and a hospital information system interface module; and a task collaboration function group, including a collaboration control and message routing module. The basic modules and selected additional function groups are as follows:

[0093] The data acquisition and structuring module is used to acquire confirmed syndrome data, treatment principle data, prescription data, acupuncture prescription data, and authorized data on constitution, emotions, lifestyle habits, tongue appearance, facial appearance, pulse appearance, and equipment. It generates structured input data objects with information such as source, version, acquisition time, completeness, and confirmation status. Unconfirmed data is marked as pending confirmation by this module and is not directly used as the basis for audio generation.

[0094] The TCM assessment intelligent agent is used to receive the structured input data object and generate syndrome evidence objects, treatment principle target objects, records of imbalances and deficiencies of the five elements, organ susceptibility correction objects, and evidence quality objects. The TCM assessment intelligent agent is also used to save the evidence source, confidence level, and rule version corresponding to each output object, and to send candidate results requiring professional judgment to the doctor's end or other terminals with confirmation permissions for verification.

[0095] The prescription parsing and contribution object generation module is used to parse confirmed herbal prescriptions and acupuncture prescriptions respectively, generating herbal contribution data objects and acupuncture meridian contribution data objects. The herbal contribution data object stores the drug record, its numerical contribution field, and source identifier, while the acupuncture meridian contribution data object stores the acupoint record, its numerical contribution field, and source identifier. The two types of contribution data objects are independent of each other and are not directly converted into musical tones, modes, or timbres in this module.

[0096] The dual-graph mapping module maintains the TCM side graph, the audio attribute graph, and the cross-graph mapping edges connecting the two types of graphs. It receives the outputs from the TCM assessment agent and the prescription parsing and contribution object generation modules, and generates audio attribute control objects and a list of valid mapping edges. The audio attribute control objects serve as the unified input for subsequent parameter generation, and their source information is stored by the dual-graph mapping module.

[0097] The parameter generation module receives the audio attribute control object, doctor locking, security boundary, and device capability information, and generates the five-tone target ratio, continuous music parameters, discrete music states, and constraint sets. The five-tone target ratio, continuous music parameters, and discrete music states are all uniformly generated by the parameter generation module; the prescription contribution data object and acupuncture meridian contribution data object are no longer used as independent numerical inputs for subsequent music generation agents. In the initial audio generation stage, the parameter generation module uses the audio attribute control object as the sole numerical input from the prescription source to generate initial continuous music parameters and discrete music states. In the feedback adjustment stage, the parameter generation module also receives the current continuous music parameter version and verified candidate adjustment instructions, generating continuous music parameter sub-versions only within the allowed parameter dimensions specified by the candidate adjustment instructions, without re-aggregating the prescription contribution data object, acupuncture meridian contribution data object, or audio attribute control object. The parameter generation module also generates a stage target state object based on the current discrete music state, doctor configuration, and versioning stage rules; the stage target state object includes at least a stage identifier, target state dimension, target value or target range, state dimension weight, minimum hold time, allowed adjustment parameters, and version identifier.

[0098] The music generation agent receives the pentatonic target ratio, continuous music parameters, discrete music states, and constraint sets output by the parameter generation module, and generates candidate multitrack digital scores with rule source labels. Rule generators, templates, or machine learning models can all serve as candidate score generation tools, but the candidate generation tool does not change the unified parameter source provided by the parameter generation module.

[0099] A timbre control agent receives candidate multitrack digital scores, continuous music parameters, discrete music states, and timbre resource records, and generates timbre configuration objects and rendering parameter objects for each voice part. The rendering parameter objects include at least the source identifier, effective range, spectral target, harmonic parameters, attack, attenuation, sustain, release, gain, image, reverberation, and resource version. The timbre control agent does not directly generate the final track-by-track audio.

[0100] The timbre resource management module is used to store timbre identifiers, timbre formats, resource versions, applicable ranges, acoustic characteristics, candidate five-element attributes, applicable voice parts, device conditions, taboos, license status, and integrity verification values. It also provides the timbre control agent with candidate timbre records that meet the query conditions. When no independent timbre resource management module is set up, candidate timbre records are provided by a local timbre resource table or an external timbre resource library. These timbre records must still contain resource identifiers, versions, acoustic characteristics, applicable ranges, device conditions, taboos, and integrity verification information.

[0101] The mode conversion agent receives the current discrete music state, candidate target modes, mode conversion boundaries, and constraint sets output by the parameter generation module, or receives mode conversion candidates forwarded by the cooperative control and message routing module, shared message bus, or central control program. Based on the current mode, candidate target modes, minimum hold time, allowed conversion positions, doctor lock, and safety conditions, it generates mode holding schemes, pitch mapping relationships, conversion boundaries, and bridging phrase candidates, and sends them to the music generation agent. The music generation agent converts the selected bridging phrase candidates into musical score events with time, pitch, duration, voice, rule source, and version identifier, and then submits them to the rule verification and local regeneration module.

[0102] The Extraordinary Meridians Audio Agent receives the continuous parameters, discrete states, constraint sets, and corresponding source indices of the auxiliary tracks from the parameter generation module, and generates audio configuration objects for zero to eight selectable digital auxiliary tracks. The Extraordinary Meridians Audio Agent only uses the auxiliary track control fields output by the parameter generation module for numerical configuration; the source path list in the audio attribute control object is only used to write rule source tags and is no longer involved in the secondary numerical calculation of auxiliary track gain, image, envelope, or modulation parameters. The Extraordinary Meridians Audio Agent sends the auxiliary track audio configuration objects to the music generation agent; the music generation agent generates corresponding auxiliary track score events based on the audio configuration objects and writes track identifier, start and end time, pitch or center frequency band, modulation period, gain, image, envelope, rule source, and version identifier for each auxiliary track score event. The auxiliary track score events undergo score-level verification along with other audio events.

[0103] The rule validation and local regeneration module is used to perform score-level validation after candidate multitrack digital scores are generated, and acoustic-level validation after candidate pre-rendering. The score-level validation includes at least checks on doctor locking, contraindications, allowed pitch, mode, pentatonic target ratio, number of events and cumulative duration quota, tempo, rhythm, harmony, voice structure, and paragraph structure. The acoustic-level validation includes at least checks on actual loudness, peak value, spectral centroid, harmonic distribution, sound image, envelope, voice gain, reverberation, track synchronization, and voice masking degree. It outputs score-level validation results, acoustic-level validation results, hard constraint conflict records, soft constraint compliance records, conflict location records, a list of affected objects, and instructions for local score regeneration, local configuration correction, or local re-rendering, as well as a publishable status indicator for the candidate version. When a doctor locking field conflicts with a prescription version or other doctor-confirmed fields, automatic regeneration is not performed; instead, the conflict is transferred to the doctor for review.

[0104] The audio rendering and output module receives candidate multitrack digital scores, timbre configuration objects, rendering parameter objects, and device capability information that have passed score-level verification. It performs candidate pre-rendering to generate candidate track-by-track audio, candidate mixed audio, device adaptation results, and actual acoustic characteristics. After the actual acoustic characteristics pass acoustic-level verification, it generates publishable audio files or playback control sequences and sends the corresponding audio versions to the user terminal or external audio playback terminal. When generating publishable audio versions, the audio rendering and output module also generates playback context objects. These playback context objects include at least an audio version identifier, score version identifier, rendering version identifier, continuous music parameter version identifier, discrete music state version identifier, timbre configuration version identifier, segment and phrase timelines, track identifiers, voice part identifiers, score event indexes, device identifiers, channel modes, and device parameter versions.

[0105] The feedback acquisition module receives the playback context object and playback status records generated by the user terminal or external audio playback terminal. Based on the actual playback start, pause, resume, stop, and playback position, it forms an actual playback timeline corrected for the playback status. It then acquires authorized physiological, behavioral, and subjective feedback according to this actual playback timeline, generating a feedback data packet with timestamps, source, device status, single-modal quality, and data integrity markers. The feedback acquisition module associates each feedback time window with the corresponding audio version, musical segment, phrase, track, voice part, score event set, continuous music parameter version, discrete music state version, and actual playback position. The feedback acquisition module performs data acquisition, preprocessing, feature extraction, time alignment, and quality marking; it does not directly generate music parameter adjustment instructions.

[0106] The feedback analysis and control module receives feedback data packets, the stage target state object generated by the parameter generation module, the current continuous music parameter version, the current discrete music state version, and individual response records. It then generates a feedback state object, overall feedback quality, feedback conflict flags, and candidate adjustment instructions. The feedback state object is a composite data object, including at least a feedback state vector, a list of active state dimensions, a state dimension order, overall feedback quality, a feedback conflict flag, a feedback time window, a stage target version, and a feedback data source version. The feedback state vector is a numerical vector within the feedback state object arranged in a fixed state dimension order. Subsequent matrix operations only use the feedback state vector and its active state dimensions, without using object identifiers, time windows, or version fields as numerical input. The candidate adjustment instructions include continuous music parameter candidates, discrete music state candidates, local score adjustment candidates, timbre or rendering parameter candidates, and auxiliary track adjustment candidates, and are constrained by the doctor's lock, safety boundaries, device capabilities, current stage rules, and version management module. The candidate adjustment instructions generated by the feedback analysis and control module do not modify the confirmed syndrome evidence objects, treatment principle target objects, prescription contribution data objects, acupuncture meridian contribution data objects, atlas mapping results, and audio attribute control objects. When the feedback results indicate that the above upstream objects need to be changed, the system generates a staged input version for doctor confirmation and re-executes the corresponding upstream processing.

[0107] The version management module is used to assign version identifiers to structured input data objects, syndrome evidence objects, treatment principle target objects, stage target state objects, prescription contribution data objects, acupuncture and meridian contribution data objects, graphs and cross-graph mapping edges, audio attribute control objects, continuous music parameters, discrete music states, constraint sets, multi-track digital scores, timbre configuration objects, rendering parameter objects, candidate track-by-track audio, candidate mixed audio, actual acoustic features, score-level verification results, acoustic-level verification results, hard constraint conflict records, soft constraint compliance, conflict location records, local correction instructions, candidate adjustment instructions, publishable audio files, playback control sequences, playback context objects, playback status records, and feedback records. The version management module also stores parent-child version relationships, input-output dependencies, doctor lock records, rollback pointers, differences between old and new versions, current active version status, and historical stable version status, enabling candidate scores, candidate rendering results, actual acoustic features, and verification results to correspond to each other and be repeatedly verified.

[0108] The user-side interface receives publishable audio files or playback control sequences. Upon receiving a user playback command, it invokes headphones, speakers, or other audio output devices to output the corresponding audio. During actual playback, it generates a playback status record associated with the playback context object. This playback status record includes at least the actual playback start time, pause time, resume time, stop time, current playback position, actual device status, actual channel mode, and volume level. The user-side interface does not modify the playback context object generated by the audio rendering and output module.

[0109] The doctor's side is used to input and confirm syndromes, treatment principles, prescriptions, acupuncture, and contraindications information, view parameter sources, candidate audios, feedback quality, and version differences, and issue confirmation, lock, pause, or rollback commands; the hospital information system interface module is used to exchange medical records, medical orders, prescriptions, contraindications, and audio operation records within the authorized scope.

[0110] The collaborative control and message routing module is used to establish task states for each audio generation or feedback control task, receive data objects, completion messages, and exception messages published by various agents and modules, send upstream outputs to corresponding downstream modules according to data dependencies, and coordinate rule verification, version confirmation, exception degradation, and rollback. This module is only responsible for object routing, state coordination, and control priority management, and does not replace the professional processing functions of the TCM assessment, contribution object generation, dual-spectrum mapping, parameter generation, multi-track digital score generation, timbre control, or feedback analysis and control modules. Without a dedicated collaborative control and message routing module, the above-mentioned task state management, version verification, message deduplication, and control priority functions can be jointly implemented by various functional modules through a shared message bus or a central control program.

[0111] The following description of the collaborative control and message routing module, in implementations without a separate collaborative control and message routing module, describes how the same task status management, version verification, message deduplication, control priority management, and object routing functions are performed by a shared message bus or central control program. The collaborative relationships between the agents and modules are as follows:

[0112] In the initial data collaboration, the data acquisition and structuring module sends structured input data objects from the same user and prescription version to the TCM assessment agent and the prescription parsing and contribution object generation module, respectively. The TCM assessment agent generates syndrome evidence objects, treatment principle target objects, records of imbalances and deficiencies in the five elements, and evidence quality objects; the prescription parsing and contribution object generation module generates prescription contribution data objects and acupuncture meridian contribution data objects, respectively. The collaboration control and message routing module sends the mapping task to the dual-map mapping module only after confirming that all required objects have been formed and the confirmation status meets the requirements; if there are fields to be confirmed, version inconsistencies, or missing necessary data, the task remains in a pending confirmation state, and the doctor's end or other terminals with confirmation permissions are notified.

[0113] In the collaborative process of converting prescription data into audio control data, the dual-spectrum mapping module simultaneously receives both the TCM-side object output by the TCM assessment agent and two types of contribution data objects output by the prescription parsing and contribution object generation module. It generates a unique audio attribute control object and a list of valid mapping edges, which are then sent to the parameter generation module. Based on this, the parameter generation module generates the five-tone target ratio, continuous music parameters, discrete music states, and constraint sets. The music generation agent, timbre control agent, mode conversion agent, and the eight extraordinary meridians voice part agent all subscribe to the corresponding outputs of the parameter generation module, eliminating the need to bypass the dual-spectrum mapping module to reread the original prescription values.

[0114] In the collaborative relationship of candidate score generation, the music generation agent generates candidate multitrack digital scores based on the five-tone target ratio, continuous music parameters, discrete music states, and constraint sets. It also appends the syndrome, treatment principle, prescription, acupoint, atlas rule, and version source referenced to each score event. The mode conversion agent provides mode preservation or mode conversion candidates based on the discrete music states, while the Extraordinary Meridians and Eight Channels agent provides optional auxiliary track configurations. The music generation agent incorporates the permitted candidate modes and auxiliary tracks as components of the multitrack digital score.

[0115] In the collaborative relationship between timbre and voice part configuration, after the music generation agent generates candidate multi-track digital scores, it first submits the candidate scores to the rule verification and local regeneration module for score-level verification. After the candidate multi-track digital scores pass the score-level verification, the timbre control agent receives the verified score version, continuous music parameters, discrete music state, candidate timbre records, and auxiliary track voice part configuration objects, and generates timbre configuration objects and rendering parameter objects for the main melody, harmony, low frequency, ordinary meridian auxiliary tracks, and extraordinary meridian auxiliary tracks.

[0116] When a score event changes due to local regeneration, the timbre control agent regenerates only the timbre configuration object and rendering parameter object for the corresponding voice part or time window based on the list of affected objects; unaffected objects retain their original versions. The audio rendering and output module then performs candidate pre-rendering based on the candidate multitrack digital score, timbre configuration object, rendering parameter object, and device capability information.

[0117] In the rule verification and collaborative relationship, the rule verification and local regeneration module first receives candidate multitrack digital scores, constraint sets, and corresponding source identifiers, and performs score-level verification. If the conflict originates from allowed pitch, pitch structure, pentatonic target ratio, rhythm, mode, paragraph structure, or doctor-locked fields, a local phrase, voice part, or time window regeneration instruction is sent to the music generation agent; if the conflict originates from candidate modes or transitions, an instruction to re-filter candidates or maintain the original mode is sent to the mode conversion agent.

[0118] After the candidate multitrack digital score passes the score-level verification, the collaborative control and message routing module sends it, along with the timbre configuration object, rendering parameter object, and device capability information, to the audio rendering and output module for candidate pre-rendering. The audio rendering and output module then returns the candidate track audio, candidate mixed audio, and actual acoustic features to the rule verification and local regeneration module, which performs acoustic-level verification.

[0119] If the acoustic-level conflict originates from timbre selection, spectral target, envelope, gain, or panning configuration, a local configuration correction command is sent to the timbre control agent. If the conflict originates from mixing, track synchronization, device adaptation, loudness limiting, or channel layout, a local re-rendering command is sent directly to the audio rendering and output module. Musical score events, timbre configurations, rendering parameters, and source identifiers that do not involve conflicts are preserved. Only candidate versions that pass both musical score-level and acoustic-level verification are packaged into publishable audio files or playback control sequences and sent to the user terminal.

[0120] In the feedback closed-loop collaborative relationship, the feedback acquisition module sends feedback data packets containing audio version, musical section, musical phrase, and time identifier to the feedback analysis and control module. The feedback analysis and control module only generates feedback state objects, overall feedback quality, feedback conflict flags, and candidate adjustment instructions, without directly modifying the currently playing score or audio. The collaborative control and message routing module, together with the version management module, checks the task version, doctor lock, security boundary, device capabilities, current active version, and affected objects: Candidates that change the five-tone target ratio, tempo, rhythm density, spectral center of gravity, overall or part gain, sound image, reverberation, envelope, and auxiliary track continuous parameters are first sent to the parameter generation module to form a continuous music parameter sub-version; candidates that change the mode, section state, main timbre category, track start / stop, channel layout, and auxiliary track discrete state are first generated by the parameter generation module into discrete music state candidate sub-versions; only candidates that do not change the above continuous parameters and discrete state targets, but only repair local pitch, time value, or musical phrase events, can be directly sent to the music generation agent to form a local score sub-version. Each executing agent can only perform corresponding processing based on the parameters or state sub-versions that have been formed and passed the version consistency check.

[0121] When the parameter generation module receives feedback-generated continuous music parameter candidates, it uses the current continuous music parameter version as the parent version and generates continuous music parameter sub-versions only within the continuous parameter dimensions explicitly specified by the candidate adjustment instruction and with the parameter permission mask open. Parameter dimensions not specified by the candidate adjustment instruction retain the parent version's values. This process does not re-aggregate prescription contribution data objects, acupuncture meridian contribution data objects, or audio attribute control objects, nor does it change the currently confirmed syndrome evidence objects and treatment principle target objects.

[0122] When a user disables real-time feedback control, the overall feedback quality falls below the corresponding gating threshold, a feedback conflict is flagged as true, a candidate adjustment involves a doctor-locked field, or there are user discomfort, sensor malfunctions, playback device malfunctions, or other safety events, the system will not generate or distribute ordinary automatic adjustment instructions. Depending on the type of exception, the system will maintain a stable version that still meets the current doctor lock, contraindications, safety boundaries, and device capabilities, or generate safety control instructions to reduce overall digital gain, reduce or disable auxiliary tracks, limit audio-visual movement, disable binaural difference processing, perform a gradual stop, pause output, or submit for doctor review. The safety control instructions, execution modules, execution times, and execution results are all written to the version log.

[0123] Feedback-triggered candidate adjustments must first generate parameter sub-versions or discrete state candidate sub-versions corresponding to the affected object before being executed by downstream agents. For events involving five-tone target proportions, pitch, duration, tempo, rhythmic structure, mode, harmony, paragraph structure, or auxiliary track scores, the music generation agent generates a score sub-version and re-executes score-level verification, candidate pre-rendering, and acoustic-level verification. For events involving only timbre resource selection or rendering, the original score version is retained without changing the continuous parameter targets and discrete states; a timbre configuration or rendering parameter sub-version is generated, and candidate pre-rendering and acoustic-level verification are re-executed. For events involving only playback, pause, resume, stop, or playback position, the original score, timbre configuration, and audio file version are retained; only playback control, state recording, and device security checks are performed.

[0124] When device switching causes changes in device capabilities, number of channels, frequency response, maximum output capability, or headphone wearing status, and requires modification of channel layout, spectrum, gain, panning, or other rendering parameters, a new device adaptation record and rendering parameter sub-version should be generated, and candidate pre-rendering and acoustic level verification should be re-executed.

[0125] In the collaborative relationship between the doctor's end and the hospital information system, the hospital information system interface module sends authorized medical records, prescriptions, medications, acupuncture points, and contraindications records to the data acquisition and structuring module, which is then confirmed by the doctor. When the doctor modifies the syndrome, treatment principle, medication, dosage, acupoint, tonification / sedation, contraindications, or locked fields, the version management module generates an input version change event. Based on this, the collaborative control and message routing module notifies the TCM assessment agent, prescription parsing and contribution object generation module, and their downstream modules to form candidate new versions.

[0126] The version management module retains the original stable version as a historical version. Before a candidate new version passes the corresponding score-level and acoustic-level verification and meets the doctor's confirmation conditions, it will continue to be used as the active output version only if the original stable version still meets the current contraindications, doctor lockout, security boundaries, and device capabilities; otherwise, the original stable version will only be saved as a traceable historical version and will not continue to be output to the user.

[0127] In the control priority coordination relationship, the control priorities are as follows: security events and emergency stop or rollback commands, doctor locking and contraindications, doctor-confirmed syndromes, treatment principles and prescriptions, institutional rules, candidate adjustments generated by the feedback analysis and control module, and user preferences. High-priority results cover low-priority candidates, and low-priority modules must not cover high-priority objects.

[0128] When multiple output directions of the same priority are opposite, the system first judges based on the valid version, applicable conditions, rule confidence and preset rule order; if it still cannot determine the direction to adopt, it maintains the current stable version that still meets the safety conditions, generates a conflict record of the same level, and submits the conflict source, affected objects and candidate handling methods to the doctor for review. It does not automatically select any direction, nor does it directly add or cancel out the values ​​of opposite directions.

[0129] In message and version collaboration, data packets transmitted between modules must carry at least the task identifier, user identifier, input object identifier, source version, target version, generation module identifier, time identifier, confirmation status, and processing status. The collaboration control and message routing module identifies duplicate messages, expired messages, and messages with inconsistent order based on the task identifier and object version. When the same module receives the same task repeatedly for the same input version, it reuses the already generated result or returns the same result identifier to prevent the same prescription contribution from re-entering the aggregation chain due to duplicate messages.

[0130] In the anomaly and degradation coordination relationship, if any agent or module is unavailable, returns a timeout, or the output object fails integrity verification, the system suspends downstream tasks that depend on that object. Only if the previous stable audio version still meets the current doctor lock, safety boundaries, contraindications, and device capabilities will the previous stable version continue to be output; otherwise, the affected voice parts are shut down, a gradual stop is executed, or manual review is initiated. Directly splicing unverified data by bypassing missing modules is not allowed. When the playback device's capabilities are insufficient, the audio rendering and output module sends the device capability status to the parameter generation module, the timbre control agent, and the Extraordinary Meridians voice part agent to jointly generate candidate configurations for voice part merging, auxiliary track shutdown, or spatial effect degradation.

[0131] Each module can be deployed on the same server, or distributed across user terminals, doctor terminals, hospital LAN servers, or the cloud. Regardless of the deployment method, modules interact using structured data objects, version identifiers, and confirmation status. The edge terminal can store playback, acquisition, and low-latency security control functions, while the server terminal can store spectrogram mapping, candidate score generation, and version management functions, but the input-output relationships and verification order between the aforementioned modules must not be altered.

[0132] Therefore, the system not only defines the composition, function, and input / output of each intelligent agent and module, but also the collaborative relationships between data acquisition, TCM assessment, prescription analysis, dual-spectrum mapping, parameter generation, candidate musical score generation, timbre and mode configuration, rule validation, audio output, feedback control, doctor review, and version management. The specific fields, calculation formulas, thresholds, validation rules, local regeneration, gradual adjustment, and version update processes for each data object shall still be implemented according to the methods described below.

[0133] See Figure 2 This embodiment also provides a five-tone audio generation method based on the above system, which is executed in the following order: "structured input—construction of TCM assessment and prescription contribution objects—dual-map aggregation—unified parameter generation—generation of candidate multi-track digital scores with rule source labels—score-level verification—timbre and rendering configuration—acoustic-level verification—audio release—feedback candidate adjustment—version re-checking". Each step is completed collaboratively by the aforementioned intelligent agents or modules with corresponding functions; the downstream module only reads the output objects that have been confirmed and are version-compatible by the upstream, and directly modifies the released version without bypassing the verification chain.

[0134] Specifically, the method of this embodiment includes the following steps:

[0135] S100, Structured Input Data Acquisition and Verification.

[0136] S100 is executed by the data acquisition and structuring module, which acquires authorized user information, physician-confirmed syndromes and treatment principles, prescriptions for medicine or acupuncture, constitution, emotions, lifestyle habits, and available device data, and records the source, time, unit, completeness, confidence level, confirmation status, and version. The collaborative control and message routing module sends the same input version to the TCM assessment intelligent agent and the prescription parsing and contribution object generation module respectively; if necessary fields are missing, units cannot be converted, or version conflicts are not resolved, the relevant records will not enter the automatic generation chain.

[0137] S200, construction of TCM side contribution, dual-map mapping and music parameter generation

[0138] S200 employs parallel construction, converged mapping, and unified parameter generation. The TCM assessment agent generates syndrome evidence objects, treatment principle target objects, records of Five Elements imbalances and deficiencies, and correction objects for visceral susceptibility tendencies. The prescription parsing and contribution object generation module generates prescription contribution data objects and acupuncture meridian contribution data objects from the same input version. The dual-map mapping module performs source deduplication, positive / negative direction separation, and single aggregation only when the necessary objects are complete and the versions are compatible. The parameter generation module generates the five-tone target proportions, continuous music parameters, discrete music states, and constraint sets based on the aggregation results, doctor locking, safety boundaries, and device capabilities.

[0139] S300, candidate multitrack digital score generation and score-level verification

[0140] S300 generates candidate multitrack digital scores with rule source tags based on the target scale, parameters, state, and constraints output by S200 using a music generation agent. Mode conversion and the "Eight Extraordinary Meridians" voice part agent are available as optional configurations. The rule verification and local regeneration module first performs score-level verification; if it fails, it performs correction, local regeneration, stage reconstruction, rollback, or doctor review according to the hierarchical processing rules of S360. Once successful, it proceeds to S400.

[0141] S400, tone, part and rendering parameter configuration

[0142] The S400 uses a timbre control agent to select timbre resources for each track that has passed score-level verification, generating timbre configuration objects and rendering parameter objects, configuring the spectrum, harmonics, envelope, gain, panning, and reverb. This agent does not independently change the key, section boundaries, or auxiliary track events, nor does it generate the final audio in this step.

[0143] S500, candidate pre-rendering, acoustic-level verification, and audio version release.

[0144] The S500 audio rendering and output module generates candidate track audio based on candidate scores, timbre configurations, rendering parameters, and device capabilities. It then performs delay compensation, track processing, multitrack mixing, loudness and peak limits, and device adaptation according to a unified playback timeline. It also extracts actual loudness, peak value, spectral centroid, harmonic distribution, sound image, envelope, reverberation, track synchronization, and part masking. The rule verification and local regeneration module performs acoustic-level verification accordingly. If it fails, it performs local configuration correction, local re-rendering, returns to S400 to reconfigure the timbre, rollback, or doctor review according to the graded processing rules of S560. After both score-level and acoustic-level verifications pass, a publishable audio file or playback control sequence is formed, along with a playback context object corresponding to the publishable audio file or playback control sequence. This object records the audio, score, parameters, timbre, rendering, device version, and the timeline of musical phrases, tracks, and score events. The user terminal or playback terminal then plays the audio through headphones, speakers, or other devices and transmits the actual playback status.

[0145] When the feedback closed-loop function group is enabled, S600 and S700 will continue to be executed after S500; when it is not enabled or the user turns off real-time feedback control, the method will complete the generation and playback of this time with the publishable fixed version formed by S500, without performing real-time parameter updates or micro-probing.

[0146] S600, Feedback Acquisition, Time Correlation and Quality Processing

[0147] The S600 uses a feedback acquisition module to collect authorized physiological, behavioral, and subjective feedback based on the playback context and actual playback status. It then performs preprocessing, feature extraction, time alignment, and single-modal quality calculation, associating each feedback window with a specific audio version, musical segment, phrase, track, and parameter version. This module does not generate music adjustment instructions.

[0148] S700, feedback analysis, candidate sub-version generation and result verification

[0149] The S700 generates candidate adjustment instructions through the feedback analysis and control module. The collaborative control and message routing module, along with the version management module, verifies the task version, doctor lockout, security boundaries, device capabilities, and activity version before sending the instructions to the affected modules to form candidate sub-versions. These candidate sub-versions then re-enter the corresponding musical score-level or acoustic-level verification. In cases of verification failure, insufficient feedback quality, modal conflicts, user-disabled real-time control, or security anomalies, the system maintains a stable version that still meets current constraints, executes security controls, or submits the request for doctor review.

[0150] To avoid redundant calculations, the data acquisition and structuring module assigns a globally unique original fact identifier to each original syndrome fact, prescription fact, acupoint fact, equipment fact, and feedback fact. Intermediate objects derived from the original facts simultaneously store this identifier and the derivation path. The system uses a combination of the original fact identifier, source version, stage identifier, target dimension, mapping direction, and valid rule version as the cross-module deduplication key. Drug prescription facts only form the drug value entry point through S240, and acupuncture prescription facts only form the acupuncture value entry point through S250. Other derivation records formed from the same fact are only used for source tracing, or, after global deduplication, only one high-priority value path is retained, and they must not be counted repeatedly with the drug or acupuncture source block. Drug rows and acupoint rows complete intra-block aggregation in S240 and S250 respectively. Syndromes, drug prescriptions, acupuncture, and permitted auxiliary source blocks undergo cross-source fusion only once in S260. Source paths after S260 are only used for tracing, reverse checking, and version dependencies. Each automatically generated or adjusted parameter is saved with its meaning, symbol, unit or value range, source and version, generation steps, allowed range, missing value handling, and unique purpose.

[0151] The source identifier referred to in this specification is a higher-level identifier used to identify the source of data and its derivation relationships. It includes the original fact identifier, contribution record identifiers derived from the original facts, valid mapping edge identifiers, and rule identifiers. The original fact identifier uniquely identifies the original facts directly obtained from syndromes, treatment principles, prescriptions, acupuncture prescriptions, equipment, or feedback data. Derived objects simultaneously store their own object identifier, the original fact identifiers they reference, and the derivation path, thus enabling reverse tracing from the derived object to the corresponding original fact.

[0152] Preferably, S200 further includes S210 to S290:

[0153] S210 standardizes the symptom, tongue, facial, pulse, constitution, emotional state, prescription, and Hospital Information System (HIS) information obtained from S100. Each piece of information records a globally unique original fact identifier, source, time, availability, completeness, and confidence level. Physician-confirmed information is prioritized; low-quality and missing information is not replaced with default normal values. S210 only completes input standardization and quality marking; it does not directly generate the five-tone scale or final musical parameters in this step.

[0154] S220: Accumulate the excess and deficiency contributions of Wood, Fire, Earth, Metal, and Water according to the rule chain of "feature—syndrome—organs or meridians—five elements". Each rule records the input feature, comparison threshold, target node, contribution direction, basic weight, evidence confidence, applicable conditions, exclusion conditions, and rule version; when the conditions are met, the product of the standardized feature value, basic weight, and evidence confidence is used as the evidence contribution. Duplicate evidence from the same source key is first deduplicated according to the valid version, and then normalized within the source block. The output object stores the non-negative excess intensity, non-negative deficiency intensity, direction marker, and the difference between the two for each of the five elements dimensions; the difference is only used for interface display and version differences. S260 only reads the separately stored non-negative intensity and direction marker, and does not aggregate the negative difference as another source. When no valid rule is matched, the corresponding dimension is marked as missing and is not replaced with zero or default normal values.

[0155] S230. Generate organ susceptibility correction objects based on constitution, lifestyle habits, duration of emotional states, historical records, and low-weight environmental information. The mappings between constitution, habits, and emotions all originate from a configurable rule table with version numbers, recording input features, target organs, direction, weight, applicable conditions, and exclusion conditions. For the same organ, only currently available factors are weighted averaged with non-negative weights; if available factors are empty or the weight sum is zero, the correction is not output. The total fusion weight of auxiliary sources is capped by the rule base and is lower than the weights of the current syndrome, treatment principle, and prescription source confirmed by the doctor. The corrections are only used for fine-tuning audio parameters and do not indicate that the corresponding organ has developed a disease.

[0156] S240, Generate prescription contribution data object.

[0157] The prescription contribution data object includes a structured drug record table and a prescription numerical contribution sub-matrix. Each row corresponds to a drug confirmed by a doctor. The column order includes at least the drug identifier, standardized dosage, principal, assistant, adjuvant, and guide role coefficient, processing correction coefficient, data confidence score, five-element attribute vector, meridian affiliation vector, direction of action vector, contraindications, rule identifier, and prescription version. The drug identifier, contraindications, rule identifier, and version are identifiers, enumerations, or Boolean fields and do not participate in real number matrix operations. The standardized dosage, coefficients, and contribution vector are expanded into a numerical sub-matrix according to the fixed order of the same version field definition table. If the dosage is missing, the unit cannot be converted, or the versioned reference dosage is not greater than zero, the corresponding drug row will not be automatically aggregated and a confirmation prompt will be displayed.

[0158] The formula contribution data object is a composite data object containing a numerical submatrix, source records, and constraint records. The numerical submatrix is ​​uniformly denoted as the formula numerical contribution submatrix; the data object itself is not equivalent to a real number matrix. The contraindication, doctor locking, and version fields only form constraint or source records and are not included in the numerical summation. The term "limiting" as used below refers to taking the lower limit when the input is below the lower limit, taking the upper limit when it is above the upper limit, and maintaining the original value when it is within a closed interval; when used with vectors, it is executed on a component-by-component basis.

[0159] The formula-based drug numerical contribution submatrix uses effective drug records as rows and fixed numerical fields as columns; the number of rows and the order of fields are derived from the current set of effective drugs and the same version of the field definition table, respectively. For each drug, the standardized dose, basic weight of the drug row, weighted five-element contribution, and formula source block are calculated sequentially.

[0160] For the For effective drugs, the standardized dosage is calculated according to formula (1):

[0161]

[0162] In the formula, Indicates the drug row index; Indicates the first Standardized dosage of flavored drugs; Indicates the first The actual dosage of each medicine after unit conversion is derived from the prescription record confirmed by the doctor. Indicates the first The normalized reference dose for a drug is derived from a drug rule record that matches the drug, dosage form, and prescription version. ; Indicates the first The standardized upper limit of dosage for each type of drug is derived from the same drug rule record, and . and Use the same dosage unit. Units cannot be converted. or When formula (1) is not executed, the drug row is marked as not automatically aggregated.

[0163] No. The basic weight of the drug's performance is calculated according to formula (2):

[0164]

[0165] In the formula, superscript Indicates the source of the prescription, not the exponentiation operation; Indicates the first The basic weight of the drug's drug properties; Indicates the first The coefficients for the principal, assistant, adjuvant, and guiding roles of medicinal ingredients are derived from the doctor-confirmed prescription roles or versioned role mapping rules, and ; Indicates the first The processing correction coefficient for medicinal ingredients is derived from the versioned drug rules corresponding to the processing method, and ; Indicates the first The confidence level of the drug data comes from the prescription confirmation status, field completeness, and source reliability, and Formula (2) combines dosage, prescription role, processing method, and data reliability only once within the pharmaceutical industry, yielding the following results. Do not assign weights again in subsequent steps.

[0166] No. The weighted five-element contribution of the flavored medicines is calculated according to formula (3):

[0167]

[0168] In the formula, superscript This indicates that the corresponding variable is a five-dimensional vector arranged in the order of wood, fire, earth, metal, and water, and does not represent a power of five; Indicates the first The weighted five-element contribution vector of the flavoring medicine; Indicates the first The five-element attribute vector of each medicinal herb is derived from the versioned five-element attribute rules corresponding to the same medicinal herb. All components are non-negative; the sum of the components is greater than 1. Normalize it to The sum of the components is not greater than The drug is marked as unavailable at that time.

[0169] The normalized formula drug source block is calculated according to formula (4):

[0170]

[0171] In the formula, This represents the normalized source block vector of the medicinal formula arranged in the order of wood, fire, earth, metal, and water. This represents the set of valid drug rows in the current prescription version that meet the automatic aggregation criteria in terms of dosage, unit, rule version, and confirmation status. It is obtained from formula (3); This is obtained from formula (2). When or When this happens, formula (4) is not executed, and the source block of the prescription drug is marked as unavailable.

[0172] The role coefficient, processing correction coefficient, drug line data confidence score, and drug attribute vector are all derived from the institutional rule base with version numbers or doctor configurations. The role coefficient and processing correction coefficient are non-negative, and the drug line data confidence score ranges from 0 to 1. In the example, the role coefficients for monarch, minister, assistant, and guide can be 1.00, 0.80, 0.60, and 0.40, respectively, and the processing correction coefficient can be configured within the range of 0.80 to 1.20. The five-element attribute vector is arranged in the order of wood, fire, earth, metal, and water, and each component must be non-negative. When the component sum is greater than 0, it is normalized to 1; when the component sum is not greater than 0, the drug line is marked as unavailable. The above values ​​are only examples for audio control. The formula drug numerical contribution submatrix only stores the contribution from the TCM side and does not directly output BPM, timbre, spectrum, sound image, or envelope.

[0173] S250. Generate an acupuncture meridian contribution data object. The object includes a structured acupoint record table and an acupuncture numerical contribution submatrix. Each row corresponds to an acupoint confirmed by a physician. The column order includes at least the acupoint identifier, its associated meridian, primary acupoint, secondary acupoint or specific acupoint marker, tonification / sedation direction, standardized stimulation intensity, standardized duration of action, left / right side, association with the eight extraordinary meridians, data confidence level, contraindications, rule identifier, and prescription version. The identifier, left / right side, contraindications, rule identifier, and version do not participate in real-number matrix operations. Normalized values, coefficients, and contribution vectors are expanded into numerical submatrices according to a fixed order in the same version field definition table. If a necessary value is missing, only the institutional default value confirmed by the physician and having a version number can be used; otherwise, the row will not be automatically aggregated and a confirmation prompt will be displayed.

[0174] The acupuncture numerical contribution submatrix uses effective acupoint records as rows and fixed numerical fields as columns; the number of rows and the field order are derived from the current set of effective acupoints and the same version of the field definition table, respectively. For each acupoint, the standardized stimulation intensity and standardized duration of action are calculated first, and then the basic weight of the acupoint row, the weighted five-element contribution, and the acupuncture source block are calculated sequentially.

[0175] No. The standardized stimulation intensity of each acupoint is determined according to formula (5) and based on the stimulation type:

[0176]

[0177] In the formula, Indicates the acupoint row index; Indicates the first Standardized stimulation intensity for each acupoint; This indicates the actual stimulation intensity of the equipment, which has been confirmed by a doctor and converted to units. This indicates the reference value for stimulation intensity that matches the device type, acupoint, and prescription version. ; This indicates the upper limit of standardized stimulation intensity, derived from the same version of stimulation intensity rule records or doctor configurations that match the device type, acupoint, stimulation type, prescription stage, and prescription version. ; Indicates the first The corresponding level of manual acupuncture technique for each acupoint; This represents a doctor-confirmed, version-numbered manual manipulation level mapping function, whose output range is... The manual acupuncture technique employs... Directly obtain The proportional normalization corresponding to device stimulation will no longer be performed. If a matching device conversion rule or manual technique level mapping rule is missing, the acupoint will not be included in the automatic aggregation.

[0178] No. The standardized duration of action for each acupoint is calculated according to formula (6):

[0179]

[0180] In the formula, Indicates the first Standardized duration of action for each acupoint; Indicates the actual duration of action confirmed by a doctor; This indicates the reference value for the duration of action in the same version of acupoint rule records, and ; This indicates the upper limit of the standardized duration of action. Both are derived from the same version of acupoint duration rules or doctor configurations that match the acupoint, stimulation type, prescription stage, and prescription version. . and Use the same time unit; if the value cannot be converted or the reference value or upper limit does not meet the positive value condition, the acupoint row will not be included in the automatic aggregation.

[0181] No. The basic weight of each acupoint is calculated according to formula (7):

[0182]

[0183] In the formula, superscript Indicates the source of the acupuncture prescription, not the power operation; Indicates the first The basic weight of each acupoint; Indicates the first The modifier coefficients for the main acupoints, auxiliary acupoints, or specific acupoints of each acupoint originate from the same version of acupoint rules or doctor configurations, and ; Indicates the first The confidence level of data for each acupoint comes from the prescription confirmation status, field completeness, and execution record quality. Formula (7) combines stimulation intensity, duration of action, acupoint role, and data reliability only once within the acupoint row.

[0184] No. The weighted five-element contribution of each acupoint is calculated according to formula (8):

[0185]

[0186] In the formula, Indicates the first The weighted contribution vector of each acupoint in the order of wood, fire, earth, metal, and water; Indicates the first The Five Elements attribution vector corresponding to each acupoint originates from the versioned meridian-Five Elements rules recorded for the same acupoint. All components are non-negative; the sum of the components is greater than 1. Time returns to oneness The sum of the components is not greater than The corresponding five-element semantic vector is marked as unavailable.

[0187] The normalized acupuncture source block is calculated according to formula (9):

[0188]

[0189] In the formula, This represents the normalized acupuncture source block vector arranged in the order of wood, fire, earth, metal, and water. This represents the set of valid acupoint rows in the current prescription version that meet the automatic aggregation conditions in terms of stimulation intensity, duration of action, rule version, and confirmation status. It is obtained from formula (8); It is obtained from formula (7). When or When this happens, formula (9) is not executed, and the acupuncture source block is marked as unavailable.

[0190] The correction coefficients for primary acupoints, secondary acupoints, or specific acupoints, meridian attribution vectors, five-element attribution vectors, tonification / sedation direction vectors, and eight extraordinary meridians association vectors are derived from an institutional rule base with version numbers or doctor configurations; the acupoint role correction coefficient is a non-negative number, and the data confidence level is between 0 and 1. All components of each attribution or association vector are non-negative; when the component sum is greater than 0, normalization is performed according to the component sum; when the component sum is not greater than 0, the corresponding semantic vector is marked as unavailable. The acupuncture numerical contribution submatrix only stores the TCM-side meridian, five-element, tonification / sedation, and eight extraordinary meridians association contributions, and does not directly output the final sound image, envelope, phase, gain, or timbre. When the effective set is empty or the aggregation denominator is zero, the acupuncture source block is marked as unavailable.

[0191] For each valid acupoint row, the system applies the same basic weights of the acupoint row to the Five Elements attribution vector, Meridian attribution vector, Tonification / Sedation direction vector, and Eight Extraordinary Meridians association vector, and performs weighted averaging within their respective semantic dimensions. The four types of vectors are independent of each other and are not added together; the Tonification and Sedation directions are stored separately, and contraindications and unresolved medical order conflicts only form exclusion or review conditions.

[0192] The acupuncture source block also stores the left and right sides of the acupoint, the execution order, and the stage identifier. However, these fields are only used for rule conditions or source tracing and are not repeatedly assigned weights in the Five Elements contribution. When the prescription version changes, the system only recalculates the changed acupoint rows and their valid mapping edges; when the same acupoint belongs to different records in different prescription stages, the stage identifier is used to distinguish the source key.

[0193] S260. Perform dual-graph mapping. The dual-graph mapping module calls the TCM side graph, the audio attribute graph, and the cross-graph mapping edge set. The TCM side graph includes at least the nodes for syndrome, treatment principle, five elements, viscera, meridians, drugs, acupoints, tonification and sedation, and contraindications; the audio attribute graph includes at least the nodes for the five tones, mode of action, tempo, rhythm density, vocal range, spectrum, harmonic tension, voice part, timbre attribute, sound image, envelope, auxiliary track, and safety boundary. Each cross-graph mapping edge records at least the source node and dimension, target attribute and dimension, mapping direction, basic weight, edge confidence, applicable conditions, exclusion conditions, doctor locking, rule identifier, and version.

[0194] Cross-graph mapping edges are categorized into positive numerical edges, negative numerical edges, and constraint edges based on their processing method. Positive and negative numerical edges are included in the numerical aggregation of the increasing and decreasing directions, respectively; constraint edges are only written into the constraint set of the audio attribute control object to form disabling conditions, safety upper and lower limits, doctor lockouts, or review flags, and are not included in the numerical summation of positive and negative direction aggregation values. Records in Table 1 with the direction "Constraint" belong to constraint edges.

[0195] Each mapping edge is valid only if the applicable conditions are met and the exclusion conditions are not met. For multiple valid edges with the same source type, source identifier, source version, stage identifier, source dimension, target dimension, mapping direction, and valid rule version, one edge is retained in the following order: doctor locking priority, valid version priority, and edge confidence priority. Different source blocks are first normalized within the block, and then merged once according to the weight of non-negative source blocks. Numerical edges in the direction of improvement and deterioration are added to the positive edge set and negative edge set respectively, and are not directly canceled during aggregation; constraint edges are not added to the numerical edge set.

[0196] No. The target audio attribute in direction The aggregate value is calculated according to formula (10):

[0197]

[0198] In the formula, ℓ is the dimension index of the target audio attribute; Indicates the mapping direction, where Indicates a direction for improvement. Indicates a downward direction; Represents the target audio attribute dimension In direction Aggregate values ​​below; This represents the set of active source blocks that, after global deduplication, have at least one valid mapping edge. express One of the activity source blocks; Indicates source block Target Dimension and direction The non-negative fusion weights originate from the same version of the fusion rules or doctor configurations, and satisfy the following conditions: ; Indicates source block Pointing to target dimension , direction is And the set of valid mapping edges where the applicable conditions are met and the exclusion conditions are not met; This indicates one of the valid mapping edges; Represents mapped edges The referenced normalized source value has a range of values. ; Represents mapped edges Non-negative basic weights; Represents the mapped edge The confidence level, with a value range of . . , and All data are derived from the same valid rule version and do not repeatedly include drug row weights, acupoint row weights, or other confidence levels.

[0199] In formula (10), each source block first uses the sum of the products of the basic weights and edge confidences of the effective mapping edges within the source block as the normalized denominator to form the intra-block weighted average of the target dimension and direction for that source block. This average is then multiplied by the source block fusion weight to participate in a cross-source aggregation. The denominator consists only of effective mapping edges under the same source block, the same target dimension, the same direction, and the same rule version; source blocks with a denominator of zero do not participate in aggregation. This process is used to avoid the same source block gaining additional numerical weights due to an increase in the number of effective mapping edges.

[0200] when Any of the participants in the calculation Or the sum of the source block weights is When formula (10) is not executed, the corresponding target dimension and direction are marked as not automatically calculated. When both increasing and decreasing the direction reach the conflict threshold, the valid direction is first determined based on the doctor's locking, rule priority, and manual review results, and then the aggregate value of the invalid direction is set to 0. If a valid direction cannot be determined, no automatic candidate parameters are generated. Target audio attribute dimensions. The direction conflict threshold is denoted as This originates from directional conflict rule records or doctor configurations that match the target audio attribute dimensions, prescription stage, and rule version. When the directional aggregation value is increased and reduce directional aggregation value All are no less than When this occurs, it is determined that there is a directional conflict in the dimension of the target audio attribute.

[0201] For the demand dimensions of Wood, Fire, Earth, Metal, and Water, only the effective aggregate value of the demand direction is used as the input for the intensity of the five elements' demand in S270; the demand direction is not directly subtracted from the demand direction, but is converted into the direction of action, the upper limit of the ratio, the disabling condition, or the doctor's review condition. For non-proportional continuous parameters with versioned baseline values ​​such as BPM, spectral centroid, and voice gain, S280 only reads the effective increase or decrease direction values ​​after the aforementioned conflict handling; dimensions with unresolved direction conflicts are not included in the automatic parameter calculation.

[0202] S260 outputs an audio attribute control object. This object includes a numerical payload, a set of constraints, and a list of source paths in a fixed field order: the numerical payload includes the intensity of non-negative five-element requirements, the intensity of positive and negative action directions, and quantifiable audio attribute targets; the constraint set includes doctor lockout, disabling conditions, safety upper and lower limits, and review flags; the source path list includes source blocks, source dimensions, valid mapping edges, and versions. Only the numerical payload and constraint set enter S270 and S280; the source path list is only used for tracing, reverse checking, and version differences, and does not participate in the second numerical calculation. The personal response matrix for the current playback period does not participate in this step's aggregation.

[0203] The audio attribute control object is a composite data object; when its numerical payloads are expanded in a fixed order according to the same version field definition table, it is called an audio attribute control vector. Except for fields explicitly written into the constraint set, subsequent matrix operations only read the numerical components of this vector, and do not take the object identifier, source path, or version field as numerical input.

[0204] Each numerical component of the audio attribute control object stores a unique generation path, listing the source block, source dimension, valid edges, direction pool, edge weight, edge confidence, applicable conditions, and aggregated value. Subsequent steps can only read the aggregated value and constraints; they cannot sum again along the source path. If the rule version is invalid, there is a doctor lock conflict, or a necessary source is missing, the corresponding component is marked as not automatically usable, and the doctor's confirmed value is used or the process enters the review stage.

[0205] Table 1 Examples of cross-graph mapping edges

[0206]

[0207] The table above is a minimal executable mapping example; in actual operation, each rule saves its creator, review status, validity period, and version. The values ​​in the table are only used to demonstrate the aggregation order and are not considered as fixed medical parameters.

[0208] S270 reads only the audio attribute control object generated by S260, and obtains the five non-negative demand intensities of wood, fire, earth, metal, and water from it; the contributions of prescription medicine and acupuncture have been aggregated in S260, and will only be recorded as source and version dependency in the future, and will not be accumulated again. The five-element demand intensity vector is represented by formula (11):

[0209]

[0210] In the formula, This represents a column vector of the five elements' demand intensity, arranged in the order of wood, fire, earth, metal, and water. , , , and These represent the non-negative intensity of the demand dimensions for Wood, Fire, Earth, Metal, and Water, respectively, all derived from the effective aggregated values ​​of the corresponding demand direction within the same version of the audio attribute control object; superscript This represents the transpose of a vector.

[0211] The total intensity of the five elements' needs is calculated according to formula (12):

[0212]

[0213] In the formula, This represents the sum of the five non-negative elements' intensity components. Only when... When performing five-tone target ratio normalization; At this time, division is not performed; the doctor-locked ratio or the versioned default ratio confirmed by the doctor is used.

[0214] The proportions of the five tones are calculated according to formula (13):

[0215]

[0216] In the formula, , , , and These represent the target proportions of Gong, Shang, Jiao, Zhi, and Yu, with a value range of [value range missing]. The sum of the five target proportions is .use This indicates the five-tone ratio and should not be confused with the weight of the quality sub-item.

[0217] When the sum of the intensity of the five elements' requirements is greater than 0, the sum of the target proportions of the five tones is 1; when the sum is 0, division is not performed, and the doctor-locked proportion or the versioned default proportion confirmed by the doctor is adopted.

[0218] The directions of action, such as tonification, purging, dredging, clearing, warming, calming, invigorating, or astringing, are stored as independent vectors and are not incorporated into the five-tone target proportions. S270 is the only numerical generation step for the initial five-tone target proportions; when the doctor locks or the upper and lower limits of the proportions exist, the output of S270 is only projected onto the feasible proportion set where the components are non-negative, the sum is 1, the locked components remain unchanged, and the upper and lower limits are satisfied, and the proportions are not regenerated in S280. When the feasible set is empty, the proportions are not automatically generated and are entered into the doctor's review.

[0219] S280, Generates a music control object based on the five-tone target ratio, direction of action, audio attribute targets, and security restrictions.

[0220] The music control object is divided into continuous music parameters and discrete music states. The continuous music parameters include at least the five-tone target ratio, BPM, rhythm density, upper and lower limits of the pitch range, spectral centroid, harmonic tension, overall and part gain, sound image width, reverberation ratio, and envelope parameters. The discrete music states include at least the target mode, mode center, candidate timbre category, section state, part start / stop, and channel layout.

[0221] Besides the pentatonic target ratio, for non-proportional continuous parameters such as BPM, tempo density, spectral centroid, harmonic tension, overall and part gain, sound image width, reverberation ratio, and envelope, the parameter generation module reads the current stage reference value, positive gain, negative gain, actual unit, and allowable upper and lower limits from the parameter mapping record of the same version, and generates candidate values ​​only when directional conflicts have been resolved in S260. The pentatonic target ratio is directly read from the output of S270 and the following formula does not apply. If no feasible interval exists, no candidate parameters are generated and the process proceeds to verification. In the example, the BPM reference value can be set to 60 beats / minute, the positive and negative gains to 8 beats / minute and 6 beats / minute respectively, and the allowable range is 52 to 72 beats / minute.

[0222] In addition to the proportion of the five tones, the first The candidate target values ​​of the non-proportional continuous music parameters are calculated according to formula (14):

[0223]

[0224] In the formula, Indicates the index of non-proportional continuous music parameters; Indicates the first Candidate target values ​​for non-proportional continuous music parameters; This represents the versioning baseline value for the current stage; Indicates the first The target audio attribute dimension corresponding to each continuous music parameter in the audio attribute map; and Representing the target dimensions After S260 directional conflict processing, the effective increase directional aggregation value and the effective decrease directional aggregation value are retained, with at most one being a non-zero effective value within the same control cycle; and These represent the positive and negative gains in the same version of the parameter mapping record, respectively, with units equal to... Same, used to The directional aggregation values ​​within the range are converted into actual parameter changes; and These represent the lower and upper limits of the intersection of the doctor lockout, security rules, and device capabilities, respectively. Formula (14) is not executed if the feasible interval is empty or the directional conflict has not been resolved.

[0225] Continuous music parameters are stored in a fixed field order, including the target five-tone scale, BPM, rhythm density, range, spectral centroid, harmonic tension, overall and part gain, image, reverberation, and envelope. Discrete music states are stored in the target key, key center, candidate timbre categories, section status, track start / stop, and channel layout. The former can be updated progressively within permissible limits, while the latter can only be updated through candidate filtering and state machine switching.

[0226] The system generates continuous parameter target values ​​or ranges and discrete state candidates through a versioned audio parameter mapping table. Continuous parameters can be updated smoothly within allowable ranges; discrete states can only be determined through candidate generation, hard constraint screening, candidate scoring, and state machine switching. When the five-note target ratio changes, the system modifies the number of events, cumulative duration, and structural position quota of the next complete musical phrase and performs local score regeneration, without directly changing the ratio in the currently playing notes using digital signal processing.

[0227] The continuous music parameter vector is expanded according to a preset and fixed field order in the audio parameter mapping table: the five-tone target proportions are arranged in the order of Gong, Shang, Jiao, Zhi, and Yu; the gains of each voice part are sorted according to the track identifier; and the envelope parameters are arranged in the order of attack, decay, sustain, and release. It is then connected with BPM, tempo density, upper and lower limits of the pitch range, spectral centroid, harmonic tension, overall gain, sound image width, and reverberation ratio to form an m-dimensional real vector. The mapping table simultaneously stores the field order, the length of each sub-vector, the actual unit, the normalization range, and the version, ensuring that the feedback sensitivity matrix, the individual response matrix, and the parameter permission mask correspond item by item along the same dimensions.

[0228] Each continuous parameter mapping record must at least store the parameter name, field position, internal normalization range, actual unit, target range, allowable deviation, upper limit of single and cumulative change, rate of change, applicable stage, source rule, and version. Actual parameters are mapped to 0 to 1 before the feedback matrix operation, and then de-mapped back to their respective units before execution.

[0229] Each discrete state record includes at least the state type, current value, candidate set, minimum hold time, allowed switching boundaries, hard constraints, scoring items, conversion method, and version. Mode, candidate timbre category, section state, voice start / stop, and channel layout are not subject to ordinary addition or subtraction operations; when candidate state scores are the same, priority is given to maintaining the current state or selecting the candidate with the lower cost of change.

[0230] S290 outputs records of elemental imbalances and deficiencies, visceral susceptibility, herbal contribution data objects, acupuncture and meridian contribution data objects, a list of valid mapping edges, audio attribute control objects, five-tone target proportions, continuous music parameters, discrete music states, constraint sets, and rule source index objects. The rule source index objects only associate target parameters or constraint fields with the original facts, contribution records, and valid mapping edges, and are used by S300 to generate rule source labels; they do not contain new parameter values. The numerical inputs to S300 are only the five-tone target proportions, continuous music parameters, discrete music states, and constraint sets; other objects are only used for source tracing and version dependencies and are no longer considered as a second set of numerical inputs.

[0231] Furthermore, S290 also performs the following corrections and boundary treatments:

[0232] The five elements attributes are coded using primary and secondary dimensions within the drug category and weighted only once. The susceptibility to organ dysfunction is calculated by averaging versioned non-negative weights only for qualified constitution, emotions, habits, history, and environmental factors, with an upper limit on the total weight of auxiliary sources. Information fusion follows the priority order of doctor confirmation, current examination, historical records, and auxiliary information. Prescriptions and acupuncture are aggregated within their respective semantic dimensions; contraindications, exclusions, and doctor locking only form constraints. When a field is incomplete, conservative candidates are used or it enters a review process; missing values ​​are not used to replace true zero values.

[0233] End-to-end numerical examples: The following values ​​are exemplary audio control values ​​under the institutional rule base version R2026-01, used only to illustrate the calculation chain and do not represent disease severity or clinical dosage. In the order of Wood, Fire, Earth, Metal, and Water, the syndrome source block, prescription source block, and acupuncture source block are respectively:

[0234] Table 2 Example of calculating contribution row for prescription drugs

[0235]

[0236] The basic weights of the three herbs are 1.00, 0.54 and 0.27 respectively. They are weighted and averaged according to S240 and rounded to two decimal places to obtain the herb source block [0.20, 0.10, 0.50, 0.05, 0.15].

[0237] Table 3 Example of calculating the contribution of acupuncture meridians

[0238]

[0239] The acupuncture source block is obtained by weighting the three acupoint rows according to S250 [0.25, 0.10, 0.45, 0.05, 0.15]. The tonification / sedation and the eight extraordinary meridians also have an action direction block, which is not subtracted from the above non-negative five-element vectors.

[0240] The syndrome source block is generated from the evidence of excess or deficiency of the Five Elements in S220. S220 simultaneously stores the direction of excess or deficiency and the strength of evidence; this embodiment only demonstrates the evidence strength of the direction of increasing demand marked by the treatment principle rule, whose unnormalized record is [0.50, 0.10, 0.65, 0.10, 0.25], and the sum of its components is 1.60. After dividing each component by 1.60, a normalized syndrome source block [0.3125, 0.0625, 0.40625, 0.0625, 0.15625] is formed for use in this embodiment; the evidence of decreasing demand is stored separately in the negative direction pool and does not enter this vector. The unnormalized record, direction mark, and normalization result all store the source syndrome, rule version, and calculation time for verification.

[0241] In this embodiment, three activity source blocks—syndrome, prescription, and acupuncture—are selected in S260, with fusion weights set to 0.40, 0.35, and 0.25 respectively. The base weight and edge confidence of the effective improvement direction mapping edges corresponding to the five elements dimension are both set to 1.00. The activity source blocks have already been filtered for applicable and exclusion conditions using the set of effective mapping edges, and no further applicable condition masks are set or multiplied repeatedly. Cross-source fusion is calculated using the following formula:

[0242] 0.40×[0.3125,0.0625,0.40625,0.0625,0.15625]+0.35×[0.20,0.10,0.50,0.05,0.15]+0.25×[0.25,0.10,0.45,0.05,0.15]=[0.2575,0.0850,0.4500,0.0550,0.1525]

[0243] The calculated demand vectors for the five elements in the direction of improvement, in the order of wood, fire, earth, metal, and water, are [0.2575, 0.0850, 0.4500, 0.0550, 0.1525]. The above source block fusion weights, mapping edge base weights, and edge confidences are only used to demonstrate the complete calculation chain and are saved with the corresponding rule version.

[0244] In S270, the aggregation results of this embodiment are rearranged in the order of Earth, Metal, Wood, Fire, and Water, resulting in target proportions of 0.4500, 0.0550, 0.2575, 0.0850, and 0.1525 for the five elements, respectively; the sum of the five is 1. This proportion is used in S280 to generate parameters and in S300 to set the number of events, cumulative duration, and structural position quotas.

[0245] S280 generates example continuous parameters according to the audio parameter mapping table A2026-03: the target range of beats per minute (BPM) is 58 to 62 beats per minute, the normalized rhythm density is 0.30 to 0.40, and the spectral centroid is 1500 to 1800 Hz; generates example discrete states: taking Gong as the main structural tone and Jue as the auxiliary structural tone, the main melody adopts the soft candidate timbre in the mid-range, the main melody, harmonic support and low-gain auxiliary tracks are enabled, and the binaural beat track is not enabled. The doctor lock, device capability and loudness upper limit are separately stored as a constraint set.

[0246] The music generation intelligent agent generates a candidate score accordingly. For the 32-second to 48-second window, all hard constraints are passed; the compliance degrees of the pentatonic proportion, BPM and theme retention are 0.72, 0.95 and 0.90 respectively, calculated according to the weights 0.50, 0.20 and 0.30 of the same version of verification rules, the score-level soft constraint comprehensive compliance degree is 0.82, so only the main melody and harmony parts of this window are partially regenerated. After regeneration, the three compliance degrees are 0.94, 0.97 and 0.95, and the score-level soft constraint comprehensive compliance degree is 0.949, which reaches the passing threshold.

[0247] All hard constraints are still passed, so the new window is retained and the regeneration reason and version number are recorded. Thereafter, the source records in the two types of contribution data objects are only used to generate rule source tags and version tracing; the prescription numerical contribution sub-matrix and the acupuncture numerical contribution sub-matrix no longer participate in the second accumulation of the pentatonic target proportion or music parameters.

[0248] An example of a score event record in this window can be recorded as: the track is the main melody track, the music section is the main theme section, the start time is 36.0 seconds, the end time is 38.0 seconds, the pitch belongs to the current pentatonic scale, the target gain is -12 decibels, the recommended timbre category is the mid-range soft timbre, the envelope is slow attack and slow release, and the sound image is centered; the rule source tag field records the syndrome source identifier, prescription source row identifier, acupoint source row identifier, pentatonic rule identifier and rule version, and the risk tag field records the loudness and device restrictions. The above data fields are used for tracing and verification, and do not participate in formula addition and subtraction.

[0249] During partial regeneration, the system copies the rule source tag field and the doctor lock field of the non-conflicting events in this window, and only replaces the pitch quota, duration or event intensity with concentrated deviations; the event intensity can only be adjusted within the target range of the part gain given by the parameter generation module, and the continuous music parameter targets cannot be changed. The partially regenerated score is re-subjected to score-level verification, and after passing, it proceeds to S400 and S500; the score-level soft constraint comprehensive compliance degree and the acoustic-level soft constraint comprehensive compliance degree are calculated and judged separately, without merging or repeated weighting.

[0250] Preferably, S300 further includes S310 to S360:

[0251] S310. Establish a set of permissible pitches based on the target key. The set of permissible pitches includes the target pentatonic scale pitches, as well as passing tones or ornaments that satisfy the conditions of weak beat position, maximum duration, resolution direction, maximum number of uses, and applicable musical phrase. Strong beats, long durations, thematic accents, and phrase start and end tones must belong to the target pentatonic scale; passing tones or ornaments are only considered permissible pitches if they simultaneously satisfy the aforementioned conditional rules, and are not directly judged as hard constraint conflicts simply because they are outside the target pentatonic scale.

[0252] S320 controls the pentatonic scale according to the quota of S280. The main pentatonic scale is highlighted by the number of events, cumulative duration, strong beats and phrase ending positions, thematic accents and event dynamics or target event gain. The remaining events and duration quotas are continuously recorded during the generation process to avoid scale drift caused by relying solely on random probability.

[0253] In the time window Inner, five tones The overall structural contribution is calculated according to formula (15):

[0254]

[0255] In the formula, , ; Indicates time window Inner five notes The comprehensive structural contribution; , , , and These represent the normalized percentage of the number of events, cumulative duration, strong beat structure weight, phrase termination and theme accent weight, event intensity, or target event gain contribution, respectively. , , , and This represents the non-negative statistical weight in the same version of the sheet music verification rules, and satisfies... If a statistical item becomes unavailable, that item is disabled, and the corresponding items are renormalized among the remaining available statistical items. .

[0256] All statistical items are normalized according to formula (16):

[0257] X∈{N,T,B,E,G}

[0258] In the formula, Represents the set of five tones the summation index in; denotes the number of valid music events belonging to the pentatonic tones within the time window ; ; denotes the cumulative duration of the pentatonic tones ; denotes the downbeat structure weight of the pentatonic tones ; denotes the versioned weighted sum of the phrase ending position weight and the thematic accent position weight of the pentatonic tones ; denotes the event dynamics contribution or target event gain contribution of the pentatonic tones , one of which is fixedly selected for the same rule version. The corresponding denominator is , formula (16) is not executed, and this statistical item is marked as unavailable. The actual rendered part gain will not be involved in formula (15) and formula (16), and is only used in the S500 acoustic-level verification.

[0259] The actual pentatonic tone ratio is calculated according to formula (17):

[0260]

[0261] In the formula, denotes the actual ratio of the pentatonic tones within the time window ; when , formula (17) is not executed, and the actual pentatonic tone ratio of this time window is marked as incalculable.

[0262] S330. The music generation agent establishes a segment plan for the introduction, crescendo section, main conditioning section, transition section and coda section based on the total duration and the audio prescription stage. Each section records the start and end time, target mode, pentatonic tone ratio, BPM, range, rhythm density, harmonic tension, thematic motif, voice part and ending condition, and records the target timbre category, spectrum target and envelope range for use in S400; the timbre control agent does not generate a timbre configuration object in S300, nor does it change the segment boundary.

[0263] S340. When generating harmony, the candidate pentatonic tone relationships are first determined according to the sequence of Wood-Jue, Fire-Zhi, Earth-Gong, Metal-Shang, Water-Yu and their generation order, and then the actual interval is selected in combination with the current mode, octave, consonance, voice leading, harmonic tension and segment function. The generation relationship is not directly equal to a fixed number of semitones; short-distance intervals should be added with stable supporting tones when used for sustained harmony.

[0264] ​S350. Generate score event records from the allowed event set. Each event is written with track, voice part, section, time, pitch, duration, dynamics, gain, timbre suggestion, envelope, pan, rule source label field, risk label field, doctor lock field, and version number. Rule generators, Transformers, or diffusion models can be used for candidate event generation, but must not violate hard constraints.

[0265] Time window The subject retention rate is calculated according to formula (18):

[0266]

[0267] In the formula, Indicates time window The theme retention within the range is: ; , and These represent the similarity between the candidate musical phrase and the current version's theme motif in terms of pitch sequence, pitch sequence, and rhythmic value ratio sequence, respectively. , and For the same version of the theme validation rules, the non-negative weights must be used, and the sum of the three must be equal to 1. .

[0268] When any of the pitch sequence similarity, pitch sequence similarity, or rhythmic time value ratio sequence similarity is marked as unavailable, that similarity item is turned off, and the corresponding weights are renormalized among the remaining available similarity items according to the original weight ratio; when all three items are unavailable, the theme preservation degree is not calculated, and the theme preservation degree is marked as unavailable.

[0269] No. The similarity of class sequences is calculated according to formula (19):

[0270]

[0271] In the formula, Indicates the sequence type; Indicates time window The first candidate musical phrase formed by the versioning and quantification rules Class sequence; The first element representing the theme motivation of the current version Class sequence; and They represent and The sequence length; This indicates the edit distance; in this embodiment, the cost for insertion, deletion, and replacement is the same. The Levenshtein edit distance, or the cost table saved in the same version of the theme validation rules. and When both are empty, formula (19) is not executed, and the similarity item is marked as unavailable; when only one is empty, .

[0272] S360: After generation, a score-level hard constraint check is performed first. These hard constraints include doctor lockouts, taboos, allowed pitches, target key, number of events and cumulative duration quotas, section boundaries, prohibited voices, and device and headphone eligibility. Once all hard constraints pass, a score-level soft constraint comprehensive compliance check is performed on soft constraints that can be directly calculated from the candidate multitrack digital score, such as pentatonic ratio, beats per minute, rhythm density, theme retention, harmonic connections, and section continuity. Actual loudness, peak value, spectral centroid, harmonic distribution, sound image, envelope, reverberation, and voice masking are not calculated in this step but are acoustically verified after S500 candidate pre-rendering. Items meeting the passing threshold are retained; minor deviations only require local regeneration of conflicting phrases, harmonies, voices, or parameters; failure of hard constraints or serious deviations in soft constraints lead to correction, reconstruction, rollback, or doctor review.

[0273] For the j-th musical score-level soft constraint that can be computed at present, the system calculates the individual compliance degree based on the distance between the actual statistical value of the candidate multitrack digital musical score and the target interval and the allowable deviation of the rule base, and calculates the comprehensive compliance degree only for the current set of valid musical score-level soft constraints.

[0274] No. The out-of-interval deviation of the soft constraint at the musical score level is calculated according to formula (20):

[0275]

[0276] In the formula, superscript Represents a score-level validation variable; Indicates the index of soft constraint terms at the music score level; Indicates the time window index of the candidate musical score; This indicates that from the current candidate multitrack digital score, according to the first... The actual value obtained by the statistical method specified in the rule; and They represent the first The target lower and upper limits of the music score-level soft constraints are derived from the same version of the music score validation rules or doctor configuration, and ; This indicates the distance by which the actual value exceeds the target interval, and its unit is 1 / 2. , and Same. When the actual value is within the target range, .

[0277] No. The individual compliance of the soft constraints at the musical score level is calculated according to formula (21):

[0278]

[0279] In the formula, Indicates time window Inner The individual compliance of the musical score-level soft constraints, with a value range of [value range missing]. ; Indicates the first The positive allowable deviation of the sheet music level soft constraints originates from the same version of sheet music verification rules or doctor configuration, and ; and Use the same units.

[0280] The overall compliance of the soft constraints at the score level is calculated according to formula (22):

[0281]

[0282] In the formula, Indicates time window The overall compliance with score-level soft constraints; This represents the set of soft constraints that are computable, have valid rule versions, and are not repeatedly checked as score-level hard constraints within the time window. Indicates the first The non-negative weights of the sheet music-level soft constraints are derived from the same version of the sheet music validation rules or doctor configurations; items listed as sheet music-level hard constraints must not pass. The overall compliance with the soft constraints at the score level is taken into account. This is obtained from formula (21). When or At that time, formula (22) is not executed, nor is the score-level soft constraint verification deemed successful.

[0283] The actual value at the score level is taken only from the current candidate digital score; the target interval, allowable deviation, and weight are taken from the same version of the score validation rules. The compliance degree of the discrete soft rules is 0 or 1.

[0284] Furthermore, the S360's hierarchical processing is as follows:

[0285] S361. A score-level soft constraint compliance score of 0.85 or higher passes; a score between 0.70 and 0.85 identifies the phrase, voice, or parameter with the largest deviation and performs local regeneration; a score below 0.70 proceeds to stage reconstruction or doctor review. These thresholds are derived from a versioned institutional rule base or doctor configuration. If any hard constraint fails, the above classification does not apply; instead, correction, rollback, or review is initiated directly.

[0286] Specifically, the music generation agent establishes a segment boundary and segment parameter plan based on the total duration. The timbre control agent configures the timbre, envelope, number of voice parts, and spatial parameters according to this plan. The feedback analysis and control module can only generate candidate instructions for extending, shortening, or switching stages when quality, safety, duration window, and version conditions are all met. These candidate instructions are verified by the collaborative control and message routing module and the version management module before they can form candidate sub-versions. One feasible configuration for each segment is as follows:

[0287] Table 4 Examples of Musical Section Control Parameters

[0288]

[0289] The duration ratios of each musical segment listed in Table 4 are jointly selected by the parameter generation module within the corresponding range, and the sum of the duration ratios of all musical segments is made up to 100% through constraint solving or normalization. When there is no feasible combination that satisfies all ranges and segment constraints, a stage template confirmed by the doctor and with a version number is used, and musical segments are not arbitrarily truncated or repeated.

[0290] Preferably, S400 further includes S410 to S460:

[0291] S410. Filter timbres by voice part function. For the main melody, prioritize timbres with good pitch distinctiveness and continuity; for harmonies, prioritize timbres with stable sustain that do not mask the main melody; for low frequencies, the standard meridian auxiliary track, and the extraordinary meridian auxiliary track, use timbres with controllable gain, envelope, and device adaptation. The standard meridian auxiliary track and the extraordinary meridian auxiliary track read their respective configuration objects and do not share track identifiers or source dimensions.

[0292] S420. Among the timbres that satisfy the five elements candidate attributes, effective range, doctor lock, equipment capability, and contraindications, compare the spectral center of gravity, harmonics, attack, sustain, brightness, roughness, and variation cost, and select one or more timbres that are closest to the target acoustic parameters. Different registers and playing techniques of the same instrument can correspond to different candidate attributes.

[0293] S430: The timbre control agent generates candidate rendering parameters for equalization, filtering, harmonic gain, dynamic envelope, imaging, and reverberation based on the target spectrum, harmonics, envelope, gain, imaging, and reverberation range. This step only creates timbre configuration objects and rendering parameter objects; the processing is not actually applied to the track-by-track audio. When timbre conversion is required, candidate parameters for crossfade, spectral envelope interpolation, or optional neural timbre transfer are generated. The neural model only generates candidate timbre representations or candidate parameters.

[0294] S440: The timbre control agent generates a track-by-track rendering task object based on the score event records that have passed score-level verification and the selected timbre resources. This object includes at least the source identifier, candidate synthesis method, pitch, duration, velocity, harmonic parameters, envelope, filtering, gain, panning, reverberation, resource version, and target track, and is sent to the audio rendering and output module. Sampling source, wavetable, addition, frequency modulation, particle, physical modeling, or conditional neural audio synthesis can all be used as execution methods for S500 candidate pre-rendering; the timbre control agent does not generate candidate track-by-track audio in this step.

[0295] In stage S300, the S450, parameter generation module, and Qijingbamai voice agent form an auxiliary track configuration object. Based on this, the music generation agent generates auxiliary track score events and performs score-level verification together with other score events. S450 selects timbre resources and generates rendering parameters only for auxiliary track score events that have passed score-level verification; if it is necessary to change the auxiliary track score events themselves, it returns to S300 to regenerate and verify them.

[0296] The S460 timbre control agent reads the offline measurement features pre-stored in the timbre resource library and performs configuration-level pre-checks on the timbre configuration object and rendering parameter object, checking the effective frequency range, target spectral range, harmonic parameters, envelope, gain, sound image, reverberation, resource integrity, and device compatibility. If the timbre does not meet the target range, it is reselected or the rendering parameters are corrected. The actual track-by-track audio, candidate mix audio, and their actual acoustic features are all generated and extracted by the audio rendering and output module after the S500 candidate pre-rendering.

[0297] Based on the above S410 to S460, here is a specific implementation method for configuring the Five Elements timbre resource library:

[0298] The Five Elements timbre resource library can use the following candidate reference table. This table is a configurable implementation; the final timbre assignment is based on the actual register, playing method, and acoustic characteristics:

[0299] Table 5 Examples of Candidate Timbres for the Five Elements and Five Tones

[0300]

[0301] Preferably, S500 further includes S510-S560:

[0302] S510. Based on the start and end times of the musical score events, the uniform sampling rate, the sampling clock, and the known delays of each audio source and processing chain, calculate the target sampling position and delay compensation plan for each event and track. This step only establishes the timeline and synchronization plan; it does not generate or arrange the audio tracks that have not yet been formed.

[0303] S520, the audio rendering and output module calls the corresponding sampled audio source or synthesizer according to the track rendering task object, generates each track audio and performs filtering, equalization, dynamic envelope, compression or limiting, panning and reverberation processing, and then places the track audio on a unified time axis according to the target sampling position and delay compensation plan of S510.

[0304] S530: Mix each track according to mono, stereo, or multi-channel configuration. Auxiliary tracks must not continuously mask the main melody. The retention priority of the main melody, primary pentatonic support, rhythm, general meridian auxiliary track, and extraordinary meridian auxiliary track should decrease in that order. If channel capacity is insufficient, turn off, merge, or reduce spatial effects in the following order: extraordinary meridian auxiliary track, general meridian auxiliary track, rhythm track, primary pentatonic support track, and main melody track. High-priority tracks must not be turned off before low-priority tracks can still be retained.

[0305] S540 performs loudness normalization, peak limit, and rate of change limit on the mixing result, and sets start fade-in, pause, or stop fade-out.

[0306] The S550 is calibrated based on the number of channels, frequency response, maximum output, and headphone wearing status. If low-frequency or spatial output capability is insufficient, harmonic, envelope, or channel merging degradation methods are used. If the device capability is insufficient, a device adaptation sub-version is created and re-enters candidate pre-rendering and acoustic level verification.

[0307] S560 extracts the actual loudness, peak value, spectral centroid, harmonic distribution, sound image, envelope, reverberation, track synchronization, and part masking degree from the candidate track audio and candidate mix audio, and performs acoustic-level hard and soft constraint verification. If the acoustic hard constraint fails, it is directly corrected, rolled back, or re-verified; the acoustic soft constraint is calculated according to the following independent formula and is not added to, multiplied by, or shares actual statistical values ​​with the score-level soft constraint comprehensive compliance of S360.

[0308] No. The out-of-range deviation of the acoustic-grade soft constraint is calculated according to formula (23):

[0309]

[0310] In the formula, superscript Indicates the acoustic level verification variable; Indicates the acoustic-grade soft constraint term index; Indicates the index of the pre-rendering time window; This indicates that from the candidate track audio or candidate mix audio generated by S500, according to the first... The extraction algorithm, track range, sampling rate, time window, and actual acoustic value extracted per unit are specified in the acoustic school verification rules. and They represent the first The target lower and upper limits of the acoustic-grade soft constraints are derived from the same version of the acoustic verification rules or doctor configuration, and ; This indicates the distance by which the actual acoustic value exceeds the target range, and its unit is . , and same. When it is within the target interval, .

[0311] No. The individual compliance of the acoustic-grade soft constraint is calculated according to formula (24):

[0312]

[0313] In the formula, Indicates time window Inner The individual compliance of the acoustic-grade soft constraint is within a certain range. ; Indicates the first The positive allowable deviation of the acoustic-grade soft constraint originates from the same version of the acoustic calibration rules or doctor configuration, and ; and Use the same units.

[0314] The acoustic-grade soft constraint comprehensive compliance is calculated according to formula (25):

[0315]

[0316] In the formula, Indicates time window The acoustic-grade soft constraint comprehensive compliance, with a value range of [value range missing]. ; This represents the set of acoustic-grade soft constraints that are computable within the time window, have valid rule versions, and are not repeatedly checked as acoustic-grade hard constraints. Indicates the first The non-negative weights of the acoustic-grade soft constraints are derived from the same version of the acoustic verification rules or doctor configurations. This is obtained from formula (24). When or At that time, formula (25) is not executed, nor is the acoustic level soft constraint verification deemed to have passed.

[0317] If the overall acoustic level soft constraint compliance is not lower than the first acoustic pass threshold, the test is passed. If it is not lower than the second acoustic threshold but lower than the first acoustic pass threshold, local corrections and re-rendering are performed on the timbre configuration, mixing parameters, voice parts, or time windows with the largest deviations. If it is lower than the second acoustic threshold, the test returns to S400 to reconfigure the timbre or enters the doctor's review. The first and second acoustic pass thresholds are derived from the same version of acoustic verification rules, and the first acoustic pass threshold is higher than the second acoustic threshold.

[0318] In the aforementioned end-to-end embodiment, after the locally regenerated score version passes score-level verification, the timbre control agent forms a timbre configuration version and a track-by-track rendering task object. The audio rendering and output module's candidate pre-rendering obtains an actual spectral centroid of 1710 Hz, a short-time loudness of -20 relative to full scale (LUFS), and a true peak value of -1.5 dB full scale, which fall within the versioning target range of 1500 to 1800 Hz, -23 to -18 LUFS, and no higher than -1 dB full scale, respectively. Therefore, it passes acoustic-level verification and forms a publishable audio version. The above acoustic parameters are only verified in S500 and are not written back to the score-level soft constraint comprehensive compliance in S300.

[0319] Furthermore, feedback monitoring and closed-loop control include the following steps:

[0320] Preferably, S600 further includes S610 to S660:

[0321] S610. Establish individual baselines before playback. The system collects ECG or photoplethysmography (PPG), EEG, conductancestokinesia, respiration, and subjective scores for a preset duration under resting or stable conditions, and records the device model, sampling rate, wearing or contact status, acquisition time, and proportion of valid data. Real-time automatic adjustment dependent on this modality is not enabled if the baseline is insufficient or the device contact status is unqualified.

[0322] S620: Construct the actual playback timeline based on the playback context object and playback status records, and attach audio version, musical phrase, track, voice part, score event index, and actual playback position to each sampling frame or feedback time window. The system can use a sliding time window of 10 to 60 seconds with an update step of 5 to 20 seconds; the original sampling rate of different sensors remains unchanged, and the feature layer is aligned according to the actual playback time window. Data collected during pauses is not associated with the currently playing score events; when a jump, replay, or device switch occurs, a new time association record is established.

[0323] S630: Each feedback mode undergoes separate preprocessing. ECG or photoplethysmography pulse waves undergo bandpass filtering, peak detection, and abnormal pulsation removal; EEG undergoes power frequency suppression and eye movement or electromyography artifact processing; skin conductance separates slow levels and fast responses; respiratory signals detect cycles and abnormal pauses; facial and voice data are only included in the emotion feature model when user authorization is granted and quality is acceptable. The filtering frequency band, artifact threshold, time window, outlier rules, and quality sub-item weights for each sensor are derived from preprocessing and quality rule records corresponding to the device model, sampling rate, and algorithm version; if the corresponding rule version is missing, the feedback mode will not enter automatic adjustment.

[0324] S640, feature extraction includes at least heart rate, RR interval, root mean square (RMSSD) and standard deviation of normal heart intervals (SDNN) in heart rate variability indices, relative power of EEG α, θ, and β bands, skin conductance level and response count, respiratory rate and rhythm stability, and valence, arousal and confidence of facial or voice responses. These features are derived from corresponding channels that have completed S630 preprocessing and passed quality control; subjective scales are converted to zero to one according to the same scale version while retaining the original options. No single short-term indicator is directly considered as clinical efficacy.

[0325] S650, Single-modal mass calculation.

[0326] For the Feedback modes in time windows Within the data, the feedback acquisition module obtains quality sub-items such as the effective data ratio, normalized signal-to-noise ratio, artifact quality score, time synchronization degree, and wearing or contact status. Then, according to conversion rules matching the device model, sampling rate, preprocessing algorithm, and quality evaluation rule version, each quality sub-item is converted... Quality score within the range.

[0327] No. Feedback modes in time windows The single-mode mass within is calculated according to formula (26):

[0328]

[0329] In the formula, Indicates the feedback modal index; This indicates the feedback time window divided according to the actual playback timeline; Indicates the first Feedback modes in time windows The single-modal mass within the range of [value range missing] ; This indicates that the feedback mode is within the time window. The set of quality sub-items that pass availability, integrity, and rule version checks; This represents one of the quality sub-items; Indicates the first The first feedback mode The normalized quality scores for each quality sub-item range from [value range missing]. ; This indicates the non-negative weight of the quality sub-item, which is derived from the equipment quality rule record that matches the equipment model, sampling rate, preprocessing algorithm, and quality evaluation rule version.

[0330] If a quality sub-item is missing, abnormal, fails integrity verification, or lacks a matching rule, that quality sub-item will not be included. .when or

[0331]

[0332] When, formula (26) is not executed, and the first... Feedback modes in time windows Internally marked as unavailable. Unavailable modes are not included in the active feedback mode set, feedback state fusion, and overall feedback quality calculation, and are not evaluated numerically. Replace the unavailable state.

[0333] Equipment quality rules are as follows: Setting the minimum quality threshold for a single mode in the feedback mode and single-mode high-quality threshold and satisfy .when When this feedback mode is in the active feedback mode set, it will not be included in the active feedback mode set; when When the feedback mode is retained, the subsequent fusion weights are reduced; when At that time, according to prior reliability and The subsequent weights will be determined jointly.

[0334] This step only calculates the single-mode quality of each feedback mode and determines its usable state. It does not perform cross-modal state fusion, calculate the overall feedback quality, or generate feedback conflict flags or music parameter adjustment instructions.

[0335] S660, Activity Feedback Feature Set and Feedback Data Packet Generation.

[0336] Based on the comparison results of the quality of each single mode, the available status of the mode, and the quality threshold output by S650, the feedback acquisition module forms an active feedback mode set corresponding to the current actual playback timeline, and extracts the active feedback features that are of qualified quality and synchronized in time from the active feedback mode set to form an active feedback feature set.

[0337] The feedback acquisition module encapsulates the feature identifier, associated feedback mode, feature value, single-mode quality, mode availability status, integrity flag, time synchronization status, device status, security event flag, acquisition time window, and playback context association information of each activity feedback feature into a feedback data packet. The playback context association information includes at least the audio version identifier, sheet music version identifier, continuous music parameter version identifier, discrete music status version identifier, segment identifier, phrase identifier, track identifier, voice part identifier, sheet music event index, and actual playback position.

[0338] The single-mode mass in the feedback data packet was directly calculated using S650. The calculation will not be repeated in this step. For feedback modes marked as unavailable in S650, the feedback data packet only saves its unavailable status, unavailable reason, device status and rule version, and does not add the feature value of the mode to the active feedback feature set.

[0339] This step does not perform state fusion between different feedback modes, calculate the overall feedback quality, identify feedback conflicts, or generate candidate adjustment instructions. Cross-modal state fusion, overall feedback quality calculation, and feedback conflict identification are all performed by the feedback analysis and control module in S710.

[0340] The S700 also includes the S710 through S750:

[0341] S710, Feedback State Analysis. The feedback analysis and control module receives the feedback data packet that has passed integrity verification, the stage target state object, the current continuous music parameter version, the current discrete music state version, and the individual response record. For the activity feedback features that meet the quality requirements, it sequentially performs feature validity verification, individual baseline correction, state semantic direction unification, normalization, state mapping, and fusion of semantically similar states, and calculates the overall feedback quality and feedback conflict flags to obtain the difference between the current feedback state and the stage target state.

[0342] S720, Candidate Adjustment Instruction Generation. When quality gating, safety gating, and continuous window conditions are met, the feedback analysis and control module generates candidate adjustment instructions based on versioned feedback—continuous parameter sensitivity rules, current stage rules, and individual response records. Any candidate that changes the continuous music parameter target is first sent to the parameter generation module to form a continuous parameter sub-version; any candidate that changes the mode, section, main timbre category, track start / stop, channel layout, or discrete state of auxiliary tracks is first generated by the parameter generation module into a discrete state candidate sub-version; only candidates that only repair local pitch, duration, or phrase events without changing the parameter target are sent to the music generation agent. Downstream agents can only execute based on the formed parameter or state sub-versions; candidate sub-versions re-enter the corresponding verification chain.

[0343] S730, Progressive Execution. The parameter generation module only applies single-time amplitude limiting, rate of change limiting, cumulative change limiting, and feasible region projection to continuous musical parameters allowed by candidate adjustment instructions; discrete musical states are only switched at phrase or segment boundaries through candidate generation, hard constraint screening, scoring, and state machine. Affected modules generate candidate scores, candidate timbre configurations, or candidate rendering versions based on the new parameter sub-version; an observation window and cooldown time are set after each adjustment, and adjustments of the same level are not superimposed during the observation period.

[0344] S740. Post-execution verification and operation records. Only when the same target version, activity state dimension, state weight, window length, and statistical method are used before and after the adjustment can the uniform difference be directly compared; if conditions are inconsistent, a new comparison baseline should be established or only the trend should be recorded without updating the individual response matrix. If the difference decreases and quality and safety conditions are met, the new version should be retained; if the change is unclear, continued observation should continue; if the difference increases or discomfort occurs, a rollback should be planned. Before performing a rollback, the current physician lockout, contraindications, safety boundaries, and equipment capabilities must be rechecked; historically stable versions that no longer meet current constraints should not be restored, but rather stimulation should be reduced, gradually stopped, or submitted to the physician for review.

[0345] S750, Phased Version Update. The system first identifies the root objects that have changed: when syndrome, treatment principle, or non-real-time phase information changes, the affected TCM assessment objects and their downstream components are re-executed; when drugs, dosages, processing methods, or principal-assistant-adjuvant-guide principles change, only the affected drug rows and their downstream components are recalculated; when acupoints, tonification / sedation, stimulation intensity, or duration of action change, only the affected acupoint rows and their downstream components are recalculated; when only doctor locking, contraindications, or equipment capabilities change while the TCM facts remain unchanged, only the constraint set and affected parameters, states, scores, timbres, or rendering objects are updated, without recalculating prescriptions or acupuncture contributions. The version log field stores the input, contributing objects, atlases, audio attribute control objects, parameters, scores, timbres, renderings, equipment, verification, and feedback versions; the doctor locking field must not be overwritten by the automatic model, and the rollback pointer field only points to historically stable versions that are still usable after current constraint review. Unchanged objects retain the original version and preserve parent-child relationships and difference records.

[0346] More preferably, S710 also includes S711 to S715:

[0347] The S711 feedback analysis and control module reads the feedback data packet, first verifying the validity of features, time synchronization status, and single-modal quality. Then, it calls S712 to perform individual baseline correction, state semantic direction unification, and 0-to-1 normalization on each valid feature. The normalization result is uniquely assigned to the main state dimension by the versioned feature-state mapping table and fused with the same semantics to form a numerical feedback state vector. Subsequently, the overall feedback quality and feedback conflict marker are calculated. The parameter generation module provides the stage target state object based on the current discrete music state, doctor configuration, and versioned stage rules. The feedback acquisition module provides the baseline and single-modal quality aligned with the actual playback timeline.

[0348] Feedback conflicts are determined based on the state dimension. For the first... Each state dimension has at least two states originating from different feedback modes, and each state belongs to a specific feedback mode. All are no less than the corresponding Only when the activity feedback characteristics are identified can cross-modal conflict judgment be performed. Indicates time window Inner Target values ​​for each state dimension; This indicates the target tolerance for this state dimension; Indicates the threshold for cross-modal conflict amplitude; This indicates the number of consecutive time windows required to confirm a conflict. When the minimum activity value is not higher than... The maximum value is not less than The difference between the maximum and minimum values ​​is not less than and continuously reach During the first time window, the first Each state dimension is marked as a cross-modal conflict. , , The core status dimension list and minimum quality conditions are all derived from the same version's feedback conflict rules or doctor configurations.

[0349] S712, No. The feedback features are performed according to formula (27) to perform individual baseline correction, state semantic direction unification and normalization:

[0350]

[0351] In the formula, Indicates the feedback feature index; Indicates the feedback time window index; Indicates the first The normalized value of the feedback feature after baseline correction, state semantic direction unification, and amplitude limiting has a value range of [value range missing]. ; This indicates that the feedback acquisition module is within the time window. The obtained effective eigenvalues; Indicates the first stable baseline window before playback The mean or median of a feature; Indicates the first The positive reference scale of change for each feature is derived from the same version of preprocessing rules, scale rules, or individual baseline statistics, and ; Indicates the first The state semantic direction coefficient of each feature relative to its unique master state dimension, and An increase in the original feature indicates that the dimensionality of the state has increased. An increase in the original feature indicates that the dimension of the state has decreased. . If the feature value exceeds the interpretable range of the device or rule, formula (27) will not be executed, and the feature will be marked as unavailable.

[0352] S713. Calculate the weighted Euclidean difference based on the current state and the target state; all state dimensions are normalized to zero to one. Only record when the overall feedback quality is below the first overall feedback gating threshold; only low-perturbation continuous parameters are allowed when it is in the medium range; only when a higher threshold is reached, the feedback conflict flag field is false, and the deviation exists continuously, is it allowed to update the individual response matrix or evaluate discrete state candidates.

[0353] S714. Map state errors to internally normalized continuous musical parameters. The sensitivity matrix from feedback state to continuous parameters is an m×n matrix, and the personal response matrix is ​​an m×m non-negative diagonal matrix; n is the number of state dimensions, and m is the number of continuous parameter dimensions allowed for automatic adjustment. When historical data is insufficient, the personal response matrix uses an identity matrix or a doctor-confirmed diagonal default matrix. Mode, timbre category, section, and voice start / stop are not included in this matrix calculation.

[0354] As a specific implementation, the feedback state dimensions are, in order, arousal, relaxation, stress, emotional valence, and fatigue. The target state vector and state dimension weight matrix of the main conditioning stage can be set according to formula (28):

[0355]

[0356] In the formula, Indicates time window The target feedback state vector of the prescription stage; The state dimension weight matrix is ​​a diagonal non-negative matrix, and the sum of the diagonal elements corresponding to the activity state dimensions is... The target value, weight, state dimension order, normalization range, applicable stage, and version are all determined by the target state object or doctor configuration for the same stage.

[0357] The feedback state to continuous music parameter sensitivity matrix can be set according to formula (29):

[0358]

[0359] In the formula, The rows correspond to BPM, spectral centroid, overall gain, and reverberation ratio, respectively, while the columns correspond to arousal, relaxation, stress level, emotional valence, and fatigue level, respectively. The positive or negative sign of the matrix elements indicates whether the corresponding continuous music parameter is increased or decreased when the state error is positive. The actual matrix values, dimensional order, applicable stage, and version are recorded and saved by sensitivity rules.

[0360] S715. When the overall feedback quality is lower than the first gating threshold, only the feedback data is recorded. When the overall feedback quality is not lower than the first gating threshold and is lower than the second gating threshold, the feedback conflict is marked as false and no safety event is detected, only the low-disturbance continuous music parameters are enabled. When the overall feedback quality is not lower than the second gating threshold, the feedback conflict is marked as false, no safety event is detected, the current parameters meet the safety boundary and the deviation continuously reaches the preset window number, the adjustment permissions for rhythm parameters, local musical phrases, personal response records or discrete music state candidates are enabled.

[0361] The feedback status to continuous music parameter sensitivity matrix is ​​derived from audited institutional rules, doctor configurations, or offline population data models, and the version remains fixed within the same feedback control period; individual historical feedback and micro-probe results only update individual response records and do not write back to this sensitivity matrix. When the overall feedback quality is not lower than the second gating threshold but the deviation persistence window condition has not yet been met, only feedback data is recorded, and no automatic adjustment instructions are generated.

[0362] More preferably, S720 also includes S721 to S729:

[0363] The S721 feedback analysis and control module first performs quality gating, safety gating, time synchronization verification, and version consistency verification. Then, it identifies the direction, duration window number, and trend of each state deviation and forms a set of candidate strategies. A short-term fluctuation does not generate candidates for adjustment of mode, main timbre, or paragraph structure; if any gating fails, only feedback is recorded or safety control is triggered.

[0364] S722. Generate candidate strategies based on the current stage and deviation, including maintaining current parameters, continuous parameter fine-tuning, voice part weight adjustment, timbre adjustment, local phrase regeneration, mode conversion, safety rollback, and doctor review. The system scores strategies based on the expected reduction in discrepancy, consistency with the prescription, personal historical response, melodic continuity, change cost, and risk, removing candidate strategies that violate doctor lockout or safety rules, and prioritizing strategies with lower change costs.

[0365] S723. Continuous parameters are updated incrementally. Each parameter has a set base step size, maximum single change, maximum rate of change per unit time, cumulative change limit, and conversion time. BPM, gain, spectral centroid, image, and voice part weights are smoothly interpolated within one or more phrases, without jumping instantaneously from the original value to the target value. Mode, principal timbre, and section structure are changed only when the feedback quality is high, the difference is sustained, the minimum hold time is met, and the section is at the boundary of a phrase or section.

[0366] S724. During small-step trials, it is preferable to adjust only one parameter at a time, with a maximum of three parameters having a fixed correlation, while keeping other major parameters unchanged. Weighted Euclidean variance is compared only before and after the trial, provided the stage target version, activity state dimension, state weight, window length, and statistical method are the same. If the variance decreases and the overall feedback quality is satisfactory, it is retained, and a decision is made on whether to continue after the cooling-off period. If conditions are inconsistent, a new baseline is established without updating the individual response matrix. If the variance increases, the quality is unsatisfactory, or discomfort occurs, the current lockout, taboo, safety, and equipment conditions are reviewed first, and then a smooth restoration to the previous stable version that still meets the current constraints is implemented.

[0367] S725. When the response amplitude of a certain continuous parameter in the personal response record is unclear under the current prescription stage and candidate adjustment direction, a low-amplitude, short-duration, single-parameter micro-probe can be inserted under the conditions that the doctor allows it, the overall feedback quality meets the standard, the feedback conflict is marked as false, and there are no safety anomalies. The micro-probe does not change the key, major pentatonic scale, major timbre, or doctor-locked fields; it only updates the diagonal items of the personal response matrix that are consistent with the user, stage, parameter, and direction. The results take effect from the next control cycle and do not write back to the audio attribute control object or sensitivity matrix of the current cycle.

[0368] S726. Each candidate adjustment instruction must record at least the affected object, original value, target value, maximum step size, start phrase, conversion time, observation time, doctor lock, safety boundary, parent version, and rollback pointer fields. Instructions affecting continuous parameters or discrete states are first sent to the parameter generation module to form corresponding sub-versions, and then executed by the music generation agent, timbre control agent, mode conversion agent, extraordinary meridian voice agent, or audio rendering and output module; instructions that only repair local score events and do not change the parameter target can be directly sent to the music generation agent; mixing, track synchronization, and device execution parameters are rendered by the audio rendering and output module to form rendering sub-versions.

[0369] S727. After adjustment, an observation window should be set up, and in principle, new adjustments of the same level should not be superimposed. When the status difference improves, the version should be retained and the response record updated; when there is no clear change, continue to observe or select another low-disturbance strategy; when the status deteriorates, first review the current doctor lockout, contraindications, safety, and equipment conditions, and then roll back to a stable version that still meets the current constraints; when no recoverable version exists, reduce the stimulus, gradually stop, and submit to the doctor for review. Stop automatic accumulation when multiple consecutive strategies are ineffective.

[0370] S728. To prevent repeated adjustments near the threshold, the system sets the start threshold to be higher than the stop threshold, and sets a minimum hold time and cooldown time. Safety events and doctor commands have higher priority than the above hysteresis, hold, and cooldown rules.

[0371] S729. Candidate strategy rules must at least record the applicable stage, target state dimension, deviation direction, initiation threshold, number of consecutive windows, minimum overall feedback quality, allowed parameters, adjustment direction, single and cumulative upper limits, observation and cooldown time, target agent, doctor lock, contraindications, and version. Discrete state transitions are not performed if the rule is incomplete. Example step ranges for continuous parameters are 1 to 3 beats / minute BPM, 0.5 to 1.5 dB gain, and 2% to 8% spectral centroid; transitions are completed smoothly within 4 to 20 seconds, and evaluated after 20 to 60 seconds. The maximum number of consecutive trials for the same parameter is set to 2 to 5, with the specific upper limit determined by the same version of the strategy rule or doctor configuration.

[0372] In the aforementioned feedback loop, the processing chain is fixed as follows: "Active modal quality calculation—baseline correction and state semantic normalization—same semantic state fusion—difference calculation—continuous parameter update or discrete state switching—observation and verification." Each original feedback feature enters only one main state dimension; the same feature must not be repeatedly entered into the control as both an independent state variable and a composite state variable.

[0373] At time t, for the set of active feedback modalities that meet the minimum effective conditions and are time-synchronized with the playback context object, the overall feedback quality of the time window is calculated according to formula (30):

[0374]

[0375] In the formula, Indicates time window The set of active feedback modalities that meet the minimum effective conditions and are synchronized with the actual playback timeline; Indicates the feedback modal index; Indicates the first The nonnegative prior reliability of this feedback mode is derived from equipment calibration, institutional validation, or physician configuration. This is obtained from formula (26). When or hour, When the denominator is greater than hour, .

[0376] The state error vector is calculated according to formula (31):

[0377]

[0378] In the formula, Indicates time window The state error vector; This represents the target state vector for the current prescription stage, derived from the currently valid stage target state object. This represents the current feedback state vector obtained after semantic fusion, and its k-th component. Calculate according to formula (43). and They must use the same state dimensions, the same order, the same normalization range, and the same version.

[0379] The weighted Euclidean variance is calculated according to formula (32):

[0380]

[0381] In the formula, Indicates time window The weighted Euclidean difference; Defined by formula (28). Only when the same target version, activity state dimension, weight, window length, and statistical method are used before and after the adjustment, are the results. Only then can direct comparisons be made.

[0382] The gating coefficient is determined according to formula (33):

[0383]

[0384] In the formula, and Let represent the first overall feedback gating threshold and the second overall feedback gating threshold, respectively. ; and Let these represent the gating coefficients under medium and high quality conditions, respectively, satisfying... . , , and All of these originate from the same version of feedback gating rules or doctor configurations. ≥ However, if the continuous window condition is not met... =0, only records the current state, and does not generate automatic adjustment instructions.

[0385] The parameter permission mask is expressed according to formula (34):

[0386]

[0387] In the formula, Indicates time window The parameter permission mask; Indicates the first A series of music parameters in the time window Automatic adjustment is allowed. This indicates that automatic adjustment is prohibited. Each diagonal element is jointly determined by doctor locking, stage rules, device capabilities, and security boundaries; after S720 forms a candidate strategy, it further filters only within the parameter dimensions that have been opened by the parameter permission mask, and does not reopen parameter dimensions that have already been prohibited.

[0388] The individual response matrix is ​​expressed according to formula (35):

[0389]

[0390] In the formula, Indicates the user index; Indicates the prescription stage index; Indicates time window Inner Candidate adjustment directions for each continuous music parameter are determined based on the sign of the corresponding parameter component after the feedback state to the continuous music parameter sensitivity matrix is ​​applied to the state error vector: a positive direction is taken when the corresponding component is greater than 0, a negative direction is taken when it is less than 0, and no candidate increment is formed for that parameter when it is equal to 0; the candidate adjustment direction is fixed before constructing the personal response matrix. S720 only performs strategy screening on the formed candidate directions and candidate increments. When candidate adjustment directions are missing, conflict with each other, or do not meet the current doctor locking, stage rules, and device capabilities, the corresponding parameter permission mask element is removed. Set to 0 to disable automatic adjustment of this continuous music parameter. This represents the individual response gain that matches the user, prescription stage, continuous music parameters, and candidate adjustment direction; if no matching record exists, the corresponding diagonal element is set to 1.

[0391] The original candidate increments of continuous parameters are calculated according to formula (36):

[0392]

[0393] In the formula, Indicates time window The original continuous parameter increment vector; subscript The parameter represents the continuous music parameter; the remaining parameters are determined by formulas (29), (31), (33) to (35), respectively. The output of formula (36) must continue to be subject to component-by-component single-pass limiting, rate of change limiting, and cumulative change limiting to obtain the allowable increment. .

[0394] The next candidate continuous parameter sub-version is calculated according to formula (37):

[0395]

[0396] In the formula, and These represent the current continuous parameter version and the next candidate continuous parameter sub-version, respectively. This represents the feasible set formed by doctor locking, safety boundaries, equipment capabilities, phase rules, and parameter association constraints; when the aforementioned constraints are compatible... It is a non-empty, closed, convex feasible set formed by box constraints and linear continuous parameter constraints; when the aforementioned constraints are incompatible, At this point, candidate version generation and Euclidean projection are not performed; the process proceeds directly to the review. Discrete music state constraints must not be incorporated into the feasible set of continuous parameters. Indicating targeting Euclidean projection operator.

[0397] The Euclidean projection operator is defined according to formula (38):

[0398]

[0399] In the formula, This represents a candidate continuous parameter vector formed by superimposing the allowable increments obtained by component-by-component single-step amplitude limiting, rate of change limiting, and cumulative change limiting on the current continuous parameter vector; Represents the feasible set Candidate vectors in. Formula (38) is not executed at this time, and the process is entered into the doctor's review.

[0400] The five-tone target proportions belong to a coupled parameter group with a sum of 1, and independent addition or subtraction of individual proportion components is not performed. When the feedback rule allows adjustment of the five-tone proportions, the parameter permission mask must simultaneously open at least two proportion components that are not locked by the doctor, or open the complete five-tone proportion subvector; the system only renormalizes within the open components according to the preset compensation relationship, and keeps the locked components unchanged. If there are fewer than two adjustable components or insufficient remaining allocable proportions, automatic updates to the five-tone proportions are not performed, and the current proportion is maintained or the system is transferred to the doctor for review.

[0401] No. The normalized micro-detection step size of each continuous music parameter is calculated according to formula (39):

[0402]

[0403] In the formula, Indicates the first Normalized actual micro-detection step size of a continuous music parameter; This indicates the actual parameter change relative to the stable baseline during the micro-probe test; and These represent the first consecutive parameter in the same version of the continuous parameter rule. The upper and lower limits allowed for consecutive music parameters, and Detection direction Depend on The sign is determined as follows: hour , hour Formula (39) only takes the absolute value of the actual step size for scale normalization.

[0404] The microprobe response estimate is calculated according to formula (40):

[0405]

[0406] In the formula, Indicates user At the prescription stage Inside, for the first A continuous music parameter along the detection direction The response estimate obtained from this micro-probe; and These represent the weighted Euclidean differences obtained before and after detection under the same target, activity dimension, state weight, window length, and statistical method. Indicates the first The non-negative response scaling factor corresponding to each continuous music parameter; This represents a positive zero constant, and . Indicates a neutral response, greater than This indicates that the effective response in the current direction is relatively strong, less than This indicates a weak response.

[0407] The individual response gain is updated according to formula (41):

[0408]

[0409] In the formula, and Representing users respectively At the prescription stage Internal, targeting the first Continuous music parameters and detection direction The individual response gain before and after the update; Represents the learning rate, satisfying ; and They represent the first The personal response gain of each continuous music parameter has a lower and upper allowable limit, and satisfies the following conditions: Formula (41) is executed only when the overall feedback quality, time synchronization, feedback conflict and safety conditions are all met, and the update result takes effect from the next control cycle.

[0410] The upper limit of parameters must be greater than the lower limit; the response scaling factor, zero-prevention constant, learning rate, and upper and lower limits of response gain must all come from the same version of micro-probing rules or doctor configuration. The same stage objectives, activity dimensions, state weights, window lengths, and statistical methods must be used before and after micro-probing; records of improving direction cannot be directly used for decreasing direction, and other prescription stage records can only be used if the version migration rules are met.

[0411] Table 6 Examples of Feedback Feature to Master State Dimension Mapping

[0412]

[0413] For the Each state dimension is first fused, and the activity features assigned to that state dimension are then integrated within each feedback mode. Feedback modes in the state dimension The modal internal state values ​​are calculated according to formula (42):

[0414]

[0415] In the formula, Indicates time window Internally belongs to the feedback mode It is uniquely assigned to the state dimension. A set of activity feedback characteristics that are of acceptable quality and synchronized in time; This represents one of the feedback features; Representation of features Mapping to the state dimension The non-negative prior weights are derived from a versioned feature-state mapping table that matches the feedback feature identifier, feedback modality, master state dimension, prescription stage, and rule version; the same original feedback feature is only allowed to be assigned to one master state dimension. This is obtained from formula (27). When or At that time, no calculation was performed. And mark the feedback mode as unavailable on that state dimension.

[0416] The state values ​​are then fused between the feedback modes. Each normalized feedback state dimension is calculated according to formula (43):

[0417]

[0418] In the formula, Indicates time window Intrinsic state dimension It has available The set of activity feedback modes; Represents feedback mode For state dimension The non-negative prior reliability is derived from the same version of cross-modal reliability rules formed by equipment calibration, institutional validation, or physician configuration. It is obtained from formula (26); Indicates time window Inner Each normalized feedback state dimension has a value range of [value range missing]. .when Or the denominator is At that time, Mark as missing, not by numerical value Replacement.

[0419] Missing state dimensions are not included in the activity state dimension set of formulas (28), (31), and (32); stage target state vector Current feedback state vector and state dimension weight matrix All are limited to a common, available state dimension, and will The diagonal weights corresponding to the available dimensions are renormalized until the weight sum is 1. The same original feedback feature must not be repeatedly assigned to multiple master state dimensions.

[0420] In another independently run example of progressive adjustment, the current rule allows the spectral centroid to vary between 2200 Hz and 2800 Hz. The overall feedback quality for three consecutive 30-second windows is no less than 0.75, feedback conflicts are marked as false, and the uniformity differences are 0.34, 0.33, and 0.32 respectively. Furthermore, the prescription rule allows for a reduction in the spectral centroid. The system selects only the spectral centroid parameter for micro-probing: internally, 2500 Hz is first normalized within the allowed range, a small negative step size is applied, and then it is inversely mapped to 2400 Hz, smoothly reaching the target within 8 seconds of the next musical phrase; other continuous parameters and all discrete states remain unchanged.

[0421] The trial is held for 30 seconds, and the two feedback windows are observed. If the uniform difference decreases from 0.32 to 0.24 and the quality conditions continue to be met, the system retains this parameter version and updates the corresponding individual response diagonal term according to the microprobe response formula. If the difference rises to 0.38 or the user reports discomfort, the system smoothly reverses to 2500 Hz within 8 seconds without updating the individual response matrix. The system does not continue to stack in the same direction if the cumulative change limit, the maximum number of consecutive trials, or the cooldown period has not expired.

[0422] Furthermore, timbre control, mode conversion, ordinary meridian auxiliary tracks, and extraordinary meridian auxiliary tracks are all optional configurations of the main chain, and only the corresponding parameters, discrete states, and constraints output by the parameter generation module are read. Each candidate track carries its source and version, and can only be released after being verified at both the music score and acoustic levels; auxiliary tracks can be turned off or downgraded, and do not presume a fixed human resonant frequency or determine therapeutic effects.

Claims

1. A personalized TCM five-tone audio generation system, characterized in that, include: The data acquisition and structuring module is used to acquire confirmed syndrome data, treatment principle data, prescription data, and acupuncture prescription data for the same user and the same prescription version, assign source identifiers and version identifiers to each original fact, and generate structured input data objects. A TCM assessment intelligent agent is used to generate syndrome evidence objects and treatment principle target objects based on the structured input data objects. The prescription parsing and contribution object generation module is used to generate prescription contribution data objects based on drug records and acupuncture meridian contribution data objects based on acupoint records. The dual-map mapping module is used to receive the syndrome evidence object, the treatment principle target object, the prescription contribution data object, and the acupuncture meridian contribution data object. It calls the TCM side map, the audio attribute map, and the cross-map mapping edges connecting the two. It performs deduplication on the valid mapping edges according to the source identifier, source version, stage identifier, source dimension, target dimension, mapping direction, and rule version. It performs normalization within each source block, separates the positive direction numerical edges, negative direction numerical edges, and constraint edges, and performs a cross-source aggregation according to the source block fusion weight to generate a unique audio attribute control object with numerical load, constraint set, and for the same user, the same prescription version, and the same audio prescription stage. The parameter generation module is used to generate the five-tone target ratio, continuous music parameters, discrete music states, and constraint sets based on the audio attribute control object. A music generation agent is used to generate candidate multitrack digital scores based on the five-tone target ratio, the continuous music parameters, the discrete music state and the constraint set, and to write rule source tags for each score event, which correspond to its numerical source, such as syndrome, treatment principle, drug record, acupoint record, cross-graph mapping edge, rule and version. The rule verification and local regeneration module is used to perform score-level verification on the candidate multitrack digital scores. When a score-level conflict is found, it generates a list of affected objects and a local regeneration instruction based on the rule source tags, so that the music generation agent retains the unaffected score events and their rule source tags, and only performs local regeneration on the affected phrases, voices or time windows. It is also used to perform acoustic-level verification on the candidate pre-rendered results. When an acoustic-level conflict suitable for local configuration correction or local re-rendering is found, it generates a local configuration correction instruction or a local re-rendering instruction, respectively. The timbre control agent is used to generate timbre configuration objects and rendering parameter objects for the candidate multitrack digital scores that have passed the score-level verification, and to perform local corrections only on the affected timbre configuration objects or rendering parameter objects according to the local configuration correction instructions. The audio rendering and output module is used to perform candidate pre-rendering based on the candidate multitrack digital score, the timbre configuration object and the rendering parameter object, extract actual acoustic features, perform local re-rendering only on the affected voice parts or time windows according to the local re-rendering instruction, and output a publishable audio file or playback control sequence when both the score-level verification and the acoustic-level verification pass.

2. The personalized TCM five-tone audio generation system according to claim 1, characterized in that, Also includes: The collaborative control and message routing module is used to perform object routing, task status management, version consistency verification, message deduplication, exception degradation, and control priority management based on the input and output dependencies of each data object. The version management module is used to assign version identifiers to input objects, intermediate objects, candidate objects and output objects, save parent-child version relationships, input-output dependencies and rollback pointers, and trigger incremental recalculation of affected objects when the root object changes; The feedback acquisition module is used to construct the actual playback timeline based on the playback context object and the actual playback status, collect feedback data, and perform preprocessing, feature extraction, time alignment, and single-modal quality calculation. The feedback analysis and control module is used to generate feedback state vectors, overall feedback quality, feedback conflict markers, and candidate adjustment instructions based on the feedback characteristics that are of acceptable quality and synchronized with time. The candidate adjustment instruction only generates continuous music parameter candidate sub-versions, discrete music state candidate sub-versions, local score versions, timbre configuration sub-versions, or rendering parameter sub-versions. It does not modify the confirmed syndrome evidence object, treatment principle target object, prescription contribution data object, acupuncture meridian contribution data object, or audio attribute control object, and causes the candidate sub-versions to re-enter the corresponding score-level verification or acoustic-level verification.

3. A personalized method for generating TCM five-tone audio, characterized in that, include: S100: Obtain confirmed syndrome data, treatment principle data, prescription data, and acupuncture prescription data under the same user and the same prescription version, as well as authorized and doctor-confirmed hospital information system data; assign source identifiers and version identifiers to each original fact; and generate structured input data objects. S200: Generate syndrome evidence objects and treatment principle target objects based on the structured input data objects; generate prescription contribution data objects based on drug records; generate acupuncture meridian contribution data objects based on acupoint records; call the TCM side map, audio attribute map, and the cross-map mapping edges connecting the two; perform deduplication, source block normalization, increase directional numerical edges, decrease directional numerical edges, and separate processing of constraint edges on each source block, as well as one cross-source aggregation, to form a unique audio attribute control object with numerical load, constraint set, and for the same user, the same prescription version, and the same audio prescription stage; generate five-tone target ratios, continuous music parameters, discrete music states, and constraint sets based on the audio attribute control object; S300: Generate candidate multitrack digital scores based on the five-tone target ratio, the continuous music parameters, the discrete music state, and the constraint set; write the referenced syndrome, treatment principle, drug record, acupoint record, cross-graph mapping edge, rule, and version corresponding rule source tag for each score event; perform score-level verification on the candidate multitrack digital scores, and determine whether to pass, partially regenerate, stage reconstruct, rollback, or review based on the score-level verification result; wherein, when determining to perform partial regeneration, generate a list of affected objects based on the rule source tag, retain the unaffected score events and their rule source tags, and perform partial regeneration only on the affected musical phrases, voice parts, or time windows; S400: Select timbre resources for the candidate multitrack digital scores that have passed the score-level verification, and generate a timbre configuration object and a rendering parameter object; S500: Based on the candidate multitrack digital score, the timbre configuration object, the rendering parameter object, and the device capability information, perform candidate pre-rendering to generate candidate track audio and candidate mixed audio, extract actual acoustic features, and perform acoustic level verification; based on the acoustic level verification result, determine whether to pass, perform local configuration correction, perform local re-rendering, return to S400 to reconfigure the timbre, roll back, or review; wherein, when determining to perform local configuration correction or local re-rendering, only the affected timbre configuration, rendering parameters, voice parts, or time windows are processed accordingly; when both the score-level verification and the acoustic level verification pass, output a publishable audio file or playback control sequence.

4. The personalized TCM five-tone audio generation method according to claim 3, characterized in that, The S200 further includes: S210. Standardize the symptoms, tongue appearance, facial appearance, pulse appearance, constitution, emotions, prescriptions, acupuncture prescriptions and hospital information system data in the structured input data object, and record the original fact identifier, source, time, completeness, confidence level, confirmation status and version; S220. Generate contributions for excess of the five elements and contributions for deficiency of the five elements according to the rule chain of "characteristics - syndrome - viscera or meridians - five elements", and save the contributions in different directions separately. S230. Generate visceral susceptibility modification objects based on physical constitution, lifestyle habits, duration of emotional states, historical records and environmental information; S240. Generate the prescription contribution data object based on the actual dose, normalized reference dose, prescription role, processing method, data confidence, five-element attribute vector, meridian affiliation vector, and direction of action vector of each drug record. S250. Generate the acupuncture meridian contribution data object based on the stimulation type, stimulation intensity, duration of action, acupoint role, data confidence, five-element attribution vector, meridian attribution vector, tonification and sedation direction vector, and eight-vessel association vector recorded for each acupoint; wherein, for equipment stimulation intensity with physical dimensions, the stimulation intensity is normalized proportionally according to the equipment stimulation reference value, and for manual acupuncture techniques without unified physical dimensions, the stimulation intensity is directly mapped to a standardized stimulation intensity according to a versioned level mapping table, and the two standardization paths are mutually exclusive. S260. When all the data objects required for the cross-map mapping have been formed, the status is confirmed to meet the requirements, and the versions are compatible, the TCM side map, the audio attribute map, and the cross-map mapping edges are called. Deduplication is performed according to the source type, source identifier, source version, stage identifier, source dimension, target dimension, mapping direction, and rule version. For each source block, the sum of the products of the basic weights and edge confidence of each effective mapping edge in the source block is used as the normalized denominator, and the normalized source values ​​referenced by each effective mapping edge in the source block are weighted and averaged. Edges that increase the direction value, edges that decrease the direction value, and constraint edges are processed separately, and a cross-source aggregation is performed according to the source block fusion weight to generate the audio attribute control object. S270. Obtain the non-negative five-element demand intensity arranged in the order of wood, fire, earth, metal, and water from the audio attribute control object, and normalize it according to the relationship between earth and palace, metal and shang, wood and jiao, fire and zhi, and water and yu to obtain the target proportion of the five tones. S280. Generate the continuous music parameters, the discrete music state, and the constraint set according to the audio attribute control object, wherein the continuous music parameters are updated progressively within an allowable range, and the discrete music state is determined by candidate filtering and state machine switching; S290, Output the syndrome evidence object, the treatment principle target object, the prescription contribution data object, the acupuncture meridian contribution data object, the effective mapping edge list, the audio attribute control object, the five-tone target ratio, the continuous music parameter, the discrete music state, the constraint set, and the rule source index object; the rule source index object is only used for tracing, verification, and version dependency, and does not participate in the second numerical summation.

5. The personalized TCM five-tone audio generation method according to claim 3, characterized in that, The S300 also includes: S310. Establish a set of permissible pitches according to the target mode. The set of permissible pitches includes the target pentatonic scale pitches and passing tones or ornaments that meet the conditions of weak beat position, maximum duration, resolution direction, upper limit of usage frequency and applicable musical phrase. S320. Based on the five-tone target ratio, at least two of the following are subject to quota control: the number of events, cumulative duration, strong beat structure weight, phrase termination and theme accent weight, event intensity or target event gain for the musical score events corresponding to Gong, Shang, Jiao, Zhi and Yu. S330. Based on the total duration and audio prescription stage, establish a segment plan that includes at least an introduction, a main modulation segment, and a closing segment, and record the start and end times, target key, pentatonic ratio, tempo, range, rhythm density, harmonic tension, theme motif, voice part, and ending condition for each segment. S340. Based on the correspondence between wood and jiao, fire and zhi, earth and gong, metal and shang, water and yu, and the order of mutual generation, candidate five-tone harmonic relationships are generated, and the actual interval is determined by combining the current mode, octave, degree of consonance, voice connection, harmonic tension and section function. S350. Generate a music score event record, wherein the music score event record includes at least the track identifier, voice part identifier, section identifier, start and end time, pitch, duration, dynamics, gain, timbre suggestion, envelope, sound image, rule source label, risk label, doctor lock field and version identifier; S360: First, perform a score-level hard constraint check, then calculate the score-level soft constraint comprehensive compliance. If the score-level hard constraint check fails, proceed to correction, rollback, or review. If the score-level soft constraint comprehensive compliance is lower than a first threshold but not lower than a second threshold, freeze the event identifier, time location, rule source label, doctor lock field, and version identifier of unaffected score events based on the conflict location record and the list of affected objects, and use the conflict rule identifier and the parameter to be corrected as local regeneration conditions. If the score-level soft constraint comprehensive compliance is lower than the second threshold, proceed to stage reconstruction or doctor review, wherein the first threshold is higher than the second threshold.

6. The personalized TCM five-tone audio generation method according to claim 5, characterized in that, The S400 also includes: S410: Select candidate timbre resources according to the vocal functions of the main melody, harmony, low frequency, ordinary meridian auxiliary track and extraordinary meridian auxiliary track; S420. Among the candidate timbre resources that meet the five elements candidate attributes, effective range, doctor lock, equipment capability and taboo, compare the spectral centroid, harmonics, attack, sustain, brightness, roughness and variation cost to determine the timbre resources that match the target acoustic parameters. S430: Generate candidate rendering parameters for equalization, filtering, harmonic gain, dynamic envelope, imaging, and reverberation based on the target spectrum, harmonics, envelope, gain, imaging, and reverberation range. S440. Generate a track-by-track rendering task object based on the score event record that has passed the score-level verification and the determined timbre resources. The track-by-track rendering task object includes at least the sound source identifier, candidate synthesis method, pitch, duration, velocity, harmonic parameters, envelope, filtering, gain, image, reverberation, resource version, and target track. S450: Read the ordinary meridian auxiliary tracks and extraordinary meridian auxiliary tracks that have passed the score-level verification from the candidate multi-track digital score, and generate timbre configuration objects and rendering parameter objects for the ordinary meridian auxiliary tracks and extraordinary meridian auxiliary tracks; when it is necessary to add, delete or change the pitch, duration, event density, entry time or exit time of the auxiliary track, return to S300 to generate the corresponding auxiliary track score event, and re-execute the score-level verification. After the score-level verification passes, proceed to S400. S460. Read the offline measurement characteristics of the timbre resource, perform configuration-level pre-check on the timbre configuration object and the rendering parameter object, and check the effective pitch range, target frequency range, harmonic parameters, envelope, gain, sound image, reverberation, resource integrity and device compatibility conditions; if it does not meet the target range, reselect the timbre resource or correct the rendering parameters.

7. The personalized TCM five-tone audio generation method according to claim 6, characterized in that, The S500 also includes: S510. Based on the start and end times of the music score event, the uniform sampling rate, the sampling clock, and the delays of each sound source and processing chain, calculate the target sampling position and delay compensation plan for each music score event and track. S520. Based on the track rendering task object, call the corresponding sampled sound source or synthesizer to generate each track audio. Perform filtering, equalization, dynamic envelope, compression or limiting, sound panning and reverberation processing on the track audio. Place each track audio on a unified time axis according to the target sampling position and the delay compensation plan. S530 mixes the audio of each track according to mono, stereo or multi-channel configuration, and according to the retention priority of the main melody, main five-tone support, rhythm, ordinary meridian auxiliary track and extraordinary meridian auxiliary track, and turns off, merges or reduces the spatial effects of low priority tracks in turn when the channel capacity is insufficient. S540: Perform loudness normalization, peak limit, and rate of change limit on the mixing result, and set the start fade-in and pause or stop fade-out. S550 performs device calibration based on the number of channels, frequency response, maximum output of the playback device, and headphone wearing status, and generates a device adaptation sub-version when the device capability is insufficient. S560. Extract at least one of the following from the candidate track audio and candidate mixed audio as the actual acoustic features: loudness, peak value, spectral centroid, harmonic distribution, sound image, dynamic envelope, voice part gain, reverberation, track synchronization and voice part masking degree. First, perform acoustic-level hard constraint check, and then calculate the acoustic-level soft constraint comprehensive compliance. Specifically, the score-level verification uses only score-level statistical values ​​calculated from the candidate multitrack digital scores, and the acoustic-level verification uses only the actual acoustic features. The score-level verification and the acoustic-level verification employ independent sets of hard constraints, soft constraints, and comprehensive compliance, respectively, without adding, multiplying, or weighting the actual values ​​or comprehensive compliance of the two. Score-level conflicts trigger local regeneration, timbre or spectral configuration conflicts trigger local configuration correction, and mixing, track synchronization, loudness, device adaptation, or channel layout conflicts trigger local re-rendering.

8. The personalized TCM five-tone audio generation method according to any one of claims 3-7, characterized in that, Following S500, there is also S600, which includes: S610. Before playback, collect physiological feedback and subjective scores in a resting or stable state, establish an individual baseline, and record the device model, sampling rate, wearing or contact status, collection time, and proportion of effective data. S620: Construct the actual playback timeline based on the playback context object and playback status record, and add audio version, musical segment, musical phrase, track, voice part, score event index and actual playback position to each feedback time window; S630 performs preprocessing matching with the corresponding feedback modality for ECG or photoplethysmography pulse waves, EEG, skin conductance, respiration, facial or voice feedback respectively. S640. Extract at least one of heart rate, heart rate variability, relative power of EEG frequency band, skin conductance, respiration, facial features, voice or subjective scale features from the preprocessed feedback data. S650: Convert the effective data ratio, normalized signal-to-noise ratio, artifact quality score, time synchronization degree, and available quality sub-items in the wearing or contact state of each feedback mode to zero to one, and calculate the single-mode quality according to the versioned non-negative weight; mark the feedback mode with single-mode quality below the minimum quality threshold as unusable; S660: Based on the quality of each single mode, the availability of the mode, and the time synchronization status, form an active feedback mode set and an active feedback feature set, and encapsulate the feature identifier, the feedback mode to which each active feedback feature belongs, the feature value, the quality of the single mode, the availability of the mode, the integrity flag, the time synchronization status, the device status, the security event flag, the feedback time window, and the playback context association information of each active feedback feature into a feedback data packet.

9. The personalized TCM five-tone audio generation method according to claim 8, characterized in that, Following S600, S700 is further included, wherein S700 includes: S710. Read the feedback data packet and the stage target state object, and perform individual baseline correction, state semantic direction unification, normalization, state mapping and semantic state fusion on the activity feedback features that are of qualified quality and synchronized in time, to generate feedback state vector, overall feedback quality and feedback conflict marker. S720. When the quality gate, safety gate, and continuous window conditions are met, candidate adjustment instructions are generated based on the versioned feedback-continuous parameter sensitivity rules, the current stage rules, and individual response records. S730. For the candidate adjustment instructions, single amplitude limiting, rate of change limiting, cumulative change limiting and feasible region projection are performed on the continuous music parameters. The discrete music state is switched at the boundary of musical phrase or musical segment through candidate screening and state machine. An observation window and cooling time are set after each adjustment. S740. When using the same target version, activity state dimension, state weight, window length and statistical method before and after the adjustment, compare the state differences; when the state differences decrease and the quality and safety conditions are met, retain the candidate sub-version; when the state differences increase or become inappropriate, generate rollback candidates. S750 identifies the root objects that have changed, and only recalculates the affected syndromes, treatment principles, drug records, acupoint records, cross-graph mapping edges and their downstream objects. Unaffected objects retain the original version. It saves the parent-child version relationship, input-output dependency relationship and rollback pointer for each input object, intermediate object, candidate object and output object, and re-verifies whether the historical stable version meets the current doctor lockout, contraindications, safety boundaries and device capabilities before rollback. The candidate adjustment instruction only generates continuous music parameter candidate sub-versions, discrete music state candidate sub-versions, local score versions, timbre configuration sub-versions, or rendering parameter sub-versions. It does not modify the confirmed syndrome evidence object, treatment principle target object, prescription contribution data object, acupuncture meridian contribution data object, or audio attribute control object, and causes the candidate sub-versions to re-enter the corresponding score-level verification or acoustic-level verification.

10. The personalized TCM five-tone audio generation method according to claim 9, characterized in that, The S710 also includes: S711. Verify the validity, time synchronization status, and single-modal quality of activity feedback features, and mark activity feedback features that do not meet the validity, time synchronization, or minimum single-modal quality conditions as unavailable; S712. Based on the individual baseline, positive reference change scale, and state semantic direction coefficient, perform baseline correction, state semantic direction unification, and zero-to-one normalization on each effective feedback feature; assign each normalized activity feedback feature to a main state dimension according to the versioned feature-state mapping table; perform semantic state fusion within each feedback modality and between different feedback modalities; identify directional conflicts from different feedback modalities in the same state dimension; and generate the current feedback state vector, overall feedback quality, and feedback conflict marker. S713. Generate a state error vector and a weighted Euclidean difference quantity based on the current feedback state vector and the stage target state vector, and determine the automatic adjustment permission based on the overall feedback quality, feedback conflict flag, safety event flag, current safety boundary and deviation persistence window; S714. The state error vector is mapped to the continuous music parameter sensitivity matrix, parameter permission mask and personal response matrix through the version-fixed feedback state to become a continuous music parameter candidate increment, and the mode, timbre category, paragraph state, track start / stop and channel layout are used as discrete music state candidates. S715. When the overall feedback quality is lower than the first gating threshold, only the feedback data is recorded. When the overall feedback quality is not lower than the first gating threshold and is lower than the second gating threshold, the feedback conflict is marked as false and no safety event is detected, only the low-disturbance continuous music parameters are enabled. When the overall feedback quality is not lower than the second gating threshold, the feedback conflict is marked as false, no safety event is detected, the current parameters meet the safety boundary and the deviation continuously reaches the preset window number, the adjustment permissions for rhythm parameters, local musical phrases, personal response records or discrete music state candidates are enabled.