Data processing method and apparatus, and electronic device

By constructing prompts for task information and retrieving from the nuclear power knowledge base, the processing flow of the large language model was optimized, solving the problems of low accuracy and reliance on manual judgment in nuclear power plant event document processing, and achieving more efficient and accurate event document processing.

CN122432325APending Publication Date: 2026-07-21CHINA GENERAL NUCLEAR POWER OPERATION
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA GENERAL NUCLEAR POWER OPERATION
Filing Date
2026-03-20
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in nuclear power plant incident documentation processing, and relying on manual judgment is inefficient and subject to subjective risks.

Method used

The system constructs a first prompt word containing task information, extracts entity words from nuclear power plant event documents, retrieves relevant knowledge from a pre-built nuclear power knowledge base, generates a second prompt word, and guides the large language model for processing.

Benefits of technology

This improved the semantic understanding and processing accuracy of the large language model for nuclear power plant event documents, enabling more targeted event document processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432325A_ABST
    Figure CN122432325A_ABST
Patent Text Reader

Abstract

The application is suitable for the field of nuclear power data processing, and provides a data processing method and device and electronic equipment, comprising: constructing a first prompt word, the first prompt word comprising task information; obtaining an event document of a nuclear power plant; extracting an entity word from the event document; retrieving knowledge corresponding to the entity word from a pre-constructed knowledge base, the knowledge base being used for storing knowledge related to nuclear power; obtaining a second prompt word according to the retrieved knowledge and the first prompt word; and guiding a preset large language model to process the event document according to the second prompt word, to obtain a processing result corresponding to the task information. Through the above method, the accuracy of the processing result of the event document can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of nuclear power data processing technology, and in particular relates to data processing methods, apparatus, electronic equipment, computer-readable storage media and computer program products. Background Technology

[0002] In nuclear power plants, the fundamental philosophy of nuclear safety is a combination of multiple barriers and redundancy. The reliability of any barrier or system will decay over time, and overhauls are the only way to proactively restore reliability. Operators and supervisors involved in overhauls promptly record any abnormal events on-site, obtaining corresponding event documents. Processing these event documents (such as classifying, summarizing, and trend analyzing them) can greatly improve event response speed, aid in root cause analysis, and support decision-making.

[0003] Currently, the processing of nuclear power plant event documents relies heavily on human judgment by experts, which not only presents efficiency bottlenecks but also introduces subjective risks. To address this issue, the industry has attempted to automate the processing using pre-trained language models such as fine-tuned Bidirectional Encoder Representations from Transformers (BERT) based on a self-attention neural network architecture and the Robustly Optimized BERT Approach (RoBERTa). However, these language models still struggle to accurately process nuclear power plant event documents. Summary of the Invention

[0004] This application provides a data processing method, apparatus, and electronic device that can solve the problem of low accuracy in the processing of nuclear power event documents by existing methods.

[0005] In a first aspect, embodiments of this application provide a data processing method, including: Construct a first prompt word, which includes task information; Obtain event documentation from a nuclear power plant; Extract entity words from the event document; Retrieve knowledge corresponding to the entity words from a pre-built knowledge base, which is used to store knowledge related to nuclear power; Based on the retrieved knowledge and the first prompt word, the second prompt word is obtained; Guided by the second prompt word, a preset large language model is used to process the event document in accordance with the task information, and the processing result is obtained.

[0006] The beneficial effects of the embodiments in this application compared with the prior art are: In this embodiment, entity words are extracted from the acquired nuclear power plant event documents, and knowledge corresponding to these entity words is retrieved from a pre-built knowledge base storing nuclear power-related knowledge. After constructing a first prompt word including task information, a second prompt word is obtained based on the retrieved knowledge and the first prompt word. This second prompt word guides a pre-defined large language model to process the event documents in accordance with the task information, resulting in a processing result. Since the second prompt word is obtained based on the retrieved nuclear power-related knowledge and the first prompt word, it also includes the retrieved nuclear power-related knowledge and task information. This enables the large language model to possess nuclear power-related knowledge when processing the event documents, thus enhancing its semantic understanding of nuclear power plant event documents. Furthermore, since the first prompt word includes task information, the large language model's processing of nuclear power plant event documents becomes more targeted. In other words, optimizing the prompt words of the large language model in this way improves the accuracy of the processing results.

