Intelligent questioning and answering method and device for ETC service, electronic equipment and storage medium
Through intelligent question-and-answer methods, the ETC knowledge base and question-and-answer model are used to identify user intentions and generate answers, solving the problem of low efficiency in ETC business consultation, achieving fast and accurate information feedback, and improving user experience.
Patent Information
- Application Number
- CN202411133171.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-06
AI Technical Summary
Existing ETC business consulting mainly relies on manual customer service, resulting in low efficiency, poor user experience, and prone to waiting in line, which cannot meet the needs of fast and accurate information feedback.
The intelligent question-and-answer method is adopted to identify intentions through the consultation content entered by the user, and the answers are generated using the preset ETC knowledge base and question-and-answer model, and the answers are spliced with the target business knowledge fragments and customer service contact information, and feedback to the user in real time.
It improves the processing efficiency and reply accuracy of ETC business consultation, improves the user experience, and achieves rapid and comprehensive acquisition of ETC business information.
Smart Images

Figure CN119088979A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to an intelligent question-answering method, device, electronic device and storage medium for ETC business. Background Art
[0002] ETC (Electronic Toll Collection) is a toll collection method that allows vehicles to pay tolls without stopping when passing through toll stations. As the number of domestic motor vehicles continues to grow, more and more users are using ETC. Currently, business inquiries about ETC are usually handled by manual customer service, but this method is limited to fixed working hours, and manual processing is inefficient, which easily requires users to wait in line, reducing the user experience. Summary of the invention
[0003] In view of this, the object of the present invention is to provide an intelligent question-answering method, device, electronic device and storage medium for ETC business.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0005] In a first aspect, the present invention provides an intelligent question-answering method for an ETC service, the intelligent question-answering method for the ETC service comprising:
[0006] Intent recognition is performed based on the consultation content input by the user to obtain the target intent category;
[0007] In the case where the target intent category belongs to a preset ETC business category set, obtaining a target business knowledge fragment matching the consultation content from all business knowledge fragments of a pre-built ETC knowledge base;
[0008] Generate answers corresponding to the consultation content using the preset ETC question-answering model;
[0009] The answer, the target business knowledge fragment and the preset customer service contact information are spliced together as the reply content corresponding to the consultation content and fed back to the user.
[0010] In an optional implementation, the step of performing intent recognition based on the consultation content input by the user to obtain a target intent category includes:
[0011] Obtaining keywords by performing word segmentation and part-of-speech tagging on the consulting content;
[0012] Using a preset intention recognition model, intention recognition is performed based on the keywords and the consultation content to obtain the target intention category.
[0013] In an optional implementation, the step of performing intent recognition based on the consultation content input by the user to obtain a target intent category includes:
[0014] When the consultation content is not the content input by the user for the first time, keywords are obtained by segmenting and tagging the consultation content;
[0015] Using a preset intention recognition model, the intention is recognized based on the keywords and the consultation content to obtain candidate intention categories;
[0016] The target intention category is determined among the candidate intention categories and the historical intention categories corresponding to each historical consultation content input by the user.
[0017] In an optional embodiment, the ETC knowledge base includes each ETC service category in the ETC service category set, and a plurality of service knowledge fragments of each of the ETC service categories and their corresponding knowledge fragment vectors;
[0018] The step of acquiring a target business knowledge fragment matching the consulting content from all business knowledge fragments of the pre-built ETC knowledge base includes:
[0019] Performing vectorization processing on the consulting content to obtain a consulting content vector;
[0020] The ETC service category consistent with the target intention category is used as the target ETC service category;
[0021] Acquire each business knowledge segment of the target ETC business category to obtain each candidate business knowledge segment;
[0022] Calculating the matching degree between the consulting content and each of the candidate business knowledge segments according to the consulting content vector and the knowledge segment vector corresponding to each of the candidate business knowledge segments;
[0023] The candidate business knowledge fragment with the highest matching degree is used as the target business knowledge fragment.
[0024] In an optional implementation manner, the intelligent question-answering method for the ETC service further includes:
[0025] When the target intention category does not belong to the ETC business category set, the ETC question-answering model is used to generate an answer corresponding to the consultation content, and the answer is fed back to the user as the reply content corresponding to the consultation content.
[0026] In an optional implementation, the ETC knowledge base is constructed in the following manner:
[0027] Obtain multiple historical ETC business consulting work orders, and obtain business knowledge fragments from each of the historical ETC business consulting work orders;
[0028] According to each ETC service category in the ETC service category set, all service knowledge fragments are classified to obtain all service knowledge fragments of each ETC service category;
[0029] For each of the ETC service categories, vectorization processing is performed on each service knowledge fragment of the ETC service category to obtain each service knowledge fragment of the ETC service category and its corresponding knowledge fragment vector;
[0030] All business knowledge fragments and their corresponding knowledge fragment vectors of each ETC business category are stored to obtain the ETC knowledge base.
[0031] In an optional implementation, the ETC question-answering model is obtained in the following manner:
[0032] Obtain multiple historical ETC business consulting work orders, and obtain business knowledge fragments from each of the historical ETC business consulting work orders;
[0033] Based on each of the business knowledge fragments, construct each first question-answer pair sample;
[0034] Based on each preset non-business statement, construct each second question-answer pair sample;
[0035] The basic language model is trained using each of the first question-answer pair samples and each of the second question-answer pair samples to obtain the ETC question-answer model.
[0036] In a second aspect, the present invention provides an intelligent question-answering device for an ETC service, the intelligent question-answering device for the ETC service comprising:
[0037] A recognition module, used to identify the intent based on the consultation content input by the user to obtain the target intent category;
[0038] A matching module, for obtaining a target business knowledge fragment matching the consultation content from all business knowledge fragments of a pre-built ETC knowledge base when the target intent category belongs to a preset ETC business category set;
[0039] A generation module, used to generate answers corresponding to the consultation content using a preset ETC question-answering model;
[0040] The reply module is used to combine the answer, the target business knowledge fragment and the preset customer service contact information as the reply content corresponding to the consultation content and feed it back to the user.
[0041] In a third aspect, the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the intelligent question and answer method for the ETC business described in any one of the aforementioned embodiments is implemented.
[0042] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the intelligent question-and-answer method for the ETC business described in any one of the aforementioned embodiments is implemented.
[0043] The present invention provides an intelligent question-and-answer method, device, electronic device and storage medium for ETC business, the method comprising: performing intent recognition based on the consultation content input by the user to obtain a target intent category; when the target intent category belongs to a preset ETC business category set, obtaining a target business knowledge fragment that matches the consultation content from all business knowledge fragments of a pre-built ETC knowledge base; and using a preset ETC question-and-answer model to generate an answer corresponding to the consultation content; and then using the answer, the target business knowledge fragment and the preset customer service contact information as the reply content corresponding to the consultation content and feeding it back to the user. The present invention obtains ETC business information through a knowledge base combined with a question-and-answer model, so that comprehensive and complete ETC business information can be obtained and fed back to the user in a timely manner, thereby improving the processing efficiency of ETC business consultations and ensuring the accuracy of replies.
[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0046] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention is shown;
[0047] Figure 2 One of the flow diagrams of the intelligent question-answering method for the ETC service provided by an embodiment of the present invention is shown;
[0048] Figure 3 The second flowchart of the intelligent question-answering method for ETC services provided by an embodiment of the present invention is shown;
[0049] Figure 4 The third flowchart of the intelligent question-answering method for ETC services provided by an embodiment of the present invention is shown;
[0050] Figure 5 A functional module diagram of an intelligent question-and-answer device for ETC services provided in an embodiment of the present invention is shown.
[0051] Icons: 100 - electronic device; 110 - bus; 120 - processor; 130 - memory; 150 - I / O module; 170 - communication module; 300 - intelligent question-and-answer device for ETC business; 310 - identification module; 330 - matching module; 350 - generation module; 370 - reply module. DETAILED DESCRIPTION
[0052] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0053] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0054] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0055] See also Figure 1 , is a block diagram of an electronic device provided by an embodiment of the present invention. The electronic device 100 includes a bus 110 , a processor 120 , a memory 130 , an I / O module 150 and a communication module 170 .
[0056] The bus 110 is a circuit that connects the above elements to each other and transmits signals between the above elements.
[0057] The processor 120 can receive commands from the above-mentioned other elements (such as the memory 130, the I / O module 150, the communication module 170, etc.) through the bus 110, can interpret the received commands, and can perform calculations or data processing according to the interpreted commands. The processor 120 can be an integrated circuit chip with signal processing capabilities. The processor 120 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0058] The memory 130 may store commands or data received from the processor 120 or other components (e.g., the I / O module 150, the communication module 170, etc.) or commands or data generated by the processor 120 or other components. The memory 130 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), or an electrically erasable read-only memory (EEPROM).
[0059] The I / O module 150 may receive commands or data input from a user via input-output means (e.g., a sensor, a keyboard, a touch screen, etc.), and may transmit the received commands or data to the processor 120 or the memory 130 via the bus 110. It is also used to display various information (e.g., multimedia data, text data) received, stored, and processed from the above elements, and may display videos, images, data, etc. to the user.
[0060] The communication module 170 may be used to communicate signals or data with other devices.
[0061] Understandably, Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0062] The above-mentioned electronic device 100 will be used as an execution subject to execute each step in each method provided in the embodiment of the present invention and achieve corresponding technical effects.
[0063] See also Figure 2 , is a flow chart of an intelligent question-answering method for ETC business provided in an embodiment of the present invention.
[0064] Step S222: performing intent recognition based on the consultation content input by the user to obtain a target intent category.
[0065] In this embodiment, the user can input the content that he wants to consult through interactive operation, and the intention recognition is performed based on the consultation content input by the user, so that the user's consultation intention, that is, the target intention category, can be obtained. It can be understood that the interactive operation can be implemented by voice, interactive buttons, physical buttons, external devices, etc.
[0066] Step S224, when the target intent category belongs to a preset ETC business category set, a target business knowledge fragment matching the consulting content is obtained from all business knowledge fragments of the pre-built ETC knowledge base.
[0067] Step S226, using the preset ETC question-answering model, generates an answer corresponding to the consultation content.
[0068] It is understandable that an ETC business category set can be pre-set, and the ETC business categories in the set represent the ETC consulting services that can be handled by the intelligent question and answer. For example, the preset ETC business category set can include three ETC business categories, namely ETC handling, ETC use and ETC after-sales. It should be noted that the specific ETC business categories and quantities in the ETC business category set can be set according to actual conditions, and the embodiments of the present invention do not limit this.
[0069] In this embodiment, based on the obtained target intention category, it is compared with the preset ETC business category set to determine whether the user's consultation intention is related to the ETC business. If the target intention category belongs to the preset ETC business category set, it means that the user's consultation intention is related to the ETC business, then the target business knowledge fragment matching the consultation content is obtained from all business knowledge bases of the pre-built ETC knowledge base; and the preset ETC question-answering model is used to generate the answer corresponding to the consultation content.
[0070] Step S228: The concatenated content of the answer, the target business knowledge fragment, and the preset customer service contact information is used as the reply content corresponding to the consultation content and fed back to the user.
[0071] In this embodiment, after obtaining the target business knowledge fragment and the generated answer, they can be spliced with the preset customer service contact information, and the spliced content can be fed back to the user as the reply content corresponding to the consultation content. For example, the customer service contact information can be set as "I hope my answer can help you. If necessary, you can call our customer service phone number: XXX". It should be understood that the customer service contact information can be set according to the actual situation, and the embodiment of the present invention is not limited to this.
[0072] It can be understood that the embodiment of the present invention obtains ETC business information through the knowledge base combined with the question-answer model, so as to obtain comprehensive and complete ETC business information and timely feedback to the user, thereby improving the processing efficiency of ETC business consultation and ensuring the accuracy of the reply. At the same time, by feeding back the customer service contact information to the user, it is convenient to provide targeted services according to the user's own needs, thereby improving the user experience.
[0073] It can be seen that based on the above steps, the target intent category is obtained by performing intent recognition based on the consultation content input by the user; when the target intent category belongs to the preset ETC business category set, the target business knowledge fragment matching the consultation content is obtained from all the business knowledge fragments of the pre-built ETC knowledge base; and the preset ETC question-and-answer model is used to generate the answer corresponding to the consultation content; and the spliced content of the answer, the target business knowledge fragment and the preset customer service contact information is used as the reply content corresponding to the consultation content and fed back to the user. The present invention obtains ETC business information through the knowledge base and combines the question-and-answer model, so that comprehensive and complete ETC business information can be obtained and fed back to the user in a timely manner, which improves the processing efficiency of ETC business consultation and ensures the accuracy of the reply.
[0074] Optionally, after step S222, an embodiment of the present invention provides a possible implementation manner.
[0075] Step S230, when the target intent category does not belong to the ETC business category set, the ETC question-answering model is used to generate an answer corresponding to the consultation content, and the answer is fed back to the user as the reply content corresponding to the consultation content.
[0076] In this embodiment, if after comparing the target intention category with the preset ETC business category set, it is determined that the target intention category does not belong to the ETC business category set, it means that the user's consultation intention is not related to the ETC business. In this case, the ETC question-and-answer model is used to generate an answer corresponding to the consultation content, and the answer is fed back to the user as the reply content corresponding to the consultation content.
[0077] For ease of understanding, the following will continue to use the ETC business category set including ETC handling, ETC use and ETC after-sales as an example for explanation. For example, the consultation content entered by the user is "Hello", and the intent recognition is performed based on this consultation content. The target intent category obtained is greeting, which is compared with the three ETC business categories in the ETC business category set.
[0078] After comparison, it is determined that the target intent category does not belong to the ETC business category set. Then, the ETC question-answering model is used to generate an answer corresponding to the consultation content. For example, the answer is "Hello, I am an ETC business consultation intelligent assistant, and I can provide you with relevant information on the handling, use and after-sales of ETC products." Then this answer is fed back to the user as the reply content corresponding to the consultation content.
[0079] It can be understood that the embodiment of the present invention directly uses the ETC question-and-answer model to generate answers when the user's consultation intention is not related to the ETC business, and feeds back the answers to the user as reply content, thereby achieving rapid response to the user and improving the user experience.
[0080] Optionally, for step S222, an embodiment of the present invention provides a possible implementation method.
[0081] Step S222A-1, obtain keywords by segmenting and tagging the consultation content.
[0082] Step S222A-3, using a preset intention recognition model, perform intention recognition based on keywords and consultation content to obtain a target intention category.
[0083] In this embodiment, based on the consultation content input by the user, a word processing tool can be used to segment and tag the consultation content and obtain keywords. Then, a preset intent recognition model is used to recognize the intent based on the keywords and the consultation content, and the target intent category is obtained. Optionally, the intent recognition model can use a model such as BERT or RoBERTa.
[0084] For ease of understanding, the following will continue to use the ETC business category set including the three ETC business categories of ETC handling, ETC use and ETC after-sales as an example for explanation. For example, the consultation content entered by the user is "How to apply for ETC". After word segmentation and part-of-speech tagging of this consultation content, each word and its part of speech are obtained, namely "how" (adverb), "handling" (verb), "ETC" (noun). Then, words with verb and noun parts of speech are used as keywords, and the keywords "handling" and "ETC" are obtained. Then these two keywords and the consultation content are input into the intent recognition model, and the intent recognition model is used to identify the intent, and the target intent category obtained is ETC handling.
[0085] Optionally, for step S222, the embodiment of the present invention provides another possible implementation manner.
[0086] Step S222B-1, when the consultation content is not the content input by the user for the first time, keywords are obtained by performing word segmentation and part-of-speech tagging on the consultation content.
[0087] Step S222B-3, using a preset intention recognition model, perform intention recognition based on keywords and consultation content to obtain candidate intention categories.
[0088] Step S222B-5, determining a target intention category among the candidate intention categories and the historical intention categories corresponding to each historical consultation content input by the user.
[0089] It is understandable that in order to further improve the accuracy of identifying the user's consultation intention, during multiple rounds of dialogue, the embodiment of the present invention can also combine the historical consultation content input by the user to clarify the user's consultation intention.
[0090] In this embodiment, if the consultation content is not the first time the user inputs the content, a word processing tool can be used to segment and tag the consultation content to obtain keywords, and an intention recognition model can be used to recognize the intention based on the keywords and the consultation content, that is, to obtain candidate intention categories. Then, the historical intention category corresponding to each historical consultation content input by the user is obtained, and the target intention category is determined from the candidate intention categories and all historical intention categories.
[0091] For example, the number of identical intent categories can be counted based on the candidate intent categories and all historical intent categories, and the intent category with the largest number can be used as the target intent category. Also, the candidate intent categories and each historical intent category can be scored for relevance based on the consultation content input by the user this time and all historical consultation content, and the intent category with the highest score can be used as the target intent category.
[0092] It can be understood that in the scenario of multiple rounds of dialogue, the embodiment of the present invention will also identify the user's consultation intention in combination with the historical consultation content input by the user, thereby improving the accuracy of intention recognition so that accurate ETC business information can be obtained later.
[0093] Optionally, for step S224, an embodiment of the present invention provides a possible implementation method.
[0094] Step S224-1, vectorize the consulting content to obtain a consulting content vector.
[0095] Step S224-3, taking the ETC service category consistent with the target intention category as the target ETC service category.
[0096] Step S224-5, obtaining each business knowledge segment of the target ETC business category to obtain each candidate business knowledge segment.
[0097] Step S224-7, calculating the matching degree between the consulting content and each candidate business knowledge segment according to the consulting content vector and the knowledge segment vector corresponding to each candidate business knowledge segment.
[0098] Step S224 - 9 , taking the candidate business knowledge segment with the highest matching degree as the target business knowledge segment.
[0099] In this embodiment, the ETC knowledge base includes each ETC business category in the ETC business category set, and multiple business knowledge fragments and their corresponding knowledge fragment vectors for each ETC business category. For example, the ETC knowledge base may include multiple business knowledge fragments handled by ETC and their corresponding knowledge fragment vectors, multiple business knowledge fragments used by ETC and their corresponding knowledge fragment vectors, and multiple business knowledge fragments for ETC after-sales and their corresponding knowledge fragment vectors.
[0100] For ease of understanding, the following is an example in which the consulting content is the above-mentioned "How to apply for ETC" and the target intent category is the above-mentioned "ETC handling". For example, the consulting content "How to apply for ETC" is vectorized to obtain a consulting content vector. Then, the ETC business category with the same target intent category is used as the target ETC business category, and each business knowledge fragment of the target ETC business category is obtained, that is, multiple business knowledge fragments of ETC handling are obtained, and each candidate business knowledge fragment is obtained.
[0101] Then calculate the cosine similarity between the consulting content vector and the knowledge segment vector corresponding to each candidate business knowledge segment, and get the matching degree between the consulting content and each candidate business knowledge segment. And take the candidate business knowledge segment with the highest matching degree as the target business knowledge segment, and get the target business knowledge segment that matches the consulting content. For example, the target business knowledge segment is "You can click Add to Handle on the homepage of the application, and then you can view the detailed information of each package in the display of multiple ETC handling packages. After understanding, you can choose the package you want to handle and pay."
[0102] The consultation content "How to apply for ETC" is input into the ETC question-answering model to generate the corresponding answer, such as "To apply for ETC, you need to upload your ID card, driving license, and vehicle head photo." This answer, the obtained target knowledge fragment, and the preset customer service contact information are then spliced together, and the spliced content is fed back to the user as the reply content corresponding to the consultation content. This realizes the intelligent service of ETC business consultation.
[0103] Optionally, for the above-mentioned ETC knowledge base, the embodiment of the present invention also provides an implementation method for constructing an ETC knowledge base, please refer to Figure 3 .
[0104] Step S202, obtain multiple historical ETC business consultation work orders, and obtain business knowledge fragments from each historical ETC business consultation work order.
[0105] Step S204, classifying all business knowledge fragments according to each ETC business category in the ETC business category set to obtain all business knowledge fragments of each ETC business category.
[0106] Step S206: for each ETC service category, vectorize each service knowledge fragment of the ETC service category to obtain each service knowledge fragment of the ETC service category and its corresponding knowledge fragment vector.
[0107] Step S208, storing all business knowledge fragments and their corresponding knowledge fragment vectors of each ETC business category to obtain an ETC knowledge base.
[0108] For ease of understanding, the following will continue to use the ETC business category set including ETC handling, ETC use and ETC after-sales as an example for explanation. For example, business consultation work orders for the three ETC business categories of ETC handling, ETC use and ETC after-sales handled by manual customer service can be obtained, that is, multiple historical ETC business consultation work orders can be obtained.
[0109] Then, the initial business knowledge fragments are extracted from each historical ETC business consultation work order, and these initial business knowledge fragments are pre-processed by cleaning, deduplication, formatting and other operations to obtain multiple business knowledge fragments. Then, according to the three ETC business categories of ETC handling, ETC use and ETC after-sales, all business knowledge fragments are classified to obtain all business knowledge fragments of ETC handling, all business knowledge fragments of ETC use and all business knowledge fragments of ETC after-sales.
[0110] Then, each business knowledge fragment handled by ETC, each business knowledge fragment used by ETC, and each business knowledge fragment after ETC sales are vectorized, that is, each business knowledge fragment handled by ETC and its corresponding knowledge fragment vector, each business knowledge fragment used by ETC and its corresponding knowledge fragment vector, and each business knowledge fragment after ETC sales and its corresponding knowledge fragment vector are obtained. Finally, all business knowledge fragments of each ETC business category and their corresponding knowledge fragment vectors are stored to obtain the ETC knowledge base. Optionally, ChromaDB can be used to store all business knowledge fragments of each ETC business category and their corresponding knowledge fragment vectors.
[0111] It is understandable that for the ETC knowledge base, new ETC business consultation work orders can also be obtained regularly, and new business knowledge fragments can be extracted and added to the ETC knowledge base to regularly update and maintain the ETC knowledge base.
[0112] Optionally, for the above-mentioned ETC question-answering model, the embodiment of the present invention provides an implementation method for obtaining the ETC question-answering model, please refer to Figure 4 .
[0113] Step S212, obtain multiple historical ETC business consultation work orders, and obtain business knowledge fragments from each historical ETC business consultation work order.
[0114] Step S214: construct each first question-answer pair sample based on each business knowledge fragment.
[0115] Step S216, constructing each second question-answer pair sample based on each preset non-business statement.
[0116] Step S218, using each first question-answer pair sample and each second question-answer pair sample, the basic language model is trained to obtain the ETC question-answer model.
[0117] For ease of understanding, the following will continue to use the ETC business category set including ETC handling, ETC use and ETC after-sales as an example for explanation. For example, business consultation work orders for the three ETC business categories of ETC handling, ETC use and ETC after-sales handled by manual customer service can be obtained, that is, multiple historical ETC business consultation work orders can be obtained.
[0118] Then, we extract initial business knowledge fragments from each historical ETC business consultation work order, and perform pre-processing operations such as cleaning, deduplication, and formatting on these initial business knowledge fragments to obtain multiple business knowledge fragments. Then, based on each business knowledge fragment, we construct each first question-answer pair sample, that is, we set a corresponding question label for the business knowledge fragment, and obtain the first question-answer pair sample consisting of the question label and the corresponding business knowledge fragment.
[0119] Then, multiple statements that are not related to ETC business are pre-set, that is, multiple non-business statements are obtained. And based on each non-business statement, each second question-answer pair sample is constructed. That is, corresponding answer labels are set for non-business statements, and second question-answer pair samples consisting of non-business statements and corresponding answer labels are obtained. Finally, each first question-answer pair sample and each second question-answer pair sample are used to train the basic language model, and the trained basic language model obtained is the ETC question-answer model. Optionally, the basic language model can adopt the ChatGLM model.
[0120] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing an intelligent question-answering device for ETC services is provided below. Figure 5 , is a functional module diagram of the intelligent question-answering device for ETC service provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the intelligent question-answering device 300 for ETC service provided in this embodiment are the same as those in the above embodiment. For the sake of brief description, for matters not mentioned in this embodiment, reference may be made to the corresponding contents in the above embodiment. The intelligent question-answering device 300 for ETC service includes:
[0121] The identification module 310 is used to perform intent identification based on the consultation content input by the user to obtain a target intent category.
[0122] The matching module 330 is used to obtain a target business knowledge fragment that matches the consultation content from all business knowledge fragments in a pre-built ETC knowledge base when the target intention category belongs to a preset ETC business category set.
[0123] The generation module 350 is used to generate answers corresponding to the consultation content using the preset ETC question-answering model.
[0124] The reply module 370 is used to combine the answer, the target business knowledge fragment and the preset customer service contact information as the reply content corresponding to the consultation content and feed it back to the user.
[0125] Optionally, the recognition module 310 is also used to: obtain keywords by performing word segmentation and part-of-speech tagging on the consultation content; and use a preset intent recognition model to perform intent recognition based on the keywords and the consultation content to obtain a target intent category.
[0126] Optionally, the identification module 310 is also used for: when the consultation content is not the content input by the user for the first time, obtaining keywords by performing word segmentation and part-of-speech tagging on the consultation content; using a preset intention recognition model to perform intention recognition based on keywords and consultation content to obtain candidate intention categories; and determining the target intention category among the candidate intention categories and the historical intention categories corresponding to each historical consultation content input by the user.
[0127] Optionally, the matching module 330 is also used to: vectorize the consulting content to obtain a consulting content vector; take the ETC business category consistent with the target intent category as the target ETC business category; obtain each business knowledge fragment of the target ETC business category to obtain each candidate business knowledge fragment; calculate the matching degree between the consulting content and each candidate business knowledge fragment based on the consulting content vector and the knowledge fragment vector corresponding to each candidate business knowledge fragment; and take the candidate business knowledge fragment with the highest matching degree as the target business knowledge fragment.
[0128] Optionally, the generation module 350 is also used to: when the target intent category does not belong to the ETC business category set, use the ETC question-and-answer model to generate an answer corresponding to the consultation content; the reply module 370 is also used to: feed back the answer to the user as the reply content corresponding to the consultation content.
[0129] Optionally, the ETC knowledge base is constructed in the following manner: according to each ETC business category in the ETC business category set, all business knowledge fragments are classified to obtain all business knowledge fragments of each ETC business category; for each ETC business category, each business knowledge fragment of the ETC business category is vectorized to obtain each business knowledge fragment of the ETC business category and its corresponding knowledge fragment vector; all business knowledge fragments of each ETC business category and its corresponding knowledge fragment vector are stored to obtain the ETC knowledge base.
[0130] Optionally, the ETC question and answer model is obtained in the following manner: obtain multiple historical ETC business consulting work orders, and obtain business knowledge fragments from each historical ETC business consulting work order; based on each business knowledge fragment, construct each first question and answer pair sample; based on each preset non-business statement, construct each second question and answer pair sample; use each first question and answer pair sample and each second question and answer pair sample to train the basic language model to obtain the ETC question and answer model.
[0131] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the intelligent question-and-answer method for the ETC business disclosed in the embodiment of the present invention is implemented.
[0132] An embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the intelligent question-and-answer method for the ETC business disclosed in the embodiment of the present invention is implemented.
[0133] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0134] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0135] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including several instructions for enabling 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 methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent question-answering method for ETC services, characterized in that: The intelligent question-answering method of the ETC service includes: Intent recognition is performed based on the consultation content input by the user to obtain the target intent category; In the case where the target intent category belongs to a preset ETC business category set, obtaining a target business knowledge fragment matching the consultation content from all business knowledge fragments of a pre-built ETC knowledge base; Generate answers corresponding to the consultation content using the preset ETC question-answering model; The answer, the target business knowledge fragment and the preset customer service contact information are spliced together as the reply content corresponding to the consultation content and fed back to the user.
2. The intelligent question-answering method for ETC service according to claim 1, characterized in that: The step of performing intent recognition based on the consultation content input by the user to obtain the target intent category includes: Obtaining keywords by performing word segmentation and part-of-speech tagging on the consulting content; Using a preset intention recognition model, intention recognition is performed based on the keywords and the consultation content to obtain the target intention category.
3. The intelligent question-answering method for ETC service according to claim 1, characterized in that: The step of performing intent recognition based on the consultation content input by the user to obtain the target intent category includes: When the consultation content is not the content input by the user for the first time, keywords are obtained by performing word segmentation and part-of-speech tagging on the consultation content; Using a preset intention recognition model, the intention is recognized based on the keywords and the consultation content to obtain candidate intention categories; The target intention category is determined among the candidate intention categories and the historical intention categories corresponding to each historical consultation content input by the user.
4. The intelligent question-answering method for ETC service according to claim 1, characterized in that: The ETC knowledge base includes each ETC service category in the ETC service category set, and a plurality of service knowledge fragments of each ETC service category and their corresponding knowledge fragment vectors; The step of acquiring a target business knowledge fragment matching the consulting content from all business knowledge fragments of the pre-built ETC knowledge base includes: Performing vectorization processing on the consulting content to obtain a consulting content vector; The ETC service category consistent with the target intention category is used as the target ETC service category; Acquire each business knowledge segment of the target ETC business category to obtain each candidate business knowledge segment; Calculating the matching degree between the consulting content and each of the candidate business knowledge segments according to the consulting content vector and the knowledge segment vector corresponding to each of the candidate business knowledge segments; The candidate business knowledge fragment with the highest matching degree is used as the target business knowledge fragment.
5. The intelligent question-answering method for ETC service according to claim 1, characterized in that: The intelligent question-answering method for the ETC service also includes: When the target intention category does not belong to the ETC business category set, the ETC question-answering model is used to generate an answer corresponding to the consultation content, and the answer is fed back to the user as the reply content corresponding to the consultation content.
6. The intelligent question-answering method for ETC service according to claim 1, characterized in that: The ETC knowledge base is constructed in the following manner: Obtain multiple historical ETC business consulting work orders, and obtain business knowledge fragments from each of the historical ETC business consulting work orders; According to each ETC service category in the ETC service category set, all service knowledge fragments are classified to obtain all service knowledge fragments of each ETC service category; For each of the ETC service categories, vectorization processing is performed on each service knowledge fragment of the ETC service category to obtain each service knowledge fragment of the ETC service category and its corresponding knowledge fragment vector; All business knowledge fragments and their corresponding knowledge fragment vectors of each ETC business category are stored to obtain the ETC knowledge base.
7. The intelligent question-answering method for ETC service according to claim 1, characterized in that: The ETC question-answering model is obtained in the following way: Obtain multiple historical ETC business consulting work orders, and obtain business knowledge fragments from each of the historical ETC business consulting work orders; Based on each of the business knowledge fragments, construct each first question-answer pair sample; Based on each preset non-business statement, construct each second question-answer pair sample; The basic language model is trained using each of the first question-answer pair samples and each of the second question-answer pair samples to obtain the ETC question-answer model.
8. An intelligent question-answering device for ETC services, characterized in that: The intelligent question-answering device for the ETC service includes: A recognition module, used to identify the intent based on the consultation content input by the user to obtain the target intent category; A matching module, for obtaining a target business knowledge fragment matching the consultation content from all business knowledge fragments of a pre-built ETC knowledge base when the target intent category belongs to a preset ETC business category set; A generation module, used to generate answers corresponding to the consultation content using a preset ETC question-answering model; The reply module is used to combine the answer, the target business knowledge fragment and the preset customer service contact information as the reply content corresponding to the consultation content and feed it back to the user.
9. An electronic device, characterized in that: It comprises a processor and a memory, the memory stores a computer program, and when the processor executes the computer program, it implements the intelligent question-answering method for the ETC business described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the intelligent question-answering method for the ETC service according to any one of claims 1 to 7.
Citation Information
Patent Citations
Diabetes health propaganda and education and medication recommendation system based on large language model
CN117690604A
Knowledge base text matching question and answer method, device and equipment based on dialogue model
CN118427326A
