Museum knowledge question and answer method and system, electronic equipment and medium

By using entity splitting and BM25 algorithms to identify problem types in the online knowledge question-and-answer system, and using museum databases and large language models to generate answers, the existing system answers that deviate from user expectations, achieving higher answer accuracy and user satisfaction.

CN119621893APending Publication Date: 2025-03-14SHANGHAI SHENTENG INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411673027.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing online knowledge question and answer system lacks a deep understanding of the user's question background and context, which leads to a deviation from the content expected by the user, and it is impossible to personalize knowledge push and explanation based on the knowledge level and interests of different users.

Method used

Through entity splitting and BM25 algorithm, the system can accurately identify the type of user input problems and classify them according to the type. Use local museum relational databases and vector databases, combined with large language models, to generate accurate answers.

Benefits of technology

It improves the accuracy and relevance of the answers, reduces processing time, improves the system's response speed, can accurately answer questions related to museums, and improves user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621893A_ABST
    Figure CN119621893A_ABST
Patent Text Reader

Abstract

The invention provides a museum knowledge question-answering method and system, electronic equipment and a medium. The museum knowledge question-answering method comprises the following steps: S1, performing type judgment on questions input by a user, wherein the type comprises a first type of questions; if the question input by the user belongs to the first class of questions, executing the step S2; if the question input by the user does not belong to the first class of questions, calling a large language model to process the question input by the user, generating a result, and outputting the result to the user; s2, querying a local museum relational database according to the question input by the user; if the query succeeds, outputting a query result to the user; if the query is unsuccessful, executing the step S3; s3, querying a local museum vector database according to the question input by the user; if the query succeeds, calling the large language model generation result and outputting the result to the user; and if the query is unsuccessful, outputting a query failure message to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence and popular science education technology, and specifically, to a museum knowledge question-answering method, system, electronic device and medium. Background Art

[0002] As people's living standards improve, it is becoming more and more popular to acquire knowledge about history, art, science, etc. through museums and improve their knowledge and cultivation in all aspects. Not only is the enthusiasm for offline museum visits high, but many people also hope to obtain information and knowledge about museum-related content through online knowledge question-and-answer systems or websites.

[0003] Currently, online knowledge question-answering systems or websites lack a deep understanding of the background and context of user questions, resulting in the generated answers deviating from the content expected by users. In addition, existing question-answering systems usually use general models and cannot provide personalized knowledge push and explanation based on the knowledge level and interests of different users. Summary of the invention

[0004] The purpose of this application is to provide a museum knowledge question-answering method, system, electronic device and medium that can improve the accuracy and relevance of answering questions.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] The first aspect of the present application provides a museum knowledge question-answering method, comprising the following steps:

[0007] S1, determining the type of the question input by the user, wherein the type includes the first type of question;

[0008] If the question input by the user belongs to the first category of questions, executing step S2;

[0009] If the question input by the user does not belong to the first category of questions, calling the large language model to process the question input by the user, and generating a result to output to the user;

[0010] S2, querying the local museum relational database according to the question input by the user;

[0011] If the query is successful, the query results are output to the user;

[0012] If the query is unsuccessful, execute step S3;

[0013] S3, querying the local museum vector database based on the question input by the user;

[0014] If the query is successful, the large language model is called to generate a result and output it to the user;

[0015] If the query is unsuccessful, a message indicating the query failure is output to the user.

[0016] The second aspect of the present application provides a museum knowledge question-answering system, comprising:

[0017] A judgment module is used to judge the type of the question input by the user to determine whether the question input by the user belongs to the first type of question;

[0018] A first processing and output module, for processing user input questions belonging to the first category of questions, and querying the local museum relational database according to the user input questions; if the query is successful, outputting the query results;

[0019] The second processing and output module is used to process the questions input by the user belonging to the first category of questions, and to process the situation where the query of the first processing module is unsuccessful: query the local museum vector database according to the question input by the user; if the query is successful, call the large language model to generate a result and output it to the user; if the query is unsuccessful, output a message of query failure to the user;

[0020] The third processing and output module is used to process questions input by the user that do not belong to the first category of questions: calling the large language model to process the questions input by the user, and generating a result to output to the user.

[0021] A third aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect.

[0022] The fourth aspect of the present application provides an electronic device, comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the programs stored in the memory are executed, the processor is used to execute the method described in the first aspect.

[0023] Compared with the prior art, the present invention has the following advantages:

[0024] This application provides a museum knowledge question-and-answer method, system, electronic device, and medium. Through entity splitting and the BM25 algorithm, the system can accurately identify the type of user input questions and classify and process them according to the type. This multi-level question classification and processing mechanism not only improves the accuracy and relevance of the answers, but also effectively reduces the processing time and improves the response speed of the system. By matching with the data of the museum corpus, the system can accurately answer questions related to the museum, support dynamic updating of entity relevance information, and greatly improve the accuracy and user satisfaction of the system when dealing with issues closely related to entities. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application 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 paying creative work.

[0026] Figure 1 A flow chart of the museum knowledge question-answering method is shown;

[0027] Figure 2 A schematic diagram of the process of constructing a vector database is shown;

[0028] Figure 3 A schematic diagram of the process of querying the word segments obtained from the question input by the user in a vector database and answering questions with a large language model in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] The technical solutions of the specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings. These implementation methods are only used to illustrate the present application, but not to limit the present application.

[0030] The term "and / or" in this application is a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. In the present invention, the symbol " / " indicates that the associated objects are in an "or" relationship, for example, "A / B" means "A or B".

[0031] The terms "first" and "second" in the specification and claims of this application are used to distinguish different objects rather than to describe a specific order of the objects. For example, "first response message" and "second response message" are used to distinguish different response messages rather than to describe a specific order of the response messages.

[0032] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be considered as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0033] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc., and multiple elements refer to two or more elements, etc.

[0034] Figure 1 The flow chart of the museum knowledge question and answer method provided by the embodiment of the present application is shown. The museum knowledge question and answer method, system, electronic device and medium of the present application are described in detail below in conjunction with the accompanying drawings.

[0035] The museum knowledge question answering method provided in the embodiment of the present application comprises the following steps:

[0036] S1, judging the type of the question input by the user to determine whether the question input by the user belongs to the first category;

[0037] If it belongs to the first type of problem, execute step S2;

[0038] If the question does not belong to the first category, the large language model is called to process the question input by the user and the result is generated and output to the user;

[0039] S2, queries the local museum relational database based on the question input by the user;

[0040] If the query is successful, output the query results;

[0041] If the query is unsuccessful, execute step S3;

[0042] S3, querying the local museum vector database based on the question input by the user;

[0043] If the query is successful, the large language model is called to generate the result and output it to the user;

[0044] If the query is unsuccessful, a message indicating the query failure is output to the user.

[0045] The technical solution of the present application can intelligently distinguish the types of different questions raised by users, and provide targeted processing methods for each question. This classification mechanism not only improves the accuracy and relevance of the answers, but also effectively reduces processing time and improves the response speed of the system.

[0046] Using the local museum relational database and the local museum vector database, the natural language data stored in the knowledge base and the numerical data stored in the vector database are efficiently and accurately matched with the questions entered by the user. This matching not only relies on traditional keyword matching, but also understands the semantics through deep learning algorithms, ensuring that the system can accurately identify and retrieve relevant information even when the user asks questions in a variety of ways or there is ambiguity.

[0047] In step S1, the first category of questions includes professional questions, such as museum exhibits, museum professional knowledge and popular science questions, etc. Questions that do not belong to the first category include the second category of questions, which include daily questions.

[0048] In the first embodiment of the present application, in step S1, the step of determining the type of the question input by the user includes: identifying the intent of the question input by the user.

[0049] Intent recognition specifically includes the following steps:

[0050] Preprocess the content of the question, extract the question entities and obtain a question entity list;

[0051] Preprocess the data in the local museum relational database, extract local data entities and obtain a local data entity list;

[0052] The BM25 algorithm is used to perform similarity matching between the question entity list and the local data entity list. The type of question input by the user is determined based on the similarity, and the output with the highest similarity score is selected.

[0053] The BM25 algorithm (Best Matching 25) is a commonly used algorithm for information retrieval and text mining.

[0054] Through preprocessing, the question entities in the user's questions are identified and compared with the local data entities in the local museum relational database, so that the system can answer museum-related questions more accurately. At the same time, it supports dynamic updating of entity association information, which greatly improves the system's accuracy and user satisfaction when dealing with issues closely related to entities, such as specific exhibit queries.

[0055] In one example, the question entity may be a noun with a specific meaning.

[0056] In one example, preprocessing includes word segmentation.

[0057] In the second embodiment of the present application, in step S1, the step of determining the type of the question input by the user includes: utilizing a large language model in combination with the BM25 algorithm to determine the type.

[0058] Before step S2, the museum knowledge question answering method further includes constructing a museum corpus.

[0059] Building a museum corpus includes building a local museum relational database and a local museum vector database.

[0060] like Figure 2 As shown in the figure, the process of building a local museum vector database includes: obtaining museum-related data and classifying the data content. The data content includes service information, exhibit information and knowledge supplement information. Service information can be, for example, the museum's opening hours, geographical location, visiting instructions and other information; exhibit information can be, for example, information including the museum's main body introduction and its internal exhibitions and exhibits; knowledge supplement information includes professional terms, historical time, related entities and other data for the specific field of the museum, which are further collected and supplemented based on encyclopedia data sets.