[0007] Secondly, embodiments of this application provide a data processing apparatus, including: The first prompt word construction module is used to construct the first prompt word, which includes task information; The event document acquisition module is used to acquire event documents from nuclear power plants. The entity word extraction module is used to extract entity words from the event document; The knowledge retrieval module is used to retrieve knowledge corresponding to the entity words from a pre-built knowledge base, which is used to store knowledge related to nuclear power. The second prompt word construction module is used to obtain the second prompt word based on the retrieved knowledge and the first prompt word; The processing module is used to process the event document in accordance with the task information based on the second prompt word and a preset large language model, so as to obtain the processing result.

[0008] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.

[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0010] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in the first aspect.

[0011] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0013] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a method for constructing a first prompt word according to an embodiment of this application; Figure 3 This is a flowchart illustrating a method for constructing a third prompt word according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0014] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0015] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0016] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0017] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0018] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0019] Nuclear power plants are facilities that convert nuclear energy into electrical energy. To improve the safety of nuclear power plants, timely inspections and maintenance are necessary. Operators and supervisors will document the events that occur during these inspections and maintenance.

[0020] If a fine-tuned language model is used to process nuclear power plant event documents, the training of this type of language model, which is supervised learning, requires a large amount of high-quality labeled data. However, nuclear power plant event documents are highly specialized, and the labeling work must be completed by domain experts. Therefore, the training cost is high and the cycle is long. More challenging is that the already scarce samples of rare and abnormal events further exacerbate the data imbalance problem, making it difficult for the language model to effectively learn the features of these key scenarios, thus hindering the accurate processing of nuclear power plant event documents.

[0021] To improve the accuracy of processing event documents for nuclear power plants, embodiments of this application provide a data processing method.

[0022] The data processing method provided in the embodiments of this application is described below with reference to the accompanying drawings.

[0023] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application is shown. This data processing method can be applied to electronic devices, and is described in detail below: S11, construct the first prompt word, which includes task information.

[0024] The task information described above clarifies the specific processing required by the subsequent Large Language Model (LLM) of the event documents. For example, when the task information indicates that the current task is a classification task, the LLM will classify the corresponding event documents. When the task information is a classification task, the information corresponding to the task information in the first prompt could be: "Abnormal events at nuclear power plants can be classified into the following categories: industrial safety, radiation protection, and fire management. The industrial safety category includes subcategories such as: working at height, crane operations, and electrical work; the radiation protection category includes subcategories such as: personnel contamination control, equipment contamination control, and ground contamination control; and the fire management category includes subcategories such as: hot work, fire barrier management, fire evacuation, and fire load control. Classify the following event documents."

[0025] The LLM mentioned above generally refers to a pre-trained language model with more than one billion (1B) parameters. Its core features include: the emergent ability obtained through training on large-scale data, and the versatility to handle a variety of natural language understanding and generation tasks.

[0026] Optionally, the first prompt word mentioned above may include at least one of the following information in addition to task information: identity information, format requirements, and output requirements.

[0027] The aforementioned identity information refers to the role played by the large language model in subsequent processing of the event document. For example, if the event document is text from a nuclear power plant, the aforementioned identity information could be "nuclear power plant safety analysis expert," and the information corresponding to this identity information in the first prompt could be "You are a nuclear power plant safety analysis expert." Because the first prompt includes identity information, the large language model's thinking and knowledge context can be locked within the professional field of nuclear power plants.

[0028] The aforementioned format requirements refer to information used to constrain the specific format of subsequent LLM outputs. The specific format of the LLM output data can be determined based on the specific format of data that the downstream system can directly parse or utilize. For example, using the format of data that the downstream system can directly parse or utilize as the format of the LLM output data enables the downstream system to quickly parse or utilize the LLM output data.

[0029] The aforementioned output requirements refer to the requirements for the content output by LLM. These requirements specify the quality standards that the generated content must meet in terms of professionalism, accuracy, and conciseness, in order to ensure the reliability of the LLM output results.

[0030] When the first prompt word includes identity information, task information, format requirements, and output requirements, the construction process of the first prompt word can be as follows: Figure 2 As shown. In Figure 2 Including: S21, Construct identity information.

[0031] S22, Construct task information.

[0032] S23, Construction format requirements.

[0033] S24, construct the output requirements.

[0034] S25, Construct the first prompt word.

[0035] Since the aforementioned identity and task information can help LLM accurately understand task requirements, and the aforementioned format and output requirements help improve the standardization of output results, when the first prompt includes identity information, task information, format requirements, and output requirements, it is beneficial to guide LLM to output more correct processing results through the first prompt.

