Low-intervention efficient regulation and control method and system for large language model in digital twin hydraulic system

By constructing a non-guided test set and perturbation template injection technology, the problem of uncontrollable generation of digital twin water conservancy large models in a task-free state was solved, low-cost, high-security intelligent regulation was achieved, and the generation stability and reliability of the water conservancy system were improved.

CN120781985AActive Publication Date: 2025-10-14CHANGJIANG RIVER SCI RES INST CHANGJIANG WATER RESOURCES COMMISSION
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511159808.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-10-14
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

In the absence of clear prompts or tasks, the digital twin water conservancy model has problems such as uncontrollable generation path, semantic drift and unstable style. The existing methods are costly, have weak generalization capabilities and lack traceable intervention mechanisms, which increases the risk of system operation.

Method used

A non-guided test set is constructed, and the discourse structure and semantic coherence are recorded through multiple rounds of generation sampling. Trajectory clustering analysis is performed, key nodes are identified, and perturbation templates are injected to achieve low-intervention path intervention and improve the controllability and stability of the generated path.

Benefits of technology

It achieves precise monitoring and micro-adjustment of model generation behavior in a task-free environment, reduces control costs, ensures semantic coherence and generation stability, and enhances the intelligent decision-making support capabilities of the water conservancy digital twin system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_5
    Figure SMS_5
  • Figure SMS_10
    Figure SMS_10
  • Figure SMS_14
    Figure SMS_14
Patent Text Reader

Abstract

The invention provides a low-intervention efficient regulation and control method and system for a large language model in a digital twin hydraulic system, and the method comprises the steps: (1) constructing a non-instructive test set in a task-free and clear-target-free environment, carrying out the multi-round generation sampling of the model, and recording the discourse structure, theme progression and semantic coherence in the output; (2) performing semantic embedding and style embedding extraction and trajectory clustering analysis on the original output data to obtain a naturally generated behavior path diagram and a high-influence expression change point; (3) perturbation template injection and language structure adjustment are carried out on the high-influence expression change points, and an optimized expression path of the tone and the structure trend is obtained; and (4) carrying out semantic topic change comparative analysis on the optimized expression path and original output data in the step (3), and evaluating the intervention effect of perturbation insertion on the overall expression behavior. According to the method, the model generation path can be accurately guided by minimizing the intervention cost, and the controllability and stability of large model output in the digital twin water conservancy scene are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of water conservancy and artificial intelligence, in particular to a low-intervention efficient regulation method and system for a large language model in a digital twin water conservancy system. BACKGROUND

[0002] The digital twin water conservancy large model has the problems of insufficient controllability and stability under non-guiding conditions. With the in-depth deployment of digital twin technology in water conservancy engineering systems, the natural language generation capability based on large language models is widely used in intelligent scheduling interpretation, monitoring data broadcasting, and emergency warning response in key scenarios. However, in the non-guiding state without explicit prompts or tasks, the model output often lacks controllable directionality, and is prone to expression structure deviation, theme jump, and semantic drift. Recent research has revealed the internal self-driven flow trend of the model by analyzing the expression continuity, structure tendency, and emerging behavior inertia of multiple generations, but in the field of water conservancy digital twins, real-time observation and intervention of this process have not been conducted, resulting in unpredictable deviation of global behavior caused by small perturbations, thereby increasing the risk of system operation.

[0003] Existing technologies mainly rely on directed retraining and reinforcement learning to achieve behavior shaping of large models. In order to improve the controllability and style consistency of generated text in the digital twin scenario, methods such as deterministic Promote injection, soft expression templates, or RLHF are often used to retrain or incrementally fine-tune the model. These methods can to some extent calibrate the generation path, prevent semantic deviation and style imbalance, and improve the reliability of scheduling interpretation and warning response text. In addition, researchers also construct non-guiding test sets and combine trajectory clustering algorithms to identify high-impact expression turning points, so as to make micro-adjustments at key nodes and maintain the coherence of the text and the progression of the theme in the multi-round generation process.