[0061] Furthermore, the acquired museum-related data is structured. For example, the acquired museum-related data can be converted into structured data in the form of key:value. The key represents an entity, such as the name of an exhibit, a time node, a geographical location, etc., and the value represents descriptive information related to the entity. For exhibit information data, the location structure and the relationship structure between exhibit entities are specially added to accurately reflect the relevance and display order between exhibits. For the value of service information and exhibit information data, corresponding descriptive information is generated according to different user roles such as adults, children, the elderly, experts, etc., to form structured data supported by multiple roles.

[0062] The structured data is organized into a hierarchical table data structure for further processing and application. Data format conversion can be done through automated tools to convert structured data into a standardized JSON format, ensuring data interoperability between different systems and convenient uploading to different data management platforms or knowledge bases, thus forming a vector database. Vector data can provide efficient and accurate knowledge support for subsequent data queries, question-answering systems, and other intelligent applications.

[0063] Vector databases use vector space models to represent and process data, allowing numerical data and language data to be compared and matched under a unified mathematical framework. The application of this model greatly improves the accuracy and efficiency of matching, especially when processing large-scale data sets, which can significantly reduce retrieval time and improve retrieval quality.

[0064] In the data structuring stage, special considerations are introduced to the needs of different user roles such as adults, children, the elderly, and experts. The data of the same entity is processed differently according to the user role to generate value structures for different roles. This multi-role supported corpus structuring processing method ensures that the information in the museum corpus can more accurately match the cognitive levels and needs of different users. Based on this, the museum corpus can provide more targeted knowledge services. For example, for the same exhibit, child users can obtain simplified and easy-to-understand description information, while expert users can obtain more detailed and professional content. This differentiated data structure greatly improves the user-friendliness and applicability of the system, meets the diverse needs of users at different levels, and improves the user experience.

[0065] When performing structured processing on museum exhibit information data, this method specifically adds the exhibit location structure and the relationship structure between exhibit entities. This processing method not only records the basic information of the exhibits, but also includes the physical location of the exhibits in the museum and the relationship between them, such as the association between exhibits and the display order. This enables the museum corpus to more accurately reflect the spatial layout and logical association of exhibits, providing a basis for subsequent data query and path planning. For example, when a user queries an exhibit, the system can recommend related exhibits or generate a reasonable tour path based on the location and relationship data. This structured data processing method enhances the practicality and intelligence of the corpus and supports more complex query and navigation needs.

[0066] In step S2, if the query is successful, the step of outputting the query result further includes:

[0067] S21, the user evaluates the query result. If the evaluation is high, the query result is retained; if the evaluation is not high, step S3 is executed. The evaluation can be performed using a score. If the evaluation value is high, it means that the query result is accurate.

[0068] The system integrates a user feedback-driven optimization mechanism, where users can rate and evaluate the answers generated by the system. The system will adjust the answer generation strategy based on user feedback and use the optimized model in subsequent similar questions. This design ensures the system's self-learning and optimization capabilities, and can continuously improve performance and user experience in actual use.

[0069] Reference Figure 3 In step S3, the step of querying the local museum vector database according to the question input by the user includes:

[0070] Preprocess the content of the question to obtain the question vector;

[0071] Preprocess the local museum vector database to obtain a plurality of text-embedded text blocks, which are recorded as the first text block;

[0072] Performing vector similarity matching on the question vector and the multiple first text blocks, obtaining the first text block with the highest vector similarity, which is recorded as the second text block;

[0073] The second text block and the question entered by the user form a text containing a prompt.

[0074] A text containing a prompt is input into a large language model, and a result generated by the large language model is output to the user.

[0075] Preprocessing includes word segmentation and text embedding. Text embedding refers to converting text into vectors using pre-trained word vector models (such as Word2Vec, GloVe) or context-dependent embedding models (such as BERT, RoBERTa).

[0076] The second aspect of the present application provides a museum knowledge question-answering system, comprising:

[0077] A judgment module judges the type of the question input by the user to determine whether the question input by the user belongs to the first category;

[0078] The first processing and output module is used to process the questions input by the user belonging to the first category of questions, and query the local museum relational database according to the questions input by the user; if the query is successful, output the query results;

[0079] The second processing and output module is used to process the questions input by the user belonging to the first category of questions, and to process the situation where the query of the first processing module is unsuccessful: query the local museum vector database according to the question input by the user; if the query is successful, call the large language model to generate the result and output it to the user; if the query is unsuccessful, output a message of query failure to the user;

