A text recognition method for railway alarm processing information based on large language model
Through the data generation and classification method based on large language models, the railway alarm processing information text data is expanded and enhanced, and the data category imbalance problem is solved, and higher classification accuracy and credibility are achieved.
Patent Information
- Application Number
- CN202510562952.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-04-30
AI Technical Summary
There is a problem of category imbalance in railway alarm processing information text data, resulting in insufficient accuracy of data classification and it is difficult for the existing technology to effectively solve it.
Using a method based on a large language model, the railway alarm processing information text data is expanded and enhanced through data generation tasks, and data classification is performed in combination with search enhancement generation technology, and keyword extraction, text generation and classification are used for pre-trained models and adapters.
It significantly improves the classification accuracy and credibility of railway alarm processing information text data, reduces labor investment, and solves the problem of data category imbalance.
Smart Images

Figure CN120067883B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of railway systems, and in particular to a railway alarm processing information text recognition method based on a large language model. Background Art
[0002] Analyzing the causes of railway signal equipment failures has always been a key concern in the signaling field. Text mining of data such as alarm records and alarm handling opinions is particularly important and has widespread and urgent demand. Currently, centralized signal monitoring systems accumulate a large amount of text-based fault data, including alarm records and alarm handling opinions. The text information recorded by electrical personnel is subject to differences in their expression habits and cultural backgrounds, resulting in ambiguous descriptions. This forces electrical personnel to manually reorganize this data when performing tasks such as fault cause classification, which consumes a significant amount of labor. Furthermore, subjective or objective reasons may cause the text to be irrelevant to the topic, seriously affecting data quality and leading to inaccurate processing, mining, and analysis results based on this data. Overall, existing technologies suffer from a class imbalance in railway alarm handling information text data, and the accuracy of data classification needs to be improved.
[0003] Although some improvements have been made in existing research, the results are not good. For example: (1) Xie’s article “Using Centralized Signal Monitoring to Process Alarm Information” published in the 5th issue of Railway Communication Signal Engineering Technology in 2019 (i.e. May 2019) takes the railway signal centralized monitoring system as the research object and proposes a three-level classification method for alarm information. However, this scheme can only be applied to relatively simple alarm information classification, and the classification accuracy needs to be improved; (2) The Chinese invention patent application “Railway Signal Monitoring Data Generation Method and System” with publication number CN119128802A was published on December 13, 2024. Although this scheme can generate railway signal monitoring data, it is generated by collecting a series of external information and cannot be applied to the generation of railway alarm processing information text, and therefore cannot solve the problem of imbalance in the categories of railway alarm processing information text data.
[0004] In view of this, the present invention is proposed. Summary of the Invention
[0005] The purpose of the present invention is to provide a railway alarm processing information text recognition method based on a large language model, which can achieve effective expansion and enhancement of railway alarm processing information text, as well as accurate and reliable classification of railway alarm processing information text data, significantly reducing the labor input required in the process of processing railway alarm processing information text data.
[0006] The purpose of the present invention is achieved through the following technical solutions:
[0007] A method for recognizing railway alarm processing information text based on a large language model, comprising:
[0008] Analyze the input text and identify the user intent contained in the input text; the user intent includes: performing a data generation task or performing a data classification task;
[0009] If the user intends to perform a data generation task, multiple keywords are obtained from the database based on the data category information contained in the input text, and the railway alarm processing information text is generated through the first language model. Then, combined with the set filtering method, the final output railway alarm processing information text is selected for updating the database and knowledge base;
[0010] If the user intends to perform a data classification task, an updated knowledge base is obtained, and input prompt information is generated using retrieval enhancement generation technology in combination with the input text. The second largest language model is used to classify the input text according to the input prompt information.
[0011] As can be seen from the technical solution provided by the present invention, the powerful generation capabilities of a large language model are utilized to expand and enhance different categories of railway alarm processing information text data, addressing the imbalance in railway alarm processing information text data across categories. Furthermore, combined with search-enhanced generation technology, input prompts are integrated with knowledge base search results, providing a stronger basis for reasoning, increasing user confidence in the data classification model and the accuracy of railway alarm processing information text data classification. Overall, the solution is scientifically sound, highly applicable, and effective. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A flowchart of a method for recognizing railway alarm processing information text based on a large language model provided by an embodiment of the present invention;
[0014] Figure 2 A schematic diagram of the overall framework of a railway alarm processing information text recognition method based on a large language model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0016] First, the following terms may be used in this article:
[0017] The terms "include," "comprises," "contains," "has," or other similar expressions should be interpreted as non-exclusive. For example, "including certain technical features (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products, or manufactured articles)" should be interpreted as including not only the technical features explicitly listed, but also other technical features known in the art that are not explicitly listed.
[0018] The term "consisting of" excludes any technical features not explicitly listed. If used in a claim, this term renders the claim closed, excluding any technical features other than those explicitly listed, except for conventional impurities associated with them. If this term appears only in a clause of a claim, it limits only the elements explicitly listed in that clause; elements listed in other clauses are not excluded from the claim as a whole.
[0019] The following describes in detail a method for recognizing railway alarm processing information text based on a large language model provided by the present invention. Any information not described in detail in the embodiments of the present invention belongs to the prior art known to professionals in the field. Where specific conditions are not specified in the embodiments of the present invention, the procedures were performed according to conventional conditions in the art or the conditions recommended by the manufacturer. Reagents or instruments used in the embodiments of the present invention, where the manufacturer is not specified, are all commercially available conventional products.
[0020] like Figure 1 As shown, the embodiment of the present invention provides a method for recognizing railway alarm processing information text based on a large language model, which mainly includes the following steps:
[0021] Step 1: Analyze the input text and identify the user intent contained in the input text.
[0022] In the embodiment of the present invention, the input text also belongs to the railway alarm processing information text; the user intention includes: performing a data generation task or performing a data classification task; the essence of identifying the user intention is to perform classification to determine the subsequent tasks to be performed.
[0023] In the embodiment of the present invention, the data generation task is mainly responsible for generating railway alarm processing information text to update the knowledge base, and the data classification task is to perform data classification in combination with the updated knowledge base.
[0024] Preferably, this step can be achieved through a pre-trained first adapter; the first adapter includes: a text vectorization operation layer, a first fully connected layer, a first nonlinear activation layer and a first Softmax layer arranged in sequence; wherein Softmax is a normalized exponential function.
[0025] Preferably, an execution agent may also be configured to call the corresponding model to execute related tasks according to the user's intention.
[0026] Step 2: Execute the data generation task, generate railway alarm processing information text, and update the database and knowledge base.
[0027] In this embodiment of the present invention, the data generation task is performed by a data generation model. The data generation model primarily involves processes such as keyword extraction, text generation based on a first language model, and text filtering. Specifically, based on the data category information contained in the input text, multiple keywords are retrieved from a database. The first language model then uses these keywords to generate railway alarm processing information text. The final railway alarm processing information text is then selected using a predefined filtering method and updated in the database and knowledge base.
[0028] Preferably, obtaining multiple keywords from the database based on the data category information contained in the input text includes: obtaining all railway alarm processing information texts of the corresponding data category from the database based on the data category information contained in the input text; extracting keywords from each railway alarm processing information text respectively through an end-to-end sequence labeling model, and finally obtaining multiple keywords.
[0029] Preferably, the output end of the first large language model is configured with a second adapter, and fine-tuning of the first large language model is achieved by fine-tuning the second adapter; the second adapter includes: an information bottleneck layer, a second nonlinear activation layer and an expansion layer arranged in sequence.
[0030] Preferably, the combination of the set screening method and the selection of the final output railway alarm processing information text includes: vectorizing each railway alarm processing information text in the database through a text embedding model, the vectorization result is called the original data vector, and finally obtaining multiple original data vectors; clustering all original data vectors to obtain cluster centers; vectorizing each generated railway alarm processing information text through a text embedding model, the obtained result is called a generated data vector, and finally obtaining multiple generated data vectors; measuring the similarity between each generated data vector and the cluster center through a similarity function; if the similarity is higher than the set threshold, retaining the corresponding generated railway alarm processing information text; otherwise, discarding it; all retained generated railway alarm processing information texts are the final output railway alarm processing information texts.
[0031] Preferably, the updating of the knowledge base includes: dividing each railway alarm processing information text finally output into multiple text blocks according to the preset text block segmentation size and overlap size; vectorizing each text block separately through the text embedding model, and then uploading it to the knowledge base.
[0032] Step 3: Perform data classification tasks and classify the input text in combination with the updated knowledge base.
[0033] In an embodiment of the present invention, the data classification task is performed by a data classification model. The main work content of the data classification model includes: generating input prompt information based on retrieval-augmented generation (RAG) technology, and classifying input text based on the second largest language model. Specifically, the updated knowledge base is obtained, the retrieval-augmented generation technology is used in combination with the input text to generate input prompt information, and the second largest language model is used to classify the input text based on the input prompt information. The knowledge base is continuously updated through multiple executions of the data generation task to achieve a balanced data category. In addition, the knowledge base used when performing the data classification task is also a knowledge base updated after multiple executions of the data generation task. As a result, the data classification model can more accurately complete the data classification task.
[0034] Preferably, the obtaining of an updated knowledge base and the use of retrieval enhancement generation technology and input text to generate input prompt information includes: after obtaining the updated knowledge base, using the retrieval enhancement generation technology to retrieve k text blocks with the highest similarity to the input text from the updated knowledge base; wherein k is a set value, for example, setting k=4; combining the retrieved k text blocks with the input text to generate input prompt information.
[0035] Preferably, the output end of the second largest language model is configured with a third adapter, and fine-tuning of the second largest language model is achieved by fine-tuning the third adapter; the third adapter includes: a second fully connected layer, a third nonlinear activation layer and a second Softmax layer arranged in sequence; wherein Softmax is a normalized exponential function.
[0036] In the embodiment of the present invention, the data generation task serves the data classification task. Considering that the current existing data is small and there is an extreme imbalance in categories, it is impossible to train a good data classification model. Therefore, the data generation task is introduced. On the one hand, the data amount is increased through the data generation task; on the other hand, when new types of data appear, when a certain type of data in the existing data is small or there is a category imbalance problem, the data generation task can be used to balance the data category distribution, and then use these data for training to obtain a better data classification model.
[0037] In the embodiments of the present invention, the fine-tuning principles of the two large language models are similar. Taking the second large language model as an example, its fine-tuning is achieved by combining the parameters of the second large language model with the third adapter. That is, the third adapter is inserted after the second large language model to achieve fine-tuning of the second large language model. In addition, the two large language models in the embodiments of the present invention are pre-trained models. Users can select the specific type of the two large language models based on actual circumstances, and the present invention does not impose any restrictions. At the same time, during the fine-tuning process of the two large language models, users can select the corresponding dataset for fine-tuning based on the task type of the large language model, and the present invention does not impose any restrictions.
[0038] Those skilled in the art will understand that fine-tuning is a common technical term in this field, which refers to making small adjustments to the parameters of the pre-trained model in combination with the requirements of new tasks (for example, the data generation task and data classification task in the present invention) to make it suitable for the new tasks.
[0039] Those skilled in the art will understand that the outputs of the first Softmax layer and the second Softmax layer are both classification probabilities, and the category with the highest probability value is the classification result.
[0040] Preferably, the method further includes the step of pre-building a knowledge base, the steps including: obtaining railway alarm processing information texts in the database, dividing each railway alarm processing information text into multiple text blocks according to a preset text block segmentation size and overlap size; vectorizing each text block separately through a text embedding model to obtain a corresponding text block vector; and constructing a knowledge base using all the obtained text block vectors. Specifically, before executing the data classification task for the first time, it is necessary to construct a knowledge base according to the above scheme. During the application process, as the data generation task is executed, new railway alarm processing information texts will be continuously generated and the knowledge base will be updated. On the one hand, it can solve the problem of imbalanced categories of railway alarm processing information texts. On the other hand, it can also achieve accurate and reliable classification of railway alarm processing information texts, significantly reducing the labor input required in processing railway alarm processing information text data.
[0041] In the embodiment of the present invention, the first and second are mainly used for identification. For example, the first large language model and the second large language model are mainly used to indicate that two large language models are involved here. In actual applications, the two large language models can be of the same type or of different types. The specific type can be determined by those skilled in the art based on actual conditions or experience, and the present invention does not impose any restrictions.
[0042] In order to more clearly demonstrate the technical solution and technical effects provided by the present invention, the method provided by the embodiment of the present invention is described in detail below with reference to specific embodiments.
[0043] In recent years, advances in deep learning and natural language processing technologies have brought new prospects to the field of artificial intelligence. For example, the ChatGPT (Chat Generation Pre-trained Transformer) large language model released by OpenAI can focus on generative dialogue question and answer. In addition to being able to understand complex semantic questions raised by humans more effectively and accurately, the large language model also supports the expression of multiple heterogeneous knowledge and multi-round semantic interactions, thus realizing true general artificial intelligence. In addition, by conducting self-supervised or semi-supervised training on a large amount of unlabeled text, the large language model can have general capabilities and can perform a wide range of natural language processing tasks. In view of this, the present invention uses the powerful ability of the large language model in text processing to achieve effective mining and analysis of railway alarm processing information text data. Figure 2 The figure shows the overall framework of the present invention, which will be introduced below mainly from the two parts of user intent recognition and model calling.
[0044] 1. User intent identification.
[0045] The input text is first classified by the first adapter to identify the user's intent, thereby performing a data generation or classification task. Typically, to ensure effective application results, the data generation task needs to be executed multiple times, based on the data categories in the database, to ensure balanced data categories (i.e., the amount of data in each category is roughly the same). This process can be guided by the input text. For example, when the amount of data for a certain type (e.g., skylight operation) is small, the input text can be set to "Generate / expand and classify railway alarm processing information text data for the skylight operation category." In this case, after analysis by the first adapter, it determines that the data generation task for the skylight operation category is required. The data generation model is then invoked through an execution agent to generate railway alarm processing information text for the skylight operation category. This increases the amount of data, thereby helping the data classification model to better classify the data. If the first adapter recognizes that the user wants to classify a specific railway alarm processing information text, it invokes the data classification model through an execution agent to classify and display the input text.
[0046] In an embodiment of the present invention, the first adapter primarily includes: a text vectorization operation layer, a first fully connected layer, a first nonlinear activation layer, and a first Softmax (normalized exponential function) layer, arranged in sequence. The text vectorization operation layer here primarily converts input text into vector form; the first fully connected layer primarily performs a linear transformation on the vector output by the text vectorization operation layer; the first nonlinear activation layer primarily performs a nonlinear activation on the processing results of the first fully connected layer to introduce nonlinear factors; and the first Softmax layer outputs a predicted probability to reflect user intent. Since the specific processing solutions involved in this section can be implemented with reference to conventional technologies, they are not described in detail here.
[0047] 2. Knowledge base construction.
[0048] Typically, before invoking the data generation and classification models, the knowledge base must be constructed. Specifically, within the Langchain framework (a development framework driven by a large language model), railway alarm processing information text is loaded from the database and segmented into multiple text blocks based on preset text segmentation and overlap sizes. Each text block is then vectorized using a text embedding model (for example, the text2vec model described above). Finally, the knowledge base is constructed using the vectors of each text block.
[0049] Those skilled in the art will appreciate that the text segmentation size can be understood as the number of characters contained in each text block, and the overlap size represents the number of overlapping characters contained in adjacent text blocks. For example, the text segmentation size can be set to 64 and the overlap size to 32.
[0050] 3. Model call.
[0051] In an embodiment of the present invention, the model call is mainly to call the corresponding model in combination with the user intention. Specifically, if the user intention is a data generation task, the data generation model is called; if the user intention is a data classification task, the data classification model is called.
[0052] The following is a detailed introduction to the working processes of the two types of models.
[0053] 1. The working process of the data generation model.
[0054] When the user intends to perform a data generation task, the data generation model is called by the execution agent, such as Figure 2 As shown in the figure, the data generation model mainly includes keyword extraction, text generation based on the first language model, and text screening. The main steps are as follows.
[0055] (1.1) Keyword extraction: Based on the data category information contained in the input text, all railway alarm processing information texts of the corresponding category are extracted from the database, and keywords are extracted from each railway alarm processing information text through an end-to-end sequence labeling model.
[0056] Exemplarily, the extracted keywords are stored in the following structure: {#keyword1#keyword2#keyword3…}, where the symbol # is mainly used to separate different keywords. The numerical values involved in keywords 1, 2, 3, etc. are codes for different keywords. In the application, keywords 1, 2, and 3 are actual keywords. In addition, the number of extracted keywords is set according to actual conditions, and the present invention does not impose any restrictions.
[0057] For example, the end-to-end sequence labeling model may adopt an LSTM-CNNs-CRF model, which is a hybrid model formed by combining LSTM (long short-term memory neural network), CNNs (convolutional neural network), and CRF (discriminative model).
[0058] (1.2) Text data generation: The extracted multiple keywords are input into the first language model fine-tuned by the second adapter to generate railway alarm processing information text.
[0059] The keywords extracted in step (1.1) above are used as input to the first language model to generate railway alarm processing information text. The first language model is fine-tuned using an efficient parameter method, namely by fine-tuning the second adapter and inserting it at the end of the first language model. The specific structure of the second adapter includes: an information bottleneck layer to compress the data; a second nonlinear activation layer to enhance the nonlinear capabilities of the model through a nonlinear activation function; and an expansion layer to expand the compressed data to the same dimension as the original feature. Since the specific processing scheme involved here can be implemented by referring to conventional technologies, it will not be detailed here.
[0060] (1.3) Generate data filtering: Use filters to screen the data that meets the requirements in the generated railway alarm processing information text and store it in the database and knowledge base.
[0061] In the embodiment of the present invention, the validity of the generated railway alarm processing information text is ensured by screening. The main steps include:
[0062] (1.3.1) Vectorization of existing data: Use the text embedding model to vectorize the existing railway alarm processing information text in the database.
[0063] Exemplarily, the text embedding model may be a text2vec model (text vectorization model).
[0064] (1.3.2) Cluster center calculation: Calculate the mean of all vectors obtained in the above step (1.3.1) as the cluster center.
[0065] (1.3.3) Generate data vectorization: Use the text embedding model to vectorize the railway alarm processing information text generated in the above step (1.2).
[0066] (1.3.4) Similarity measure: The similarity between each vector obtained in the above step (1.3.3) and the cluster center (e.g., cosine similarity).
[0067] (1.3.2) Text screening: If the calculated similarity is greater than the set threshold λ, the corresponding railway alarm processing information text is retained and stored in the database and knowledge base; otherwise, it is discarded.
[0068] Specifically, the cluster center is recorded as A, the vector of the generated single railway alarm processing information text is recorded as B, and the cosine similarity S is calculated by the following formula:
[0069]
[0070] Among them, the symbol Represents the dot product operation, symbol is the norm symbol.
[0071] If the cosine similarity S is greater than the set threshold ,Right now , then the corresponding generated railway alarm processing information text is retained. Otherwise, it means that the corresponding generated railway alarm processing information text does not meet the requirements and is discarded.
[0072] (1.4) Generate data and save it.
[0073] The railway alarm processing information text filtered by the filter is stored in the database and uploaded to update the knowledge base. When updating the knowledge base, each railway alarm processing information text filtered by the filter is processed as follows: it is split into multiple text blocks according to the preset text block segmentation size and overlap size; each text block is then vectorized using a text embedding model (for example, the text2vec model described above); and finally, it is uploaded to the knowledge base.
[0074] At this point, the call of the data generation model is completed. In actual applications, multiple calls to the data generation model can effectively expand and enhance the railway alarm processing information text.
[0075] 2. The working process of the data classification model.
[0076] (2.1) Input prompt information generation: Based on the input text, the top k text blocks with the highest similarity to the input text are retrieved from the updated knowledge base (k is preset to 4 in this invention), and they are combined with the input text to generate input prompt information, thereby improving the classification credibility of the data classification model.
[0077] (2.2) Text classification and recognition: Input the input prompt information generated in the above step (2.1) into the fine-tuned second language model to complete the classification of the input text.
[0078] In an embodiment of the present invention, a third adapter is configured at the output of the second language model, and fine-tuning the second language model is achieved by fine-tuning the third adapter. The third adapter includes: a second fully connected layer, a third nonlinear activation layer, and a second softmax layer, arranged in sequence; to achieve classification of input text.
[0079] The framework of the method provided by the embodiments of the present invention is easy to establish and implement. By leveraging the powerful generative capabilities of a large language model to expand and enhance text data of different categories, this method addresses the imbalance in the classification of railway alarm processing information. Furthermore, combined with enhanced retrieval generation, it integrates input prompts with knowledge base search results, providing a stronger basis for reasoning, improving the credibility of the data classification model and the accuracy of alarm text classification. This method possesses the advantages of scientific rationality, strong applicability, and excellent results.
[0080] Through the above description of the embodiments, those skilled in the art will clearly understand that the above embodiments can be implemented via software or by utilizing software plus a necessary general-purpose hardware platform. Based on this understanding, the technical solutions of the above embodiments can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or mobile hard drive) and includes a number of instructions for enabling a computer device (such as a personal computer, server, or network device) to execute the methods described in various embodiments of the present invention.
[0081] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or any form of implication that the information constitutes prior art already known to those skilled in the art.
Claims
1. A method for recognizing railway alarm processing information text based on a large language model, characterized in that: include: Analyze the input text and identify the user intent contained in the input text; The user intention includes: performing a data generation task or performing a data classification task; If the user intends to perform a data generation task, multiple keywords are obtained from the database based on the data category information contained in the input text, and a railway alarm processing information text is generated through the first language model. Then, the railway alarm processing information text that is finally output is selected in combination with the set screening method to update the database and knowledge base; wherein, the multiple keywords are obtained from the database based on the data category information contained in the input text, including: obtaining all railway alarm processing information texts of corresponding data categories from the database based on the data category information contained in the input text; extracting keywords from each railway alarm processing information text respectively through an end-to-end sequence labeling model, and finally obtaining multiple keywords; the railway alarm processing information text that is finally output is selected in combination with the set screening method. The alarm processing information text includes: vectorizing each railway alarm processing information text in the database through a text embedding model, the vectorization result is called the original data vector, and finally a plurality of original data vectors are obtained; clustering all the original data vectors to obtain cluster centers; vectorizing each generated railway alarm processing information text through a text embedding model, the obtained result is called the generated data vector, and finally a plurality of generated data vectors are obtained; measuring the similarity between each generated data vector and the cluster center through a similarity function; if the similarity is higher than a set threshold, retaining the corresponding generated railway alarm processing information text; otherwise, discarding it; all retained generated railway alarm processing information texts are the final output railway alarm processing information texts; If the user intends to perform a data classification task, an updated knowledge base is obtained, and input prompt information is generated using retrieval enhancement generation technology in combination with the input text. The second largest language model is used to classify the input text according to the input prompt information.
2. The method for recognizing railway alarm processing information text based on a large language model according to claim 1, characterized in that: Analyze the input text and identify the user intent contained in the input text through a pre-trained first adapter; The first adapter includes: a text vectorization operation layer, a first fully connected layer, a first nonlinear activation layer and a first Softmax layer arranged in sequence; wherein Softmax is a normalized exponential function.
3. The method for recognizing railway alarm processing information text based on a large language model according to claim 1, characterized in that: The output end of the first large language model is configured with a second adapter, and the first large language model is fine-tuned by fine-tuning the second adapter; The second adapter includes: an information bottleneck layer, a second nonlinear activation layer and an expansion layer which are arranged in sequence.
4. The method for recognizing railway alarm processing information text based on a large language model according to claim 1, characterized in that: Updated knowledge base includes: Each railway alarm processing information text that is finally output is divided into multiple text blocks according to the preset text block segmentation size and overlap size; Each text block is vectorized separately through the text embedding model and then uploaded to the knowledge base.
5. The method for recognizing railway alarm processing information text based on a large language model according to claim 4 is characterized in that: The obtaining of the updated knowledge base and the use of search enhancement generation technology in combination with the input text to generate input prompt information include: After obtaining the updated knowledge base, the search enhancement generation technology is used to retrieve the k text blocks with the highest similarity to the input text from the updated knowledge base; where k is a set value; Combine the retrieved k text blocks with the input text to generate input prompt information.
6. The method for recognizing railway alarm processing information text based on a large language model according to claim 1, characterized in that: The output end of the second language model is configured with a third adapter, and the second language model is fine-tuned by fine-tuning the third adapter; The third adapter includes: a second fully connected layer, a third nonlinear activation layer, and a second Softmax layer arranged in sequence; wherein Softmax is a normalized exponential function.
7. The method for recognizing railway alarm processing information text based on a large language model according to claim 1, characterized in that: It also includes the steps for pre-building the knowledge base, including: Obtaining railway alarm processing information texts from a database, and dividing each railway alarm processing information text into a plurality of text blocks according to a preset text block segmentation size and overlap size; Each text block is vectorized separately through the text embedding model to obtain the corresponding text block vector; The knowledge base is constructed using all the obtained text block vectors.
Citation Information
Patent Citations
Railway signal monitoring data generation method and system
CN119128802A
Attention mechanism-based domain large model knowledge base classification and construction method
CN117573829A
Credit business system evolution method and device based on large model RAG technology
CN119204205A