[0004] However, existing methods have the defects of high cost, weak generalization ability, and lack of traceable intervention mechanisms. Directed retraining and reinforcement learning retraining require a large amount of labeled data and computing resources, and are prone to overfitting of the model on specific tasks, reducing the adaptability of multi-scenario applications. At the same time, these methods often modify the model weights in one go, lack systematic observation and fine-tuning of the internal flow structure gradient, making the intervention costly and difficult to accurately assess the effect. In addition, there is a lack of dynamic tracking and evaluation mechanism for the generation trajectory, making it difficult to adjust and optimize in a timely manner, so that the digital twin system faces the dual challenges of semantic drift and style instability in actual operation. Therefore, there is an urgent need for a low-intervention efficient regulation method based on internal flow observation to achieve cost-controllable, structure-traceable, and highly generalizable model behavior management, thereby improving the operation efficiency and safety of digital twin water conservancy large models. SUMMARY

[0005] In view of the deficiencies of the prior art, the present application provides a low-intervention and efficient regulation method and system for a large language model in a digital twin water conservancy system, a regulation mechanism based on non-guided input triggering, trajectory analysis to identify key semantic nodes and micro-perturbation injection is constructed, which can minimize the intervention cost and accurately guide the model generation path, improve the controllability and stability of the large model output in the digital twin water conservancy scene, and effectively solve the problems of high risk of model style drift and semantic deviation in the prior art.

[0006] The technical scheme provided by the present application is a low-intervention and efficient regulation method for a large language model in a digital twin water conservancy system, comprising the following steps:

[0007] (1) In the absence of tasks and explicit target prompts, a non-guided test set is constructed, and the model is subjected to multiple rounds of generation sampling, the discourse structure, theme progression and semantic coherence in the natural output are recorded, and the probability distribution of the modeling sequence output is used to capture the performance differences of the model under different generation paths, and the natural generation ability of the model is systematically observed;

[0008] (2) The discourse structure, theme progression and semantic coherence data obtained in step (1) are subjected to semantic embedding and style embedding extraction and trajectory clustering analysis to obtain a natural generation behavior path graph and high-impact expression change points;

[0009] (3) The high-impact expression change points obtained in step (2) are subjected to micro-perturbation template injection and language structure adjustment to obtain an expression path with optimized tone and structure trend, which is used for intervention strategy implementation;

[0010] (4) The optimized expression path obtained in step (3) and the original output data obtained in step (1) are subjected to semantic theme change comparison analysis to realize the intervention effect evaluation of the micro-perturbation insertion on the overall expression behavior.

[0011] Further, the generation logic of constructing a non-guided test set in step (1) by defining a random sampling function based on uniform distribution is as follows:

[0012] wherein represents sampling from a uniform distribution in a task-free prompt space , and is the size of the test set.

[0013] Further, the probability modeling method of the model multiple generation sampling in step (1) is as follows:

[0014]

[0015] wherein represents the The generated text sequence, The parameter set representing the large language model, specifically including model weights, bias terms, and learnable parameters related to the generation path, The sequence length, modeling the output diversity under different generation paths through sequence probability decomposition.

[0016] Further, the semantic coherence and theme progression stability of the content generated by the quantization model in step (1) are calculated based on embedding similarity to generate a semantic consistency index between texts. The semantic coherence quantization method is as follows:

[0017]

[0018] Where is the cosine similarity function, is the embedding vector of the th semantic segment, and the theme progression stability is evaluated by the average similarity of adjacent semantic segments.

[0019] Further, the specific steps of step (2) are as follows:

[0020] (2-1) First, realize multi-dimensional behavior representation through a double-channel encoding architecture, and the joint feature extraction function is defined as:

[0021]

[0022] Where is the semantic encoder, is the style encoder, The operator represents the orthogonal vector splicing of the two, establishing an embedding space with both semantic depth and style characteristics for subsequent analysis;

[0023] (2-2) Perform joint feature extraction of semantic embedding and style embedding on the original behavior sequence obtained in step (1). The original behavior sequence is the original text output sequence generated by the large language model under the non-guided test set without any intervention, including its discourse structure, theme progression, and semantic coherence. Map the semantic vector and expression style features of the generated text to a unified representation space, use the trajectory clustering algorithm optimized by dynamic time warping to construct the natural generation behavior path graph of the language model, and realize trajectory similarity measurement by defining a loss function based on DTW distance. The function expression is as follows:

[0024]

[0025] Where is the th trajectory cluster, is the cluster center vector, is the number of clusters;

