Text processing model training method and device, storage medium and electronic equipment

By constructing a descriptive lexical matrix and adjusting model parameters, the text processing model is ensured to generate text in the order of event description, thus solving the problem of low accuracy in existing models and improving the accuracy of the model in understanding and generating event sequences.

CN121542735APending Publication Date: 2026-02-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511643033.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing text processing models rely too heavily on word frequency associations during training and lack the ability to learn and understand the order of events, resulting in low accuracy of the generated text processing models.

Method used

By acquiring event description information from sample text, a descriptive lexicon matrix is ​​constructed to determine the generation probability of candidate descriptive lexicon subsequences. Based on this, the model parameters are adjusted to ensure that the text processing model can generate text in the order of reference event descriptions.

Benefits of technology

It improves the accuracy and coherence of the text processing model in understanding the sequence of events, and enhances the accuracy of the model when generating text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542735A_ABST
    Figure CN121542735A_ABST
Patent Text Reader

Abstract

The invention discloses a text processing model training method and device, a storage medium and electronic equipment. The method comprises the steps that a sample text is obtained, and the sample text comprises event description information of each event in a group of events; in the process of training the initialized text processing model by using the sample text, determining a description lexical element matrix output by the text processing model, the i-th row and j-th column element in the description lexical element matrix being the probability that the i-th lexical element in a description lexical element sequence used for describing the sample text is the j-th element in a preset word list; based on the description lexical element matrix, the generation probability of candidate description lexical element subsequences is determined, and the candidate description lexical element subsequences are arranged according to the reference event description sequence of the group of events; and adjusting model parameters in the text processing model based on the generation probability of the candidate description lexical element subsequences. The technical problem that the text processing model obtained through training is inaccurate is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for training a text processing model, a storage medium, and an electronic device. Background Technology

[0002] Text processing models are based on deep learning and can be used to process information involving time series or logical order, such as reconstructing event timelines, generating step-by-step instructions, and analyzing project management processes.

[0003] Currently, text processing models are typically trained by guiding the model to learn statistical associations between words based on word frequency by predicting the next word or missing word in a sequence, thereby establishing an understanding of language structure.

[0004] However, the training methods provided in related technologies suffer from the technical problem that the trained text processing models have low accuracy because the models rely too much on word frequency associations when learning sequence information and lack the learning and understanding of the order of generated events.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This application provides a method and apparatus for training a text processing model, a storage medium, and an electronic device to at least solve the technical problem of low accuracy in the text processing model generated during training.

[0007] According to one aspect of the embodiments of this application, a method for training a text processing model is provided, comprising: acquiring sample text, wherein the sample text includes event description information for each event in a set of events; during the process of training an initialized text processing model using the sample text, determining a descriptive lexicon matrix output by the text processing model, wherein the element in the i-th row and j-th column of the descriptive lexicon matrix is ​​the probability that the i-th lexicon in the descriptive lexicon sequence used to describe the sample text is the j-th element in a preset vocabulary, and i and j are positive integers; determining the generation probability of candidate descriptive lexicon subsequences based on the descriptive lexicon matrix, wherein the candidate descriptive lexicon subsequences are arranged according to the reference event description order of a set of events, the reference event description order being determined based on the tag event description text matching the sample text; and adjusting the model parameters in the text processing model based on the generation probability of the candidate descriptive lexicon subsequences.

[0008] According to another aspect of the embodiments of this application, a training apparatus for a text processing model is also provided, comprising: an acquisition unit, configured to acquire sample text, wherein the sample text includes event description information for each event in a set of events; a first determination unit, configured to determine a descriptive lexicon matrix output by the text processing model during the process of training an initialized text processing model using the sample text, wherein the element in the i-th row and j-th column of the descriptive lexicon matrix is ​​the probability that the i-th lexicon in the descriptive lexicon sequence used to describe the sample text is the j-th element in a preset vocabulary, and i and j are positive integers; a second determination unit, configured to determine the generation probability of candidate descriptive lexicon subsequences based on the descriptive lexicon matrix, wherein the candidate descriptive lexicon subsequences are arranged according to the reference event description order of a set of events, and the reference event description order is determined based on the tag event description text that matches the sample text; and an adjustment unit, configured to adjust the model parameters in the text processing model based on the generation probability of the candidate descriptive lexicon subsequences.

[0009] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the training method of the above-described text processing model at runtime.

[0010] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a training method for the text processing model as described above.

[0011] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the training method of the text processing model described above through the computer program.

[0012] In this embodiment, sample text is obtained, which includes event description information for each event in a set of events. During the training of an initialized text processing model using the sample text, a descriptive lexicon matrix output by the text processing model is determined. The element in the i-th row and j-th column of the descriptive lexicon matrix represents the probability that the i-th lexicon in the descriptive lexicon sequence describing the sample text is the j-th element in a preset vocabulary, where i and j are positive integers. Based on the descriptive lexicon matrix, the generation probability of candidate descriptive lexicon subsequences is determined. These candidate descriptive lexicon subsequences are arranged according to the reference event description order of a set of events, which is determined based on the tag event description text matching the sample text. Based on the generation probability of the candidate descriptive lexicon subsequences, the model parameters in the text processing model are adjusted. By employing this embodiment, the technical effect of improving the accuracy of the trained text processing model is achieved, solving the technical problem of low accuracy in the trained text processing model. Attached Figure Description

[0013] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0014] Figure 1 This is a schematic diagram of an application environment for an optional text processing model training method according to an embodiment of this application;

[0015] Figure 2 This is a flowchart of an optional text processing model training method according to an embodiment of this application;

[0016] Figure 3 This is a schematic diagram of an optional text processing model training method according to an embodiment of this application;

[0017] Figure 4 This is a schematic diagram of another optional text processing model training method according to an embodiment of this application;

[0018] Figure 5 This is a schematic diagram of another optional text processing model training method according to an embodiment of this application;

[0019] Figure 6 This is a flowchart of another optional text processing model training method according to an embodiment of this application;

[0020] Figure 7 This is a schematic diagram of another optional text processing model training method according to an embodiment of this application;

[0021] Figure 8This is a flowchart of another optional text processing model training method according to an embodiment of this application;

[0022] Figure 9 This is a schematic diagram of another optional text processing model training method according to an embodiment of this application;

[0023] Figure 10 This is a schematic diagram of the structure of a training device for an optional text processing model according to an embodiment of this application;

[0024] Figure 11 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] Optionally, the above-mentioned text processing model training method can be applied to, but is not limited to, training scenarios for text processing models in time-series task processing. For example, in the field of project management, it can be used to train processing models for analyzing multi-step activities; in the field of system operation and maintenance, it can be used to train processing models for analyzing system operation logs; in the field of social media analysis, it can be used to train processing models for sorting out event narratives in user posts and identifying key development paths of events, etc. This embodiment does not limit this.

[0028] For example, assuming the above text processing model training method is applied to the project management field, specifically for training a multi-step activity analysis processing model, the training method can be illustrated using, but is not limited to, the following examples:

[0029] S1, Obtain sample text (project progress report):

[0030] Obtaining sample text is equivalent to extracting descriptive paragraphs containing multi-step activities from project progress documents. These descriptions provide detailed information about each phase of the project (such as requirements analysis, design, coding, testing, etc.) and can be viewed as event description information for each event in a set of events.

[0031] S2 determines the descriptive lexical matrix (project activity dictionary representation):

[0032] During the training of the initialized text processing model (such as Qwen2.5-32B) using the aforementioned sample text, it is necessary to determine the descriptive lexicon matrix output by the model. In this matrix, each row represents a lexicon position in the descriptive lexicon sequence of the project sample text, and each column corresponds to a lexicon in a pre-defined vocabulary (a vocabulary specifically for project activities). The element in the i-th row and j-th column represents the probability that the i-th lexicon in the descriptive lexicon sequence of the sample text is the j-th element in the pre-defined vocabulary (project activity dictionary) (such as "requirements analysis", "coding", or "testing"). The construction of this matrix helps the model understand the language patterns and vocabulary usage frequencies in the description of project activities.

[0033] S3, Determine the generation probability of candidate descriptor subsequences (project activity ranking prediction):

[0034] Based on the descriptive lexicon matrix, the generation probability of candidate descriptive lexicon subsequences is determined. These subsequences are key event information generated according to the predicted order of events in project activities (referencing the event description order). They are validated against tagged event description text (i.e., standard process documents for project activities) matched with sample text to determine if the key event information is arranged in the correct order. For example, in one sample, the model might predict the generation probability of subsequences such as "requirements analysis," "design," "coding," and "testing" to identify and correct order errors in activity descriptions.

[0035] S4, Adjust model parameters (optimize project activity understanding and prediction):

[0036] Based on the generation probability of candidate descriptor lemma subsequences, the model parameters in the text processing model are adjusted. This step aims to optimize the model's ability to understand and predict project activity descriptions through backpropagation, ensuring that the model can more accurately identify and predict the correct sequence of project activities.

[0037] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0038] For example, assuming the above text processing model training method is applied to the above system operation and maintenance field, specifically in the training scenario of a processing model for analyzing system operation logs, the training method of the above text processing model can be illustrated through examples, but not limited to the following:

[0039] S1, Obtain sample text (post content):

[0040] Sample texts were collected from social media platforms, containing users' descriptions and discussions of specific events. For example, assuming users were following the development of an event, the sample texts would consist of posts made by users before and after the event, including descriptions of the initial situation, subsequent developments, and responses.

[0041] S2, Determine the descriptive lexical matrix (lexical representation of event description):

[0042] During training, an initial text processing model, potentially a deep learning model, is trained using sample text. The model learns the distribution and associations of event description words from the sample text, outputting a descriptive lexical matrix. In the matrix, each row corresponds to a word position in the post, and each column corresponds to a word item in a pre-defined vocabulary. This vocabulary includes common event description words in the social media domain, such as "start," "progress," "end," and "reaction." Matrix elements represent the probability that the i-th lexical in the sample text's descriptive lexical sequence is the j-th word item in the pre-defined vocabulary, helping the model understand the context of event descriptions and word selection patterns.

[0043] S3, Determine the generation probability of candidate descriptor subsequences (event development context prediction):

[0044] Based on the descriptor lexicon matrix, the model generates candidate descriptor lexicon subsequences. These subsequences are arranged according to the reference event description order, reflecting the possible development path of the events. The reference event description order is determined based on the tagged event description texts that match the sample text, i.e., a standard event development order predetermined by experts or algorithms. The model will attempt to generate event description subsequences that follow this path and calculate their generation probabilities to evaluate the accuracy of the model's ordering of event narratives.

[0045] S4, Adjust model parameters (optimize event context recognition):

[0046] The model adjusts its parameters based on the generation probability of candidate descriptive word sequences, aiming to optimize its ability to identify and predict event context. Through this adjustment, the model learns to identify which word sequences are more likely to describe the development of events and gradually reduces the generation of illogical or chronological descriptions.

[0047] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0048] For example, assuming the above text processing model training method is applied to the aforementioned social media analysis field, specifically in the training scenario of a processing model that analyzes event narratives in user posts and identifies key developments in events, the training method can be illustrated through, but is not limited to, the following examples:

[0049] S1, Obtain sample text (system operation log):

[0050] Sample text refers to text data extracted from system operation and maintenance log files. This data contains descriptions of a series of events such as system running status, user activity, service response, and fault alarms. For example, sample text obtained from logs may include descriptions of events such as "service started," "user login attempt," "database query failed," "memory overflow," and "service restart," which are all event descriptions in system operation and maintenance.

[0051] S2, Determine the descriptive lexical matrix (lexical representation of event description):

[0052] During the training of an initial text processing model (such as a Transformer-based deep learning model) using sample text, a descriptive lexicon matrix is ​​determined from the model's output. Each row and column of this matrix represents the probability that a lexicon at a specific position in the system log description might correspond to any word in a pre-defined vocabulary. This pre-defined vocabulary contains common event description terms in the system operations and maintenance field, such as "startup," "failure," and "restart." For example, a row in the matrix might represent the probability of words like "startup," "connect," and "query" appearing at each lexicon position from left to right in a particular log line.

[0053] S3, Determine the generation probability of candidate descriptor subsequences (event development context prediction):