[0036] S12, retrieve the event documents of the nuclear power plant.

[0037] The aforementioned event document is a text file recording events at the nuclear power plant. For example, this event document could be a text file recording events during a nuclear power plant maintenance period. The recorded events can be either abnormal or normal events. Optionally, this event document can record one event or multiple events; this is not limited here.

[0038] In this embodiment of the application, the obtained event document is the text to be processed, and its quantity can be 1 or more than 1, which is not limited here.

[0039] S13, extract entity words from the above event document.

[0040] In this embodiment, entity words of the event document can be extracted using a preset entity word extraction model. Specifically, prompt words for entity recognition tasks are constructed, and the semantic understanding capability of the entity word extraction model is stimulated based on these prompt words. The entity word extraction model is then used to extract key entity words from the event document, such as professional terms in the nuclear power field and technical categories.

[0041] Optionally, the entity word extraction model described above can be a graph neural network-based model or a large language model. For example, suppose the event document uses... This indicates that the function mapping of the large language model adopts... This indicates that the extracted entity word sequence uses... If it means: .

[0042] In addition, the entity words of the event document can also be extracted by regular expressions or dictionary matching in the embodiments of this application, which is not limited here.

[0043] S14, retrieve the knowledge corresponding to the above entity words from the pre-built knowledge base.

[0044] In this embodiment of the application, considering that the LLM lacks nuclear power knowledge and cannot accurately understand the semantic content of nuclear power plant event documents, a knowledge base containing nuclear power knowledge can be constructed to retrieve professional knowledge from external knowledge bases.

[0045] The aforementioned knowledge base can be constructed as follows: Systematically collect authoritative materials in the nuclear power field, such as professional books, technical reports, and industry standards (these authoritative materials can be in text, audio / video, or image format), convert the collected authoritative materials into document data, and preprocess this document data. This preprocessing includes operations such as sentence segmentation, paragraphing, and stop word removal to form structured document storage. Specifically, this structured document storage can be achieved by storing knowledge using the smallest semantic units, and allowing knowledge to be associated through graphs or identifiers, supporting reasoning queries through traversal relationships, etc. Because the knowledge base stores structured documents, it helps ensure the integrity of the structure of the retrieved knowledge.

[0046] In this embodiment, when an entity word is extracted from an event document, it is only necessary to retrieve the knowledge corresponding to that entity word from a pre-built knowledge base. For example, the knowledge most similar to that entity word in the knowledge base can be used as the retrieved knowledge. When more than one entity word is extracted from an event document, for each entity word, the knowledge corresponding to that entity word is retrieved from the knowledge base to improve the comprehensiveness of the retrieved knowledge.

[0047] In this embodiment of the application, to improve the accuracy of the retrieved knowledge, a corresponding weight can be assigned to each entity word, and / or the contextual relevance of each entity word in the event document can be determined, and then knowledge retrieval can be performed based on the weight and / or contextual relevance. That is, the above-mentioned retrieval of knowledge corresponding to the above-mentioned entity words from the pre-built knowledge base includes: Based on the weight of the aforementioned entity words and / or the contextual relevance of the aforementioned entity words in the aforementioned event document, retrieve the knowledge corresponding to the aforementioned entity words from the pre-built knowledge base.

[0048] The weight of the aforementioned entity words can be determined based on the importance of the entity word. For example, important entity words (such as the technical term "fusion") are given higher weights, while unimportant entity words (such as "unit") are given lower weights.

[0049] The aforementioned entity word's contextual relevance in the event document is used to measure the strength of the association between the entity word and its surrounding words in terms of semantics, syntax, event logic, etc. That is, when measuring, it not only includes "nearby" in terms of physical distance, but also emphasizes semantic relevance.

[0050] In this embodiment, considering that the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm not only focuses on the importance of entity words but also implicitly considers a certain degree of contextual relevance, the TF-IDF algorithm can be used for entity word matching when retrieving knowledge corresponding to an entity word from a pre-built knowledge base based on the entity word's weight and its contextual relevance in the event document. That is: Assumption It is a entity word (Should Documents extracted from event documents and found in the knowledge base The number of times it appears in It is the total number of documents in the knowledge base. It is a collection of documents in a knowledge base. It contains entity words If the number of documents is: ; = ; .

