Human-computer interaction method, device and electronic equipment
Feature extraction and in-depth cross-modal fusion of multimedia data through multi-modal models solve the problem of the inability of intelligent auxiliary operation and maintenance systems to handle multimedia operation and maintenance problems, and improve operation and maintenance efficiency and accuracy.
Patent Information
- Application Number
- CN202411000909.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-25
AI Technical Summary
The existing intelligent auxiliary operation and maintenance system based on natural language processing technology cannot effectively handle and respond to operation and maintenance problems in the form of multimedia, resulting in low efficiency of operation and maintenance personnel.
Features are extracted from multimedia data through the feature extraction network in the multimodal model, combined with the pre-trained large language model, to capture multi-dimensional information of the question from different media perspectives, perform in-depth cross-modal fusion and intent understanding, and generate answers in the form of multimedia data.
It improves the operation and maintenance efficiency of operation and maintenance personnel, achieves effective response to multimedia operation and maintenance problems, reduces instruction parsing errors and execution deviations, and enhances the accuracy and efficiency of automated processing.
Smart Images

Figure CN118536606B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of artificial intelligence operation and maintenance and software interaction, and more specifically, to a human-computer interaction method, device and electronic equipment. Background Art
[0002] In current operation and maintenance scenarios, as more and more systems need to be maintained, ordinary operation and maintenance personnel often face a large number of operation and maintenance tools, operation and maintenance interfaces, operation and maintenance steps and other operation and maintenance knowledge when encountering operation and maintenance problems. They can only perform operation and maintenance work after learning and understanding these operation and maintenance knowledge. In order to improve operation and maintenance efficiency, operation and maintenance personnel usually interact with intelligent auxiliary operation and maintenance systems built based on knowledge graphs. However, in the specific practice process, it is found that intelligent auxiliary operation and maintenance systems built based on knowledge graphs are mostly built based on texts of natural language processing technology, and cannot process and respond to operation and maintenance problems in multimedia form, resulting in low efficiency of operation and maintenance personnel. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a human-computer interaction method, device and electronic device for improving the problem of low efficiency of operation and maintenance personnel in performing operation and maintenance.
[0004] The embodiment of the present application provides a human-computer interaction method, including: determining a target instruction according to the problem multimedia data to be processed, and determining the context data corresponding to the problem multimedia data; constructing a prompt project according to the problem multimedia data, the target instruction and the context data; using the feature extraction network in the multimodal model to extract features from the text data, picture data and / or video data in the prompt project to obtain a feature matrix; inputting the feature matrix into the pre-trained large language model in the multimodal model, so that the pre-trained large language model returns the answer data corresponding to the problem multimedia data. In the implementation process of the above scheme, the prompt project is constructed by the problem multimedia data, the target instruction and the context data, and the feature matrix extracted from the text data, picture data and / or video data in the prompt project is input into the pre-trained large language model in the multimodal model, so as to capture the multi-dimensional information of the problem from different media perspectives, and perform deep cross-modal fusion and intent understanding on the multimodal information of the text data, picture data and video data, so that the pre-trained large language model responds to the operation and maintenance problems in multimedia form, effectively improving the efficiency of the operation and maintenance personnel in operation and maintenance.
[0005] Optionally, in an embodiment of the present application, the target instruction is determined according to the problem multimedia data to be processed, including: determining the problem category of the problem multimedia data according to the problem text in the problem multimedia data; searching for the model instruction corresponding to the problem category in the category instruction library, and determining the model instruction corresponding to the problem category as the target instruction, and the category instruction library stores the correspondence between the problem category and the model instruction. In the implementation process of the above scheme, by mapping the problem text in the problem multimedia data to a specific problem category, and then accurately matching it to the corresponding model instruction by the category instruction library, a direct and accurate conversion from natural language questions to execution commands is achieved. This precise mapping greatly improves the efficiency and accuracy of automated problem processing and reduces execution deviations caused by instruction parsing errors.
[0006] Optionally, in an embodiment of the present application, determining the context data corresponding to the problem multimedia data includes: using the knowledge block vectors in the vector database to perform semantic retrieval on the problem multimedia data to obtain semantic retrieval results; using the knowledge blocks in the vector database to perform keyword retrieval on the problem multimedia data to obtain keyword retrieval results; and determining the context data corresponding to the problem multimedia data based on the semantic retrieval results and the keyword retrieval results. In the implementation process of the above scheme, by combining the keyword retrieval and the semantic retrieval results, the scheme realizes a multi-dimensional analysis of the problem multimedia data. Keyword retrieval ensures accuracy and can quickly locate the knowledge blocks containing specific vocabulary, while semantic retrieval provides a broader perspective and can discover content related to keywords but expressed differently. The two complement each other and jointly construct comprehensive and accurate context data, thereby improving the accuracy of the context data.
[0007] Optionally, in an embodiment of the present application, a semantic search is performed on the problem multimedia data using the knowledge block vectors in the vector database, including: converting the problem multimedia data into a semantic matrix vector; retrieving a first set of knowledge blocks in the vector database whose semantic distance between the knowledge block vector and the semantic matrix vector is less than a preset distance threshold, wherein the vector database stores the correspondence between the knowledge block and the knowledge block vector; and determining the first set of knowledge blocks as the semantic search result. In the implementation of the above scheme, a preset threshold is used to screen the similarity between the knowledge block vector and the semantic matrix vector. Compared with the traditional full-text search, this method can directly perform dot product or cosine similarity calculations in the vector space, quickly locate the knowledge blocks that are highly relevant to the query keywords, reduce unnecessary computational burden, and greatly improve the retrieval efficiency.
[0008] Optionally, in an embodiment of the present application, the knowledge blocks in the vector database are used to perform keyword retrieval on the problem multimedia data, including: extracting keywords from the problem multimedia data; retrieving a second set of knowledge blocks with the highest matching hit rate with the keywords in the vector database; and determining the second set of knowledge blocks as the keyword retrieval result. In the implementation of the above scheme, the above vector database is used as a plug-in knowledge base, so as to enhance the airport operation and maintenance large model's ability to respond to airport professional operation and maintenance issues and multi-document summarization capabilities, so that the pre-trained large language model in the multimodal model not only has general knowledge itself, but can also use the professional knowledge in the vertical field of airport operation and maintenance in the vector database to answer the questions of operation and maintenance personnel, effectively providing the operation and maintenance personnel with the capabilities of a professional consultant.
[0009] Optionally, in an embodiment of the present application, it also includes: obtaining an airport operation and maintenance comprehensive resource library, which includes: multiple operation and maintenance materials; for each of the multiple operation and maintenance materials, dividing the operation and maintenance materials into blocks to obtain multiple knowledge blocks; for each of the multiple knowledge blocks, vectorizing the knowledge block to obtain multiple knowledge block vectors; storing each of the multiple knowledge blocks and the knowledge block vector corresponding to the knowledge block in a vector database. In the implementation process of the above scheme, the knowledge block vectors after the vectorization of the operation and maintenance materials are stored through a vector database in an external plug-in manner, so that the most relevant knowledge blocks can be searched in the vector database, which improves the traditional situation where the operation and maintenance manual of the target system needs to be manually learned before the operation and maintenance operations of the target system can be performed, so that the pre-trained large language model can quickly and adaptively learn different types of target system operation and maintenance materials, and the operation and maintenance personnel can use the pre-trained large language model to perform operation and maintenance operations on the target system, effectively improving the adaptive ability of the pre-trained large language model.
[0010] Optionally, in an embodiment of the present application, context data corresponding to the problem multimedia data is determined based on the semantic retrieval results and the keyword retrieval results, including: fusing the semantic retrieval results and the keyword retrieval results to obtain a fused retrieval result; deduplicating and sorting the fused retrieval results to obtain a deduplicated and sorted retrieval result; and determining the context data corresponding to the problem multimedia data based on the deduplicated and sorted retrieval result. In the implementation of the above scheme, by dynamically fusing the semantic retrieval results and the keyword retrieval results, this diverse and dynamically changing hybrid retrieval weight setting can reduce the impact of the hybrid weight setting on the good case, so that the neural network model can automatically learn the fusion weight of the semantic retrieval results and the fusion weight of the keyword retrieval results, effectively improving the accuracy of the retrieval.
[0011] Optionally, in an embodiment of the present application, the fused search results are deduplicated and sorted, including: deduplicating multiple knowledge blocks in the fused search results according to the block identifiers of the knowledge blocks to obtain multiple knowledge blocks after deduplication; encoding the question multimedia data to obtain a question feature vector, and calculating the correlation coefficient between the question feature vector and each of the multiple knowledge blocks after deduplication; sorting the multiple knowledge blocks after deduplication according to the correlation coefficient to obtain the deduplicated and sorted search results. In the implementation process of the above scheme, by deduplicating the block identifiers of multiple knowledge blocks in the fused search results, the system can effectively eliminate duplicate information, ensure the diversity and accuracy of the final search results, make the knowledge blocks after deduplication more refined, avoid the trouble of users facing a large amount of duplicate information, and significantly improve the efficiency of information retrieval.
[0012] Optionally, in an embodiment of the present application, the feature matrix includes: a text feature matrix and / or a mapping feature matrix, a feature extraction network, including: a text encoder, an image vision encoder, a video vision encoder, a feature space merging module and a mapping network; using the feature extraction network in the multimodal model to extract features from the image data and / or video data, including: using the text encoder to extract features from the text data to obtain a text feature matrix; and / or using the image vision encoder to extract image features from the image data; using the video vision encoder to extract video features from the video data, and clustering and grouping the video features to obtain at least one event feature, the image vision encoder and the video vision encoder share weight parameters; using multiple feature space merging modules to perform multi-layer feature space merging of image features and at least one event feature to obtain multi-layer semantic features; using the mapping network to perform network mapping on the multi-layer semantic features to obtain a mapping feature matrix. In the implementation process of the above scheme, through the process of gradually extracting low-level features to high-level semantic features multiple times, the scheme can capture the intrinsic structure and semantic information of the data from multiple levels. This multi-level feature extraction not only retains the detailed information of the original data (low-level features), but also forms a deeper understanding of the data through abstraction and induction (high-level semantic features). The final feature matrix contains rich multi-scale information, which can more comprehensively and accurately reflect the intrinsic meaning of the data, thereby improving the input data quality of the deep feature representation of the pre-trained large language model.
[0013] Optionally, in an embodiment of the present application, a prompt project is constructed according to the question multimedia data, target instructions and context data, including: determining a prompt template according to the question multimedia data; filling the question multimedia data, target instructions and context data into the prompt template to obtain a prompt project. In the implementation process of the above scheme, by customizing the prompt template according to the question multimedia data, the scheme can generate a highly personalized prompt project. This personalized processing can ensure that each question or query can get the most appropriate response, improve the system's adaptability to complex and specific scenarios, and enable users to obtain more accurate and targeted answers or suggestions.
[0014] Optionally, in an embodiment of the present application, the feature matrix is input into a pre-trained large language model in a multimodal model, including: parsing the main task from the feature matrix through the Agent in the pre-trained large language model, and decomposing the main task into subtasks; executing the subtasks through the model tool in the pre-trained large language model to obtain the task execution result; evaluating whether the task execution result meets the expected goal corresponding to the prompt project through the Agent in the pre-trained large language model; if the task execution result meets the expected goal corresponding to the prompt project, the task execution result is determined as the answer data corresponding to the question multimedia data. In the implementation process of the above scheme, the Agent in the pre-trained large language model is used to parse and decompose planning operations, and the model tool performs task operations, so that the operation and maintenance personnel can efficiently complete the operation and maintenance of the airport system. These model tools can provide support and auxiliary work related to operation and maintenance knowledge, helping the operation and maintenance personnel to efficiently handle airport work such as airport system alarms and fault location and troubleshooting, thereby effectively improving the efficiency of the operation and maintenance personnel in operation and maintenance.
[0015] Optionally, in an embodiment of the present application, after evaluating whether the task execution result meets the expected goal corresponding to the prompt project through the Agent intelligent body in the pre-trained large language model, it also includes: if the task execution result does not meet the expected goal corresponding to the prompt project, the main task is parsed from the feature matrix again through the Agent intelligent body in the pre-trained large language model. In the implementation process of the above scheme, the Agent intelligent body in the pre-trained large language model is used to perform planning operations such as parsing and decomposition, and the model tool performs task operations, so that the pre-trained large language model can automatically perform some basic operation and maintenance operations through the model tool, thereby providing the operation and maintenance personnel with the ability of an operation and maintenance assistant.
[0016] The embodiment of the present application also provides a human-computer interaction device, including: a media data processing module, used to determine the target instruction according to the problem multimedia data to be processed, and determine the context data corresponding to the problem multimedia data; a prompt text construction module, used to construct a prompt project according to the problem multimedia data, the target instruction and the context data; a feature matrix acquisition module, used to use the feature extraction network in the multimodal model to extract features from the text data, image data and / or video data in the prompt project to obtain a feature matrix; an answer text return module, used to input the feature matrix into the pre-trained large language model in the multimodal model, so that the pre-trained large language model returns the answer data corresponding to the problem multimedia data.
[0017] Optionally, in an embodiment of the present application, the media data processing module includes: a question category determination submodule, used to determine the question category of the question multimedia data based on the question text in the question multimedia data; a model instruction search submodule, used to search for model instructions corresponding to the question category in a category instruction library, and determine the model instructions corresponding to the question category as the target instruction, and the category instruction library stores the correspondence between the question category and the model instructions.
[0018] Optionally, in an embodiment of the present application, the media data processing module includes: a semantic retrieval submodule, which is used to perform semantic retrieval on the problem multimedia data using the knowledge block vectors in the vector database to obtain semantic retrieval results; a keyword retrieval submodule, which is used to perform keyword retrieval on the problem multimedia data using the knowledge blocks in the vector database to obtain keyword retrieval results; and a context determination submodule, which is used to determine the context data corresponding to the problem multimedia data based on the semantic retrieval results and the keyword retrieval results.
[0019] Optionally, in an embodiment of the present application, the semantic retrieval submodule includes: a media data conversion unit, used to convert the problem multimedia data into a semantic matrix vector; a first set retrieval unit, used to retrieve a first knowledge block set in a vector database whose semantic distance between the knowledge block vector and the semantic matrix vector is less than a preset distance threshold, and the vector database stores the correspondence between the knowledge block and the knowledge block vector; and a semantic result determination unit, used to determine the first knowledge block set as a semantic retrieval result.
[0020] Optionally, in an embodiment of the present application, the keyword retrieval submodule includes: a matrix-vector conversion module, used to extract keywords from question multimedia data; a second set retrieval unit, used to retrieve a second knowledge block set with the highest matching hit rate with the keyword in the vector database; and a keyword result determination unit, used to determine the second knowledge block set as the keyword retrieval result.
[0021] Optionally, in an embodiment of the present application, it also includes: an operation and maintenance document acquisition module, which is used to acquire an airport operation and maintenance comprehensive resource library, and the airport operation and maintenance comprehensive resource library includes: multiple operation and maintenance materials; a knowledge block acquisition module, which is used to block each operation and maintenance material in the multiple operation and maintenance materials to obtain multiple knowledge blocks; a block vector acquisition module, which is used to vectorize each knowledge block in the multiple knowledge blocks to obtain multiple knowledge block vectors; a block vector storage module, which is used to store each knowledge block in the multiple knowledge blocks and the knowledge block vector corresponding to the knowledge block in a vector database.
[0022] Optionally, in an embodiment of the present application, the context determination submodule includes: a retrieval result fusion unit, used to fuse the semantic retrieval results and the keyword retrieval results to obtain a fused retrieval result; a result deduplication and sorting unit, used to deduplicate and sort the fused retrieval results to obtain a deduplicated and sorted retrieval result; and a context data determination unit, used to determine the context data corresponding to the problem multimedia data based on the deduplicated and sorted retrieval results.
[0023] Optionally, in an embodiment of the present application, a result deduplication and sorting unit includes: a knowledge block deduplication subunit, used to deduplicate multiple knowledge blocks in the fused retrieval result according to the block identifiers of the knowledge blocks, and obtain multiple knowledge blocks after deduplication; a correlation coefficient calculation subunit, used to encode the question multimedia data, obtain the question feature vector, and calculate the correlation coefficient between the question feature vector and each knowledge block in the multiple knowledge blocks after deduplication; a knowledge block sorting subunit, used to sort the multiple knowledge blocks after deduplication according to the correlation coefficient, and obtain a retrieval result after deduplication and sorting.
[0024] Optionally, in an embodiment of the present application, the feature matrix includes: a text feature matrix and a mapping feature matrix, the feature extraction network includes: a text encoder, an image vision encoder, a video vision encoder, a feature space merging module and a mapping network; the feature matrix acquisition module includes: a text feature extraction submodule, which is used to use the text encoder to perform feature extraction on the text data to obtain the text feature matrix; and / or, an image feature extraction submodule, which is used to extract image features from picture data using the image vision encoder; a feature extraction clustering submodule, which is used to use the video vision encoder to extract video features from video data, and cluster and group the video features to obtain at least one event feature, and the image vision encoder and the video vision encoder share weight parameters; a feature space merging submodule, which is used to use multiple feature space merging modules to perform multi-layer feature space merging on image features and at least one event feature to obtain multi-layer semantic features; a feature network mapping submodule, which is used to perform network mapping on multi-layer semantic features using a mapping network to obtain a mapping feature matrix.
[0025] Optionally, in an embodiment of the present application, a prompt text construction module includes: a prompt template determination submodule, used to determine a prompt template according to question multimedia data; a prompt template filling submodule, used to fill question multimedia data, target instructions and context data into the prompt template to obtain a prompt project.
[0026] Optionally, in an embodiment of the present application, the answer text returning module includes: a task planning decomposition submodule, which is used to parse the main task from the feature matrix through the Agent intelligent body in the pre-trained large language model, and decompose the main task into subtasks; a model task execution submodule, which is used to execute the subtasks through the model tool in the pre-trained large language model to obtain the task execution result; an execution result evaluation submodule, which is used to evaluate whether the task execution result meets the expected goal corresponding to the prompt project through the Agent intelligent body in the pre-trained large language model; an answer data determination submodule, which is used to determine the task execution result as the answer data corresponding to the question multimedia data if the task execution result meets the expected goal corresponding to the prompt project.
[0027] Optionally, in an embodiment of the present application, the answer text return module also includes: a task re-planning sub-module, which is used to re-parse the main task from the feature matrix through the Agent intelligent body in the pre-trained large language model if the task execution result does not meet the expected goal corresponding to the prompt project.
[0028] An embodiment of the present application further provides an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the machine-readable instructions execute the method described above when executed by the processor.
[0029] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is executed.
[0030] The embodiment of the present application also provides a computer program product, including: a computer program or a computer instruction, and the computer program or the computer instruction executes the method described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the 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 creative work.
[0032] Figure 1 A schematic diagram of a flow chart of a human-computer interaction method provided by an embodiment of the present application is shown;
[0033] Figure 2 A schematic diagram of the model structure of a multimodal model provided in an embodiment of the present application is shown;
[0034] Figure 3 A schematic diagram of the execution flow of the Agent in the pre-trained large language model provided in an embodiment of the present application is shown;
[0035] Figure 4 A schematic diagram of the structure of a human-computer interaction device provided in an embodiment of the present application is shown;
[0036] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0037] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. It should be understood that the drawings in the embodiment of the present application only serve the purpose of explanation and description, and are not used to limit the protection scope of the embodiment of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in the embodiment of the present application shows the operation implemented according to some embodiments of the embodiment of the present application. It should be understood that the operation of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the embodiment of the present application, or remove one or more operations from the flowchart.
[0038] It is understandable that the "first" and "second" in the embodiments of the present application are used to distinguish similar objects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit the difference. In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of the associated objects, indicating that there may be three relationships, such as A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship. The term "multiple" refers to more than two (including two), and similarly, "multiple groups" refers to more than two groups (including two groups).
[0039] Before introducing the human-computer interaction method provided in the embodiment of the present application, some concepts involved in the embodiment of the present application are first introduced:
[0040] Large Language Models (LLM) refer to deep learning models trained using large-scale data sets. LLMs gain a deep understanding of language structure, grammar, semantics, and context by learning from large amounts of text data.
[0041] It should be noted that the human-computer interaction method provided in the embodiment of the present application can be executed by an electronic device, where the electronic device refers to a device terminal having the function of executing a computer program or the above-mentioned server, and the device terminal is, for example, a smart phone, a personal computer, a tablet computer, a personal digital assistant, or a mobile Internet device, etc. A server refers to a device that provides computing services through a network, and servers are, for example, x86 servers and non-x86 servers, and non-x86 servers include mainframes, minicomputers, and UNIX servers.
[0042] The following is an example of an application scenario in which the human-computer interaction method is applicable: In the operation and maintenance scenario, most of the intelligent auxiliary operation and maintenance systems built based on knowledge graphs do not have the ability to communicate with operation and maintenance personnel in natural language, nor can they process and respond to operation and maintenance issues in multimedia form. In this case, the operation and maintenance time and burden of operation and maintenance personnel will be greatly increased. In particular, in the operation and maintenance support work of traditional airport operation and maintenance systems, airport operation and maintenance personnel need to learn more and more operation and maintenance tools, operation and maintenance interfaces, and operation and maintenance steps, resulting in low efficiency of operation and maintenance personnel. Among them, the operation and maintenance support work of traditional airport operation and maintenance systems includes but is not limited to: operation and maintenance of airport hardware and software equipment such as flight display systems, baggage sorting, freight systems, departure systems, security inspection systems, self-service check-in systems, basic network systems, and monitoring systems.
[0043] In order to solve the above technical problems, the multimodal information of question text, image data and video data can be deeply cross-modally integrated and understood through the electronic device that executes the human-computer interaction method, so that the operation and maintenance personnel can communicate with the multimodal model running on the electronic device through natural language, and let the pre-trained large language model in the multimodal model respond to multimedia operation and maintenance problems, effectively improving the efficiency of operation and maintenance personnel in operation and maintenance.
[0044] See also Figure 1 The flowchart of the human-computer interaction method provided by the embodiment of the present application is shown; the embodiment of the present application provides a human-computer interaction method, including:
[0045] Step S110: determining a target instruction according to the problem multimedia data to be processed, and determining context data corresponding to the problem multimedia data.
[0046] It can be understood that the above-mentioned question multimedia data can be multimedia data sent by the operation and maintenance personnel through the user terminal device (such as a mobile phone or a tablet computer, etc.). The multimedia data here is mainly used to allow the multimodal model to answer the operation and maintenance problems that the operation and maintenance personnel are concerned about. There are many forms of this kind of question multimedia data. The first form only includes text data (such as question text) or voice data (the voice data here can be converted into question text using voice recognition technology), the second form includes question text (or voice data) and picture data, the third form includes question text (or voice data) and video data, and the fourth form includes question text (or voice data), picture data and video data, etc. For ease of understanding and explanation, the following is an example of including three. Optionally, in the specific practice process, if the user sends voice data instead of question text through the terminal device, then the voice data can be converted into question text first, and then the question category of the question multimedia data can be determined according to the question text. Therefore, the operation and maintenance personnel can directly ask questions by voice or take pictures and combine voice to get the answer text corresponding to the question text.
[0047] The context data corresponding to the above-mentioned question multimedia data is the retrieved data, and like the question multimedia data, there are many forms of existence, mainly including: text data, picture data and / or video data.
[0048] Step S120: construct a prompting project according to the question multimedia data, target instructions and context data.
[0049] Step S130: Use the feature extraction network in the multimodal model to extract features from the text data, image data and / or video data in the prompt project to obtain a feature matrix.
[0050] It can be understood that since the problem multimedia data may include text data, picture data and / or video data, and the context data may also include text data, picture data and / or video data, and the prompt project is constructed by the problem multimedia data and the context data, therefore, the text data in the prompt project may include: text data in the problem multimedia data and / or text data in the context data. Similarly, the picture data in the prompt project may include: picture data in the problem multimedia data and / or picture data in the context data, and the video data in the prompt project may include: video data in the problem multimedia data and / or video data in the context data.
[0051] The above-mentioned multimodal model is also called the airport operation and maintenance big model in the airport operation and maintenance scenario, because the multimodal model can process multimedia data submitted by operation and maintenance personnel, and the multimodal model itself is also trained through a multimedia data knowledge base, so that operation and maintenance personnel can ask questions in the form of multimedia data, and let the multimodal model answer the operation and maintenance personnel's operation and maintenance questions through the multimedia data knowledge base, so that the multimodal model can provide consulting capabilities for operation and maintenance personnel.
[0052] Step S140: input the feature matrix into the pre-trained large language model in the multimodal model, so that the pre-trained large language model returns answer data corresponding to the question multimedia data.
[0053] Pre-trained Large Language Models (PLLM) refers to a pre-trained large language model, which can be used as the base model of a multimodal model. The pre-trained large language model in the multimodal model can be Qwen-VL series, ChatGLM series, ChatGPT series, Llama series, MOSS-SFT, etc.
[0054] The answer data corresponding to the above-mentioned question multimedia data may also include seven situations: text data, image data and / or video data. After the pre-trained large language model sends the answer data to the terminal device, if the answer data includes text data, then the terminal device can also convert the text data into voice data for real-time playback. If the answer data includes video data, then the terminal device can also directly play the video data.
[0055] In the implementation process of the above scheme, a prompt project is constructed through problem multimedia data, target instructions and context data, and the feature matrix extracted from the text data, image data and / or video data in the prompt project is input into the pre-trained large language model in the multimodal model, so as to capture the multi-dimensional information of the problem from different media perspectives, and perform deep cross-modal fusion and intent understanding on the multimodal information of text data, image data and video data, so that the pre-trained large language model can respond to multimedia operation and maintenance problems, effectively improving the efficiency of operation and maintenance personnel in operation and maintenance.
[0056] As an optional implementation of the above step S110, the above implementation of determining the target instruction according to the problematic multimedia data to be processed may include:
[0057] Step S111: determining the question category of the question multimedia data according to the question text in the question multimedia data.
[0058] An optional implementation of the above-mentioned step S111 is, for example: if the user sends voice data through the terminal device, or the question multimedia data also includes voice data, then the open source OpenAI Whisper library is used to convert the voice data into the question text to be processed, and then the text data most similar to the question text to be processed is directly searched in the text category library, and the question category corresponding to the most similar text data is determined as the question category of the above-mentioned question multimedia data; wherein the text category library stores the correspondence between the question text and the question category, and the text category library can use a relational database such as MySQL or Oracle.
[0059] Step S112: searching for a model instruction corresponding to the problem category in the category instruction library, and determining the model instruction corresponding to the problem category as the target instruction. The category instruction library stores the correspondence between the problem category and the model instruction.
[0060] An optional implementation of the above step S112 is, for example: the above category instruction library may store the correspondence between the problem category and the model instruction, where the correspondence may be a one-to-one correspondence or a many-to-one relationship, i.e., multiple problem categories correspond to one model instruction. Therefore, the model instruction corresponding to the problem category may be directly searched in the category instruction library, and the found model instruction may be determined as the above target instruction; wherein, the category instruction library may also use a relational database such as MySQL or Oracle, or a non-relational database such as Redis or MongoDB.
[0061] As another optional implementation of the above step S110, the above implementation of determining the target instruction according to the problematic multimedia data to be processed may include:
[0062] Step S113: searching for a question text having the greatest similarity to the question text in the question instruction library, wherein the question instruction library stores the correspondence between the question text and the model instructions.
[0063] Step S114: Determine the model instruction corresponding to the question text with the greatest similarity as the target instruction.
[0064] The implementation method of the above steps S113 to S114 may include: if the user sends voice data through the terminal device, then the open source OpenAI Whisper library can be used to convert the voice data into question text, and then the question text with the greatest similarity to the question text can be found in the question instruction library, and then the question category of the question multimedia data is determined according to the question text with the greatest similarity, for example: the model instruction corresponding to the question category is found in the category instruction library, and the model instruction corresponding to the question category is determined as the target instruction, and the category instruction library stores the corresponding relationship between the question category and the model instruction. Among them, the above-mentioned question instruction library stores the corresponding relationship between the question text and the model instruction, and the question instruction library can use a relational database such as MySQL or Oracle, and the category instruction library can also use a relational database such as MySQL or Oracle, or a non-relational database such as Redis or MongoDB.
[0065] In the implementation process of the above solution, by determining the category of the problem multimedia data based on the question text with maximum similarity, it is possible to achieve refined classification of the problems. This means that even problems with subtle differences or specific contexts can be accurately identified and classified, and then the most appropriate model instructions can be called. The accuracy of this classification can significantly improve the pertinence and efficiency of problem solving.
[0066] As another optional implementation of the above step S110, the above implementation of determining the context data corresponding to the problematic multimedia data may include:
[0067] Step S115: Use the knowledge block vectors in the vector database to perform semantic retrieval on the problem multimedia data to obtain semantic retrieval results.
[0068] In the specific practice, the Milvus retrieval algorithm can be used to perform semantic retrieval on the problem multimedia data to obtain semantic retrieval results. It can be understood that the use of vector databases for semantic retrieval can understand the potential semantics of the problem multimedia data based on the vector representation generated by the deep learning model. This semantic understanding goes beyond simple keyword matching and can capture the conceptual associations and contextual information between data, greatly improving the system's ability to parse complex problems.
[0069] Step S116: Use the knowledge blocks in the vector database to perform keyword search on the problem multimedia data to obtain keyword search results.
[0070] In the actual practice, the BM25 retrieval algorithm of ElasticSearch can be used to perform keyword retrieval on the problem multimedia data. The BM25 retrieval algorithm is a retrieval algorithm with the full name of Best Matching 25.
[0071] Step S117: Determine the context data corresponding to the problem multimedia data according to the semantic search results and the keyword search results.
[0072] In the implementation process of the above scheme, it is not only applicable to text data, but also can handle problems involving multimedia data such as pictures and videos. By converting data of different modes into a unified vector representation, the system can realize cross-modal retrieval and matching, which means that even if the query contains multiple types of data, the system can provide comprehensive and coherent retrieval results, thereby enhancing the cross-modal retrieval capability of the present application example. Furthermore, by combining the results of keyword retrieval and semantic retrieval, the scheme realizes a multi-dimensional analysis of the problem multimedia data. Keyword retrieval ensures accuracy and can quickly locate information fragments containing specific vocabulary, while semantic retrieval provides a broader perspective and can discover content related to keywords but expressed in different ways.
[0073] As an optional implementation of the above step S115, the above implementation of semantic retrieval of problematic multimedia data may include:
[0074] Step S115a: Convert the problem multimedia data into a semantic matrix vector.
[0075] Step S115b: Retrieve a first set of knowledge blocks whose semantic distances between knowledge block vectors and semantic matrix vectors are less than a preset distance threshold from a vector database, wherein the vector database stores the corresponding relationship between the knowledge blocks and the knowledge block vectors.
[0076] It can be understood that since the above-mentioned vector database can store knowledge block vectors of relevant materials of software or hardware that requires operation and maintenance (such as operation and maintenance documents, emergency manuals, product manuals, troubleshooting manuals, function manuals and / or instructions, etc.), these relevant materials are usually saved in formats such as PDF or Word, representing a rich knowledge base. Therefore, the vector database can be understood as an external knowledge base independent of the original operation and maintenance system library.
[0077] Step S115c: Determine the first knowledge block set as the semantic retrieval result.
[0078] The above-mentioned semantic retrieval results may include multiple second knowledge block sets, and each second knowledge block set may include: a knowledge block and a distance score corresponding to the knowledge block, and the distance score represents the semantic distance between the above-mentioned knowledge block vector and the semantic matrix vector. In the implementation process of the above-mentioned scheme, a preset threshold is used to screen the similarity between the knowledge block vector and the semantic matrix vector. Compared with the traditional full-text search, this method can directly perform dot product or cosine similarity calculation in the vector space, quickly locate the knowledge block that is highly related to the query keyword, reduce unnecessary calculation burden, and greatly improve the retrieval efficiency.
[0079] As an optional implementation of the above step S116, the above implementation of keyword retrieval for the problem multimedia data may include:
[0080] Step S116a: extracting keywords from the question multimedia data.
[0081] Step S116b: Retrieve from the vector database a second set of knowledge blocks having the highest matching hit rate between the knowledge block vector and the keyword.
[0082] Since the above-mentioned vector database can store knowledge block vectors of relevant materials of software or hardware that requires operation and maintenance (such as operation and maintenance documents, emergency manuals, product manuals, troubleshooting manuals, function manuals and / or instructions, etc.), these relevant materials are usually saved in formats such as PDF or Word, representing a rich knowledge base. Therefore, the vector database can be understood as an external knowledge base independent of the original operation and maintenance system library.
[0083] Step S116c: Determine the second knowledge block set as the keyword search result.
[0084] The above-mentioned keyword search results may include multiple second knowledge block sets, each of which may include: a knowledge block and a BM25 score corresponding to the knowledge block, and the BM25 score represents the similarity between the above-mentioned knowledge block vector and the key matrix vector.
[0085] In the process of implementing the above solution, the above vector database is used as an external knowledge base to enhance the airport operation and maintenance model's ability to respond to airport professional operation and maintenance issues and multi-document summarization capabilities, so that the pre-trained large language model in the multimodal model not only has general knowledge itself, but can also use the professional knowledge in the vertical field of airport operation and maintenance in the vector database to answer the questions of operation and maintenance personnel, effectively providing operation and maintenance personnel with professional consulting capabilities.
[0086] As an optional implementation of the above method, before using the vector database or in the process of using the vector database, the knowledge blocks and the knowledge block vectors may also be stored in the vector database. This implementation may include:
[0087] Step S116d: Acquire an airport operation and maintenance comprehensive resource library, which includes: multiple operation and maintenance materials.
[0088] It is understandable that, in addition to the operation and maintenance materials, the airport operation and maintenance comprehensive resource library may also include an electronic manual of airport operation and maintenance knowledge, an electronic manual for the use of airport hardware and software equipment, an instruction manual for the use of airport equipment parameters, an airport operation and maintenance system manual, an airport operation and maintenance basic knowledge base, an API description of basic operation and maintenance tools, equipment operation images and / or equipment operation videos, etc. Optionally, the above airport operation and maintenance comprehensive resource library can be used to construct and update the vector database (this part is introduced below), and the airport operation and maintenance comprehensive resource library can also be used to train the multimodal model. The specific training process will be introduced before the end of the human-computer interaction method below.
[0089] Step S116e: For each of the multiple operation and maintenance materials, the operation and maintenance material is divided into blocks to obtain multiple knowledge blocks.
[0090] Optionally, after obtaining the airport operation and maintenance comprehensive resource library, if the data in the airport operation and maintenance comprehensive resource library is not standardized, the data in the airport operation and maintenance comprehensive resource library can also be cleaned, preprocessed and metadata extracted. The cleaning operation includes using the data Loader to extract PDF, word, markdown, and airport operation and maintenance database and API instructions, etc. The preprocessing operations include: data format processing, removal of unrecognizable content, compression and formatting, etc. Metadata extraction includes: extracting file name, time, chapter title (title), schematic picture alt attribute, operation video description and other information.
[0091] An implementation example of the above-mentioned step S116e is as follows: for each operation and maintenance material among a plurality of operation and maintenance materials (such as text, image description and video description of airport operation and maintenance, etc.), the operation and maintenance material is chunked (Chunking) based on the intent-based chunking method, that is, the operation and maintenance material is chunked through a professional intent package (such as the NLTK package of NLP) to obtain a plurality of knowledge chunks.
[0092] Step S116f: For each knowledge block among the multiple knowledge blocks, vectorize the knowledge block to obtain multiple knowledge block vectors.
[0093] For example, the implementation method of the above-mentioned step S116e is: the embedding model can be used to vectorize (embedding) the knowledge block. The above-mentioned process of vectorizing (embedding) the knowledge block is actually to convert these operation and maintenance materials into a format that can be understood by the computer. The quality of the embedding model will directly affect the quality of subsequent retrieval. Among them, the embedding model can be selected according to the specific situation. For example, Qwen's embedding model is selected as the embedding model of airport operation and maintenance data.
[0094] Since electronic devices can automatically divide and vectorize the operation and maintenance materials in the airport operation and maintenance comprehensive resource library, when new software or hardware that requires operation and maintenance is added to the airport operation and maintenance system, users can directly add relevant materials of the software or hardware (such as operation and maintenance documents, emergency manuals, product manuals, troubleshooting manuals, function manuals and / or instructions, etc.) to the airport operation and maintenance comprehensive resource library, which can adaptively help operation and maintenance personnel answer questions related to the software or hardware, thereby improving traditional operations that require program modification or manual configuration, and effectively increasing the adaptive capabilities of the multimodal model for different operation and maintenance software and hardware.
[0095] Step S116g: Store each knowledge block among the multiple knowledge blocks and the knowledge block vector corresponding to the knowledge block in a vector database.
[0096] Optionally, in the process of storing knowledge blocks and their knowledge block vectors in the vector database, an index can also be created in the vector database for each knowledge block and its knowledge block vector, effectively speeding up the retrieval process of the knowledge blocks and their knowledge block vectors, reducing the user's waiting time, and effectively improving the efficiency of human-computer interaction.
[0097] In the implementation process of the above solution, the vectorized knowledge block vectors of the operation and maintenance materials are stored through an external vector database, so that the pre-trained large language model in the multimodal model can search for the most relevant knowledge blocks in the vector database, improving the traditional situation where manual learning of the operation and maintenance manual of the target system is required to perform operation and maintenance operations on the target system. The pre-trained large language model can quickly and adaptively learn different types of target system operation and maintenance materials. The operation and maintenance personnel can use the pre-trained large language model to perform operation and maintenance operations on the target system, effectively improving the adaptability of the pre-trained large language model.
[0098] As an optional implementation of the above step S117, the above implementation of determining the context data corresponding to the question multimedia data according to the semantic search results and the keyword search results may include:
[0099] Step S117a: Fuse the semantic search results and the keyword search results to obtain a fused search result.
[0100] An implementation method of the above-mentioned step S117a is, for example: first, let the neural network model automatically learn the fusion weights of the semantic retrieval results and the fusion weights of the keyword retrieval results, then, use the neural network model to calculate the fusion weights of the semantic retrieval results and the fusion weights of the keyword retrieval results, and finally, fuse the semantic retrieval results and the keyword retrieval results according to the fusion weights of the semantic retrieval results and the fusion weights of the keyword retrieval results to obtain a fused retrieval result.
[0101] Step S117b: deduplicate and sort the fused search results to obtain deduplicated and sorted search results.
[0102] Step S117c: Determine the context data corresponding to the problem multimedia data according to the search results after de-duplication and sorting.
[0103] As an implementation method of the above-mentioned steps S117b to S117c, it may include: de-duplicating multiple knowledge blocks in the fusion search results according to the block identifiers of the knowledge blocks to obtain multiple knowledge blocks after de-duplication. Encode the problem multimedia data to obtain the problem feature vector, and calculate the correlation coefficient (also known as the degree of association) between the problem feature vector and each of the multiple knowledge blocks after de-duplication through matrix penalty, attention mechanism, etc. Then, re-rank fine-tuning (RRF) is performed on the multiple knowledge blocks after de-duplication according to the correlation coefficient. Specifically, k knowledge blocks can be taken out from the search results after de-duplication sorting in the order of correlation coefficient from large to small, and these k knowledge blocks are determined as the search results after de-duplication sorting. Among them, the role of the RRF (Re-Ranking Fine-tuning) algorithm is to re-rank the results after the mixed search to obtain a sorting result that is more in line with the airport operation and maintenance business scenario. The principle of the RRF algorithm is to introduce a cross-coding mechanism so that the model can better understand the semantic relationship between the search results and the user's questions, thereby sorting the results more accurately.
[0104] In the implementation of the above solution, by deduplicating the block identifiers of multiple knowledge blocks in the fusion search results, the system can effectively eliminate duplicate information and ensure the diversity and accuracy of the final search results. The knowledge blocks after deduplication are more refined, avoiding the trouble of users facing a large amount of duplicate information and significantly improving the efficiency of information retrieval.
[0105] As an optional implementation of the above step S120, the above implementation of constructing the prompt engineering text according to the problem multimedia data, the target instruction and the context data may include:
[0106] Step S121: Determine a prompt template according to the question multimedia data.
[0107] The implementation methods of the above-mentioned step S121 include: a first implementation method, searching for a prompt template corresponding to the question category of the question multimedia data in the prompt template library, for example: letting the large model act as an Agent agent to search for a prompt template corresponding to the question category of the question multimedia data in the prompt template library. A second implementation method, searching for a candidate text that is most similar to the question text in the text template library, and determining the prompt template corresponding to the candidate text as the above-mentioned prompt template. Among them, the text template library stores the correspondence between the question category and the prompt template. A third implementation method, directly allowing the large language model to generate a prompt template according to the question category of the question multimedia data, the question text and / or a preset instruction (instruct).
[0108] Step S122: Fill the question multimedia data, target instruction and context data into the prompt template to obtain the prompt project.
[0109] The implementation method of the above step S122 is, for example: refer to the question text, question multimedia data (including operation and maintenance image data and / or video data), target instruction and context data in the table below, and fill the question multimedia data, target instruction and context data into the prompt template through prompt engineering to obtain the prompt engineering text. Among them, the examples of the above question text, question multimedia data (including operation and maintenance image data and / or video data), target instruction and context data in the list are shown in the table below.
[0110]
[0111] In the implementation process of the above solution, by customizing the prompt template according to the multimedia data of the question, the solution can generate a highly personalized prompt project. This personalized processing can ensure that each question or query can get the most appropriate response, improve the system's adaptability to complex and specific scenarios, and enable users to obtain more accurate and targeted answers or suggestions. Furthermore, by including contextual data in the prompt template, the solution can better understand the background and context of the question, thereby generating a more contextualized and situational response. This context perception ability is particularly important for dealing with problems that rely on specific situations or previous information, and improves the performance of the system in interactive scenarios such as dialogue and consultation.
[0112] See also Figure 2 The model structure diagram of the multimodal model provided by the embodiment of the present application is shown; as an optional implementation of the above step S130, the above feature matrix may include: a text feature matrix and / or a mapping feature matrix, and the above feature extraction network may include: a text encoder, an image vision encoder, a video vision encoder, a feature space merging module and a mapping network; the above-mentioned implementation method of using the feature extraction network in the multimodal model to extract features from text data, picture data and / or video data in the prompt project may include:
[0113] Step S131: Use a text encoder to extract features from text data to obtain a text feature matrix.
[0114] An implementation of the above step S131 is, for example: using a BERT (Bidirectional Encoder Representations from Transformers) model or a BART (Bidirectional and Auto-Regressive Transformers) model as a text encoder, performing feature extraction on the text data, and obtaining the text feature matrix.
[0115] Step S132: Use the image visual encoder to extract image features from the image data.
[0116] The above-mentioned image vision encoder can adopt a model of the Vision Transformer (ViT) architecture, such as a neural network model initialized with the pre-trained weights of Openclip's ViT-bigG, thereby effectively improving the visual feature extraction capability of the multimodal model.
[0117] Step S133: Use the video vision encoder to extract video features from the video data, and cluster and group the video features to obtain at least one event feature. The image vision encoder and the video vision encoder share weight parameters.
[0118] The above-mentioned video vision encoder can adopt a model of the Vision Transformer (ViT) architecture, such as a neural network model initialized with the pre-trained weights of Openclip's ViT-bigG, thereby effectively improving the visual feature extraction capability of the multimodal model.
[0119] It is understandable that in order to enable the multimodal model to have a more complete and comprehensive understanding of the three modes of text, pictures, and videos at the same time, in the specific practice process, the dynamic token of the progressive spatial clustering visual token can be used to uniformly represent images and videos. This dynamic token can better handle variable-length videos, thereby effectively enhancing the adaptability of the multimodal model to handle different airport operation and maintenance tasks.
[0120] The implementation method of the above steps S132 to S133 is, for example: using an image visual encoder to extract features from picture data to obtain image features, and at the same time, using a video visual encoder to extract features from video data to obtain video features, and using a nearest neighbor-based density peak clustering algorithm to cluster and group video features to obtain first event features and second event features, and the image visual encoder and the video visual encoder share weight parameters. It can be understood that the nearest neighbor-based density peak clustering algorithm here can be an algorithm for temporal merging of features of video data to obtain a collection of event-related frames, that is, the video data is usually divided into multiple key events, and then the visual tokens are expanded within the event. For example: if the duration of the video data is longer, then the event will be assigned more visual tokens, and if the duration of the video data is shorter, then the event will be assigned fewer visual tokens.
[0121] In the implementation of the above solution, the image visual encoder and video visual encoder with shared weight parameters can extract visual features in a unified format from the image and video data. This unified feature representation not only simplifies the subsequent processing flow, but also promotes the fusion of cross-modal information, allowing the system to more efficiently understand and process complex scenes containing multiple visual data. Furthermore, video feature clustering and grouping and extracting event features means that the system can identify and focus on key events or actions in the video, rather than just stacking static frames. This event-driven feature extraction improves the depth and accuracy of video understanding, making the system more intelligent and sensitive when processing dynamic visual content.
[0122] Step S134: Use multiple feature space merging modules to perform feature space merging on the image features and at least one event feature to obtain multi-layer semantic features.
[0123] Step S135: Use the mapping network to perform network mapping on the multi-layer semantic features to obtain a mapping feature matrix.
[0124] For example, the implementation method of the above-mentioned step S134 and step S135 is as follows: First, the image feature, the first event feature, and the second event feature are respectively merged for the first time in feature space (i.e., feature space merging 1 in the figure) to obtain image feature 1, first event feature 1, and second event feature 1, and the image feature 1, first event feature 1, and second event feature 1 are determined as low-level semantic features (i.e., low-level features in the figure). Then, the image feature 1, the first event feature 1, and the second event feature 1 are respectively merged for the second time in feature space (i.e., feature space merging 2 in the figure) to obtain image feature 2, first event feature 2, and second event feature 2, and the image feature 2, first event feature 2, and second event feature 2 are determined as middle-level semantic features (not shown in the figure). Then, the image feature 2, the first event feature 2, and the second event feature 2 are respectively merged for the third time in feature space (i.e., feature space merging 3 in the figure) to obtain image feature 3, first event feature 3, and second event feature 3, and the image feature 3, first event feature 3, and second event feature 3 are determined as high-level semantic features (i.e., high-level features in the figure). Finally, the low-level semantic features (i.e., image feature 1, first event feature 1, and second event feature 1 in the figure), middle-level semantic features (i.e., image feature 2, first event feature 2, and second event feature 2 in the figure), and high-level semantic features (i.e., image feature 3, first event feature 3, and second event feature 3 in the figure) are input into the mapping network in turn. That is, the mapping network is used to perform network mapping on the multi-layer semantic features of low-level semantic features, middle-level semantic features, and high-level semantic features, and finally a mapping feature matrix is obtained.
[0125] In the implementation process of the above scheme, through the process of gradually extracting low-level features to high-level semantic features three times, the scheme can capture the intrinsic structure and semantic information of the data from multiple levels. This multi-level feature extraction not only retains the detailed information of the original data (low-level features), but also forms a deeper understanding of the data through abstraction and induction (high-level semantic features). The final feature matrix contains rich multi-scale information, which can more comprehensively and accurately reflect the intrinsic meaning of the data, thereby improving the input data quality of the deep feature representation of the pre-trained large language model.
[0126] See also Figure 3 The schematic diagram of the execution flow of the Agent in the pre-trained large language model provided in the embodiment of the present application is shown; as an optional implementation of the above step S140, the implementation of the above-mentioned input of the feature matrix into the pre-trained large language model in the multimodal model may include:
[0127] Step S141: parse the main task from the feature matrix through the Agent in the pre-trained large language model, and decompose the main task into subtasks.
[0128] The implementation method of the above step S141 is, for example: by pre-training the parser in the Agent intelligent body architecture in the large language model, the main task is parsed from the feature matrix and the main task is decomposed into subtasks.
[0129] It can be understood that the role of the Agent intelligent body architecture in the above-mentioned pre-trained large language model is to enable the pre-trained large language model (LLM) to have the ability to achieve goals and achieve this goal through a self-motivation cycle, so that LLM can replace people to do things and use a PDCA model for planning, execution, evaluation and reflection. The PDCA model includes: the planning capability (Plan) of the parser, the execution capability (Done) of the model tool, the evaluation capability (Check) and reflection capability (Action) of the observer. The planning capability is that the Agent intelligent body breaks down the large main task into smaller and manageable subtasks. The execution capability is to call the model tool (such as external API) to execute the subtask when the internal knowledge of the model is insufficient. The evaluation capability is to evaluate whether the task execution result meets the expected goal corresponding to the prompt project. The reflection capability is to re-plan based on the evaluation result. For example, when the task execution result meets the expected goal, it can perform attribution analysis and summarize the main factors that lead to meeting the expected goal. In addition, it can also give countermeasures when anomalies occur or the output does not meet the goal, and re-plan to start the recycling process. Specifically, when the task execution result does not meet the expected goal, the Agent intelligent body in the pre-trained large language model will parse the main task from the feature matrix again, and decompose the main task into subtasks.
[0130] The above subtasks include but are not limited to text retrieval, image-text retrieval, knowledge retrieval, etc. These subtasks can help multimodal large models improve their performance in professional knowledge question-answering tasks, especially knowledge-intensive visual question-answering tasks such as airport operation and maintenance.
[0131] Step S142: Execute the subtask through the model tool in the pre-trained large language model to obtain the task execution result.
[0132] The above-mentioned model tools include but are not limited to: obtaining real-time information, the ability to execute code, accessing proprietary information knowledge bases, log tools, alarm tools, security log tools, indicator tools, retrieval and query tools for airport operation and maintenance knowledge bases, execution tools for operation and maintenance knowledge scripts, understanding and annotation tools for operation and maintenance scripts, root cause analysis tools for operation and maintenance warnings, etc. These model tools can assist operation and maintenance personnel to efficiently complete the operation and maintenance of airport systems, and provide support and auxiliary work related to operation and maintenance knowledge, helping operation and maintenance personnel to efficiently handle airport work such as airport system alarms and fault location and troubleshooting, thereby effectively improving the efficiency of operation and maintenance personnel in operation and maintenance.
[0133] Step S143: Evaluate whether the task execution result meets the expected goal corresponding to the prompt project through the Agent in the pre-trained large language model.
[0134] It is understandable that in the field of airport operation and maintenance, the above-mentioned model tool can be an intelligent operation and maintenance (AIOps) small model tool, that is, the model tool itself can call the capabilities of the small model to perform airport operation and maintenance operations. This small model can use a special tool knowledge base, so that the small model has the preset basic operation and maintenance operation capabilities of the operation and maintenance personnel, and finally enables the Agent intelligent body in the pre-trained large language model to have the ability to respond to natural language instructions and perform required work, so as to assist airport operation and maintenance personnel to complete operation and maintenance tasks such as anomaly detection, root cause analysis, equipment manual query, usage help, etc.
[0135] Step S144: If the task execution result meets the expected goal corresponding to the prompt project, the task execution result is determined as the answer data corresponding to the question multimedia data.
[0136] In the implementation process of the above solution, the Agent intelligent body in the pre-trained large language model is used to parse and decompose planning operations, and the model tool executes task operations, so that the operation and maintenance personnel can efficiently complete the operation and maintenance of the airport system. These model tools can provide support and auxiliary work related to operation and maintenance knowledge, helping the operation and maintenance personnel to efficiently handle airport work such as airport system alarms and fault location and troubleshooting, thereby effectively improving the efficiency of operation and maintenance personnel in operation and maintenance.
[0137] As an optional implementation of the above step S140, after evaluating whether the task execution result meets the expected goal corresponding to the prompt project through the Agent in the pre-trained large language model, it is also possible to reflect on and re-execute the task parsing and decomposition steps when it does not meet the expected goal. This implementation may include:
[0138] Step S145: If the task execution result does not meet the expected goal of the prompt project, the main task is parsed from the feature matrix again through the Agent intelligent body in the pre-trained large language model, and the main task is decomposed into subtasks.
[0139] In the implementation process of the above solution, the Agent in the pre-trained large language model is used to parse and decompose planning operations, and the model tool executes task operations, so that the pre-trained large language model can automatically perform some basic operation and maintenance operations through the model tool, thereby providing the operation and maintenance personnel with the ability of an operation and maintenance assistant.
[0140] Optionally, in addition to being used to build and update the vector database as described below, the above airport operation and maintenance comprehensive resource library can also be used to train a multimodal model. First, airport operation and maintenance materials, airport operation and maintenance knowledge electronic manuals, airport hardware and software equipment electronic manuals, airport equipment parameter instructions, airport operation and maintenance system manuals, airport operation and maintenance basic knowledge bases, basic operation and maintenance tool API instructions, equipment operation images and / or equipment operation videos, and other materials can be parsed from the airport operation and maintenance comprehensive resource library. Then, the materials parsed from the airport operation and maintenance comprehensive resource library are sorted, cleaned, and reconstructed to obtain the reconstructed airport operation and maintenance professional knowledge training data. Finally, the multimodal model is fine-tuned using the reconstructed airport operation and maintenance professional knowledge training data. Specifically, the pre-trained large language model in the multimodal model can be used as the base model first, and then the weight parameters, image visual encoder and video visual encoder of the base model are frozen, and only the projection matrix in the multimodal model (i.e., the weight matrix of the mapping network in the feature extraction network) is fine-tuned. The base model here can be selected from the Qwen-VL series, ChatGLM series, ChatGPT series, Llama series, MOSS-SFT, etc. This training strategy enables the multimodal model to effectively capture visual information without causing any obvious damage to the performance of the pre-trained large language model (LLM). Finally, the multimodal model is fine-tuned as a whole model to obtain the trained multimodal model. Specifically, a mixed airport operation and maintenance data set containing pictures and videos can be used to fine-tune the multimodal model with all parameters, so as to achieve a complete understanding of a large number of instructions and generate more natural and reliable outputs.
[0141] It is understandable that the above-mentioned airport operation and maintenance comprehensive resource library can be used to fine-tune the base model. Therefore, the airport operation and maintenance comprehensive resource library is also called a fine-tuning training data set, and the fine-tuning training data set can add customized company-built airport operation and maintenance knowledge data. These company-built airport operation and maintenance knowledge data can be formed by professionals sorting and manually annotating airport operation and maintenance database documents. After the multimodal model is fine-tuned and trained by the above-mentioned airport operation and maintenance comprehensive resource library, the fine-tuned multimodal model not only has the general knowledge ability of the large model, but also has the professional knowledge ability in the airport operation and maintenance scenario.
[0142] See also Figure 4 The structure diagram of the human-computer interaction device provided in the embodiment of the present application is shown; the embodiment of the present application provides a human-computer interaction device 200, including:
[0143] The media data processing module 210 is used to determine a target instruction according to the problem multimedia data to be processed, and to determine context data corresponding to the problem multimedia data.
[0144] The prompt text construction module 220 is used to construct a prompt project according to the question multimedia data, the target instruction and the context data.
[0145] The feature matrix acquisition module 230 is used to extract features from text data, image data and / or video data in the prompt project using a feature extraction network in the multimodal model to obtain a feature matrix.
[0146] The answer text returning module 240 is used to input the feature matrix into the pre-trained large language model in the multimodal model, so that the pre-trained large language model returns the answer data corresponding to the question multimedia data.
[0147] As an optional implementation of the above device, the media data processing module includes:
[0148] The question category determination submodule is used to determine the question category of the question multimedia data according to the question text in the question multimedia data.
[0149] The model instruction search submodule is used to search for the model instruction corresponding to the problem category in the category instruction library, and determine the model instruction corresponding to the problem category as the target instruction. The category instruction library stores the correspondence between the problem category and the model instruction.
[0150] As an optional implementation of the above device, the media data processing module includes:
[0151] The semantic retrieval submodule is used to perform semantic retrieval on the problem multimedia data using the knowledge block vectors in the vector database to obtain semantic retrieval results.
[0152] The keyword search submodule is used to use the knowledge blocks in the vector database to perform keyword search on the problem multimedia data and obtain keyword search results.
[0153] The context determination submodule is used to determine the context data corresponding to the problem multimedia data according to the semantic retrieval results and the keyword retrieval results.
[0154] As an optional implementation of the above device, the semantic retrieval submodule includes:
[0155] The media data conversion unit is used to convert the problem multimedia data into a semantic matrix vector.
[0156] The first set retrieval unit is used to retrieve a first knowledge block set whose semantic distance between the knowledge block vector and the semantic matrix vector is less than a preset distance in the vector database, and the vector database stores the corresponding relationship between the knowledge block and the knowledge block vector.
[0157] The semantic result determination unit is used to determine the first knowledge block set as a semantic retrieval result.
[0158] As an optional implementation of the above device, the keyword search submodule includes:
[0159] The matrix-vector conversion module is used to extract keywords from the problem multimedia data.
[0160] The second set retrieval unit is used to retrieve the second knowledge block set with the highest matching hit rate with the keyword in the vector database.
[0161] The keyword result determination unit is used to determine the second knowledge block set as the keyword search result.
[0162] As an optional implementation of the above device, it also includes:
[0163] The operation and maintenance document acquisition module is used to obtain the airport operation and maintenance comprehensive resource library, which includes: multiple operation and maintenance materials.
[0164] The knowledge block acquisition module is used to block each of the multiple operation and maintenance materials to obtain multiple knowledge blocks.
[0165] The block vector obtaining module is used to perform vectorization processing on each knowledge block in the multiple knowledge blocks to obtain multiple knowledge block vectors.
[0166] The block vector storage module is used to store each knowledge block in the multiple knowledge blocks and the knowledge block vector corresponding to the knowledge block in the vector database.
[0167] As an optional implementation manner of the above device, the context determination submodule includes:
[0168] The retrieval result fusion unit is used to fuse the semantic retrieval results and the keyword retrieval results to obtain fused retrieval results.
[0169] The result de-duplication and sorting unit is used to deduplicate and sort the fusion search results to obtain de-duplication and sorted search results.
[0170] The context data determination unit is used to determine the context data corresponding to the problem multimedia data according to the search results after de-repeating and sorting.
[0171] As an optional implementation manner of the above device, the result de-duplication sorting unit includes:
[0172] The knowledge block deduplication subunit is used to deduplicate multiple knowledge blocks in the fusion search result according to the block identifiers of the knowledge blocks to obtain multiple knowledge blocks after deduplication.
[0173] The correlation coefficient calculation subunit is used to encode the question multimedia data, obtain the question feature vector, and calculate the correlation coefficient between the question feature vector and each knowledge block in the multiple knowledge blocks after deduplication.
[0174] The knowledge block sorting subunit is used to sort the multiple knowledge blocks after deduplication according to the correlation coefficient to obtain the deduplication sorted retrieval results.
[0175] As an optional implementation of the above device, the prompt text construction module includes:
[0176] The prompt template determination submodule is used to determine the prompt template according to the question multimedia data.
[0177] The prompt template filling submodule is used to fill the question multimedia data, target instructions and context data into the prompt template to obtain the prompt project.
[0178] As an optional implementation of the above device, the feature matrix includes: a text feature matrix and a mapping feature matrix, the feature extraction network includes: a text encoder, an image visual encoder, a video visual encoder, a feature space merging module and a mapping network; the feature matrix acquisition module includes:
[0179] A text feature extraction submodule, used to use the text encoder to perform feature extraction on the text data to obtain the text feature matrix;
[0180] and / or, an image feature extraction submodule, for extracting image features from image data using an image visual encoder;
[0181] A feature extraction and clustering submodule, used for extracting video features from video data using a video visual encoder, and clustering and grouping the video features to obtain at least one event feature, wherein the image visual encoder and the video visual encoder share weight parameters;
[0182] A feature space merging submodule, used to use multiple feature space merging modules to perform multi-layer feature space merging on image features and at least one event feature to obtain multi-layer semantic features;
[0183] The feature network mapping submodule is used to perform network mapping on multi-layer semantic features using the mapping network to obtain a mapping feature matrix.
[0184] As an optional implementation of the above device, the answer text returning module includes:
[0185] The task planning decomposition submodule is used to parse the main task from the feature matrix through the Agent in the pre-trained large language model, and decompose the main task into subtasks.
[0186] The model task execution submodule is used to execute subtasks through the model tools in the pre-trained large language model to obtain task execution results.
[0187] The execution result evaluation submodule is used to evaluate whether the task execution result meets the expected goal corresponding to the prompt project through the Agent intelligent body in the pre-trained large language model.
[0188] The answer text determination submodule is used to determine the task execution result as the answer data corresponding to the question multimedia data if the task execution result meets the expected goal corresponding to the prompt project.
[0189] As an optional implementation of the above device, the answer text returning module further includes:
[0190] The task re-planning sub-module is used to parse the main tasks from the feature matrix again through the Agent intelligent body in the pre-trained large language model if the task execution result does not meet the expected goal of the prompt project.
[0191] It should be understood that the device corresponds to the above-mentioned human-computer interaction method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be found in the above description, and the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.
[0192] See also Figure 5 The electronic device 300 provided in the embodiment of the present application includes: a processor 310 and a memory 320, wherein the memory 320 stores machine-readable instructions executable by the processor 310, and when the machine-readable instructions are executed by the processor 310, the above method is executed.
[0193] The embodiment of the present application also provides a computer-readable storage medium 330, on which a computer program is stored, and the computer program is executed by the processor 310 to execute the above method. The computer-readable storage medium 330 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or optical disk.
[0194] The embodiment of the present application also provides a computer program product, including: a computer program or a computer instruction, and the computer program or the computer instruction executes the method described above when executed by a processor.
[0195] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0196] In several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code includes one or more executable instructions for implementing a specified logical function.
[0197] In addition, each functional module of each embodiment in the embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. In addition, in the description of this specification, the description of reference terms "one embodiment", "some embodiments", "example", "specific example", "some examples", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present application. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradiction.
[0198] The above description is only an optional implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.
Claims
1. A human-computer interaction method, It is characterized in that include: Determining a target instruction according to the problem multimedia data to be processed, and determining context data corresponding to the problem multimedia data; Constructing a prompting project according to the problem multimedia data, the target instruction and the context data; Using a feature extraction network in a multimodal model to extract features from text data, image data and / or video data in the prompt project to obtain a feature matrix; Inputting the feature matrix into a pre-trained large language model in the multimodal model, so that the pre-trained large language model returns answer data corresponding to the question multimedia data; Among them, determining the context data corresponding to the problem multimedia data includes: using the knowledge block vectors in the vector database to perform semantic retrieval on the problem multimedia data to obtain semantic retrieval results; using the knowledge blocks in the vector database to perform keyword retrieval on the problem multimedia data to obtain keyword retrieval results; determining the context data corresponding to the problem multimedia data based on the semantic retrieval results and the keyword retrieval results.
2. The method according to claim 1, It is characterized in that The step of determining the target instruction according to the problem multimedia data to be processed includes: Determining the question category of the question multimedia data according to the question text in the question multimedia data; The model instruction corresponding to the problem category is searched in a category instruction library, and the model instruction corresponding to the problem category is determined as the target instruction. The category instruction library stores the correspondence between the problem category and the model instruction.
3. The method according to claim 1, It is characterized in that Also includes: Acquire an airport operation and maintenance comprehensive resource library, wherein the airport operation and maintenance comprehensive resource library includes: a plurality of operation and maintenance materials; For each of the plurality of operation and maintenance materials, the operation and maintenance material is divided into blocks to obtain a plurality of knowledge blocks; For each knowledge block in the plurality of knowledge blocks, vectorization processing is performed on the knowledge block to obtain a plurality of knowledge block vectors; Each knowledge block in the plurality of knowledge blocks and the knowledge block vector corresponding to the knowledge block are stored in the vector database.
4. The method according to claim 1, It is characterized in that The determining of the context data corresponding to the question multimedia data according to the semantic search result and the keyword search result includes: Fusing the semantic search result and the keyword search result to obtain a fused search result; De-duplicating and sorting the fusion search results to obtain de-duplicated and sorted search results; The context data corresponding to the problem multimedia data is determined according to the search results after de-duplication and sorting.
5. The method according to claim 4, It is characterized in that The deduplication and sorting of the fusion search results includes: Deduplication of the multiple knowledge blocks in the fusion search result is performed according to the block identifiers of the knowledge blocks to obtain multiple knowledge blocks after deduplication; Encoding the problem multimedia data to obtain a problem feature vector, and calculating a correlation coefficient between the problem feature vector and each of the multiple knowledge blocks after deduplication; The multiple knowledge blocks after deduplication are sorted according to the correlation coefficient to obtain the deduplication-sorted retrieval results.
6. The method according to claim 1, It is characterized in that The step of constructing a prompting project according to the problem multimedia data, the target instruction and the context data comprises: Determine a prompt template according to the question multimedia data; The question multimedia data, the target instruction and the context data are filled into the prompt template to obtain the prompt project.
7. The method according to claim 1, It is characterized in that The feature matrix includes: a text feature matrix and / or a mapping feature matrix, the feature extraction network includes: a text encoder, an image vision encoder, a video vision encoder, a feature space merging module and a mapping network; the feature extraction network in the multimodal model is used to extract features from the text data, picture data and / or video data in the prompt project, including: Using the text encoder to extract features from the text data to obtain the text feature matrix; and / or, Extracting image features from the image data using the image visual encoder; Extracting video features from the video data using the video vision encoder, and clustering and grouping the video features to obtain at least one event feature, wherein the image vision encoder and the video vision encoder share weight parameters; Using a plurality of the feature space merging modules to perform multi-layer feature space merging on the image feature and the at least one event feature to obtain multi-layer semantic features; The mapping network is used to perform network mapping on the multi-layer semantic features to obtain the mapping feature matrix.
8. The method according to claim 1, It is characterized in that The step of inputting the feature matrix into a pre-trained large language model in the multimodal model comprises: Parsing the main task from the feature matrix through the Agent in the pre-trained large language model, and decomposing the main task into subtasks; Execute the subtask by using the model tool in the pre-trained large language model to obtain a task execution result; Using the Agent in the pre-trained large language model, evaluating whether the task execution result meets the expected goal corresponding to the prompt project; If the task execution result meets the expected goal corresponding to the prompt project, the task execution result is determined as the answer data corresponding to the question multimedia data.
9. The method according to claim 8, It is characterized in that After evaluating whether the task execution result meets the expected goal corresponding to the prompt project by the Agent in the pre-trained large language model, the method further includes: If the task execution result does not meet the expected goal corresponding to the prompt project, the main task is parsed out from the feature matrix again through the Agent intelligent body in the pre-trained large language model.
10. A human-computer interaction device, It is characterized in that include: A media data processing module, used to determine a target instruction according to the problem multimedia data to be processed, and to determine context data corresponding to the problem multimedia data; A prompt text construction module, used for constructing a prompt project according to the question multimedia data, the target instruction and the context data; A feature matrix acquisition module, used to extract features from text data, image data and / or video data in the prompt project using a feature extraction network in a multimodal model to obtain a feature matrix; An answer text returning module, used for inputting the feature matrix into a pre-trained large language model in the multimodal model, so that the pre-trained large language model returns answer data corresponding to the question multimedia data; Among them, determining the context data corresponding to the problem multimedia data includes: using the knowledge block vectors in the vector database to perform semantic retrieval on the problem multimedia data to obtain semantic retrieval results; using the knowledge blocks in the vector database to perform keyword retrieval on the problem multimedia data to obtain keyword retrieval results; determining the context data corresponding to the problem multimedia data based on the semantic retrieval results and the keyword retrieval results.
11. An electronic device, It is characterized in that include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the machine-readable instructions are executed by the processor to perform any method according to claims 1 to 9.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is executed.
13. A computer program product, It is characterized in that include: A computer program or a computer instruction, wherein when the computer program or the computer instruction is executed by a processor, the method according to any one of claims 1 to 9 is executed.