[0026] (2-3) In the constructed path graph, the node influence propagation coefficient and the topological centrality index are calculated, combined with the semantic mutation detection algorithm of the generated text, to identify the expression change points with global structural influence, and to establish an intervention node priority evaluation system. The key node determination method is as follows:

[0027]

[0028] wherein is the weight coefficient, and the KL divergence quantifies the distribution difference between adjacent semantic segments.

[0029] Further, at the expression turning key point marked in the trajectory analysis in step (3), a set of perturbation templates are used to adjust the tone and structure trend of the subsequent expression path through the minimum language insertion, and a gating function is used to control the injection strength of the perturbation template, realizing local path correction under low intervention conditions. The strength control method of the perturbation template is as follows:

[0030]

[0031] wherein is the key node, is the node feature embedding, is the Sigmoid function, is the learnable parameter.

[0032] Further, in step (3), the pre-defined perturbation template embedding vector is fused with the original generated path features, and a sparse mask matrix is used to constrain the intervention range, guiding the generated path to deviate in the expected direction while maintaining semantic coherence. The fusion modeling method of path correction is as follows:

[0033]

[0034] wherein is the embedding vector of the th semantic segment, is the sparse mask matrix, is the perturbation template embedding, denotes element-wise multiplication.

[0035] Further, in step (3), a bimodal alignment loss function is defined to simultaneously constrain the semantic consistency of the corrected generated path and the deviation amplitude of the original path, and an L1 regularization term is used to maintain the sparsity of the intervention operation, preventing model behavior distortion caused by excessive intervention. The loss function of the intervention effect optimization method is as follows:

[0036]

[0037] wherein denotes the target embedding vector of the t-th semantic segment in the intended direction after the perturbation intervention, is a sparsity coefficient, denotes L1 regularization.

[0038] Further, the specific steps of step (4) are as follows:

[0039] (4-1) First, construct a multi-dimensional quantitative index to evaluate the directional regulation effect of perturbation insertion. The difference in semantic theme distribution before and after intervention is measured by cosine similarity and KL divergence. The semantic theme shift quantification method is as follows:

[0040]

[0041] wherein is a cosine similarity function, , denote the embedding vectors of the t-th semantic segment before and after intervention, denote the t-th semantic segment in the generated text sequence, denote the theme distribution before and after intervention.

[0042] (4-2) Based on the fluctuation characteristics analysis of the generated path after intervention, a dynamic stability evaluation function is introduced to analyze the fluctuation characteristics of the generated path. The path embedding covariance is calculated through a sliding window mechanism to measure the output stability of the model after intervention. The generated stability dynamic evaluation function is as follows:

[0043]

[0044] wherein is the size of the sliding window, denotes the trace of the path embedding covariance matrix, denotes the set of continuous semantic segment embedding vectors in the generated path after intervention from time step t-w to t.

[0045] (4-3) Combine the theme shift and stability indicators to establish an exponential weighted comprehensive evaluation function to calculate the comprehensive intervention effect and realize the quantitative grading of the intervention effect. The comprehensive intervention effect scoring method is as follows:

[0046]

[0047] wherein is a normalization coefficient used to balance the index weight.

[0048] Another technical solution provided by the present application is a low-intervention high-efficiency regulation system for a large language model in a digital twin water conservancy system, comprising:​​

[0049] A non-guided prompt sampling module is used to construct a non-task-oriented prompt input set to ensure the naturalness and non-target dependency of the language model generation behavior, and the output obtained through multiple rounds of sampling is used as original behavior data for analyzing the natural expression tendency of the model under the condition of no control;

[0050] A trajectory modeling and inertia node identification module is used to perform semantic modeling and behavior trajectory reconstruction on the original text generated by the model, identify the expression path with stability and continuity in the model generation through sentence vector embedding, style embedding extraction and sequence clustering analysis, and further combine the token-level attention weight change, syntactic structure mutation and expression intensity change to mark the structure node with potential behavior turning ability, i.e. the expression inertia enhancement area;

[0051] A perturbation strategy construction and insertion module selects structural semantic insertion words from the style fine-tuning morpheme library at the identified expression deflection node and performs minimum language-level intervention.

[0052] A behavior deviation evaluation module is used to quantify the expression changes of the model before and after the perturbation insertion, and the evaluation indicators include semantic deviation degree, style trajectory change, output theme migration, and structure consistency change, and the deflection amplitude and persistence of the micro-intervention on the overall generation behavior path are determined through visualization and trajectory comparison analysis.