[0051] Among them, when The larger it is, the more likely it is to be a large number. In the document The more important it is, the more it can be used at this time. The knowledge from the corresponding document is used as the retrieved knowledge.

[0052] S15. Based on the retrieved knowledge and the first prompt word mentioned above, the second prompt word is obtained.

[0053] In this embodiment, the second prompt word contains all the information of the first prompt word. Specifically, the retrieved knowledge can be embedded into some of the information contained in the first prompt word to generate the second prompt word. For example, when the first prompt word contains identity information, the retrieved knowledge can be embedded into that identity information. Of course, the knowledge can also be concatenated with the first prompt word to generate the second prompt word. For example, the first prompt word can be set to also include background knowledge, and the retrieved knowledge can be filled into the background knowledge to achieve the concatenation of knowledge with the first prompt word.

[0054] Since the retrieved knowledge is professional knowledge related to nuclear power, generating a second prompt word based on the retrieved knowledge and the first prompt word is equivalent to knowledge enhancement of the first prompt word, which helps guide the LLM model to process event documents.

[0055] In some embodiments, considering that the retrieved knowledge may contain some words with low relevance, the retrieved knowledge can be simplified before generating a second suggestion word based on the simplified knowledge. That is: the second suggestion word is obtained based on the retrieved knowledge and the first suggestion word, including: Extract key information from the retrieved knowledge; based on the key information and the first prompt word, obtain the second prompt word.

[0056] The aforementioned key information refers to the most valuable specific data or rules selected from the retrieved knowledge. Specifically, information directly related to entity words (i.e., entity words extracted from the aforementioned event documents), containing specific numerical values ​​or operational steps, and having decision-making guidance significance can be considered as key information in the knowledge. For example, assuming the entity word is "bearing temperature," and the matched document is "Bearing Temperature High Alarm Handling Guide," and assuming this document contains the following information: information related to the scope and purpose of the guide, normal bearing temperature range: 45-65℃, alarm threshold: 80℃, emergency shutdown condition: >95℃ for 5 minutes, and relevant references, then the key information extracted from this document could be: "Normal bearing temperature range: 45-65℃," "Alarm threshold: 80℃," and "Emergency shutdown condition: >95℃ for 5 minutes."

[0057] After extracting the key information of the knowledge, a second prompt word is generated based on the key information and the first prompt word. Specifically, the key information can be embedded into part of the information contained in the first prompt word to generate the second prompt word, or the key information can be concatenated with the first prompt word to generate the second prompt word; there is no limitation here.

[0058] S16, based on the second prompt word, the preset large language model is used to process the event document in accordance with the task information, and the processing result is obtained.

[0059] In this embodiment of the application, the second prompt word and the event document are used as input to a large language model (LLM). The LLM analyzes the second prompt word, extracts the task information contained in the second prompt word, and processes the event document based on the task indicated by the task information and the retrieved nuclear power-related knowledge, and then outputs the processing result corresponding to the event document.

[0060] Of course, if the first prompt word also includes at least one of the following information: identity information, format requirements, and output requirements, that is, the second prompt word also includes the corresponding information (such as when the first prompt word includes identity information, the second prompt word also includes identity information), then after the LLM analyzes the second prompt word, in addition to extracting the task information, it can also extract at least one of the identity information, format requirements, and output requirements contained therein. Based on the information extracted by the LLM and combined with the retrieved nuclear power-related knowledge, the event document is processed accordingly, and then the processing result corresponding to the event document is output.

[0061] In this embodiment, entity words are extracted from the acquired nuclear power plant event documents, and knowledge corresponding to these entity words is retrieved from a pre-built knowledge base storing nuclear power-related knowledge. After constructing a first prompt word including task information, a second prompt word is obtained based on the retrieved knowledge and the first prompt word. This second prompt word guides a pre-defined large language model to process the event documents in accordance with the task information, resulting in a processing result. Since the second prompt word is obtained based on the retrieved nuclear power-related knowledge and the first prompt word, it also includes the retrieved nuclear power-related knowledge and task information. This enables the large language model to possess nuclear power-related knowledge when processing the event documents, thus enhancing its semantic understanding of nuclear power plant event documents. Furthermore, since the first prompt word includes task information, the large language model's processing of nuclear power plant event documents becomes more targeted. In other words, optimizing the prompt words of the large language model in this way improves the accuracy of the processing results.