[0054] Based on the descriptor matrix, the model generates multiple candidate descriptor subsequences, which reflect the possible development path of system events. The model arranges these subsequences according to the event descriptions in the log data, referencing the order of event descriptions in system operation and maintenance (i.e., the known sequence of events, such as user login after service startup, and database query after user login). For example, the model might generate subsequences including: "Service Startup" → "User Login" → "Database Query" → "Query Failure" → "Service Restart". The probabilities of these generated subsequences will be used for subsequent optimization of model parameters.

[0055] S4, Adjust model parameters (optimize system event identification and sorting):

[0056] The model adjusts the parameters in the text processing model based on the generation probability of candidate descriptor morpheme subsequences. The aim is to improve the model's ability to understand system event descriptions and to identify and predict the sequence of predicted events.

[0057] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0058] According to one aspect of the embodiments of this application, a method for training a text processing model is provided. Optionally, as an optional example, the training of the above-described text processing model is applied to, for example, Figure 1 In the environment shown. For example... Figure 1 As shown, the terminal device 102 includes a memory 104 for storing various data generated during the operation of the terminal device 102, a processor 106 for processing and calculating the aforementioned data, and a display 108. The terminal device 102 can interact with the server 112 via a network 110. The server 112 is connected to a database 114, which is used to store various data.

[0059] Furthermore, the above method in Figure 1 The specific application process in the environment shown is as follows:

[0060] In step S102, server 112 obtains sample text, wherein the sample text includes event description information for each event in a set of events;

[0061] Next, step S104 is executed. During the process of training the initialized text processing model using sample text, server 112 determines the descriptive lexicon matrix output by the text processing model. The element in the i-th row and j-th column of the descriptive lexicon matrix is ​​the probability that the i-th lexicon in the descriptive lexicon sequence used to describe the sample text is the j-th element in the preset vocabulary. i and j are positive integers.

[0062] Then, step S106 is executed, where server 112 determines the generation probability of candidate descriptor subsequences based on the descriptor matrix. The candidate descriptor subsequences are arranged according to the reference event description order of a set of events, which is determined based on the tag event description text that matches the sample text.

[0063] Next, step S108 is executed. Server 112 adjusts the model parameters in the text processing model based on the generation probability of candidate descriptor subsequences. If the text processing model has not reached the convergence condition, iterative training of the text processing model continues until the text processing model reaches the convergence condition, and the trained target text processing model is obtained.

[0064] Then, step S110 is executed. When the terminal device 102 obtains the event text entered by the user account in the text processing interface, it sends a text processing request to the server 112 through the network 110. The event text includes a set of detailed description information corresponding to the event, and the text processing request includes the event text. The text processing request is used to request the acquisition of the event key information of the above set of events.

[0065] Next, step S112 is executed. When the server 112 receives the text processing request, it processes the event text based on the target text processing model to obtain a set of key event information corresponding to a set of events carried in the text processing request, and outputs the set of key event information in the correct time sequence to obtain the text processing result.

[0066] Then, step S114 is executed, where server 112 sends the text processing result to terminal device 102 via network 110.

[0067] Then, step S116 is executed, and the terminal device 102 displays the text processing result in the text processing result display interface after obtaining the text processing result.

[0068] Optionally, in this embodiment, the terminal device can be a terminal device configured with a target client, which may include, but is not limited to, at least one of the following: mobile phone (such as Android phone, iOS phone, etc.), laptop computer, tablet computer, PDA, MID (Mobile Internet Devices), PAD, desktop computer, smart TV, etc. The target client may be a video client, instant messaging client, browser client, educational client, etc. The network may include, but is not limited to, wired network and wireless network, wherein the wired network includes: local area network, metropolitan area network and wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that enable wireless communication. The server may be a single server, a server cluster composed of multiple servers, or a cloud server. The above is only an example, and no limitation is made in this embodiment.

[0069] It should be noted that, in some embodiments, when the performance parameters of the terminal device meet the performance conditions for model training, it is also possible, but not limited to, through... Figure 1 The terminal device shown is used to perform the training steps of the above text processing model, but this embodiment does not limit this.

[0070] As an optional approach, the training method of the above text processing model can be applied, but is not limited to, to... Figure 1 Servers or terminal devices in the middle, such as Figure 2 As shown, the method includes:

[0071] S202, Obtain sample text, wherein the sample text includes event description information for each event in a set of events.

[0072] Optionally, the sample text mentioned above can be, but is not limited to, text records representing multi-step activities or event sequences. It can be a detailed description of a project management process, a list of steps for event planning, or any text material containing ordered events or operations, used to train a text processing model to understand and generate the correct order of events.

[0073] S204. In the process of training the initialized text processing model using sample text, the descriptive lexicon matrix output by the text processing model is determined. The element in the i-th row and j-th column of the descriptive lexicon matrix is ​​the probability that the i-th lexicon in the descriptive lexicon sequence used to describe the sample text is the j-th element in the preset vocabulary. i and j are positive integers.

[0074] It should be noted that the event description information mentioned above may include, but is not limited to, detailed descriptions of specific steps in an activity or project, participants, time, location, task content, and completion status. This information is a core component of the sample text, used to construct a complete picture of the event and help the model learn the characteristics and relationships of the event.

[0075] Furthermore, the aforementioned text processing model can be, but is not limited to, a pre-trained model based on deep learning, used to process and generate text data. It can understand the semantics, logic, and sequence of text by adjusting its internal parameters, thereby generating new text content. For example, it can summarize the event description information corresponding to each event in the sample text and input the key event information corresponding to that event, etc. This embodiment does not limit this aspect.

[0076] Furthermore, the aforementioned text processing model can, but is not limited to, employ the large language model Qwen2.5-32B (or models with more parameters, such as the large language model qwen2.5-72B or the large language model QwQ-32B). This model uses a dictionary of 152064 characters, mapping each character in the dictionary to a 1x5120 embedding vector. A 64-layer decoder layer forms the main structure, followed by a normalization layer. The output embedding is then processed by a language model head (lm_head) structure to predict its probability among the 152064 characters. The specific structure is consistent with the qwen2.5 model architecture. The embedding, which maps characters in the input text to dictionary representations, does not need adjustment during training. What needs adjustment is the module list, which contains all the decoder layers and is crucial for the model to learn the mapping relationship between the input text and the output sequence. For example, the model structure of the aforementioned large language model Qwen2.5-32B can, but is not limited to, referencing... Figure 3 The structure shown.

[0077] In short, the aforementioned text processing model, through a large number of parameters, can effectively process and generate temporal text data. Especially in fields such as project management, system operation and maintenance, and social media analysis, it can accurately understand and predict the sequence of events, improving the accuracy and efficiency of automated text analysis. During training, the focus is on optimizing the model's decoder, while the word embeddings remain unchanged. This ensures both a basic understanding of language and allows the model to continuously evolve and improve in specific tasks.

[0078] Optionally, the text processing model initialized above may refer to a state in which the model parameters have been pre-trained or have been trained for at least one round before training, but have not yet reached the convergence condition. From this state, the model will gradually optimize its parameters by learning sample texts to improve its ability to generate event descriptions.

[0079] It should be noted that the lexical matrix described above can be, but is not limited to, a mathematical representation of the probability of a text processing model generating text for each possible lexical (an element in a pre-defined vocabulary). Each row in the matrix corresponds to a lexical position in the sample text, and each column corresponds to a lexical in the pre-defined vocabulary. The element value represents the probability that the model predicts that the lexical at that position is the corresponding lexical. It should also be noted that the pre-defined vocabulary can be used, but is not limited to, indicating the dictionary used by the text processing model when performing text processing.

[0080] For example, for sample S, x is the text content used as the model input (input txt). The model obtains the first predicted word id1. id1 is concatenated with the historical input txt and input into the model to obtain id2, and so on, until s outputs are obtained (s is the number of words in the output items of sample S). These are the model's predictions, resulting in a prediction probability matrix (used to represent the descriptive lexical matrix). The prediction probability matrix is ​​an s×z dimension matrix, where s is the number of words in the output items of sample S, and z is the total number of lexical units included in the dictionary. The prediction probability matrix is ​​used to represent the prediction probability of each predicted word position in the model's output among all words in the dictionary.

[0081] S206, the generation probability of candidate descriptor subsequences is determined based on the descriptor matrix, wherein the candidate descriptor subsequences are arranged according to the reference event description order of a set of events, and the reference event description order is determined based on the tag event description text that matches the sample text.

[0082] Furthermore, the aforementioned candidate descriptor lexical subsequences can be, but are not limited to, a series of lexical sequences generated by the model based on the descriptor lexical matrix and arranged in the order of the reference event description. These subsequences are predictions generated during model training and are used to compare with correct event descriptions to evaluate the model's generation quality.

[0083] Optionally, the aforementioned generation probabilities can be used, but are not limited to, to measure the confidence of the model in generating a specific lexical subsequence. It describes the product of the lexical probability values ​​corresponding to the candidate subsequence in the lexical matrix, reflecting the model's certainty regarding this sequence as output.

[0084] Furthermore, the aforementioned labeled event description text can be, but is not limited to, the correct output answer corresponding to the sample text, containing the correct key event information and order of a set of events. It serves as a standard during model training, used to evaluate and correct the accuracy and reasonableness of the event description subsequences generated by the model.

[0085] It should be noted that the above-mentioned reference event description order may be, but is not limited to, the chronological or logical order of events in the correctly labeled event description text of the sample text. This order serves as a standard to guide the model's learning, ensuring that the event descriptions it generates follow the correct sequence of steps.

[0086] S208, adjust the model parameters in the text processing model based on the generation probability of candidate descriptor subsequences.

[0087] Optionally, the aforementioned model parameter adjustments may refer to, but are not limited to, the training process. This adjustment aims to minimize the gap between the model's predictions and the correct answers, and to optimize the model's generation performance and sequence understanding capabilities.

[0088] In this embodiment, sample text is obtained, which includes event description information for each event in a set of events. During the training of an initialized text processing model using the sample text, a descriptive lexicon matrix output by the text processing model is determined. The element in the i-th row and j-th column of the descriptive lexicon matrix represents the probability that the i-th lexicon in the descriptive lexicon sequence describing the sample text is the j-th element in a preset vocabulary, where i and j are positive integers. Based on the descriptive lexicon matrix, the generation probability of candidate descriptive lexicon subsequences is determined. These candidate descriptive lexicon subsequences are arranged according to the reference event description order of a set of events, which is determined based on the tag event description text matching the sample text. Based on the generation probability of the candidate descriptive lexicon subsequences, the model parameters in the text processing model are adjusted. By employing this embodiment, on the one hand, by collecting event description information from a set of events, rich contextual and logical order training data is provided to the model. This enables the model to learn based on real-world scenarios such as project management and event planning, rather than relying on abstract text sequences, thus enhancing the model's understanding of specific event flows. On the other hand, by calculating the generation probability of candidate descriptor subsequences based on the descriptor matrix, the model can assign a higher probability to subsequences arranged in the order of the reference event description. This prompts the model to prioritize event descriptions that conform to actual logic and temporal order during the generation process, thereby improving the model's accuracy and coherence in sequence understanding tasks. Furthermore, adjusting model parameters based on the generation probability of candidate descriptor subsequences is a supervised learning process. Through a feedback mechanism, the model gradually corrects its prediction bias to produce text that better fits the order of the reference event description. This parameter adjustment strategy enables the model to continuously optimize itself to more accurately capture and generate the correct order of events, thus improving the model's processing capabilities. In summary, by adopting the embodiments of this application, by selectively collecting sample texts of event description information, and combining this with calculating sequence generation probabilities and adjusting model parameters, the technical problem of low accuracy caused by the shortcomings of existing text processing models in understanding event order is effectively solved. This improves the model's understanding ability in step-based question answering tasks, reduces output errors, and thus enhances the accuracy of text processing.

[0089] As an optional approach, determining the generation probability of candidate descriptor subsequences based on the descriptor matrix includes:

[0090] Each candidate descriptor subsequence in the candidate descriptor subsequence is determined as the current descriptor subsequence, and the following steps are performed:

[0091] Obtain the key information of the current event included in the current descriptive word subsequence, wherein the tag event description text includes a set of key information of the event corresponding to a set of events, and the key information of the event includes the key information of the current event.