[0080] The third processing and output module is used to process questions input by the user that do not belong to the first category of questions. The large language model is called to process the questions input by the user and generate results to output to the user.

[0081] It should be understood that the specific process of each module executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.

[0082] It should also be understood that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0083] The third aspect of the present application provides a computer-readable storage medium, on which a program of a museum knowledge question-and-answer method is stored, so that the museum knowledge question-and-answer method provided in the first aspect of the present application is executed. As for the aforementioned computer-readable storage medium, those skilled in the art can understand that the implementation example of the functions of the aforementioned system and each unit can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, it executes an implementation example including the functions of the aforementioned system and each unit. The aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM or optical disk.

[0084] The fourth aspect of the present application provides an electronic device, comprising: at least one memory for storing programs; at least one processor for executing the programs stored in the memory. The electronic device can be a server. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes non-volatile and / or volatile storage media, and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps of the museum knowledge question and answer method of the present application are implemented.

[0085] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present application. These improvements and substitutions should also be regarded as the scope of protection of the present application.

Claims

1. A museum knowledge question-answering method, characterized in that: The following steps are involved: S1, determining the type of the question input by the user, wherein the type includes the first type of question; If the question input by the user belongs to the first category of questions, executing step S2; If the question input by the user does not belong to the first category of questions, calling the large language model to process the question input by the user, and generating a result to output to the user; S2, querying the local museum relational database according to the question input by the user; If the query is successful, the query results are output to the user; If the query is unsuccessful, execute step S3; S3, querying the local museum vector database based on the question input by the user; If the query is successful, the large language model is called to generate a result and output it to the user; If the query is unsuccessful, a message indicating the query failure is output to the user.

2. The museum knowledge question-answering method according to claim 1, characterized in that: In step S1, the step of determining the type of the question input by the user includes: utilizing the large language model in combination with the BM25 algorithm to determine the type.

3. The museum knowledge question-answering method according to claim 1, characterized in that: In step S1, the step of determining the type of the question input by the user includes: Preprocessing the content of the question to obtain question entities, extracting the question entities to obtain a question entity list; Preprocessing the data in the local museum relational database to obtain local data entities, and extracting the local data entities to obtain a local data entity list; The question entity list and the local data entity list are matched for similarity, and the type of the question input by the user is determined according to the result of the similarity matching.

4. The museum knowledge question-answering method according to claim 3, characterized in that: The construction process of the local museum vector database includes: Acquire the museum-related data and classify the content of the data, wherein the content of the data includes service information, exhibition item information and knowledge supplement information; Structuring the acquired museum-related data; The structured museum-related data is converted into JSON format and uploaded to form the local museum vector database.

5. The museum knowledge question-answering method according to claim 4, characterized in that: The obtained museum-related data is structured, including generating corresponding description information according to different user roles, and / or adding an exhibit location structure and a relationship structure between exhibit entities when structured processing the exhibit information data.

6. The museum knowledge question-answering method according to claim 1, characterized in that: In step S2, if the query is successful, the step of outputting the query result further includes: S21, the user evaluates the query result. If the evaluation is high, the query result is retained; if the evaluation is low, step S3 is executed.

7. The museum knowledge question-answering method according to claim 1, characterized in that: In step S3, the step of querying the local museum vector database according to the question input by the user includes: Preprocessing the content of the question to obtain a question vector; Preprocessing the data of the local museum vector database to obtain a plurality of text-embedded text blocks, which are recorded as the first text blocks; Performing vector similarity matching on the question vector and the plurality of first text blocks to obtain a first text block with the highest vector similarity, which is recorded as a second text block; The second text block and the question input by the user form a text containing a prompt word, The text containing the prompt word is input into the large language model, and the large language model generates a result which is output to the user.

8. A museum knowledge question-answering system, characterized in that: include: A judgment module is used to judge the type of the question input by the user to determine whether the question input by the user belongs to the first type of question; A first processing and output module, used for processing user input questions belonging to the first category of questions, and querying the local museum relational database according to the user input questions; If the query is successful, output the query results; The second processing and output module is used to process the questions input by the user belonging to the first category of questions, and to process the situation where the query of the first processing module is unsuccessful: query the local museum vector database according to the questions input by the user; If the query is successful, the large language model is called to generate a result and output it to the user; If the query fails, a message indicating the query failed is output to the user; The third processing and output module is used to process questions input by the user that do not belong to the first category of questions: calling the large language model to process the questions input by the user, and generating a result to output to the user.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a processor, the processor is caused to execute the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Question and answer method, device and equipment and computer readable storage medium

    CN120316225A

  • Intelligent question and answer method and device for economic crops, medium and electronic equipment

    CN122088708A