[0062] In this embodiment, the processing of event documents includes classification, summarization, trend analysis, etc. If it is necessary to classify the events recorded in the event file, when constructing the first prompt word, the task information of the first prompt word is set to include classification task information. Correspondingly, the above processing result includes the classification result. If the classification result indicates that the event document corresponds to multiple categories, that is, the large language model can only determine that the event document corresponds to multiple categories, then the large language model needs to have more information to improve the large language model's ability to obtain the specific classification of the event document. That is, after the above-mentioned processing result is obtained by guiding the preset large language model to process the event document according to the above-mentioned task information based on the above-mentioned second prompt word, the processing further includes: The second prompt word is optimized to obtain the third prompt word; based on the third prompt word, the preset large language model is used to process the event document in accordance with the classification task information.

[0063] In this embodiment of the application, the third prompt word obtained by optimizing the second prompt word may include the following additional information in addition to the information included in the second prompt word: defining boundary cases of similar classification, explaining the processing strategy for unknown or ambiguous samples, adding discriminative features to each category, providing typical examples and counterexamples, etc.

[0064] Since the third prompt is an optimized version of the second prompt, it must contain more effective information than the second prompt. Under the assumption that information content is positively correlated with model performance, the accuracy of the LLM in processing event documents after inputting the third prompt should be no less than the accuracy of the LLM in processing event documents after inputting the second prompt.

[0065] Optionally, the second prompt word can be optimized by adding documents similar to the event document and their corresponding category tags. In this case, the optimization of the second prompt word to obtain the third prompt word is as follows: Figure 3 As shown: S31. Vectorize the above event documents.

[0066] In this embodiment, one of the following methods can be used to encode the event document into a high-dimensional vector representation: bag-of-words model, shallow neural network, or pre-trained language model (such as BERT, Sentence-Bidirectional Encoder Representations from Transformers, Sentence-BERT). For example, if BERT encoding is used, the event document can be... x Mapped to vector ,in: ,Should For vector dimensions.

[0067] S32. Calculate the similarity between the vectorized event document and the event vector in the pre-built event library, wherein the event library is used to store event vectors and event samples and category labels corresponding to the event vectors.

[0068] The above event library can be built in the following ways: (1) Collect and organize event documents (such as event documents recording abnormal events) from nuclear power plant maintenance reports (such as overhaul reports), with each event document recording one event. Manually annotate the events in the collected event documents to obtain event documents with category labels. To simplify the name, event documents with category labels are referred to as event samples.

[0069] (2) The collected event documents are text encoded to convert them into high-dimensional vector representations, thus obtaining event vectors. The specific form of text encoding can be found in S31, and will not be repeated here.

[0070] (3) Store the event sample and the event vector corresponding to the event sample in the event library.

[0071] After constructing the event library, the similarity between the vector of the event document and each event vector in the event library can be calculated. This similarity can include one of the following: distance similarity, cosine similarity, Chebyshev distance, etc., which is not limited here.

[0072] Taking cosine similarity as an example, assuming the vector of the event document uses... This indicates that the event vector corresponding to a certain event sample in the event database is... Indicate, then and The cosine similarity is: .

[0073] in, Indicates the event library number There are event vectors, and the total number of event vectors in the event library is . .

[0074] S33. Based on the above similarity, determine the event samples and category tags that are similar to the above event documents.

[0075] In this embodiment of the application, event samples similar to event documents can be filtered by setting similarity requirements. Specifically, after calculating the similarity between the event document and the event sample, the calculated similarity is compared with the similarity requirements, and all event samples and category labels corresponding to the similarity that meet the similarity requirements are determined.

[0076] The similarity requirements mentioned above may include the highest similarity, or the similarity being greater than a preset similarity threshold. Of course, the similarity requirements may also include other information, which is not limited here.

[0077] S34. Based on the determined event sample, category label, and the second prompt word mentioned above, the third prompt word mentioned above is obtained.

[0078] In this embodiment, the event sample and category label can be embedded into the partial information contained in the second prompt word to generate the third prompt word, or the event sample and category label can be concatenated with the second prompt word to generate the third prompt word; there is no limitation here.

[0079] Since the identified event samples are similar to the event document, when the third prompt word is obtained based on the identified event samples, category labels, and the second prompt word, it is equivalent to optimizing the second prompt word by adding event samples similar to the event document and their corresponding category labels. When the large language model processes the event document based on the third prompt word, it can obtain the category labels of event samples similar to the event document from the third prompt word, thus facilitating a more accurate classification of the event document.