[0092] Based on the descriptive lexicon matrix, the current generation probability of generating each key piece of information for the current event in the current order is determined, where the current order is used to characterize the order of each key piece of information for the current event in the current descriptive lexicon subsequence.

[0093] The current generation probability is determined as the generation probability of the current descriptor subsequence.

[0094] Optionally, the aforementioned candidate descriptor subsequences can, but are not limited to, represent a series of possible lexical sequences generated by the text processing model based on the descriptor matrix, which are designed to describe events in the sample text. The model attempts to capture the accuracy of event descriptions and the logical order between events through this sequence.

[0095] For example, suppose a set of events includes event 1, event 2, event 3, event 4... event N. The standard output (i.e., the tagged event description text) includes: event key information of event 1 (E1), event key information of event 2 (E2), event key information of event 3 (E3), event key information of event 4 (E4)... event key information of event N (En). The correct order of events (i.e., the order of reference event descriptions) is: E1 before E2, and E2 before E3, and E3 before E4, and E4 before E5, and so on.

[0096] Therefore, the above candidate descriptor subsequences may include, but are not limited to:

[0097] The order of the arrangement conforms to the subsequences E1, E2, E3, E4...En, that is, E1 is before E2, and E2 is before E3, and E3 is before E4, and E4 is before E5, and so on;

[0098] The order of the arrangements conforms to the subsequences E12, E3, E4...En, where E12, E3, E4...En indicates that events E1 and E2 are merged into a single composite event E12, while other events remain independent.

[0099] The order of the arrangements conforms to the subsequences E123, E4...En, where E123, E4...En means that events E1, E2, and E3 are merged into a single composite event E123, while other events remain independent.

[0100] The order of the subsequences conforming to E1234……En, and so on, will not be elaborated further in this example;

[0101] The aforementioned candidate descriptor subsequences may include, but are not limited to, the following:

[0102] The order of arrangement conforms to the subsequence of E1 preceding Em (Em belongs to E2~En).

[0103] The order of arrangement conforms to the subsequence of E12 before Em (Em belongs to E3~En).

[0104] The order of arrangement conforms to the subsequence of E123 before Em (Em belongs to E4~En), and so on. This will not be elaborated further in this example.

[0105] It should be noted that the aforementioned current descriptor subsequence may, but is not limited to, be included in the calculation step of determining the generation probability, as a specific sequence selected from the candidate descriptor subsequences for further analysis.

[0106] Furthermore, the aforementioned key information about the current event can be, but is not limited to, specific information points extracted from the current descriptive lemma subsequence that are directly related to one or more events in the sample text. These information points may include key attributes such as the event's name, participants, time, location, and status, used to evaluate whether the description generated by the model accurately reflects the actual situation of the event.

[0107] It should be noted that the aforementioned set of key event information may include, but is not limited to, a collection of key attributes of the events described in the event description text. These information points, combined, provide a complete picture of the event and are crucial for model training and evaluation.

[0108] In other words, in this embodiment, the generation probability of each candidate descriptor morpheme subsequence can be calculated separately, but is not limited to. For example, assuming a set of events includes event 1, event 2, event 3, event 4... event N, the standard output (i.e., the tagged event description text) includes: event key information of event 1 (E1), event key information of event 2 (E2), event key information of event 3 (E3), event key information of event 4 (E4)... event key information of event N (En). The correct event order (i.e., the reference event description order) is: E1 precedes E2, and E2 precedes E3, and E3 precedes E4, and E4 precedes E5, and so on. Then the candidate descriptor morpheme subsequence includes:

[0109] Sub - sequences with the arrangement order conforming to E1, E2, E3, E4... En, that is, E1 is before E2, and E2 is before E3, and E3 is before E4, and E4 is before E5, and so on; sub - sequences with the arrangement order conforming to E12, E3, E4... En, where E12, E3, E4... En means that events E1 and E2 are combined into a comprehensive event E12, while other events maintain their independence; sub - sequences with the arrangement order conforming to E123, E4... En, where E123, E4... En means that events E1, E2, and E3 are combined into a comprehensive event E123, while other events maintain their independence; sub - sequences with the arrangement order conforming to E1234... En, and so on, and no further elaboration will be made on this in this example;

[0110] Sub - sequences with the arrangement order conforming to E1 before Em (Em belongs to E2~En); sub - sequences with the arrangement order conforming to E12 before Em (Em belongs to E3~En); sub - sequences with the arrangement order conforming to E123 before Em (Em belongs to E4~En), and so on, and no further elaboration will be made on this in this example;

[0111] It is necessary to calculate the generation probability of each candidate descriptor - token sub - sequence. For example, the generation probability of the sub - sequence with the arrangement order conforming to E1, E2, E3, E4... En is P(E1 < E2~n), that is, the probability that E1 is before E2, and E2 is before E3, and E3 is before E4, and E4 is before E5, and so on. Correspondingly, the generation probability of the sub - sequence with the arrangement order conforming to E12, E3, E4... En is P(E12 < E3~n), that is, the probability that E12 is before E3, and E3 is before E4, and E4 is before E5, and so on. The generation probabilities of other candidate descriptor - token sub - sequences can be deduced by analogy, and no further elaboration will be made on this in this embodiment.

[0112] In this embodiment, each candidate descriptor subsequence is determined as the current descriptor subsequence, and the following steps are performed: obtaining the current event key information included in the current descriptor subsequence, wherein the tag event description text includes a set of event key information corresponding to a set of events, and the set of event key information includes the current event key information; determining the current generation probability of generating each current event key information in the current order based on the descriptor matrix, wherein the current order is used to characterize the order of each current event key information in the current descriptor subsequence; and determining the current generation probability as the generation probability of the current descriptor subsequence. Using this embodiment, by calculating the generation probability based on the descriptor matrix, the model can optimize the generated event description according to the probability of a specific word appearing at each position. This helps improve the quality of the event sequence description generated by the model, ensuring that the generated text conforms to grammatical rules and follows the correct logical order of events.

[0113] As an optional approach, based on the descriptive lexical matrix, the current generation probability of generating each key piece of information for the current event in the current order is determined, including:

[0114] S1, determine the tokens included in the q-th key information of each current event, where q is a positive integer.

[0115] S2, from the descriptive lexical matrix, determine the lexical probability that each lexical is a lexical in the descriptive lexical sequence used to describe the sample text.

[0116] S3, based on word probability, calculate the generation probability of generating the qth key information of the current event in the current order;

[0117] S4. Given the generation probabilities of each key information of the current event, determine the current generation probability based on the generation probabilities of each key information of the current event.

[0118] Optionally, the aforementioned key information about the q-th current event can, but is not limited to, represent the q-th specific information point directly related to the event generated by the model within the current descriptor subsequence. Here, q is an index used to identify the position of each individual key information point of the event in the sequence, facilitating calculation and analysis during the model's training process.

[0119] It should be noted that the aforementioned lexical units may include, but are not limited to, all independent text units that constitute the key information of the q-th current event. Lexical units can be words, phrases, or parts of sentences; they are the basic units for the model to generate event descriptions and are the foundation for the model to understand and predict text content.

[0120] Optionally, the above token probabilities can be but are not limited to being used to represent the probabilities corresponding to each token in the description token sequence of the description sample text extracted from the description token matrix. This is a confidence measure for the selection of specific tokens when the model generates text, directly affecting the accuracy and coherence of the generated text. Each event can be regarded as a combination of a series of tokens. To calculate the generation probability of a specific event at different positions in the sequence, the probabilities of each token constituting the event at different positions in the output need to be obtained.

[0121] In other words, in this embodiment, it is necessary to calculate the generation probability of each event key information in the candidate description token subsequence according to the generation probability of each token that should be included in the candidate description token subsequence, and then calculate the generation probability of the candidate description token subsequence according to the generation probability of each event key information.

[0122] For example, assume that a set of events includes Event 1, Event 2, Event 3, and Event 4, and the correct order of event arrangement (i.e., the reference event description order) is: E1 is before E2, and E2 is before E3, and E3 is before E4. Then the candidate description token subsequences include:

[0123] Subsequences with the arrangement order conforming to E1, E2, E3, E4; subsequences with the arrangement order conforming to E12, E3, E4; subsequences with the arrangement order conforming to E123, E4: subsequences with the arrangement order conforming to E1 before Em (Em belongs to E2~E4); subsequences with the arrangement order conforming to E12 before Em (Em belongs to E3~E4); subsequences with the arrangement order conforming to E123 before Em (Em is E4), and so on. This will not be elaborated in this example.

[0124] The generation probability of the candidate description token subsequence can be calculated but is not limited to through the following steps:

[0125] For example, assume as Figure 4 shown, the probability distribution of each event key description information of each event at each position in the output has been calculated based on the description token matrix;

[0126] For the subsequence with the arrangement order conforming to E1, E2, E3, E4, the calculation method of the generation probability P(E1<E2<E3<E4) is as follows:

[0127] P(E1<E2<E3<E4)=P(E1, Pos1)×P(E2, Pos2)×P(E3, Pos3)×P(E4, Pos4)=0.80×0.70×0.60×0.90 = 0.3024;

[0128] Among them, P(E1, Pos1) is used to represent the probability of E1 at the output position 1.

[0129] For the subsequence whose arrangement order conforms to E12, E3, and E4, the calculation method of the generation probability P(E12 < E3 < E4) is as follows:

[0130] P(E12 < E3 < E4) = P(E12) × P(E3, Pos3) × P(E4, Pos4) = 1.36 × 0.60 × 0.90 = 0.7344;

[0131] P(E12) == P(E1, Pos1) + P(E1, Pos1) × P(E1, Pos2) = 0.80 + 0.80 × 0.70 = 1.36.

[0132] For the calculation methods of the generation probabilities of other candidate descriptor element subsequences, please refer to the above calculation steps, and they are not limited in this example.

[0133] It should be noted that the above example is an optional example provided for facilitating the explanation of the training of the above text processing model, and there is no limitation on the specific implementation manner of the training of the above text processing model.

[0134] Furthermore, for example, the calculation methods of the generation probabilities of each event key information can but are not limited to referring to the following example:

[0135] Suppose it is currently necessary to calculate the generation probabilities of event E1 at different positions. E1 includes the elements (c1, c2, c3). Suppose the probabilities of c1, c2, and c3 at different element positions in the descriptor element matrix are as Figure 5 shown. Among them, C1, C2, C2... are used to represent the output element positions. The generation probability of E1 at Pos1 (i.e., C1 to C3) can be calculated but is not limited to through the following example: P(E1, Pos1) = P(c1, C1) × P(c2, C2) × P(c3, C3) = 0.80 × 0.70 × 0.60 = 0.336, where P(c1, C1) is used to represent the probability that the element c1 is located at the output C1.

[0136] For the generation probabilities of E1 at other positions and the calculation methods of the related generation probabilities of other event key information, please refer to the above calculation methods, and they will not be elaborated in this embodiment.

[0137] It should be noted that the above example is an optional example provided for facilitating the explanation of the training of the above text processing model, and there is no limitation on the specific implementation manner of the training of the above text processing model.

[0138] In this embodiment, the lexical units included in the q-th current event key information are determined, where q is a positive integer. From the descriptive lexical matrix, the probability that each lexical unit is a lexical unit in the descriptive lexical sequence used to describe the sample text is determined. Based on the lexical unit probabilities, the generation probability of generating the q-th current event key information in the current order is calculated. Given the generation probabilities corresponding to each current event key information, the current generation probability is determined based on these probabilities. By using this embodiment and calculating the generation probability based on the descriptive lexical matrix, the model can optimize the generated event description according to the probability of a specific lexical unit appearing at each position. This helps improve the quality of the event sequence description generated by the model, ensuring that the generated text conforms to grammatical rules and follows the correct logical order of events.

[0139] As an alternative approach, the training methods for the aforementioned text processing models also include:

[0140] S1, calculate the first loss based on the generation probability.

[0141] S2 uses the labeled event description text and the description lexical matrix to calculate the second loss.

