Question-answering method applied to tour guide system
By combining pre-retrieval, intent understanding and multi-source information retrieval methods in the navigation system, using fine-tuned language models to generate answers, and calling recommendation and location engines, we solve the problems of personalized and real-time services in the cultural and museum field, and achieve accurate Knowledge Q&A and navigation meet the needs of knowledge traceability and confidentiality.
Patent Information
- Application Number
- CN202410764014.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-14
AI Technical Summary
The existing navigation system is difficult to provide personalized, accurate and real-time knowledge question and answer services in the cultural and museum field, and it cannot meet the museum's needs for traceability of knowledge sources and confidentiality principles.
A question-and-answer method is adopted. By comparing the pre-retrieval model with the template library, the intention understanding model determines the relevance of the question, retrieves semantically similar results from multi-source information data sources, combines the fine-tuning language model to generate answers, and calls it when necessary. Recommend models and location engines to provide personalized navigation services.
It realizes accurate and personalized knowledge question and answer and location navigation services in the cultural and museum field, improves the audience's visiting experience and sense of participation, and at the same time meets the requirements of the traceability of knowledge sources and the principle of confidentiality.
Smart Images

Figure CN118364089B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a question-answering method applied to a guide system. Background Art
[0002] Museums are used to collect, protect, display and study various cultural relics and historical remains. With the increasing public demand for culture, museums have become a comprehensive cultural service institution that integrates auxiliary education, entertainment interaction and academic research. The guided tour service for the audience is an important part of the comprehensive cultural service of the museum. Through the guided tour services and content provided by the museum, the audience can understand and learn about historical culture and cultural relics. Therefore, technologies dedicated to optimizing guided tour services have been applied. With the popularization of smart technology terminals and the advancement of museum informatization, the forms of guided tours for audiences have been continuously enriched. At present, there are many guided tour methods, such as voice guided tours, WeChat guided tours, multimedia guided tours, AR guided tours, etc. The audience can obtain high-quality cultural and museum knowledge more conveniently through media such as smart terminals, special guided tour equipment, and guided screens, which enhances the audience's visiting experience. With the development and application of artificial intelligence technology, it is an urgent problem to use artificial intelligence to quickly improve the accuracy and personalization of guided tour services.
[0003] In the process of implementing the present invention, it is found that the cultural and museum field has a special context and strong professionalism, and has high requirements for knowledge authority and accuracy. It is necessary to ensure that the source of knowledge can be traced. In addition, due to the principle of confidentiality, many cultural relics data in museums are not allowed to be disclosed to the public. Therefore, conventional methods cannot meet the actual needs of guided tour services in the cultural and museum industry. Summary of the invention
[0004] In view of the above problems, the present invention provides a question-answering method applied to a navigation system, the method comprising:
[0005] Get the question text related to the tourist consultation question;
[0006] Input the question text into the pre-retrieval model so as to compare the similarity between the question text and a plurality of answer template texts in the template library, and output a pre-retrieval result, wherein the pre-retrieval result is one of a first result, a second result, and a third result, wherein the first result is: there is a first answer template text in the template library whose similarity with the question text is greater than a first threshold, the second result is: there is a second answer template text in the template library whose similarity with the question text is greater than a second threshold and is less than or equal to the first threshold, and the third result is that the similarities between the plurality of answer template texts in the template library and the question text are all less than or equal to the second threshold, and the first threshold is greater than the second threshold;
[0007] When the pre-search result is the second result, the question text is input into the intention understanding model, and the intention understanding model is used to determine whether the question text is related to the business services that the navigation system can provide;
[0008] In the case where the question text is related to the business services that the navigation system can provide, a search result text having semantic similarity with the question text is retrieved from a plurality of predetermined types of information data sources, wherein the plurality of predetermined types of information data sources are constructed based on knowledge data in the field of cultural relics and museums;
[0009] Generate a question and answer prompt text based on the second answer template text and the search result text;
[0010] The question text, question and answer prompt text, and question and answer requirement instructions are input into the fine-tuned language model, and the answer text for the tourists' consultation questions is output.
[0011] According to an embodiment of the present invention, wherein:
[0012] The fine-tuned language model also outputs at least one application call information, and the at least one application call information includes at least first call information and second call information. The first call information is used to indicate whether the recommendation model needs to be called; the second call information is used to indicate whether the location engine needs to be called.
[0013] According to an embodiment of the present invention, the method further includes:
[0014] When the first calling information is: when the recommendation model needs to be called, the visit record information of the tourists in the target time period is obtained, wherein the visit record information is stored in the form of an ordered list;
[0015] Calling the recommendation model, and outputting recommendation information for tourists based on the visit record information through the recommendation model;
[0016] The recommendation information is returned to the fine-tuned language model, the rationality of the recommendation information output by the recommendation model is judged by the fine-tuned language model, and re-recommendations are made based on the recommendation information output by the recommendation model.
[0017] According to an embodiment of the present invention, the method further includes:
[0018] When the second call information indicates that the location engine needs to be called, the current location information of the visitor is obtained;
[0019] Calling the location engine to output navigation information for the tourist based on the tourist's current location information and the location information of the next exhibition area corresponding to the recommendation information for the tourist; or outputting navigation information for the tourist based on the tourist's current location information and the consulting information about public utility services or the location of the cultural relics exhibition area in the tourist's consultation questions.
[0020] According to an embodiment of the present invention, wherein:
[0021] The visit record information includes at least: the multiple exhibition areas visited by tourists, the order of visiting multiple exhibition areas, the information of cultural relics visited by tourists in each exhibition area, the length of time tourists stay in each exhibition area, tourist interaction information, the completeness of tourists' listening to knowledge explanations, information on tourists' participation in activities carried out, and information on tourists' current location.
[0022] According to an embodiment of the present invention, the recommendation model is trained by the following method:
[0023] Acquire historical visit record information of multiple historical visitors to the museum, where the historical visit record information is stored in the form of an ordered list, and the historical visit record information at least includes the historical visit sequence of the historical visitors to the multiple historical exhibition areas;
[0024] Based on the historical visit record information, a random masking path is used to randomly mask some of the historical exhibition areas in multiple historical exhibition areas to generate ordered list training samples;
[0025] By using the ordered list training samples, the initial recommendation model is trained to predict the historical exhibition area covered in the ordered list training samples, and a trained recommendation model is obtained.
[0026] According to an embodiment of the present invention, wherein:
[0027] Multiple predetermined types of information data sources include cultural and museum field knowledge graphs, entry knowledge bases, and supplementary knowledge documents;
[0028] The search result texts that are semantically similar to the question texts retrieved from multiple predetermined types of information data sources include:
[0029] Based on the question text, search the knowledge graph in the cultural and museum field to obtain the graph search results;
[0030] Based on the graph search results, search the entry knowledge base and supplementary knowledge documents to obtain supplementary search results;
[0031] Combine the graph retrieval results and the supplementary retrieval results to obtain a retrieval result text that is semantically similar to the question text.
[0032] According to an embodiment of the present invention, the fine-tuning language model is trained by the following method:
[0033] Call the question-answering model whose prediction performance meets the user's predetermined requirements, and construct a training text set in a self-questioning and self-answering manner based on multiple original samples collected in advance;
[0034] A multi-task training approach is adopted to train the initial language model using the training text set to obtain a trained fine-tuned language model.
[0035] According to an embodiment of the present invention, using a multi-task training method to train an initial language model using a training text set includes:
[0036] Based on the first task mode, a training text in the training text set is subjected to a first processing by adopting a random masking method to obtain a first processed text, and the masked content in the first processed text is predicted by using the initial language model to train the first text prediction ability of the initial language model;
[0037] Based on the second task mode, a masking mode of masking the second half of the text is adopted to perform a second processing on the training text in the training text set to obtain a second processed text, and the masked content in the second processed text is predicted by using the initial language model to train the second text prediction ability of the initial language model;
[0038] Based on the third task mode, the initial language model is used to perform graph restoration processing on the training text in the training text set to obtain graph triple prediction data corresponding to the training text, so as to train the graph restoration ability of the initial language model for the text;
[0039] Based on the fourth task mode, the real data of the graph triples corresponding to the training texts in the training text set are obtained, and the text restoration processing is performed on the real data of the graph triples using the initial language model to obtain the predicted text data corresponding to the real data of the graph triples, so as to train the text restoration ability of the initial language model for the graph;
[0040] Based on the fifth task mode, obtaining training question texts corresponding to the training texts in the training text set, and answering the training question texts using the initial language model to train the question-answering capability of the initial language model;
[0041] Based on the sixth task mode, a target positive sample and a target negative sample are obtained from the training text set, and the target positive sample and the target negative sample are used to train the recommendation capability of the initial language model to output the recommendation result based on the target positive sample and the target negative sample containing the question and the answer, wherein, in the target positive sample, the recommendation result is in the retrieval result text and is related to the question and the answer but is not included in the question and the answer, and in the target negative sample, the recommendation result is included in the question and / or the answer, or the recommendation result is not related to the question and the answer;
[0042] Based on the seventh task method, obtain the recommendation results corresponding to the reference samples in the training text set, and use the initial language model to determine whether the recommendation results are related to the reference samples, so as to train the recommendation ability of the initial language model;
[0043] Based on the eighth task mode, the training texts in the training text set are annotated with labels indicating whether they need to call a third-party application, and the label texts are obtained. The label texts are used to train the application call prediction capability of the initial language model.
[0044] According to an embodiment of the present invention, wherein:
[0045] Before obtaining the question text related to the tourist consultation question, the method further includes: receiving question voice data related to the tourist consultation question sent by the terminal device, performing voice recognition on the question voice data to obtain the question text;
[0046] After outputting the answer text to the tourists' consultation questions, the above method also includes: performing speech synthesis processing on the answer text to the tourists' consultation questions to obtain answer voice data, and sending the answer voice data to the terminal device so as to display the answer voice data to the tourists through the terminal device.
[0047] The above method of the embodiment of the present invention breaks the limitations of traditional forms, introduces large model technology, and develops a smart tour guide robot (tour guide system). Specifically, a two-stage recommendation strategy is adopted. In the first stage: after the tourist asks a question, the template is matched based on the preset question and answer. This method can quickly and effectively answer routine questions. In the second stage: if the tourist's question exceeds the scope of the template and no corresponding answer can be given, the intention recognition module is used to preliminarily classify and filter the questions, extract keywords and other effective information, and then identify the text content of the question, retrieve relevant content from documents, knowledge graphs, and knowledge bases, and pass all content into prompt words into the fine-tuned large model. The rationality of the result output is judged in the fine-tuned large model, and a comprehensive, accurate, and relevant content answer is given, and the recommendation is regenerated to achieve personalized tour recommendation services.
[0048] Because the type and scope of information in the input language model are expanded after template retrieval and multi-source information retrieval, the search results similar to the question obtained from the template library are also brought into the subsequent fine-tuning language model as supplementary information, which further provides supplementary information reference for the large model, so that the large model can give more humane, accurate and reasonable answers. The above method is based on artificial intelligence technology that integrates template library, multi-source information and large model fine-tuning. On the basis of no full annotation, it enhances the large model's understanding of cultural and museum knowledge and its perception of audience status information, and solves the illusion phenomenon of the large model in the cultural and museum field. It realizes more accurate and smooth knowledge questions and answers, content recommendations for thousands of people, and accurate and coherent location navigation services, bringing fresh, interesting and interactive personalized guide services to the audience, and effectively enhancing the audience's sense of participation, experience and gain when visiting the museum. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0050] Figure 1 An application scenario diagram of a question-answering method applied to a guide system according to an embodiment of the present invention is shown;
[0051] Figure 2 A flowchart of a question-answering method applied to a guide system according to an embodiment of the present invention is shown;
[0052] Figure 3 A system principle diagram of a question-answering method applied to a guide system according to an embodiment of the present invention is shown;
[0053] Figure 4 A flowchart of a question-answering method applied to a guide system according to another embodiment of the present invention is shown;
[0054] Figure 5 It shows a structural block diagram of a question-answering device applied to a guide system according to an embodiment of the present invention;
[0055] Figure 6 A block diagram of an electronic device suitable for implementing a question-answering method applied to a guide system according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0056] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.
[0057] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0058] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0059] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0060] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, invention and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0061] Museums are used to collect, protect, display and study various cultural relics and historical remains. With the increasing public demand for culture, museums have become a comprehensive cultural service institution that integrates auxiliary education, entertainment interaction and academic research. The guided tour service for the audience is an important part of the comprehensive cultural service of the museum. Through the guided tour services and content provided by the museum, the audience can understand and learn about historical culture and cultural relics. Therefore, technologies dedicated to optimizing guided tour services have been applied. With the popularization of smart technology terminals and the advancement of museum informatization, the forms of guided tours for audiences have been continuously enriched. At present, there are many guided tour methods, such as voice guided tours, WeChat guided tours, multimedia guided tours, AR guided tours, etc. The audience can obtain high-quality cultural and museum knowledge more conveniently through media such as smart terminals, special guided tour equipment, and guided screens, which enhances the audience's visiting experience. With the development and application of artificial intelligence technology, it is an urgent problem to use artificial intelligence to quickly improve the accuracy and personalization of guided tour services.
[0062] In the process of implementing the present invention, it is found that the existing navigation technology has some shortcomings:
[0063] 1) From the perspective of usability, the guide equipment and software of various museums are not the same, the interface layout and function design are varied, and they use traditional basic interaction and graphic interaction. The learning cost of the audience is high for the first time use, and it takes a lot of effort to find the content they want to listen to and watch, especially for the elderly and children who are not familiar with smart devices. It is not friendly enough; 2) From the perspective of content, the current guide content resources need to be planned and produced in advance, the preparation cycle is long, and cultural and museum professionals must be heavily involved to ensure the quality of its content. After the guide content is released, it is fixed and the content is not easy to update and maintain; 3) From the perspective of personalization, the current guide content is a one-way output of the museum, and its theme and depth are controlled by the museum, while the audience can only listen and watch passively, and cannot form a deeper communication. Moreover, there are large individual differences among visitors in terms of age, gender, knowledge level, and comprehension ability. The guided tours provided by the museum cannot meet the personalized needs of the visitors, nor can they recommend relevant information based on the individual characteristics of the visitors. 4) From a practical point of view, visitors lack knowledge of the spatial layout and location of exhibits when visiting museums. Whether they want to find a certain exhibit or a service facility, they need to obtain various route information. The current guided tour system cannot plan the route in real time and cannot provide reasonable route recommendations for the visitors.
[0064] Due to the special context and strong professionalism of the cultural and museum field, the authority and accuracy of knowledge are required to be high, and the source of knowledge must be traceable. In addition, due to the principle of confidentiality, many cultural relics data in museums are not allowed to be disclosed to the public. Therefore, conventional methods cannot meet the actual needs of guided tour services in the cultural and museum industry.
[0065] In view of this, the present invention proposes a question-answering method applied to a guide system, comprising: obtaining a question text related to a tourist's consultation question; inputting the question text into a pre-retrieval model so as to compare the similarity between the question text and a plurality of answer template texts in a template library, and outputting a pre-retrieval result, wherein the pre-retrieval result is one of a first result, a second result, and a third result, wherein the first result is: there is a first answer template text in the template library whose similarity with the question text is greater than a first threshold, the second result is: there is a second answer template text in the template library whose similarity with the question text is greater than a second threshold and is less than or equal to the first threshold, and the third result is that the similarities between the plurality of answer template texts in the template library and the question text are all less than or equal to the second threshold, the first threshold is greater than the second threshold; when the pre-search result is the second result, the question text is input into the intention understanding model, and the intention understanding model is used to determine whether the question text is related to the business services that the guide system can provide; when the question text is related to the business services that the guide system can provide, a search result text with semantics similar to the question text is retrieved from multiple predetermined types of information data sources, wherein the multiple predetermined types of information data sources are constructed based on knowledge data in the cultural and museum field; based on the second answer template text and the search result text, a question and answer prompt text is generated; the question text, the question and answer prompt text, and the question and answer requirement instructions are input into the fine-tuning language model, and an answer text for tourists' consultation questions is output.
[0066] Figure 1 An application scenario diagram of a question-answering method applied to a navigation system according to an embodiment of the present invention is shown.
[0067] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0068] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0069] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0070] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0071] It should be noted that the question-answering method for the navigation system provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the question-answering device for the navigation system provided in the embodiment of the present invention can generally be set in the server 105. The question-answering method for the navigation system provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the question-answering device for the navigation system provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0072] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0073] The following will be based on Figure 1 The scene described by Figure 2~Figure 6 The question-answering method of an embodiment of the invention is described in detail.
[0074] Figure 2 A flow chart of a question-answering method applied to a guide system according to an embodiment of the present invention is shown. Figure 3 The system principle diagram of the question-answering method applied to the guide system according to an embodiment of the present invention is shown. Figure 2 , Figure 3 Describe in detail.
[0075] like Figure 2 As shown, the method of this embodiment includes operations S201 to S206.
[0076] In operation S201, the text of the question related to the tourist's inquiry question is obtained. For example, the text content of the tourist's question is obtained: "Introduce the green glaze dog pen".
[0077] Further, refer to Figure 3 , obtaining the question text related to the tourist consultation problem can be obtained by first obtaining the tourist question voice through the terminal device, and then performing voice recognition processing. Specifically: before obtaining the question text related to the tourist consultation problem, the above method also includes: receiving the question voice data related to the tourist consultation problem sent by the terminal device, performing voice recognition on the question voice data, and obtaining the question text.
[0078] After obtaining the question text related to the tourist consultation question, such as Figure 3 As shown, further steps are performed such as template library retrieval, intent understanding, multi-source information retrieval, and question-answering processing using a fine-tuned language model. Specifically:
[0079] In operation S202, the question text is input into the pre-retrieval model so as to compare the question text with a plurality of answer template texts in the template library for similarity, and output the pre-retrieval result.
[0080] The template library is pre-built, which stores multiple answer template texts for multiple questions that tourists may ask. Each answer template text is templated to facilitate the pre-retrieval model to match data faster. The multiple answer template texts can be some basic service questions about the exhibition hall introduction, opening hours, visitor guide, etc.; they can also be some basic questions about the simple introduction of cultural relics, etc. The answer template texts in the template library can be updated at any time during use, and new answer texts can be added.
[0081] The pre-search results obtained by performing similarity comparison between the question text and multiple answer template texts in the template library can be divided into three types, that is, the pre-search result is one of the first result, the second result, and the third result.
[0082] Among them, the first result is highly similar: there is a first answer template text in the template library whose similarity with the question text is greater than a first threshold (such as a similarity greater than 80%).
[0083] The second result is moderately similar: there is a second answer template text in the template library whose similarity with the question text is greater than the second threshold and less than or equal to the first threshold (for example, the similarity is greater than 40% but less than or equal to 80%), where the numerical value of the first threshold being greater than the second threshold is set according to business needs, and the first threshold is greater than the second threshold.
[0084] The third result is dissimilarity: the similarities between multiple answer template texts in the template library and the question text are all less than or equal to the second threshold (for example, the similarities are all less than 40%).
[0085] Among them, when the pre-search result is the first result, that is, when there is a highly similar answer template, the answer is directly returned to the visitor.
[0086] When the pre-search result is the second or third result, that is, there is a moderately similar answer template, or there is no similar answer template, subsequent steps such as intent understanding, multi-source information retrieval, and question and answer processing using a fine-tuned language model must be carried out.
[0087] like Figure 3 As shown, through multi-source information retrieval guided by the knowledge graph, the graph-related paths, the question-related term knowledge base and the supplementary knowledge documents are searched, and the above content is assembled and spliced into question and answer prompt text in a specific form, which is input into the fine-tuned large model to give comprehensive, accurate and relevant content answers.
[0088] The processing methods for the pre-search results that are the second result and the third result are slightly different:
[0089] In the case where the pre-search result is the second result, the second answer template text retrieved from the template library needs to be brought into the subsequent fine-tuning language model as supplementary information.
[0090] When the pre-retrieval result is the third result, there is no need to bring the answer template text with lower similarity into the subsequent fine-tuning language model.
[0091] Specifically, when the pre-search result is the second result, the subsequent processing includes the following operations:
[0092] In operation S203, the question text is input into the intention understanding model, and the intention understanding model is used to determine whether the question text is related to the business services that the navigation system can provide. If the question text is irrelevant to the business services that the navigation system can provide, the intention understanding model filters out the question and does not perform subsequent processing.
[0093] The intent understanding model is used to filter out text that is not related to business services. For example, when a tourist inquires about the knowledge of "green glazed dog pens", the question is related to business services, and the intent understanding model will not filter it out and enter the subsequent processing flow. For another example, when a tourist inquires about the weather conditions, the weather conditions are irrelevant to the business services that the guide system can provide. The intent understanding model filters the question and does not perform subsequent processing. It directly gives a unified reply, such as "We cannot answer the local weather conditions for the time being. If necessary, please seek help from staff in time."
[0094] In operation S204, when the question text is related to the business services that can be provided by the navigation system, a search result text having semantic similarity with the question text is retrieved from a plurality of predetermined types of information data sources.
[0095] Among them, multiple information data sources are pre-constructed. Multiple predetermined types of information data sources are all constructed based on knowledge data in the field of cultural relics, for example, including knowledge graphs in the field of cultural relics, entry knowledge bases, supplementary knowledge documents, etc.
[0096] In operation S205, a question and answer prompt text is generated based on the second answer template text and the search result text. That is, the results retrieved from multiple information data sources and the second answer template text similar to the question retrieved from the template library are assembled and spliced into the question and answer prompt text in a specific form.
[0097] In operation S206, the question text, question and answer prompt text, and question and answer requirement instructions are input into the fine-tuning language model, and the answer text for the tourist's consultation question is output. That is, the tourist's question, the assembled question and answer prompt text, and the question and answer requirement instructions are input into the fine-tuning language model, and a comprehensive, accurate, and relevant content answer is given in the fine-tuning large model. The question and answer requirement instruction is used to instruct the large model to answer the question, for example, it can be to instruct the large model: if the answer related to the question is not within the information range of the above question and answer prompt text, refuse to answer, etc. On the contrary, reasonably organize and expand the output answer result based on the above information.
[0098] According to an embodiment of the present invention, Figure 3 As shown, after outputting the answer text to the tourists' consultation questions, the above method also includes: performing speech synthesis processing on the answer text to the tourists' consultation questions to obtain answer voice data, and sending the answer voice data to the terminal device so as to display the answer voice data to the tourists through the terminal device.
[0099] According to an embodiment of the present invention, the large language model technology has accurate human intention alignment and fluent natural language dialogue capabilities. It can understand user intentions through simple interactions (i.e. user questions), quickly generate corresponding answers, and can give different styles of answers according to the characteristics of different user questions. The large model has a simple and fluent interactive mode, a wide range of knowledge, fast text generation speed, high degree of personalization, and strong computing and reasoning capabilities. Due to the special context and strong professionalism in the field of cultural relics, high requirements are placed on the authority and accuracy of knowledge. It is necessary to ensure that the source of knowledge can be traced. In addition, due to the principle of confidentiality, many cultural relics data in museums are not allowed to be disclosed to the public. Therefore, conventional methods cannot meet the actual needs of guided tour services in the cultural and museum industry. Furthermore, the ability of conventional question-and-answer methods is limited by the number of question templates constructed, the complexity of the knowledge graph system, and the accuracy of the inquiry graph, and it is impossible to give answers that satisfy users.
[0100] The above method of the embodiment of the present invention breaks the limitations of traditional forms, introduces large model technology, and develops a smart tour guide robot (tour guide system). Specifically, a two-stage recommendation strategy is adopted. In the first stage: after the tourist asks a question, the template is matched based on the preset question and answer. This method can quickly and effectively answer routine questions. In the second stage: if the tourist's question exceeds the scope of the template and no corresponding answer can be given, the intention recognition module is used to preliminarily classify and filter the questions, extract keywords and other effective information, and then identify the text content of the question, retrieve relevant content from documents, knowledge graphs, and knowledge bases, and pass all content into prompt words into the fine-tuned large model. The rationality of the result output is judged in the fine-tuned large model, and a comprehensive, accurate, and relevant content answer is given, and the recommendation is regenerated to achieve personalized tour recommendation services.
[0101] Because the type and scope of information in the input language model are expanded after template retrieval and multi-source information retrieval, the search results similar to the question obtained from the template library are also brought into the subsequent fine-tuning language model as supplementary information, which further provides supplementary information reference for the large model, so that the large model can give more humane, accurate and reasonable answers. The above method is based on artificial intelligence technology that integrates template library, multi-source information and large model fine-tuning. On the basis of no full annotation, it enhances the large model's understanding of cultural and museum knowledge and its perception of audience status information, and solves the illusion phenomenon of the large model in the cultural and museum field. It realizes more accurate and smooth knowledge questions and answers, content recommendations for thousands of people, and accurate and coherent location navigation services, bringing fresh, interesting and interactive personalized guide services to the audience, and effectively enhancing the audience's sense of participation, experience and gain when visiting the museum.
[0102] Furthermore, tourists ask questions related to the tour guide through voice, and the voice recognition module converts the voice information input by tourists into text information, performs question template matching, intent understanding, multi-source information retrieval, and question-answering processing using a fine-tuned language model to obtain the best answer, and finally outputs the corresponding answer to tourists in the form of audio. It can be seen that the above method forms a complete processing flow based on artificial intelligence speech recognition, text matching, language model question-answering, speech synthesis and other technologies, which improves the user experience.
[0103] According to an embodiment of the present invention, the plurality of predetermined types of information data sources include a knowledge graph in the cultural and museum field, a knowledge base of terms, and a supplementary knowledge document. These types of information sources are pre-constructed and differentiated according to different information sources.
[0104] Among them, the knowledge graph in the field of culture and museums can be used to display the knowledge system of cultural relics, the location of cultural relics exhibitions, basic information of museums, etc.
[0105] The method for constructing a knowledge graph in the field of culture and museums can be: directly convert the structured data (data table) in the museum's existing system, such as open knowledge data in the field of culture and museums, museum cultural relics data, cultural relics knowledge system, cultural relics exhibition location, exhibit description, basic museum information, museum space data, etc., into triple data; for unstructured text data, cooperate with domain experts to annotate some knowledge data in the field of culture and museums, use information extraction technology to extract entities, extract relationships, etc., generate triples, and use knowledge graph technology to integrate the above data to generate a comprehensive museum knowledge graph, so as to construct a professional, detailed and standardized knowledge graph in the field of culture and museums.
[0106] The entry knowledge base involves the entryization of some noun knowledge, such as the explanation of terms related to cultural relics interpretation words, process introduction and other explanatory content. The entry knowledge base can be formed by combining relevant information provided by some search websites.
[0107] Supplementary knowledge documents are used to document knowledge content that cannot be mapped and additional supplementary content, such as some relevant research history, background introduction, cultural relics research results data, etc.
[0108] Based on the above-mentioned types of information data sources, the method for retrieving a search result text having semantic similarity with the question text from multiple predetermined types of information data sources includes:
[0109] Operation 11: Based on the question text, search the knowledge graph in the field of cultural relics and obtain the graph search results. For example, for the question about the green-glazed dog collar asked by the user, search the knowledge graph in the field of cultural relics and obtain the information that the material of the green-glazed dog collar is green glaze, the dynasty is the Western Jin Dynasty, the size is 12.7 cm in diameter, 8 cm in bottom diameter, 4.7 cm in height, and the museum information is xx Museum.
[0110] Operation 12: Based on the graph search results, search the entry knowledge base and supplementary knowledge documents to obtain supplementary search results.
[0111] For example, according to the above search, the material of the celadon dog collar is celadon. From the entry knowledge base, some explanations of terms and process introductions related to celadon are obtained, such as: celadon is a famous traditional colored glaze of Chinese porcelain, also known as "celadon glaze". The ancient southern celadon is the earliest colored glaze of porcelain. The so-called celadon is not pure green, but includes moon white, sky blue, powder green, plum green, bean green, bean green, emerald green, etc., but it can always show a little green. At the same time, the ancients often referred to the three colors of green, green and blue as cyan.
[0112] For example, based on the above-mentioned green-glazed dog collar, further search is performed from the supplementary knowledge document to obtain the relevant research history, background introduction, etc. of the green-glazed dog collar cultural relic.
[0113] Operation 13: Combine the graph search results and the supplementary search results to obtain a search result text that is semantically similar to the question text.
[0114] According to the embodiment of the present invention, in order to reduce the illusion of large models and improve the accuracy of knowledge answers, the above method adopts a multi-layer filtering strategy to obtain the final retrieval results through layer-by-layer screening. Through multi-source information retrieval, guided by the knowledge graph, further searching for graph-related paths, question-related term knowledge bases and supplementary knowledge documents, the retrieval results formed are more comprehensive and accurate, which facilitates fine-tuning the large model to give comprehensive, accurate and relevant content answers.
[0115] refer to Figure 3 According to an embodiment of the present invention, the fine-tuning language model further outputs at least one application call information, and the at least one application call information includes at least first call information and second call information, the first call information is used to characterize whether the recommendation model needs to be called; the second call information is used to characterize whether the location engine needs to be called. The application call information output by the fine-tuning language model is not limited to the above situation, and can be expanded based on business needs to output any type of application call information related to business needs.
[0116] In addition, the recommendation information output by the recommendation model and the navigation information output by the location engine will also be incorporated into the answer text and output to the tourist.
[0117] Figure 4 A flow chart of a question-answering method applied to a guide system according to another embodiment of the present invention is shown.
[0118] like Figure 4 As shown, the method of this embodiment includes operations S401 to S404 in addition to the above operations S201 to S206 (not shown in the figure to avoid redundancy).
[0119] In operation S401, when the first calling information is: the recommendation model needs to be called, the visit record information of the tourists in the target time period is obtained, wherein the visit record information is stored in the form of an ordered list.
[0120] According to an embodiment of the present invention, the visit record information includes at least: multiple exhibition areas visited by tourists, the order of visiting multiple exhibition areas, information on cultural relics visited in each exhibition area, length of time tourists stay in each exhibition area, tourist interaction information, the completeness of tourists' listening to knowledge explanations, information on tourists' participation in activities, and information on tourists' current location.
[0121] In operation S402, the recommendation model is called, and recommendation information for tourists is output based on the visit record information through the recommendation model. The recommendation information may include recommended cultural relics, recommended knowledge, recommended activities, the next recommended exhibition area, etc.
[0122] In addition, it also includes returning the recommendation information to the fine-tuned language model, using the fine-tuned language model to judge the rationality of the recommendation information output by the recommendation model, and re-recommending based on the recommendation information output by the recommendation model. Because the results output by the recommendation model are not necessarily reasonable, in order to improve the accuracy of the recommendation, the language model is used for re-recommendation. The recommendation results output by the recommendation model in the fine-tuned language model are judged for relevance with the text content retrieved by the previous pre-search, multi-source information retrieval, etc. If the recommendation result is related to the search content, the recommendation is considered reasonable. Otherwise, the recommendation result is unreasonable, and the recommendation result is re-output based on the search result using the fine-tuned language model. While obtaining the visit record information of multiple tourists, it is also possible to obtain the personal information data of tourists, such as age, gender, occupation, etc., with the consent of the tourists, and input these data and the visit record information as input data into the recommendation model for prediction.
[0123] In operation S403, when the second calling information indicates that the location engine needs to be called, the visitor's current location information is obtained.
[0124] According to an embodiment of the present invention, the situation where the location engine needs to be called to fine-tune the language model output may be: based on the recommendation information output by the recommendation model, the location engine is called to output navigation information for tourists.
[0125] Specifically, in this scenario, in operation S404, the location engine is called to output navigation information for the tourist based on the tourist's current location information and the location information of the next exhibition area where the recommended cultural relics corresponding to the recommendation information for the tourist are located.
[0126] According to an embodiment of the present invention, the situation where the fine-tuning language model output needs to call the location engine can also be without going through the recommendation model, based on the consultation questions about public utility services or the location of the cultural relics exhibition area in the questions consulted by the tourists, such as asking where the toilet is, asking where the "peacock blue glaze bottle" is, etc., the fine-tuning language model outputs the need to call the location engine according to the question. In operation S404, the location engine outputs navigation information for the tourists based on the current location information of the tourists and the consultation information about public utility services or the location of the cultural relics exhibition area in the questions consulted by the tourists.
[0127] According to an embodiment of the present invention, in order to better provide guided tour services, the fine-tuned large model is combined with the museum space layout information through the above method, and when tourists are interested in exhibits and cultural relics, a route map is automatically generated to guide tourists to visit. When tourists need public utility services, the corresponding facilities closest to the current location are recommended.
[0128] According to an embodiment of the present invention, based on the fact that the large model itself cannot calculate the distance, the large model is given the ability to call the location engine in accordance with the usage mode of the large model. When fine-tuning the large model, the navigation system interface is placed in the instruction training set with specific instructions. The navigation terminal transmits the current location information to the navigation system in real time. The large model determines whether it is necessary to call the location information to answer the tourist's question. If necessary, the tourist's real-time location information and the target location are transmitted to the location engine to generate the route and related route distance, floor, distribution and other information. The large model selects the most appropriate route for display. The distance calculation uses the Manhattan distance formula to calculate the route distance based on the spatial layout of the floor points and the effective travel path.
[0129] According to the embodiment of the present invention, by analyzing the history records of the tour guide service, it is found that tourists' use needs for the tour guide service are mainly concentrated on knowledge acquisition and location query. Therefore, the above method uses knowledge question and answer, content recommendation, and location navigation as the main combination points of artificial intelligence and tour guide services, thereby improving the user experience.
[0130] According to an embodiment of the present invention, the above method also includes: when a tourist asks about graph-related knowledge when using the system, and the question text is related to the graph, the system extracts the graph keywords in the question and answer text and performs graph retrieval from the pre-built cultural and museum field knowledge graph, calculates and infers graph subgraphs with a certain degree of relevance, obtains the most reasonable subgraph after comprehensive judgment through fine-tuning the language model, and pushes it to the audience synchronously with the answer content. The audience can click to enter the graph visualization interface for interaction.
[0131] According to the embodiments of the present invention, not only related cultural relics are recommended to different types of tourists and their needs, but also related knowledge, museum activities, navigation, related maps, etc., thus realizing personalized guided tours for different people.
[0132] According to an embodiment of the present invention, the recommendation model is trained by the following method:
[0133] Operation 21. Obtain historical visit record information of multiple historical tourists to the museum. The historical visit record information is stored in the form of an ordered list. The historical visit record information at least includes the historical visit order of historical tourists to multiple historical exhibition areas; for example, it includes multiple exhibition areas visited by tourists, the order of visiting multiple exhibition areas, information on cultural relics visited in each exhibition area, the length of time tourists stay in each exhibition area, tourist interaction information, the completeness of tourists' listening to knowledge explanations, information on tourists' participation in activities, information on tourists' current location, etc.
[0134] Operation 22: Based on the historical visit record information, randomly cover some of the historical exhibition areas in the multiple historical exhibition areas by using a random cover path method to generate ordered list training samples. For example, for the historical visit path: ABCDEFGH, randomly cover some of the paths to obtain multiple path samples ABCD, CDEF, ABCDEF, etc., combine these path samples with the remaining visit record information, and store them in the form of an ordered list.
[0135] While obtaining the historical visit record information of multiple historical visitors to the museum, it is also possible to obtain the visitors' personal information data, such as age, gender, occupation, etc., with the consent of the visitors, and use these data together with the historical visit record information as training samples.
[0136] Operation 23: Using the ordered list training samples, the initial recommendation model is trained to predict the ability of the historical exhibition area covered in the ordered list training samples, and a trained recommendation model is obtained. For example, the historical exhibition area corresponding to the covered real path is used as a sample label to train the recommendation model to predict the path corresponding to the next exhibition area and the next exhibition cultural relic.
[0137] According to an embodiment of the present invention, the above method generates training samples in the form of an ordered list by analyzing tourists' historical behavior, visiting routes, points of interest, cultural relics information, tourist interaction information, length of stay, listening completeness, visiting order, participation in activities, location information, etc., and randomly covers the path for prediction, so as to explore the knowledge association, cultural relic attribute association, and interest point association between the visited cultural relics, train the recommendation system based on the knowledge graph, and fine-tune the knowledge recommendation, cultural relic recommendation, activity recommendation and other capabilities of the large model.
[0138] According to an embodiment of the present invention, the fine-tuning language model is trained by the following method:
[0139] Operation 31: Call the question-answering model whose prediction performance meets the user's predetermined requirements, and construct a training text set in a self-questioning and self-answering manner based on multiple original samples collected in advance.
[0140] Operation 32: adopt a multi-task training method to train the initial language model using the training text set to obtain a trained fine-tuned language model.
[0141] Specifically, it includes: using instruction data to train the language model using the following 8 training tasks including but not limited to them.
[0142] Based on the first task mode, a random masking method is adopted to perform a first processing on the training text in the training text set to obtain a first processed text, and the initial language model is used to predict the masked content in the first processed text to train the first text prediction ability of the initial language model.
[0143] Based on the second task method, a masking method of covering the second half of the text is adopted to perform a second processing on the training text in the training text set to obtain a second processed text, and the initial language model is used to predict the masked content in the second processed text to train the second text prediction ability of the initial language model.
[0144] Based on the third task mode, the initial language model is used to perform graph restoration processing on the training texts in the training text set to obtain graph triplet prediction data corresponding to the training texts, so as to train the graph restoration capability of the initial language model for the texts.
[0145] Based on the fourth task method, the real data of the graph triples corresponding to the training texts in the training text set are obtained, and the initial language model is used to perform text restoration processing on the real data of the graph triples to obtain the predicted text data corresponding to the real data of the graph triples, so as to train the initial language model's text restoration ability for the graph.
[0146] Based on the fifth task mode, training question texts corresponding to the training texts in the training text set are obtained, and the training question texts are answered using the initial language model to train the question-answering capability of the initial language model.
[0147] Based on the sixth task method, target positive samples and target negative samples are obtained from the training text set, and the target positive samples and target negative samples are used to train the initial language model to output recommendation results based on the target positive samples and target negative samples containing questions and answers, wherein, in the target positive samples, the recommendation results are in the retrieval result text (including but not limited to the template text obtained by pre-retrieval, the multi-source information text obtained by multi-source information retrieval, etc.), and are related to the question and answer but not included in the question and answer, and in the target negative samples, the recommendation results are included in the question and / or answer, or the recommendation results are not related to the question and answer.
[0148] This training task is used to train the recommendation ability of the model, taking into account a common scenario: for example, if a user asks: Please introduce the green-glazed dog collar, the language model outputs the answer text including: the material of the green-glazed dog collar is green glaze, the dynasty is Western Jin Dynasty, the shape and size... At the same time, the language model also gives some extended recommended answers related to cultural relics.
[0149] If the cultural relic-related extension recommendations given by the language model are not included in the previous answers and user questions, such as some popular science introductions about the material of the cultural relic, then such extension recommendations are meaningful. On the contrary, if the cultural relic-related extension recommendations given by the language model are included in the previous answers or questions, such as introductions about the dynasty or shape of the cultural relic, then such extension recommendations are unnecessary and need to be avoided.
[0150] Therefore, we construct positive samples (the recommended results are not included in the questions and answers) and negative samples (the recommended results are included in the questions and answers), and use the contrastive learning strategy to train the recommendation ability of the training model.
[0151] Based on the seventh task mode, the recommendation results corresponding to the reference samples in the training text set are obtained, and the initial language model is used to determine whether the recommendation results are related to the reference samples to train the recommendation ability of the initial language model. This training task is to train the language model to have better recommendation ability. The recommendation results corresponding to the reference samples in the training text set can be the output results of the recommendation model, which will be input into the language model for relevance judgment and screening, and the language model determines whether the output recommendation information is related to the text content.
[0152] Based on the eighth task mode, the training texts in the training text set are annotated with labels indicating whether they need to call a third-party application, and the label texts are obtained. The label texts are used to train the application call prediction capability of the initial language model.
[0153] When training a model, you can use the previous model for constraints to retain as much of the model's original knowledge as possible.
[0154] Based on the above question-answering method applied to the guide system, the present invention also provides a question-answering device applied to the guide system. Figure 5 The device is described in detail.
[0155] Figure 5 A structural block diagram of a question-and-answer device applied to a guide system according to an embodiment of the present invention is shown.
[0156] like Figure 5 As shown, the question-answering device 500 applied to the navigation system of this embodiment includes an acquisition module 501, a pre-retrieval module 502, an intention understanding module 503, a data source retrieval module 504, a generation module 505, and an answering module 506.
[0157] The acquisition module 501 is used to acquire question text related to the tourist's consultation question.
[0158] The pre-retrieval module 502 is used to input the question text into the pre-retrieval model so as to compare the similarity between the question text and multiple answer template texts in the template library and output the pre-retrieval result, wherein the pre-retrieval result is one of the first result, the second result and the third result.
[0159] The intention understanding module 503 is used to input the question text into the intention understanding model when the pre-search result is the second result, and determine whether the question text is related to the business service that the navigation system can provide through the intention understanding model.
[0160] The data source retrieval module 504 is used to retrieve retrieval result texts with semantic similarity to the question text from multiple predetermined types of information data sources when the question text is related to the business services that can be provided by the navigation system.
[0161] The generating module 505 is used to generate a question and answer prompt text based on the second answer template text and the search result text.
[0162] The answer module 506 is used to input the question text, question and answer prompt text, and question and answer requirement instructions into the fine-tuning language model, and output the answer text for the tourist's consultation question.
[0163] According to an embodiment of the present invention, any multiple modules among the acquisition module 501, the pre-retrieval module 502, the intention understanding module 503, the data source retrieval module 504, the generation module 505, and the answer module 506 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the acquisition module 501, the pre-retrieval module 502, the intention understanding module 503, the data source retrieval module 504, the generation module 505, and the answer module 506 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 501, the pre-retrieval module 502, the intention understanding module 503, the data source retrieval module 504, the generation module 505, and the answer module 506 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is executed.
[0164] Figure 6A block diagram of an electronic device suitable for implementing a question-answering method applied to a guide system according to an embodiment of the present invention is shown.
[0165] like Figure 6 As shown, the electronic device 600 according to an embodiment of the present invention includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0166] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.
[0167] According to an embodiment of the present invention, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.
[0168] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.
[0169] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0170] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present invention.
[0171] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 601. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0172] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611.
[0173] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0174] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages, and specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. The program code can be executed completely on the user computing device, partially on the user device, partially on the remote computing device, or completely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0175] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. 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 boxes represented in succession 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 or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0176] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways, even if such combinations and / or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All of these combinations and / or combinations fall within the scope of the present invention.
[0177] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination. The scope of the present invention is defined by the attached claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A question-answering method applied to a guide system, characterized in that: The method comprises: Get the question text related to the tourist consultation question; The question text is input into a pre-retrieval model so as to compare the similarity between the question text and a plurality of answer template texts in a template library, and a pre-retrieval result is output, wherein the pre-retrieval result is one of a first result, a second result, and a third result, wherein the first result is: there is a first answer template text in the template library whose similarity with the question text is greater than a first threshold, the second result is: there is a second answer template text in the template library whose similarity with the question text is greater than a second threshold and is less than or equal to the first threshold, and the third result is: the similarities between the plurality of answer template texts in the template library and the question text are all less than or equal to a second threshold, and the first threshold is greater than the second threshold; If the pre-search result is the first result, that is, if there is a highly similar answer template, the answer is directly returned to the visitor; In the case where the pre-search result is the second result, the question text is input into the intention understanding model, and the intention understanding model is used to determine whether the question text is related to the business service that the navigation system can provide; In the case where the question text is related to the business services that can be provided by the navigation system, a search result text having semantic similarity with the question text is retrieved from a plurality of predetermined types of information data sources, wherein the plurality of predetermined types of information data sources are constructed based on knowledge data in the field of cultural relics and museums; Generate a question and answer prompt text based on the second answer template text and the search result text; Input the question text, the question and answer prompt text, and the question and answer requirement instruction into the fine-tuned language model, and output the answer text for the tourist's consultation question; When the pre-search result is the third result, there is no need to input the answer template text with a lower similarity into the fine-tuning language model; The fine-tuning language model further outputs at least one application call information, wherein the at least one application call information includes at least first call information and second call information, wherein the first call information is used to indicate whether a recommendation model needs to be called; and the second call information is used to indicate whether a location engine needs to be called; When the first calling information is: in a case where the recommendation model needs to be called, obtaining visit record information of tourists within a target time period, wherein the visit record information is stored in the form of an ordered list; Calling a recommendation model, and outputting recommendation information for tourists based on the visit record information through the recommendation model; Return the recommendation information to the fine-tuned language model, use the fine-tuned language model to judge the rationality of the recommendation information output by the recommendation model, and make new recommendations based on the recommendation information output by the recommendation model; When the second calling information indicates that the location engine needs to be called, obtaining the visitor's current location information; Calling the location engine to output navigation information for the tourist based on the tourist's current location information and the location information of the next exhibition area corresponding to the recommendation information for the tourist; or outputting navigation information for the tourist based on the tourist's current location information and the consulting information about public utility services or the location of the cultural relics exhibition area in the tourist's consultation questions.
2. The method according to claim 1, characterized in that: The visit record information includes at least: multiple exhibition areas visited by tourists, the order of visiting multiple exhibition areas, information on cultural relics visited by tourists in each exhibition area, length of time tourists stay in each exhibition area, tourist interaction information, the completeness of tourists' listening to knowledge explanations, information on tourists' participation in activities, and information on tourists' current location.
3. The method according to claim 1, characterized in that The recommendation model is trained by the following method: Acquire historical visit record information of a plurality of historical visitors to the museum, wherein the historical visit record information is stored in the form of an ordered list, and the historical visit record information at least includes a historical visit sequence of the historical visitors to the plurality of historical exhibition areas; Based on the historical visit record information, a random masking path is used to randomly mask some of the historical exhibition areas in multiple historical exhibition areas to generate ordered list training samples; By using the ordered list training samples, the initial recommendation model is trained to predict the historical exhibition area covered in the ordered list training samples, and a trained recommendation model is obtained.
4. The method according to claim 1, characterized in that: The plurality of predetermined types of information data sources include a knowledge graph in the field of cultural and museums, a knowledge base of terms, and a supplementary knowledge document; Retrieving a search result text with semantic similarity to the question text from multiple predetermined types of information data sources includes: Based on the question text, the knowledge graph of the cultural and museum field is searched to obtain a graph search result; Based on the graph search result, the entry knowledge base and the supplementary knowledge document are searched to obtain a supplementary search result; The graph retrieval result and the supplementary retrieval result are combined to obtain a retrieval result text that is semantically similar to the question text.
5. The method according to claim 1, characterized in that The fine-tuning language model is trained by the following method: Call the question-answering model whose prediction performance meets the user's predetermined requirements, and construct a training text set in a self-questioning and self-answering manner based on multiple original samples collected in advance; A multi-task training approach is adopted to train the initial language model using the training text set to obtain a trained fine-tuned language model.
6. The method according to claim 5, characterized in that Using multi-task training, the initial language model is trained using a training text set, including: Based on the first task mode, a training text in the training text set is subjected to a first processing by adopting a random masking method to obtain a first processed text, and the masked content in the first processed text is predicted by using the initial language model to train the first text prediction ability of the initial language model; Based on the second task mode, a masking mode of masking the second half of the text is adopted to perform a second processing on the training text in the training text set to obtain a second processed text, and the masked content in the second processed text is predicted by using the initial language model to train the second text prediction ability of the initial language model; Based on the third task mode, the initial language model is used to perform graph restoration processing on the training text in the training text set to obtain graph triple prediction data corresponding to the training text, so as to train the graph restoration ability of the initial language model for the text; Based on the fourth task mode, the real data of the graph triples corresponding to the training texts in the training text set are obtained, and the text restoration processing is performed on the real data of the graph triples using the initial language model to obtain the predicted text data corresponding to the real data of the graph triples, so as to train the text restoration ability of the initial language model for the graph; Based on the fifth task mode, obtaining training question texts corresponding to the training texts in the training text set, and answering the training question texts using the initial language model to train the question-answering capability of the initial language model; Based on the sixth task mode, a target positive sample and a target negative sample are obtained from the training text set, and the target positive sample and the target negative sample are used to train the recommendation capability of the initial language model to output the recommendation result based on the target positive sample and the target negative sample containing the question and the answer, wherein in the target positive sample, the recommendation result is in the retrieval result text and is related to the question and the answer but is not included in the question and the answer, and in the target negative sample, the recommendation result is included in the question and / or the answer, or the recommendation result is not related to the question and the answer; Based on the seventh task method, obtain the recommendation results corresponding to the reference samples in the training text set, and use the initial language model to determine whether the recommendation results are related to the reference samples, so as to train the recommendation ability of the initial language model; Based on the eighth task mode, the training texts in the training text set are annotated with labels indicating whether they need to call a third-party application, and the label texts are obtained. The label texts are used to train the application call prediction capability of the initial language model.
7. The method according to claim 1, characterized in that: Before obtaining the question text related to the tourist consultation question, the method further includes: receiving question voice data related to the tourist consultation question sent by the terminal device, performing voice recognition on the question voice data to obtain the question text; After outputting the answer text for the tourists' consultation questions, it also includes: performing speech synthesis processing on the answer text for the tourists' consultation questions to obtain answer voice data, and sending the answer voice data to the terminal device so as to display the answer voice data to the tourists through the terminal device.
Citation Information
Patent Citations
Question answering robot and implementation method therefor
CN109613917A
Intelligent dialogue method and device, dynamic storage method and device
CN110162603A