[0080] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0081] Corresponding to the data processing method described in the above embodiments, Figure 4 This diagram illustrates a structural block diagram of a data processing apparatus provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0082] Reference Figure 4 The data processing device 4 is applied to an electronic device and includes: a first prompt word construction module 41, an event document acquisition module 42, an entity word extraction module 43, a knowledge retrieval module 44, a second prompt word construction module 45, and a first processing module 46. Wherein: The first prompt word construction module 41 is used to construct the first prompt word, which includes task information.

[0083] Event document acquisition module 42 is used to acquire event documents of nuclear power plants.

[0084] The entity word extraction module 43 is used to extract entity words from the above event documents.

[0085] The knowledge retrieval module 44 is used to retrieve knowledge corresponding to the above-mentioned entity words from a pre-built knowledge base, which is used to store knowledge related to nuclear power.

[0086] The second prompt word construction module 45 is used to obtain the second prompt word based on the retrieved knowledge and the first prompt word mentioned above.

[0087] The first processing module 46 is used to process the event document corresponding to the task information according to the preset large language model guided by the second prompt word, and obtain the processing result.

[0088] In this embodiment, entity words are extracted from the acquired nuclear power plant event documents, and knowledge corresponding to these entity words is retrieved from a pre-built knowledge base storing nuclear power-related knowledge. After constructing a first prompt word including task information, a second prompt word is obtained based on the retrieved knowledge and the first prompt word. This second prompt word guides a pre-defined large language model to process the event documents in accordance with the task information, resulting in a processing result. Since the second prompt word is obtained based on the retrieved nuclear power-related knowledge and the first prompt word, it also includes the retrieved nuclear power-related knowledge and task information. This enables the large language model to possess nuclear power-related knowledge when processing the event documents, thus enhancing its semantic understanding of nuclear power plant event documents. Furthermore, since the first prompt word includes task information, the large language model's processing of nuclear power plant event documents becomes more targeted. In other words, optimizing the prompt words of the large language model in this way improves the accuracy of the processing results.

[0089] Optionally, the aforementioned first prompt word also includes at least one of the following information: identity information, format requirements, and output requirements, and the aforementioned processing module 46 is specifically used for: Based on the second prompt word mentioned above, the pre-set large language model is used to process the event document in accordance with the task information and at least one of the following: identity information, format requirements, and output requirements.

[0090] Optionally, if the number of the aforementioned entity words is greater than 1, the aforementioned knowledge retrieval module 44 is specifically used for: For each of the above entity words, retrieve the knowledge corresponding to the above entity word from the pre-built knowledge base.

[0091] Optionally, the knowledge retrieval module 44 described above is specifically used for: Based on the weight of the aforementioned entity words and / or the contextual relevance of the aforementioned entity words in the aforementioned event document, retrieve the knowledge corresponding to the aforementioned entity words from the pre-built knowledge base.

[0092] Optionally, the second prompt word construction module 45 mentioned above includes: The key information extraction unit is used to extract key information from the retrieved knowledge.

[0093] The second prompt word generation unit is used to obtain the second prompt word based on the above key information and the above first prompt word.

[0094] Optionally, the task information includes categorized task information, and correspondingly, the processing result includes categorization results; if the categorization results indicate that the event document corresponds to multiple categories, then the data processing apparatus 4 provided in this embodiment further includes: The second prompt word optimization module is used to optimize the second prompt word to obtain the third prompt word after the event document is processed according to the preset large language model guided by the second prompt word to correspond to the task information and the processing result is obtained.

[0095] The second data processing module is used to process the event document according to the third prompt word, guided by a preset large language model, to correspond with the classification task information.

[0096] Optionally, the aforementioned second prompt word optimization module includes: The vectorization unit is used to vectorize the aforementioned event documents.

[0097] The similarity calculation unit is used to calculate the similarity between the vectorized event document and the event vector in the pre-built event library, wherein the event library is used to store event vectors and event samples and category labels corresponding to the event vectors.

[0098] The similar event sample determination unit is used to determine event samples and category tags that are similar to the event documents mentioned above, based on the aforementioned similarity.

[0099] The third prompt word generation unit is used to obtain the third prompt word based on the determined event sample, category label, and the second prompt word.