[0142] Optionally, the above calculation of the first loss based on generation probability may include, but is not limited to: calculating the first sub-loss based on the generation probability corresponding to each candidate descriptor lexical subsequence; calculating the second sub-loss based on the labeled event description text, the first labeled event description text, and the training descriptor lexical sequence generated by the text processing model based on the descriptor lexical matrix, wherein the first labeled event description text includes a set of event key information corresponding to a set of events, and the arrangement order of the set of event key information in the first labeled event description text is different from the order of the reference event description, the x-th lexical in the training descriptor lexical sequence is the y-th element in the preset vocabulary, the probability value corresponding to the element in the x-th row and y-th column of the descriptor lexical matrix satisfies a predetermined condition, and x and y are positive integers; and calculating the first sub-loss and the second sub-loss by weighted summation to obtain the first loss.

[0143] Optionally, the above calculation of the second loss using the tag event description text and the description lexicon matrix may include, but is not limited to: determining multiple tag event key information included in the tag event description text; determining the tag generation probability of generating multiple tag event key information according to the reference event description order based on the description lexicon matrix; and calculating the second loss based on the tag generation probability.

[0144] In this embodiment, a first loss is calculated based on the generation probability; a second loss is calculated using the labeled event description text and the description lexicon matrix. By employing this embodiment, the introduction of the first loss directly quantifies the deviation between the model's prediction results and the correct event description sequence, prompting the model to learn the correlation between events and the correct description sequence more accurately during training, thereby improving the model's accuracy in predicting multi-step activity analysis tasks. By calculating the second loss, the model not only needs to focus on the accurate description of the correct order between events but also on the overall correctness of the output. This strengthens the model's sequence understanding ability, making it more accurate in handling activity analysis that depends on time or logical order.

[0145] As an optional approach, calculating the first loss based on the generation probability includes:

[0146] S1, calculate the first sub-loss based on the generation probability of each candidate descriptor subsequence.

[0147] Alternatively, assuming that the set of events includes event 1, event 2, event 3, and event 4, and the correct order of events (i.e., referring to the order of event descriptions) is: E1 precedes E2, E2 precedes E3, and E3 precedes E4, then the candidate descriptor subsequences include:

[0148] The following are subsequences whose order conforms to E1, E2, E3, E4; E12, E3, E4; E123, E4; E123, E4; E123, E4; E123, E4; E123, E4; E123, E4; and so on. These will not be elaborated further in this example.

[0149] The first sub-loss can be calculated, but is not limited to, in the following ways:

[0150]

[0151]

[0152]

[0153] First sub-loss = mean(Lorder1+Lorder2…+Lorder(n-1)).

[0154] Among them, P(E1 < E2 < E3 < E4) is the generation probability of a subsequence whose permutation order conforms to E1, E2, E3, and E4, and P(E12 < E3 < E4) is the generation probability of a subsequence whose permutation order conforms to E12, E3, and E4; P(E1 < Em) is the generation probability of a subsequence whose permutation order conforms to E1 < Em. For other corresponding relationships, please refer to the above explanations, and they will not be elaborated in this embodiment.

[0155] It should be noted that the above examples are optional examples provided for facilitating the explanation of the training of the above text processing model, and there is no limitation on the specific implementation manner of the training of the above text processing model.

[0156] S2. Calculate a second sub-loss based on the labeled event description text, the first labeled event description text, and the training description token sequence generated by the text processing model based on the description token matrix. Among them, the first labeled event description text includes a set of event key information corresponding to a set of events, and the permutation order of the set of event key information in the first labeled event description text is different from the reference event description order. The x-th token in the training description token sequence is the y-th element in the preset token table, and the probability value corresponding to the element in the x-th row and y-th column of the description token matrix satisfies a predetermined condition. x and y are positive integers.

[0157] It should be noted that the above training description token sequence can be used, but is not limited to, indicating that the text processing model is obtained by splicing the tokens with the highest corresponding probabilities for the elements at each position in the description token matrix. The above predetermined condition is used to indicate that the probability ascending order is in the last position, or the probability descending order is in the first position, that is, the probability is the largest.

[0158] Optionally, the above first labeled event description text can be used, but is not limited to, representing a set of events matching the sample text, but its description order is different from the reference event description order, and is used as a negative sample for the model training output to calculate the second sub-loss, helping the model learn the correct event sorting rules, and enabling it to maintain a high-precision event description generation ability even when facing order changes.

[0159] Furthermore, the above second sub-loss can be, but is not limited to, a loss value calculated based on the difference between the training description token sequence generated by the model and two different labeled texts (i.e., the labeled event description text and the first labeled event description text). This loss function aims to evaluate whether the order of the sequence generated by the model conforms to the logical order of events. Especially when the sequence order is inconsistent with the order in the labeled text, it can quantify the loss of this order deviation.

[0160] Optionally, it can be, but is not limited to, represented by the schematic diagram as Figure 6 shown, to characterize the generation process of the first loss:

[0161] S1, Input model prompts and sample text into the text processing model;

[0162] S2 converts the input data into token embeddings. This step transforms each token in the input data into an embedding vector, which represents the semantic and contextual information of the word within the model. For example, "demand analysis" in the input text might be converted into a specific vector that represents the semantics of "demand analysis" and its position in the sentence in the model's high-dimensional space.

[0163] S3, Token Mapping: Token mapping refers to how the model understands and processes each token embedding to generate subsequent outputs. At this stage, the model generates an internal representation based on the input embedding vector; this representation will be used for the next step of loss calculation.

[0164] S4, merging the token mappings, combines the token mappings with the instruction information so that the model can generate predictions based on the instructions and input data. This step is crucial to ensuring that the model's output meets the instructions. For example, if the instruction requires the model to predict the next activity, then the model needs to merge the token mapping of the current activity with the instruction "predict the next activity" to produce the relevant prediction.

[0165] S5-1, Calculate the sequence classification loss (used to represent the first sub-loss) based on the result of the word mapping.

[0166] S5-2, based on the result of the merged lexical mapping, calculate the sequence contrast loss (used to represent the second sub-loss).

[0167] For example, but not limited to, the second sub-loss can be calculated based on the following examples:

[0168] (1)

[0169] Where Lcontrast is used to represent the second loss, S c S is used to represent the training descriptive word sequence. + Used to represent the label event description text, S - Used to represent the first tag event description text, S (S c S + ) is used to represent S + and S c The cosine similarity, S(S c S + ), S (S c S - ) is used to represent S - and Sc The cosine similarity.

[0170] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0171] S3 calculates the first loss by weighted summation of the first and second sub-losses.

[0172] Optionally, but not limited to, the first loss can be calculated based on the following example:

[0173] Loss1=mean(Lorder1+Lorder2…)+Lcontrast(2)

[0174] Where mean(Lorder1+Lorder2…) represents the first sub-loss, Lcontrast represents the second sub-loss, and Loss1 represents the first loss. In this example, the weights of the first and second sub-losses are both 1.

[0175] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0176] It should be noted that when inputting sample text into the model, it can be, but is not limited to, inputting it in a predetermined format. For example, the model input can, but is not limited to, refer to the following examples:

[0177] For the sample data (x, y), each input data entry is generated as follows, where x represents the sample text and y represents the label event description text:

[0178] {

[0179] Instruction: A project process is known to include the following steps in sequence: business requirements mining, technical solution design, technical solution review, resource budget preparation, data collection and cleaning, data annotation and enhancement, data partitioning (annotating test sets, development sets, and training sets), model training and optimization, offline model evaluation, offline stress testing, model engineering adaptation and debugging, functional verification, application system deployment, canary release monitoring, real-time model monitoring records, model or system optimization iteration, system acceptance, and continuous maintenance iteration. Generally, the first and last steps are executed sequentially. Please summarize the following AI project progress in 60 words. Do not summarize completed historical steps. Pay attention to the amount of information, progress summary, and risk warnings in the summary. Use the original wording in the summary; do not use words that have not appeared before. Do not cite sources; only summarize the given content. When a step is in progress, subsequent steps are incomplete. The current progress record of a certain project is as follows:

[0180] Input: x;

[0181] Output: y;

[0182] }

[0183] The model's input consists of instruction and input. During training, the output is aligned to output: y. Note that the instruction needs to include the steps in the correct order. This is because the model needs to refer to a correct set of steps during learning, serving as an initial setting for rapid iteration. This constrains the model to start in a feature space generated in the correct order, making it easier to optimize. If an incorrect order is generated during training, the output of the incorrect order is suppressed to a certain extent because there is a certain training difference between the incorrect order and the original feature space (there is a certain difference, but because the model's sense of order is not accurate enough, the difference is not enough for the model to give the correct order answer).

[0184] In this embodiment, a first sub-loss is calculated based on the generation probability of each candidate descriptor lexical subsequence; a second sub-loss is calculated based on the labeled event description text, the first labeled event description text, and the training descriptor lexical sequence generated by the text processing model based on the descriptor lexical matrix. The first labeled event description text includes a set of key event information corresponding to a set of events, and the order of the key event information in the first labeled event description text differs from the order of the reference event description. The x-th lexical in the training descriptor lexical sequence is the y-th element in a preset vocabulary. The probability value corresponding to the element in the x-th row and y-th column of the descriptor lexical matrix satisfies a predetermined condition, where x and y are positive integers. The first sub-loss and the second sub-loss are weighted and summed to obtain the first loss. Using this embodiment, this multi-angle, refined loss calculation method can improve the robustness and generalization ability of the model when handling multi-step activity analysis tasks, enabling the model to perform ranking predictions more stably and accurately when facing data disturbances (such as missing steps or disordered order) and new event sequences.

[0185] As an optional approach, the second loss is calculated using the labeled event description text and the description lexical matrix, including:

[0186] S1, determine the multiple tag terms included in the tag event description text.

[0187] S2, based on the descriptive lexical matrix, determines the probability of generating multiple tag lexical units according to the order of the reference event description.

[0188] S3, calculate the second loss based on the generation probability of the tag lexicon.

[0189] Optionally, the aforementioned multiple label terms can be, but are not limited to, terms or phrases in the labeled event description text. The aforementioned label term generation probabilities are the predicted probabilities of the label terms at each position when the model generates the event description. This takes into account the position of the label terms in the reference order to ensure that the model can generate the description in the correct step order.

[0190] It should be noted that the second loss mentioned above is a loss function calculated during training to optimize label lexical generation. It is based on the probability of label lexical generation and aims to guide the model to learn how to more accurately generate event descriptions containing the correct label lexicals. The second loss can be calculated in various ways, including but not limited to cross-entropy loss, where the model's predicted probabilities are compared with the distribution of the true label lexicals.

[0191] For example, the above steps can be illustrated using, but not limited to, the following examples:

[0192] (3)

[0193] Where i identifies which input sample the sample text is in the current training epoch, N represents the total number of sample texts used to train the model in the current training epoch, M represents the total number of words included in the output, and P... ic y is used to represent the generation probability of each tag lexical. ic The probability of using the correct lexical unit (i.e., 1).

[0194] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0195] In this embodiment, multiple tag terms included in the tagged event description text are determined; the tag term generation probability of generating multiple tag terms according to the reference event description order is determined based on the description term matrix; and a second loss is calculated based on the tag term generation probability. By employing this embodiment, the probability of generating each tag term by the calculation model is ensured, guaranteeing that the model can accurately identify and generate keywords related to the event description, thereby improving the accuracy and relevance of the output.

[0196] As an optional approach, adjusting the model parameters in the text processing model based on the generation probability of candidate descriptor subsequences includes:

[0197] When the text processing model is in the first training phase, the first loss and the second loss are weighted and summed to obtain the first target loss.

[0198] If the text processing model does not reach the first convergence condition of the first training phase, the model parameters are adjusted based on the first target loss to obtain the adjusted text processing model.

[0199] Optionally, the first training phase described above can be used, but is not limited to, to represent the initial stage in the training process of a text processing model. In this stage, the model focuses on learning basic language structures, vocabulary, and grammar, as well as gaining a preliminary understanding of the logic and sequential patterns of event descriptions.

[0200] Furthermore, the aforementioned first convergence condition can be, but is not limited to, a criterion defined during model training to determine when to end the first training phase. This may involve specific metrics such as the rate of change of the loss function, the stability of model performance, or reaching a preset number of training epochs.

[0201] Optionally, the aforementioned first objective loss can be, but is not limited to, used to represent the combined loss value obtained by weighted summation of the first and second losses during the first training phase. It is a core metric guiding model parameter tuning, designed to optimize the model's performance in event description generation and ranking.

