Enterprise database natural language interaction method and device, vehicle and program product
By identifying question types and domain objects in AUTOSAR enterprise-level question-answering scenarios, adopting a hierarchical scheduling strategy to prioritize the retrieval of enterprise-specific knowledge bases and supplement real-time database queries, and combining this with a large language model to generate answers, the problem of general models being unable to accurately understand answers is solved, achieving highly accurate and real-time answer generation.
Patent Information
- Application Number
- CN202611579325.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-13
- Publication Date
- 2026-11-24
AI Technical Summary
In AUTOSAR enterprise-level question-answering scenarios, general-purpose large language models cannot accurately understand users' natural language questions and cannot effectively query enterprise-specific AUTOSAR knowledge bases and real-time structured databases, resulting in answers that deviate from the facts or lack timeliness and accuracy.
By identifying question types and domain objects, a hierarchical scheduling strategy is adopted to prioritize the retrieval of the enterprise's proprietary knowledge base, supplemented by real-time structured database queries, and combined with a large language model to generate answers, forming a hierarchical closed loop of knowledge base priority, database supplementation, and large model as a backup.
It enables intelligent hierarchical retrieval of natural language questions into enterprise-specific knowledge bases and real-time structured databases, improving the accuracy, timeliness, and credibility of answers and reducing unfounded illusions.
Smart Images