[0100] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0101] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 5 of this embodiment includes: at least one processor 50 ( Figure 5 The diagram shows only one processor, a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 executes the computer program 52 to implement the steps in any of the above method embodiments.

[0102] The electronic device 5 can be a desktop computer, laptop, handheld computer, or cloud server, etc. This electronic device may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will understand that... Figure 5 This is merely an example of electronic device 5 and does not constitute a limitation on electronic device 5. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.

[0103] The processor 50 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0104] In some embodiments, the memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. In other embodiments, the memory 51 may be an external storage device of the electronic device 5, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 5. Furthermore, the memory 51 may include both internal and external storage units of the electronic device 5. The memory 51 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 51 can also be used to temporarily store data that has been output or will be output.

[0105] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0106] This application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.

[0107] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described method embodiments.

[0108] This application provides a computer program product that, when run on an electronic device, enables the electronic device to implement the steps described in the various method embodiments above.

[0109] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0110] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0111] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0112] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or 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; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0113] 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.

[0114] It should be noted that the information collection process (such as the facial image collection process, fingerprint information collection process, etc.) / feature extraction process involved in this application is carried out with the user's knowledge and permission. That is, the information collection process / feature extraction process complies with the requirements of laws and regulations and does not constitute an act that harms the public interest.

Claims

1. A data processing method, characterized in that, include: Construct a first prompt word, which includes task information; Obtain event documentation from a nuclear power plant; Extract entity words from the event document; Retrieve knowledge corresponding to the entity words from a pre-built knowledge base, which is used to store knowledge related to nuclear power; Based on the retrieved knowledge and the first prompt word, the second prompt word is obtained; Guided by the second prompt word, a preset large language model is used to process the event document in accordance with the task information, and the processing result is obtained.

2. The data processing method as described in claim 1, characterized in that, The first prompt word also includes at least one of the following information: identity information, format requirements, and output requirements. The step of guiding the preset large language model based on the second prompt word to process the event document in accordance with the task information includes: Guided by the second prompt word, a preset large language model processes the event document to correspond to the task information and at least one of the following: identity information, format requirements, and output requirements.

3. The data processing method as described in claim 1, characterized in that, The number of entity words is greater than 1, and the step of retrieving knowledge corresponding to the entity words from the pre-built knowledge base includes: For each entity word, retrieve the knowledge corresponding to the entity word from a pre-built knowledge base.

4. The data processing method as described in claim 1, characterized in that, The step of retrieving knowledge corresponding to the entity word from a pre-built knowledge base includes: Based on the weight of the entity word and / or the contextual relevance of the entity word in the event document, retrieve the knowledge corresponding to the entity word from the pre-built knowledge base.

5. The data processing method as described in claim 1, characterized in that, The step of obtaining the second prompt word based on the retrieved knowledge and the first prompt word includes: Extract key information from the retrieved knowledge; Based on the key information and the first prompt word, the second prompt word is obtained.

6. The data processing method according to any one of claims 1 to 5, characterized in that, The task information includes categorized task information, and correspondingly, the processing result includes categorization results; if the categorization results indicate that the event document corresponds to multiple categories, then after the process of processing the event document according to the preset large language model guided by the second prompt word in accordance with the task information to obtain the processing result, the process further includes: Optimize the second prompt word to obtain the third prompt word; The event document is processed according to the classification task information based on the third prompt word, guided by a preset large language model.

7. The data processing method as described in claim 6, characterized in that, The optimization of the second prompt word to obtain the third prompt word includes: The event document is vectorized; Calculate the similarity between the vectorized event document and the event vectors in the pre-built event library, wherein the event library is used to store event vectors and event samples and category labels corresponding to the event vectors; Based on the similarity, determine event samples and category tags that are similar to the event document; The third prompt word is obtained based on the determined event sample, category label, and the second prompt word.

8. A data processing apparatus, characterized in that, include: The first prompt word construction module is used to construct the first prompt word, which includes task information; The event document acquisition module is used to acquire event documents from nuclear power plants. The entity word extraction module is used to extract entity words from the event document; The knowledge retrieval module is used to retrieve knowledge corresponding to the entity words from a pre-built knowledge base, which is used to store knowledge related to nuclear power. The second prompt word construction module is used to obtain the second prompt word based on the retrieved knowledge and the first prompt word; The processing module is used to process the event document in accordance with the task information based on the second prompt word and a preset large language model, so as to obtain the processing result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, Includes a computer program, which, when run, causes the electronic device to perform the method according to any one of claims 1 to 7.