[0202] It should be noted that the model parameters mentioned above may include, but are not limited to, the set of internal variables and weights that constitute the text processing model. These parameters are continuously adjusted through the training process to adapt to specific tasks, such as event description generation and sorting.

[0203] Furthermore, the aforementioned adjusted text processing model may refer to, but is not limited to, a version of the text processing model whose performance has been improved after updating the model parameters based on the loss function. This adjustment aims to correct errors in the model's event description generation and ranking, making it more accurate and reliable.

[0204] For example, but not limited to, the first loss above can be calculated based on the following examples:

[0205] Loss S1 =a1×loss1+a2×loss2(4)

[0206] Among them, Loss S1 The first target loss is represented by loss1, and the second loss is represented by loss2. a1 and a2 are empirical values, which can be, but are limited to, 0.2 and 0.8.

[0207] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0208] In this embodiment, when the text processing model is in the first training phase, a weighted sum of the first loss and the second loss is calculated to obtain the first target loss. If the text processing model has not reached the first convergence condition of the first training phase, the model parameters are adjusted based on the first target loss to obtain the adjusted text processing model. In this embodiment, a first convergence condition is set as the marker for the end of the first training phase. When the model has not yet reached this condition, the parameters are continuously adjusted based on the first target loss to ensure that the model has fully learned the content of the current phase before entering the next phase, further improving training efficiency and model quality.

[0209] As an optional approach, when the text processing model is in the first training phase, after calculating the weighted sum of the first loss and the second loss to obtain the first target loss, the following steps are also taken:

[0210] The text processing model is deemed to have reached the first convergence condition when the first target loss reaches the first threshold and / or the current training epoch corresponding to the text processing model reaches the first target epoch.

[0211] Once the text processing model has reached the first convergence condition, the second training phase is performed on the text processing model.

[0212] It should be noted that the current training epoch mentioned above may include, but is not limited to, the number of training iterations completed by the text processing model in the first training phase. The number of training epochs typically refers to the number of times the model has traversed the entire training dataset, and is an important indicator for evaluating the model's training progress.

[0213] Furthermore, the aforementioned first target epoch may refer to, but is not limited to, a specific number of training epochs that the model needs to reach in the first training phase. This is typically a pre-set value used to determine when the model transitions from the first training phase to the second training phase, even if the first target loss has not yet reached the first threshold.

[0214] Optionally, the aforementioned first convergence condition may, but is not limited to, be used to represent the condition for determining whether the text processing model has completed the first training phase. This may be based on criteria such as the first objective loss decreasing to a certain extent, the model performance stabilizing, or reaching the first objective round (e.g., 20 rounds), to determine whether the model is ready to enter the next training phase.

[0215] It should be noted that the second training phase mentioned above may include, but is not limited to, the training cycle after the first training phase, which is a period for further refinement and optimization of the text processing model.

[0216] Optionally, in some embodiments, it is necessary to traverse all sample texts in the input sample set in each round of model training. That is, when all samples in the entire sample set have been learned by the model in one round, it marks the completion of an iteration cycle (epoch).

[0217] In this embodiment, the text processing model is determined to have reached the first convergence condition when the first target loss reaches a first threshold and / or the current training epoch corresponding to the text processing model reaches the first target epoch. Once the text processing model has reached the first convergence condition, the second training phase is performed on the text processing model. By setting a first threshold (the limit for the loss function to decrease) and a first target epoch (completing a certain number of training cycles), this embodiment monitors whether the model has reached the first convergence condition. This helps ensure that the model learns and optimizes sufficiently in the first training phase, avoiding insufficient model capability due to premature training termination. Simultaneously, through explicit convergence condition evaluation, unnecessary resource waste can be avoided.

[0218] As an alternative approach, when the text processing model is in the second training phase, the method also includes:

[0219] S1, obtain the reference text processing model obtained after performing the training operations corresponding to the first training stage on the initial text processing model.

[0220] S2, the sample text is processed using a reference text processing model to obtain a first reference tag event description text and multiple second reference tag event description texts, as well as a reference description lexical matrix. The first reference tag event description text includes a set of key event information corresponding to the event, and the second reference tag event description text includes a set of key event information corresponding to the event. The text priority of the first reference tag event description text is greater than that of the second reference tag event description text. The higher the text priority, the higher the accuracy of the key event information included in the tag event description text.

[0221] S3. Calculate the third loss using the first reference label event description text, the second reference label event description text, the reference description lexicon matrix, and the description lexicon matrix.

[0222] It should be noted that the initial text processing model mentioned above may include, but is not limited to, the original state or architecture of the text processing model before the start of the first training phase. It may be, but is not limited to, an untrained or untuned model that has certain basic capabilities but has not yet been optimized for a specific task.

[0223] Furthermore, the aforementioned reference text processing model may, but is not limited to, refer to a version of the text processing model that has reached the first convergence condition after the training operations of the first training phase. This model serves as the starting point for the second training phase, and its parameters and performance have been preliminarily optimized to generate the reference output required for subsequent training phases.

[0224] Optionally, the aforementioned first reference label event description text may, but is not limited to, be used to represent a high-quality event description obtained after processing the sample text through the reference text processing model, which contains key information about the event and whose accuracy and logical order conform to high priority standards.

[0225] It should be noted that the aforementioned multiple second reference label event description texts may include, but are not limited to, multiple event description texts generated by the reference text processing model. These texts also contain key information about the event, but their accuracy and priority are lower than those of the first reference label event description texts, and are used for broader sequence sorting and logical understanding training.

[0226] Furthermore, the aforementioned text priority can refer to, but is not limited to, the metric used in model training to rank labeled event description texts based on the accuracy, logical order, or contribution to the training objective. Higher priority text implies greater accuracy, logical coherence, or criticality, and thus has a more significant impact on model optimization.

[0227] Optionally, the aforementioned reference descriptive lexical matrix can, but is not limited to, represent the predicted lexical probability distribution when the reference text processing model generates descriptions based on sample text. Together with the descriptive lexical matrix, it is used to calculate the third loss and evaluate the model's performance in the second training phase. The reference descriptive lexical matrix is ​​similar to the aforementioned descriptive lexical matrix, and will not be described further in this embodiment.

[0228] Furthermore, the aforementioned third loss may, but is not limited to, refer to the loss function value calculated during the second training phase based on the outputs of the reference text processing model and the current text processing model, combined with the priority of the sample text and the event description text.

[0229] It should be noted that the generation process of the first reference tag event description text and the second reference tag event description text mentioned above can refer to, but is not limited to, the following example:

[0230] Input the sample text into the reference text processing model to generate answer A1. Add "Please think carefully before answering" to the prompt in the sample text and input it into the question-answering model again to generate answer A2.

[0231] Then, a question-and-answer comparison is generated using a large language model (which can, but is not limited to, directly using an existing large oracle model): "The following are user questions and two answers from a question-and-answer assistant in a certain xx domain. Given that the question-and-answer requirements are xxxx (the above prompt words), please determine which answer is better and give the reason why it is better. User question q: xxx, answer a1: xxx, answer a2: xxx. Return in JSON format, for example, {"judgment": a1 is better, "reason": x} -- fill in xxx according to each question."

[0232] The training data collected according to the above steps is: (input text, positive output sample yw, negative output sample yl). This forms the Direct Preference Optimization (DPO) training data used in the second training phase. Each DPO data entry is formatted as: {"prompt":instruction+input, "chosen":yl,"rejected":yw,}, where each DPO data entry is enclosed in curly braces. It includes the input content (i.e., sample text + prompt), the good output result yw (representing the first reference label event description text), and the bad output result yl (representing the second reference label event description text).

[0233] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0234] In this embodiment, a reference text processing model is obtained after performing the training operations corresponding to the first training stage on the initial text processing model. The reference text processing model is used to process the sample text to obtain a first reference labeled event description text, multiple second reference labeled event description texts, and a reference description lexical matrix. The first reference labeled event description text includes a set of key event information corresponding to each event, and the second reference labeled event description texts also include a set of key event information corresponding to each event. The text priority of the first reference labeled event description text is higher than that of the second reference labeled event description texts; a higher text priority indicates higher accuracy of the key event information included in the labeled event description text. A third loss is calculated using the first reference labeled event description text, the second reference labeled event description text, the reference description lexical matrix, and the description lexical matrix. In this embodiment, the third loss is calculated using the first reference labeled event description text, the second reference labeled event description text, and the corresponding description lexical matrix. This process not only considers the difference between the model-generated text and the high-priority labeled text but also evaluates the deviation from the relatively low-priority labeled text. By integrating these differences to calculate the third loss, the model can more comprehensively adjust its parameters, moving towards reducing the gap with accurate event descriptions.

[0235] As an optional approach, the third loss is calculated using the first reference label event description text, multiple second reference label event description texts, a reference description lexical matrix, and a description lexical matrix, including:

[0236] Using the reference descriptive lexicon matrix, determine the first generation probability corresponding to the first reference label event description text.

[0237] Using the descriptive lexicon matrix, determine the second generation probability corresponding to the first reference label event description text.

[0238] Using the reference descriptive lexicon matrix, the third generation probability corresponding to the second reference label event description text is determined.

[0239] Using the descriptive lexicon matrix, the corresponding fourth generation probability of the second reference label event description text is determined.

[0240] The third loss is calculated based on the first generation probability, the second generation probability, the third generation probability, and the fourth generation probability.

[0241] It should be noted that the aforementioned first generation probability may include, but is not limited to, the joint probability of the corresponding lexical sequence when the reference text processing model generates the first reference label event description text based on the reference description lexical matrix. This probability reflects the level and prediction accuracy of the reference model in generating specific event descriptions.

[0242] Furthermore, the aforementioned second generation probability may, but is not limited to, the joint probability when generating a lexical sequence with the same content as the first reference label event description text based on the current text processing model's description lexical matrix. It is used to measure the performance of the current model in event description generation, and the difference between its output and that of the reference model.

[0243] Optionally, the aforementioned second reference label event description text may, but is not limited to, be used to represent the text with lower priority (but still of reference value) among the multiple event description texts generated by the reference text processing model. Although these texts may have slight flaws in terms of descriptive accuracy or logical order, they can still be used to train and evaluate the performance of the current model.

[0244] It should be noted that the aforementioned third generation probability may include, but is not limited to, the joint probability of the lexical sequence corresponding to each text when the reference text processing model generates multiple second reference labeled event description texts based on the reference description lexical matrix. These probabilities reflect the performance level of the reference model in generating suboptimal event descriptions.

[0245] Furthermore, the aforementioned fourth generation probability may, but is not limited to, the joint probability of generating a lexical sequence with the same content as the second reference label event description text based on the current text processing model's descriptive lexical matrix. It is used to evaluate the performance of the current model in generating suboptimal event descriptions, and the difference between it and the reference model's output.

[0246] Optionally, the aforementioned third loss may, but is not limited to, be used to represent the comprehensive loss function value obtained in the second training phase by comparing and calculating the first generation probability, the second generation probability, the third generation probability, and the fourth generation probability.

[0247] As an optional example, the third loss above can be calculated based on, but is not limited to, the following examples:

[0248] (5)

[0249] It should be noted that in this example, since there are multiple negative output samples, it is necessary to calculate each y. l The corresponding L DPO Then, all L DPO The average value is determined as the third loss, where y w Used to represent the event description text of the first reference label, y l Used to represent the event description text of the second reference label. Used to represent the second generation probability. Used to represent the first generation probability. Used to represent the fourth generation probability This is used to represent the third generation probability. It should be noted that other relevant parameters in the above formula can be flexibly adjusted according to actual needs; this is not limited in this example.

[0250] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0251] Furthermore, for the calculation methods of the first generation probability, second generation probability, third generation probability, and fourth generation probability mentioned above, please refer to the specific calculation methods for other word sequences mentioned above. These methods will not be repeated in this example.

[0252] In this embodiment, a first generation probability corresponding to the first reference-labeled event description text is determined using a reference descriptive lexicon matrix; a second generation probability corresponding to the first reference-labeled event description text is determined using the descriptive lexicon matrix; a third generation probability corresponding to the second reference-labeled event description text is determined using the reference descriptive lexicon matrix; a fourth generation probability corresponding to the second reference-labeled event description text is determined using the descriptive lexicon matrix; and a third loss is calculated based on the first, second, third, and fourth generation probabilities. By employing this embodiment, through multiple probability calculations of the first and second reference-labeled event description texts, the model is trained to better understand and grasp the logical coherence within the text. Whether it's the causal relationship or temporal sequence between events, the model can generate descriptions more accurately, ensuring the logicality and fluency of the output text.