Figure CN123157754A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive engineering technology, specifically to a natural language interaction method, device, vehicle, and program product for enterprise databases. Background Technology
[0002] AUTOmotive Open System Architecture (AUTOSAR) is a core industry standard in the global automotive electrical and electronic architecture field. It was jointly developed by major global automakers, parts suppliers, semiconductor manufacturers, and software service providers. It is divided into two major branches: AUTOSAR Classic and AUTOSAR Adaptive, and has become the only universal standard for the research and development of electrical and electronic systems for new energy vehicles and intelligent connected vehicles.
[0003] As automotive electronic software scales up, AUTOSAR specifications, enterprise project documents, and real-time configuration data continue to grow. Engineers often have to switch back and forth between document repositories and structured databases when searching for information. Traditional keyword searches require users to be familiar with fields and terminology, making it difficult to understand natural language questions. General-purpose large language models have language understanding capabilities but lack enterprise-specific AUTOSAR knowledge and cannot directly query real-time structured databases, leading to answers that are prone to deviating from the facts or even creating illusions. Enterprise knowledge bases and AUTOSAR databases are independent, with inconsistent search entry points and result formats. Faced with a natural language question, the system struggles to determine whether to prioritize the enterprise knowledge base, supplement with queries to the real-time database, or use a general-purpose large model for an answer. Therefore, in AUTOSAR enterprise-level question-answering scenarios, how to enable large language models to accurately understand users' natural language questions and dynamically schedule enterprise-specific AUTOSAR knowledge bases and real-time AUTOSAR structured databases to achieve hierarchical retrieval and accurate answer generation, while reducing model illusions, has become a pressing technical problem to be solved. Summary of the Invention
[0004] This invention provides a method, device, vehicle, and program product for natural language interaction in enterprise databases, which can realize intelligent hierarchical retrieval and answer generation from natural language questions to enterprise-specific knowledge bases and real-time structured databases, and improve the accuracy, real-time performance, and credibility of retrieval results and answers.
[0005] This invention provides a natural language interaction method for enterprise databases, the method comprising: Obtain the natural language text of the input question; The natural language text is subjected to problem type identification and domain object information extraction related to the automotive open system architecture domain to obtain the problem type information, domain object information and query slot information of the input problem; Based on the question type information, the domain object information, and the query slot information, the processing path for answering the input question is determined according to a preset hierarchical scheduling strategy. The first search result is obtained by retrieving the enterprise's dedicated knowledge base for open automotive system architecture according to the processing path described above. If the first search result meets the preset answer generation conditions, then an answer to the input question is generated and output based on the first search result; If the first search result does not meet the answer generation conditions, a query instruction for a structured database of a real-time automotive open system architecture is generated based on the question type information, the domain object information, and the query slot information, and the query instruction is executed to obtain the second search result. If the second search result meets the answer generation conditions, then the answer to the input question is generated and output based on the second search result or the fusion result of the first search result and the second search result; If neither the first search result nor the second search result satisfies the answer generation condition, a preset large language model is invoked, and based on the natural language text and available search evidence, the answer to the input question is generated and output through the large language model.
[0006] Optionally, specific methods for identifying problem types related to the automotive open system architecture domain in the natural language text include: Generate a corpus specific to the automotive open system architecture domain, wherein the corpus is labeled with at least one question type; The pre-trained language model was fine-tuned using the specific corpus to obtain a question type recognition model; The natural language text is input into the question type recognition model, and the question vector is obtained after processing by the question type recognition model. The problem vector is processed by a normalized exponential function to obtain multiple problem types and a probability value for each problem type; The question type with the highest probability value is selected from the multiple question types as the question type corresponding to the input question.
[0007] Optionally, the specific methods for extracting domain object information related to the automotive open system architecture from the natural language text include: Generate an entity corpus in the field of automotive open system architecture, and annotate the entity boundaries and entity categories in the entity corpus; The named entity recognition model was trained using annotated entity corpus. After inputting the natural language text into the trained named entity recognition model, the trained named entity recognition model outputs the entity boundaries and entity categories in the natural language text to obtain the domain object information; The query slot information is generated based on the domain object information.
[0008] Optionally, the specific method for determining the processing path for answering the input question includes: The task status of the current answering task is determined based on the question type information, domain object information, and query slot information of the current answering task. Multiple candidate processing paths are generated for answering the input question in this test. These multiple candidate processing paths include at least the enterprise automotive open system architecture dedicated knowledge base retrieval path, the real-time automotive open system architecture structured database query path, and the large language model generation path. Determine the reward function corresponding to each candidate processing path, and calculate the instantaneous reward value of the corresponding candidate processing path using the reward function; Based on the preset state-action value function relationship, the current state action value is updated according to the instant reward value, discount factor, learning rate and the state-action value of the next state; Select the candidate processing path corresponding to the maximum current state action value from the multiple candidate processing paths as the optimal processing path; If the task status indicates that the current answer task is a simple task, then the optimal processing path will be used as the processing path for answering the input question this time. If the task status indicates that the current answer task is a complex task, then the current answer task is split into multiple subtasks, and the subtasks are used as the current answer task. Then, the process returns to the step of determining the task status of the current answer task based on the question type information, domain object information, and query slot information of the current answer task.
[0009] Optionally, the specific method for generating the query instruction includes: Multiple exclusive query templates for the automotive open system architecture domain are generated, wherein each exclusive query template corresponds to a query type and a database statement structure, and is equipped with variable placeholders; Based on the problem type information, the domain object information, and the query slot information, a target query template is selected from multiple dedicated query templates, and variable placeholders in the target query template are filled to obtain the filled query template; Based on the populated query template, a query request is generated that is compatible with the data source of the structured database of the real-time automotive open system architecture. The query request is sent to the real-time automotive open system architecture structured database to obtain the second search result.
[0010] Optionally, the enterprise database natural language interaction method further includes: After obtaining the natural language text of the input question, based on the session identifier corresponding to the input question, the historical dialogue set is read from the memory database, and the most recent dialogue with a preset data volume is selected from the historical dialogue set as the context; If the natural language text is incomplete, then the natural language text is subjected to reference resolution or omission completion according to the context to obtain a complete natural language representation of the input question; If the problem type information, the domain object information, or the query slot information is incomplete, the missing information is supplemented from the context to generate a new query instruction.
[0011] Optionally, obtaining the natural language text of the input question includes: In response to the query request, the identity and access permissions of the inputter of the natural language text are verified according to the automotive R&D permission system. The access permissions include access permissions to the enterprise's automotive open system architecture exclusive knowledge base and the real-time automotive open system architecture structured database. If the verification result is unsuccessful, the query request is rejected and a permission error message is displayed. If the verification result is successful, the natural language text of the input question carried in the query request is retrieved.
[0012] The present invention also provides a natural language interaction device for an enterprise database, the device comprising: The input module is used to obtain the natural language text of the input question; The recognition module is used to identify the question type and extract domain object information related to the automotive open system architecture domain from the natural language text, so as to obtain the question type information, domain object information and query slot information of the input question; The decision module is used to determine the processing path for answering the input question based on the question type information, the domain object information, and the query slot information, according to a preset hierarchical scheduling strategy. The first retrieval module is used to retrieve the enterprise's automotive open system architecture-specific knowledge base according to the processing path and obtain the first retrieval result. The output module is used to generate and output an answer to the input question based on the first search result if the first search result meets the preset answer generation conditions. The second retrieval module is used to generate a query instruction for a structured database of a real-time automotive open system architecture based on the question type information, the domain object information, and the query slot information if the first retrieval result does not meet the answer generation conditions, and execute the query instruction to obtain the second retrieval result. The output module is further configured to generate and output an answer to the input question based on the second search result or the fusion result of the first search result and the second search result if the second search result satisfies the answer generation condition; The output module is further configured to, if neither the first search result nor the second search result satisfies the answer generation condition, invoke a preset large language model, and generate and output an answer to the input question based on the natural language text and available search evidence through the large language model.
[0013] The present invention also provides a vehicle, the vehicle including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the enterprise database natural language interaction method as described in any of the preceding claims.
[0014] The present invention also provides a computer program product, including a computer program or computer instructions, the computer program or computer instructions being stored in a computer-readable storage medium, and a processor of a computer device reading the computer program or computer instructions from the computer-readable storage medium, characterized in that the processor executes the computer program or computer instructions to cause the computer device to perform the enterprise database natural language interaction method as described in any of the preceding claims.
[0015] The present invention has at least the following beneficial effects: This technical solution first identifies the question type, extracts domain objects, and query slots through a natural language understanding layer, transforming the user's colloquial questions into a schedulable structured semantic representation. Then, based on a preset hierarchical scheduling strategy, it determines the processing path. First, it retrieves the enterprise's AUTOSAR-specific knowledge base, prioritizing proprietary knowledge such as enterprise standards and project documents to ensure the answer aligns with the enterprise context, improving accuracy and credibility. If the knowledge base evidence is insufficient, it uses the aforementioned semantic information to generate query instructions for a real-time AUTOSAR structured database, supplementing dynamic configurations and real-time data to enhance the real-time nature of the answer. If both types of search results meet the conditions, an answer can be generated individually or in combination, improving information completeness. If neither condition is met, it invokes a large language model, using its natural language text and available search evidence as constraints to generate a fallback answer, reducing the illusion of unfounded claims. This forms a hierarchical closed loop of knowledge base priority, database supplementation, and large model fallback, achieving intelligent hierarchical retrieval of natural language questions from the enterprise's specific knowledge base and real-time structured database, and generating accurate, real-time, and reliable answers. Attached Figure Description
[0016] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.
[0017] Figure 1 This is a flowchart illustrating the steps of a natural language interaction method for enterprise databases. Figure 2 This is a general architecture diagram of an enterprise database natural language interaction system; Figure 3 This is a block diagram of the front-end interaction module in an enterprise database natural language interaction system; Figure 4 This is a block diagram of the Dify agent management module in an enterprise database natural language interaction system. Figure 5 This is a block diagram of the Prompt generation and scheduling module in an enterprise database natural language interaction system. Figure 6 This is a flowchart of an enterprise AUTOSAR-specific knowledge base module in an enterprise database natural language interaction system. Figure 7 This is a block diagram of the AUTOSAR database interface module in an enterprise database natural language interaction system; Figure 8 This is a block diagram of a large model generation module in an enterprise database natural language interaction system. Figure 9 This is a block diagram of a context management module in an enterprise database natural language interaction system; Figure 10 This is a flowchart illustrating the entire execution process of an enterprise database natural language interaction system. Figure 11 This is a schematic diagram of the structure of a natural language interaction device for an enterprise database. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] It should be noted that AUTOSAR (AUTomotive Open System Architecture) is a core industry standard in the global automotive electronic and electrical architecture field. It was jointly developed by major global automakers, parts suppliers, semiconductor manufacturers, and software service providers. It is divided into two major branches: AUTOSAR Classic (classic platform, for traditional vehicle ECUs) and AUTOSAR Adaptive (adaptive platform, for domain controllers and central computing platforms). It has become the only universal standard for the research and development of electronic and electrical systems in new energy vehicles and intelligent connected vehicles.
[0020] The AUTOSAR database, as the core carrier of the vehicle's electronic and electrical configuration, stores comprehensive core data across the entire lifecycle of automotive R&D, testing, integration, mass production, and after-sales service. This includes, but is not limited to: ARXML configuration files (AUTOSAR's official standard configuration format), ECU hardware parameters, CAN / LIN / Ethernet / SOME / IP communication matrices, diagnostic service configurations, network management strategies, software components (SWC), runnable entities, ports, interfaces, basic software (BSW), runtime environment (RTE), signal mapping relationships, periodic configurations, priority definitions, data type mappings, module dependencies, and configuration consistency rules. This database is the core data support for automotive electronics engineers in ECU development, system integration, communication debugging, troubleshooting, and version management, directly determining the development efficiency, stability, and security of the vehicle's electronic and electrical systems.
[0021] The researchers who developed this application discovered that existing AUTOSAR data query solutions have inherent shortcomings in the R&D, testing, integration, and after-sales scenarios of passenger cars, commercial vehicles, and intelligent connected vehicles.
[0022] First, the operational threshold is extremely high. Traditional structured database queries require users to master AUTOSAR specifications, SQL or NoSQL syntax, ARXML parsing, and database table structures. Fixed template tools still require familiarity with configuration levels and parameter meanings. Most testing, integration, project, after-sales, and quality personnel cannot perform queries independently and must delegate them to development engineers. A simple query takes an average of over 30 minutes, and a complex query takes over 4 hours, severely slowing down the development process.
[0023] Second, the query methods are rigid. Fixed templates only support limited preset scenarios and cannot handle fuzzy queries, multi-condition combinations, join queries, statistical queries, and comparison queries. Traditional database queries require manually writing complex multi-table join statements, which is difficult for non-professionals to complete. General large models can only perform text-based question-and-answer queries and cannot query structured data.
[0024] Third, it lacks real-time database access capabilities. The disconnect between general-purpose large models and structured databases means it can only answer questions based on outdated theoretical knowledge and cannot access the latest ECU configurations, communication matrices, and diagnostic services. Traditional tools only output structured results, which cannot be converted into natural language, making it difficult to form a closed loop of semantic understanding, real-time database lookup, and semantic response.
[0025] Fourth, there is a lack of adaptation to the AUTOSAR domain. General-purpose large models do not understand terms and business logic such as SWC, Runnable, Port, Interface, BSW, and RTE, resulting in an error rate exceeding 40%. Traditional tools only output raw data without professional interpretation, anomaly alerts, or optimization suggestions.
[0026] Fifth, there is no multi-turn dialogue or contextual memory. Existing solutions are all single-turn question-and-answer, and when asking follow-up questions, all parameters must be entered again, reducing interaction efficiency by more than 60%.
[0027] Sixth, integration is difficult and costly. Commercial toolchains are closed-source, with a customization cycle of 3 to 6 months and a single license costing over one million yuan, making them difficult for small and medium-sized teams to implement.
[0028] Seventh, it does not support multimodal input and cannot parse ARXML fragments, fault logs, configuration screenshots, and error messages.
[0029] Eighth, it lacks intelligent task scheduling capabilities. Complex queries require manual step-by-step execution and result integration, with more than 10 steps, making it prone to errors.
[0030] Ninth, without the support of a dedicated enterprise knowledge base, it is impossible to reuse internal R&D specifications, design standards, historical failure cases and best practices. The answers are out of touch with internal standards, resulting in an extremely low knowledge reuse rate.
[0031] To address the aforementioned technical problems, this invention provides a method, apparatus, vehicle, and program product for natural language interaction in enterprise databases. This enables intelligent hierarchical retrieval and answer generation from natural language questions to enterprise-specific knowledge bases and real-time structured databases, improving the accuracy, real-time performance, and reliability of retrieval results and answers. The following are various embodiments of this technical solution.
[0032] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of a natural language interaction method for enterprise databases.
[0033] This embodiment provides a natural language interaction method for enterprise databases, including: S101. Obtain the natural language text of the input question.
[0034] S102. Identify the problem type and extract domain object information related to the automotive open system architecture domain from the natural language text to obtain the problem type information, domain object information and query slot information of the input problem.
[0035] S103. Based on the question type information, domain object information, and query slot information, determine the processing path for this input question according to the preset hierarchical scheduling strategy.
[0036] S104. Search the enterprise's automotive open system architecture-specific knowledge base according to the processing path to obtain the first search result.
[0037] S105. If the first search result meets the preset answer generation conditions, then generate and output the answer to the input question based on the first search result.
[0038] S106. If the first search result does not meet the answer generation conditions, a query instruction for the structured database of the real-time automotive open system architecture is generated based on the question type information, domain object information, and query slot information, and the query instruction is executed to obtain the second search result.
[0039] S107. If the second search result meets the answer generation conditions, then generate and output the answer to the input question based on the second search result or the fusion result of the first search result and the second search result.
[0040] S108. If neither the first search result nor the second search result meets the answer generation conditions, then the preset large language model is invoked, and based on the natural language text and available search evidence, the answer to the input question is generated and output through the large language model.
[0041] In this embodiment, the question type information indicates the category of the query purpose of the question asked by the user; the domain object information indicates at least one of the automotive open system architecture objects, attributes, parameters, interfaces, modules and versions involved in the user's question; and the query slot information indicates the fields and values used to generate structured query instructions.
[0042] Understandably, this embodiment first identifies the question type, extracts domain objects and query slots through a natural language understanding layer, transforming the user's colloquial question into a schedulable structured semantic representation. Then, based on a preset hierarchical scheduling strategy, it determines the processing path, first retrieving the enterprise's AUTOSAR-specific knowledge base, prioritizing proprietary knowledge such as enterprise specifications and project documents in the answer, ensuring the answer conforms to the enterprise context and improving accuracy and credibility. If the knowledge base evidence is insufficient, it uses the aforementioned semantic information to generate a query command for a real-time AUTOSAR structured database, supplementing dynamic configuration and real-time data to enhance the real-time nature of the answer. If both types of search results meet the conditions, an answer can be generated individually or in combination, improving information completeness. If neither condition is met, it invokes a large language model, using its natural language text and available search evidence as constraints to generate a fallback answer, reducing the illusion of unfounded claims. This forms a hierarchical closed loop of knowledge base priority, database supplementation, and large model fallback, achieving intelligent hierarchical retrieval of natural language questions from the enterprise's specific knowledge base and real-time structured database, and generating accurate, real-time, and reliable answers.
[0043] In some embodiments, step S101 includes: In response to the query request, the system verifies the identity and access permissions of the user who inputs the natural language text, based on the automotive R&D permission system. Access permissions include access to the enterprise's dedicated knowledge base for the open automotive system architecture and the real-time structured database of the open automotive system architecture. If the verification result is unsuccessful, the query request is rejected and a message indicating that the user has no permission is displayed. If the verification result is successful, the system retrieves the natural language text of the input question carried in the query request.
[0044] Understandably, this embodiment verifies the user's identity and access permissions to the company's AUTOSAR-specific knowledge base and real-time structured database based on the automotive R&D permission system when responding to a query request. If the verification fails, the query is rejected and a permission denied message is displayed; only after successful verification is the natural language text retrieved. This achieves permission control before querying, preventing unauthorized access to the company's private knowledge and real-time data, improving system security and data compliance, while ensuring the credibility of subsequent hierarchical retrieval and answer generation.
[0045] In some embodiments, specific methods for identifying problem types related to the automotive open system architecture domain from natural language text include: Generate a corpus specific to the automotive open system architecture domain, with at least one question type labeled in the corpus; fine-tune a pre-trained language model using the corpus to obtain a question type recognition model; input natural language text into the question type recognition model, which processes the text to obtain a question vector; perform operations on the question vector using a normalized exponential function to obtain multiple question types and their probability values; select the question type with the highest probability value from the multiple question types as the question type corresponding to the input question.
[0046] Specifically, a BERT pre-trained language model is used for fine-grained intent classification. First, the model is fine-tuned based on an AUTOSAR-specific corpus, enabling it to recognize over twenty AUTOSAR-specific intents, including configuration queries, statistical analysis, parameter comparison, consistency checks, dependency analysis, fault diagnosis, version queries, and network management, with an accuracy of at least 95%. When a user inputs a natural language question, the model encodes the input text and outputs an intent probability distribution using a Softmax activation function. The system selects the category corresponding to the highest probability as the final intent. For example, if a user inputs a query for a specific ECU communication matrix, the model outputs that a configuration query intent has the highest probability, and the system processes the query according to the configuration query path. This approach improves the accuracy of intent recognition and provides a reliable basis for subsequent hierarchical scheduling.
[0047] In some embodiments, the probability value is calculated as follows: pintent=Softmax(f(Q)), where f(Q) is the vector of the user question after processing by the BERT model, and pintent is the probability value of each intent category.
[0048] Understandably, this embodiment constructs an AUTOSAR domain-annotated corpus and fine-tunes a pre-trained language model. The question type recognition model can generate question vectors by combining domain semantics, and then output the probabilities of each question type through a normalized exponential function, selecting the type with the highest probability. This improves the accuracy of question classification, provides a reliable basis for subsequent hierarchical scheduling and query instruction generation, and further enhances the accuracy, real-time performance, and reliability of search results and answers.
[0049] In some embodiments, specific methods for extracting domain object information related to the automotive open system architecture from natural language text include: Generate entity corpus in the automotive open system architecture domain and annotate entity boundaries and entity categories in the entity corpus; train a named entity recognition model using the annotated entity corpus; input natural language text into the trained named entity recognition model, and output entity boundaries and entity categories in the natural language text through the trained named entity recognition model to obtain domain object information; generate query slot information based on the domain object information.
[0050] Specifically, this embodiment employs named entity recognition technology to automatically extract AUTOSAR core entities from user natural language questions. The extracted objects include over fifty domain entities such as ECU model, SWC name, Runnable name, Port type, Interface name, bus type, cycle, priority, data type, and time range, with an extraction accuracy of no less than 98%. For example, if a user asks which SWCs in a given ECU have a cycle less than 20ms, the system can identify the ECU model, cycle condition, and SWC name, and fill these into the subsequent query slots. This provides accurate parameters for generating query commands, improving the accuracy of retrieval and answer generation.
[0051] Understandably, this embodiment constructs and annotates an AUTOSAR domain entity corpus, trains a named entity recognition model, and can accurately output the boundaries and categories of entities in natural language text, obtaining domain object information and generating query slot information accordingly. This improves the accuracy of domain object extraction and slot filling, providing a reliable semantic foundation for hierarchical scheduling, knowledge base retrieval, and database query instruction generation, further enhancing the accuracy, real-time performance, and credibility of the answers.
[0052] In some embodiments, the specific methods for determining the processing path for this answer to the input question include: The task status of the current answering task is determined based on the question type information, domain object information, and query slot information. Multiple candidate processing paths for the input question are generated, including at least a knowledge base retrieval path for the enterprise automotive open system architecture, a structured database query path for the real-time automotive open system architecture, and a large language model generation path. A reward function is determined for each candidate processing path, and the immediate reward value for that path is calculated. Based on a preset state-action value function relationship, the current state action value is updated according to the immediate reward value, discount factor, learning rate, and the state action value of the next state. The candidate processing path with the largest current state action value is selected as the optimal processing path from among the multiple candidate paths. If the task status indicates that the current answering task is a simple task, the optimal processing path is used as the processing path for the input question. If the task status indicates that the current answering task is a complex task, the task is split into multiple subtasks, and each subtask is used as the current answering task. The process then returns to the step of determining the task status of the current answering task based on the question type information, domain object information, and query slot information.
[0053] Specifically, this embodiment employs reinforcement learning algorithms to achieve dynamic task routing, assigning optimal processing paths to different tasks such as database queries, large model generation, external API calls, and multi-step analysis. The system sets a reward function for each task path, with rewards calculated based on task complexity, execution time, and query precision. The system dynamically adjusts routing decisions by updating the Q-value function. This module can automatically identify simple and complex tasks. Simple tasks are directly routed to the query module, while complex tasks are automatically broken down and executed step-by-step. For example, if a user requests a comparison of interface mapping differences between two car models, the system identifies this as a complex task, automatically breaks it down into multiple sub-queries, executes them step-by-step, and finally integrates the results. This achieves intelligent and optimized task scheduling.
[0054] In some embodiments, the specific way to update the current state action value based on the immediate reward value, discount factor, learning rate, and the state action value of the next state is to dynamically adjust the routing decision by updating the Q-value function. Qtask(s,a)=Qtask(s,a)+α(r+γmaxa′Qtask(s′,a′) Qtask(s,a)) Where Qtask(s,a) is the Q value of choosing action a in task state s, r is the immediate reward, γ is the discount factor, α is the learning rate, s′ is the next state, and a′ is the next action.
[0055] Understandably, this embodiment, through task state determination and candidate path generation, combined with reward functions, state action value updates, and optimal path selection, allows the system to dynamically determine the path for knowledge base retrieval, database querying, or large model generation. Simple tasks directly execute the optimal path, while complex tasks are broken down into sub-tasks for iterative processing. This improves the adaptability and accuracy of processing path scheduling, optimizes hierarchical retrieval efficiency, and further enhances the accuracy, real-time performance, and credibility of the answers.
[0056] In some embodiments, the specific methods for generating query instructions include: Multiple domain-specific query templates for the automotive open system architecture are generated. Each domain-specific query template corresponds to a query type and a database statement structure, and includes variable placeholders. Based on question type information, domain object information, and query slot information, a target query template is selected from the multiple domain-specific query templates, and the variable placeholders in the target query template are filled to obtain the filled query template. Based on the filled query template, a query request adapted to the data source of the real-time automotive open system architecture structured database is generated. The query request is sent to the real-time automotive open system architecture structured database to obtain the second search result.
[0057] Specifically, this embodiment pre-defines over 30 AUTOSAR-specific prompt templates, covering business scenarios such as configuration queries, interface comparisons, consistency checks, dependency analysis, statistical summaries, and troubleshooting. Each template corresponds to a specific query type and database statement structure, employing a variable placeholder design. The system dynamically populates parameters such as ECU, SWC, and period based on entity extraction results, ensuring accurate and standardized query commands. Subsequently, based on template matching results and entity parameters, it dynamically generates query requests adapted to the AUTOSAR data source, supporting SQL statements, XPath or XQuery statements, and NoSQL query statements. This query request can be directly executed by the database interface module without secondary conversion.
[0058] Understandably, this embodiment uses a pre-defined AUTOSAR domain-specific query template to map question types, domain objects, and query slots to corresponding database statement structures and populate variable placeholders. It then adapts to a real-time structured database data source to generate query requests. This reduces the difficulty of converting natural language to database queries, improves the standardization and accuracy of query command generation, enables efficient real-time data supplementation, and further enhances the accuracy, timeliness, and credibility of the answers.
[0059] In some embodiments, the enterprise database natural language interaction method further includes: After obtaining the natural language text of the input question, based on the session identifier corresponding to the input question, the historical dialogue set is read from the in-memory database, and the most recent dialogue with a preset data volume is selected from the historical dialogue set as the context; if the natural language text is incomplete, the natural language text is processed by dereference resolution or omission completion according to the context to obtain the complete natural language representation of the input question; if the question type information, domain object information, or query slot information is incomplete, the missing information is supplemented from the context to generate a new query instruction.
[0060] In some embodiments, the amount of data selected can be chosen using a sliding window. For example, the context content can be automatically updated based on the dialogue history and window size, calculated as follows: Ccontext = SlidingWindow(Hdialog, N), where Hdialog is the set of historical dialogues, N is the window size (default N = 10), and Ccontext is the current valid context.
[0061] Specifically, a Redis in-memory database is used to store dialogue context information, with read and write speeds not exceeding 10 milliseconds, supporting high-concurrency access. A sliding window technique is used to save the most recent 10 rounds of dialogue history, avoiding confusion caused by excessive historical information. The context content is automatically updated based on the dialogue history and window size. The current valid context is equal to a sliding window truncation of the historical dialogue set by a window size N, where N defaults to 10. When a user initiates consecutive follow-up questions, the system automatically backtracks to the context and extracts historical parameters, eliminating the need for repeated user input and achieving seamless and coherent interaction.
[0062] Understandably, this embodiment reads historical dialogues from the memory database using session identifiers, selects the most recent dialogue as context, and can resolve or omit incomplete natural language text by eliminating referential references. Furthermore, it supplements information from the context when question type, domain object, or query slot is missing, generating new query instructions. This achieves semantic coherence and information completion in multi-turn dialogues, improving the completeness and accuracy of query instruction generation, and further enhancing the accuracy, real-time performance, and credibility of the answers.
[0063] Please refer to Figure 2 , Figure 2 This is a general architecture diagram of an enterprise database natural language interaction system.
[0064] like Figure 2 As shown, the enterprise database natural language interaction system in this embodiment includes a front-end interaction module, a Dify agent management module, a Prompt generation and scheduling module, an enterprise AUTOSAR dedicated knowledge base module, an AUTOSAR database interface module, and a large model generation module: responsible for converting structured data into natural language, generating and post-processing professional answers, and a context management module.
[0065] Please refer to Figure 3 , Figure 3 This is a block diagram of a front-end interaction module in an enterprise database natural language interaction system.
[0066] like Figure 3 As shown, the front-end interaction module comprises three main sub-modules, comprehensively adapting to user interaction needs: The web interface submodule provides a simple and intuitive PC / mobile web interface, supporting text input boxes, multimodal file upload entry, answer visualization (text, tables, code blocks, bar charts, line charts), and chat history. The interface features a minimalist design with no complex configuration options; users simply need to enter text or upload files to initiate a query, making it suitable for users of all technical levels.
[0067] The API interface submodule provides a standardized RESTful API interface that supports HTTP / HTTPS protocols. It can be quickly integrated into existing AUTOSAR development toolchains (Vector DaVinci Developer, EB tresos, Artop), vehicle R&D platforms, testing platforms, and after-sales systems, achieving seamless integration into existing development processes without the need for separate deployment of independent systems.
[0068] The multimodal input submodule supports uploading multimodal data such as ARXML configuration file fragments, fault log files (.log / .txt), configuration screenshots, and error message screenshots. The system automatically parses the key parameters, abnormal information, and configuration content in the files to help accurately understand user intent and expand the dimensions of problem perception.
[0069] Please refer to Figure 4 , Figure 4 This is a block diagram of the Dify agent management module in an enterprise database natural language interaction system.
[0070] like Figure 4 As shown, the Dify agent management module includes: The intent recognition submodule employs a BERT pre-trained language model (Bidirectional Encoder Representations from Transformers) for fine-grained intent classification. Based on a corpus specifically designed for the AUTOSAR domain, the model is fine-tuned to accurately identify over 20 AUTOSAR-specific intents, including configuration queries, statistical analysis, parameter comparison, consistency checks, dependency analysis, troubleshooting, version queries, and network management, achieving an accuracy rate of ≥95%. The model outputs an intent probability distribution using a Softmax activation function, selecting the category corresponding to the highest probability as the final intent.
[0071] The entity extraction submodule, based on Named Entity Recognition (NER) technology, automatically extracts AUTOSAR core entities from user natural language questions, including ECU model, SWC name, Runnable name, Port type, Interface name, bus type, cycle, priority, data type, time range, and more than 50 other domain entities, with an extraction accuracy of ≥98%, providing accurate parameters for subsequent query command generation.
[0072] The task routing submodule uses reinforcement learning (RL) algorithms to implement dynamic task routing, assigning optimal processing paths to different tasks such as database queries, large model generation, external API calls, and multi-step analysis. This module can automatically identify simple and complex tasks; simple tasks are directly routed to the query module, while complex tasks are automatically broken down and executed step by step, achieving intelligent and optimized task scheduling.
[0073] Please refer to Figure 5 , Figure 5 This is a block diagram of the Prompt generation and scheduling module in an enterprise database natural language interaction system.
[0074] like Figure 5 As shown, the Prompt generation and scheduling module comprises two main sub-modules, achieving precise conversion based on domain-specific templates. The sub-modules are as follows: The Prompt template management submodule offers over 30 pre-defined AUTOSAR-specific prompt templates, covering all business scenarios such as configuration queries, interface comparisons, consistency checks, dependency analysis, statistical summaries, and troubleshooting. Each template corresponds to a specific query type and database statement structure. The templates employ a variable placeholder design, dynamically filling in parameters such as ECU, SWC, and period based on entity extraction results, ensuring the accuracy and standardization of query commands.
[0075] The query request generation submodule dynamically generates query requests adapted to the AUTOSAR data source based on the template matching results and entity parameters. It supports three formats: SQL statements, XPath / XQuery statements, and NoSQL query statements, and can be directly executed by the database interface module without secondary conversion.
[0076] Please refer to Figure 6 , Figure 6 This is a block diagram of an enterprise AUTOSAR-specific knowledge base module in an enterprise database natural language interaction system.
[0077] like Figure 6 As shown, the enterprise AUTOSAR dedicated knowledge base module is the system's first priority retrieval source, and it contains three main sub-modules: The enterprise knowledge storage submodule adopts a hybrid storage architecture of vector database (Milvus / Chroma) + relational database to store enterprise-specific knowledge: enterprise AUTOSAR R&D specifications, design standards, and development constraints; SWC / ECU / BSW customized design specifications and parameter thresholds; historical fault cases, solutions, and troubleshooting experience; project best practices, configuration templates, and frequently asked questions; and enterprise-specific communication matrix, diagnostic services, and network management rules.
[0078] The knowledge vector retrieval submodule uses vector embedding technology to store enterprise knowledge in vector form. It supports semantic retrieval, keyword matching, and fuzzy retrieval, with a retrieval response time of ≤100ms and a matching accuracy of ≥95%.
[0079] The knowledge update and maintenance submodule supports real-time addition, editing, deletion, and version management of enterprise knowledge, and automatically synchronizes the latest R&D specifications and cases to ensure that the knowledge base content is effective in real time.
[0080] Please refer to Figure 7 , Figure 7 This is a block diagram of the AUTOSAR database interface module in an enterprise database natural language interaction system.
[0081] like Figure 7 As shown, the AUTOSAR database interface module consists of three main sub-modules: The multi-database adaptation submodule supports all AUTOSAR data storage formats, including MySQL and PostgreSQL (for storing parsed ARXML structured data); MongoDB (for storing unstructured configuration information); direct parsing of raw configuration files via XPath / XQuery; and Neo4j (for storing module dependencies and signal routing relationships).
[0082] The query execution engine submodule receives standardized query requests from the Prompt generation module, automatically converts them into query statements corresponding to the target database, executes the query operations, and returns a structured dataset. It supports all complex query methods, including single-table queries, multi-table join queries, aggregate queries, and subqueries, with a query execution success rate of ≥99%.
[0083] The AUTOSAR metadata mapping submodule maintains the AUTOSAR terminology-database table and field-specific mapping dictionary, accurately mapping technical terms in the user's natural language to the corresponding data elements in the database, ensuring that query commands and database structures are perfectly matched and avoiding query errors.
[0084] Please refer to Figure 8 , Figure 8 This is a block diagram of a large model generation module in an enterprise database natural language interaction system.
[0085] like Figure 8 As shown, the large model generation module consists of two main sub-modules: The answer generation submodule uses large language models such as GPT-4, Llama 3, and ChatGLM to backfill the structured data returned from the database into the AUTOSAR-specific answer template, generating natural language answers that conform to both real data and human language habits, and supports multiple output formats such as text, tables, and lists.
[0086] The AUTOSAR post-processing submodule performs post-processing on the generated answers, including terminology correction, format standardization, exception prompts, and optimization suggestions, to ensure that the answers conform to the reading habits of automotive electronics engineers and industry expression standards, and are free of professional errors and ambiguities.
[0087] Please refer to Figure 9 , Figure 9 This is a block diagram of a context management module in an enterprise database natural language interaction system.
[0088] like Figure 9 As shown, the context management module achieves efficient context management through two sub-modules: The context storage submodule uses a Redis in-memory database to store dialogue context information, with a read / write speed of ≤10ms and support for high concurrency access; it uses sliding window technology to save the history of the most recent 10 rounds of dialogue to avoid confusion caused by too much historical information.
[0089] The context update submodule automatically updates the context content based on the dialogue history and window size. The calculation formula is as follows: Ccontext = SlidingWindow(Hdialog, N), where Hdialog is the set of historical dialogues, N is the window size (default N = 10), and Ccontext is the currently valid context. When the user initiates consecutive follow-up questions, the system automatically retrieves the historical parameters from the context, eliminating the need for the user to repeat input and achieving seamless and coherent interaction.
[0090] Please refer to Figure 10 , Figure 10 This is a flowchart illustrating the entire execution process of a natural language interaction system for enterprise databases.
[0091] Please see Figure 10 This embodiment automates and intelligently handles the entire process from system initialization to user session termination, requiring no manual intervention. The specific steps are as follows: (1) After the system starts up, it completes the loading of Dify agent, loading of BERT intent recognition model, connection of large model, establishment of database connection pool, loading of Prompt template, and initialization of permission module. After all modules have completed self-check, it enters standby state.
[0092] (2) When a user initiates a query request, the system automatically connects to the vehicle R&D permission system to verify the user's identity and access permissions. Users without permissions are directly rejected and prompted, while users with permissions proceed to the next step.
[0093] (4) The front-end interaction module receives the user's natural language text or multimodal file and transmits it to the Dify agent management module.
[0094] (5) The Dify agent completes intent classification through the BERT model and AUTOSAR entity extraction through NER technology to determine user needs and core parameters.
[0095] (6) The reinforcement learning routing module strictly follows the priority order of enterprise knowledge base first, real-time database second, and large model last when scheduling retrieval paths.
[0096] (7) The system first initiates a semantic search to the enterprise knowledge base. If a matching knowledge is found, the knowledge result is returned directly, skipping the subsequent database query; if no matching knowledge is found, proceed to the next step.
[0097] (8) The Prompt module matches a custom template, populates entity parameters, and generates an executable database query command. The database interface module executes the query command and returns structured data results.
[0098] (9) The large model module transforms structured data into natural language answers and completes domain post-processing.
[0099] (10) The front-end module displays the answer to the user, the context module stores the current dialogue in Redis and updates the sliding window; the user can continue to ask follow-up questions, and the system repeats the steps after permission verification until the session ends.
[0100] (11) If there are no results in the enterprise knowledge base and the real-time database, the large model provides a fallback answer based on general AUTOSAR knowledge and marks that there are no matching results in the enterprise knowledge base or database, which is a general reference answer.
[0101] This technical solution also provides several implementation examples for different scenarios.
[0102] In the scenario of querying AUTOSAR SWC configuration information, an automotive electronics MCU low-level development engineer needs to obtain the complete module composition of MCAL and the detailed functional definitions and configuration points of Port Driver during the AUTOSARMCAL development phase. The traditional method requires flipping through multiple specifications, manuals and configuration guides, which takes about 30 minutes each time, and is prone to missing company-specific specifications.
[0103] After adopting this solution, engineers can input "What modules does AUTOSAR MCAL include?" through the web interface. The system verifies their R&D permissions, allowing access to the enterprise's AUTOSAR-specific knowledge base and MCAL configuration database. The BERT model identifies the intent as a query defining AUTOSAR MCAL modules, with a confidence level of 0.98. NER extracts the entity MCAL and module components. The Dify agent triggers the enterprise knowledge base's priority retrieval rules, and vector retrieval matches the "MCAL PORT Module User Manual," directly returning a structured list of modules. The large model, combined with the knowledge base content, generates a professional answer that conforms to the enterprise's development specifications.
[0104] The engineer repeatedly asked, "Could you explain the Port Driver to me in detail?" The context management module, using a Redis sliding window, remembered the first round of conversation and automatically associated it with the explanation of the Port Driver function in the MCAL core module, eliminating the need for repeated explanations. The system first retrieved the "MCAL Port Module Configuration Manual" from the enterprise knowledge base, finding the Port Driver definition, core functions, and configuration points. It then supplemented this by querying the Port module metadata mapping information in the AUTOSAR database. The overall model, combined with enterprise specifications and standard definitions, generated a detailed and professional explanation.
[0105] The entire interaction takes no more than 10 seconds, improving efficiency by over 95% compared to traditional methods. The answers are 100% aligned with internal enterprise development standards, avoiding configuration discrepancies. Multi-turn contextual memory enables seamless follow-up questions, significantly improving the information retrieval efficiency for lower-level development engineers.
[0106] In an AUTOSAR configuration consistency check scenario, a system integration engineer needs to check the data type consistency of all interfaces between SWC_SensorFusion and SWC_DecisionPlanning during the ECU integration phase. Data type mismatches can lead to compilation failures or communication anomalies. Traditionally, this requires manually comparing more than 10 interfaces, taking over 30 minutes and easily overlooking errors. With this solution, the engineer inputs a consistency check question. The system first verifies their development permissions; if approved, the BERT model identifies the intent as a configuration consistency check, and NER extracts the core parameters. The task routing module identifies the problem as a complex task and automatically breaks it down into three steps. The system queries the enterprise's AUTOSAR knowledge base and the real-time AUTOSAR structured database step by step, automatically comparing interface data types. The large model generates a consistency check report based on the comparison results, marking abnormal interfaces and providing correction suggestions. The entire check process takes less than 10 seconds, automatically completing a full interface comparison without omissions or errors, directly providing correction suggestions, avoiding rework caused by integration errors, and improving integration efficiency by over 90%.
[0107] In an AUTOSAR fault data statistics scenario, a test engineer needs to count the occurrences of diagnostic fault codes for ECU_PowerControl within the past 7 days to identify high-frequency faults. Traditional methods require exporting logs and writing scripts for statistics, taking over 2 hours. With this solution, the test engineer inputs a fault statistics question. The system verifies the engineer's testing permissions; if approved, the BERT model identifies the intent as fault statistical analysis, and NER extracts the core entity ECU_PowerControl, diagnostic fault codes, and the time range of the past 7 days. The task routing module identifies that the question requires real-time data aggregation and schedules a real-time AUTOSAR structured database query path. The Prompt module matches a dedicated query template, fills in entity parameters, and generates an aggregation statistical query command. The database interface module executes the query, returning each fault code and its occurrence count. The large model generates a high-frequency fault ranking and analysis suggestions based on the statistical results, automatically labeling the data source and time range. The entire statistical process is completed in seconds, automatically generating analysis conclusions. Test engineers no longer need to process logs or write scripts, improving fault troubleshooting efficiency by 95%.
[0108] In an AUTOSAR after-sales data query scenario, an after-sales technician encounters a vehicle-to-everything (V2X) communication fault in a mass-produced vehicle and needs to query the diagnostic service configuration of the ECU_Infotainment. Traditionally, this requires requesting data from the R&D department, with a response time exceeding 4 hours. With this solution, the after-sales technician inputs the query question via a web interface. The system first verifies the technician's after-sales permissions, confirming access to the mass-produced version data. The BERT model identifies the intent as a diagnostic service configuration query, and NER extracts the entity ECU_Infotainment and the diagnostic service configuration. The hierarchical scheduling module prioritizes searching the enterprise's AUTOSAR-specific knowledge base, matching the after-sales diagnostic configuration manual for that vehicle model. If the knowledge base information is insufficient, a query command is generated to access the real-time AUTOSAR structured database to obtain the latest diagnostic service configuration for the mass-produced version. The large model combines the search results to generate a natural language answer, returning the diagnostic service configuration and fault location suggestions. After-sales personnel can query independently without waiting for R&D support. Fault resolution time is reduced from 4 hours to 1 minute, significantly improving after-sales service efficiency.
[0109] In a scenario where priority retrieval is prioritized from an enterprise's proprietary AUTOSAR knowledge base, a development engineer asks, "What is the minimum operating cycle standard for SWC as stipulated internally by the company?" This question falls under the company's proprietary specifications, with no universal answer, requiring priority retrieval from the enterprise knowledge base. Using this solution, the engineer inputs the question. The BERT model identifies the intent as a query for the enterprise's AUTOSAR specifications, and NER extracts the entity's minimum SWC operating cycle standard. The hierarchical scheduling module directly triggers the enterprise knowledge base priority retrieval rule. Vector retrieval matches the enterprise's internal specification document, which states: "Our company's mandatory standard for the minimum AUTOSAR SWC operating cycle is 5ms, and it must not be lower than this threshold." The system directly returns the standard answer from the enterprise knowledge base, without needing to query a real-time database or call a large model as a fallback. The final answer is displayed as: "According to our company's proprietary AUTOSAR knowledge base, the mandatory standard for the minimum SWC operating cycle is 5ms, and all projects must strictly adhere to this specification in their design." The entire interaction is completed within 10 seconds, and the answer perfectly matches the company's internal development specifications, achieving efficient reuse of enterprise knowledge and avoiding the problem of engineers referring to general knowledge leading to non-standard designs.
[0110] Please refer to Figure 11 , Figure 11 This is a schematic diagram of the structure of a natural language interaction device for an enterprise database.
[0111] This embodiment also provides a natural language interaction device for an enterprise database, including: Input module 201 is used to obtain the natural language text of the input question.
[0112] The recognition module 202 is used to identify the problem type and extract domain object information related to the automotive open system architecture domain from natural language text, and obtain the problem type information, domain object information and query slot information of the input problem.
[0113] The decision module 203 is used to determine the processing path for the current input question based on the question type information, domain object information, and query slot information, according to a preset hierarchical scheduling strategy.
[0114] The first search module 204 is used to search the enterprise's automotive open system architecture-specific knowledge base according to the processing path and obtain the first search result.
[0115] The output module 206 is used to generate and output the answer to the input question based on the first search result if the first search result meets the preset answer generation conditions.
[0116] The second retrieval module 205 is used to generate a query instruction for the structured database of the real-time automotive open system architecture based on the question type information, domain object information and query slot information if the first retrieval result does not meet the answer generation conditions, and execute the query instruction to obtain the second retrieval result.
[0117] The output module 206 is used to generate and output the answer to the input question based on the second search result or the fusion result of the first search result and the second search result if the second search result meets the answer generation conditions.
[0118] The output module 206 is used to call a preset large language model if neither the first search result nor the second search result meets the answer generation conditions, and to generate and output the answer to the input question based on the natural language text and available search evidence.
[0119] It will be understood by those skilled in the art that all or some of the steps and apparatuses in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. As is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0120] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0121] This invention also provides a vehicle control device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the enterprise database natural language interaction method of the above embodiments.
[0122] Taking the example of a processor and memory in a vehicle controller being connected via a bus, the memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the control processor, and these remote memories can be connected to the control device via a network. The non-transitory software programs and instructions required to implement the control methods of the above embodiments are stored in the memory, and when executed by the processor, the control methods of the above embodiments are performed.
[0123] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0124] This invention also provides a vehicle, including the vehicle control device described in the above embodiments.
[0125] The vehicle can be a private car, such as a sedan, SUV, MPV, or pickup truck. It can also be a commercial vehicle, such as a van, bus, small truck, or large semi-trailer. The vehicle must have an electric motor capable of outputting power or acting as a generator to store mechanical energy. When the vehicle is a new energy vehicle, it can be a hybrid or a pure electric vehicle.
[0126] Since the vehicle applies all the technical solutions of the above-mentioned control device or vehicle controller, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0127] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the enterprise database natural language interaction method as described in any of the above specific embodiments.
[0128] This application also discloses a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the enterprise database natural language interaction method as described in any of the preceding embodiments.
[0129] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0130] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices. It should be understood that in this application, “at least one” means one or more, and “more than one” means two or more.
[0131] In the several 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 device, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0132] 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 this embodiment according to actual needs.
[0133] Furthermore, 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. The integrated unit can be implemented in hardware or as a software functional unit.
[0134] If the integrated unit 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, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This 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.
[0135] Although the description of this application has been quite detailed and particularly focused on several of the described embodiments, it is not intended to limit itself to any of these details or embodiments or any particular embodiment. Rather, it should be considered as effectively covering the intended scope of this application by referring to the appended claims and taking into account the prior art, which provides for a broad possible interpretation of these claims. Furthermore, the foregoing description of this application with respect to embodiments foreseeable by the inventors is intended to provide a useful description, and non-substantial modifications to this application that have not yet been foreseen may still represent equivalent modifications.
Claims
1. A natural language interaction method for enterprise databases, characterized in that, The method includes: Obtain the natural language text of the input question; The natural language text is subjected to problem type identification and domain object information extraction related to the automotive open system architecture domain to obtain the problem type information, domain object information and query slot information of the input problem; Based on the question type information, the domain object information, and the query slot information, the processing path for answering the input question is determined according to a preset hierarchical scheduling strategy. The first search result is obtained by retrieving the enterprise's dedicated knowledge base for open automotive system architecture according to the processing path described above. If the first search result meets the preset answer generation conditions, then an answer to the input question is generated and output based on the first search result; If the first search result does not meet the answer generation conditions, a query instruction for a structured database of a real-time automotive open system architecture is generated based on the question type information, the domain object information, and the query slot information, and the query instruction is executed to obtain the second search result. If the second search result meets the answer generation conditions, then the answer to the input question is generated and output based on the second search result or the fusion result of the first search result and the second search result; If neither the first search result nor the second search result satisfies the answer generation condition, a preset large language model is invoked, and based on the natural language text and available search evidence, the answer to the input question is generated and output through the large language model.
2. The method according to claim 1, characterized in that, Specific methods for identifying problem types related to the automotive open system architecture domain in the natural language text include: Generate a corpus specific to the automotive open system architecture domain, wherein the corpus is labeled with at least one question type; The pre-trained language model was fine-tuned using the specific corpus to obtain a question type recognition model; The natural language text is input into the question type recognition model, and the question vector is obtained after processing by the question type recognition model. The problem vector is processed by a normalized exponential function to obtain multiple problem types and a probability value for each problem type; The question type with the highest probability value is selected from the multiple question types as the question type corresponding to the input question.
3. The method according to claim 1, characterized in that, Specific methods for extracting domain object information related to the automotive open system architecture from the natural language text include: Generate an entity corpus in the field of automotive open system architecture, and annotate the entity boundaries and entity categories in the entity corpus; The named entity recognition model was trained using annotated entity corpus. After inputting the natural language text into the trained named entity recognition model, the trained named entity recognition model outputs the entity boundaries and entity categories in the natural language text to obtain the domain object information; The query slot information is generated based on the domain object information.
4. The method according to claim 1, characterized in that, The specific methods for determining the processing path of the input question in this answer include: The task status of the current answering task is determined based on the question type information, domain object information, and query slot information of the current answering task. Multiple candidate processing paths are generated for answering the input question in this test. These multiple candidate processing paths include at least the enterprise automotive open system architecture dedicated knowledge base retrieval path, the real-time automotive open system architecture structured database query path, and the large language model generation path. Determine the reward function corresponding to each candidate processing path, and calculate the instantaneous reward value of the corresponding candidate processing path using the reward function; Based on the preset state-action value function relationship, the current state action value is updated according to the instant reward value, discount factor, learning rate and the state-action value of the next state; Select the candidate processing path corresponding to the maximum current state action value from the multiple candidate processing paths as the optimal processing path; If the task status indicates that the current answer task is a simple task, then the optimal processing path will be used as the processing path for answering the input question this time. If the task status indicates that the current answer task is a complex task, then the current answer task is split into multiple subtasks, and the subtasks are used as the current answer task. Then, the process returns to the step of determining the task status of the current answer task based on the question type information, domain object information, and query slot information of the current answer task.
5. The method according to claim 1, characterized in that, The specific methods for generating the query instruction include: Multiple exclusive query templates for the automotive open system architecture domain are generated, wherein each exclusive query template corresponds to a query type and a database statement structure, and is equipped with variable placeholders; Based on the problem type information, the domain object information, and the query slot information, a target query template is selected from multiple dedicated query templates, and variable placeholders in the target query template are filled to obtain the filled query template; Based on the populated query template, a query request is generated that is compatible with the data source of the structured database of the real-time automotive open system architecture. The query request is sent to the real-time automotive open system architecture structured database to obtain the second search result.
6. The method according to claim 1, characterized in that, The method further includes: After obtaining the natural language text of the input question, based on the session identifier corresponding to the input question, the historical dialogue set is read from the memory database, and the most recent dialogue with a preset data volume is selected from the historical dialogue set as the context; If the natural language text is incomplete, then the natural language text is subjected to reference resolution or omission completion according to the context to obtain a complete natural language representation of the input question; If the problem type information, the domain object information, or the query slot information is incomplete, the missing information is supplemented from the context to generate a new query instruction.
7. The method according to claim 1, characterized in that, The acquisition of the natural language text of the input question includes: In response to the query request, the identity and access permissions of the inputter of the natural language text are verified according to the automotive R&D permission system. The access permissions include access permissions to the enterprise's automotive open system architecture exclusive knowledge base and the real-time automotive open system architecture structured database. If the verification result is unsuccessful, the query request is rejected and a permission error message is displayed. If the verification result is successful, the natural language text of the input question carried in the query request is retrieved.
8. A natural language interaction device for an enterprise database, characterized in that, The device includes: The input module is used to obtain the natural language text of the input question; The recognition module is used to identify the question type and extract domain object information related to the automotive open system architecture domain from the natural language text, so as to obtain the question type information, domain object information and query slot information of the input question; The decision module is used to determine the processing path for answering the input question based on the question type information, the domain object information, and the query slot information, according to a preset hierarchical scheduling strategy. The first retrieval module is used to retrieve the enterprise's automotive open system architecture-specific knowledge base according to the processing path and obtain the first retrieval result. The output module is used to generate and output an answer to the input question based on the first search result if the first search result meets the preset answer generation conditions. The second retrieval module is used to generate a query instruction for a structured database of a real-time automotive open system architecture based on the question type information, the domain object information, and the query slot information if the first retrieval result does not meet the answer generation conditions, and execute the query instruction to obtain the second retrieval result. The output module is further configured to generate and output an answer to the input question based on the second search result or the fusion result of the first search result and the second search result if the second search result satisfies the answer generation condition; The output module is further configured to, if neither the first search result nor the second search result satisfies the answer generation condition, invoke a preset large language model, and generate and output an answer to the input question based on the natural language text and available search evidence through the large language model.
9. A vehicle, characterized in that, The vehicle includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the enterprise database natural language interaction method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program or computer instructions, said computer program or computer instructions being stored in a computer-readable storage medium, wherein a processor of a computer device reads said computer program or computer instructions from said computer-readable storage medium, characterized in that, The processor executes the computer program or the computer instructions, causing the computer device to perform the enterprise database natural language interaction method according to any one of claims 1 to 7.
