Supply chain question answering method and device based on large language model
Through the supply chain question and answer method based on the large language model, the target question and answer model is used to interact with the knowledge base, which solves the accuracy and user experience problems of the intelligent robot question and answer system when facing changing user questions, and achieves a more efficient supply chain question and answer. system.
Patent Information
- Application Number
- CN202410608214.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-08-30
AI Technical Summary
The existing supply chain question and answer system based on intelligent robots has poor accuracy and poor user experience when faced with changing user question data.
A supply chain question and answer method based on a large language model is used to obtain user question data and use the target question and answer model to interact with the supply chain knowledge base to determine and provide corresponding answer data. The target question and answer model trains the large language model and combines natural Language processing technology and knowledge extraction improve the accuracy of question and answer.
It improves the accuracy and user experience of supply chain Q&A, can handle complex and changing user queries more effectively, and provides more appropriate answers.
Smart Images

Figure CN118568217A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a supply chain question-answering method and device based on a large language model. Background Art
[0002] In an increasingly complex and dynamic market, companies need agile procurement behavior analysis to improve procurement processes and solve problems encountered in various links of the supply chain through customer service question and answer systems.
[0003] In the prior art, this question-and-answer process usually uses manual customer service or intelligent robots to answer. However, as the market changes rapidly, the methods and types of user question data vary, and the information is complicated. The accuracy of questions and answers based on intelligent robots is poor, and the user experience is not good. Summary of the invention
[0004] The present invention provides a supply chain question-answering method and device based on a large language model, which is used to solve the defects of poor effect of question-answering based on intelligent robots and poor user experience in the prior art, improve the accuracy of supply chain question-answering, and enhance user experience.
[0005] In a first aspect, the present invention provides a supply chain question-answering method based on a language big model, the method comprising:
[0006] Obtain user question data from the supply chain question-answering system;
[0007] Determine answer data corresponding to the user question data by using a target question answering model according to the user question data and a supply chain knowledge base; the target question answering model is obtained by training a first language large model by using the supply chain knowledge base, the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field by using a second language large model, and the supply chain knowledge base includes at least one first knowledge tag and first supply chain data corresponding to each of the first knowledge tags;
[0008] The target question-answering model is used to send the answer data to the user corresponding to the user question data of the supply chain question-answering system.
[0009] Optionally, the target question-answering model is obtained by training a first language large model using the supply chain knowledge base, and the first language large model is a pre-trained model; the using the target question-answering model to determine answer data corresponding to the user question data according to the user question data and the supply chain knowledge base includes:
[0010] Determine a second knowledge label corresponding to the user question data by using the target question answering model;
[0011] Using the target question-answering model, matching the second knowledge tag with the at least one first knowledge tag in the supply chain knowledge base, and determining a third knowledge tag corresponding to the user question data in the supply chain knowledge base;
[0012] The target question-answering model is used to determine answer data corresponding to the user question data based on the first supply chain data corresponding to the third knowledge tag.
[0013] Optionally, the method further comprises:
[0014] Using the target question-answer model, a work order is created in a target system according to the answer data; the target system includes at least one of the following: a sales management system and a customer relationship management system;.
[0015] Optionally, the target question-answering model is a large language model that interacts with the target system through a unified application programming interface; using the target question-answering model to create a work order in the target system according to the answer data includes:
[0016] In the case where the answer data includes the user's intended product, creating a work order in the sales management system using the application programming interface of the target question-answering model;
[0017] In a case where the answer data includes user emotions, a work order is created in the customer relationship management system using an application programming interface of the target question-answering model.
[0018] Optionally, the second language model includes a supply chain knowledge collection and editing model and a supply chain knowledge classification model; the supply chain knowledge base is constructed by adopting the following steps, including:
[0019] Determine the target text corresponding to the target document by using the supply chain knowledge acquisition and editing model;
[0020] Using natural language processing technology to segment the target text to obtain a segmented target text;
[0021] Determine the at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag based on the target text after word segmentation by using the supply chain knowledge classification model;
[0022] The at least one first knowledge tag and the first supply chain data corresponding to each of the first knowledge tags are determined as the supply chain knowledge base.
[0023] Optionally, the using the supply chain knowledge collection and editing model to determine the target text corresponding to the target document includes:
[0024] In the case where the type of the target document is a picture type, using the optical character recognition technology of the supply chain knowledge acquisition and editing model to extract text from the picture type target document to obtain the target text;
[0025] In the case where the type of the target document is a voice type, using the voice recognition technology of the supply chain knowledge acquisition and editing model to perform text extraction on the voice type target document to obtain the target text;
[0026] In the case that the type of the target document is a text type, a text type target document is determined as the target text.
[0027] Optionally, the target document includes at least one of the following: supply chain business documents, supply chain technical documents and supply chain historical conversation records.
[0028] In a second aspect, the present invention further provides a supply chain question-answering device based on a large language model, the device comprising:
[0029] The acquisition module is used to obtain user question data of the supply chain question-answering system;
[0030] A question-answering module is used to determine answer data corresponding to the user question data based on the user question data and the supply chain knowledge base using a target question-answering model; the target question-answering model is obtained by training a first language large model using the supply chain knowledge base, and the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field using a second language large model, and the supply chain knowledge base contains at least one first knowledge tag and first supply chain data corresponding to each first knowledge tag; using the target question-answering model, the answer data is sent to the user corresponding to the user question data of the supply chain question-answering system.
[0031] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a supply chain question-and-answer method based on a large language model as described above is implemented.
[0032] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the supply chain question-and-answer methods based on a large language model as described above.
[0033] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the supply chain question-answering methods based on a large language model as described above.
[0034] The present invention provides a supply chain question-and-answer method and device based on a language macro model, which obtains user question data of a supply chain question-and-answer system; then, using a target question-and-answer model, according to the user question data and a supply chain knowledge base, determines answer data corresponding to the user question data; wherein the target question-and-answer model is obtained by training a first language macro model using a supply chain knowledge base, the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field using a second language macro model, and the supply chain knowledge base contains at least one first knowledge tag and first supply chain data corresponding to each first knowledge tag; further, using the target question-and-answer model, the answer data is sent to the user corresponding to the user question data of the supply chain question-and-answer system.
[0035] In the present invention, since the supply chain knowledge base contains at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag, the supply chain knowledge base is used to train the first language large model to obtain a target question and answer model. The target question and answer model is used to determine the answer data corresponding to the user question data based on the user question data and the supply chain knowledge base. Then, the target question and answer model is used to send the answer data to the user corresponding to the user question data of the supply chain question and answer system, thereby improving the accuracy of the supply chain question and answer and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 It is a flow chart of the supply chain question-answering method based on the language big model provided by the present invention;
[0038] Figure 2 It is a schematic diagram of the principle of the supply chain question-answering method based on the language big model provided by the present invention;
[0039] Figure 3 It is a structural schematic diagram of a supply chain question-answering device based on a language large model provided by the present invention;
[0040] Figure 4 A schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally a class, and the number of objects is not limited. For example, the first node can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the front and back associated objects are in an "or" relationship.
[0043] In order to more clearly understand the various embodiments provided by the present invention, the background knowledge of the present invention is first introduced as follows:
[0044] Big models (Foundation models): usually refers to a type of widely used foundation models (or infrastructure models), which are general and highly versatile deep learning models trained on the basis of massive data and computing resources. These models are widely used in various tasks in the fields of natural language processing, computer vision, speech recognition, etc. Foundation models are usually developed by large technology companies, research institutions or open source communities to provide a shared infrastructure to provide better opportunities and resources for a wider range of applications and developers. The pre-training of these models requires a large amount of data and computing resources.
[0045] Large Language Model (LLM): is a deep learning model trained on massive text data. It can not only generate natural language text, but also deeply understand the meaning of the text and handle various natural language tasks such as text summarization, question answering, translation, etc.
[0046] Application Program Interface (API): An API is a set of definitions, programs, and protocols that enable computer software to communicate with each other. One of the main functions of an API is to provide a common set of functions. Programmers can develop applications by calling API functions, which can reduce programming tasks. API is also a kind of middleware that provides data sharing for various platforms.
[0047] Automatic Speech Recognition (ASR): refers to automatic speech recognition technology, which is a technology that converts human speech into text.
[0048] Optical Character Recognition (OCR) refers to the process in which an electronic device (such as a scanner or digital camera) examines characters printed on paper, determines their shapes by detecting dark and light patterns, and then uses character recognition methods to translate the shapes into computer text; that is, for printed characters, an optical method is used to convert the text in a paper document into a black and white dot matrix image file, and recognition software is used to convert the text in the image into text format for further editing and processing by word processing software.
[0049] Combine the following Figure 1-Figure 4 The supply chain question answering method and device based on a language large model of the present invention are described.
[0050] Figure 1 is a flow chart of the supply chain question-answering method based on the language large model provided by the present invention, such as Figure 1 As shown, the method includes:
[0051] Step 101: Obtain user question data of the supply chain question-answering system;
[0052] Specifically, the execution subject of this embodiment is an electronic device, which is used to conduct questions and answers in the supply chain question and answer system to improve the accuracy of the supply chain question and answer and enhance the user experience.
[0053] First, user question data of the supply chain question-and-answer system is obtained. The user question data is, for example, questions entered by users in the question-and-answer system, such as, "Can the price of product A be more favorable?", "What are the advantages of product A's performance over product B?", etc. It should be noted that the purpose of this step is to obtain user question data, and the specific method of obtaining user question data from the supply chain question-and-answer system is not limited in this embodiment.
[0054] The question data in the question-answering system can be displayed in a variety of scenarios such as web pages, floating windows, HTML5, application (Application, App) integration, etc., which is not limited in this embodiment.
[0055] Step 102: using the target question-answering model, according to the user question data and the supply chain knowledge base, determine the answer data corresponding to the user question data; the target question-answering model is obtained by training the first language large model using the supply chain knowledge base, the supply chain knowledge base is obtained by extracting knowledge from the target document in the supply chain field using the second language large model, and the supply chain knowledge base includes at least one first knowledge tag and first supply chain data corresponding to each first knowledge tag;
[0056] Specifically, it is understandable that a large model refers to a deep learning model with a very large number of parameters, which usually includes a pre-trained model and a fine-tuned model. The target question-answering model in this embodiment is obtained by training the first language large model using the supply chain knowledge base, that is, a fine-tuned model, wherein the first language large model is a pre-trained model, and the pre-trained model refers to a model pre-trained on a large-scale corpus, such as a bidirectional encoding representation Transformers (Bidirectional Encoder Representation from Transformers, BERT) model and a generative pre-trained Transformer (Generative Pre-Trained Transformer, GPT) model, etc., wherein BERT is the decoder of the bidirectional Transformer, because the encoder decoder cannot obtain the information to be predicted. The main innovations of the model are in the pre-training method, that is, the masked language model (Masked LM, MLM) and the next sentence prediction (Next Sentence Prediction, NSP) are used to capture the representation of words and sentences respectively; GPT is a deep learning model based on the Internet, trained with available data, and generated by text. These models have good generalization capabilities and can be used for a variety of tasks. The target question answering model refers to a model obtained by fine-tuning the first language large model of the pre-trained model for a specific task, and a model obtained by fine-tuning BERT or GPT for the supply chain question answering task. The supply chain knowledge base is obtained by extracting knowledge from the target documents in the supply chain field using the second language large model, that is, the supply chain knowledge in the business vertical field is stored in the supply chain knowledge base. Specifically, the supply chain knowledge base contains at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag. The first knowledge tags in the supply chain knowledge base can be pre-set and can be continuously updated according to user needs.
[0057] After obtaining the user question data, the target question-answering model can be further used to determine the answer data corresponding to the user question data based on the user question data and the supply chain knowledge base. Among them, the interaction with the target question-answering model can be carried out using prompt words, which are also instructions input to the large model to facilitate the large model to understand the output target answer data.
[0058] Step 103: Using the target question-answering model, the answer data is sent to the user corresponding to the user question data of the supply chain question-answering system.
[0059] Specifically, after obtaining answer data using the target question-answering model, the target question-answering model can be further used to feed the answer data back to the supply chain question-answering system, and then feed the answer data back to the user.
[0060] In the method provided in this embodiment, user question data of the supply chain question and answer system is obtained; then, the target question and answer model is used to determine the answer data corresponding to the user question data according to the user question data and the supply chain knowledge base; wherein the target question and answer model is obtained by training a first language large model using the supply chain knowledge base, and the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field using a second language large model, and the supply chain knowledge base contains at least one first knowledge tag and first supply chain data corresponding to each first knowledge tag; further, the answer data is sent to the user corresponding to the user question data of the supply chain question and answer system using the target question and answer model.
[0061] In the present invention, since the supply chain knowledge base contains at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag, the supply chain knowledge base is used to train the first language large model to obtain a target question and answer model. The target question and answer model is used to determine the answer data corresponding to the user question data based on the user question data and the supply chain knowledge base. Then, the target question and answer model is used to send the answer data to the user corresponding to the user question data of the supply chain question and answer system, thereby improving the accuracy of the supply chain question and answer and enhancing the user experience.
[0062] Optionally, the first language large model is a pre-trained model; using the target question-answering model, according to the user question data and the supply chain knowledge base, the answer data corresponding to the user question data is determined, including:
[0063] Using the target question-answering model, determine the second knowledge label corresponding to the user's question data;
[0064] Using the target question-answering model, the second knowledge tag is matched with at least one first knowledge tag in the supply chain knowledge base to determine a third knowledge tag corresponding to the user question data in the supply chain knowledge base;
[0065] The target question-answering model is used to determine answer data corresponding to the user's question data based on the first supply chain data corresponding to the third knowledge tag.
[0066] Specifically, the first language large model is a pre-trained model, which refers to a model that has been pre-trained on a large-scale corpus, such as BERT, GPT, etc. These models have good generalization capabilities and can be used for a variety of tasks. The target question-answering model refers to a model that is obtained by fine-tuning the first language large model of the pre-trained model for a specific task, such as a model obtained by fine-tuning BERT or GPT for the supply chain question-answering task.
[0067] In some embodiments, step 102 may be implemented as follows:
[0068] First, the target question-answering model is used to determine the second knowledge tag corresponding to the user's question data, wherein the second knowledge tag is a knowledge tag in the supply chain field, and is at least one of the first knowledge tags in the supply chain knowledge base; this process can be implemented using prompt words, for example, the prompt words are input into the target question-answering model: "Please extract at least one second knowledge tag based on the user's question data, and do not add self-added content", thereby outputting the second knowledge tag corresponding to the user's question data, for example, the second knowledge tag and the corresponding data are "Product Name - Product A, Product Price - Unknown".
[0069] Furthermore, after obtaining the second knowledge tag corresponding to the user's question data, the target question-answering model can be further used to match the second knowledge tag with at least one first knowledge tag in the supply chain knowledge base, and determine the third knowledge tag corresponding to the user's question data in the supply chain knowledge base; wherein, this process can also be implemented based on prompt words, for example, the following prompt words are input into the target question-answering model: "Please use the second knowledge tag to match in the supply chain knowledge base", so that the knowledge tag corresponding to the user's question data in the supply chain knowledge base can be determined. It can be understood that because the supply chain knowledge base stores at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag, determining the first knowledge tag also means simultaneously determining the first supply chain data corresponding to the user's question data.
[0070] Furthermore, after obtaining the knowledge tag and supply chain data corresponding to the user's question data, the target question-answering model can be further used to determine the answer data corresponding to the user's question data based on the first supply chain data corresponding to the third knowledge tag. This step can also interact with the target question-answering model based on prompt words, for example, "construct answer data based on the first supply chain data corresponding to the third knowledge tag, and limit it to 100 words."
[0071] In the method provided in this embodiment, first, the target question-answering model is used to determine the second knowledge tag corresponding to the user's question data; then, the target question-answering model is used to match the second knowledge tag with at least one first knowledge tag in the supply chain knowledge base to determine the third knowledge tag corresponding to the user's question data in the supply chain knowledge base; and then, the target question-answering model is used to determine the answer data corresponding to the user's question data based on the first supply chain data corresponding to the third knowledge tag. The answer data obtained in this embodiment has a high accuracy and a strong user experience.
[0072] Optionally, the method further comprises:
[0073] Using the target question-answer model, a work order is created in a target system according to the answer data; the target system includes at least one of the following: a sales management system and a customer relationship management system.
[0074] Specifically, after obtaining the answer data using the target question-answer model, the target question-answer model can be used to create a work order in the target system according to the answer data. The target system can be determined according to the specific content in the answer data. The target system includes at least one of the following: a sales management system and a customer relationship management system, wherein the sales management system is mainly used to track potential customers and intended orders, and the customer relationship management system is used to follow up on user demands. The target system is an internal business system of an enterprise, such as a sales management system, a customer relationship management system, and so on. For example, if the specific content of the answer data includes the user's intended product, a unified application program interface is used to create a work order in, for example, a sales management system, so as to match the corresponding customer service for follow-up.
[0075] In the method provided in this embodiment, the target system includes at least one of the following: a sales management system and a customer relationship management system. The target question and answer model is a large language model that interacts with the target system through a unified application programming interface. By using the target question and answer model, a work order is created in the target system according to the answer data, thereby realizing truly unified operation and unified management of the supply chain scenario.
[0076] Optionally, the target question-answering model is a large language model that interacts with the target system through a unified application programming interface; using the target question-answering model, creating a work order in the target system according to the answer data, including:
[0077] When the answer data contains the user's intended product, a work order is created in the sales management system using the application programming interface of the target question answering model;
[0078] When the answer data contains user emotions, the API of the target question answering model is used to create a work order in the customer relationship management system.
[0079] Specifically, in some embodiments, the target question-answering model is a large language model that interacts with the target system through a unified application programming interface API. Correspondingly, step 103 can be implemented as follows:
[0080] When the answer data contains the user's intended product, a work order is created in the sales management system using the target question-answering model's application programming interface; it is understandable that if the answer data contains the user's intended product, the user can be determined to be an intended user. In the actual operation of the enterprise, such intended users need to further recreate work orders in the sales management system to facilitate the allocation of corresponding new product customer service for further follow-up and avoid customer loss.
[0081] When the answer data contains user emotions, a work order is created in the customer relationship management system using the application programming interface of the target question-answering model; wherein the user emotions can be obtained by identifying the answer data using the emotion detection model. For example, when the emotion detection model detects that the user's emotions are impatient or angry, it is necessary to further assign customer service to follow up on the user's demands, resolve the user's demands, and improve user satisfaction, such as creating a work order in the customer relationship management system.
[0082] In the method provided in this embodiment, the target system includes at least one of the following: a sales management system and a customer relationship management system. The target question and answer model is a large language model that interacts with the target system through a unified application programming interface. When the answer data contains the user's intended product, the application programming interface of the target question and answer model is used to create a work order in the sales management system. When the answer data contains user emotions, the application programming interface of the target question and answer model is used to create a work order in the customer relationship management system, thereby realizing truly unified operation and unified management of the supply chain scenario.
[0083] Optionally, the second language large model includes a supply chain knowledge collection and compilation model and a supply chain knowledge classification model; the supply chain knowledge base is constructed by adopting the following steps, including:
[0084] Use the supply chain knowledge collection and editing model to determine the target text corresponding to the target document;
[0085] Use natural language processing technology to segment the target text to obtain the target text after segmentation;
[0086] Using the supply chain knowledge classification model, based on the target text after word segmentation, determine at least one first knowledge tag and first supply chain data corresponding to each first knowledge tag;
[0087] At least one first knowledge tag and first supply chain data corresponding to each first knowledge tag are determined as a supply chain knowledge base.
[0088] Specifically, in some embodiments, the second language large model includes at least one of the following: a supply chain knowledge collection and editing model, a supply chain knowledge classification model, wherein the supply chain knowledge collection and editing model is used to preprocess the target document to obtain the target text, and the supply chain knowledge classification model is used to classify knowledge based on the target text. Correspondingly, the supply chain knowledge base is constructed using the following steps, including:
[0089] First, the supply chain knowledge collection and editing model is used to determine the target text corresponding to the target document; the target document can be of various types, such as image type, voice type, text type, etc. For different types of target documents, the supply chain knowledge collection and editing model can be used to adopt different methods to extract text to obtain the target text.
[0090] Furthermore, after obtaining the target text, the target text can be segmented using natural language processing technology to obtain the target text after segmentation; among them, English words are naturally separated by spaces and are easy to segment according to spaces, but sometimes multiple words need to be segmented as one word and need to be treated as one word. Since Chinese has no spaces, word segmentation is a problem that needs to be solved specifically. Whether it is English or Chinese, the principle of word segmentation is similar. Simply put, automatic Chinese word segmentation is to let the computer system automatically add spaces or other boundary marks between words in Chinese text. Although it sounds simple, so far, there are still some basic questions about the concept of "word" such as "what is a word" and "what is a word" that have no definite answers. Relevant surveys show that even if the native language is Chinese, the recognition rate of words appearing in Chinese text is only about 70%. Therefore, in a strict sense, automatic word segmentation is a problem without a clear definition. There are three basic issues involved in word segmentation: word segmentation standardization, ambiguous segmentation, and recognition of unregistered words.
[0091] Furthermore, after obtaining the target text after word segmentation, the supply chain knowledge classification model can be further utilized to determine at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag based on the target text after word segmentation; wherein, the first knowledge tag can be preset and can be continuously updated according to user needs.
[0092] Further, at least one determined first knowledge tag and the first supply chain data corresponding to each first knowledge tag are determined as a supply chain knowledge base. At this point, the construction of the supply chain knowledge base is completed. It should be noted that the supply chain knowledge base can be continuously iterated and updated over time so that the question-answering system can obtain more accurate and appropriate answer data.
[0093] In the method provided in this embodiment, the target text corresponding to the target document is first determined using the supply chain knowledge collection and editing model; then, the target text is segmented using natural language processing technology to obtain the target text after segmentation; further, the supply chain knowledge classification model is used to determine at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag based on the target text after segmentation; at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag are determined as the supply chain knowledge base. The constructed supply chain knowledge base is more comprehensive, and the accuracy of the answers to the user's question data based on the constructed supply chain knowledge base is higher, and the user experience is better.
[0094] Optionally, the supply chain knowledge collection and editing model is used to determine the target text corresponding to the target document, including:
[0095] When the target document is of image type, the optical character recognition technology of the supply chain knowledge acquisition model is used to extract text from the target document of image type to obtain the target text;
[0096] When the target document is of voice type, the speech recognition technology of the supply chain knowledge acquisition model is used to extract text from the target document of voice type to obtain the target text;
[0097] In the case where the type of the target document is a text type, the text type target document is determined as the target text.
[0098] Specifically, in some embodiments, determining the target text corresponding to the target document may be achieved through the following steps, including:
[0099] First, it can be understood that in this embodiment, the target document is used to construct the supply chain knowledge base. The type of the target document is not limited. The target document can be a text type, a picture type, or a voice type document. Different methods can be used to extract the target text for different types of target documents, as follows:
[0100] When the target document is of image type, the supply chain knowledge collection and editing model can be used to extract text from the target document of image type; for example, optical character recognition (OCR) technology is used to search, extract and recognize text, and the text area in the image is converted into character information. Its shape is determined by detecting dark and light patterns, and then the shape is translated into computer text using character recognition methods. Among them, the problem solved by text search and extraction is where the text is and how large the range of the text is. Text recognition is to recognize the located text area, and the main problem solved is what each text is, so that the target text can be obtained.
[0101] When the target document is of voice type, the Automatic Speech Recognition (ASR) technology of the supply chain knowledge acquisition model is used to convert human voice into text, so as to extract text from the target document of voice type and obtain the target text.
[0102] In the case where the type of the target document is a text type, the text type target document may be directly determined as the target text.
[0103] In the method provided in this embodiment, when the type of the target document is an image type, the optical character recognition technology of the supply chain knowledge acquisition model is used to perform text extraction on the target document of the image type to obtain the target text; when the type of the target document is a voice type, the voice recognition technology of the supply chain knowledge acquisition model is used to perform text extraction on the target document of the voice type to obtain the target text; when the type of the target document is a text type, the target document of the text type is determined as the target text. Therefore, it is possible to construct a supply chain knowledge base based on multiple types of documents, and the constructed supply chain knowledge base is more comprehensive. The user's question data is answered based on the constructed supply chain knowledge base, and the accuracy of the answer is higher, and the user experience is better.
[0104] Optionally, the target document includes at least one of the following: a supply chain business document, a supply chain technical document, and a supply chain historical conversation record.
[0105] Specifically, in some embodiments, the target document includes at least one of the following: supply chain business documents, supply chain technical documents, and supply chain historical conversation records. The supply chain business documents are, for example, enterprise documents or historical conversation records. Enterprise documents include supply chain business documents (such as company introductions, company brochures, company regulations), supply chain technical documents (product manuals, product requirements specifications), and historical conversation records include chat records of instant messaging applications, communication records of email systems, and the like.
[0106] It can be understood that the supply chain business documents, supply chain technical documents and supply chain historical conversation records can be of text type, image type or voice type, and the type of the target document in this embodiment is not limited.
[0107] In the method provided in this embodiment, the target document includes a supply chain business document, a supply chain technical document or a supply chain historical conversation record. Subsequent knowledge extraction of the target document can obtain a supply chain knowledge base, so that the target question-answering model answers the user's question data based on the supply chain knowledge base, with high accuracy of the answer and good user experience.
[0108] The supply chain question and answer device based on the language big model provided by the present invention is described below. The supply chain question and answer device based on the language big model described below and the supply chain question and answer method based on the language big model described above can refer to each other.
[0109] Figure 2 Schematic diagram of the principle of the supply chain question-answering method based on the language large model provided by the present invention, such as Figure 2 As shown, the method uses a target question-answering model to build a supply chain knowledge base based on target documents. The target documents include corporate documents and call records. Corporate documents include systems, manuals, documents, etc. Call records include call texts, voices, pictures, files, etc. Knowledge is extracted based on the target documents to build a supply chain knowledge base, such as through OCR, ASR, NLP, document analysis models, ambiguity resolution technology, knowledge clustering, context analysis, quality ranking, etc. The target question-answering model is built based on the first language large model and the second language large model. Furthermore, the target question-answering model is used to answer user questions in the question-answering system. The functions of the question-answering system include three major sections: assistance, collaboration, and insight. Among them, the assistance section includes manual assistance and robot assistance; the collaboration section includes knowledge extraction (such as knowledge graph construction, FAQ expansion, document knowledge extraction, document search-based question-answering, knowledge health monitoring, etc.); the insight section includes operational data analysis, conversation analysis, etc.
[0110] In this embodiment, after obtaining the user question data of the question-answering system, the target question-answering model is used to obtain the answer data based on the supply chain knowledge base and send it to the user. On the other hand, after obtaining the user question data and the answer data corresponding to the user question data, it can be used as a conversation record to further update the supply chain knowledge base. In this way, the accuracy of the question-answering can be high and the user experience can be improved.
[0111] Figure 3 is a schematic diagram of the structure of the supply chain question-answering device based on the language large model provided by the present invention, such as Figure 3 As shown, the supply chain question-answering device 300 based on the language big model includes:
[0112] An acquisition module 310 is used to acquire user question data of the supply chain question-answering system;
[0113] The question-and-answer module 320 is used to determine answer data corresponding to the user question data based on the user question data and the supply chain knowledge base using a target question-and-answer model; the target question-and-answer model is obtained by training a first language large model using the supply chain knowledge base, and the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field using a second language large model, and the supply chain knowledge base contains at least one first knowledge tag and first supply chain data corresponding to each first knowledge tag; using the target question-and-answer model, the answer data is sent to the user corresponding to the user question data of the supply chain question-and-answer system.
[0114] In the device provided by this embodiment, the user question data of the supply chain question and answer system is acquired by the acquisition module 310; then, the question and answer module 320 uses the target question and answer model to determine the answer data corresponding to the user question data according to the user question data and the supply chain knowledge base; wherein the target question and answer model is obtained by training the first language large model using the supply chain knowledge base, and the supply chain knowledge base is obtained by extracting knowledge from the target document in the supply chain field using the second language large model, and the supply chain knowledge base contains at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag; then, using the target question and answer model, the answer data is sent to the user corresponding to the user question data of the supply chain question and answer system.
[0115] In the present invention, since the supply chain knowledge base contains at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag, the supply chain knowledge base is used to train the first language large model to obtain a target question and answer model. The target question and answer model is used to determine the answer data corresponding to the user question data based on the user question data and the supply chain knowledge base. Then, the target question and answer model is used to send the answer data to the user corresponding to the user question data of the supply chain question and answer system, thereby improving the accuracy of the supply chain question and answer and enhancing the user experience.
[0116] Optionally, the first language large model is a pre-trained model;
[0117] The question-answering module 320 is specifically used for:
[0118] Determine a second knowledge label corresponding to the user question data by using the target question answering model;
[0119] Using the target question-answering model, matching the second knowledge tag with the at least one first knowledge tag in the supply chain knowledge base, and determining a third knowledge tag corresponding to the user question data in the supply chain knowledge base;
[0120] The target question-answering model is used to determine answer data corresponding to the user question data based on the first supply chain data corresponding to the third knowledge tag.
[0121] Optionally, the question-answering module 320 is further used to:
[0122] The target question-answer model is used to create a work order in a target system according to the answer data; the target system includes at least one of the following: a sales management system and a customer relationship management system.
[0123] Optionally, the target question-answering model is a large language model that interacts with the target system through a unified application programming interface;
[0124] The question-answering module 320 is further used to:
[0125] In the case where the answer data includes the user's intended product, creating a work order in the sales management system using the application programming interface of the target question-answering model;
[0126] In a case where the answer data includes user emotions, a work order is created in the customer relationship management system using an application programming interface of the target question-answering model.
[0127] Optionally, the second language large model includes a supply chain knowledge collection and editing model and a supply chain knowledge classification model;
[0128] The device also includes: a supply chain knowledge base construction module;
[0129] The supply chain knowledge base building module is used to:
[0130] Determine the target text corresponding to the target document by using the supply chain knowledge acquisition and editing model;
[0131] Using natural language processing technology to segment the target text to obtain a segmented target text;
[0132] Determine the at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag based on the target text after word segmentation by using the supply chain knowledge classification model;
[0133] The at least one first knowledge tag and the first supply chain data corresponding to each of the first knowledge tags are determined as the supply chain knowledge base.
[0134] Optionally, the supply chain knowledge base construction module is specifically used to:
[0135] In the case where the type of the target document is a picture type, using the optical character recognition technology of the supply chain knowledge acquisition and editing model to extract text from the picture type target document to obtain the target text;
[0136] In the case where the type of the target document is a voice type, using the voice recognition technology of the supply chain knowledge acquisition and editing model to perform text extraction on the voice type target document to obtain the target text;
[0137] In the case that the type of the target document is a text type, a text type target document is determined as the target text.
[0138] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the supply chain question-answering method based on the language big model, and the method includes:
[0139] Obtain user question data from the supply chain question-answering system;
[0140] Determine answer data corresponding to the user question data by using a target question answering model according to the user question data and a supply chain knowledge base; the target question answering model is obtained by training a first language large model by using the supply chain knowledge base, the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field by using a second language large model, and the supply chain knowledge base includes at least one first knowledge tag and first supply chain data corresponding to each of the first knowledge tags;
[0141] The target question-answering model is used to send the answer data to the user corresponding to the user question data of the supply chain question-answering system.
[0142] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0143] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the supply chain question-answering method based on the language big model provided by the above methods, the method comprising:
[0144] Obtain user question data from the supply chain question-answering system;
[0145] Determine answer data corresponding to the user question data by using a target question answering model according to the user question data and a supply chain knowledge base; the target question answering model is obtained by training a first language large model by using the supply chain knowledge base, the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field by using a second language large model, and the supply chain knowledge base includes at least one first knowledge tag and first supply chain data corresponding to each of the first knowledge tags;
[0146] The target question-answering model is used to send the answer data to the user corresponding to the user question data of the supply chain question-answering system.
[0147] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the supply chain question-answering method based on the language big model provided by the above methods, the method comprising:
[0148] Obtain user question data from the supply chain question-answering system;
[0149] Determine answer data corresponding to the user question data by using a target question answering model according to the user question data and a supply chain knowledge base; the target question answering model is obtained by training a first language large model by using the supply chain knowledge base, the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field by using a second language large model, and the supply chain knowledge base includes at least one first knowledge tag and first supply chain data corresponding to each of the first knowledge tags;
[0150] The target question-answering model is used to send the answer data to the user corresponding to the user question data of the supply chain question-answering system.
[0151] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A supply chain question-answering method based on a large language model, characterized in that: include: Obtain user question data from the supply chain question-answering system; Determine answer data corresponding to the user question data according to the user question data and the supply chain knowledge base by using the target question answering model; The target question-answering model is obtained by training the first language large model using the supply chain knowledge base, the supply chain knowledge base is obtained by extracting knowledge from the target document in the supply chain field using the second language large model, and the supply chain knowledge base includes at least one first knowledge tag and first supply chain data corresponding to each of the first knowledge tags; The target question-answering model is used to send the answer data to the user corresponding to the user question data of the supply chain question-answering system.
2. The supply chain question-answering method based on a language large model according to claim 1 is characterized in that: The first language model is a pre-trained model; the target question-answering model is used to determine answer data corresponding to the user question data according to the user question data and the supply chain knowledge base, including: Determine a second knowledge label corresponding to the user question data by using the target question answering model; Using the target question-answering model, matching the second knowledge tag with the at least one first knowledge tag in the supply chain knowledge base, and determining a third knowledge tag corresponding to the user question data in the supply chain knowledge base; The target question-answering model is used to determine answer data corresponding to the user question data based on the first supply chain data corresponding to the third knowledge tag.
3. The supply chain question-answering method based on a language large model according to claim 1 is characterized in that: The method further comprises: The target question-answer model is used to create a work order in a target system according to the answer data, wherein the target system includes at least one of the following: a sales management system and a customer relationship management system.
4. The supply chain question-answering method based on a language large model according to claim 3 is characterized in that: The target question-answering model is a large language model that interacts with the target system through a unified application programming interface; using the target question-answering model to create a work order in the target system according to the answer data includes: In the case where the answer data includes the user's intended product, creating a work order in the sales management system using the application programming interface of the target question-answering model; In a case where the answer data includes user emotions, a work order is created in the customer relationship management system using an application programming interface of the target question-answering model.
5. The supply chain question-answering method based on a language large model according to claim 1 is characterized in that: The second language large model includes a supply chain knowledge collection and editing model and a supply chain knowledge classification model; the supply chain knowledge base is constructed by the following steps, including: Determine the target text corresponding to the target document by using the supply chain knowledge acquisition and editing model; Using natural language processing technology to segment the target text to obtain a segmented target text; Determine the at least one first knowledge tag and the first supply chain data corresponding to each first knowledge tag based on the target text after word segmentation by using the supply chain knowledge classification model; The at least one first knowledge tag and the first supply chain data corresponding to each of the first knowledge tags are determined as the supply chain knowledge base.
6. The supply chain question-answering method based on a language large model according to claim 5 is characterized in that: The step of using the supply chain knowledge collection and editing model to determine the target text corresponding to the target document includes: In the case where the type of the target document is a picture type, using the optical character recognition technology of the supply chain knowledge acquisition and editing model to extract text from the picture type target document to obtain the target text; In the case where the type of the target document is a voice type, using the voice recognition technology of the supply chain knowledge acquisition and editing model to perform text extraction on the voice type target document to obtain the target text; In the case that the type of the target document is a text type, a text type target document is determined as the target text.
7. A supply chain question-answering device based on a large language model, characterized in that: include: The acquisition module is used to obtain user question data of the supply chain question-answering system; A question-answering module is used to determine answer data corresponding to the user question data based on the user question data and the supply chain knowledge base using a target question-answering model; the target question-answering model is obtained by training a first language large model using the supply chain knowledge base, and the supply chain knowledge base is obtained by extracting knowledge from a target document in the supply chain field using a second language large model, and the supply chain knowledge base contains at least one first knowledge tag and first supply chain data corresponding to each first knowledge tag; using the target question-answering model, the answer data is sent to the user corresponding to the user question data of the supply chain question-answering system.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the supply chain question-answering method based on the language large model as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the supply chain question-answering method based on a language large model as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the supply chain question-answering method based on a language large model as described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Construction method of intelligent question-answering system in security domain and intelligent question-answering system
CN119443232A
Supply chain question and answer enhancement method and device and supply chain data processing system
CN120744076A
Supply chain question and answer enhancement method and apparatus, and supply chain data processing system
CN120744076B
