Question and answer method, device and equipment based on large language model and storage medium
By using a question-and-answer method based on a large language model, data from multiple business systems in the lithium-ion battery manufacturing field are integrated to generate structured query commands, which solves the problems of long data query time and insufficient value mining, and improves analysis efficiency and decision-making quality.
Patent Information
- Application Number
- CN202511550806.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-01-02
AI Technical Summary
In the lithium-ion battery manufacturing industry, the existing industrial analysis system is fragmented, resulting in excessively long data query times, long production anomaly investigation times, insufficient data value mining, and consequently, decision-making errors.
By using a question-answering method based on a large language model, we obtain the question text, perform semantic understanding, generate structured data query instructions, integrate data from multiple business systems, perform retrieval and analysis, and generate the target answer.
It enables end-to-end data analysis, reduces data query and analysis time, improves analysis efficiency and decision quality, and solves the problem of insufficient data value mining.
Smart Images

Figure CN121256003A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, and in particular, to a question and answer method based on a large language model, a device, equipment and a storage medium. BACKGROUND
[0002] With the rapid development of the global new energy industry, battery manufacturing and energy storage systems are facing unprecedented quality control challenges. In the field of lithium-ion battery manufacturing, the massive data assets generated by the manufacturing execution system (MES), Internet of Things (IOT) and energy management system (EMS) in the factory have not formed effective knowledge sedimentation, resulting in too long time to query production indicators, and even several hours of average troubleshooting time for production abnormalities. The existing industrial analysis system is fragmented in each link, which is inefficient. And due to the fragmentation of each industrial system, it will lead to insufficient data value mining, and thus lead to subsequent decision-making errors. SUMMARY
[0003] The present disclosure provides a question and answer method based on a large language model, a device, equipment and a storage medium, which at least partially overcomes the problems of low data analysis efficiency and insufficient data value mining in the related art.
[0004] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.
[0005] According to one aspect of the present disclosure, a question and answer method based on a large language model is provided, comprising: obtaining a question text; performing semantic understanding on the question text by a large language model to obtain a structured data query instruction; retrieving in a database based on the data query instruction to obtain target data related to the question text, the database including data integrated from first business data obtained from at least one business system; obtaining a target answer to the question text according to the question text and the target data related to the question text by the large language model.
[0006] In some possible embodiments of the present disclosure, it further comprises: obtaining the first business data from each of the business systems; time-aligning at least two of the first business data to obtain second business data, wherein the second business data includes data objects; determining the data association relationship between each data object in the second business data; storing the second business data and the data association relationship to the database.
[0007] In some possible embodiments of the present disclosure, the data objects include a first index, a device, a production line, and a workshop; the data association relationship includes a first association relationship; and the determining the data association relationship between the data objects in the second business data includes determining a first association relationship between the first index, the device, the production line, and the workshop according to the device to which the first index belongs, the production line to which the device belongs, and the workshop to which the production line belongs.
[0008] In some possible embodiments of the present disclosure, the data association relationship includes a second association relationship, and the data objects include a second index; and the determining the data association relationship between the data objects in the second business data includes identifying an influence factor of the second index from the first index of the second business data, and constructing a second association relationship between the second index and the influence factor thereof.
[0009] In some possible embodiments of the present disclosure, the first business data includes at least one of energy consumption data, production data, device monitoring data, and device operation data; and the obtaining the first business data from each of the business systems includes at least one of obtaining energy consumption data from an EMS, obtaining production data from an MES, obtaining device monitoring data from an IOT system, and obtaining device operation data from an EAM (Enterprise Asset Management) system.
[0010] In some possible embodiments of the present disclosure, the database includes a data query interface; and the retrieving in the database based on the data query instruction to obtain the target data related to the question text includes sending the data query instruction to the database through the data query interface, the data query instruction being used to instruct the database to retrieve the target data related thereto, and receiving the target data related to the question text returned by the database through the data query interface.
[0011] In some possible embodiments of the present disclosure, the obtaining the target answer of the question text by the large language model according to the question text and the target data related to the question text includes generating an answer text of the question text by the large language model according to the question text and the target data related to the question text, rendering the target data related to the question text by a chart rendering engine to obtain a visual chart of the question text, and integrating the answer text and the visual chart to obtain the target answer of the question text.
[0012] In some possible embodiments of the present disclosure, when the question text is used to indicate a data query, the target data related to the question text comprises second business data related to the question text; the answer text of the question text comprises a business data distribution; and the generation of the answer text of the question text by the large language model according to the question text and the target data related to the question text comprises: data distribution analysis of the question text and the second business data related to the question text by the large language model to generate the business data distribution.
[0013] In some possible embodiments of the present disclosure, when the question text is used to indicate root cause analysis, the target data related to the question text comprises second business data related to the question text, a first association relationship related to the question text, and a second association relationship related to the question text; the answer text of the question text comprises a root cause analysis result; and the generation of the answer text of the question text by the large language model according to the question text and the target data related to the question text comprises: data distribution analysis of the question text and the second business data related to the question text by the large language model to generate the business data distribution; data association analysis of the question text, the first association relationship related to the question text, and the second association relationship related to the question text by the large language model to obtain an association analysis result; and generation of the root cause analysis result by the large language model based on the business data distribution and the association analysis result.
[0014] In some possible embodiments of the present disclosure, the semantic understanding of the question text by the large language model to obtain a structured data query instruction comprises: intent recognition of the question text to obtain a target intent; determination of a prompt word matched with the target intent; and generation of a structured data query instruction by the large language model according to the question text and the prompt word matched with the target intent.
[0015] In some possible embodiments of the present disclosure, the generation of a structured data query instruction by the large language model according to the question text and the prompt word matched with the target intent comprises: extraction of an entity from the question text and conversion of the entity into an entity vector; retrieval of the entity vector in a professional knowledge base based on a multi-vector retrieval technology to obtain a retrieval result of the entity; and input of the retrieval result of the entity and the prompt word matched with the target intent into the large language model to obtain a structured data query instruction output by the large language model.
[0016] In some possible embodiments of the present disclosure, the retrieval result of the entity and the prompt word matched with the target intent are taken as inputs of the large language model, and a structured data query instruction output by the large language model is obtained, including: the output format of the large language model is constrained by the prompt word matched with the target intent, and the prompt word contains mandatory fields and format specifications of the structured instruction; when the large language model identifies that there is missing key information in the question text according to the retrieval result of the entity, a dialogue guiding mechanism is started; an inquiry text is generated and displayed according to the missing key information in the question text, and the step of obtaining the question text is returned to be executed until the large language model outputs the structured data query instruction.
[0017] According to another aspect of the present disclosure, a large language model-based question and answer device is provided, including: a question obtaining module, configured to obtain a question text; an instruction determining module, configured to perform semantic understanding on the question text by a large language model to obtain a structured data query instruction; a data query module, configured to perform retrieval in a database based on the data query instruction to obtain target data related to the question text, the database including data integrated from business data obtained from at least one business system; and an answer generating module, configured to obtain a target answer of the question text by a large language model according to the question text and the target data related to the question text.
[0018] According to another aspect of the present disclosure, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned large language model-based question and answer method via execution of the executable instructions.
[0019] According to another aspect of the present disclosure, a computer readable storage medium having a computer program stored thereon is also provided, the computer program being executed by a processor to implement the above-mentioned large language model-based question and answer method.
[0020] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, the computer program being executed by a processor to implement the above-mentioned large language model-based question and answer method.
[0021] The question answering method based on the large language model provided by the embodiment of the present disclosure comprises the following steps: obtaining a question text; performing semantic understanding on the question text by a large language model to obtain a structured data query instruction; performing retrieval in a database based on the data query instruction to obtain target data related to the question text, wherein the data included in the database is obtained by integrating business data obtained from at least one business system; and obtaining a target answer to the question text according to the question text and the target data related to the question text by the large language model. In the scheme, first, the business data of each business system is integrated into the database, after obtaining the input question text of the user, the large language model is used to convert the question text into a structured data query instruction, then the target data is queried in the database, the large language model is used to process the question text and the target data, and the target answer is obtained and displayed to the user. The scheme provides a full-link data analysis solution, from data preparation, query understanding to analysis insight, providing end-to-end intelligent services, solving the problem of insufficient data value mining caused by the fragmentation of each industrial analysis system, and reducing the data query and analysis time, improving the analysis efficiency and decision quality.
[0022] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0023] The drawings incorporated into the specification and forming a part of the specification, show embodiments consistent with the present disclosure, and together with the specification, serve to explain the principles of the present disclosure. It is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.
[0024] Figure 1 A structural schematic diagram of an energy storage system in an embodiment of the present disclosure is shown.
[0025] Figure 2 A flowchart of a question answering method based on a large language model in an embodiment of the present disclosure is shown.
[0026] Figure 3 A flowchart of a database construction method in an embodiment of the present disclosure is shown.
[0027] Figure 4 A flowchart of another database construction method in an embodiment of the present disclosure is shown.
[0028] Figure 5 A schematic diagram of an implementation of database construction in an embodiment of the present disclosure is shown.
[0029] Figure 6A flowchart of another method for question answering based on a large language model is shown in the embodiments of the present disclosure.
[0030] Figure 7 A flowchart of a method for generating answer text is shown in the embodiments of the present disclosure.
[0031] Figure 8 A flowchart of another method for generating answer text is shown in the embodiments of the present disclosure.
[0032] Figure 9 A flowchart of visualizing parallel analysis with AI is shown in the embodiments of the present disclosure.
[0033] Figure 10 A flowchart of a method for generating data query instructions is shown in the embodiments of the present disclosure.
[0034] Figure 11 A flowchart of a question answering example based on a large language model is shown in the embodiments of the present disclosure.
[0035] Figure 12 A flowchart of a processing flow of an intent recognition layer is shown in the embodiments of the present disclosure.
[0036] Figure 13 A flowchart of a processing flow of a multi-source data fusion layer is shown in the embodiments of the present disclosure.
[0037] Figure 14 A schematic diagram of a device for question answering based on a large language model is shown in the embodiments of the present disclosure.
[0038] Figure 15 A structural block diagram of an electronic device is shown in the embodiments of the present disclosure. DETAILED DESCRIPTION
[0039] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations can be implemented in any
[0040] In addition, the accompanying drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and serve to explain the principles of the present disclosure. The same reference numbers in different drawings represent the same or similar elements. Some of the block diagrams in the drawings are functional entities that do not necessarily have to correspond to physically or logically independent entities. These functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0041] Because the energy required by people has strong time and space, in order to reasonably use energy and improve the utilization rate of energy, it is necessary to store one energy form by a medium or device into the same or converted into another energy form, and release it in a specific energy form based on future application needs. At present, the main way of green electricity generation is to develop photovoltaic, wind power and other green energy to replace fossil energy.
[0042] At present, the generation of green electricity generally depends on photovoltaic, wind power, water potential, etc., while wind energy and solar energy have strong intermittency and large fluctuation, which will cause the instability of the power grid, and there is not enough electricity during the peak of electricity consumption, and there is too much electricity during the low valley of electricity consumption. Unstable voltage will also cause damage to electricity, so it may cause the problem of "abandoning wind and light" due to insufficient electricity demand or insufficient grid acceptance capacity. To solve these problems, it is necessary to rely on energy storage. That is, the electricity is converted into other forms of energy by physical or chemical means and stored, and the energy is converted into electricity and released when needed. In short, energy storage is similar to a large "power bank", which stores electricity when photovoltaic and wind energy is sufficient, and releases the stored electricity when needed.
[0043] Taking electrochemical energy storage as an example, the present scheme provides an energy storage device applied to an energy storage system, which is provided with a group of chemical batteries inside, mainly using chemical elements in the battery as energy storage medium. The charging and discharging process is accompanied by chemical reaction or change of the energy storage medium. In short, the electricity generated by wind and solar energy is stored in the chemical battery, and the stored electricity is released for use when the use of external electricity reaches the peak, or transferred to places where electricity is in short supply for use.
[0044] At present, the application scene of energy storage (i.e. energy storage) is relatively wide, including energy storage on the power generation side, energy storage on the power grid side, and energy storage on the electricity consumption side, etc. The corresponding types of energy storage devices include: (1) Large-scale energy storage power station (including multiple energy storage prefabricated cabins) applied to wind power and photovoltaic power station side, which can assist renewable energy power generation to meet grid connection requirements and improve renewable energy utilization rate; as a high-quality active / reactive power regulation power source on the power supply side, the energy storage power station realizes load matching of electricity in time and space, enhances renewable energy consumption capacity, reduces instantaneous power change, reduces impact on the power grid, improves new energy power generation consumption problem and has great significance in power grid system backup, relieving peak load power supply pressure and peak regulation.
[0045] (2) The energy storage prefabricated cabin applied in the power grid side, the main functions of which are peak regulation, frequency regulation, and relieving the peak regulation of the power grid, and it can realize peak clipping and valley filling of the power load, that is, charging the energy storage battery when the power load is low, and releasing the stored power when the power load is high, so as to balance the power production and consumption.
[0046] (3) The small energy storage cabinet applied in the power consumption side, the main functions of which are self-generation and self-use of power, peak-valley price difference arbitrage, capacity cost management, and improvement of power supply reliability.
[0047] According to different application scenarios, the power consumption side energy storage can be divided into industrial and commercial energy storage cabinets, household energy storage devices, and energy storage charging piles, which are generally used with distributed photovoltaic power.
[0048] Industrial and commercial users can use energy storage for peak-valley price difference arbitrage and capacity cost management. In the power market implementing peak-valley electricity price, the energy storage system is charged at low electricity price and discharged at high electricity price, realizing peak-valley price difference arbitrage and reducing electricity cost. In addition, industrial enterprises suitable for two-part electricity price can use the energy storage system to store energy at low electricity load and discharge at high peak load, thereby reducing the maximum demand amount and achieving the purpose of reducing capacity electricity cost. Household photovoltaic power storage can improve the level of self-generation and self-use of power. Due to high electricity price and poor power supply stability, household photovoltaic power demand is driven. Considering that photovoltaic power is generated during the day and users generally have high load at night, by configuring energy storage, photovoltaic power can be better utilized, the level of self-generation and self-use can be improved, and electricity cost can be reduced. In addition, communication base stations, data centers, and other fields need to configure energy storage for backup power supply.
[0049] In some embodiments, please refer to Figure 1 , Figure 1 FIG. 1 is a structural schematic diagram of an energy storage system according to an embodiment of the present application, and the present application Figure 1 The embodiment takes the shared energy storage scenario of the power generation and distribution side as an example for description, and the energy storage device of the present application is not limited to the energy storage prefabricated cabin in the power generation and distribution scenario.
[0050] The application provides a kind of energy storage system 100, the energy storage system includes: the energy storage device 110 provided by the application, high voltage cable 120, first electric energy conversion device 130 and second electric energy conversion device 140, in some embodiments of power generation side scene, second electric energy conversion device 140 can be wind power electric energy conversion device, due to the fluctuation, randomness and intermittence of wind power electric energy conversion generated electric energy, unstable electric energy output by wind power electric energy conversion device can be stored to energy storage device 110 by grid connection first, energy storage device 110 is connected with high voltage cable 120 and exports smooth electric energy to supply distribution network for power consumption side, realize peak shaving and frequency modulation, grid stable operation;Or, wind power electric energy conversion device is always connected with high voltage cable 120, and the electric energy output by wind power electric energy conversion device is supplied to distribution network for power consumption side by high voltage cable in ordinary power generation, and when current power consumption load is low, wind power electric energy conversion device generates excess, and the electric quantity generated more is stored to energy storage device 110 first, and the problem of new energy power generation is improved;And when power consumption load is high, grid issues instructions, and the electric quantity stored in energy storage device 110 is transmitted to power consumption side by grid connection mode with high voltage cable 120, provides peak shaving, frequency modulation, backup and other services for grid operation, fully plays the role of grid peak shaving, promotes grid peak clipping, and relieves grid power supply pressure.
[0051] In some embodiments of distribution network side, first electric energy conversion device 130 can be photovoltaic panel, energy storage device 110 is connected with high voltage cable 120 and is installed between downstream of high voltage cable 120 and user load, and the electric energy output by photovoltaic electric energy conversion device is stored in energy storage device 110, which can be used as backup power source in time when grid / distribution network fails;Or, when high voltage cable 120 transmission line appears line congestion, provides power supply support to delay economic pressure generated by grid / distribution expansion to relieve line congestion and grid planning expansion.
[0052] Optionally, the first electric energy conversion device can include but is not limited to photovoltaic panel, and the second electric energy conversion device can include but is not limited to wind power electric energy conversion device, and the first electric energy conversion device 130 and the second electric energy conversion device 140 can convert at least one of solar energy, light energy, wind energy, heat energy, tidal energy, biomass energy and mechanical energy into electric energy.
[0053] Optionally, energy storage device 110 can include but is not limited to energy storage application scenarios such as energy storage power station, hydraulic power generation system, thermal power generation system, wind power generation system, mobile power system, smart home system or temporary power supply system, and is also applied to data center, military equipment, aerospace, charging pile, electric vehicle and other fields.
[0054] Optionally, the energy storage device 110 can include a battery module, a battery pack, a battery cluster, a mobile power supply, a battery storage cabinet / energy storage prefabricated cabin, and the like battery integrated system composed of single batteries. The actual application form of the energy storage device 110 provided in the embodiments of the present application can be, but is not limited to, the listed products, and can also be other application forms. The embodiments of the present application do not strictly limit the application form of the energy storage device 110.
[0055] Optionally, the single battery is not limited to at least one of a cylindrical battery, a square battery, a prismatic battery, or other shaped batteries.
[0056] Optionally, the single battery can be a secondary battery, which refers to a single battery that can be activated by charging after discharging. The single battery can be a lithium ion battery, a sodium ion battery, a sodium lithium ion battery, a lithium metal battery, a sodium metal battery, a lithium sulfur battery, a magnesium ion battery, a nickel hydrogen battery, a nickel cadmium battery, a lead-acid battery, and the like, which is not limited in the present application.
[0057] Under the above system architecture, the embodiments of the present disclosure provide a question and answer method based on a large language model, which can be executed by any electronic device with computing processing capability, such as a server or a processor.
[0058] Figure 2 A flowchart of a question and answer method based on a large language model in the embodiments of the present disclosure is shown as follows. Figure 2 As shown in the flowchart, the question and answer method based on a large language model provided in the embodiments of the present disclosure includes the following steps: S202-S208.
[0059] In step S202, a question text is obtained.
[0060] The question text can be understood as a text information formed by a user in natural language as a carrier for data query or root cause analysis. The question text can include different sentence patterns such as declarative sentences and interrogative sentences, and the content of the question text includes data objects, data conditions, data correlations, and other elements that need to be queried.
[0061] In the present embodiment, the question text can refer to a question expression about the battery manufacturing field in the form of natural language proposed by the user. In the field of battery manufacturing, the question text includes various parameters, material information, equipment status, and other content in the battery production process. Among them, the question text can be a text for querying index data, for example: "the production capacity of the first production line in the first workshop yesterday"; the question text can be a text for solving a specific problem, for example: "analyze the reason for the decrease in production of the first production line in the first workshop yesterday", or "analyze the reason for the high temperature of equipment A in the first workshop".
[0062] In a possible implementation, the user inputted question text is acquired through an input interface. The input interface can be implemented in various manners combining hardware and software.
[0063] For example, a physical keyboard and / or a touch screen can be provided on an operation terminal in a battery manufacturing workshop, and an operator can input the question text by manually tapping the physical keyboard or input the question text by handwriting on the touch screen and converting the handwriting into text by the operation terminal. Further, a voice collection device (e.g., a microphone) and voice recognition software can also be installed on the operation terminal, the voice recognition software is used to convert the voice question inputted by the operator into text, and the voice collection device is used to collect the voice question.
[0064] In step S204, the question text is subjected to semantic understanding by the large language model to obtain a structured data query instruction.
[0065] The large language model is obtained by training a basic model based on massive general text data and then fine-tuning the basic model by using relevant knowledge in the battery field and / or the battery manufacturing field. In this embodiment, the model architecture of the large language model is not limited. The relevant knowledge in the battery field or the battery manufacturing field includes but is not limited to process parameter documents of each link in battery production, material property data, equipment operation specifications, quality detection standards, and technical literature and fault handling cases in the field.
[0066] The large language model obtained by fine-tuning can deeply integrate the general language understanding capability and the professional knowledge in the battery manufacturing field, learn the meanings of special terms in the battery manufacturing field, the logical relationships of process links, and the specific meanings of data indexes, and thus has the capability of efficiently performing semantic analysis, accurately identifying intentions, and converting standard instructions on the natural language question text in the battery manufacturing field, so as to improve the professionalism and accuracy of the large language model in processing data in the battery manufacturing field.
[0067] The structured data query instruction can be understood as a data instruction following specific syntax rules and format specifications, and includes but is not limited to data objects, query conditions, data filtering rules, and other elements. The data query instruction can be determined by the data format of the standardized interface provided by the database, so that the data query instruction can be directly parsed and executed by the database, accurately located to the storage location of the target data in the database, and extracted according to the specified conditions.
[0068] In this embodiment, the question text obtained in step S202 is input into the input layer of the large language model, and the large language model performs word segmentation processing on the question text to divide continuous text into independent lexical units. The segmented words are tagged with parts of speech and entities are identified. Syntax analysis is performed to determine the grammatical relationship between the words. Finally, the overall intent of the question text is analyzed in depth in combination with the knowledge graph of the battery manufacturing field to determine the target intent and query conditions of the user. According to the results of semantic analysis, the large language model maps the parsed target intent and query conditions and other elements into each component of the structured instruction according to the pre-set structured instruction generation rules.
[0069] The format of the structured instruction follows the specifications of the database language and includes target indicators and query conditions. After generating the preliminary structured instruction, the large language model performs multiple rounds of verification. If the verification is successful, the large language model outputs the structured data query instruction.
[0070] The multiple rounds of verification include: 1. Syntax verification to check if the instruction conforms to the syntax rules of the data query language. If there are syntax errors such as missing keywords or mismatched parentheses, the large language model automatically corrects them. 2. Semantic verification to determine if the generated instruction accurately reflects the user's original intent. By comparing the instruction with the semantic analysis results, if there are discrepancies such as missing query conditions or incorrect data fields, the large language model will re-analyze and generate the instruction. 3. Domain adaptability verification to check if the data source table and data fields in the instruction match the database structure in the battery manufacturing field. If there is a mismatch, such as a non-existent data field, the large language model activates the dialogue guidance mechanism and returns a query text to indicate that the user should input more specific question information.
[0071] In step S206, data retrieval is performed in the database based on the data query instruction to obtain target data related to the question text. The data included in the database is integrated from the first business data obtained from at least one business system.
[0072] A business system can be understood as an information system deployed in a production factory to implement specific business functions. Each business system is used for data collection and management of specific businesses. In this embodiment, a business system can refer to various systems deployed in a battery manufacturing factory to implement specific business functions. The business systems include but are not limited to MES, EMS, EAM, IOT, etc. The above-mentioned business systems can interact with the database through an interface.
[0073] The first service data can be understood as referring to the structured data generated by each of the above service systems in the execution of production scheduling, equipment operation and maintenance, quality control, and other business processes. Each service data has attributes such as a timestamp and a unique identifier. For example, the production line yield data generated by the MES system every hour, which includes production line number, production period, qualified quantity, scrap quantity, and the like. For another example, the equipment downtime data generated by the EMS, which includes but is not limited to device ID, downtime start time, downtime reason, and the like. The above service data is stored in the local of each service system in the form of a database table, a log file, and the like.
[0074] The database can be a structured data warehouse formed by ETL (Extraction, Transformation, Loading) tools for standardizing heterogeneous service data from multiple service systems using a distributed or centralized storage architecture. In one possible implementation, each service system periodically or in real time transmits its own service data to the database for storage.
[0075] The target data related to the question text can be understood as referring to the data obtained by executing data positioning and extraction operations in the integrated database using structured data query instructions as keywords, and ultimately matching the information requirements implied in the user question text.
[0076] In one possible implementation, the structured data query instructions are subjected to syntax checking and semantic analysis to determine the data table, field, filtering condition, and sorting method involved in the query. The database management system starts the query optimizer, selects the optimal execution plan based on the index and data volume, and locates the target data storage location. The original data stored in the storage location is read according to the execution plan, the specified index information is extracted to form a preliminary data set, and the data set is transmitted to the cache area in a streaming manner. The data field integrity and missing conditions are checked, the data rationality is verified according to the business rules, the abnormal data is marked and recorded. The target data that passes the verification is converted into a unified structured format and output to the large language model.
[0077] In one exemplary implementation, in the battery manufacturing scenario, for the question text "B production line 2025 August first week battery production", the related target data includes the daily total production, qualified quantity, and other business data of the B production line from August 1, 2025 to August 7, 2025.
[0078] In step S208, the large language model obtains the target answer to the question text based on the question text and the target data related to the question text.
[0079] The target answer refers to the natural language answer generated by the large language model based on the semantic analysis result of the question text, after filtering, calculating, and inducing the target data.
[0080] In one possible implementation, the question text and target data are formatted and converted into an input format recognizable by the large language model. The question text is kept in its original natural language form, and the target data is structured and encapsulated according to data types.
[0081] The large language model loads the fine-tuning parameters in the battery manufacturing field and jointly analyzes the input question text and target data. First, the target intent of the question text is analyzed; second, the target data is calculated or induced; finally, the answer is generated according to the expression specifications of natural language. For example, the target answer generated by the large language model is: "A production line has a daily production of 1190 units from August 15, 2025 to August 21, 2025."
[0082] In one possible implementation, if the question text is a root cause analysis type, the question text is structured and decomposed, and key data including abnormal phenomena, data objects, time ranges, and potential correlation dimensions are extracted. Professional terms are marked through a domain word table, and semantic vectors are generated to capture the intent characteristics of cause exploration.
[0083] The large language model loads the professional knowledge base in the battery manufacturing field, and performs multi-dimensional matching on the target data based on domain rules to identify potential influencing factors, such as temperature fluctuations, equipment parameter abnormalities, and material quality fluctuations. For time series data, the sliding window algorithm is used to calculate the time sequence correlation between abnormal phenomena and factors, such as calculating the Pearson coefficient between the amplitude of the encapsulation temperature fluctuation and the failure rate, and screening out candidate factors with significant correlation.
[0084] The analytic hierarchy process is used to calculate the weights of the candidate factors, and the weights are assigned based on domain experience to generate a factor influence degree ranking; a cause-effect chain expression is generated based on the weight ranking; target data is embedded in the answer as supporting evidence, in addition, cause-effect logicality verification and evidence sufficiency verification can also be added, and finally the large language model outputs the target answer, which adopts a "conclusion-evidence-suggestion" three-part structure.
[0085] In this scheme, first, the business data of each business system is integrated into a database, after obtaining the question text input by the user, the large language model is used to convert it into a structured data query instruction, then the target data is queried in the database, the large language model is used to process the question text and the target data to obtain the target answer, which is displayed to the user. This scheme provides a full-link data analysis solution, from data preparation, query understanding to analysis insight, providing end-to-end intelligent services, solving the problem of insufficient data value mining caused by the fragmentation of each industrial analysis system, while reducing the time of data query and analysis, improving analysis efficiency and decision-making quality.
[0086] On the basis of the above-mentioned embodiments, before the user input question text is acquired, the first business data in each business system needs to be integrated into the database to solve the problem of data island. The construction method of the database is specifically explained in the embodiments of the present application, as shown in Figure 3 The embodiment provides a data construction method, and specifically comprises steps S302-S308.
[0087] In step S302, the first business data is acquired from each business system.
[0088] The first business data refers to the original data directly collected from each business system such as the production execution system, the equipment management system and the energy management system of the battery manufacturing factory. Since the data formats used in different business systems are different, and different first business data come from different business systems, the plurality of first business data is multi-source heterogeneous data. For example, the production execution system generates a production line yield data every 10 seconds, the equipment management system generates a device temperature data every 500 milliseconds, and the energy management system generates a power consumption data every 1 second.
[0089] Further, the first business data includes at least one of energy consumption data, production data, equipment monitoring data and equipment running data. Taking the battery manufacturing production line yield as an example, the production execution system provides production data, such as real-time running capacity; the energy management system provides energy consumption data, such as real-time power consumption; the equipment management system provides equipment running data, such as equipment boot time; and the IOT system acquires equipment monitoring data, such as real-time detection temperature.
[0090] In the embodiment, the database of the special project is established as the core data hub, the first business data dispersed in the MES, the IoT device and the EMS is acquired through the timing synchronization mechanism, and after the standardized cleaning and processing, the first business data is stored in the database, so as to solve the problem of data island.
[0091] Specifically, a data communication link is established with each business system through a pre-set standardized interface. For different business systems such as the production execution system, the equipment management system and the energy management system, corresponding interface parameters are configured, for example, the first business data transmitted by each business system is set to be acquired in real time.
[0092] In step S304, at least two first business data are time-aligned to obtain second business data, wherein the second business data includes a data object.
[0093] The time alignment refers to adjusting the first business data from different business systems to a unified time scale or time node, so that the business data is comparable and related in the time dimension. For example, the production execution system generates a production line yield data every 10 seconds, the equipment management system generates a device temperature data every 500 milliseconds, and the energy management system generates a power consumption data every 1 second, which are aligned to the millisecond level.
[0094] The second business data is a data set formed after the time alignment processing, has a unified time reference, and the time correlation between the data is clear. The data type of the second business data is at least two of the processed energy consumption data, production data, device monitoring data, and device operation data, which can be directly used for multi-dimensional data analysis. The second business data retains the core information of the first business data, and through the time dimension alignment, eliminates the data correlation error caused by the time record difference.
[0095] The data object is a specific entity object contained in the second business data, which refers to a data carrier with clear attributes, such as: workshop identification, production line identification, device identification, various production indicators, etc. For example, the production indicators can include: power consumption, device temperature, device running speed, yield, etc.
[0096] In this embodiment, the millisecond-level alignment of the first business data of each business system is performed by using the stream processing technology to obtain the second business data.
[0097] The stream processing technology refers to a technical architecture for low-latency, incremental processing of continuous data sequences (data stream) generated in real time, which can receive, analyze, calculate and distribute in real time while the data is generated, without waiting for the data batch collection to be completed, and is suitable for real-time collaborative processing of multi-source heterogeneous data in industrial scenarios.
[0098] The millisecond-level alignment refers to adjusting the first business data from different business systems with different time stamps to a unified millisecond-level time reference, so that the deviation of all business data in the time dimension is controlled within the millisecond level, so that the strong correlation of the business data in the time dimension provides a time consistency basis for subsequent multi-source data correlation analysis.
[0099] In one possible implementation, the first business data obtained from each business system is preprocessed, mainly including: setting data filtering rules, eliminating invalid data, and performing noise reduction processing on the data, so that the quality of the obtained first business data meets the subsequent alignment requirements.
[0100] A distributed clock synchronization mechanism is constructed, and each first business data obtained is time-stamped and calibrated. The deviation value of the original time stamp and the reference clock is calculated to correct the time stamp of each first business data. A sliding time window is divided according to millisecond level granularity, and the window start time is strictly synchronized with the reference clock. When the preprocessed first business data is obtained, it is distributed to the corresponding time window according to the calibrated time stamp.
[0101] For multi-source data in the same time window (such as the production data of the production execution system, the temperature data of the device management system, and the power consumption data of the energy management system in window 1), a data alignment operation is performed. Specifically, by matching the time stamps in the window, the time stamp deviation of all business data is less than or equal to the window granularity; for some data missing in the window (such as a window only having temperature data without production data), it is marked as "data missing" and the missing duration is recorded, and a data completion mechanism is triggered to make the multi-source data in each time window complete and time-synchronized.
[0102] In step S306, the data association relationship between each data object in the second business data is determined.
[0103] The data association relationship refers to the relationship between the data objects in the second business data, mainly including a first association relationship and a second association relationship, wherein the first association relationship is a first index hierarchical relationship, and the second association relationship is a relationship between a second index and its influencing factor.
[0104] The first index hierarchical relationship can be represented in a network topology. For example, the first index hierarchical relationship is a four-level association of "workshop-line-device-first index", wherein the workshop, line, device, and first index are nodes in the network, and the edges between the nodes represent the subordinate or aggregation relationship. For example, the "battery cell workshop" node is connected to the "A line" node and the "B line" node through an edge, the "A line" node is connected to the "device C" node through an edge, and the "device C" node is connected to the "running speed" and "consumption power" index nodes. The attributes of the edge include the association type, such as inclusion and attribution.
[0105] The relationship between the second index and its influencing factor refers to the causal or correlation relationship between the associated factors influencing the second index value change and the second index. For example, the second index is "hourly production", and its influencing factors include "device running speed", "device temperature", and "material supply speed". Among them, the device running speed exceeding the standard range will directly lead to a decrease in production, constituting a causal relationship; the material supply speed is positively correlated with the production. The relationship between the second index and its influencing factor is represented in the form of network topology, and each second index and influencing factor is a node. The attributes of the edges between the nodes include the influence relationship and the weight. The influence relationship includes causal relationship, positive correlation, negative correlation, etc.
[0106] In the embodiment, three types of data objects, workshop, production line and first index, are identified from the second business data, and attributes of each object are extracted and assigned with unique identifiers; according to the business rule of “workshop-production line-first index”, the three are mapped into network nodes, and edges are established to form a three-level hierarchical network.
[0107] The potential or invisible influencing factors between each first index are analyzed, and the relationships such as causality, positive correlation and negative correlation are determined by combining statistical analysis and domain knowledge, and the second index and its influencing factors are taken as nodes, and the edges are labeled with influence relationships and weights to form a network of relationships between the second index and its influencing factors.
[0108] The logical rationality of the association is verified according to the business logic, and the network topology is optimized, and finally the structured association relationship is output.
[0109] In step S308, the second business data and the data association relationship are stored in the database.
[0110] In the embodiment, a graph database can be used to store the association relationship between the networked data objects, and a node table and an edge table are determined, wherein the node table contains fields such as node unique identifier, node type (workshop, production line, device, index, influencing factor), and attribute information. The edge table includes fields such as edge unique identifier, starting node identifier, target node identifier, edge type (containment, ownership, causal association, etc.), and edge attribute (weight). At the same time, the business data table is associated with the node table through the node identifier, so that the index value in the second business data can be mapped to the corresponding network node.
[0111] The second business data is stored in the business data table according to the timestamp and the node identifier, so that each piece of data can be associated with the index node in the network. The node information and the edge information are written into the node table and the edge table of the graph database respectively, and the association between the edges and the nodes is established through the node identifier.
[0112] The embodiment provides a multi-source heterogeneous business data fusion method, which realizes cross-system data fusion and analysis by establishing a unified data integration and processing platform. The simple data integration mode in the related art is broken through, and the real-time association problem of multi-source heterogeneous industrial data is solved through a space-time dimension alignment algorithm, and millisecond-level data synchronization is realized.
[0113] On the basis of the above embodiment, the method for constructing a database is optimized, as shown in Figure 4 The steps for constructing a database provided by the embodiment include S402-S418.
[0114] In step S402, energy consumption data is obtained from an EMS.
[0115] The energy consumption data can be understood as raw data collected by the EMS, reflecting the energy use in the battery production process, wherein the energy consumption data includes: energy type, consumption value, collection timestamp, corresponding production line identifier or equipment identifier, and the like, for example, the power consumption of a certain hour of A production line.
[0116] In this embodiment, an industrial standardized communication protocol is adopted to build a special data interface with the EMS, and the target production line, energy type, and obtained fields are set according to the demand. The EMS is periodically requested for data, and after responding, the energy consumption data is pushed in a streaming manner. The energy consumption data is temporarily stored in the raw data storage area.
[0117] In step S404, production data is obtained from the MES.
[0118] The production data can be understood as raw data collected by the MES, reflecting the core state of battery production. The production data includes but is not limited to: production line number, production batch, work order number, actual production capacity, planned production, production time, qualified quantity, unqualified quantity, and unqualified type, and the like.
[0119] In this embodiment, the API special interface supported by the MES is adapted, and a data subscription application is submitted to the MES. The MES pushes the production data extraction core field according to the subscription frequency, unifies the field name, time format, and unqualified type classification, and the parsed production data is directly temporarily stored in the raw data storage area.
[0120] In step S406, equipment monitoring data is obtained from the IOT system.
[0121] The equipment monitoring data can be understood as raw data collected by the IOT system sensor, reflecting the real-time running state of the production equipment, including but not limited to: equipment number, monitoring index (such as temperature, vibration frequency, pressure, and rotation speed), index value, collection timestamp, and the like, for example: the real-time heat sealing temperature of the packaging equipment of A production line.
[0122] In this embodiment, multi-sensor protocol conversion is realized through an industrial gateway, and a real-time data transmission link with the IOT system is established. The IOT system transmits the raw data collected by the sensor in real time, and after receiving, the sliding window mean method is used for noise reduction processing. The equipment monitoring data after noise reduction processing is temporarily stored in the raw data storage area.
[0123] In step S408, equipment running data is obtained from the EAM system.
[0124] The equipment operation data can be understood as raw data collected by the EAM system, reflecting the operation efficiency and operation and maintenance state of the equipment, including but not limited to: equipment number, on-off state (on time, off time, start-stop times), operation time, equipment comprehensive efficiency, maintenance record, fault record and the like.
[0125] In the embodiment, a SOAP interface is used to build a communication link with the EAM, a data query request is initiated to the EAM, the EAM pushes the equipment operation data in a streaming manner after responding, and after obtaining the equipment operation data, the equipment operation data is parsed and structured, and the processed equipment operation data is directly stored in the raw data storage area.
[0126] In the embodiment, a timing synchronization mechanism is used to standardize and store the raw business data scattered in the MES, IoT equipment, EMS and the like, so as to solve the data island problem.
[0127] In step S410, the at least two first business data are time-aligned to obtain second business data, wherein the second business data includes data objects.
[0128] The time alignment process provided in the embodiment is the same as the time alignment manner provided in step S304 of the above embodiment, and specific descriptions can be referred to the descriptions in the above examples.
[0129] In step S412, a first correlation relationship among the first index, the equipment, the production line and the workshop is determined according to the equipment to which the first index belongs, the production line to which the equipment belongs and the workshop to which the production line belongs.
[0130] In the embodiment, all data objects are filtered out from the second business data, and are divided according to the workshop, the production line, the equipment and the index. The first index can be understood as a set of all production indexes in the second business data. For example, from the second business data of the battery manufacturing A production line, the data objects of "battery cell workshop", "A production line", "B equipment" and "packaging temperature" are identified.
[0131] According to the battery manufacturing business logic, the subordinate rules of "workshop-production line-equipment-first index" are determined. For example, the "workshop contains production line" rule (1 workshop corresponds to 1-N production lines), the "production line includes equipment" rule (1 production line corresponds to N equipment), and the "index belongs to equipment" rule (1 equipment corresponds to N first indexes) are set.
[0132] The workshop, production line, equipment, and first index are mapped to network nodes, and the associated edges between nodes are established according to rules. For example, an edge is established between the "battery cell workshop" node and the "A production line" node, and the edge attribute is marked as "association type: contains"; an edge is established between the "A production line" node and the "equipment C" node, and the edge attribute is marked as "association type: contains"; and an edge is established between the "equipment C" node and the "packaging temperature" node, and the edge attribute is marked as "association type: belongs to".
[0133] According to the above mapping relationship, a four-level network topology of "workshop-production line-equipment-first index" is built, so that each index node can be traced back to the production line and workshop through the edge, there is no isolated node, and finally the first association relationship is obtained.
[0134] Further, the first index that does not belong to the equipment can be related to the production line. For example, the relationship between "production line" and "production capacity". "Production capacity" may not have a relationship with some equipment.
[0135] In this embodiment, a timestamp alignment algorithm is used to perform millisecond-level time synchronization on the multi-source heterogeneous data collected by each business system, a hierarchical association model of "equipment-production line-workshop-index" is established based on the physical location of the equipment and the layout of the production line; and a unified data association model is constructed by combining the above two (i.e., space-time dimension information), to realize automatic matching and fusion of multi-source data and form a complete production energy data view.
[0136] S414, identifying the influence factor of the second index from the first index of the second business data.
[0137] The second index refers to a quantitative parameter that has a core guiding role on production efficiency, product quality, and cost control in the battery manufacturing process, and is a core focus object of production control and optimization. For example, "production line hourly output" directly reflects the production capacity level, and "product first-time yield" is directly related to the quality cost. Exemplarily, the second index is a set of indexes that need to be focused on in the set of all production indexes in the second business data. In other words, the second index is a subset of the first index, that is, the second index must belong to the first index, and the first index does not necessarily belong to the second index.
[0138] The influence factor refers to a variable in the second business data that can cause fluctuations in the value of the second index, including various indexes, such as equipment operating parameters, process parameters, and environmental parameters. The influence factor can be divided into direct influence factors and indirect influence factors. Taking "A production line hourly output" as an example, the influence factors include "packaging equipment running speed", "battery cell material supply speed", "packaging equipment heat sealing temperature", and "workshop environment temperature".
[0139] In this embodiment, the second index is screened according to the business target (capacity or quality), and the time series data and attributes thereof are extracted. From the categories of equipment operation, material supply, environment, process parameters and the like of the second business data, potential influencing factors are screened. Then, irrelevant factors are removed according to process common sense; and through data trend comparison and change correlation analysis, effective influencing factors with strong correlation with the second index are retained.
[0140] S416, a second correlation between the second index and the influencing factors thereof is constructed.
[0141] According to process logic and causality analysis, the correlation relationships such as causality, positive correlation and negative correlation are determined. The second index and the influencing factors thereof are stored in the form of network topology or correlation table.
[0142] The second index and the influencing factors thereof are mapped to network nodes, and the correlation edges between the nodes are established according to rules. For example, an edge is established between the "A production line hourly output" node and the "packaging equipment running speed" node, and the edge attribute is marked as "correlation type: causality"; an edge is established between the "A production line hourly output" node and the "battery cell material supply speed" node, and the edge attribute is marked as "correlation type: positive correlation"; and an edge is established between the "A production line hourly output" node and the "workshop environment temperature" node, and the edge attribute is marked as "correlation type: negative correlation". In addition, the corresponding influencing factors of the "packaging equipment running speed", "battery cell material supply speed" and "workshop environment temperature" can also be determined. For example, the relationship between the "packaging equipment running speed" and the "packaging equipment power" and the "packaging equipment current".
[0143] It should be noted that, in the complex process of battery production, any index does not exist in isolation, and multiple second indexes are correlated in a causal hierarchy, so the influencing factors and the second indexes in the second correlation are relative. That is, an index can be a second index or an influencing factor. For example, "pass rate" is an influencing factor of "daily output", and in this causal relationship, "pass rate" is an influencing factor and "daily output" is a second index; correspondingly, "compaction density consistency" is an influencing factor of "pass rate", and in this causal relationship, "pass rate" is a second index and "compaction density consistency" is an influencing factor.
[0144] In this embodiment, the second correlation between the second index and the influencing factors thereof is constructed, the implicit relationship between the second index and the influencing factors is automatically recognized, and a data basis is provided for subsequent implementation of index anomaly analysis.
[0145] S418, the second business data and the data correlation relationship are stored in a database, wherein the database comprises a data query interface.
[0146] In the embodiment, the database provides a unified data query interface to support flexible calling of the upper application.
[0147] In a specific implementation manner, as shown in Figure 5 a data interface with the EMS system 510 is established to obtain power consumption data in real time; the MES system 520 is connected to collect production operation data such as actual capacity and planned production; the integrated IoT platform 530 is connected to obtain real-time monitoring data such as device temperature; the EAM system 540 is connected to extract device running index data such as device on-off state and OEE (Overall Equipment Effectiveness).
[0148] A timestamp alignment algorithm is used to perform second-level time synchronization on heterogeneous system data; a hierarchical correlation model 550 of "device-line-plant-index" is established based on device physical location and line layout; and a unified data correlation model is constructed in combination of the above two (i.e., space-time dimension information), to realize automatic matching and fusion of multi-source data, and form a complete production energy data view. A relationship model 560 of the second index and its influence factors is constructed to realize abnormal analysis of the second index.
[0149] Finally, the database provides a standardized RESTful data query interface 570 to support data retrieval according to dimensions such as line and time period.
[0150] In the embodiment, the system belonging of each data source is first defined, and then based on the key common feature of space-time dimension, a unified data intermediate layer is constructed, which effectively solves the problems of scattered storage and non-uniform standards of multi-source energy data in industrial production, provides a complete and accurate data support system for energy management and energy optimization, and significantly improves the traceability and root cause analysis efficiency of energy data. The architecture design of "first governance and then analysis" not only ensures the complete collection of original data, but also realizes the deep fusion of multi-dimensional data, and builds a unified and standardized data foundation for subsequent abnormal diagnosis and root cause analysis.
[0151] On the basis of the above embodiment, the application embodiment optimizes the question and answer method based on the large language model, as shown in Figure 6 The optimized question and answer method of the large language model mainly includes the following steps: In step S602, the question text is obtained.
[0152] In the embodiment, the process of obtaining the question text is the same as the process of obtaining the question text in S202 in the above embodiment, and the specific description can be referred to the description in the above embodiment.
[0153] In step S604, the question text is subjected to intent recognition to obtain a target intent.
[0154] The target intent refers to the core requirement of the user after the question text is subjected to intent recognition. In the battery manufacturing scenario, the target intent includes data query and root cause analysis. The data query refers to obtaining basic data related to the production capacity of a specific production line, such as historical production, real-time production, and planned production. The root cause analysis refers to exploring the reasons for the deviation of the production capacity of the production line from the normal situation, positioning the problem, and providing reasonable suggestions.
[0155] In this embodiment, the question text input by the user is cleaned to remove irrelevant characters and unify the text format. Based on historical question data in the battery manufacturing field, an intent classification model is constructed. The intent classification model can use a deep learning text classification algorithm, with the pre-processed question text features as input and the intent category as output. The pre-processed question text is input into the trained intent classification model, and the model outputs the intent category with the highest probability. For example, the question text is "B production line production is less than the plan, what is the situation", and the model identifies the root cause analysis intent. The question text is "C production line daily production summary this month", and the data query intent is identified.
[0156] In step S606, a prompt word matching the target intent is determined.
[0157] The prompt word refers to a text content that is defined in advance according to different target intents to guide the large language model to understand the task requirements and standardize the output format. For the data query intent, the prompt word needs to emphasize the accurate extraction of data dimensions, such as time range and production line identifier. For the root cause analysis intent, the prompt word needs to highlight the correlation factor mining, such as device parameters, material supply, process execution, and abnormal logic deduction, so that the large language model can generate effective content according to the business scenario requirements.
[0158] In this embodiment, the demand information of the battery production line production scenario is sorted according to the target intent, and a prompt word library is constructed. According to the target intent identified in step S604, the corresponding prompt word is determined from the prompt word library.
[0159] In step S608, the large language model generates a structured data query instruction based on the question text and the prompt word matching the target intent.
[0160] In this embodiment, the question text and the matching prompt word are spliced to form the input of the large language model. Based on the pre-trained knowledge and the input content, the large language model understands the user's requirements and the requirements of the prompt word, and generates instructions. The model internally analyzes the production line, time, intent, and other elements in the input through attention mechanism and multi-layer semantic encoding, generates instructions containing clear elements according to the structured instruction specification.
[0161] In this embodiment, the conversion from user natural language questions to accurate structured data query instructions is realized, replacing manual query instruction writing and improving analysis efficiency.
[0162] In step S610, the data query instruction is sent to the database through the data query interface, and the data query instruction is used to instruct the database to retrieve the target data related thereto.
[0163] In this embodiment, the database provides a standardized query interface, which can be an API interface. The data query interface is a standardized communication channel between the large language model and the database for data interaction, used to receive structured data query instructions and return structured target data.
[0164] The standardized data query instruction is adapted to the data format of the data query interface, and does not need to be converted in format. The data query instruction is directly transmitted to the database through the data query interface, and the target data is retrieved in the database.
[0165] In step S612, the target data related to the question text returned by the database is received through the data query interface.
[0166] In this embodiment, after the database receives the data query instruction, it performs a data retrieval operation, and generates a response result after the retrieval is completed. The response result includes a response status code and data content. The database encapsulates the response status code and data content into a target data packet according to the response format specification of the standardized API and returns it to the data query interface.
[0167] In this embodiment, the data query interface can decouple the upper-layer data application system (large language model) and the lower-layer database, reduce the dependence and association between systems, and improve the overall maintainability and scalability.
[0168] In step S614, the large language model generates an answer text for the question text based on the question text and the target data related to the question text.
[0169] The answer text refers to the structured and natural language answer content generated by the large language model based on the demand intention of the question text and the core information of the target data.
[0170] In this embodiment, the question text and the target data are first structured and preprocessed, so that the large language model can accurately understand the input content. The preprocessed input content is input into the large language model. The large language model completes data interpretation, logical organization, and text output based on the pre-trained battery field knowledge and language generation capability, and generates an answer text.
[0171] In this embodiment, when the question text is used to indicate data query and is used to indicate root cause analysis, the large language model adopts different processing procedures, which are analyzed and explained in detail below.
[0172] In one possible implementation, when the question text is used to indicate data query, the target data related to the question text includes: second business data related to the question text; the answer text of the question text includes business data distribution; as Figure 7 As shown in FIG. 7, the large language model generates the answer text of the question text according to the question text and the target data related to the question text, including: step S702.
[0173] In step S702, the large language model performs data distribution analysis on the question text and the second business data related to the question text to generate the business data distribution.
[0174] In this embodiment, the large language model uses statistical methods and business logic rules to perform data distribution analysis. Specifically, the time series distribution of daily capacity is calculated to identify the trend of capacity change with date; the capacity distribution of working days and rest days is compared; the weekly capacity distribution characteristics are counted to mine the weekly periodic distribution rule of production capacity; the average value, median value, maximum value, minimum value, etc. of daily capacity are calculated.
[0175] According to the data distribution analysis result, the large language model outputs the analysis conclusion as the business data distribution in a structured and standardized manner according to natural language generation rules.
[0176] In this embodiment, the large language model is used to analyze the data periodicity between the second business data, improving the data analysis quality and efficiency.
[0177] In one possible implementation, when the question text is used to indicate root cause analysis, the target data related to the question text includes: second business data related to the question text, first association relationship related to the question text, and second association relationship related to the question text; the answer text of the question text includes root cause analysis result; as Figure 8 As shown in FIG. 8, the large language model generates the answer text of the question text according to the question text and the target data related to the question text, including: steps S802~806.
[0178] In step S802, the large language model performs data distribution analysis on the question text and the second business data related to the question text to generate the business data distribution.
[0179] In this embodiment, the data distribution analysis is the same as the data distribution analysis process in S702 in the above embodiment, and the specific description can be referred to in the above examples.
[0180] In step S804, the large language model performs data association analysis on the question text, the first association relationship related to the question text, and the second association relationship related to the question text to obtain an association analysis result.
[0181] In this embodiment, the question text expressed in natural language, the first association relationship constructed, and the second association relationship constructed are loaded together with the professional knowledge in the battery field to form a structured input data set that can be parsed by the large language model. Based on the first association relationship, the large language model starts from the target indicator in the question text and traces its belonging device, production line, and workshop layer by layer to determine the specific attribution subject of the abnormal indicator and exclude irrelevant data objects to narrow the analysis range.
[0182] Based on the second association relationship, the large language model filters the influence factor corresponding to the target indicator in the question text from the second association relationship and checks whether the applicable conditions of the influence factor corresponding to the target indicator are met (for example, whether the device is in a normal operating state and whether the parameter is in a valid interval). If the applicable conditions of the influence factor are not met, it is determined that the influence factor is the factor causing the abnormality.
[0183] After the above analysis, the influence factor associated with the abnormal data and whether the influence factor is abnormal can be obtained as the association analysis result.
[0184] In step S806, the large language model generates a root cause analysis result based on the business data distribution and the association analysis result.
[0185] In this embodiment, the abnormal distribution point of the target indicator is identified from the business data distribution, the value change of the influence factor corresponding to the abnormal point is compared with the influence factor in the association analysis result, the theoretical fluctuation amplitude of the target indicator corresponding to the influence factor change is calculated, and the actual abnormal amplitude of the target indicator is matched. Combined with the cross-validation result, the potential influence factors without data support or with low matching degree are excluded, the influence factor with strong correlation with the target indicator and meeting the logic is determined, the distribution of other associated parameters is checked to exclude interference factors, the root cause is determined, reasonable suggestions are given according to the root cause of the abnormality, and finally the large language model outputs the structured root cause analysis result. The root cause analysis structure includes: abnormal data, root inference, and processing suggestion.
[0186] For example, the root cause analysis result is as follows: “Abnormal analysis report: abnormal power consumption of production line A in February 2024 Core findings 1. Abnormal characteristics: - Occurrence time: 02-15 14:30~17:45 (3.25 hours) - Deviation: +37.6% (out of expected interval) - Main impact: ¥2,850 increase in energy cost for the day 2. Root cause inference (confidence 85%): - Equipment cooling system efficiency drop (temperature sensor data anomaly) -- 40% impact - Concurrent production plan change (MES work order record verification) -- 40% impact - Sudden environmental temperature rise (external weather data corroboration) -- 20% impact 3. Handling recommendations: Prioritize checking the cooling pump (maintenance records show it has exceeded the maintenance cycle) Adjust production scheduling to avoid high-temperature periods Continuously monitor the next three production batches.
[0187] In this embodiment, the LLM can directly perform data distribution and correlation analysis, and then integrate the data distribution and correlation results to improve the efficiency of root cause analysis.
[0188] In step S616, the target data related to the question text is rendered by a chart rendering engine to obtain a visual chart of the question text.
[0189] The chart rendering engine refers to a professional component or software with data visualization conversion function. It can select an appropriate chart type according to the type of target data and the user's target intention, and convert structured data into intuitive visual charts according to the preset visual specification.
[0190] The visual chart refers to a visual carrier that presents target data in the form of a chart, output by the chart rendering engine. The types of visual charts include line charts for showing production time series changes, column charts for comparing production in different time periods, and pie charts for presenting production proportions.
[0191] In this embodiment, Echarts is used as the core visualization engine. This component has strong interactive features, supports 12 types of user interaction operations, and can realize dynamic data exploration. It provides 28 standard chart types, covering all-scenario visualization needs from basic column charts to complex relationship network charts. As a leading visualization solution in the industry, it supports real-time visualization of millions of data points.
[0192] In step S618, the answer text and the visual chart are integrated to obtain the target answer to the question text.
[0193] The target answer is formed by integrating the answer text and the visual chart, and meets the final output result of the user's query demand, and has detailed interpretation of the text and intuitive presentation of the chart. The user can obtain accurate data conclusion and professional analysis through the text, quickly identify data trends or comparison relationships through the chart, realize dual information transmission of text interpretation and graphical assistance, and improve the understanding efficiency of production data and the decision support value.
[0194] In the embodiment, the large language model and the chart rendering engine are deeply cooperated through the standardized interface, the AI analysis anchor point is embedded in the visual result, the answer text is automatically associated with the related visual chart, and the target answer is obtained. In actual application, the data analysis efficiency is improved by 3 times, and the abnormal discovery speed is improved by 80%.
[0195] In a specific implementation manner, as shown in Figure 9 The target data is obtained from the standardized interface of the database, and after double-channel processing, the target data is divided into two parallel processing links, one of which enters the visualization layer and the other of which enters the AI analysis layer. In the visualization layer, the configuration rendering engine is configured, the chart type and style are configured according to the battery scene demand, and the standardized data is automatically converted into a basic chart. Then, the battery industry components are extended based on the Echarts framework, and the dynamic visual chart is generated through the tight coupling optimization scheme. In the AI analysis layer, the LLM inference engine is loaded, the target data is inferred, the root cause is located based on the LLM inference, and the processing suggestion is generated in combination with the industry solution. The dynamic chart of the visualization layer and the root cause suggestion of the AI analysis layer are integrated to form a fusion decision board, which provides data with present situation visualization, clear root cause and clear suggestion for production decision.
[0196] In the embodiment, the dual-engine architecture of visual interaction and LLM intelligent analysis is proposed, which provides deep intelligent diagnosis capability while maintaining the intuitiveness of data display, forms a complete analysis closed loop, and realizes all-round upgrade of data analysis and decision support. In the visualization analysis layer, the visual result is generated through the configuration chart rendering engine. The index situation awareness can be realized by extending the Echarts third-party tool, or the optimization scheme of tight coupling of front end and back end can be adopted according to the performance or page style demand. In the AI intelligent analysis layer, the analysis data is sent to the LLM engine for deep analysis, and the intelligent root cause reply of multi-influence factor analysis and processing suggestion is automatically generated. The double-channel processing mode not only retains the intuitiveness of traditional visualization analysis, but also integrates the insight of AI analysis. Through the standardized data interface, the analysis results of the two dimensions can be organically integrated.
[0197] On the basis of the above embodiment, the generation method of the structured data query instruction is optimized, as shown in Figure 10As shown, the method for generating an optimized data query instruction mainly includes steps S1002-S1006.
[0198] In step S1002, an entity is extracted from the question text, and the entity is converted into an entity vector.
[0199] The entity refers to an element in the question text that has a clear business direction. In the battery manufacturing production line yield scenario, it is divided into three categories according to business attributes: object entity, time entity, and attribute entity. The object entity is used to determine the object of the data query, for example: production line identifier, index name, and device name. The time entity is used to determine the time range of the data, for example: May 20, 2024, 8:00-12:00, etc. The attribute entity is used to supplement the statistical dimensions of the data, for example: qualified, cumulative, etc.
[0200] The entity vector is a high-dimensional numerical vector obtained by converting the extracted entity through a pre-trained domain vector encoding model. The vector dimension and numerical distribution are determined by the semantic features of the entity. In the battery manufacturing scenario, the entity vector is usually 256-dimensional or 512-dimensional. Entities with the same semantics are closer in the vector space, and entities with different semantics are farther apart.
[0201] In this embodiment, the question text is cleaned to remove redundant words to obtain a preprocessed text. A domain entity recognition model is called to extract entities from the preprocessed text. Then, a vector encoding model pre-trained based on the battery manufacturing corpus is loaded. The vector encoding model has learned the semantic association of entity expressions in the domain. The entity extracted from the preprocessed text is input into the vector encoding model to generate an entity vector. It should be noted that the vector encoding model can be deployed in a large language model or separately deployed.
[0202] In step S1004, the entity vector is used to search the professional knowledge base based on multi-vector retrieval technology to obtain the search result of the entity.
[0203] The professional knowledge base refers to a structured database that stores standardized knowledge in the battery manufacturing field. The professional knowledge base includes two types of information: entity standardized information and multi-vector set of entities with the same meaning. The entity standardized information refers to the standardized representation form corresponding to the entity, for example: the coding "L01" and the belonging workshop corresponding to "power battery first production line". The multi-vector set of entities with the same meaning refers to the vectors corresponding to different names of entities with the same meaning. For example, "power battery A production line", "A production line", and "power A line" correspond to different vectors. The multi-vectors of entities with the same meaning are stored in association with "entity ID-expression-vector" to enable matching of input entities with different expression forms during retrieval.
[0204] The multi-vector retrieval technology refers to the matching of multiple vectors of the same meaning entity, that is, the similarity calculation is performed on the multiple vectors of the same entity in the knowledge base and the entity vector respectively. For example, in the battery production line yield query, the multiple expression vectors of the same production line in the professional knowledge base are matched through the "production line entity vector", the multiple expression vectors of the same index are matched through the "index entity vector", and the multiple expression vectors of the same time are matched through the "time entity vector".
[0205] In this embodiment, similarity calculation is performed on the entity vectors extracted in step S1002 and the stored vectors in the professional knowledge base, and the retrieval results corresponding to each entity vector are determined, wherein the retrieval result is the standardized expression corresponding to each entity vector.
[0206] For example, for the "power A line" vector, the cosine similarity of all vectors of the "L01" entity in the production line vector subset is calculated: the similarity of the "power A line" vector is 1, the similarity of the "A production line" vector is 0.95, and the similarity of the "power battery A production line" vector is 0.92. Then, it is determined that the retrieval result corresponding to the "power A line" vector is L01.
[0207] In the case where multiple entity vectors are extracted in step S1002, the standardized expression corresponding to each entity vector is retrieved from the professional knowledge base.
[0208] In step S1006, the retrieval result of the entity and the prompt word matched with the target intent are input into the large language model to obtain the structured data query instruction output by the large language model.
[0209] In this embodiment, the standardized expression corresponding to each entity retrieved in the professional knowledge base and the prompt word matched with the target intent are input into the large language model. The large language model processes the standardized expression corresponding to each entity according to the prompt word to obtain the structured data query instruction output by the large language model.
[0210] In this embodiment, the natural language processing technology based on domain knowledge enhancement is adopted to realize accurate analysis of complex industrial query intentions, and the fuzzy user demand can be automatically converted into a structured data query instruction.
[0211] In one possible implementation, the retrieval result of the entity and the prompt word matched with the target intent are input into the large language model to obtain the structured data query instruction output by the large language model, including S10062-S10066.
[0212] In step S10062, the output format of the large language model is constrained by the prompt word matched with the target intent, and the prompt word contains the mandatory fields and format specifications of the structured instruction.
[0213] Among them, the required fields of the structured instruction refer to the core fields that must be included to ensure the accuracy of data query. In the scenario of the production output of the battery production line, the required fields include: production line code, time range, and query metrics. When there are multiple factories in different regions, the required fields also include: production line location.
[0214] The format specification refers to the unified regulations on the expression forms and arrangement orders of each field of the structured instruction.
[0215] Exemplarily, the prompt words corresponding to the data query can be as follows: "You are an intelligent manufacturing data query assistant. Please convert the user's query into JSON. Requirements: - Required fields: lineCode: Only allowed to select from [CL01, CL02...]. baseCode: Only allowed to select from [CQ, XM...]. time: YYYY-MM-DD to YYYY-MM-DD topic: Only allowed to select from [production capacity, FTY]. Among them: "L1" / "Pull 1" needs to be mapped to "CL01". "CQ" represents Production Area A, and "XM" represents Production Area B. "Production capacity" means the number of batteries that a battery production enterprise can produce or the total storage capacity of the batteries within a specific time.
[0216] When the lineCode and baseCode fields are missing, preferentially obtain from the historical context <histories>Inheritance, if inheritance is complete, if there is no, take the default value. lineCode defaults to CL01, baseCode defaults to XM, time defaults to the previous day, topic if not mentioned, need to find the user again to confirm.
[0217] In one possible implementation, the prompt word matching the query intent is called, the retrieval result of the entity is input into the large language model, and the large language model generates a preliminary instruction based on the standardized information in the retrieval result (such as the production line "L01" and the index name "capacity") according to the format constraints of the prompt word.
[0218] In step S10064, when the large language model identifies that there is a missing key information in the question text according to the retrieval result of the entity, a dialogue guiding mechanism is started.
[0219] The missing key information refers to the mandatory field information that is not included in the question text and cannot be supplemented by the professional knowledge base, for example, the time range is not mentioned in "query A production line hourly output", and the knowledge base has no "default query daily data" rule, so the "time range" is the missing key information. For another example, the query index is not mentioned in "query A production line XX day", and the knowledge base has no "default query index" rule, so the "query index" is the missing key information.
[0220] The dialogue guiding mechanism refers to the interactive logic started when the key information is missing, which guides the user to supplement the missing information through the user interface, including missing information identification, inquiry text generation, and interactive state management functions, to ensure that all necessary information is obtained before the instruction generation process is executed again.
[0221] In this embodiment, the large language model checks whether the preliminary instruction contains all mandatory fields. If the user's question text does not mention the mandatory field and the knowledge base has no default rule, it is determined that the key information is missing, and the dialogue guiding mechanism is started.
[0222] In step S10066, the inquiry text is generated according to the missing key information in the question text and is displayed, and the step of obtaining the question text is returned until the large language model outputs the structured data query instruction.
[0223] The inquiry text refers to the standardized text generated to guide the user to supplement the missing information for the missing key information, which needs to include: the type of missing information, format requirements and constraint conditions, so that the information provided by the user meets the instruction generation requirements.
[0224] In this embodiment, the large language model generates a query text for the missing key information in the question text and displays it through the page of the operation terminal to enable the user to supplement the missing key information, then acquires the user input question text and generates a new structured data query instruction according to the context understanding, generates a new query text if there is still missing key information, and outputs the structured data query instruction if there is no missing key information.
[0225] In another possible implementation, the large language model can actively clarify the user input question text based on context understanding. For example, the user inputs: "Check the production of XX base L1 line yesterday". The large language model outputs a structured data query instruction as: { "baseCode": "XM", "lineCode": "CL01", "time": "2025-01-01 to 2025-01-02", "topic": "production capacity" } The large language model can actively inherit the fields in the previous multiple rounds of questioning based on context understanding. When the user inputs "YY's?" again, the large language model can recognize that the user wants to query the production of YY base L1 line yesterday, and outputs a structured data query instruction as: { "baseCode": "CQ", "lineCode": "CL01", "time": "2025-01-01 to 2025-01-02", "topic": "production capacity" } In this embodiment, the large language model can start a guidance mechanism according to the missing key information in the question text to avoid outputting invalid instructions, so that the final instruction contains all necessary information, thereby improving the accuracy of the query result.
[0226] Based on the above embodiments, in this embodiment, a question and answer system based on a large language model is provided, as shown in Figure 11 The question and answer system based on the large language model is a system constructed based on RAG and LLM. It mainly includes an intent recognition layer 1110, a multi-source data fusion layer 1120, and a visualization and intelligent analysis layer 1130.
[0227] At the intent recognition layer 1110, a large language model technology optimized by the field is adopted. Through an intelligent prompt regulation mechanism, accurate instruction structured conversion is realized, ensuring that user queries can be accurately mapped to predefined data access instructions. Secondly, multi-vector retrieval technology, such as the BGE series, is integrated, significantly improving the recognition ability of professional concepts such as device status, capacity, and first-pass rate. For the complex query environment of the manufacturing industry, it has intelligent language adaptation characteristics and can naturally handle mixed English and Chinese professional query requests. When the user initiates an index query, a preset prompt template is used to realize structured conversion, and the prompt can be dynamically adjusted to ensure flexible response to new index requirements. For unstructured queries, an intelligent dialogue guidance mechanism is started, and based on context understanding, the user's intent is actively clarified, and fuzzy requirements are gradually converted into executable index queries, realizing seamless transition from free question and answer to accurate data acquisition.
[0228] Specifically, the processing flow of the intent recognition layer 1110 is as shown in Figure 12 The user inputs the question text in natural language form. The professional knowledge base stores knowledge in the battery manufacturing field, as well as multiple vectors corresponding to each entity in the battery manufacturing field. The multi-vector retrieval enhancement technology is used to convert the question text into an entity vector, and through vector matching, the standardized expression corresponding to the question text is selected from the professional knowledge base.
[0229] The prompt template indicates the mandatory fields and format specifications of the large language model structured instruction. Then, the standardized expression corresponding to the question text and the prompt template are input into the large language model to form an initial structured instruction. If there is missing key information, the dialogue guidance mechanism is started to guide the user to supplement new key information. If there is no missing key information, the structured data query instruction is output, and the data query instruction is input into the multi-source data fusion layer 1120.
[0230] The multi-source data fusion layer 1120 adopts a hierarchical data processing architecture and builds a complete data governance system. First, a dedicated project database is established as the core data hub. Through a timed synchronization mechanism, raw data scattered in MES, IoT devices, EMS, and other business systems is standardized, cleaned, and stored, solving the problem of data silos. Based on this data foundation, three core functions are realized through a distributed data platform: 1. Real-time data fusion: millisecond-level alignment of multi-source heterogeneous data is achieved through stream processing technology; 2. Correlation analysis: an index correlation network is constructed to automatically identify the implicit relationship between secondary indicators and influencing factors; 3. Data services: a unified API interface is provided to support flexible invocation of upper-layer applications. The architecture design of "first governance and then analysis" ensures the complete collection of raw data and realizes the deep fusion of multi-dimensional data, building a unified and standardized data foundation for subsequent anomaly diagnosis and root cause analysis.
[0231] Specifically, the processing flow of the multi-source data fusion layer 1120 is shown in the figure. The raw data scattered in the MES, IoT device, EMS and other business systems is standardized and cleaned through a timing synchronization mechanism, and is stored in a database. A stream processing technology is used to millisecond-level align the multi-source heterogeneous data, and store it in the data center. Then, an index correlation network is built to automatically identify the implicit relationship between the second index and the influence factor. Finally, a unified API interface is provided to support flexible calling of the upper layer application. The structured data query instruction is input to the database through the API interface, and the target data obtained by the query is transmitted to the visualization and intelligent analysis layer 1130. Figure 13
[0232] In the visualization and intelligent analysis layer 1130, a double-layer collaborative processing architecture of visualization and AI is adopted to realize all-round upgrade of data analysis and decision support. In the visualization analysis layer, a visual result is generated through a configured chart rendering engine. The index situation awareness can be realized by extending the Echarts third-party tool, or an optimization scheme of tight coupling between the front end and the back end can be used according to the performance or page style requirement. In the AI intelligent analysis layer, the system sends the analysis data to the LLM engine for deep analysis, and automatically generates an intelligent root cause reply of multi-influence factor analysis and processing suggestion. This double-channel processing mode not only retains the intuitiveness of traditional visualization analysis, but also integrates the insight of AI analysis. Through a standardized data interface, the analysis results of the two dimensions can be organically integrated.
[0233] The embodiment provided in the embodiment provides an intelligent analysis system for industrial intelligent manufacturing, which adopts a three-layer architecture design of intent understanding, data fusion and intelligent analysis. First, the intent understanding module based on domain knowledge construction can accurately analyze natural language queries and generate structured output, providing standardized input for downstream data processing. Second, the data fusion engine in time and space dimensions realizes real-time alignment and integration of multi-source data across systems, and builds a correlation relationship among multiple indexes, significantly improving data quality. Finally, the double-mode platform of visualization interaction and intelligent analysis combines interactive data display and deep analysis capabilities, forming a complete solution from anomaly discovery to root cause diagnosis. It has good universality and expandability, and can be widely applied to industrial fields such as semiconductors and automobile manufacturing, providing an intelligent analysis support platform for the digital transformation of manufacturing industry.
[0234] Based on the same inventive concept, the embodiment of the disclosure also provides a question and answer device based on a large language model, as described in the following embodiment. Since the principle of solving the problem of the device embodiment is similar to that of the above-mentioned method embodiment, the implementation of the device embodiment can be referred to the implementation of the above-mentioned method embodiment, and the repeated parts will not be described here.
[0235] Figure 14 A schematic diagram of a large language model-based question answering device in an embodiment of the present disclosure is shown in FIG. 14, which includes a question obtaining module 1410, an instruction determining module 1420, a data querying module 1430, and an answer generating module 1440. Figure 14
[0236] The question obtaining module 1410 obtains a question text, the instruction determining module 1420 performs semantic understanding on the question text by a large language model to obtain a structured data query instruction, the data querying module 1430 performs retrieval in a database based on the data query instruction to obtain target data related to the question text, the database includes data integrated from business data obtained from at least one business system, and the answer generating module 1440 obtains a target answer to the question text according to the question text and the target data related to the question text by a large language model.
[0237] In some possible embodiments of the present disclosure, the device further includes a database construction module configured to obtain the first business data from each of the business systems, time-align at least two of the first business data to obtain second business data, wherein the second business data includes data objects, determine data association relationships between each of the data objects in the second business data, and store the second business data and the data association relationships to the database.
[0238] In some possible embodiments of the present disclosure, the data objects include a first index, a device, a production line, and a workshop, and the data association relationships include a first association relationship, and the database construction module is specifically configured to determine the first association relationship between the first index, the device, the production line, and the workshop according to the device to which the first index belongs, the production line to which the device belongs, and the workshop to which the production line belongs.
[0239] In some possible embodiments of the present disclosure, the data association relationships include a second association relationship, and the data objects include a second index, and the database construction module is specifically configured to identify an influence factor of the second index from the first index of the second business data, and construct the second association relationship between the second index and the influence factor thereof.
[0240] In some possible embodiments of the present disclosure, the first business data includes at least one of energy consumption data, production data, device monitoring data, and device operation data, and the database construction module is configured to perform at least one of the following operations: obtaining energy consumption data from an EMS, obtaining production data from an MES, obtaining device monitoring data from an IOT system, and obtaining device operation data from an EAM system.
[0241] In some possible embodiments of the present disclosure, the database comprises: a data query interface; a data query module 1430, specifically configured to send the data query instruction to the database through the data query interface, the data query instruction being used to instruct the database to retrieve target data related thereto; and receive the target data related to the question text returned by the database through the data query interface.
[0242] In some possible embodiments of the present disclosure, the answer generation module 1440 comprises: an answer text generation unit, configured to generate an answer text of the question text according to the question text and the target data related to the question text by using a large language model; a visual chart generation unit, configured to render the target data related to the question text by using a chart rendering engine to obtain a visual chart of the question text; and an answer generation unit, configured to integrate the answer text and the visual chart to obtain a target answer of the question text.
[0243] In some possible embodiments of the present disclosure, when the question text is used to instruct data query, the target data related to the question text comprises: second business data related to the question text; the answer text of the question text comprises a business data distribution; and the answer text generation unit is specifically configured to perform data distribution analysis on the question text and the second business data related to the question text by using a large language model to generate the business data distribution.
[0244] In some possible embodiments of the present disclosure, when the question text is used to instruct root cause analysis, the target data related to the question text comprises: second business data related to the question text, a first association relationship related to the question text, and a second association relationship related to the question text; the answer text of the question text comprises a root cause analysis result; the answer text generation unit is specifically configured to perform data distribution analysis on the question text and the second business data related to the question text by using a large language model to generate the business data distribution; perform data association analysis on the question text, the first association relationship related to the question text, and the second association relationship related to the question text by using the large language model to obtain an association analysis result; and generate the root cause analysis result by using the large language model from the business data distribution and the association analysis result.
[0245] In some possible embodiments of the present disclosure, the instruction determination module 1420 is specifically configured to perform intent recognition on the question text to obtain a target intent; determine a prompt word matched with the target intent; and generate a structured data query instruction according to the question text and the prompt word matched with the target intent by using a large language model.
[0246] In some possible embodiments of the present disclosure, the instruction determination module 1420 is specifically configured to extract an entity from the question text, and convert the entity into an entity vector; perform retrieval in a professional knowledge base according to the entity vector based on a multi-vector retrieval technology, to obtain a retrieval result of the entity; and take the retrieval result of the entity and a prompt word matching the target intent as input of the large language model, to obtain a structured data query instruction output by the large language model.
[0247] In some possible embodiments of the present disclosure, the instruction determination module 1420 is specifically configured to constrain the output format of the large language model by a prompt word matching the target intent, the prompt word containing mandatory fields and format specifications of the structured instruction; when the large language model identifies that there is missing key information in the question text according to the retrieval result of the entity, start a dialogue guiding mechanism; generate and display a query text according to the missing key information in the question text, and return to the step of acquiring the question text until the large language model outputs the structured data query instruction.
[0248] It should be noted that the question acquisition module 1410, the instruction determination module 1420, the data query module 1430 and the answer generation module 1440 correspond to S202-S208 in the method embodiment, and the above modules have the same examples and application scenarios as the corresponding steps, but are not limited to the disclosed content of the above method embodiment. It should be noted that the above modules as part of the device can be executed in a computer system such as a group of computer executable instructions.
[0249] Those skilled in the art can understand that each aspect of the present disclosure can be implemented as a system, a method or a program product. Therefore, each aspect of the present disclosure can be specifically implemented as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining software and hardware aspects, which can be collectively referred to as "circuitry", "module" or "system".
[0250] The electronic device 1500 according to this embodiment of the present disclosure will be described below with reference to Figure 15 The electronic device 1500 is only an example and should not limit the functions and use range of the embodiments of the present disclosure. Figure 15 The electronic device 1500 is only an example and should not limit the functions and use range of the embodiments of the present disclosure.
[0251] As Figure 15 As shown, the electronic device 1500 is in the form of a general computing device. Components of the electronic device 1500 can include, but are not limited to, the at least one processing unit 1510 described above, the at least one storage unit 1520 described above, a bus 1530 that connects the different system components including the storage unit 1520 and the processing unit 1510.
[0252] The storage unit stores program codes which can be executed by the processing unit 1510, so that the processing unit 1510 performs the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification. For example, the processing unit 1510 can perform the following steps of the above method embodiments: obtaining a question text; performing semantic understanding on the question text by a large language model to obtain a structured data query instruction; performing retrieval in a database based on the data query instruction to obtain target data related to the question text, the database including data integrated from first business data obtained from at least one business system; obtaining a target answer of the question text according to the question text and the target data related to the question text by the large language model.
[0253] The storage unit 1520 can include a readable medium in the form of volatile storage such as random access memory (RAM) 15201 and / or cache memory 15202, and can further include read-only memory (ROM) 15203.
[0254] The storage unit 1520 can further include program / utility 15204 having a set of programs / modules 15205, including operating system, one or more applications, other program modules, and program data, each or some combination thereof, which can include implementation of a network environment.
[0255] The bus 1530 can be representative of one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus structures.
[0256] The electronic device 1500 can also communicate with one or more external devices 1540 such as a keyboard or pointing device, a Bluetooth device, a device that enables Near Field Communication, etc. Communication with one or more devices that enable a user to interact with the electronic device 1500 can also be performed. Further, communication can be enabled between the electronic device 1500 and one or more other computing devices using the network adapter 1560, such as a LAN, a WAN, and / or the Internet through a modem, etc. As shown, the network adapter 1560 can be in communication with the other components of the electronic device 1500 through the bus 1530. It should be appreciated that other hardware and / or software modules can be used in conjunction with the electronic device 1500. For example, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. can be used with the electronic device 1500.
[0257] From the above description of the embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the methods according to the embodiments of the present disclosure.
[0258] In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer program product, which includes a computer program that, when executed by a processor, implements the above-mentioned large language model-based question answering method.
[0259] In the example embodiments of the present disclosure, a computer readable storage medium is also provided, which can be a readable signal medium or a readable storage medium. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing terminal devices to perform the steps according to various example embodiments of the present disclosure described in the above "example method" section of the specification when the program product is run on the terminal devices.
[0260] More specific examples of the computer-readable storage medium in the present disclosure can include but are not limited to an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0261] In the present disclosure, a computer readable storage medium can include a data signal carrying the readable program code in a baseband or in a carrier wave. Such a propagated data signal can take a wide variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. A computer readable medium can also be any medium that can be read by a computer or a device that can be used to store, transmit or propagate the program over the internet.
[0262] Optionally, program code embodied on a computer readable storage medium can be transmitted by any data transmission techniques, including but not limited to radio frequency, wireless, cable, wire, optical fiber cable, or any suitable combination thereof.
[0263] In an implementation, the program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, and the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0264] It should be noted that, although several modules or units for a device to perform actions are mentioned in the above detailed description, the division into the modules or units is not mandatory. In fact, according to an embodiment of the present disclosure, features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, features and functions of one module or unit described above can be further divided into a plurality of modules or units.
[0265] Moreover, although individual steps of the methods in the present disclosure are described in a particular order in the drawings, this is not required or implied as to the order of execution of the steps, nor is it required that all of the steps be executed to achieve the desired result. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, one step can be broken into multiple steps, etc.
[0266] Those skilled in the art will readily understand that the example embodiments described herein can be implemented by software and / or by hardware coupled with software, as described above. Thus, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, or the like) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the methods according to the embodiments of the present disclosure.
[0267] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known use or custom in the art to which the present disclosure pertains. The specification and examples given herein are intended to be illustrative only and not in a limiting sense. The true scope of the present disclosure is indicated by the appended claims.< / histories>
Claims
1. A method for question answering based on a large language model, characterized in that, The method comprises the following steps: obtaining a question text; performing semantic understanding on the question text by a large language model to obtain a structured data query instruction; performing retrieval in a database based on the data query instruction to obtain target data related to the question text, wherein the database comprises data integrated from first business data obtained from at least one business system; obtaining a target answer to the question text by the large language model according to the question text and the target data related to the question text.
2. The large language model-based question answering method according to claim 1, characterized in that, Further comprising: obtaining the first business data from each of the business systems; aligning at least two of the first business data in time to obtain second business data, wherein the second business data comprises data objects; determining data association relationships between the data objects in the second business data; storing the second business data and the data association relationships to the database.
3. The large language model-based question answering method according to claim 2, characterized in that, The data objects comprise first indicators, devices, production lines, and workshops; The data association relationships comprise first association relationships; The determination of the data association relationships between the data objects in the second business data comprises: determining first association relationships between the first indicators, the devices, the production lines, and the workshops according to the devices to which the first indicators belong, the production lines to which the devices belong, and the workshops to which the production lines belong.
4. The large language model-based question answering method according to claim 2, characterized in that, The data association relationships comprise second association relationships, and the data objects comprise second indicators; The determination of the data association relationships between the data objects in the second business data comprises: identifying influence factors of the second indicators from the first indicators of the second business data; constructing second association relationships between the second indicators and the influence factors thereof.
5. The large language model-based question answering method according to claim 2, characterized in that, The first business data comprises at least one of the following: energy consumption data, production data, device monitoring data, and device operation data; The obtaining of the first business data from each of the business systems comprises at least one of the following: obtaining energy consumption data from an energy management system (EMS); obtaining production data from a manufacturing execution system (MES); obtaining device monitoring data from an Internet of Things (IOT) system; obtaining device operation data from an enterprise asset management (EAM) system.
6. The method of claim 1-5, wherein, The database comprises a data query interface; The retrieval in the database based on the data query instruction to obtain target data related to the question text comprises: sending the data query instruction to the database through the data query interface, wherein the data query instruction is used to instruct the database to retrieve target data related thereto; receiving target data related to the question text returned by the database through the data query interface.
7. The large language model-based question answering method according to claim 2, characterized in that, The obtaining of a target answer to the question text by the large language model according to the question text and the target data related to the question text comprises: generating an answer text to the question text by the large language model according to the question text and the target data related to the question text; rendering target data related to the question text by a chart rendering engine to obtain a visual chart of the question text; Integrate the answer text and the visualization chart to obtain the target answer of the question text.
8. The large language model-based question answering method according to claim 7, characterized in that, When the question text is used to indicate data query, the target data related to the question text includes second business data related to the question text; and the answer text of the question text includes business data distribution. The answer text of the question text is generated by the large language model according to the question text and the target data related to the question text, including: The business data distribution is generated by the large language model through data distribution analysis on the question text and the second business data related to the question text.
9. The large language model-based question answering method according to claim 7, characterized in that, When the question text is used to indicate root cause analysis, the target data related to the question text includes second business data related to the question text, first association relationship related to the question text, and second association relationship related to the question text; and the answer text of the question text includes root cause analysis result. The answer text of the question text is generated by the large language model according to the question text and the target data related to the question text, including: The business data distribution is generated by the large language model through data distribution analysis on the question text and the second business data related to the question text. The association analysis result is obtained by the large language model through data association analysis on the question text, the first association relationship related to the question text, and the second association relationship related to the question text. The root cause analysis result is generated by the large language model through the business data distribution and the association analysis result.
10. The large language model-based question answering method according to claim 1, characterized in that, The structured data query instruction is obtained by the large language model through semantic understanding of the question text, including: The target intent is obtained by intent recognition on the question text. The prompt word matched with the target intent is determined. The structured data query instruction is generated by the large language model according to the question text and the prompt word matched with the target intent.
11. The large language model-based question answering method according to claim 10, characterized in that, The structured data query instruction is generated by the large language model according to the question text and the prompt word matched with the target intent, including: The entity is extracted from the question text and converted into an entity vector. The retrieval result of the entity is obtained by the multi-vector retrieval technology based on the entity vector in the professional knowledge base. The retrieval result of the entity and the prompt word matched with the target intent are taken as the input of the large language model to obtain the structured data query instruction output by the large language model.
12. The large language model based question answering method according to claim 11, characterized in that, The retrieval result of the entity and the prompt word matched with the target intent are taken as the input of the large language model to obtain the structured data query instruction output by the large language model, including: The output format of the large language model is constrained by the prompt word matched with the target intent, and the prompt word includes mandatory fields and format specifications of the structured instruction. When the large language model identifies that there is missing key information in the question text according to the retrieval result of the entity, a dialogue guiding mechanism is started. According to the missing key information in the question text, a query text is generated and displayed, and the step of obtaining the question text is returned until the large language model outputs a structured data query instruction.
13. A large language model-based question answering device, characterized by, The method comprises the following steps: a question obtaining module obtains a question text; an instruction determining module performs semantic understanding on the question text through a large language model to obtain a structured data query instruction; a data query module performs retrieval in a database based on the data query instruction to obtain target data related to the question text, wherein the data included in the database is obtained by integrating first business data obtained from at least one business system; an answer generating module obtains a target answer of the question text according to the question text and the target data related to the question text through a large language model.
14. An electronic device, comprising: The method comprises the following steps: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to perform the large language model-based question and answer method of any one of claims 1-12.
15. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the large language model-based question and answer method of any one of claims 1-12.
Citation Information
Cited By
Intelligent data question and answer method and system based on index semantic enhancement
CN121543748A
Retrieval enhancement and constraint guidance method and system for high-consistency text generation
CN121809422A
A method and system for retrieval augmentation and constraint guidance for high-consistency text generation
CN121809422B