[0253] As an optional approach, adjusting the model parameters in the text processing model based on the generation probability of candidate descriptor lexical subsequences also includes:

[0254] When the text processing model is in the second training stage, the first loss, the second loss, and the third loss are weighted and summed to obtain the second target loss.

[0255] Optionally, as an alternative example, the calculation of the second objective loss can be illustrated by the following example, but is not limited to:

[0256] Loss s2 =a11×loss1+a12×loss2+a13×loss3(6)

[0257] Among them, Loss s2 The first loss is represented by loss1, the second loss by loss2, and the third loss by loss3. a11, a12, and a11 are the weighted weights of the three losses, which can be flexibly adjusted according to actual needs, such as being set to 0.2, 0.2, and 0.6.

[0258] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0259] If the text processing model does not reach the second convergence condition of the second training phase, the model parameters are adjusted based on the second objective loss to obtain the adjusted text processing model.

[0260] In this embodiment, when the text processing model is in the second training phase, the first loss, second loss, and third loss are weighted and summed to obtain the second target loss. If the text processing model does not meet the second convergence condition of the second training phase, the model parameters are adjusted based on the second target loss to obtain the adjusted text processing model. By considering three types of loss functions simultaneously in the second training phase, this embodiment allows for more comprehensive optimization of the model. The first loss ensures the consistency between the generated event description word subsequences and the real data; the second loss strengthens the logical order between sequences; and the third loss may focus on scene-specific performance metrics, such as sequence coherence, grammatical correctness, or the prediction accuracy of a specific event category. This multi-objective optimization strategy enables the model to more comprehensively improve its event sequence analysis and generation capabilities.

[0261] As an optional approach, after calculating the second target loss by weighted summation of the first, second, and third losses, the following steps are also included:

[0262] The text processing model is considered to have reached the second convergence condition if the second objective loss reaches the second threshold and / or the current training epoch corresponding to the text processing model reaches the second objective epoch.

[0263] If the text processing model reaches the second convergence condition, then the text processing model is determined as the target text processing model for completing training.

[0264] Optionally, the text processing model in the second training phase described above can be used, but is not limited to, to represent a model that has completed the first training phase and entered the reinforcement learning training phase.

[0265] It should be noted that the aforementioned second convergence condition may, but is not limited to, be included in the second training phase as a set of criteria used to determine whether the model training has achieved the expected goal. This may include a stable decrease in the second objective loss, the model performance reaching a specific threshold, or the completion of a predetermined number of training epochs, etc., to determine whether to end the second training phase or whether the model is ready to enter the next phase of training or deployment.

[0266] Furthermore, the aforementioned adjusted text processing model may refer to, but is not limited to, the optimized text processing model version obtained after adjusting the model parameters based on the second objective loss. Compared to the previous version, this model theoretically improves in event description generation, sequence sorting, and overall performance, and is closer to or meets the requirements of the second convergence condition, thus providing stronger support for practical applications or further training.

[0267] In this embodiment, the text processing model is determined to have reached the second convergence condition when the second target loss reaches the second threshold and / or the current training epoch corresponding to the text processing model reaches the second target epoch. When the text processing model reaches the second convergence condition, it is determined as the target text processing model that has completed training. By setting the threshold for the second target loss and the second target epoch, this embodiment provides a more precise basis for determining the termination of model training. This helps avoid overfitting and ensures that the model achieves high predictive performance without wasting unnecessary computational resources.

[0268] As an optional approach, before obtaining the sample text, the following steps are also included:

[0269] Obtain the original sample text and the original labeled event description text. The original sample text includes event description information for each event in a set of sample events, and the original labeled event description text includes key event information for a set of sample events.

[0270] At least one event description information in the original sample text is adjusted to obtain at least one augmented sample text, and at least one key event information in the original labeled event description text is adjusted to obtain at least one augmented labeled event description text.

[0271] Add the original sample text, at least one augmented sample text, the original tag event description text, and at least one augmented tag event description text to the sample set, wherein the sample set includes the sample text and the tag event description text.

[0272] Optionally, the aforementioned raw sample text can, but is not limited to, represent a collection of unprocessed event description texts collected before training the text processing model. These texts contain raw descriptions of specific steps and events in actual projects or activities, serving as the foundational data source for the initial stages of model training.

[0273] It should be noted that the original labeled event description text mentioned above may include, but is not limited to, a collection of texts obtained after manually annotating or preprocessing key event information from the original sample text. These texts provide training objectives for the model, guiding it to learn how to extract and summarize key event information from the original descriptions.

[0274] Optionally, the aforementioned sample events may, but are not limited to, represent a set of all events mentioned in the original sample text, which are the learning objects during the model training process, covering the entire sequence of events from project requirements mining to project maintenance iterations.

[0275] It should be noted that the key information about the events mentioned above may, but is not limited to, include the core descriptions and summaries of the project or activity steps in the original sample text and the original labeled event description text. This may involve the sequence of events, key steps, risk factors, cost estimates, etc., which are key aspects that the model needs to focus on when learning to generate high-quality event description text.

[0276] Furthermore, the above adjustments may, but are not limited to, modifications or transformations made to the original sample text and the original labeled event description text, such as randomly deleting an event description, changing the order of events, adding or deleting key event information, etc., in order to expand the sample dataset required for model training and improve the model's generalization ability and anti-interference ability.

[0277] Optionally, the augmented sample text mentioned above can be used, but is not limited to, to represent augmented samples for model training obtained by adjusting the event description information in the original sample text. These texts may contain new event descriptions after shuffling the order, adding redundant information, or deleting non-critical steps, in order to improve the model's ability to understand sequences and events.

[0278] It should be noted that the augmented label event description text mentioned above may include, but is not limited to, enhanced label text obtained by adjusting the original label event description text. This text also serves model training, ensuring that the model can adapt to various possible variations and interferences when understanding key information about sequences and events, thereby improving its applicability and accuracy in practical applications.

[0279] Furthermore, the aforementioned sample set may, but is not limited to, refer to a comprehensive dataset containing original sample text, augmented sample text, original labeled event description text, and augmented labeled event description text. It is a core resource in the model training process, used to guide model learning and optimization, ensuring that the model can effectively understand and generate event description text related to project or activity steps.

[0280] In this embodiment, original sample text and original labeled event description text are obtained. The original sample text includes event description information for each event in a set of sample events, and the original labeled event description text includes key event information for a set of sample events. At least one event description piece in the original sample text is adjusted to obtain at least one augmented sample text, and at least one key event information in the original labeled event description text is adjusted to obtain at least one augmented labeled event description text. The original sample text, at least one augmented sample text, the original labeled event description text, and at least one augmented labeled event description text are added to a sample set, where the sample set includes sample text and labeled event description text. Using this embodiment, the introduction of augmented samples allows the model to maintain good performance under various perturbations, such as slight changes in event descriptions or adjustments to event ordering. This improved generalization ability means that the model can more flexibly handle uncertainties in multi-step activity analysis in the real world, such as adjustments to project plans and the impact of unforeseen events.

[0281] As an optional approach, at least one event description in the original sample text is adjusted to obtain at least one augmented sample text, including:

[0282] Determine the event priority of each sample event in the set of sample events, where the event priority is used to characterize the importance of the event; remove the event description information of at least one sample event whose event priority is lower than the predetermined priority from the original sample text to obtain the first sub-augmented sample text.

[0283] The order of event description information in the original sample text is adjusted to obtain the second sub-augmented sample text.

[0284] Add at least one reference event description to the original sample text to obtain a third sub-augmented sample text.

[0285] Optionally, the event priorities mentioned above can be used, but are not limited to, to represent a grade or score assigned to each event in a set of sample events based on its importance, urgency, or impact on project progress. This helps the model prioritize events that are more critical and have a greater impact on the success of the project or activity during training.

[0286] It should be noted that the aforementioned predetermined priority may include, but is not limited to, a threshold set before model training to filter event description information in the original sample text. Only event description information that exceeds or equals the predetermined priority will be retained, while the rest will be considered non-critical information and discarded to optimize the training dataset and ensure that the model learns the most core event sequence logic.

[0287] Furthermore, the aforementioned first sub-amplified sample text may, but is not limited to, refer to a subset of the augmented sample set obtained after removing event descriptions with event priorities lower than a predetermined priority. The text in this subset focuses on describing high-priority events. Through this adjustment, the model can focus more on significant events during learning, improving its performance in key event ranking and description generation. It should be noted that after removing some event descriptions from the original sample text, the resulting text may, but is not limited to, be input into a large language model for polishing to obtain a more fluent first sub-amplified sample text.

[0288] Optionally, the above arrangement order can be, but is not limited to, representing the original order of event description information in the original sample text. This order reflects the actual order in which events occur in an activity or project and is an important basis for the model to learn the correct ordering of event sequences during training.

[0289] It should be noted that the second sub-augmented sample text mentioned above may include, but is not limited to, another subset of the augmented sample set obtained by randomly or strategically rearranging the order of event description information in the original sample text. Such text augmentation helps the model learn to handle disordered or irregular event sequences, enhancing its ability to correctly identify and order events in any order.

[0290] Furthermore, the aforementioned reference event description information may, but is not limited to, additional event description information unrelated to activity or project management, such as contradictory steps, with the aim of training the model to automatically correct errors in the input to obtain correct summary information.

[0291] Optionally, the aforementioned third sub-enhanced sample text may, but is not limited to, be used to represent yet another subset of the enhanced sample set obtained by adding at least one reference event description information to the original sample text.

[0292] For example, the above steps can be explained based on, but are not limited to, the following examples:

[0293] 1) Randomly discarding input augmentation steps: For input and output, randomly delete non-critical steps in the sequence (e.g., delete a certain step such as "poster preparation"), and let the model refine the progress content to obtain a new input and output, and correct the output to the correct answer.

[0294] 2) Input augmentation order permutation: Traverse all possible order shuffling methods to generate augmented data: For multi-step input text, shuffle the order of the steps as input, and use the original labeled output as the correct answer for these shuffled inputs.

[0295] 3) Bad case input augmentation construction: Insert contradictory steps (such as filling in missing steps in the content that makes the large model progress), and regenerate the answer and correct the correct answer.

[0296] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0297] In this embodiment, the event priority of each sample event in the set of sample events is determined, where the event priority characterizes the importance of the event. Event description information of at least one sample event with an event priority lower than a predetermined priority is removed from the original sample text to obtain a first sub-augmented sample text. The order of the event description information in the original sample text is adjusted to obtain a second sub-augmented sample text. At least one reference event description is added to the original sample text to obtain a third sub-augmented sample text. By employing this embodiment, through event priority determination, event description order adjustment, and reference event addition, the event processing capability, flexibility, robustness, and self-optimization capability of the model in multi-step activity analysis are effectively improved, while simultaneously optimizing the quality and utilization efficiency of training data.

[0298] As an optional approach, at least one key event information in the original tagged event description text is adjusted to obtain at least one augmented tagged event description text, including:

[0299] Adjust the position of at least one key event information in the original tag event description text to obtain at least one augmented tag event description text.

[0300] Furthermore, the aforementioned "position adjustment" can refer to, but is not limited to, changing the relative position of at least one key piece of event information within its respective event description in the original tagged event description text. This adjustment may be random or strategic, with the aim of simulating the uncertainties that may exist in event descriptions in the real world and enhancing the model's adaptability to changes in the event description structure.

[0301] For example, assuming the correct output includes: E1, E2, E3, E4, E5, E6, E7, it can be, but is not limited to, by using... Figure 7 The examples shown illustrate the above content. Figure 7 As shown in (a), the order of E1 and E2 can be kept unchanged, while the order of E3, E4, E5, E6, and E7 can be randomly shuffled to obtain an augmented output; alternatively, as shown in (a), the order of E3, E4, E5, E6, and E7 can be obtained. Figure 7 In option (b), keeping the order of E1, E2, and E3 unchanged, the order of E4, E5, E6, and E7 is randomly shuffled to obtain more augmented outputs; it is also possible to... Figure 7 In (c), the order of E1, E2, E3, and E4 remains unchanged, while the order of E5, E6, and E7 is randomly shuffled to obtain more augmented outputs, and so on. This will not be elaborated further in this example.

