Intelligent question and answer method and system, medium, equipment and program product
By adopting a multi-level database architecture and a large language model on industrial production lines, the problems of low query efficiency and difficulty in data integration in existing intelligent question answering methods have been solved, achieving efficient and accurate information acquisition and improved user experience.
Patent Information
- Application Number
- CN202511078699.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-12-30
AI Technical Summary
Existing intelligent question answering methods suffer from low query efficiency and accuracy on industrial production lines, struggle to effectively integrate multimodal data, and lack in-depth analysis capabilities, resulting in a poor user experience.
A multi-level database architecture is adopted. The first database stores text data and its semantic representation, and the second database stores structured data. When semantic representation matching fails, the system switches to structured query and combines a large language model to generate answers, thus optimizing the query process.
It improves query efficiency and accuracy, reduces user waiting time, enhances user experience, and can quickly integrate and intelligently extract data from different modalities to meet the query needs of complex problems.
Smart Images

Figure CN121233705A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to intelligent question answering methods and systems, media, devices and program products. Background Technology
[0002] With the rapid development of modern manufacturing, especially in the automotive industry, the complexity of industrial production lines and the volume of data generated are constantly increasing. Industrial production lines typically involve multiple pieces of equipment and processes, as well as a large amount of data. The effective management and application of this data has become crucial for improving production efficiency and equipment reliability.
[0003] Current intelligent question-answering methods or systems primarily rely on knowledge bases for dictionary matching to obtain answers that correspond to the user's query. Furthermore, in practical applications, these methods or systems suffer from long query response times, and the relevance and accuracy of the query results need improvement.
[0004] Based on this, embodiments of this application provide intelligent question-answering methods and systems, media, devices, and program products to improve related technologies. Summary of the Invention
[0005] The purpose of this application is to provide intelligent question-answering methods, systems, media, devices, and program products to improve the efficiency and accuracy of question answering.
[0006] The objective of this application embodiment is achieved using the following technical solutions:
[0007] In a first aspect, embodiments of this application provide an intelligent question-answering method. The method includes: parsing query information into a corresponding first semantic representation; if a match using the first semantic representation fails in a first database, converting the query information into a structured query statement; wherein the first database is used to store text data of an industrial production line and a second semantic representation of the text data; querying a second database using the converted structured query statement; wherein the second database is used to store structured data generated by the industrial production line; and generating an answer based on the queried structured data.
[0008] In some possible implementations, the method further includes: generating an answer based on the matched text data if a match is successfully found in the first database using the first semantic representation.
[0009] In some possible implementations, the method further includes: generating an answer based on the query information using a large language model when the query fails to be retrieved from the second database using the structured query statement obtained from the transformation.
[0010] In some possible implementations, the industrial production line is a production line with welding capabilities.
[0011] In some possible implementations, the first semantic representation is a first vector, and the second semantic representation is a second vector; wherein, the process of matching using the first semantic representation in the first database includes: calculating the similarity value between the first vector and the second vector; if the similarity value exceeds a preset threshold, determining that the match is successful; or, if the similarity value does not exceed the preset threshold, determining that the match is unsuccessful.
[0012] In some possible implementations, the first database is further used to store the address of the multimodal data corresponding to the text data in the third database; the third database is used to store the multimodal data corresponding to the text data; wherein, generating an answer based on the matched text data includes: obtaining the corresponding multimodal data from the third database based on the address corresponding to the matched text data; and using the corresponding multimodal data and / or the matched text data as the answer.
[0013] In some possible implementations, converting the query information into a structured query statement includes: generating the structured query statement based on the query information, guided by a prompt word template; wherein the prompt word template is constructed based on the table structure of the second database.
[0014] In some possible implementations, the prompt word template includes at least one of the following elements: role instructions, database metadata, data processing rules, and query statement generation specifications; wherein, the role instructions are used to indicate the role or responsibility that the query needs to assume; the database metadata is used to indicate the table structure; the data processing rules are used to define the business logic constraints that the process of generating the structured query statement needs to follow; and the query statement generation specifications are used to indicate the set of format requirements and syntax rules that the structured query statement needs to comply with.
[0015] In some possible implementations, generating an answer based on the retrieved structured data includes: generating a corresponding text description based on the retrieved structured data; converting the structured data into a visual chart; and using the text description and / or the visual chart as the answer.
[0016] In some possible implementations, the method further includes: outputting the generated answer in a streaming manner.
[0017] Secondly, embodiments of this application provide an intelligent question-answering system, comprising: a preprocessing module for parsing query information into a corresponding first semantic representation; a query module for converting the query information into a structured query statement when a match using the first semantic representation fails in a first database; querying a second database using the converted structured query statement; and generating an answer based on the queried structured data; wherein the first database is used to store text data of an industrial production line and a second semantic representation of the text data, and the second database is used to store structured data generated by the industrial production line.
[0018] In some possible implementations, a matching module is also included, which generates an answer based on the matched text data if a match is successfully found in the first database using the first semantic representation.
[0019] Some possible implementations also include: a free generation module, used to generate an answer based on the query information using a large language model when the query using the transformed structured query statement fails to be retrieved in the second database.
[0020] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods described above.
[0021] Fourthly, embodiments of this application provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement any of the methods described above.
[0022] Fifthly, embodiments of this application provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements any of the methods described above.
[0023] This application provides an intelligent question-answering method, system, medium, device, and program product. It parses query information into a corresponding first semantic representation. If a match using the first semantic representation fails in a first database, the query information is converted into a structured query statement. The first database stores text data from industrial production lines and a second semantic representation of that text data. The converted structured query statement is used to query the second database. An answer is generated based on the retrieved structured data. In other words, by introducing semantic representation, the user's query intent can be accurately understood, and the corresponding data can be quickly located, improving the long latency issue in matching methods. Furthermore, since the second database stores structured data generated by industrial production lines, if a match using the first semantic representation fails in the first database, a query can be quickly performed through the second database, and an answer can be generated based on the retrieved structured data. This optimizes the query process, improves response speed and query accuracy, reduces user waiting time during information retrieval, and improves query efficiency. Attached Figure Description
[0024] The embodiments of this application are further described below with reference to the accompanying drawings and specific implementation details.
[0025] Figure 1 This is a flowchart illustrating an intelligent question-answering method provided in an embodiment of this application.
[0026] Figure 2 This is a flowchart illustrating another intelligent question-answering method provided in an embodiment of this application.
[0027] Figure 3 This is a flowchart illustrating another intelligent question-answering method provided in the embodiments of this application.
[0028] Figure 4 This is a flowchart illustrating a prompt word template provided in an embodiment of this application.
[0029] Figure 5 This is a schematic diagram of a module of an intelligent question-and-answer system provided in an embodiment of this application.
[0030] Figure 6 This is a schematic diagram of another intelligent question-answering system provided in the embodiments of this application.
[0031] Figure 7 This is a schematic diagram of another intelligent question-answering system provided in the embodiments of this application.
[0032] Figure 8 This is a structural block diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the embodiments of this application.
[0034] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0035] With the continuous development of intelligent manufacturing, industrial production lines, especially welding production lines, face the generation and management of a large amount of multimodal data. This data includes equipment fault maintenance information, product manuals, production process monitoring data, etc. However, different types of data are often scattered across multiple systems, leading to difficulties in data integration and inefficient utilization. How to effectively utilize this data to provide users with convenient information query and retrieval services is an important direction for current industrial intelligence.
[0036] Currently, while intelligent question-answering methods and systems have been applied across various fields, effective solutions for intelligent processing and querying of multimodal data remain lacking in specific industrial scenarios, such as automotive welding production lines. Most existing methods and systems focus on text-based question answering or structured data querying, failing to comprehensively integrate different types of data. Furthermore, they exhibit slow response times to user queries and insufficient analytical depth. In addition, although some intelligent question-answering methods and systems utilize large language models for semantic understanding, their implementation often lacks an effective framework for combining semantic representation with intelligent structured querying. In other words, these methods and systems suffer from insufficient data processing capabilities, making it difficult to centrally manage and intelligently extract data from different modalities. Moreover, multiple interactions and multi-party queries are required during user queries, resulting in low query efficiency and a poor user experience. Furthermore, the lack of in-depth analytical capabilities specific to industrial scenarios prevents them from meeting the demands of solving complex problems.
[0037] Therefore, embodiments of this application focus on storing text data and its semantic representation in a first database for easy text matching, while using a second database to store structured data to support different query methods. When text matching fails, the system can quickly switch to structured queries, optimizing the query process and improving overall response speed. Structured queries can quickly generate the information needed by the user, reducing waiting time during information retrieval. This mechanism not only improves query efficiency but also enhances the user experience.
[0038] See Figure 1 , Figure 1 This is a flowchart illustrating an intelligent question-answering method provided in an embodiment of this application.
[0039] To address the issues of low query efficiency and low accuracy in existing methods, this application proposes an intelligent question-answering method. See [link to relevant documentation]. Figure 1 The method includes steps S100 to S400.
[0040] Step S100: Parse the query information into the corresponding first semantic representation.
[0041] Step S200: If a match fails to be found in the first database using the first semantic representation, the query information is converted into a structured query statement. The first database stores text data of the industrial production line and the second semantic representation of the text data.
[0042] Step S300: Use the transformed structured query statement to perform a query in the second database. The second database stores structured data generated by the industrial production line.
[0043] Step S400: Generate an answer based on the retrieved structured data.
[0044] In some embodiments, the query information may refer to a request or question entered by the user. The query information may include requests for equipment malfunction assistance, production data inquiries, or operational instructions. Users can enter the query information via natural language text or voice. For example, the query information could be "What does 208 represent?"
[0045] Understandably, query information is the starting point for user interaction with a system (such as an intelligent question-answering system). The system can identify user needs through query information. Query information provides specific data input for subsequent semantic representation and information retrieval. Query information is a crucial basis for the system to process user requests.
[0046] In some embodiments, the first semantic representation may refer to parsing the user's query information into computable data using a specified algorithm or model. This process may involve natural language processing techniques, such as word embedding methods. Those skilled in the art can determine the specified algorithm or model required for parsing according to the actual needs of the scenario, and no specific limitations are imposed here.
[0047] Understandably, the query information, as a user input request, provides the system with a processing baseline. The query information can be converted into a first semantic representation. This first semantic representation can effectively capture the user's intent and match it with the database content within the system. Through this processing flow, not only can the system more accurately understand the user's true needs, but it can also significantly improve the efficiency and accuracy of information retrieval.
[0048] In some embodiments, the above matching may refer to comparing and retrieving the corresponding first semantic representation with data in a first database to find whether there is relevant information that matches the user's query intent. The matching process may be based on similarity calculation to determine the data that is closest to the user's query intent. For example, if the user's query information is converted into a first semantic representation of [0.23, 0.67, ...], it can be compared with the semantic representations of various texts stored in the first database. For example, if a semantic representation of [0.23, 0.65, ...] is found, and the similarity between the two is high, then the text is considered to be relevant to the user's query information.
[0049] Understandably, matching confirms whether the text data stored in the database matches the user's query intent. Through a fast matching process, users can quickly obtain the information they need, reducing search time.
[0050] In some embodiments, a first database can be used to store text data related to an industrial production line and its corresponding second semantic representation. The first database can be a storage system. The text data of the industrial production line can refer to records related to the production process, equipment operation, and troubleshooting. The text data can be in plain text form or semi-structured form. The text data can provide users with professional, real-time text information, helping them receive support in operation, maintenance, and troubleshooting. Through proper storage and matching, this text data will provide rich foundational material for subsequent intelligent processing. For example, troubleshooting-related text data could be "the fault description of equipment fault code 209 is insufficient air pressure." Text data related to the industrial production line can include one or more of the following: operation manuals, fault records, equipment instructions, production process data, etc. Those skilled in the art can determine the specific types of text data for the industrial production line according to actual needs; no specific limitations are imposed here. The first database can store text data related to a specified industrial production line and its semantic representation, thereby facilitating centralized retrieval and management.
[0051] In some embodiments, the first database may be the vector knowledge base Milvus. Milvus is an open-source vector database specifically designed for processing and managing large-scale vector data. It can efficiently store, retrieve, and manage high-dimensional vectors and is widely used in fields such as machine learning, deep learning, and artificial intelligence. Those skilled in the art may also use other databases as the first database according to actual needs.
[0052] In some embodiments, the second semantic representation may refer to a computable data form converted from text data in the first database using a specific algorithm or model. The second semantic representation can be used for semantic matching. Matching in the first database can be achieved by directly comparing query information with text data in the first database to determine if they are identical. Alternatively, Boolean logic-based conditional matching can be used, such as combining multiple query conditions to improve matching accuracy and derive a dataset that meets the conditions. Furthermore, deep learning models that preserve contextual information can be used to generate embeddings of queries and documents, and these embeddings can be compared to obtain a deeper level of semantic matching, thus deriving a dataset that meets the conditions. Those skilled in the art can determine the specific form of the semantic representation and the specific matching method according to the actual needs of the scenario; no specific limitations are imposed here.
[0053] In some embodiments, a structured query statement can refer to a text command written using a specific query language. Structured query statements can be used to retrieve, insert, update, or delete data in a relevant database. The specific query language mentioned above can be SQL (Structured Query Language). Those skilled in the art can also determine the specific query language mentioned above, and no specific limitation is made here. Structured query statements can be used to retrieve specific information from structured data storage (such as relational databases).
[0054] For example, suppose a user inputs the query "Query the workstation table and count the production beats for different vehicle models". This query needs to be converted into a structured query statement to retrieve relevant data in a second database. The following is a general process for retrieving relevant data in the second database. First, it's necessary to analyze the user's query intent based on the query information, identifying the keywords and related fields to be retrieved, such as "workstation table", "vehicle model", and "production beat". Second, construct the structured query statement. For example, a corresponding large model can be used to construct the structured query statement. The structured query statement can include one or more keywords such as SELECT, FROM, and WHERE. For example, the structured query statement obtained using the query information could be "SELECT vehicle_value, COUNT(DISTINCT produce_beat) AS cnt_produce_beat FROM dw.DWD_EFFICIENCY_STATION_CYCLE_I_RT GROUP BY vehicle_value". Here, "SELECT vehicle_value, COUNT(DISTINCT produce_beat) AS cnt_produce_beat" specifies the fields to be extracted (such as the vehicle model and the production beat count). "FROMdw.DWD_EFFICIENCY_STATION_CYCLE_I_RT" specifies the database table from which the data originates. "GROUP BY vehicle_value" is used to statistically analyze the production cycle time for different vehicle models. Third, execute the query. This involves using the generated structured query statement to query the second database and retrieve the relevant data.
[0055] Understandably, the step of "converting query information into structured query statements" is a crucial one. It transforms the query information into a format that the database (such as a secondary database) can understand, thereby enabling efficient searching and extraction of the required information from the secondary database. This step not only improves the accuracy and efficiency of data retrieval but also enhances the user experience. Structured query statements allow for efficient and rapid retrieval of desired information from large databases. Furthermore, structured query statements can be used not only for querying but also for performing data insertion, update, and deletion operations, enabling data management within the database. They allow users to generate reports, statistics, and comparative analyses based on real-time data, enhancing the flexibility and depth of data utilization.
[0056] In some embodiments, the second database may refer to a specific database. The second database may store structured data generated by the industrial production line. This structured data may originate from production process monitoring, equipment status, process records, etc. The structured data may include the operating status of the production line, production efficiency, workstation information, etc.
[0057] In some embodiments, the second database may be the columnar database ClickHouse. ClickHouse is an open-source columnar database management system specifically designed for high-performance online analytical processing scenarios. Those skilled in the art may also use other databases as the second database according to actual needs.
[0058] Understandably, a second database can effectively centralize and manage rich, structured data. It can provide a data foundation for decision support and production scheduling. Through its structured storage format, the second database can efficiently respond to data retrieval requests using query languages such as Structured Query Language (SCL). It can provide fundamental data support and be used to generate various statistical reports and data analyses, helping to improve production efficiency and quality.
[0059] In some embodiments, a query can refer to retrieving data from a database through a specific request (such as a structured query language). A query can also refer to updating or deleting data in a database through a specific request. Querying allows for related data analysis, such as statistics and summarization, to help users understand the meaning behind the data. Querying in a second database can generally follow a similar process. For example, suppose there is a table named `Production_Data` in the second database. This table stores detailed information about each workstation on the production line, which may include one or more of the following: workstation number, vehicle model, production cycle time, and equipment status. First, the query information is converted into a structured query statement. For example, the structured query statement obtained from the query information "Query the production cycle time of a certain vehicle model" would be "SELECT production_beat FROM Production_Data WHERE vehicle_type = 'ModelX'". Second, the query is executed in the second database. For example, this structured query statement "EXECUTE SELECT production_beat FROM Production_Data WHERE vehicle_type = 'ModelX'" can be executed in the second database using database connection technology or similar methods. Third, the second database returns all results that meet the query conditions. Suppose the query results are "production takt time, 45000, 46000, 47000". These data represent the production takt time of the "Model X" vehicle under different production environments.
[0060] Understandably, the advantage of querying a second database lies in leveraging its efficient data management and responsiveness, enabling users to easily obtain the information they need, thereby supporting production decisions and process optimization. Through such queries, users can quickly understand the dynamics of the production process and make corresponding adjustments and optimizations.
[0061] It is understandable that the text data in the first database can exist in text form, such as plain text, semi-structured text, or processed text information. This text data can be used for semantic understanding, natural language processing, and other scenarios. For example, the text data may include equipment fault descriptions, product specifications, etc. This text data is mostly unstructured or semi-structured, offering a degree of flexibility. In contrast, the structured data in the second database follows a strict structured format, typically existing in tabular form. This structured data has clearly defined fields (columns) and records (rows). Each field usually has a fixed data type, such as integer, text, date, etc. This structured data is typically used to store real-time changing data, such as production line status, specific statistical data, etc. This structured data can be queried and analyzed quickly and efficiently using query languages such as Structured Query Language (SCL). In other words, text data is usually in natural language form. Understanding and processing text data relies on natural language processing technology. Text data focuses more on semantic analysis and extraction. Structured data, on the other hand, appears in tabular form. The processing of structured data is often closely linked to the specific data architecture. Text data is suitable for free-form queries. Users can express their needs using natural language. Structured data is suitable for scenarios requiring quantitative analysis, statistics, or rapid queries, such as obtaining specific production data or status information.
[0062] Understandably, the first database is primarily used for processing natural language data, focusing on semantic understanding and information extraction. The second database, on the other hand, is used to store and manage structured data. The second database allows for fast and convenient querying and analysis. By combining the advantages of both databases, this method can more comprehensively meet users' information retrieval needs.
[0063] In some embodiments, if the query is successful, the retrieved structured data can be used directly as the answer.
[0064] As can be seen from the above embodiments, this method, by introducing semantic representations (such as a first semantic representation), can accurately understand the user's query intent and quickly locate the corresponding data, improving the latency and complexity issues present in related methods during matching. This improves the speed and accuracy of information retrieval, reduces user operation steps, and enhances the user experience. Furthermore, due to the adoption of a multi-layered database architecture, such as designing a first database and a second database, the first database focuses on storing text data and its semantic representation, facilitating direct text matching. The second database stores structured data, supporting different query methods. When matching fails using the first semantic representation in the first database, it can quickly switch to structured queries, optimizing the query process and improving the overall response speed. Whether through text matching or structured queries, the information needed by the user can be quickly generated, reducing the user's waiting time during information retrieval. This mechanism not only improves query efficiency but also enhances the user experience. In other words, this method can quickly find the required information in different types of data through semantic representation transformation and intelligent matching mechanisms, improving query efficiency. It can effectively integrate and intelligently extract data from different databases, improving the problem of data silos in related methods. The simplified user query process and faster feedback enhance the user experience, making information retrieval more intuitive and convenient. In summary, through semantic representation transformation and a multi-layered database, the multimodal data management challenges and query efficiency issues inherent in related methods or systems are effectively addressed, thereby improving overall intelligent question-answering capabilities.
[0065] See Figure 2 , Figure 2 This is a flowchart illustrating another intelligent question-answering method provided in an embodiment of this application.
[0066] In some embodiments, see Figure 2 The method may include steps S100 to S400 and S500.
[0067] Step S500: If a match is successfully found in the first database using the first semantic representation, an answer is generated based on the matched text data.
[0068] In some embodiments, the matched text data can be directly used as the answer. That is, when a match is successful, the information needed by the user can be quickly generated through text matching, reducing the user's waiting time in the information retrieval process.
[0069] It is understandable that step S500 can be located after step S100 and before step S200.
[0070] In some embodiments, a successful match may mean finding the corresponding text data or its semantic representation in the first database based on the query information entered by the user, and confirming the consistency or relevance between the two.
[0071] In some embodiments, successful conversion may mean that the input query information is successfully converted into a structured query statement in a specific format, so that the query statement can be understood and executed by the database system.
[0072] In some embodiments, a successful query can mean that the database system is able to successfully execute the structured query statement and return the requested dataset, and that the dataset satisfies the user's query intent.
[0073] See Figure 3 , Figure 3 This is a flowchart illustrating another intelligent question-answering method provided in the embodiments of this application.
[0074] When the relevant methods fail to provide a query, they lack effective alternatives, making it difficult for users to obtain any useful information. To address this lack of effective alternatives, some embodiments refer to... Figure 3 The method may include steps S100 to S400 and S600.
[0075] Step S600: If the query fails in the second database using the structured query statement obtained from the transformation, generate an answer based on the query information using the large language model.
[0076] It is understandable that step S600 can be located after step S300.
[0077] In some embodiments, large language models can be based on deep learning techniques, particularly deep neural network models in the field of natural language processing. These large language models, after being trained on large-scale data, are capable of understanding and generating natural language text. For example, large language models can be generative pre-trained transformer (GPT) models, bidirectional encoder representations from transformers (BERT), etc. Those skilled in the art can determine the specific type of the aforementioned large language model according to the actual needs of the scenario; no specific limitations are imposed here.
[0078] Understandably, large language models can analyze user-input queries, understand intent, and extract key information. Based on query information, large language models can generate rich and coherent natural language responses. Large language models ensure natural and fluent communication with users. For complex queries or queries containing multi-layered information, large language models can understand context and form more accurate answers. Large language models can improve the intelligence level of question-answering systems, enabling them to handle and answer a wider range of questions and enhance user experience.
[0079] For example, suppose a user enters the query "Please provide detailed information about welding equipment failure types." An attempt can be made to execute a query in the aforementioned second database based on this information, but a valid response may not be obtained due to insufficient data or conversion failure. In the event of a failed query, a large language model can be used to help generate an answer. For instance, the user's query information can be passed to the large language model. The response generated by the large language model could be: "Common failure types of welding equipment include unstable arc, overheated weld pool, and incomplete weld penetration. Unstable arc may be caused by incorrect current settings or electrode problems. Overheated weld pool is usually caused by excessively slow welding speed or improper settings. Incomplete weld penetration may be caused by mismatched welding processes or insufficient material preparation."
[0080] For example, suppose a user inputs the query "Write a piece of Python code that uses support vector machines to classify iris data." However, a query on the first database yields no relevant answer. Therefore, a suitable large language model can be used to convert the query into a structured query statement. However, if the structured query statement does not contain the string "select," it indicates that the conversion did not generate a valid structured query statement. Afterward, the suitable large language model can be used to perform deep thinking based on the query information, and the result of this deep thinking can be used as the final answer.
[0081] Understandably, "generating answers based on query information using a large language model" refers to using a large language model to understand and process the user's query when information cannot be successfully retrieved from the first, second, and third databases, thereby generating a corresponding answer. This approach ensures that users do not encounter information gaps due to the limitations of the aforementioned databases during the information retrieval process, improving user experience and the intelligence level of the question-and-answer process. Through this mechanism, the large language model can meet users' information needs, ensure more natural and smooth interaction, and solve problems in complex situations.
[0082] As can be seen in the above embodiments, this method can generate answers based on query information using a large language model even when conversion or query failure occurs. In other words, through the deep thinking mechanism of the large language model, it can more flexibly respond to various user inputs, uncover potential needs, and thus provide diverse query results. Even for complex or uncommon queries, it can provide alternative question-and-answer paths to ensure that users still obtain valuable information.
[0083] The existing methods are insufficient in answering users' professional questions in specific industries (such as automotive welding), which can easily lead to a poor user experience. To improve the problem of insufficient answers to users' professional questions in specific industries (such as automotive welding), in some embodiments, the industrial production line can be a production line with welding capabilities.
[0084] In some embodiments, a production line with welding capabilities can refer to a specially designed and constructed industrial production line. A production line with welding capabilities can include equipment or systems for performing welding processes. It can include welding equipment, automation devices, and related control systems to automate and optimize welding operations. A production line with welding capabilities can be used to join metal parts or other materials together by heating and melting to form composite structures or complete product assembly. It can monitor and ensure the stability and consistency of the welding process, thereby improving welding quality. Such a production line can adapt to the welding requirements of different models and materials, flexibly arrange production plans, and meet market demands.
[0085] Understandably, those skilled in the art can pre-store various types of data related to a specific field (such as a production line with welding functions) in a first database, a second database, and a subsequent third database. Because the first, second, and subsequent third databases pre-store information related to that specific field, they possess a deep understanding of the industry's specialized information. When users query these databases, they can obtain answers highly relevant to their actual needs, avoiding unnecessary searches through vast amounts of data.
[0086] As can be seen, in some embodiments, this method can be specifically designed for production lines with welding functions, and its data processing capabilities are focused on the specific needs of this field, ensuring effective querying and problem handling. In other words, this method enables these databases to gain a deep understanding of industry background and data characteristics, thereby more accurately meeting users' query and information needs. This improves the professionalism and accuracy of intelligent question answering, providing users with solutions that better meet their industry requirements.
[0087] In some embodiments, the semantic representations described above (such as the first semantic representation and the second semantic representation) may also be represented using symbols or labels. Symbols may represent specific entities, attributes, or relationships. The semantic representations described above (such as the first semantic representation and the second semantic representation) may also be represented by a set of logical expressions (such as propositional logic or predicate logic). They may also be represented in tabular form or a specific structured data format. No specific limitations are placed on the specific form of the semantic representations described above.
[0088] Some related methods suffer from difficulties in fully integrating semantic representations of query information, resulting in poor information matching performance and making it difficult for users to find the corresponding answers. To improve the poor information matching performance of these methods, in some embodiments, the first semantic representation can be a first vector, and the second semantic representation can be a second vector. The process of matching using the first semantic representation in a first database may include: calculating the similarity value between the first vector and the second vector; determining a successful match if the similarity value exceeds a preset threshold; or determining a failed match if the similarity value does not exceed the preset threshold.
[0089] In some embodiments, the first vector may be a vector obtained by parsing user query information. The second vector may be a vector obtained by parsing text data in the first database. For example, the second vector may be obtained by performing natural language processing and vectorization on the text data in the first database. The second vector can effectively describe the semantic features of the text data in the first database. For example, assuming the text data in the first database is "the fault description of device fault code 210 is a power failure", its second semantic representation can be [0.4123, 0.5867, ...]. During the matching process, this second semantic representation can be used for matching.
[0090] In some embodiments, the similarity value can be a numerical value obtained by calculating the degree of similarity between a first vector and a second vector. The similarity value can be represented by a floating number. The range of the similarity value can be between [0, 1]. The similarity value can reflect the degree of proximity of two vectors (such as the first vector and the second vector) in the vector space. If the similarity value is close to 1, it indicates that the two vectors are semantically similar, and vice versa.
[0091] For example, suppose a user inputs the query "What does 208 represent?". After processing, this query is converted into a first semantic representation of [0.2, 0.8, ...]. Next, this first semantic representation can be matched against the second semantic representations of all text data in a first database. For instance, in the first database, text data 1 is "The description of fault code 208 is an ESC (Electronic System Control) safety circuit fault," and its second semantic representation is [0.25, 0.75, ...]. Text data 2 is "The description of fault code 209 is a power supply fault," and its second semantic representation is [0.3, 0.5, ...]. The similarity between the first and second semantic representations can be calculated. The similarity calculation shows that text data 1 has a high similarity to the query; therefore, text data 1 can be used as the matched text data.
[0092] For example, suppose the user inputs the query "how to solve ESC safety loop failure". The process of matching using the first semantic representation in the first database can be roughly as follows: First, convert the query information into a first vector. For example, the generated first vector can be "first vector = [0.5, 0.7, -0.3, 0.2, ...]". The second semantic representation in the first database can be predetermined. Suppose there is text data related to ESC safety loop failure, and its semantic representation corresponds to the second vector "second vector = [0.6, 0.8, -0.1, 0.25, ...]". Second, calculate the similarity value between the first vector and the second vector. The similarity value can be calculated using cosine similarity, Euclidean distance, or dot product, etc. Suppose the similarity value is "similarity value = 0.85". Third, perform a matching judgment. Assuming a preset threshold of 0.8, if the similarity value exceeds this threshold, a successful match is considered, and relevant solutions for ESC safety loop faults can be retrieved from the database; otherwise, the match is considered unsuccessful, and other processing logic may be invoked, such as querying a second database or reporting that the answer is unavailable. Those skilled in the art can adjust this preset threshold according to the actual application scenario.
[0093] Understandably, by calculating the similarity value between the first and second vectors and matching them against the first database, the system can ensure that it accurately understands the user's intent and provides relevant information. The similarity value serves as a quantitative indicator of the relationship between query information and potential answers, helping to determine the success of the match.
[0094] As can be seen, in some embodiments, this method can perform matching in a first database by calculating the similarity value between the first vector and the second vector. Since vector representation can accurately capture the semantics of query information and text data, similarity calculation can effectively find matching data, rather than relying on simple keyword comparison. This enhances the accuracy and efficiency of the matching process and increases the speed at which users obtain accurate information.
[0095] In some embodiments, the matched text data can be directly used as the answer.
[0096] The existing methods handle data types too simplistically, making it difficult to simultaneously integrate multimodal data such as text, images, and videos, thus limiting users' information access methods. To address this issue, in some embodiments, the first database can also store the addresses of the multimodal data corresponding to the text data in a third database. The third database can store the multimodal data corresponding to the text data. Generating an answer based on the matched text data may include: retrieving the corresponding multimodal data from the third database based on the address of the matched text data; and using the corresponding multimodal data and / or the matched text data as the answer.
[0097] In some embodiments, the multimodal data corresponding to text data can refer to data of other types besides text associated with the specified text information. Multimodal data can include one or more data types such as image data, video data, and audio data. Multimodal data can be used to enhance user understanding and experience. For example, for a query about a device malfunction description, text data can be one part of the answer, while the corresponding multimodal data can be another part. For instance, multimodal data can include one or more types of data, such as images of the malfunction, maintenance videos, and related audio descriptions.
[0098] In some embodiments, the address of multimodal data in the third database refers to the specific location information of the multimodal data stored in the third database. This address can be in the form of a file path, etc. Through this address, the corresponding multimodal data can be quickly accessed, providing users with more detailed and context-rich information.
[0099] In some embodiments, the third database may be a database specifically designed to store the aforementioned multimodal data. The third database complements the first database. That is, the third database can store all multimodal data related to the text data in the first database, facilitating the rapid retrieval of content that supplements or enhances the text data during query and response processes. For example, the third database could be the MinIO file system. MinIO is a high-performance open-source object storage system. It is suitable for use as object storage in private and hybrid clouds, offering high availability and high performance. Those skilled in the art may also use other databases as the third database according to actual needs.
[0100] For example, suppose a user queries "How should I handle an ESC safety loop failure?" and the matched text data in the first database is "The fault description is an ESC safety loop failure. The recommended action is to check the emergency stop button." A third database can store the addresses of multimodal data corresponding to this text data. The corresponding multimodal data is retrieved from the third database based on the address corresponding to the matched text data. For example, the matched text data can be searched, and its corresponding multimodal data address can be identified. Then, the relevant information is requested from the third database through that address. Suppose an image related to "ESC safety loop failure" is obtained, and this image file is located at the aforementioned address.
[0101] Understandably, combining the storage and retrieval of multimodal data with text data makes the answers more comprehensive and accurate. Auxiliary data can be quickly retrieved by referencing addresses in the multimodal database. This ensures that not only textual information is provided, but also other types of information such as visual and auditory data are combined to enhance the interactive experience and demonstrate a deeper level of intelligence.
[0102] As can be seen, in some embodiments, this method can ensure that after a successful match, relevant multimodal data can be extracted from a third database associated with the first database by storing the addresses of multimodal information in the first database, and the corresponding multimodal data and / or matched text data can be used as the answer. In other words, by integrating multimodal data, richer information can be provided to meet the needs of users in different contexts, giving users a better information experience. Users can also obtain more comprehensive answers, improving the flexibility and intuitiveness of information acquisition.
[0103] The existing methods suffer from insufficient standardization when generating structured query statements, which can easily lead to high complexity and error rates, increasing the risk of query failure. To address this lack of standardization, some embodiments convert query information into structured query statements, which may include: generating structured query statements based on query information, guided by a prompt word template; wherein the prompt word template is constructed based on the table structure of a second database.
[0104] In some embodiments, a prompt word template can be a structured framework for guiding and standardizing text input. The prompt word template helps the system understand the user's query intent and convert it into a structured query statement. The prompt word template may include one or more elements such as the data format required for the query information, field names, query logic, and conventions for specific query rules. The prompt word template ensures that the generated query statement conforms to the database structure and business rules, reducing the frequency of query errors caused by semantic ambiguity.
[0105] In some embodiments, the table structure of the second database refers to the organization and field definitions of the various tables in the second database. The table structure may include one or more elements such as field names, types, and descriptions. The table structure can be used to define how data is stored, linked, and accessed. By analyzing the table structure of the second database in advance and obtaining prompt word templates, the system can accurately generate structured query statements that conform to database syntax, thereby ensuring that the required data can be effectively retrieved from the database.
[0106] For example, suppose a second database stores data related to an automotive welding production line, including a table named "Production Efficiency Table." This table includes data with field names, field types, and field descriptions. Field names might include production line number, workstation number, vehicle model, and production cycle time. Suppose a user's query is "Please give me the production cycle time for all vehicle models." The prompt template could be: "You are a professional SQL analyst. Please generate a structured query statement. First, analyze whether the question involves the following database elements: table name is 'Production Efficiency Table,' fields are vehicle model and production cycle time; generate a sample structured query statement based on the query information." Then, using the prompt template, the user's query intent is identified as retrieving the production cycle time for all vehicle models. Following this, based on the prompt template and the table structure of the second database, the following structured query statement can be generated: "SELECT vehicle model, production cycle time FROM production efficiency table." This structured query statement can extract all vehicle models and their corresponding production cycle time information from the "Production Efficiency Table" to meet the user's query requirements.
[0107] Understandably, by using prompt word templates and the table structure of the second database, user query information can be effectively transformed into structured query statements. This not only improves the accuracy of database access but also optimizes the user's interactive experience.
[0108] As can be seen, in some embodiments, this method can utilize prompt word templates to guide the generation of structured query statements, thereby improving query accuracy. In other words, because the prompt word templates guide the thought process of constructing structured query statements, the generation of structured query statements can follow relevant specifications, thus improving the reliability of the final results. This reduces the risk of non-standard or ineffective generated structured query statements and ensures that the generated structured query statements meet database requirements, improving the accuracy of the response.
[0109] Figure 4 This is a flowchart illustrating a prompt word template provided in an embodiment of this application. Wherein, 1 represents a role instruction, 2 represents database metadata, 3 represents data processing rules, and 4 represents query statement generation specifications. See also... Figure 4 In some embodiments, the prompt template may include at least one of the following elements: role instruction 1, database metadata 2, data processing rules 3, and query statement generation specifications 4. Specifically, role instruction 1 indicates the role or responsibility to be undertaken in the query; database metadata 2 indicates the table structure of the second database; data processing rules 3 defines the business logic constraints to be followed in the process of generating structured query statements; and query statement generation specifications 4 represents the set of format requirements and syntax rules that structured query statements must adhere to.
[0110] In some embodiments, role instructions can refer to instructions used to clarify the roles or responsibilities that should be undertaken in the query process. By setting roles or responsibilities, user needs can be better understood, and corresponding operations can be performed according to specific roles.
[0111] In some embodiments, database metadata is used to represent table structure. Database metadata may include one or more of the following: table name, field names, data types, field descriptions, etc. Database metadata ensures the correctness and validity of structured query statements during query generation, guaranteeing that the generated structured query statements match the structure of the actual database.
[0112] In some embodiments, data processing rules are used to define the business logic constraints that the process of generating structured query statements must follow. Data processing rules may include one or more requirements such as entry filtering, data sorting, and aggregation calculations. Data processing rules ensure that the generated structured query statements are not only technically feasible but also conform to specific business needs and processes, preventing the generation of invalid or unacceptable structured query statements.
[0113] In some embodiments, query statement generation specifications represent a set of format requirements and syntax rules that structured query statements must adhere to. Query statement generation specifications can refer to the format requirements and syntax rules that must be followed during the construction of structured query statements. Query statement generation specifications may include one or more requirements such as the use of structured query keywords, the writing conventions for field names, and the expression of query conditions. Query statement generation specifications ensure that the generated structured query statements conform to the structured query syntax standard, thereby enabling them to be executed in the database and return valid results. Those skilled in the art can extend or modify the elements in the prompt word template according to actual application scenarios; no specific limitations are imposed here.
[0114] For example, suppose a user wants to query production data for an automotive welding production line. The table structure of the second database includes the following information: table name "Production Efficiency Table," fields "Production Line Number," "Workstation Number," "Car Model," and "Production Cycle Time." Combining these elements, if the user's query is "Please tell me all car models with a production cycle time exceeding 50,000 milliseconds," then the prompt template generated based on the table structure of the second database could be as follows: the role instruction is "You are an SQL analyst," and the database metadata could include: table name "Production Efficiency Table," fields "Production Line Number," "Workstation Number," "Car Model," and "Production Cycle Time." The role instruction "You are an SQL analyst" implies the need to generate a highly logical and standardized structured query statement. The data processing rule could be "Only retrieve records with a production cycle time greater than 50,000." This rule ensures that only data meeting specific business logic conditions is returned. The query statement generation specifications could be "All field names must be enclosed in backticks, the query statement must begin with 'SELECT,' end with a semicolon, and table and field names must use lowercase letters." Subsequently, based on the aforementioned prompt word template, the structured query statement generated using the relevant large language model can be "SELECT vehicle model, production cycle time FROM production efficiency table WHERE production cycle time > 50000".
[0115] For example, suppose an industrial production line uses a database (such as ClickHouse) with a table named ProductionData. This table structure can include the table name (e.g., ProductionData) and fields (e.g., production line number, workstation number, vehicle model, production cycle time, timestamp). The following general process can be used to generate structured query statements based on a prompt template. First, construct the prompt template. For example, the prompt template can be constructed based on the database table structure and application scenario. Suppose the prompt template content is as follows: "Role Instruction: You are a professional SQL analyst. Database metadata: Table name is ProductionData, field descriptions are production line number, workstation number, vehicle model, production cycle time, timestamp. Data processing rules are: first analyze whether the query question involves the specified database elements; generate a structured query statement if and only if the specified conditions are met; answer directly in Chinese; maintain a technical documentation style; request clarification for ambiguous questions; prohibit mentioning SQL-related terminology; when a user inquires about the production cycle time of different vehicle models, the production cycle time that meets the conditions should be statistically analyzed. Query statement generation specifications are: the output structured query statement must contain SELECT, FROM, and GROUP BY statements" and "omit the trailing semicolon and add simple operation comments." Second, the user's query information is processed. Suppose the user's query is "query the production beat count for each vehicle model". For example, the query can be parsed to understand it as involving the fields "vehicle_type" and "produce_beat". Then, a prompt template is applied. For example, based on extracted keywords (such as "each vehicle model" and "production beat count"), the data processing rules and query generation specifications in the prompt template are applied to generate a structured query. Next, it is identified that the user needs to calculate the production beat count for different vehicle models, and the query is designed accordingly. Third, based on the parsed query information and the prompt template, a structured query is generated. A structured query could be "SELECT vehicle_type, COUNT(DISTINCT produce_beat) AS cnt_produce_beat FROM ProductionData GROUP BY vehicle_type". It can be seen that the prompt template not only provides the table structure information of the second database and the rules for query generation, but also guides the system on how to generate an effective structured query based on the user's actual query intent. This makes the conversion from the user's natural language input to structured query statements efficient and accurate, thereby improving the user experience and data processing capabilities of the entire intelligent question answering process.
[0116] Understandably, the prompt word template enables this method to accurately understand the user's query intent, generate effective structured query statements that conform to the actual database structure, and ensure the business rationality of the query results, thus significantly improving the user experience.
[0117] As can be seen, in some embodiments, this method can improve the standardization of the generated structured query statements by reasonably designing prompt word templates and adopting corresponding elements. In other words, due to the guidance of prompt word templates, the process of generating structured query statements can be made more standardized, meaning that each step follows predefined rules, achieving high efficiency and accuracy in structured query statements. Ultimately, the user's query information can be effectively transformed into a structured query statement suitable for the database.
[0118] In some embodiments, if the query is successful, the retrieved structured data can be used directly as the answer.
[0119] The existing methods lack dynamic and visual feedback in the output process, failing to fully demonstrate the comprehensive information of the query. To improve upon this lack of dynamic and visual feedback, some embodiments generate answers based on the retrieved structured data, which may include: generating corresponding text descriptions based on the retrieved structured data; converting the structured data into visual charts; and using the text descriptions and / or visual charts as the answers.
[0120] In some embodiments, the corresponding text description may refer to a natural language expression generated based on the query results. Text descriptions can be used to clearly and concisely convey key information extracted from structured data. The role of text descriptions is to convert complex structured data (such as database records) into easily understandable text, helping users quickly obtain the information they need. For example, when a user queries the production cycle time of a production line, the text description could be, "In January 2023, the average production cycle time of production line A was 45,000 milliseconds." This expression allows users to intuitively understand the information without having to directly view the original data table.
[0121] In some embodiments, visualization charts refer to the graphical representation of structured data, such as bar charts, line charts, and pie charts. Visualization charts facilitate users' more intuitive understanding and analysis of information. They transform complex data into simple and easy-to-understand visual forms, enabling users to quickly grasp key information and trends. In other words, the role of visualization charts is to make data more readable and intuitive through graphical representation, helping users to more quickly understand data trends, distributions, and correlations. For example, presenting production cycle time data in a line chart allows users to clearly see the changes in production cycle time over different time periods.
[0122] For example, suppose a second database stores daily production cycle time data for an automotive welding production line over the past month. With the retrieved structured data already available, the corresponding text description could be: "In September 2023, the average daily production cycle time of the automotive welding production line ranged from 48,000 milliseconds to 53,000 milliseconds, with a maximum of 53,000 milliseconds and a minimum of 48,000 milliseconds." A visualization chart (such as a line chart) can then be generated based on the retrieved structured data to show the daily changes in production cycle time. The text description and / or visualization chart can then be used as the answer. This approach not only provides textual information for quick scanning but also makes data trends more intuitive through charts, helping users understand and analyze production conditions.
[0123] Understandably, the purpose of generating corresponding text descriptions and visualizations from the retrieved structured data is to transform complex data into information that is easy for users to understand and process. Through these text descriptions and / or visualizations, users can not only quickly grasp the specific values of the relevant data but also find valuable clues from overall trends and dynamic changes, thereby making more informed decisions. Using text descriptions and / or visualizations as the answer effectively enhances the practicality of this method and improves the user experience.
[0124] As can be seen, in some embodiments, this method can employ a mechanism that dynamically generates text descriptions and / or visual charts based on the retrieved structured data, thereby achieving diversified presentation of the answers. In other words, text descriptions and / or visual charts can present the answers in a more intuitive way, allowing users to more easily parse complex information and enhancing the value of information retrieval. Users can also obtain the final answer through charts and / or text, thus gaining a more comprehensive understanding of the query results.
[0125] Related methods often lack fluency in displaying results, meaning users face response latency and a poor user experience when retrieving query information. To improve the lack of fluency in displaying results, in some embodiments, this method may further include: outputting the generated answer in a streaming manner.
[0126] In some embodiments, streaming refers to sending results continuously and in real-time during the data output process, rather than sending them all at once after all the data is ready. Streaming allows users to receive query results in real time, improving the user experience and increasing the flexibility and efficiency of interaction by eliminating the need to wait for all answers to be output. Especially when dealing with large datasets or complex calculations, streaming output can significantly reduce response time, allowing users to receive faster feedback while they are thinking and asking questions.
[0127] Understandably, users can gradually obtain information during the consultation and waiting period, reducing the anxiety caused by waiting for all answers. Receiving partial answers quickly helps guide subsequent questions and enhances the interactivity of the question-and-answer process. Especially when processing large datasets, streaming output can display search results faster, without waiting for all data to be processed.
[0128] For example, suppose a user's query is "Request to view the faults of various equipment on the production line and their solutions." After relevant answers have been generated, suppose the retrieved structured data contains multiple equipment fault records. Using streaming output, the processed data is presented to the user step-by-step. During the query process, the user can perceive real-time feedback on each fault solution, rather than waiting until all information is retrieved to receive the complete answer. This approach not only improves the user experience but also allows users more flexibility in asking follow-up questions or adjusting the direction of their questions while obtaining information.
[0129] Understandably, the advantage of "streaming generated answers" lies in meeting users' needs for real-time information and improving the efficiency and flexibility of interaction. Streaming output allows the system to engage in dialogue with users more quickly, ensuring that users are no longer forced to wait for complete answers and can continuously obtain information from them, thus promoting the natural and smooth progress of the entire question-and-answer process.
[0130] As can be seen from the above embodiments, this method can implement a streaming output mechanism, gradually displaying the generated answers to the user to enhance the immediacy of the interaction. Streaming output makes this method closer to natural conversation, thereby improving satisfaction and willingness to use. It enhances the user experience, allowing users to maintain their attention and interest in the question-and-answer feedback while waiting.
[0131] As can be seen from the above embodiments, this method not only allows users to quickly query and retrieve relevant information such as equipment faults, maintenance data, product manual data, and production process data through a question-and-answer interactive interface, but also allows users to experience deep thinking functions based on large models (such as code generation and dialogue generation). Furthermore, this method can also improve the intelligence level of information systems in industrial production lines (such as production lines with welding functions).
[0132] The above describes the intelligent question-answering method. This application also provides an intelligent question-answering system. Figure 5 This is a schematic diagram of a module of an intelligent question-answering system provided in an embodiment of this application. See also... Figure 5The system includes: a preprocessing module 100, used to parse query information into a corresponding first semantic representation; a query module 200, used to convert query information into a structured query statement when matching fails in the first database using the first semantic representation; to perform a query in the second database using the converted structured query statement; and to generate an answer based on the queried structured data; wherein the first database is used to store text data of the industrial production line and the second semantic representation of the text data, and the second database is used to store structured data generated by the industrial production line.
[0133] Figure 6 This is a schematic diagram of another intelligent question-answering system provided in an embodiment of this application. In some embodiments, see... Figure 6 The system may also include a matching module 300, used to generate an answer based on the matched text data if a match is successfully found in the first database using the first semantic representation.
[0134] Figure 7 This is a schematic diagram of another intelligent question-answering system provided in an embodiment of this application. In some embodiments, see... Figure 7 The intelligent question-answering system may also include a free generation module 400, which is used to generate an answer based on the query information using a large language model when the query fails to be found in the second database using the structured query statement obtained by transformation.
[0135] In this embodiment, the specific functions and effects of the intelligent question-answering system can be explained by referring to other embodiments of this application, and will not be repeated here.
[0136] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the intelligent question-answering methods described above.
[0137] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements any of the intelligent question-answering methods described above.
[0138] The computer program product may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the computer program product of the embodiments of this application is not limited thereto, and the computer program product may be any combination of one or more computer-readable media.
[0139] See Figure 8 , Figure 8 This is a structural block diagram of a computer device provided in an embodiment of this application.
[0140] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any of the above-described intelligent question-answering methods.
[0141] The embodiments of this application do not limit the computer device, which may be, for example, a local computer device, a cloud computer device, a distributed computer device, etc.
[0142] The computer device may include: a memory 110, a processor 120, and a communication interface 130. The memory 110, the processor 120, and the communication interface 130 are connected through internal connection paths.
[0143] The memory 110 is used to store computer programs, which in some implementations may include code for implementing the methods of the embodiments of this application.
[0144] The processor 120 executes the computer program stored in the memory 110 to control the communication interface 130 to receive input data and information, and output operation results and other data. In some implementations, when the solutions of the embodiments of this application are implemented by software or firmware, the computer program used to implement the solutions of the embodiments of this application can be stored in the processor 120 and executed by the processor 120.
[0145] The memory 110 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM). It should be noted that the memory 110 described herein is intended to include, but is not limited to, any memory of these and other suitable types. As an example, the memory 110 includes random access memory (RAM), cache memory, and read-only memory (ROM). The memory 110 stores a computer program that can be executed by processor 120, causing processor 120 to implement the steps of any of the methods described above.
[0146] The processor 120 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 120 can be any conventional processor.
[0147] In implementation, each step of the above method can be completed by the integrated logic circuitry of the hardware in the processor 120 or by instructions in software form. The method disclosed in the embodiments of this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor 120. The software modules can be located in mature storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in the memory 110, and the processor 120 reads the information in the memory 110 and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are not provided here.
[0148] In some implementations, in addition to the hardware units described above, computer devices may also include software modules, such as operating systems, basic input / output systems (BIOS), and application software.
[0149] An operating system is used to manage the hardware and / or software resources of a computer device; it is the kernel and foundation of the computer. The operating system handles fundamental tasks such as managing and configuring memory, determining the priority of system resource allocation, controlling input and output devices, operating the network, and managing the file system. To facilitate user operation, most operating systems provide a user interface for interaction with the system.
[0150] The BIOS is used to perform hardware initialization during the power-on boot phase and to provide runtime services for the operating system and applications. In some implementations, the BIOS can also monitor and display processor temperature and execute temperature protection strategies.
[0151] Application software, also known as an application program, can be understood as software written for a specific user application purpose, and is one of the main categories of computer software. For example, application software can be a program used to achieve purposes such as power control and temperature management.
[0152] It is understood that the specific examples in this application are only intended to help those skilled in the art better understand the implementation of this application, and are not intended to limit the scope of protection of this application.
[0153] It is understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.
[0154] It is understood that the various implementation methods described in this application can be implemented individually or in combination, and this application does not limit them.
[0155] Unless otherwise stated, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0156] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0157] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the embodiments described above can be referred to the corresponding processes in other embodiments, and will not be repeated here.
[0158] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0159] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the technical solution in this application, depending on actual needs.
[0160] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0161] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to related technologies, or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0162] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An intelligent question answering method, characterized by, The method comprises: parsing query information into a corresponding first semantic representation; in the case of failure to match in the first database using the first semantic representation, converting the query information into a structured query statement; wherein the first database is used to store text data of an industrial production line and a second semantic representation of the text data; querying in the second database using the converted structured query statement; wherein the second database is used to store structured data generated by the industrial production line; generating an answer according to the queried structured data. 2.The intelligent question answering method of claim 1, wherein, The method further comprises: in the case of success to match in the first database using the first semantic representation, generating an answer according to the matched text data. 3.The intelligent question answering method of claim 1, wherein, The method further comprises: in the case of failure to query in the second database using the converted structured query statement, generating an answer based on the query information using a large language model. 4.The intelligent question answering method of claim 1, wherein, The industrial production line is a production line with welding function. 5.The intelligent question answering method of claim 1, wherein, The first semantic representation is a first vector, and the second semantic representation is a second vector; wherein the process of matching in the first database using the first semantic representation comprises: calculating a similarity value between the first vector and the second vector; in the case that the similarity value exceeds a preset threshold, it is determined that the matching is successful; or in the case that the similarity value does not exceed the preset threshold, it is determined that the matching fails. 6.The intelligent question answering method of claim 2, wherein, The first database is also used to store the address of the multi-modal data corresponding to the text data in the third database; the third database is used to store the multi-modal data corresponding to the text data; wherein the generation of the answer according to the matched text data comprises: obtaining corresponding multi-modal data from the third database according to the address corresponding to the matched text data; taking the corresponding multi-modal data and / or the matched text data as the answer. 7.The intelligent question answering method of claim 1, wherein, The conversion of the query information into a structured query statement comprises: generating the structured query statement based on the query information guided by a prompt word template; wherein the prompt word template is constructed based on the table structure of the second database. 8.The intelligent question answering method of claim 7, wherein, The prompt word template comprises at least one of the following elements: role instruction, database meta information, data processing rule and query statement generation specification; wherein the role instruction is used to indicate the instruction of the role or responsibility that the query needs to undertake; the database meta information is used to indicate the table structure; the data processing rule is used to define the business logic constraints that need to be followed in the process of generating the structured query statement; and the query statement generation specification is used to indicate the set of format requirements and syntax rules that the structured query statement needs to comply with. 9.The intelligent question answering method of claim 1, wherein, The generation of the answer according to the queried structured data comprises: generating a corresponding text description according to the queried structured data; converting the structured data into a visual chart; taking the text description and / or the visual chart as the answer. 10.The intelligent question answering method of claim 1, wherein, The method further comprises: outputting the generated answer in a streaming manner.
11. An intelligent question answering system characterized in that, It comprises: a preprocessing module for parsing query information into a corresponding first semantic representation; The query module is configured to convert the query information into a structured query statement in a case where the matching in the first database using the first semantic representation fails. The structured query statement obtained through the conversion is used to query the second database, and an answer is generated according to the structured data obtained through the query. 12.The intelligent question answering system of claim 11, wherein, Further comprising: The matching module is configured to generate an answer according to the matched text data in a case where the matching in the first database using the first semantic representation succeeds. 13.The intelligent question answering system of claim 11, wherein, Further comprising: The free generation module is configured to generate an answer based on the query information using a large language model in a case where the query in the second database using the structured query statement obtained through the conversion fails.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1 to 10.
15. A computer device, comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method in any one of claims 1 to 10 when executing the computer program.
16. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1 to 10.
Citation Information
Patent Citations
Data query method and device, electronic equipment, storage medium and product
CN118152522A
Digital human interaction method and system based on naked eye 3D visualization
CN119782466A
Intelligent assistant efficiency optimization method and system and storage medium
CN120011606A
Method for realizing rapid retrieval of market main agent based on large model
CN120336324A