[0053] The beneficial effects of the present application are:

[0054] (1) The present application proposes a dynamic regulation mechanism based on real-time flow observation and key node perturbation, which improves the adaptive intervention ability and global stability control ability of the model on the generation behavior path by introducing expression trajectory graph construction technology in a non-guided state and a structured perturbation injection strategy.

[0055] (2) The present application can effectively capture the natural expression trajectory of the model and implement precise perturbation intervention, ensure the semantic coherence and generation stability of the digital twin water conservancy system in a non-guided environment, and realize low-cost and high-security intelligent decision support. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present application will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0057] The present application provides a low-intervention and efficient regulation method for large language models in digital twin water conservancy systems, which includes the following specific steps:

[0058] S1 Non-instructive prompt evaluation set construction

[0059] S2 Behavior trajectory analysis and feature extraction

[0060] S3 Perturbation injection

[0061] S4 Intervention effect evaluation

[0062] Through the mechanisms of non-instructive prompt evaluation set construction (S1), behavior trajectory analysis and feature extraction (S2), perturbation injection (S3), and intervention effect evaluation (S4), the internal generation direction of the digital twin water conservancy large model is accurately monitored and slightly adjusted in the absence of explicit task prompts. Based on capturing the natural expression trajectory of the model, the key node perturbation of the minimum language template effectively induces global behavior deviation, significantly reduces the regulation and control cost, and ensures the structural traceability and strong generalization ability of the model regulation and control path. It can realize the quantitative evaluation and fine control of the generation behavior of large models in multiple scenarios such as water conservancy dispatching, monitoring data broadcasting, and emergency warning, and improve the scientificity and reliability of system warning response and maintenance decision-making.

[0063] In the technical solution of the application, the input of S1 is a prompt environment without tasks and explicit targets. Non-instructive test set construction and multiple generation sampling are performed on the input to obtain data on discourse structure, theme progression, and semantic coherence of the model's natural output, which is used for behavior path analysis in S2.

[0064] In the absence of tasks and explicit target prompts, a non-instructive test set is constructed, and the model is sampled for multiple generations. The discourse structure, theme progression, and semantic coherence in the natural output are recorded to provide original data support for subsequent behavior path analysis. The generation logic of the non-instructive test set is constructed by defining a random sampling function based on uniform distribution as follows:

[0065] where represents sampling from the uniform distribution of the task-free prompt space , and is the test set size, which ensures the diversity and extensive coverage of the input context through random sampling.

[0066] A non-instructive prompt evaluation set is established in a task-free and explicit target-free prompt environment to systematically observe the natural generation capability of the model. A random sampling function is defined to generate a diversified test set under non-instructive input conditions, ensuring coverage of a wide range of input scenarios. The probability modeling method for multi-round generation sampling of the model is as follows:

[0067]

[0068] wherein represents the text sequence of the round generation, represents the parameter set of the large language model, specifically including model weights, bias terms, and learnable parameters related to the generation path, is the sequence length, and the output diversity under different generation paths is modeled through sequence probability decomposition.

[0069] Then, for each input sample, multi-round generation sampling is performed, and by modeling the probability distribution of sequence output, the performance difference of the model under different generation paths is captured. In order to quantify the semantic coherence and theme progression stability of the generated content, a semantic consistency index between generated texts is further calculated based on embedding similarity, providing systematic data support for subsequent behavior path analysis. The semantic coherence quantification method is as follows:

[0070]

[0071] wherein is the cosine similarity function, is the embedding vector of the semantic segment, and the theme progression stability is evaluated by the average similarity of adjacent semantic segments.

[0072] The input of S2 is the discourse structure, theme progression, and semantic coherence data in S1. Semantic embedding and style embedding extraction and trajectory clustering analysis are performed on the input to obtain the natural generation behavior path graph and high-impact expression change points, which are used for the positioning of the perturbation intervention structure nodes in S3.

[0073] Semantic embedding and style embedding extraction are performed on the original behavior sequence, and a trajectory clustering algorithm is used to construct a natural generation behavior path graph (expression trajectory map) of the language model. In the path graph, high-influence expression shifts are identified as structural nodes for subsequent perturbation intervention. First, a dual-channel encoding architecture is used to realize multi-dimensional behavior representation, and its joint feature extraction function is defined as:

[0074]

[0075] wherein is a semantic encoder, is a style encoder, The operator represents the concatenation of the two orthogonal vectors, and establishes an embedding space with both semantic depth and style characteristics for subsequent analysis.

[0076] The joint feature extraction of semantic embedding and style embedding is performed on the original behavior sequence obtained by S1, and the original behavior sequence is the original text output sequence generated by the large language model under the non-guided test set without any intervention, including its discourse structure, theme progression and semantic coherence. The semantic vector of the generated text and the expression style feature are mapped to a unified representation space, and a trajectory clustering algorithm optimized by dynamic time warping (DTW) is used to construct the natural generation behavior path map (expression trajectory map) of the language model. The trajectory similarity is measured by defining a loss function based on the DTW distance, and the function expression is as follows:

[0077]

[0078] wherein is the trajectory cluster, is the cluster center vector, is the number of clusters.

[0079] Then in the constructed path map, the node influence propagation coefficient and the topological centrality index are calculated, combined with the semantic mutation detection algorithm of the generated text, to identify the high-influence expression shifts with global structural influence, and to establish an intervention node priority evaluation system. The key node determination method is as follows:

[0080]

[0081] wherein is a weight coefficient, and the KL divergence quantifies the distribution difference between adjacent semantic segments.

[0082] The input of S3 is the high-influence expression shift in S2, and the input is perturbed by template injection and language structure adjustment to obtain an expression path with optimized tone and structure trend, which is used for intervention strategy implementation.

[0083] At the key points of expression transitions marked in the generative trajectory analysis, a set of perturbation templates (such as soft expressions, negotiated connection structures, and syntactic reconstruction) are used to adjust the tone and structural trends of the subsequent expression path through minimal language insertion. First, the injection intensity of the perturbation template is controlled by a gating function to achieve local path correction under low-intervention conditions. The intensity control method of the perturbation template is as follows:

[0084]

[0085] in As the key node, is the node feature embedding, is the Sigmoid function, are learnable parameters.

[0086] The predefined perturbation template embedding vector is fused with the original generation path features, and a sparse mask matrix is ​​used to constrain the intervention range, guiding the generation path to deviate in the expected direction while maintaining semantic coherence. The fusion modeling method for path correction is as follows:

[0087]

[0088] in For the The embedding vector of the semantic fragment, is a sparse mask matrix, is the perturbation template embedding, Represents element-wise multiplication.

[0089] Then, by defining a bimodal alignment loss function, we simultaneously constrain the semantic consistency of the modified path and the magnitude of its deviation from the original path. We also use the L1 regularization term to maintain the sparse nature of the intervention operation and prevent model behavior distortion caused by excessive intervention. The intervention effect optimization method (loss function) is as follows:

[0090]

[0091] in It represents the target embedding vector of the tth semantic segment in the expected direction after perturbation intervention. This vector is generated by domain knowledge or preset semantic templates and is used to constrain the consistency of the corrected generation path with the expected semantic trend. is the sparsity coefficient, represents L1 regularization.

[0092] Table 1 Examples of perturbation templates

[0093]

[0094] The input of S4 is the optimized expression path in S3 and the original output data in S1, and the semantic topic change contrast analysis is performed on the input to realize the intervention effect evaluation of the perturbation insertion on the overall expression behavior.

[0095] The semantic topic change before and after the intervention is compared to evaluate the intervention effect of the perturbation insertion on the overall expression behavior. First, a multi-dimensional quantitative index is constructed to evaluate the directional regulation effect of the perturbation insertion, and the cosine similarity and KL divergence are combined to measure the semantic topic distribution difference before and after the intervention. The semantic topic shift quantification method is as follows:

[0096]

[0097] Wherein is the cosine similarity function, represents the embedding vector of the t-th semantic segment before the intervention; represents the embedding vector of the t-th semantic segment after the intervention; represents the t-th semantic segment (such as a sentence or a phrase) in the generated text sequence, which is used to quantify the distribution difference of local semantics before and after the intervention respectively represent the topic distribution before and after the intervention.

[0098] Further based on the fluctuation characteristic analysis of the generated path after the intervention, a dynamic stability evaluation function is introduced to analyze the fluctuation characteristics of the generated path, and the covariance of the path embedding is calculated through the sliding window mechanism to measure the output stability of the model after the intervention. The generated stability dynamic evaluation function is as follows:

[0099]

[0100] Wherein is the size of the sliding window, represents the trace of the covariance matrix of the path embedding, represents the set of continuous semantic segment embedding vectors from time step to in the generated path after the intervention, which is used to dynamically analyze the local fluctuation characteristics of the generated path after the intervention. The covariance matrix trace is calculated through the sliding window mechanism (the window size is W) to evaluate the output stability of the model.

[0101] Finally, the topic shift degree and the stability index are combined to establish an exponential weighted comprehensive evaluation function to calculate the comprehensive intervention effect by weighting, and the quantitative grading of the intervention effect is realized. The comprehensive intervention effect scoring method is as follows:

[0102]

[0103] Wherein is the normalization coefficient for balancing the index weight.

[0104] Table 2 Intervention effect evaluation parameters

[0105]

[0106] In the whole step of the present application, we systematically designed for the low intervention and high efficiency regulation of digital twin water conservancy large model. First, by constructing a non-guided state test pool, we carried out multi-round generation sampling of the large model in the environment without explicit task and target prompt, fully collected the discourse structure, theme evolution and semantic coherence in the natural output, and provided rich raw data support for subsequent behavior path analysis. Then, in the behavior trajectory analysis and feature extraction stage, the expression sequence collected was extracted for semantic embedding and style embedding, the trajectory clustering algorithm was used to construct the expression trajectory graph, and the key nodes with high influence of expression turning were identified in the trajectory graph, providing accurate positioning for perturbation injection. Subsequently, in the perturbation injection stage, a set of carefully designed perturbation templates were introduced at the key nodes, and through the minimum language insertion, the model was effectively guided to realize the deviation of global structure and semantic trend in subsequent generation. Finally, in the intervention effect evaluation stage, by comparing the changes of the generated text before and after the intervention in terms of theme distribution, structure evolution and semantic coherence, the influence effect of perturbation on model behavior path was quantitatively and qualitatively evaluated, and the superior performance of the method in realizing low-cost and high-stability large model regulation was verified.

[0107] After completing the whole step, a digital twin water conservancy large model with low intervention and high efficiency regulation ability was successfully constructed. Through multi-round natural generation sampling and expression trajectory analysis of the model in a non-guided state, the key semantic turning nodes were accurately identified, and perturbation injection was applied at these positions to realize efficient directional adjustment of the global generation path at a minimum cost. After comparison and evaluation before and after the intervention, the model maintained high semantic coherence and style stability in unconstrained iteration, significantly reduced the risk of semantic deviation and enhanced the transparency and traceability of the generation process. The optimized large model showed excellent stability and reliability in intelligent scheduling, data broadcasting and emergency warning scenarios of water conservancy digital twin system, significantly improved the regulation efficiency and operation safety, and provided low-cost, high-universality and high-safety technical support for decision support of water conservancy projects.

[0108] To achieve the above technical objectives, the system framework of the proposed method is as follows:

[0109] Module one Non-guided prompt sampling module

[0110] This module is used to build a non-task-oriented prompt input set to ensure the naturalness and non-target dependency of the language model generation behavior. The prompt pool contains open context phrases, sentence starters without specific task instructions, and semi-structured language triggers, which are used to guide the model into a zero-shot generation state. The output obtained through multiple rounds of sampling is used as the original behavior data to analyze the natural expression tendency of the model under uncontrolled conditions.

[0111] Module Two: Generation Trajectory Modeling and Inertial Node Identification Module

[0112] This module performs semantic modeling and behavior trajectory reconstruction on the original text generated by the model. Through sentence vector embedding, style embedding extraction, and sequence clustering analysis, it identifies expression paths with stability and continuity in model generation. Further combining token-level attention weight changes, syntactic structure mutations, and expression intensity changes, it labels structural nodes with potential behavior turning ability, i.e., expression inertia enhancement regions.

[0113] Module Three: Perturbation Strategy Construction and Insertion Module

[0114] At the identified expression deflection nodes, the module calls the style fine-tuning morpheme library, selects structural semantic insertion phrases (such as sentence initial mitigation structures, logical transition phrases, and negotiation expression frameworks), and performs minimal language-level intervention. The insertion strategy does not change the original task structure or introduce additional semantic load, but guides the model generation path to naturally turn through tone control and rhythm adjustment.