[0302] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0303] In this embodiment, the position of at least one key event information in the original labeled event description text is adjusted to obtain at least one augmented labeled event description text. Using this embodiment, the position adjustment method forces the model to learn to recognize and process the sequential relationships between events during training. The model must be able to distinguish the key information of different events and generate reasonable descriptions based on the relative positions of this information. This helps enhance the model's sensitivity to sequences, enabling it to more accurately consider the chronological order and logical connections of events during prediction.

[0304] As an optional approach, adding the original sample text, at least one augmented sample text, the original tag event description text, and at least one augmented tag event description text to the sample set includes:

[0305] Add the original sample text and at least one augmented sample text to the training input sample set.

[0306] Each training input sample in the training input sample set is determined as the current input sample. The sample combination consisting of the current input sample, the original label event description text, and at least one augmented label event description text is added to the sample set.

[0307] Optionally, the aforementioned training input sample set may, but is not limited to, represent a collection of all input texts used to train the text processing model. This includes the original sample text and at least one augmented sample text processed by various augmentation strategies, which serve as inputs for model learning and prediction and are an important component of the model training dataset.

[0308] Optionally, the above sample combination can be, but is not limited to, representing a training sample unit consisting of the current input sample, the original labeled event description text, and at least one augmented labeled event description text during the training of the text processing model. For example, a triple (x, y0, y1~yK), where x represents the training input sample, y0 represents the original labeled event description text, and y1~yK represent at least one augmented labeled event description text. Such a combination not only provides the input for model training but also clarifies the target output and the augmented output used for comparison and optimization, helping the model learn to generate and rank event descriptions more accurately.

[0309] It should be noted that in this embodiment, the above processing needs to be performed on multiple original sample texts. That is, for each original sample text, the above triplet needs to be created. The processing steps for each original sample text are as described in the embodiment given above, and will not be repeated in this embodiment.

[0310] In this embodiment, the original sample text and at least one augmented sample text are added to the training input sample set. Each training input sample in the training input sample set is determined as the current input sample. The sample combination consisting of the current input sample, the original labeled event description text, and at least one augmented labeled event description text is added to the sample set. By incorporating both the original and augmented sample texts into the training input sample set, this embodiment significantly increases the quantity and diversity of training data. This helps the model to be exposed to and learn more different event description styles and sequence arrangements, thereby improving the model's generalization ability and prediction accuracy when encountering new inputs.

[0311] As an optional approach, after determining the text processing model as the target text processing model for training, given that the text processing model has reached the second convergence condition, the following steps may be taken, but are not limited to:

[0312] Deploy the target text processing model into the progress analysis task system.

[0313] Specifically, the application process of the target text processing model in the progress analysis task system is as follows: Figure 8 As shown, it includes:

[0314] S802, user-uploaded / automatically triggered data updates: Specifically, users can upload new data into the system, such as the latest project progress or real-time activity data. Simultaneously, the system also has the ability to automatically acquire data, updating it automatically from external data sources (such as databases, API interfaces, or web crawlers) to ensure that the analysis and management models have the latest information. Data update triggering is the starting point of the entire deployment process; it ensures that the model can promptly process the latest task and activity information, thereby making accurate analyses and predictions.

[0315] S804, Detecting Data Updates. Specifically, the system has an internal data update detection mechanism that automatically identifies and marks newly uploaded or acquired data as input for model updates. This detection mechanism is crucial for ensuring real-time performance and responsiveness; it rapidly responds to data changes, ensuring that model training and applications are based on the latest data.

[0316] S806, Progress Analysis Output: Specifically, when a data update is detected, the system will invoke the target text processing model to process this new data. The target text processing model performs predictions and analysis based on the updated data, generating an updated progress report for the activity or project. This may include the status of key phases, timeline predictions, risk assessments, etc. The output is a direct product of the model application, providing in-depth insights into the status of the activity or project, helping users and managers make informed decisions.

[0317] S808, Interface Presentation: Specifically, the output of the target text processing model will be integrated into the user interface and presented to the user in an intuitive and easy-to-read format. Interface design typically includes charts, timelines, visualizations of key metrics, etc., designed to allow users to quickly understand project progress and potential problems. Interface presentation is a crucial part of user experience; it ensures users can easily access and understand information and effectively manage and monitor projects.

[0318] As another example, for users, it can be done through, for example... Figure 9 The interactive method shown uses a progress analysis task system to handle progress analysis tasks, such as... Figure 9As shown in (a), users can input detailed progress data in the detailed progress input interface, and then click the OK analysis control to trigger the system to call the target text processing model to process this new data, obtain progress summary information associated with the user input, and as shown in (a). Figure 9 As shown in (b), progress summary information is displayed in the progress summary results display interface.

[0319] It should be noted that the above examples are optional examples provided to facilitate the explanation of the training of the above text processing model, and there are no limitations on the specific implementation of the training of the above text processing model.

[0320] It should be noted that the above-described text processing model training method can also be applied to, but is not limited to, the training of Large Language Models (LLMs) and other task processing models with sequential dependencies. In other words, this training method can be effectively applied regardless of the type of sequence data used to train the LLM, such as text sequences, time series, or activity sequences. Furthermore, the above training method is not only applicable to common tasks such as text generation, dialogue systems, and machine translation, but can also be extended to sequence analysis in other fields; however, this embodiment does not impose any limitations on this.

[0321] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0322] According to another aspect of the embodiments of this application, a training apparatus for a text processing model for implementing the training method of the above-described text processing model is also provided. For example... Figure 10 As shown, the device includes:

[0323] The acquisition unit 1002 is used to acquire sample text, wherein the sample text includes event description information for each event in a set of events;

[0324] The first determining unit 1004 is used to determine the descriptive lexicon matrix output by the text processing model during the process of training and initializing the text processing model using sample text. The element in the i-th row and j-th column of the descriptive lexicon matrix is ​​the probability that the i-th lexicon in the descriptive lexicon sequence used to describe the sample text is the j-th element in the preset vocabulary. i and j are positive integers.

[0325] The second determining unit 1006 is used to determine the generation probability of candidate descriptor subsequences based on the descriptor matrix, wherein the candidate descriptor subsequences are arranged according to the reference event description order of a set of events, and the reference event description order is determined based on the tag event description text that matches the sample text.

[0326] Adjustment unit 1008 is used to adjust the model parameters in the text processing model based on the generation probability of candidate descriptor subsequences.

[0327] Optionally, in this embodiment, the second determining unit includes: a determining module, configured to determine each candidate descriptor subsequence in the candidate descriptor subsequence as the current descriptor subsequence, and perform the following steps: obtaining the current event key information included in the current descriptor subsequence, wherein the tag event description text includes a set of event key information corresponding to a set of events, and the set of event key information includes the current event key information; determining the current generation probability of generating each current event key information in the current order based on the descriptor matrix, wherein the current order is used to characterize the order of each current event key information in the current descriptor subsequence; and determining the current generation probability as the generation probability of the current descriptor subsequence.

[0328] Optionally, in this embodiment, the determining module is further configured to: determine each word element included in the q-th current event key information among each current event key information, where q is a positive integer; determine the word element probability that each word element is a word element in the descriptive word element sequence used to describe the sample text from the descriptive word element matrix; calculate the generation probability of generating the q-th current event key information in the current order based on the word element probability; and determine the current generation probability based on the generation probability corresponding to each current event key information when the generation probability corresponding to each current event key information is obtained.

[0329] Optionally, in this embodiment, the above-mentioned device further includes: a first calculation unit, used to calculate a first loss based on the generation probability; and a second calculation unit, used to calculate a second loss using the label event description text and the description lexical matrix.

[0330] Optionally, in this embodiment, the first calculation unit includes: a first calculation module, used to calculate a first sub-loss based on the generation probability corresponding to each candidate descriptor sub-sequence; a second calculation module, used to calculate a second sub-loss based on the labeled event description text, the first labeled event description text, and the training descriptor sequence generated by the text processing model based on the descriptor matrix, wherein the first labeled event description text includes a set of event key information corresponding to a set of events, and the arrangement order of the set of event key information in the first labeled event description text is different from the order of the reference event description, the x-th word in the training descriptor sequence is the y-th element in the preset vocabulary, the probability value corresponding to the element in the x-th row and y-th column of the descriptor matrix satisfies a predetermined condition, and x and y are positive integers; and a third calculation module, used to perform a weighted summation calculation on the first sub-loss and the second sub-loss to obtain the first loss.

[0331] Optionally, in this embodiment, the second calculation unit is further configured to: determine multiple tag terms included in the tag event description text; determine the tag term generation probability of generating multiple tag terms according to the reference event description order based on the description term matrix; and calculate the second loss based on the tag term generation probability.

[0332] Optionally, in this embodiment, the adjustment unit includes: a fourth calculation module, used to perform a weighted summation of the first loss and the second loss to obtain a first target loss when the text processing model is in the first training stage; and a first adjustment module, used to adjust the model parameters based on the first target loss to obtain an adjusted text processing model when the text processing model has not reached the first convergence condition of the first training stage.

[0333] Optionally, in this embodiment, the above-mentioned device further includes: a third determining unit, configured to determine that the text processing model has reached the first convergence condition when the first target loss reaches the first threshold and / or the current training round corresponding to the text processing model reaches the first target round; and a first adjusting unit, configured to perform a second training phase training operation on the text processing model when the text processing model has reached the first convergence condition.

[0334] Optionally, in this embodiment, the above-mentioned device further includes: a first acquisition unit, used to acquire a reference text processing model obtained after performing the training operation corresponding to the first training stage on the initial text processing model; a second acquisition unit, used to process the sample text using the reference text processing model to obtain a first reference label event description text and multiple second reference label event description texts, as well as a reference description lexicon matrix, wherein the first reference label event description text includes a set of event key information corresponding to an event, the second reference label event description text includes a set of event key information corresponding to an event, the text priority of the first reference label event description text is greater than the text priority of the second reference label event description text, and the higher the text priority, the higher the accuracy of the event key information included in the label event description text; and a third calculation unit, used to calculate a third loss using the first reference label event description text, the second reference label event description text, the reference description lexicon matrix, and the description lexicon matrix.

[0335] Optionally, in this embodiment, the third calculation unit includes: a first determining module, configured to: determine a first generation probability corresponding to the first reference tag event description text using a reference descriptive lexicon matrix; determine a second generation probability corresponding to the first reference tag event description text using a descriptive lexicon matrix; determine a third generation probability corresponding to the second reference tag event description text using a reference descriptive lexicon matrix; determine a fourth generation probability corresponding to the second reference tag event description text using a descriptive lexicon matrix; and calculate a third loss based on the first generation probability, the second generation probability, the third generation probability, and the fourth generation probability.

[0336] Optionally, in this embodiment, the adjustment unit further includes: a fifth calculation module, used to perform a weighted summation of the first loss, the second loss, and the third loss to obtain a second target loss when the text processing model is in the second training stage; and a second adjustment module, used to adjust the model parameters based on the second target loss to obtain an adjusted text processing model when the text processing model has not reached the second convergence condition of the second training stage.

[0337] Optionally, in this embodiment, the above-mentioned device further includes: a third determining unit, configured to determine that the text processing model has reached the second convergence condition when the second target loss reaches the second threshold and / or the current training round corresponding to the text processing model reaches the second target round; and a fourth determining unit, configured to determine the text processing model as the target text processing model that has completed training when the text processing model has reached the second convergence condition.

[0338] Optionally, in this embodiment, the above-mentioned apparatus further includes: a third acquisition unit, configured to acquire original sample text and original tag event description text, wherein the original sample text includes event description information for each event in a set of sample events, and the original tag event description text includes event key information for a set of sample events; a second adjustment unit, configured to adjust at least one event description information in the original sample text to obtain at least one augmented sample text, and adjust at least one event key information in the original tag event description text to obtain at least one augmented tag event description text; and an addition unit, configured to add the original sample text, at least one augmented sample text, the original tag event description text, and at least one augmented tag event description text to a sample set, wherein the sample set includes sample text and tag event description text.

