Engineering machinery large language model retrieval enhancement generation method and system thereof
By performing entity recognition and binary classification of construction machinery texts and combining knowledge graph judgments, the problem of low accuracy in answering large language models in the field of construction machinery is solved, and a more accurate search and enhanced generation method is achieved, ensuring the accuracy of search results. .
Patent Information
- Application Number
- CN202411370421.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-03
AI Technical Summary
In the field of engineering machinery, general large-scale language models have low accuracy in question-and-answer results, resulting in the search enhancement generation method that cannot guarantee the accuracy of search results.
By identifying and combining the relevant texts of the construction machinery input by the user, performing two binary classifications to determine the category to which the text belongs, and using the construction machinery knowledge graph to assist in judgment, ensuring the accuracy of the classification results, and finally the combined entity categories and classifications are combined The results are entered into the large language model to generate more accurate results.
It improves the accuracy of the response of the large language model of engineering machinery and ensures the accuracy and reliability of search results.
Smart Images

Figure CN119249204A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of engineering machinery, and in particular to an engineering machinery large language model retrieval enhancement generation method, an engineering machinery large language model retrieval enhancement generation system, an electronic device, and a machine-readable storage medium. Background Art
[0002] Due to the special structure and data confidentiality of the engineering machinery field, the question-answering results obtained by directly applying the large-scale language model in the general field to the engineering machinery field are not sufficient to meet the usage requirements. In addition, the engineering machinery field has high requirements for data accuracy, so the hallucination problem of the large model will cause the performance of the general model to not meet the requirements. Although the current retrieval enhancement generation method can effectively reduce hallucinations and ensure the breadth of search results, it cannot guarantee the accuracy of its results. Therefore, it is particularly important to construct an effective retrieval enhancement generation method in the engineering machinery field to improve the accuracy of search results. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method for enhancing the generation of a large language model retrieval of engineering machinery, a system for enhancing the generation of a large language model retrieval of engineering machinery, an electronic device, and a machine-readable storage medium, so as to partially or completely solve the problem of low accuracy of the retrieval results of large prediction models of engineering machinery in the prior art.
[0004] In order to achieve the above-mentioned objectives, the first aspect of the present application provides a method for retrieval enhancement and generation of a large language model for engineering machinery.
[0005] In an embodiment of the present application, the method includes: performing entity recognition on the engineering machinery-related text input by the user to obtain the engineering machinery-related entities in the user-input text; combining the engineering machinery-related entities in the user-input text according to their order in the engineering machinery-related text input by the user to obtain a combined text; performing a first binary classification and a second binary classification on the combined text to obtain a custom category to which the combined text belongs; according to the engineering machinery-related entities in the user-input text and the engineering machinery knowledge graph, obtaining the category corresponding to the engineering machinery-related text input by the user in the engineering machinery knowledge graph; when the entity category of the engineering machinery-related entity in the user-input text is consistent with the custom category to which the combined text belongs, the two are combined and input into the engineering machinery large language model to obtain a model generation result.
[0006] Optionally, the method also includes: when the entity category of the engineering machinery related entity in the user input text does not conform to the custom category to which the combined text belongs, splicing the input related data queried from the engineering machinery knowledge graph with the engineering machinery related text input by the user, and repeating the first binary classification and the second binary classification of the combined text and the subsequent steps until the entity category of the engineering machinery related entity in the user input text conforms to the custom category to which the combined text belongs.
[0007] Optionally, performing a first binary classification and a second binary classification on the combined text to obtain a custom category to which the combined text belongs includes: performing a first binary classification on the combined text to obtain a custom category corresponding to the first binary classification, and the custom category corresponding to the first binary classification includes data and knowledge; when the custom category corresponding to the first binary classification is data, performing a second binary classification on the combined text to obtain a custom category corresponding to the data, and the custom category corresponding to the data includes working conditions and analysis; or, when the custom category corresponding to the first binary classification is knowledge, performing a second binary classification on the combined text to obtain a custom category corresponding to the knowledge, and the custom category corresponding to the knowledge is fault and maintenance.
[0008] Optionally, the method also includes: when the custom category obtained by performing the second binary classification of the combined text is working condition, obtaining the working condition data corresponding to the engineering machinery related entities in the user input text; or, when the custom category obtained by performing the second binary classification of the combined text is analysis, obtaining the analysis model corresponding to the engineering machinery related entities in the user input text, and obtaining the analysis results corresponding to the engineering machinery related entities in the user input text.
[0009] Optionally, the method also includes: when the custom category obtained by performing a second binary classification on the combined text is fault, obtaining a fault handling method corresponding to the engineering machinery related entities in the user input text; or, when the custom category obtained by performing a second binary classification on the combined text is maintenance, obtaining maintenance knowledge corresponding to the engineering machinery related entities in the user input text.
[0010] Optionally, obtaining the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph based on the engineering machinery related entities in the user input text and the engineering machinery knowledge graph includes: obtaining multiple entity categories of the engineering machinery related entities in the user input text based on the engineering machinery related entities in the user input text; grouping the engineering machinery related entities in the user input text belonging to the same entity category, and inputting the grouped engineering machinery related entities in the user input text into the engineering machinery knowledge graph to obtain the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph.
[0011] According to a second aspect of the present application, there is provided a large language model retrieval enhancement generation system for engineering machinery, the system comprising: a first acquisition module, for performing entity recognition on engineering machinery-related text input by a user, and obtaining engineering machinery-related entities in the user-input text; a second acquisition module, for combining the engineering machinery-related entities in the user-input text according to their order in the engineering machinery-related text input by the user, and obtaining a combined text; a third acquisition module, for performing a first binary classification and a second binary classification on the combined text, and obtaining a custom category to which the combined text belongs; a fourth acquisition module, for obtaining, based on the engineering machinery-related entities in the user-input text and the engineering machinery knowledge graph, the category corresponding to the engineering machinery-related text input by the user in the engineering machinery knowledge graph; and a generation module, for combining the two and inputting them into the engineering machinery large language model to obtain a model generation result when the entity category of the engineering machinery-related entities in the user-input text matches the custom category to which the combined text belongs.
[0012] Optionally, the system also includes: an execution module, which is used to splice the input related data queried from the engineering machinery knowledge graph with the engineering machinery related text input by the user when the entity category of the engineering machinery related entity in the user input text does not conform to the custom category to which the combined text belongs, and repeatedly perform the first binary classification and the second binary classification of the combined text and the subsequent steps until the entity category of the engineering machinery related entity in the user input text conforms to the custom category to which the combined text belongs.
[0013] The third aspect of the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the engineering machinery large language model retrieval enhancement generation method as described.
[0014] A fourth aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the engineering machinery large language model retrieval enhancement generation method.
[0015] Through the above technical scheme, the present invention extracts entities from the engineering machinery related text input by the user, and then combines the entities into text. The combined text is classified twice by a binary classification model to obtain the category to which the input text belongs, and then the corresponding answer is found according to the knowledge base of the category. After obtaining the answer, it is compared with the classification obtained by judging the knowledge graph according to the entity. If the two results are consistent, then the results are combined as prompt words and input into the engineering machinery large model to finally obtain the model output result.
[0016] It can be seen that the present invention quickly locates the input text by using a two-layer classification method, and provides corresponding data according to the category corresponding to the input text; and assists in judging the classification results by means of graphs to ensure the accuracy of the classification results, so as to make the results of the engineering machinery large language model answer more accurate.
[0017] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0019] Figure 1 It is a flow diagram of a method for enhancing and generating a large language model of engineering machinery provided by an embodiment of the present invention;
[0020] Figure 2 An overall flow chart of the retrieval enhancement generation of a large language model for engineering machinery provided by an embodiment of the present invention;
[0021] Figure 3 It is a structural schematic diagram of a large language model retrieval enhancement generation system for engineering machinery according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0023] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0024] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0025] Figure 1 FIG. 1 is a flow chart of a method for enhancing the generation of a large language model for engineering machinery retrieval provided by an embodiment of the present invention. Figure 1 As shown, an embodiment of the present application provides a method for retrieval enhancement and generation of a large language model for engineering machinery, which may include the following steps.
[0026] Step 101: Perform entity recognition on the engineering machinery related text input by the user to obtain the engineering machinery related entities in the text input by the user.
[0027] In the embodiment of the present application, the engineering machinery related text input by the user is firstly recognized using the trained engineering machinery entity recognition model to obtain valid entities in the input text, and the valid entities are engineering machinery related entities in the user input text. The engineering machinery related text input by the user is the engineering machinery related text input by the user, and the engineering machinery entity recognition model is a proprietary domain model adjusted according to the engineering machinery training data. In the embodiment of the present invention, it is a trained model, so the training process of the model will not be repeated here.
[0028] Exemplarily, the engineering machinery related text input by the user is “one arm cannot move now”, and the recognition result (i.e., the engineering machinery related entity obtained in the user input text) is “component: one arm” and “fault: cannot move”.
[0029] Step 102: Combine the engineering machinery related entities in the text input by the user according to the order of the engineering machinery related entities in the text input by the user to obtain a combined text.
[0030] In the embodiment of the present application, the engineering machinery related entities in the user input text identified in step 101 are combined to obtain a combined text. The combined text is performed in the order of the entities in the input text, that is, the order in the original text cannot be disrupted, and the entity category information contained in the entity recognition does not need to be included in the combined text.
[0031] Exemplarily, the user inputs the engineering machinery related entities in the text: "component: one arm", "fault: cannot move" and the resulting combined text is: "one arm cannot move".
[0032] Step 103: Perform a first binary classification and a second binary classification on the combined text to obtain a custom category to which the combined text belongs.
[0033] In an embodiment of the present application, the combined text in the above step 102 is subjected to intent recognition through two binary classification models, thereby obtaining the custom category to which the combined text belongs. The type and explanation of the custom category are described in the following steps 1031-1033.
[0034] The present invention mainly uses the UIE model in natural language processing to extract entities, and uses the Bert model and CNN of the Transformer structure for classification. However, the actual text generation algorithm can also use other algorithms such as Robert to achieve similar functions, and entity extraction can use other algorithms such as RoBert to achieve similar functions. After building the same structure according to the present invention, similar results can be achieved.
[0035] Furthermore, performing a first binary classification and a second binary classification on the combined text to obtain the custom category to which the combined text belongs includes the following steps 1031-1033.
[0036] Step 1031: Perform a first binary classification on the combined text to obtain a custom category corresponding to the first binary classification, where the custom category corresponding to the first binary classification includes data and knowledge.
[0037] In the embodiments of this application, please refer to Figure 2 , Figure 2This is an overall flow chart of the enhanced generation of a large language model retrieval for engineering machinery provided by an embodiment of the present invention. The combined text is subjected to a first binary classification to obtain a custom category corresponding to the first binary classification. The custom category corresponding to the first binary classification includes but is not limited to "data" and "knowledge". These two categories can be adjusted as needed, and new custom categories can be added based on these two categories. The embodiment of the present invention does not make specific restrictions.
[0038] The first binary classification is to determine whether the combined text belongs to the two categories of "data" and "knowledge". For example, after the first binary classification, the category of "no arm movement" belongs to "knowledge". On this basis, the second binary classification is performed to further determine which category of "knowledge", that is, "data" and "knowledge" are further refined. For details, refer to steps 1032 and 1033.
[0039] Step 1032: When the custom category corresponding to the first binary classification is data, a second binary classification is performed on the combined text to obtain a custom category corresponding to the data, where the custom category corresponding to the data includes working condition and analysis.
[0040] Furthermore, the method also includes: when the custom category obtained by performing the second binary classification on the combined text is working condition, obtaining the working condition data corresponding to the engineering machinery related entities in the user input text; or, when the custom category obtained by performing the second binary classification on the combined text is analysis, obtaining the analysis model corresponding to the engineering machinery related entities in the user input text, and obtaining the analysis results corresponding to the engineering machinery related entities in the user input text.
[0041] In the embodiment of the present application, if the result of the first binary classification is "data", the second classification is performed to further identify which of the two categories "operating conditions" and "analysis" the combined text belongs to. For example, the category obtained after classification of "pump truck fuel consumption analysis" is "analysis".
[0042] If the recognition result is "operating condition", then the corresponding operating condition data is found according to the entity, and the operating condition data that meets the user's needs is returned. If the recognition result is "analysis", then the corresponding analysis model is found according to the entity, the parameters of the analysis model are determined according to the input content, and then the analysis results are returned.
[0043] Or in step 1033, when the custom category corresponding to the first binary classification is knowledge, a second binary classification is performed on the combined text to obtain the custom category corresponding to the knowledge, and the custom category corresponding to the knowledge is failure and maintenance.
[0044] Furthermore, the method also includes: when the custom category obtained by performing a second binary classification on the combined text is a fault, obtaining a fault handling method corresponding to the engineering machinery related entity in the user input text; or, when the custom category obtained by performing a second binary classification on the combined text is maintenance, obtaining maintenance knowledge corresponding to the engineering machinery related entity in the user input text.
[0045] In the embodiment of the present application, when the custom category of the combined text is determined to be knowledge during the first binary classification, for example, the combined text "arm no action" belongs to the category "knowledge" after the first binary classification. The second binary classification is further used to determine whether it belongs to the custom category corresponding to "knowledge", that is, to further determine whether it belongs to "fault" or "maintenance".
[0046] If the recognition result is "fault", then the corresponding fault handling method is matched in the database according to the input entity and returned to the user. If the recognition result is "maintenance", then the maintenance knowledge of the corresponding component or system is searched in the database according to the input entity.
[0047] Step 104: According to the engineering machinery related entities in the text input by the user and the engineering machinery knowledge graph, obtain the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph.
[0048] In the embodiment of the present application, the entire method for constructing the training data of the engineering machinery language model is divided into two parts. The first part (corresponding to steps 101-103): the entity is obtained after the input text is recognized, and then the entity is combined and classified twice to obtain the category to which the input text belongs. The second part (corresponding to step 104): the engineering machinery related entities in the user input text described in step 101 are searched for categories through the knowledge graph, and the information of the input entity and similar entities is searched in the knowledge graph.
[0049] Furthermore, the step of obtaining the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph based on the engineering machinery related entities in the text input by the user and the engineering machinery knowledge graph includes steps 1041-1042.
[0050] Step 1041 : According to the engineering machinery related entities in the user input text, obtain multiple entity categories of the engineering machinery related entities in the user input text.
[0051] In the examples of this application, refer to Figure 2, the engineering machinery related entities in the user input text are input into the trained engineering machinery knowledge graph for identification, and multiple entity categories of the engineering machinery related entities in the user input text are obtained. The entity categories in the embodiment of the present invention include but are not limited to components and fault types. For example, the entity categories obtained by identifying the engineering machinery related entities in the user input text are: "Component: one arm" and "Component: oil pipeline", "Fault type: burst".
[0052] Step 1042: Group the engineering machinery related entities in the user input text that belong to the same entity category, and input the grouped engineering machinery related entities in the user input text into the engineering machinery knowledge graph to obtain the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph.
[0053] In an embodiment of the present application, engineering machinery related entities in the user input text belonging to the same entity category are grouped. For example, text entities belonging to the same fault type are grouped into the same group, and the grouping results are "Components: an arm, oil pipeline", "Fault type: burst". The grouped entities are input into the knowledge graph. Since knowledge is stored according to nodes in the knowledge graph, it is necessary to match entities and nodes to find the most similar nodes. After finding the most similar nodes of all entities in the knowledge graph, the nodes in the knowledge graph and the connections between the nodes are derived to obtain the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph. It should be noted that the various models used in the embodiments of the present invention are all trained models and can be used directly.
[0054] Step 105: When the entity category of the engineering machinery related entity in the user input text matches the custom category to which the combined text belongs, the two are combined and input into the engineering machinery large language model to obtain a model generation result.
[0055] The present invention determines the final category by searching for the corresponding category in the knowledge graph and comparing it with the classification result, which can ensure a high accuracy rate.
[0056] In an embodiment of the present application, it is further determined whether the entity category of the engineering machinery-related entity in the user input text conforms to the custom category to which the combined text belongs, that is, it is determined whether the category of the engineering knowledge graph is consistent with the custom category obtained after two binary classifications. If they are consistent, the entity category of the engineering machinery-related entity in the user input text is concatenated with the custom category to which the combined text belongs (that is, constructed as Prompt). The classification result corresponds to the "data" in the prompt word, and the knowledge graph corresponds to the "part" and "error" in the prompt word. After the prompt word is combined, the prompt word is input into the engineering machinery large language model to obtain the model generation result.
[0057] Compared with the existing process, the improvement produced by the present invention is that the category of the input text can be determined more quickly and accurately through the two-classification model. At the same time, the entity is input into the engineering machinery atlas to obtain the category to compare with the result of the classification model, so as to further ensure accuracy.
[0058] Through the above technical scheme, the present invention extracts entities from the engineering machinery related text input by the user, and then combines the entities into text. The combined text is classified twice by a binary classification model to obtain the category to which the input text belongs, and then the corresponding answer is found according to the knowledge base of the category. After obtaining the answer, it is compared with the classification obtained by judging the knowledge graph according to the entity. If the two results are consistent, then the results are combined as prompt words and input into the engineering machinery large model to finally obtain the model output result.
[0059] It can be seen that the present invention quickly locates the input text by using a two-layer classification method, and provides corresponding data according to the category corresponding to the input text; and assists in judging the classification results by means of graphs to ensure the accuracy of the classification results, so as to make the results of the engineering machinery large language model answer more accurate.
[0060] Furthermore, the method also includes: when the entity category of the engineering machinery related entity in the user input text does not conform to the custom category to which the combined text belongs, splicing the input related data queried from the engineering machinery knowledge graph with the engineering machinery related text input by the user, and repeating the first binary classification and the second binary classification of the combined text and the subsequent steps until the entity category of the engineering machinery related entity in the user input text conforms to the custom category to which the combined text belongs.
[0061] In the embodiment of the present application, when the entity category of the engineering machinery related entity in the user input text does not match the custom category to which the combined text belongs, the input related data queried from the engineering machinery knowledge graph is concatenated with the engineering machinery related text input by the user. Figure 2 As shown, after splicing, two binary classifications are performed again, and the specific steps are similar to the above embodiment, until the entity category of the engineering machinery related entity in the user input text is obtained to meet the custom category to which the combined text belongs. It should be noted that the models involved in the embodiments of the present invention are all trained models, and the model training process can be implemented using existing technologies, and the present invention does not make specific restrictions.
[0062] The embodiment of the present invention uses a graph to assist in judging the classification result, thereby ensuring the accuracy of the classification result. At the same time, the relevant information of the prompt word can be supplemented based on the graph to ensure that the model answer result is more accurate.
[0063] Figure 3 Schematic diagram of the structure of a large language model retrieval enhancement generation system for engineering machinery according to an embodiment of the present invention. Figure 3 As shown, in an embodiment of the present application, the retrieval enhancement generation system 30 includes: a first acquisition module 301, which is used to perform entity recognition on the engineering machinery related text input by the user to obtain the engineering machinery related entities in the user input text; a second acquisition module 302, which is used to combine the engineering machinery related entities in the user input text according to their order in the engineering machinery related text input by the user to obtain a combined text; a third acquisition module 303, which is used to perform a first binary classification and a second binary classification on the combined text to obtain a custom category to which the combined text belongs; a fourth acquisition module 304, which obtains the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph according to the engineering machinery related entities in the user input text and the engineering machinery knowledge graph; a generation module 305, which is used to combine the two and input them into the engineering machinery large language model to obtain a model generation result when the entity category of the engineering machinery related entity in the user input text meets the custom category to which the combined text belongs.
[0064] The principle and effect of a large language model retrieval enhancement generation system for engineering machinery provided by an embodiment of the present invention are similar to the above method. Through the above technical scheme, the present invention extracts entities from the engineering machinery related text input by the user, and then combines the entities into text. The combined text is classified by two binary classification models twice to obtain the category to which the input text belongs, and then the corresponding answer is found according to the knowledge base of the category to which it belongs; after obtaining the answer, it is compared with the classification obtained by judging the knowledge graph according to the entity. If the results of the two are consistent, then the results are combined into prompt words and input into the large model of engineering machinery, and finally the model output result is obtained.
[0065] It can be seen that the present invention quickly locates the input text by using a two-layer classification method, and provides corresponding data according to the category corresponding to the input text; and assists in judging the classification results by means of graphs to ensure the accuracy of the classification results, so as to make the results of the engineering machinery large language model answer more accurate.
[0066] Furthermore, the system also includes: an execution module, which is used to splice the input related data queried from the engineering machinery knowledge graph with the engineering machinery related text input by the user when the entity category of the engineering machinery related entity in the user input text does not conform to the custom category to which the combined text belongs, and repeatedly perform the first binary classification and the second binary classification of the combined text and the subsequent steps until the entity category of the engineering machinery related entity in the user input text conforms to the custom category to which the combined text belongs.
[0067] An embodiment of the present invention also provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the engineering machinery large language model retrieval enhancement generation method as described.
[0068] The principle and effect of the method for retrieval enhancement generation implemented by the electronic device provided in the embodiment of the present invention are similar to the above method and will not be described in detail here.
[0069] An embodiment of the present invention further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned engineering machinery large language model retrieval enhancement generation method.
[0070] The principle and effect of the method for retrieval enhancement generation implemented by the electronic device provided in the embodiment of the present invention are similar to the above method and will not be described in detail here.
[0071] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0072] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0075] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0076] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0077] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0078] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0079] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for enhancing the generation of a large language model retrieval for construction machinery, characterized in that: include: Perform entity recognition on the engineering machinery related text input by the user to obtain engineering machinery related entities in the text input by the user; Combining the engineering machinery related entities in the text input by the user according to the order in which they appear in the text input by the user to obtain a combined text; Performing a first binary classification and a second binary classification on the combined text to obtain a custom category to which the combined text belongs; According to the engineering machinery related entities in the text input by the user and the engineering machinery knowledge graph, obtaining the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph; When the entity category of the engineering machinery related entity in the user input text is obtained to be consistent with the custom category to which the combined text belongs, the two are combined and input into the engineering machinery large language model to obtain a model generation result.
2. The method for retrieval enhancement and generation of a large language model for construction machinery according to claim 1, characterized in that: The method further comprises: when the entity category of the engineering machinery related entity in the user input text does not conform to the custom category to which the combined text belongs, The input related data queried from the engineering machinery knowledge graph is spliced with the engineering machinery related text input by the user, and the first binary classification and the second binary classification of the combined text and the subsequent steps are repeated until the entity category of the engineering machinery related entity in the user input text is consistent with the custom category to which the combined text belongs.
3. The method for retrieval enhancement and generation of a large language model for construction machinery according to claim 1, characterized in that: The first binary classification and the second binary classification are performed on the combined text to obtain the custom category to which the combined text belongs, including: Performing a first binary classification on the combined text to obtain a custom category corresponding to the first binary classification, wherein the custom category corresponding to the first binary classification includes data and knowledge; When the custom category corresponding to the first binary classification is data, a second binary classification is performed on the combined text to obtain a custom category corresponding to the data, wherein the custom category corresponding to the data includes working conditions and analysis; or When the custom category corresponding to the first binary classification is knowledge, a second binary classification is performed on the combined text to obtain the custom category corresponding to the knowledge, and the custom category corresponding to the knowledge is failure and maintenance.
4. The method for retrieval enhancement and generation of a large language model for construction machinery according to claim 3 is characterized in that: The method further includes: when the custom category obtained by performing the second binary classification on the combined text is the working condition, obtaining the working condition data corresponding to the engineering machinery related entity in the user input text; or, When the custom category obtained by performing the second binary classification on the combined text is analysis, an analysis model corresponding to the engineering machinery related entity in the user input text is obtained, and an analysis result corresponding to the engineering machinery related entity in the user input text is obtained.
5. The method for retrieval enhancement and generation of a large language model for construction machinery according to claim 3, characterized in that: The method further includes: when the custom category obtained by performing the second binary classification on the combined text is a fault, obtaining a fault handling method corresponding to an engineering machinery-related entity in the user input text; or, When the custom category obtained by performing the second binary classification on the combined text is maintenance, the maintenance knowledge corresponding to the engineering machinery related entities in the user input text is obtained.
6. The method for retrieval enhancement and generation of a large language model for construction machinery according to claim 1, characterized in that: The categories corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph are obtained according to the engineering machinery related entities in the text input by the user and the engineering machinery knowledge graph, including: According to the engineering machinery related entities in the user input text, obtaining a plurality of entity categories of the engineering machinery related entities in the user input text; The engineering machinery related entities in the user input text that belong to the same entity category are grouped, and the grouped engineering machinery related entities in the user input text are input into the engineering machinery knowledge graph to obtain the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph.
7. A large language model retrieval enhancement generation system for engineering machinery, characterized in that: include: A first acquisition module is used to perform entity recognition on the engineering machinery related text input by the user to obtain the engineering machinery related entities in the text input by the user; A second acquisition module is used to combine the engineering machinery related entities in the text input by the user according to the order of the engineering machinery related entities in the text input by the user to obtain a combined text; A third acquisition module is used to perform a first binary classification and a second binary classification on the combined text to obtain a custom category to which the combined text belongs; A fourth acquisition module, based on the engineering machinery related entities in the user input text and the engineering machinery knowledge graph, obtains the category corresponding to the engineering machinery related text input by the user in the engineering machinery knowledge graph; The generation module is used to combine the two and input them into the engineering machinery large language model to obtain a model generation result when the entity category of the engineering machinery related entity in the user input text matches the custom category to which the combined text belongs.
8. The engineering machinery large language model retrieval enhancement generation system according to claim 7 is characterized in that: Also includes: An execution module is used for, when the entity category of the engineering machinery related entity in the user input text does not conform to the custom category to which the combined text belongs, The input related data queried from the engineering machinery knowledge graph is spliced with the engineering machinery related text input by the user, and the first binary classification and the second binary classification of the combined text and the subsequent steps are repeated until the entity category of the engineering machinery related entity in the user input text is consistent with the custom category to which the combined text belongs.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the engineering machinery large language model retrieval enhancement generation method according to any one of claims 1 to 6.
10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute the engineering machinery large language model retrieval enhancement generation method according to any one of claims 1 to 6.
Citation Information
Cited By
Industrial data query and management method
CN121388132A