[0115] Module Four: Behavior Deviation Evaluation Module

[0116] This module is used to quantify the expression changes of the model before and after the perturbation insertion. The evaluation indicators include semantic shift, style divergence, output topic migration, and structural consistency variation. Through visualization and trajectory comparison analysis, the deflection amplitude and persistence of the micro-intervention on the overall generation behavior path are determined.

[0117] Through these modules, the final generation path precise regulation and semantic risk prevention achieve low-intervention and efficient control of the digital twin water conservancy large model generation behavior. The system framework realizes real-time observation of natural expression trajectories and coordinated operation of key node directional perturbation, providing technical support for semantic stability enhancement and dynamic risk avoidance in water conservancy scheduling interpretation, monitoring data broadcasting, and emergency warning response scenarios.

[0118] While embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary of the principles and application of the present application. Numerous modifications and adaptions can be effected without departing from the spirit and scope of the present application, which is not limited to the exact construction and arrangement described. It is intended, therefore, to cover all modifications and adaptions that fall within the scope of the claims and their equivalents.

Claims

1. A low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system, characterized in that: The steps include: (1) We constructed an unsupervised test set in a task-free and goal-free prompt environment, subjected the model to multiple rounds of generation sampling, and recorded the discourse structure, topic progression, and semantic coherence in its natural output. We also captured the performance differences of the model under different generation paths by modeling the probability distribution of sequence outputs, and systematically observed the model's natural generation ability. (2) Perform semantic embedding and style embedding extraction and trajectory clustering analysis on the discourse structure, topic progression, and semantic coherence data obtained in step (1) to obtain a naturally generated behavior path diagram and high-impact expression change points; (3) For the high-impact expression change points obtained in step (2), perturbation template injection and language structure adjustment are performed to obtain expression paths with optimized tone and structural trends for the implementation of intervention strategies; (4) Perform a comparative analysis of semantic theme changes on the optimized expression path obtained in step (3) and the original output data obtained in step (1) to evaluate the intervention effect of perturbation insertion on the overall expression behavior.

2. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 1 is characterized in that: The generation logic of the non-guided test set in step (1) is constructed by defining a random sampling function based on uniform distribution as follows: , in Indicates that there is no task prompt space Sampling from a uniform distribution, is the test set size.

3. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 1 is characterized in that: The probability modeling method for the multi-round generation sampling of the model in step (1) is as follows: ,in Indicates the The text sequence generated by round, Represents the parameter set of the large language model, is the sequence length, and the output diversity under different generation paths is modeled by sequence probability decomposition.

4. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 3 is characterized in that: In step (1), the semantic coherence and topic progression stability of the content generated by the quantified model are calculated based on the embedding similarity to generate the semantic consistency index between the texts. The semantic coherence quantification method is as follows: ,in is the cosine similarity function, For the The embedding vector of each semantic segment is used to evaluate the topic progressive stability through the mean similarity of adjacent semantic segments.

5. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 4 is characterized in that: The specific steps of step (2) are as follows: (2-1) First, a dual-channel encoding architecture is used to achieve multi-dimensional behavior representation, and its joint feature extraction function is defined as: ,in is the semantic encoder, is the style encoder, The operator represents the concatenation of the two orthogonal vectors, which establishes an embedding space with both semantic depth and style characteristics for subsequent analysis; (2-2) The original behavior sequence obtained in step (1) is subjected to joint feature extraction of semantic embedding and style embedding, and the semantic vector and expression style features of the generated text are mapped to a unified representation space. The trajectory clustering algorithm optimized by dynamic time warping is used to construct the natural generation behavior path graph of the language model. The trajectory similarity measurement is achieved by defining a loss function based on DTW distance, and its function expression is as follows: ,in For the Clusters of class trajectories, is the cluster center vector, is the number of clusters; (2-3) In the constructed path graph, by calculating the node influence propagation coefficient and topological centrality index, combined with the semantic mutation detection algorithm of the generated text, we can identify expression change points with global structural influence and establish an intervention node priority evaluation system. The key node determination method is as follows: ,in is the weight coefficient, and KL divergence quantifies the distribution difference of adjacent semantic segments.

6. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 1 is characterized in that: In step (3), at the key points of expression turning marked in the generated trajectory analysis, a set of perturbation templates are used to adjust the tone and structural trend of the subsequent expression path through minimal language insertion. The injection intensity of the perturbation template is controlled by a gating function to achieve local path correction under low intervention conditions. The intensity control method of the perturbation template is as follows: ,in As the key node, is the node feature embedding, is the Sigmoid function, are learnable parameters.

7. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 6 is characterized in that: In step (3), the predefined perturbation template embedding vector is fused with the original generation path feature, and a sparse mask matrix is ​​used to constrain the intervention range. The generation path is guided to deviate in the expected direction while maintaining semantic coherence. The fusion modeling method of path correction is as follows: ,in For the The embedding vector of the semantic fragment, is a sparse mask matrix, is the perturbation template embedding, Represents element-wise multiplication.

8. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 7 is characterized in that: In step (3), by defining the bimodal alignment loss function, the semantic consistency of the generated path after correction and the deviation amplitude from the original path are constrained, and the L1 regularization term is used to maintain the sparse characteristics of the intervention operation to prevent the distortion of the model behavior caused by excessive intervention. The loss function of the intervention effect optimization method is as follows: ,in is the first The target embedding vector of the semantic fragment in the expected direction, is the sparsity coefficient, represents L1 regularization.

9. The low-intervention and high-efficiency control method for a large language model in a digital twin water conservancy system according to claim 1 is characterized in that: The specific steps of step (4) are as follows: (4-1) First, we construct a multi-dimensional quantitative index to evaluate the directional regulatory effect of perturbation insertion. We use cosine similarity and KL divergence to jointly measure the difference in semantic topic distribution before and after intervention. The semantic topic shift quantification method is as follows: ,in is the cosine similarity function, , Represents the first The embedding vector of the semantic fragment, Indicates the first semantic fragments, represent the distribution of topics before and after the intervention, respectively; (4-2) Based on the analysis of the fluctuation characteristics of the generated path after intervention, a dynamic stability evaluation function is introduced to analyze the fluctuation characteristics of the generated path. The path embedding covariance is calculated through a sliding window mechanism to measure the output stability of the model after intervention. The dynamic evaluation function of generated stability is as follows: ,in is the sliding window size, represents the covariance matrix trace of the path embedding, Represents the set of continuous semantic segment embedding vectors from time step tw to t in the generation path after intervention; (4-3) Combining the subject deviation degree and stability index, an exponential weighted comprehensive evaluation function is established to weightedly calculate the comprehensive intervention effect and achieve quantitative grading of the intervention effect. The comprehensive intervention effect scoring method is as follows: ,in is the normalization coefficient, which is used to balance the indicator weights.

10. A low-intervention and high-efficiency control system for a large language model in a digital twin water conservancy system, characterized in that: include: The non-guided prompt sampling module is used to construct a non-task-oriented prompt input set to ensure the naturalness and non-target dependency of the language model's generation behavior. The output obtained through multiple rounds of sampling is used as raw behavior data to analyze the model's natural expression tendencies under uncontrolled conditions. The generation trajectory modeling and inertia node identification module is used to perform semantic modeling and behavioral trajectory reconstruction on the original text generated by the model. Through sentence vector embedding, style embedding extraction, and sequence clustering analysis, it identifies stable and continuous expression paths in model generation. Furthermore, by combining token-level attention weight changes, syntactic structure mutations, and expression intensity changes, it marks structural nodes with potential behavioral redirection capabilities, i.e., areas of enhanced expression inertia. The perturbation strategy construction and insertion module calls the style fine-tuning morpheme library at the identified expression deflection node, selects structural semantic insertions, and performs minimal language-level intervention; The behavioral deviation evaluation module is used to quantify the changes in the model's expression before and after micro-perturbation insertion. The evaluation indicators cover multiple dimensions, including the degree of semantic deviation, style trajectory change, output theme migration, and structural consistency change. Through visualization and trajectory comparison analysis, it determines the magnitude and persistence of the deviation of the overall generated behavioral path caused by micro-intervention.

Citation Information

Patent Citations

  • High-expressive-force audio generation method based on natural language description text

    CN119274533A

  • Toxic thinking chain analysis and optimization method and device for large language model

    CN119476482A

  • Controllable text generation method, device and equipment

    CN120163134A