Multi-scene-oriented enterprise service large model training method and system, electronic equipment and storage medium
By constructing ternary task label vectors and semantic memory blocks, and combining frozen coding networks and Transformer models, the problems of mixed styles and missing control points in the generation of compliance documents in multiple scenarios of large models are solved, and automatic generation and traceability of compliance documents under multiple standards are realized.
Patent Information
- Application Number
- CN202511046069.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-11-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing large models cannot simultaneously understand industry-specific terminology, customer-specific processes, and the order of terms, resulting in mixed output styles, missing control points, difficulty in meeting the compliance requirements of multiple standards in multiple scenarios, and a lack of data traceability in the training process.
By constructing ternary task label vectors, semantic memory blocks, and control point graphs, and combining frozen coding networks and Transformer models, scenario-specific compliance documents are generated. Differential order regularization and coverage regularization are introduced to optimize language cross-entropy, enabling automatic completion of compliance documents in multiple scenarios.
It achieves unified semantic style and compliance across multiple scenarios, ensures document structural integrity and compliance, provides traceability and reproducibility from tagging to deployment, and solves the problem of multi-standard coverage of large models in enterprise security services.
Smart Images

Figure CN120952160A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of large model training technology, and in particular relates to methods, systems, electronic devices and storage media for training large enterprise service models for multiple scenarios. Background Technology
[0002] As information security compliance requirements are comprehensively deepened in key industries such as government affairs, power grids, communications, and manufacturing, enterprise service scenarios are simultaneously carrying multiple parallel standards such as ISO 27001, ISO 20000, CMMI, and graded protection, and giving rise to high-frequency tasks such as penetration testing, remediation consulting, and emergency response.
[0003] Enterprises hope to reduce the cost of manually writing compliance documents by leveraging large models. However, general-purpose language models often only provide a superficial ability to "coherently present content," failing to understand industry-specific terminology, client-specific processes, and the sequential dependencies of clauses. This leads to inconsistent output styles, missing control points, and even reversed order. When the same project needs to meet two or more sets of standards simultaneously within a short period, existing models lack a mechanism to simultaneously model "mandatory clauses" and "scenario semantics." This forces manual review and rewriting, resulting in both efficiency and compliance risks. Furthermore, security reports often contain sensitive asset information, requiring data traceability and adherence to access boundaries during training, further amplifying the contradiction between "multi-scenario semantic generalization" and "structural compliance consistency."
[0004] To address these issues, we propose a training method, system, electronic device, and storage medium for large-scale enterprise service models across multiple scenarios. Summary of the Invention
[0005] The purpose of this invention is to solve the problems in the prior art where control points are missing and mandatory terms cannot be modeled simultaneously, and to propose a training method, system, electronic device and storage medium for enterprise service large models for multiple scenarios.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] Training methods for large-scale enterprise service models across multiple scenarios include:
[0008] S1: Input the original task record; construct a ternary task label using the original task record; map the ternary task label to a unified vector space to obtain a task label vector;
[0009] S2: Input the original task record into the text encoding network to obtain sentence vectors; divide the sentence vectors into non-overlapping sets according to the ternary task labels, and calculate the weighted centroids to obtain semantic memory blocks;
[0010] S3: Input a global graph and a set of mandatory clauses, the set of mandatory clauses being labeled by regulatory documents; cut a subgraph from the global graph based on the industry codes in the original task record; encode each control point description of the subgraph into a subgraph vector; calculate the semantic similarity between the subgraph vector and the semantic memory block; establish an objective function to obtain the corresponding control point order list by minimizing the semantic similarity;
[0011] S4: Input the target text corresponding to manual review; subdivide and embed the original task record to obtain a first path, where each first path belongs to the set of mandatory clauses; call the freeze-encoding network to obtain a first path vector for each control point in the first path; take the mean value of the first path vector to obtain a structural summary; concatenate the first path vectors from different sources in the original task record along the channel dimension to obtain a merged tensor; combine the merged tensor and the target text to form a training sample pair;
[0012] S5: Construct a large model; train the large model with the training samples to obtain a converged model;
[0013] S6: Retrieve semantic memory blocks and control paths by task tags, construct inference merging tensors, call converged models to generate drafts, perform structure coverage checks and automatically rewrite until the document meets the compliance threshold.
[0014] Preferably, the original task record includes industry code, customer category code, and task type code.
[0015] Preferably, the text encoding network is a Transformer encoding network with frozen parameters that has been pre-trained on an internal secure corpus for language modeling.
[0016] Preferably, the semantic memory block introduces an inverse frequency weight for the label, which is derived from the frequency of samples in the same bucket; the semantic memory block also introduces a regularization objective, which is calculated by using the average variance embedded in the non-overlapping set and the cosine similarity between memory blocks, and the regularization objective is to keep different scene memories distinguishable and keep them compact within the same scene.
[0017] Preferably, the calculation process for the control point order list in step S3 is as follows:
[0018] The first path is initialized as the node located in the set of mandatory terms in the topological order;
[0019] Maintain a candidate set where all predecessors of a node are already on the second path;
[0020] Calculate the loss after inclusion for each node in the set of mandatory clauses;
[0021] Select the node with the minimum loss and add it to the third path, then update the candidate set;
[0022] Repeat the above steps until the candidate set is empty; output the control point order list.
[0023] Preferably, the architecture of the large model adopts a 24-layer encoder-decoder Transformer. The encoder accepts the merged tensor; the decoder generates the target text through autoregression and produces the hidden vector at the CLS position. The large model introduces order regularization and coverage regularization. The order regularization adopts cosine consistent averaging; the coverage regularization sets a set of mandatory clauses and imposes a penalty on missing clauses.
[0024] Preferably, in step S6, after the converged model inference is called to generate a draft, the control point order list is extracted from the draft through regular expressions and key phrase mapping, and the coverage is calculated.
[0025] A large-scale enterprise service model training system for multiple scenarios, including:
[0026] A tag extraction module is configured to input raw task records; construct ternary task tags from the raw task records; and map the ternary task tags to a unified vector space to obtain task tag vectors.
[0027] A memory block construction module is configured to input the original task record into a text encoding network to map it into sentence vectors; divide the sentence vectors into non-overlapping sets according to the ternary task labels, and calculate weighted centroids to obtain semantic memory blocks;
[0028] The path extraction module is configured to take into input a global graph and a set of mandatory clauses, the set of mandatory clauses being labeled by regulatory documents; to cut a subgraph from the global graph based on the industry codes in the original task record; to encode the description of each control point in the subgraph as a subgraph vector; to calculate the semantic similarity between the subgraph vector and the semantic memory block; and to establish an objective function to obtain the corresponding control point order list by minimizing the semantic similarity.
[0029] The training sample construction module is configured to input the target text corresponding to human review; subdivide and embed the original task record to obtain a first path, where each first path belongs to the set of mandatory clauses; call the freeze-encoding network to obtain a first path vector for each control point in the first path; take the mean value of the first path vector to obtain a structural summary; concatenate the first path vectors from different sources in the original task record along the channel dimension to obtain a merged tensor; and combine the merged tensor and the target text to form a training sample pair.
[0030] The model training module is configured to construct a large model; the training samples are used to train the input large model to obtain a converged model.
[0031] The deployment application module is configured to retrieve semantic memory blocks and control paths by task tags, construct inference merging tensors, call converged models to generate drafts, perform structure coverage checks and automatically complete the documentation until the document meets the compliance threshold.
[0032] An electronic device is characterized by comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method described above.
[0033] A computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the method described above.
[0034] In summary, the technical effects and advantages of this invention are as follows: This solution solves the language style drift problem by constructing a unified task context and then compressing historical text into searchable scene vectors through semantic memory blocks; subsequently, ISO, CMMI, and information security standards are decomposed into searchable control point maps, and the minimum compliance path is extracted under the dual constraints of semantic relevance and mandatory clauses, making the structural input both concise and complete; during the training phase, the framework concatenates the original text, semantic memory vectors, and length-adaptive structural vectors into a multi-channel tensor, and introduces differential order regularization and coverage regularization to jointly optimize language cross-entropy, allowing the model's latent space to explicitly reproduce the control path order and mandatory clauses simultaneously. During inference and deployment, the system retrieves memory blocks and paths by label in real time, generates drafts, automatically verifies them using the coverage formula, and triggers rewriting; from labeling to deployment, each step is traceable and reproducible, solving the problem of difficulty in unifying semantic style, clause order, and cross-standard coverage in enterprise security services using general large models. Attached Figure Description
[0035] Figure 1 This is a flowchart of the steps in this invention;
[0036] Figure 2 This is a schematic diagram of the system structure in this invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] like Figure 1 As shown, the training method for large enterprise service models across multiple scenarios includes:
[0039] S1: Input the original task record; construct a ternary task label using the original task record; map the ternary task label to a unified vector space to obtain a task label vector;
[0040] S2: Input the original task record into the text encoding network to obtain sentence vectors; divide the sentence vectors into non-overlapping sets according to the ternary task labels, and calculate the weighted centroids to obtain semantic memory blocks;
[0041] S3: Input a global graph and a set of mandatory clauses, the set of mandatory clauses being labeled by regulatory documents; cut a subgraph from the global graph based on the industry codes in the original task record; encode each control point description of the subgraph into a subgraph vector; calculate the semantic similarity between the subgraph vector and the semantic memory block; establish an objective function to obtain the corresponding control point order list by minimizing the semantic similarity;
[0042] S4: Input the target text corresponding to manual review; subdivide and embed the original task record to obtain a first path, where each first path belongs to the mandatory clause set; call the freeze-encoding network to obtain a first path vector for each control point in the first path; take the mean value of the first path vector to obtain a structural summary; concatenate the first path vectors from different sources in the original task record along the channel dimension to obtain a merged tensor; combine the merged tensor and the target text to form a training sample pair;
[0043] S5: Construct a large model; train the large model with the training samples to obtain a converged model;
[0044] S6: Retrieve semantic memory blocks and control paths by task tags, construct inference merging tensors, call converged models to generate drafts, perform structure coverage checks and automatically rewrite until the document meets the compliance threshold.
[0045] The specific execution steps are as follows:
[0046] Step 1: Construct an enterprise service task tagging system:
[0047] This step involves calling the enterprise's existing project management system, customer master data system, and service task scheduling system interfaces to construct a three-element task tag for each service task sample. i And vectorize it into v i The tag contains the industry code h. i Customer category code c i and task type encodings i This is to support subsequent semantic modeling and standard path control.
[0048] enter:
[0049] The interface fields are industry_code (e.g., PWR for the power industry), customer_type (e.g., GOV for government agencies), and task_category (e.g., AUDIT for certification / consultation tasks). All three fields are strings, generated from the task record x. i The project ID and customer ID can be obtained by triggering an API call.
[0050] First, the system records task x i Call the three interfaces in sequence to obtain the industry code h i Customer category code c i and task type encodings i The three codes can be directly concatenated to form the task tag:
[0051] t i =Concat(f h (x i ), f c (x i ), f s (x i ))
[0052] Where f h f c f s These are the API call functions representing the industry, customer category, and task type fields, respectively. The resulting tag t i For example, labels such as ("PWR", "GOV", "AUDIT") fully characterize the scenario to which the task belongs. Subsequently, the system maps these discrete labels to a unified vector space. The lookup table encoding function φ(·) converts the ternary labels into sparse vectors of dimension d using one-hot encoding or a predefined embedding method.
[0053] v i =φ(t) i )
[0054] The vector dimension d equals the sum of all industries, customer categories, and task types; for example labels, if d = 12, then the mapping result v i Only the positions corresponding to PWR, GOV, and AUDIT are set to 1, and the rest to 0. Vectorization ensures that each scene has a fixed and recognizable input channel, while avoiding the problem of inconsistent physical dimensions. Throughout the process, t i Used for subsequent semantic clustering grouping, while v i It can be directly used as the scene control vector for model training, enabling precise injection of task context.
[0055] Output:
[0056] t i : Tripartite task tag;
[0057] v i Task label vector. Both will be used in the semantic memory block construction in step 2 and the control path mapping in step 3.
[0058] Step 2: Construct task semantic memory blocks:
[0059] Having the label vector v i With tag triplet t i (Based on the output of Step 1), this step constructs "semantic memory blocks" to address the multi-industry, multi-customer, and multi-task characteristics of enterprise security texts. The core idea is: to use a frozen text encoding network ψ to encode each task text x i Mapped to embedded e i Subsequently, the weighted centroid m is calculated within the same label bucket. j And through a label-aware regularization target L mem This forces memories from different scenarios to remain sufficiently distinct, while memories within the same scenario remain tightly clustered. Memory block m j The inputs from steps three and four will be used as explicit inputs during training to ensure that the model can quickly load the scene-specific language style and safety context simply by reading the corresponding labels during inference.
[0060] First, set the task text x i The sentence vectors are obtained by feeding a 12-layer Transformer encoding network ψ (pre-trained on an internal secure corpus) with frozen parameters. Subsequently, based on the label t i Divide all embeddings into a non-overlapping set C j To offset the impact of imbalanced sample distribution across different scenarios, an inverse frequency weighting of the label is introduced. (|C j (where | is the sample size for label j), calculate the weighted centroid as a memory block:
[0061]
[0062] Where m j It is an industry-customer-task combination. i Corresponding scene semantic center; w i This is derived from the frequency of samples within the same bucket, addressing the practical problem of high-frequency scenes "crowding out" the embedding space. Next, to ensure sufficient separation between scene memories and maintain compactness within each scene, a regularization objective is defined:
[0063]
[0064] In the formula σ intra (C j ) represents set C j The embedded mean variance; cos(·,·) is the cosine similarity; λ is an adjustable hyperparameter used to balance "intra-bucket aggregation" and "inter-bucket separation". Regularization is solved only when building memory blocks offline and does not participate in subsequent model parameter updates, thus not breaking the training loop and providing a reproducible optimization benchmark.
[0065] Output:
[0066] M = {m j}: A collection of semantic memory blocks for all scenarios;
[0067] g(t i )=m j : A one-to-one retrieval function from tags to memory blocks; subsequent steps will call g(·) to inject the corresponding m. j As a semantic adjustment vector for the model.
[0068] By using weighted centroids and label-aware regularization, this step not only reduces the variance of text distribution within the same scenario but also explicitly widens the semantic distance across scenarios, giving memory blocks high discriminative power and robustness. Considering the reality of enterprise security scenarios with "significant industry differences and unique customer language systems," the weight design and dual regularization jointly address the memory distortion problem caused by uneven sample sizes, providing a directly searchable, label-activated language style foundation for large-scale multi-scenario models.
[0069] Step 3: Construct a compliance standard control map and extract task paths:
[0070] Based on the semantic memory block m obtained in step two j =g(t) i This step transforms the multi-standard control point map G into a sub-map that conforms to the task scenario. And calculate the minimum structural path p i This is for use in the next training step. Path extraction takes into account three points: covering mandatory clauses, conforming to the semantics of the scene, and maintaining a concise structure.
[0071] First, according to the industry field h i Subgraphs are obtained by cropping from the global graph G. Cutting rules:
[0072] If h i = "PWR, then only the ISO 27019 and the network / control layer related nodes of the Information Security Protection Standard 2.0 will be retained;
[0073] If h i =“GOV, while retaining the information system classification protection clause.
[0074] Graph databases use tag filtering statements to perform cropping and output node sets. and edge set
[0075] Then, a freeze-encoding network ψ is used to encode the description of each control point in the subgraph as a vector u. k =ψ(c k Calculate semantic similarity:
[0076] r k =cos(m j u k )
[0077] r k The larger the value, the more consistent the control point language is with the scene semantics.
[0078] In the collection of mandatory clauses (As indicated in the regulatory document) must be selected, using the objective function:
[0079]
[0080] Minimize path loss: (1-r) k ) Rewards for semantic fit; 1 {·} To reiterate, the node is forced, and β controls its weight; |p i | represents the path length, and γ suppresses redundancy.
[0081] Calculation process:
[0082] Initialize p i For topological order, located in Nodes;
[0083] Maintain candidate set All predecessors of the node are already in p i ;
[0084] right Each node c k Calculate the loss after adding
[0085] Select Δ k Put the smallest node into p i ,renew
[0086] Loop until Algorithm complexity
[0087] The entire iteration can be completed in 100ms with the support of the graph database's native topological index and vector index, and the recorded operation sequence is the minimum compliant path p. i .
[0088] Output:
[0089] According to t i The cropped industry sub-charts are used for audit visualization and backtracking;
[0090] p i By minimizing The resulting list of control points will be combined with text samples in step four to form the structural constraints of the training input.
[0091] Step 4: Construct multi-channel input training samples:
[0092] After completing the semantic memory construction and minimum compliance path selection, this step is responsible for injecting two auxiliary information streams into the training samples to generate a multi-channel input tensor z. i The key design points are: to preserve the contextual order of the original text, to introduce scene memory vectors to fix the language style, and to use a length-adaptive scaling factor to ensure that the structure vectors can both constrain the model and not dominate the gradient due to differences in the number of clauses.
[0093] enter:
[0094] m j For step two, the mapping g(t) i The retrieved semantic memory block vector (768 dimensions, originating from the same frozen encoder) represents a typical expression of the three-dimensional scenario of industry-customer-task.
[0095] p i For step three Minimize the obtained control point order list;
[0096] x i This is the original task text of the sample, sourced from the enterprise project library;
[0097] y i A unique supervisory label is assigned to the target text corresponding to human review.
[0098] First, the fixed vocabulary will x i Subtotaling and embedding yields Where L≤512, d e =256. This ensures that different sample lengths are aligned along the same tensor dimension. Then, for each control point c in the path... k Call the frozen coding network ψ to obtain the vector u k =ψ(c k ); Taking the average value yields the structural summary. Its dimension is the same as m j To maintain consistency and facilitate stitching, and to avoid long paths "suppressing" short paths, a differentiable scaling factor is introduced:
[0099]
[0100] Make |p i | Corresponding to λ from 1 to 30 i It monotonically decreases between 1.0 and approximately 0.3. The structural summary is then scaled to obtain... The longer the path length, the smaller the scaling, ensuring that the differences in the number of guarantee terms are automatically balanced without manual parameter tuning.
[0101] Finally, concatenate the three tensors along the channel dimension: first concatenate m... j and Copy L times to ensure consistency with ρ(x) i The time steps are aligned, and then depth stitching is performed to form the result.
[0102]
[0103] Size of this tensor Three parts of information are fed into the model encoder in parallel at each time step: word vector streams handle context, scene memory locks in language style, structure vectors provide control point cues, and scaling factors suppress gradient bias caused by path length.
[0104] Output:
[0105] (z i y i ): Complete training sample pairs. i It includes three input channels: text, semantic memory, and structural cues; y i Output the approved compliance text.
[0106] Step 5: Training a large model based on structural consistency and semantic supervision:
[0107] The previous steps have already generated a three-channel input z. i (word sequence, semantic memory m) j Scaling structure vectors ) and target text y i .
[0108] This step utilizes these samples to train a large model M, and specifically designs two auxiliary losses: "structural order regularization" and "control point coverage regularization," to ensure that the model not only conforms to the literal content of y. i It also realistically reproduces the control path p in the hidden space. i The order and completeness.
[0109] enter:
[0110] z i Step four: Constructing a three-channel tensor;
[0111] y i The target text after manual review. Both are used in the loss calculation, and no other sources are introduced.
[0112] The model architecture uses a 24-layer Transformer encoder-decoder, with the encoder receiving z... i Decoding end autoregressive generation And generate the hidden vector h at the CLS position. CLS First, through the linear head W s put h CLS Projection as a structure vector
[0113] To measure "correct order", path p i Mapped to the difference vector d between adjacent control points i (k)=u k+1 -u k (u k =ψ(c k Similarly, take the model end difference. ( (Hidden states truncated at each critical term token encountered in the decoding layer). Sequence regularization uses cosine consistency averaging.
[0114]
[0115] Covering regular expressions set the required set of control points Penalties are imposed for missing clauses, denoted as L. cov (Indicator function); Final total loss:
[0116] L = L 1m +αL order +β c L cov
[0117] Where L 1m For linguistic cross-entropy; α, β c Separately control the order and coverage contribution (empirical values α = 0.2, β). c =0.1). All regularization only operates on the hidden vectors to avoid extraneous variables. The optimizer is AdamW with a learning rate of 2e-5. During cold start, the first 6 layers are frozen to stabilize the structure gradients. After 10k steps, all layers are unfrozen and trained until convergence.
[0118] Output:
[0119] M final The large model parameter file after convergence;
[0120] Validation report: Records BLEU, 1-L order (Order consistency rate), 1-L covThe three metrics (coverage) are used for subsequent deployment evaluation.
[0121] Step Six: Automated Content Generation and Deployment for Enterprise Tasks
[0122] This step is responsible for converting the converged model M output from step five. final Embedded into enterprise security service platforms, it enables "one-click generation" of compliance reports or remediation plans. Core actions include: real-time retrieval of semantic memory blocks and control paths by task tags, construction of inference tensors, and invocation of M... final Generate a draft, perform structure coverage checks, and automatically complete the documentation until it meets compliance thresholds.
[0123] When an engineer creates a task on the platform, the system reads the tag fields (such as industry_code=PWR, customer_type=GOV, task_category=AUDIT), and concatenates them to obtain the task name. live Calling the mapping g(t) returns the semantic memory block m. live Simultaneously, the control path p corresponding to this tag is obtained by querying the path library. live The platform will use the original paragraph x provided by the user. live Perform subtotalization and embedding consistent with the training phase, then copy m. live With the length-scaled structure vector (Same as the formula generation during the training phase) At each time step, the inference tensor z is obtained by concatenating the three paths. live .
[0124] Call M final Deducing the draft Then, the system extracts a set of control points from the draft using regular expressions and key phrase mapping. Calculate coverage:
[0125]
[0126] If C < 1.9, the system automatically generates a missing control point suggestion, such as "Please add clause 5.25 Access Control Log Retention," and feeds it back into the model along with the original tensor; usually, one round of imputation is sufficient to reach the threshold. Final Document The coverage rate C is written to the document management library and pushed to the security auditor.
[0127] The technical solutions described in the above embodiments of this application have at least the following technical effects or advantages: This solution solves the language style drift problem by constructing a unified task context and then compressing historical text into searchable scene vectors through semantic memory blocks; subsequently, ISO, CMMI, and information security standards are decomposed into searchable control point maps, and the minimum compliance path is extracted under the dual constraints of semantic relevance and mandatory clauses, making the structural input both concise and complete; during the training phase, the framework concatenates the original text, semantic memory vectors, and length-adaptive structural vectors into a multi-channel tensor, and introduces differential order regularization and coverage regularization to jointly optimize language cross-entropy, allowing the model's latent space to explicitly reproduce the control path order and mandatory clauses simultaneously. During inference and deployment, the system retrieves memory blocks and paths by tags in real time, generates drafts, automatically verifies them using the coverage formula, and triggers rewriting; each step from tagging to deployment is traceable and reproducible, solving the problem of difficulty in unifying semantic style, clause order, and cross-standard coverage in enterprise security services using general large models.
[0128] This application also provides a large-scale enterprise service model training system for multiple scenarios, such as... Figure 2 As shown, it includes:
[0129] A tag extraction module is configured to input raw task records; construct ternary task tags from the raw task records; and map the ternary task tags to a unified vector space to obtain task tag vectors.
[0130] A memory block construction module is configured to input the original task record into a text encoding network to map it into sentence vectors; divide the sentence vectors into non-overlapping sets according to the ternary task labels, and calculate weighted centroids to obtain semantic memory blocks;
[0131] The path extraction module is configured to take into input a global graph and a set of mandatory clauses, the set of mandatory clauses being labeled by regulatory documents; to cut a subgraph from the global graph based on the industry codes in the original task record; to encode the description of each control point in the subgraph as a subgraph vector; to calculate the semantic similarity between the subgraph vector and the semantic memory block; and to establish an objective function to obtain the corresponding control point order list by minimizing the semantic similarity.
[0132] The training sample construction module is configured to input the target text corresponding to human review; subdivide and embed the original task record to obtain a first path, where each first path belongs to the set of mandatory clauses; call the freeze-encoding network to obtain a first path vector for each control point in the first path; take the mean value of the first path vector to obtain a structural summary; concatenate the first path vectors from different sources in the original task record along the channel dimension to obtain a merged tensor; and combine the merged tensor and the target text to form a training sample pair.
[0133] The model training module is configured to construct a large model; the training samples are used to train the input large model to obtain a converged model.
[0134] The deployment application module is configured to retrieve semantic memory blocks and control paths by task tags, construct inference merging tensors, call converged models to generate drafts, perform structure coverage checks and automatically complete the documentation until the document meets the compliance threshold.
[0135] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for training large-scale enterprise service models for multiple scenarios, characterized in that, include: S1: Input the original task record; construct a ternary task tag based on the original task record; The ternary task labels are mapped to a unified vector space to obtain the task label vector; S2: Input the original task record into the text encoding network to obtain sentence vectors; divide the sentence vectors into non-overlapping sets according to the ternary task labels, and calculate the weighted centroids to obtain semantic memory blocks; S3: Input a global graph and a set of mandatory clauses, the set of mandatory clauses being labeled by regulatory documents; cut a subgraph from the global graph based on the industry codes in the original task record; encode each control point description of the subgraph into a subgraph vector; calculate the semantic similarity between the subgraph vector and the semantic memory block; establish an objective function to obtain the corresponding control point order list by minimizing the semantic similarity; S4: Input the target text corresponding to manual review; subdivide and embed the original task record to obtain a first path, where each first path belongs to the set of mandatory clauses; call the freeze-encoding network to obtain a first path vector for each control point in the first path; take the mean value of the first path vector to obtain a structural summary; concatenate the first path vectors from different sources in the original task record along the channel dimension to obtain a merged tensor; combine the merged tensor and the target text to form a training sample pair; S5: Construct a large model; train the large model with the training samples to obtain a converged model; S6: Retrieve semantic memory blocks and control paths by task tags, construct inference merging tensors, call converged models to generate drafts, perform structure coverage checks and automatically rewrite until the document meets the compliance threshold.
2. The method for training a large enterprise service model for multiple scenarios according to claim 1, characterized in that, The original task record includes industry code, customer category code, and task type code.
3. The method for training a large enterprise service model for multiple scenarios according to claim 1, characterized in that, The text encoding network is a Transformer encoding network with frozen parameters that has been pre-trained on an internal secure corpus for language modeling.
4. The method for training a large enterprise service model for multiple scenarios according to claim 1, characterized in that, The semantic memory block introduces an inverse label frequency weight, which is derived from the frequency of samples in the same bucket. The semantic memory block also introduces a regularization objective, which is calculated by the average variance embedded in the non-overlapping set and the cosine similarity between memory blocks. The regularization objective is to keep different scene memories distinguishable and keep them compact within the same scene.
5. The method for training a large enterprise service model for multiple scenarios according to claim 1, characterized in that, The calculation process for the control point order list in step S3 is as follows: The first path is initialized as the node located in the set of mandatory terms in the topological order; Maintain a candidate set where all predecessors of a node are already on the second path; Calculate the loss after inclusion for each node in the set of mandatory clauses; Select the node with the minimum loss and add it to the third path, then update the candidate set; Repeat the above steps until the candidate set is empty; output the control point order list.
6. The method for training a large enterprise service model for multiple scenarios according to claim 1, characterized in that, The architecture of the large model adopts a 24-layer encoder-decoder Transformer. The encoder accepts the merged tensor; the decoder generates the target text through autoregression and produces the hidden vector at the CLS position. The large model introduces order regularization and coverage regularization. The order regularization adopts cosine consistent averaging; the coverage regularization sets a set of mandatory clauses and imposes a penalty on missing clauses.
7. The method for training a large enterprise service model for multiple scenarios according to claim 1, characterized in that, In step S6, after the converged model inference is called to generate a draft, the control point order list is extracted from the draft through regularization and key phrase mapping, and the coverage is calculated. When the coverage rate is lower than a preset threshold, a missing control point prompt is generated, and the tensor, along with the inference merged tensor, is fed back into the model.
8. A large-scale enterprise service model training system for multiple scenarios, characterized in that: include: A tag extraction module, which is configured to input the original task record; A ternary task tag is constructed using the original task records; The ternary task labels are mapped to a unified vector space to obtain the task label vector; A memory block construction module is configured to input the original task record into a text encoding network to map it into sentence vectors; divide the sentence vectors into non-overlapping sets according to the ternary task labels, and calculate weighted centroids to obtain semantic memory blocks; The path extraction module is configured to take into input a global graph and a set of mandatory clauses, the set of mandatory clauses being labeled by regulatory documents; to cut a subgraph from the global graph based on the industry codes in the original task record; to encode the description of each control point in the subgraph as a subgraph vector; to calculate the semantic similarity between the subgraph vector and the semantic memory block; and to establish an objective function to obtain the corresponding control point order list by minimizing the semantic similarity. The training sample construction module is configured to input the target text corresponding to human review; subdivide and embed the original task record to obtain a first path, where each first path belongs to the set of mandatory clauses; call the freeze-encoding network to obtain a first path vector for each control point in the first path; take the mean value of the first path vector to obtain a structural summary; concatenate the first path vectors from different sources in the original task record along the channel dimension to obtain a merged tensor; and combine the merged tensor and the target text to form a training sample pair. The model training module is configured to construct a large model; the training samples are used to train the input large model to obtain a converged model. The deployment application module is configured to retrieve semantic memory blocks and control paths by task tags, construct inference merging tensors, call converged models to generate drafts, perform structure coverage checks and automatically complete the documentation until the document meets the compliance threshold.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.