[0339] Optionally, in this embodiment, the second adjustment unit is further configured to: determine the event priority corresponding to each sample event in the set of sample events, wherein the event priority is used to characterize the importance of the event; remove the event description information of at least one sample event whose event priority is lower than a predetermined priority corresponding to the original sample text to obtain a first sub-enlarged sample text; adjust the arrangement order of the event description information in the original sample text to obtain a second sub-enlarged sample text; and add at least one reference event description information to the original sample text to obtain a third sub-enlarged sample text.

[0340] Optionally, in this embodiment, the second adjustment unit is further configured to: adjust the position of at least one key event information in the original tag event description text to obtain at least one augmented tag event description text.

[0341] Optionally, in this embodiment, the above-mentioned adding unit is further configured to: add the original sample text and at least one augmented sample text to the training input sample set; determine each training input sample in the training input sample set as the current input sample; and add the sample combination consisting of the current input sample, the original label event description text, and at least one augmented label event description text to the sample set.

[0342] For specific implementation examples, please refer to the examples shown in the training method of the above text processing model. This embodiment will not be repeated here.

[0343] According to another aspect of the embodiments of this application, an electronic device for implementing the training method of the above-described text processing model is also provided. This electronic device can be a terminal device or a server. This embodiment uses a server as an example for illustration. Figure 11As shown, the electronic device includes a memory 1102 and a processor 1104. The memory 1102 stores a computer program, and the processor 1104 is configured to execute the steps of any of the above method embodiments via the computer program.

[0344] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0345] Optionally, in this embodiment, the processor can be configured to execute the steps in the training method of the text processing model via a computer program.

[0346] Alternatively, as those skilled in the art will understand, Figure 11 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 11 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 11 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 11 The different configurations shown.

[0347] The memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the text processing model training method and apparatus in this embodiment. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, thereby implementing the aforementioned text processing model training method. The memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1102 may further include memory remotely located relative to the processor 1104, and these remote memories can be connected to terminal devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. As an example, such as... Figure 11 As shown, the memory 1102 may include, but is not limited to, the acquisition unit 1002, the first determination unit 1004, the second determination unit 1006, and the adjustment unit 1008 in the training device for the text processing model. Furthermore, it may include, but is not limited to, other module units in the training device for the text processing model, which will not be elaborated upon in this example.

[0348] Optionally, the aforementioned transmission device 1106 is used to receive or send data via a network. Specific examples of the network may include wired and wireless networks. In one example, the transmission device 1106 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1106 is a radio frequency (RF) module used for wireless communication with the Internet.

[0349] In addition, the aforementioned electronic device also includes a display 1108 and a connection bus 1110 for connecting the various module components in the aforementioned electronic device.

[0350] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a point-to-point network, and any form of computing device, such as a server, terminal device, or other electronic device, can become a node in the blockchain system by joining this point-to-point network.

[0351] According to one aspect of this application, a computer program product is provided, comprising a computer program containing program code for performing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in the embodiments of this application.

[0352] According to one aspect of this application, another computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the methods in various embodiments of this application.

[0353] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described method.

[0354] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the steps in the training method of the text processing model described above.

[0355] It should be noted that the data collection and processing described in this application should be strictly in accordance with the requirements of relevant national laws and regulations, obtaining the informed consent or separate consent of the personal information subject, and conducting subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0356] Optionally, in the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0357] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0358] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0359] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0360] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0361] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0362] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0363] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A training method for a text processing model, characterized in that, include: Obtain sample text, wherein the sample text includes event description information for each event in a set of events; During the process of training the initialized text processing model using the sample text, the descriptive lexicon matrix output by the text processing model is determined, wherein the element in the i-th row and j-th column of the descriptive lexicon matrix is ​​the probability that the i-th lexicon in the descriptive lexicon sequence used to describe the sample text is the j-th element in the preset vocabulary, and i and j are positive integers. The generation probability of candidate descriptor subsequences is determined based on the descriptor matrix, wherein the candidate descriptor subsequences are arranged according to the reference event description order of the set of events, and the reference event description order is determined based on the tag event description text that matches the sample text; The model parameters in the text processing model are adjusted based on the generation probability of the candidate descriptor morpheme subsequences.

2. The method according to claim 1, characterized in that, The determination of the generation probability of candidate descriptor subsequences based on the descriptor matrix includes: Each candidate descriptor subsequence in the candidate descriptor subsequence is determined as the current descriptor subsequence, and the following steps are performed: Obtain the key information of the current event included in the current descriptive word subsequence, wherein the tag event description text includes a set of key information of the event corresponding to the set of events, and the set of key information of the event includes the key information of the current event; Based on the descriptive lexicon matrix, the current generation probability of generating each key piece of information about the current event in the current order is determined, wherein the current order is used to characterize the order of each key piece of information about the current event in the current descriptive lexicon subsequence; The current generation probability is determined as the generation probability of the current descriptor morpheme subsequence.

3. The method according to claim 2, characterized in that, The step of determining the current generation probability of generating each key piece of information for the current event in the current order based on the descriptive lexical matrix includes: Identify the individual words included in the q-th current event key information among all the current event key information, where q is a positive integer; From the descriptive lexical matrix, determine the probability that each lexical is a lexical in the descriptive lexical sequence used to describe the sample text; Based on the word probabilities, calculate the generation probability of generating the qth current event key information in the current order; Having obtained the generation probability corresponding to each of the key information of the current event, the current generation probability is determined based on the generation probability corresponding to each of the key information of the current event.

4. The method according to claim 1, characterized in that, The method further includes: Calculate the first loss based on the generation probability; The second loss is calculated using the labeled event description text and the description lexicon matrix.

5. The method according to claim 4, characterized in that, The calculation of the first loss based on the generation probability includes: The first sub-loss is calculated based on the generation probability corresponding to each of the candidate descriptor subsequences. Based on the tagged event description text, the first tagged event description text, and the training descriptive lexical sequence generated by the text processing model based on the descriptive lexical matrix, a second sub-loss is calculated. The first tagged event description text includes a set of key event information corresponding to the set of events, and the order of the key event information in the first tagged event description text is different from the order of the reference event description. The x-th lexical in the training descriptive lexical sequence is the y-th element in the preset vocabulary. The probability value corresponding to the element in the x-th row and y-th column of the descriptive lexical matrix satisfies a predetermined condition, where x and y are positive integers. The first loss is obtained by weighted summation of the first sub-loss and the second sub-loss.

6. The method according to claim 4, characterized in that, The calculation of the second loss using the labeled event description text and the description lexical matrix includes: Identify multiple tag terms included in the tag event description text; Based on the descriptive lexical matrix, the probability of generating the multiple tag lexical units according to the order of the reference event description is determined; The second loss is calculated based on the generated probability of the tag lexicon.

7. The method according to claim 4, characterized in that, Adjusting the model parameters in the text processing model based on the generation probability of the candidate descriptor subsequences includes: When the text processing model is a text processing model in the first training stage, the first loss and the second loss are weighted and summed to obtain the first target loss; If the text processing model does not meet the first convergence condition of the first training phase, the model parameters are adjusted based on the first target loss to obtain the adjusted text processing model.

8. The method according to claim 7, characterized in that, When the text processing model is a text processing model in the first training phase, after calculating the weighted sum of the first loss and the second loss to obtain the first target loss, the method further includes: If the first target loss reaches the first threshold, and / or the current training round corresponding to the text processing model reaches the first target round, it is determined that the text processing model has reached the first convergence condition. If the text processing model reaches the first convergence condition, the second training phase is performed on the text processing model.

9. The method according to claim 4, characterized in that, When the text processing model is a text processing model in the second training phase, the method further includes: Obtain the reference text processing model after performing the training operations corresponding to the first training stage on the initial text processing model; The sample text is processed using the reference text processing model to obtain a first reference tag event description text, multiple second reference tag event description texts, and a reference description lexical matrix. The first reference tag event description text includes key event information corresponding to the set of events, and the second reference tag event description texts include key event information corresponding to the set of events. The text priority of the first reference tag event description text is greater than that of the second reference tag event description text. A higher text priority indicates a higher accuracy of the key event information included in the tag event description text. The third loss is calculated using the first reference label event description text, the second reference label event description text, the reference description lexicon matrix, and the description lexicon matrix.

10. The method according to claim 9, characterized in that, The step of calculating the third loss using the first reference tag event description text, multiple second reference tag event description texts, the reference description lexical matrix, and the description lexical matrix includes: Using the reference descriptive lexicon matrix, determine the first generation probability corresponding to the first reference tag event description text; Using the descriptive lexicon matrix, determine the second generation probability corresponding to the first reference tag event description text; Using the reference descriptive lexicon matrix, the third generation probability corresponding to the second reference tag event description text is determined; Using the descriptive lexicon matrix, determine the fourth generation probability corresponding to the second reference tag event description text; The third loss is calculated based on the first generation probability, the second generation probability, the third generation probability, and the fourth generation probability.

11. The method according to claim 10, characterized in that, The step of adjusting the model parameters in the text processing model based on the generation probability of the candidate descriptor subsequences further includes: When the text processing model is in the second training stage, the first loss, the second loss, and the third loss are weighted and summed to obtain the second target loss. If the text processing model does not reach the second convergence condition of the second training phase, the model parameters are adjusted based on the second target loss to obtain the adjusted text processing model.

12. The method according to claim 11, characterized in that, After calculating the weighted sum of the first loss, the second loss, and the third loss to obtain the second target loss, the method further includes: If the second target loss reaches the second threshold, and / or the current training round corresponding to the text processing model reaches the second target round, it is determined that the text processing model has reached the second convergence condition. If the text processing model reaches the second convergence condition, the text processing model is determined as the target text processing model for which training has been completed.

13. The method according to any one of claims 1 to 12, characterized in that, Before obtaining the sample text, the following is also included: Obtain the original sample text and the original tag event description text, wherein the original sample text includes event description information for each event in a set of sample events, and the original tag event description text includes key event information for the set of sample events; At least one event description information in the original sample text is adjusted to obtain at least one augmented sample text, and at least one key event information in the original tagged event description text is adjusted to obtain at least one augmented tagged event description text; The original sample text, the at least one augmented sample text, the original tag event description text, and at least one augmented tag event description text are added to the sample set, wherein the sample set includes the sample text and the tag event description text.

14. The method according to claim 13, characterized in that, The adjustment of at least one event description information in the original sample text to obtain at least one augmented sample text includes: Determine the event priority of each sample event in the set of sample events, wherein the event priority is used to characterize the importance of the event; remove the event description information of at least one sample event whose event priority is less than a predetermined priority from the original sample text to obtain the first sub-augmented sample text; The order of the event description information in the original sample text is adjusted to obtain the second sub-augmented sample text; Add at least one reference event description to the original sample text to obtain a third sub-augmented sample text.

15. The method according to claim 14, characterized in that, The step of adjusting at least one key event information in the original tag event description text to obtain at least one augmented tag event description text includes: The position of at least one key event information in the original tag event description text is adjusted to obtain at least one augmented tag event description text.

16. The method according to claim 15, characterized in that, Adding the original sample text, the at least one augmented sample text, the original tag event description text, and at least one augmented tag event description text to the sample set includes: Add the original sample text and the at least one augmented sample text to the training input sample set; Each training input sample in the training input sample set is determined as the current input sample, and a sample combination consisting of the current input sample, the original label event description text, and at least one augmented label event description text is added to the sample set.

17. A training device for a text processing model, characterized in that, include: An acquisition unit is used to acquire sample text, wherein the sample text includes event description information for each event in a set of events; The first determining unit is used to determine the descriptive lexicon matrix output by the text processing model during the process of training and initializing the text processing model using the sample text, wherein the element in the i-th row and j-th column of the descriptive lexicon matrix is ​​the probability that the i-th lexicon in the descriptive lexicon sequence used to describe the sample text is the j-th element in the preset vocabulary, and i and j are positive integers. The second determining unit is used to determine the generation probability of candidate descriptor subsequences based on the descriptor matrix, wherein the candidate descriptor subsequences are arranged according to the reference event description order of the set of events, and the reference event description order is determined based on the tag event description text that matches the sample text. The adjustment unit is used to adjust the model parameters in the text processing model based on the generation probability of the candidate descriptor morpheme subsequence.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program, wherein the computer program, when executed by a processor, performs the method described in any one of claims 1 to 16.

19. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 16.

20. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 16 through the computer program.