Large language model data analysis method and apparatus, computer device, and storage medium
By matching target data indicators and entities in the ERP system and using data indicator templates and entity templates to determine target data indicators, the problem of recognition accuracy of large language models in complex scenarios is solved, and the accuracy and efficiency of data acquisition are improved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- KINGDEE SOFTWARE(CHINA) CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-06-25
AI Technical Summary
In ERP intelligent data query scenarios, large language models have poor recognition accuracy and cannot effectively handle complex data analysis scenarios.
By acquiring the information of the questions to be analyzed, matching the target data indicators and entities, using data indicator templates and entity templates to determine the target data indicators, and combining indicator matching and entity matching, the accuracy of data acquisition is improved.
In complex form scenarios, it improves the accuracy of intelligent questioning and the efficiency of data acquisition.
Smart Images

Figure CN2024143056_25062026_PF_FP_ABST
Abstract
Description
Large language model data analysis methods, devices, computer equipment and storage media
[0001] This application claims priority to Chinese Patent Application No. 202411906977.X, filed on December 20, 2024, entitled “Large Language Model Data Analysis Method, Apparatus, Computer Equipment and Storage Medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of intelligent data processing technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for large language model data analysis. Background Technology
[0003] LLM (Large Language Model) is a large-scale natural language processing model trained using deep learning algorithms. Trained on massive amounts of text data, it can understand and generate natural language, possessing capabilities such as language understanding, reasoning, and translation. In the field of data processing and analysis, it is commonly used for natural language understanding and natural language generation scenarios.
[0004] In the relevant technical solutions, the method of using a large language model to query data is as follows: after obtaining the user's question, the large language model is used to convert the natural language statement into SQL (Structured Query Language) to obtain data from the data table.
[0005] The advantage of the solutions in this technology lies in its ability to be quickly built for simple data query scenarios, and its flexible and easy-to-understand expression. However, it also has drawbacks, especially in the context of intelligent data querying in ERP (Enterprise Resource Planning) systems. ERP systems contain a large number of complex forms, and directly applying this technology can lead to poor recognition accuracy and an inability to handle complex data analysis scenarios. Summary of the Invention
[0006] Therefore, it is necessary to provide a large language model data analysis method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of intelligent question counting in complex forms, addressing the aforementioned technical problems.
[0007] Firstly, this application provides a method for analyzing large language model data, including:
[0008] Obtain the question number information to be analyzed, and match the target data indicator in the preset data indicator set based on the question number information to be analyzed;
[0009] If the target data indicator fails to match, the corresponding target data entity is matched based on the question information to be analyzed.
[0010] If the target data entity is successfully matched, a data indicator template is obtained, and the target data indicator is determined based on the target data entity and the data indicator template.
[0011] Target data is obtained based on the target data indicators, and data analysis results are obtained based on the target data.
[0012] In one embodiment, determining the target data indicator based on the target data entity and the data indicator template includes:
[0013] Extract the feature fields of the target data entity;
[0014] Generate basic data indicators and enhanced data indicators that match the feature fields based on the data indicator template;
[0015] The target data indicator is obtained by combining the basic data indicators and the enhanced data indicators.
[0016] In one embodiment, the target data includes basic target data and enhanced target data; the step of obtaining the target data based on the target data indicators includes:
[0017] The basic target data is obtained based on the basic data indicators; wherein, the basic data indicators include any one or more of the following: indicator name, analysis dimension, statistical period, and filtering conditions;
[0018] The enhanced target data is calculated based on the enhanced data indicators and the basic target data.
[0019] In one embodiment, after matching the corresponding target data entity based on the question information to be analyzed in the event that the target data indicator matching fails, the method further includes:
[0020] If the target data entity fails to match, a pre-built analysis table is obtained based on the question information to be analyzed; wherein, the pre-built analysis table is pre-built based on the data entities and data models related to the question information to be analyzed;
[0021] The target data is obtained based on the pre-built analysis table, and the data analysis results are obtained based on the target data.
[0022] In one embodiment, before obtaining the question information to be analyzed, the method further includes:
[0023] In response to a data analysis command, initial question data is acquired, and target question data belonging to a preset target domain is extracted from the initial question data.
[0024] The target question number information is input into a semantic analysis model to perform question number intent recognition, and the intent recognition result is obtained.
[0025] The process of obtaining the question information to be analyzed includes: obtaining the question information to be analyzed based on the intent recognition result.
[0026] In one embodiment, the method further includes:
[0027] The target question information is input into a semantic analysis model for supplementation and / or splitting;
[0028] Match approximate question templates based on the supplemented and / or split target question information;
[0029] If the approximate problem template is successfully matched, the data indicators in the approximate problem template are used as the target data indicators, and the step of obtaining the target data based on the target data indicators is executed.
[0030] If the approximate question template matching fails, the step of obtaining the question number information to be analyzed based on the intent recognition result is performed.
[0031] Secondly, this application also provides a large language model data analysis device, comprising:
[0032] The information acquisition module is used to acquire the question number information to be analyzed, and to match the target data indicator in the preset data indicator set based on the question number information to be analyzed.
[0033] The data matching module is used to match the corresponding target data entity based on the question information to be analyzed when the target data indicator fails to match.
[0034] The indicator matching module is used to obtain a data indicator template when the target data entity is successfully matched, and to determine the target data indicator based on the target data entity and the data indicator template.
[0035] The data analysis module is used to obtain target data based on the target data indicators and to obtain data analysis results based on the target data.
[0036] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0037] Obtain the question number information to be analyzed, and match the target data indicator in the preset data indicator set based on the question number information to be analyzed;
[0038] If the target data indicator fails to match, the corresponding target data entity is matched based on the question information to be analyzed.
[0039] If the target data entity is successfully matched, a data indicator template is obtained, and the target data indicator is determined based on the target data entity and the data indicator template.
[0040] Target data is obtained based on the target data indicators, and data analysis results are obtained based on the target data.
[0041] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0042] Obtain the question number information to be analyzed, and match the target data indicator in the preset data indicator set based on the question number information to be analyzed;
[0043] If the target data indicator fails to match, the corresponding target data entity is matched based on the question information to be analyzed.
[0044] If the target data entity is successfully matched, a data indicator template is obtained, and the target data indicator is determined based on the target data entity and the data indicator template.
[0045] Target data is obtained based on the target data indicators, and data analysis results are obtained based on the target data.
[0046] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0047] Obtain the question number information to be analyzed, and match the target data indicator in the preset data indicator set based on the question number information to be analyzed;
[0048] If the target data indicator fails to match, the corresponding target data entity is matched based on the question information to be analyzed.
[0049] If the target data entity is successfully matched, a data indicator template is obtained, and the target data indicator is determined based on the target data entity and the data indicator template.
[0050] Target data is obtained based on the target data indicators, and data analysis results are obtained based on the target data.
[0051] The aforementioned large language model data analysis method, apparatus, computer equipment, storage medium, and computer program product acquire the question information to be analyzed, and match target data indicators with a preset set of data indicators based on the question information. If the target data indicator matching fails, the corresponding target data entity is matched based on the question information. If the target data entity matching succeeds, a data indicator template is acquired, and the target data indicator is determined based on the target data entity and the data indicator template. Target data is then acquired based on the target data indicator, and data analysis results are obtained based on the target data. This method combines indicator matching with data entity matching, using direct indicator matching to ensure data acquisition efficiency. Furthermore, for use cases with numerous complex forms, where increased form complexity prevents direct matching of target data indicators, the target data indicator is determined using the target data entity and the data indicator template, thereby processing the target object and improving data acquisition accuracy. Therefore, this method can improve the accuracy of intelligent question analysis even with numerous complex forms. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 shows the application environment of a large language model data analysis method in one embodiment;
[0054] Figure 2 is a flowchart illustrating a large language model data analysis method in one embodiment;
[0055] Figure 3 is a flowchart illustrating the large language model data analysis method in another embodiment;
[0056] Figure 4 is a structural block diagram of a large language model data analysis device in one embodiment;
[0057] Figure 5 is an internal structure diagram of a computer device in one embodiment;
[0058] Figure 6 is an internal structural diagram of a computer device in another embodiment. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0060] The large language model data analysis method provided in this application embodiment can be applied to the application environment shown in Figure 1. The terminal 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104 or placed on a cloud or other network server. The data storage system can be used to store initial query information, query information to be analyzed, and other data that needs to be processed, as well as preset data such as preset data indicator sets. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0061] The large language model data analysis method provided in this application can be applied to data analysis in intelligent query scenarios using large language models. LLM (Large Language Model) refers to a large-scale natural language processing model trained on deep learning algorithms. Trained on massive amounts of text data, it can understand and generate natural language, possessing multiple capabilities such as language understanding, reasoning, and translation. In the field of data processing and analysis, LLM is commonly used in natural language understanding and natural language generation scenarios. For example, when a user inputs a question, LLM can understand the intent of the question based on context, transforming unstructured natural language questions into structured query statements, supporting complex data analysis tasks. It can process language in a more human-like way, reducing the dependence of traditional rule systems on fixed expressions, thereby improving flexibility and applicability. When integrated with business logic, LLM typically serves as the "front end" of question parsing, providing semantic input for subsequent logical queries and data processing.
[0062] This method can be applied to various information management systems, such as Enterprise Resource Planning (ERP) systems, enterprise management systems, financial systems, human resource systems, and supply chain systems.
[0063] In an exemplary embodiment, as shown in FIG2, a method for analyzing large language model data is provided. Taking the application of this method to server 104 in FIG1 as an example, the method includes the following steps S202 to S208. Wherein:
[0064] Step S202: Obtain the question number information to be analyzed, and match the target data indicator in the preset data indicator set according to the question number information to be analyzed.
[0065] The question information to be analyzed can be obtained directly from terminal 102, or it can be obtained by server 104 through data processing of the raw data obtained from terminal 102.
[0066] Furthermore, in this embodiment, the method is applied to an intelligent data query scenario within an Enterprise Resource Planning (ERP) system as an example. ERP is a comprehensive management system that integrates different business management modules. It aims to improve the efficiency of enterprise resource utilization, reduce operating costs, and optimize internal processes. Through information technology, it integrates various enterprise resources (such as human resources, materials, capital, and information), thereby achieving automation, standardization, and transparency in enterprise management. A unified data platform enables seamless integration of operations across finance, sales, procurement, inventory, and production, ensuring real-time data sharing and accurate transmission.
[0067] For example, server 104 can use an ERP digital infrastructure to achieve intelligent analysis and intelligent data retrieval of LLM data in the following steps. The ERP digital infrastructure can include an ERP data layer and a semantic model layer. The ERP data layer deploys the ERP data model, indicator platform, and data permissions; the semantic model layer converts natural language questions into query statements recognizable by the ERP system and accurately extracts the required data from the ERP database; the vector layer deploys a vector library to convert natural language questions and data items in the ERP (such as field names, table names, business terms, etc.) into vector tables, and then quickly finds content matching the user's question and answer through vector calculation.
[0068] The semantic model layer of the ERP digital foundation can be used to transform natural language questions into query statements that the ERP system can recognize. The semantic model layer includes, but is not limited to: an ERP professional thesaurus, a business obfuscation dictionary, business question templates, an indicator / dimensional definition dictionary, a business object dictionary, time dimension analysis and definitions, etc., based on pre-organized and pre-built content such as commonly used ERP terms, common questions, and common indicators. By constructing the semantic model layer, the intelligence and query accuracy of the query assistant can be improved, making data acquisition more efficient.
[0069] Accordingly, in step S202 above, server 104 can use the semantic model layer to parse the obtained query information to be analyzed, obtain a query statement that the ERP system can recognize, and then input it into the indicator platform for data indicator matching.
[0070] The indicator platform is based on ERP data indicators pre-built from the ERP data model. It includes pre-set data indicators for various commonly used intelligent queries, used to match accurate data indicator values during intelligent querying.
[0071] Accordingly, in step S202 above, server 104 can pre-store a set of preset data indicators in the above indicator platform, and then use the ERP data model to match the target data indicator in the set of preset data indicators according to the question information to be analyzed. If the target data indicator is successfully matched, the matched target data indicator can be directly used to obtain the target data, and then the data analysis steps in step S208 can be performed based on the obtained target data.
[0072] Step S204: If the target data indicator fails to match, match the corresponding target data entity based on the question information to be analyzed.
[0073] For example, if there is no matching target data indicator in the preset data indicator set of the above indicator platform, and the target data indicator matching fails, the server 104 can use NL2ORM to match the corresponding target data entity.
[0074] NL2ORM is a natural language-to-object relational mapping technology that transforms user natural language questions into queries about business objects and their attributes. Essentially, ORM is a way to manipulate the underlying data model through business objects, suitable for domain modeling and object-oriented development scenarios. NL2ORM acts like giving natural language semantics, parsing user questions, matching them to specific domain models, and generating queries or operations related to business entities. In application, NL2ORM focuses more on operations at the "business object" level: when a user asks a question, such as "query the total order amount for a customer," NL2ORM first transforms the question into domain model concepts, such as "customer" and "order." It then maps these concepts to specific data entities (such as the "customer table" and "order table") and automatically generates standardized metrics, such as total order amount and order quantity. In this process, NL2ORM incorporates template capabilities to standardize the business and data models, making the parsing of natural language questions more accurate and reducing development complexity.
[0075] Furthermore, the ERP data model in the aforementioned ERP digital foundation can include a domain directory. This domain directory can be pre-built or automatically constructed based on business objects. The domain directory records the business objects existing in each domain and module of the ERP system, as well as the relationships between domains, modules, and business objects. When a new business object is added, server 104 can automatically create or manually supplement business information in the domain directory to expand the types and corresponding data of the current candidate data entities.
[0076] For example, in step S204 above, if the target data indicator fails to match, the server 104 can use the ERP data model to match the corresponding domain directory based on the question information to be analyzed, and then find the target data entity based on the domain directory.
[0077] Step S206: If the target data entity is successfully matched, obtain the data indicator template and determine the target data indicator based on the target data entity and the data indicator template.
[0078] For example, server 104 can extract feature fields of the target data entity; generate basic data indicators and enhanced data indicators matching the feature fields according to the data indicator template; and aggregate the basic data indicators and enhanced data indicators to obtain the target data indicator. Specifically, server 104 can first select the corresponding data indicator template based on the extracted feature fields of the target data entity. The feature fields of the target data entity can be used to characterize the type, domain, and other applicable conditions of the data indicator template. Next, server 104 can classify the fields contained in the selected data indicator template. Server 104 can identify the field labels of each field in the data indicator template, using fields labeled with a first indicator label as basic data indicators and fields labeled with a second indicator label as enhanced data indicators. The data corresponding to the basic data indicators is directly obtained and can include any one or more of the following: indicator name, analysis dimension, statistical period, and filtering conditions. The data corresponding to the enhanced data indicators is calculated and can include year-on-year values, year-on-year growth rates, and cumulative growth rates, etc.
[0079] Furthermore, in the event that the target data entity matching fails, server 104 can use the NL2SQL scheme for data analysis. Server 104 can obtain a pre-built analysis table based on the question information to be analyzed; obtain the target data based on the pre-built analysis table; and obtain the data analysis results based on the target data. The pre-built analysis table is pre-constructed based on the data entities and data models related to the question information to be analyzed.
[0080] NL2SQL is a semi-processed data acquisition solution, a natural language to structured query language conversion technology. It directly translates natural language questions into SQL statements for querying databases and retrieving results. It focuses on low-level database operations, generating syntactically correct and semantically clear SQL queries through natural language understanding. Compared to NL2ORM, NL2SQL leans more towards the data model layer than the business object layer, directly manipulating database tables and fields, providing highly flexible query capabilities. Data entities are the most raw and detailed data, such as a "sales order" table, which includes many complex fields (e.g., product number, customer name, product quantity) and contains a lot of complex information. In contrast to data entities, a pre-built analysis table is a pre-processed data table that has undergone some preprocessing of the raw data, retaining only the parts needed for analysis, such as "customer name, quantity shipped, and amount shipped." It is simpler and easier to calculate and analyze.
[0081] For example, server 104 can use NL2SQL technology to directly query a pre-processed analysis table. This analysis table has integrated and simplified complex data, containing only the necessary parts, such as the "amount shipped" field and calculation formulas. By preprocessing complex raw data (such as sales orders and sales shipment slips) into an analysis table, processing large amounts of irrelevant data during queries can be avoided, reducing query complexity and improving accuracy.
[0082] Furthermore, the ERP data model in the aforementioned ERP digital foundation can also include an analysis layer and a data mapping layer. The analysis layer can pre-build data analysis tables based on the data entities of business objects, cleaning and processing business object entities in areas such as finance, supply chain, and production to obtain the pre-built analysis tables. The data mapping layer can be used to align the pre-built analysis tables with the data entities, making it easier for users to understand.
[0083] For example, if the target data entity fails to match, the server 104 can use the ERP data model to retrieve the corresponding pre-built analysis table in the analysis layer by searching the information of the question to be analyzed, thereby obtaining the target data based on the pre-built analysis table, and performing the following data analysis steps S208 on the target data to obtain the data analysis result.
[0084] Furthermore, the aforementioned analysis table can be pre-built as a single-header, single-body structure, with pre-statistics of the content requiring statistical processing pre-added to the analysis table. For example, the data entity sales order has a complex multi-header, multi-body structure, potentially containing over 500 fields, and the data entity sales delivery order also has a complex multi-header, multi-body structure, potentially containing over 600 fields. The information to be analyzed is the amount of goods delivered for a user's latest sales order. When this information cannot be directly obtained from the data entities sales order and sales delivery order, server 104 can pre-process and construct the data entities sales order and sales delivery order using the pre-built analysis table. This involves integrating the two data entity tables into a single-header, single-body data analysis table, excluding data not relevant to the analysis. This design reduces the complexity of the analysis table. Then, the fields for delivery identifier, quantity delivered, and amount delivered, along with the calculation logic, are pre-built. When NL2SQL needs to retrieve the amount already shipped, server 104 can directly retrieve it through a pre-built analysis table. When it needs to retrieve the amount not yet shipped, server 104 can generate code in the pre-analysis table using NL2SQL to retrieve the order amount and the amount already shipped, and then calculate the amount not yet shipped.
[0085] Step S208: Obtain target data based on target data indicators, and obtain data analysis results based on target data.
[0086] The target data can include basic target data and enhanced target data.
[0087] For example, server 104 can obtain basic target data based on basic data indicators, and calculate enhanced target data based on enhanced data indicators and basic target data. The basic target data can include aspects such as indicator name, analysis dimensions, statistical period, and filtering conditions. Specifically, the indicator name represents the specific business indicator to be analyzed; the analysis dimension determines the angles from which the data is broken down, such as by time, by region, or by department; the statistical period defines the time range of the data, such as day, month, or year; and the filtering conditions limit the range of data or the selection criteria according to user needs. Enhanced target data refers to data that incorporates more analysis dimensions or calculation methods on top of the basic data indicators to generate more in-depth and comprehensive data. Enhanced target data can include aspects such as year-on-year values, year-on-year growth rates, and cumulative growth rates.
[0088] Furthermore, taking the enhanced target data as a year-on-year value as an example, the year-on-year value is used to compare data changes at two points in time or over a period of time. Server 104 can obtain the data to be calculated based on the indicator name, statistical period, and filtering conditions, and calculate the obtained data according to the calculation method corresponding to the year-on-year value to obtain the year-on-year value.
[0089] For example, after acquiring this basic target data, server 104 can first select the data range and, based on the user-defined statistical period and filtering conditions, determine the two time periods to be analyzed year-on-year. The indicator name can be inventory change data, the statistical period can be one month, and the filtering condition can be that the time interval between the two time periods is one year. For instance, server 104 can select the inventory change data of the current month to compare with the inventory change data of the same month last year. After determining the time periods, server 104 can extract the inventory change data within these two time periods based on the basic data indicators. For example, server 104 can extract the inventory change amount of the current month and the same month last year. Next, server 104 can calculate the year-on-year value using the year-on-year value calculation formula, which can be (current period value - same period last year value) / same period last year value × 100%. This allows the calculation of the percentage increase between the two time periods, measuring the change in data. Through the calculation of the year-on-year value, server 104 obtains the enhanced target data. This data provides a clear perspective, helping to analyze the trends and changes between current and historical data, further supporting decision-making.
[0090] Furthermore, taking the year-on-year growth rate as an example, the year-on-year growth rate can be used to measure the degree of change of a certain indicator between the current period and the same period of the previous year, thereby assessing the annual trend. Server 104 can obtain the data to be calculated based on the indicator name, statistical period, and filtering conditions, and calculate the obtained data according to the calculation method corresponding to the year-on-year growth rate to obtain the year-on-year growth rate. Among them, the indicator name can be the inventory quantity, the statistical period can be one month, and the filtering condition can be that the time interval between two time periods is one year. Next, Server 104 can calculate the year-on-year growth rate according to the year-on-year growth rate formula: (current period value - previous period value) / previous period value × 100%.
[0091] Furthermore, taking the cumulative growth rate as an example, the cumulative growth rate measures the overall increase of a certain indicator from its initial value to its current value within a specific time period, and can be used to assess long-term trends. Server 104 can obtain the data to be calculated based on the indicator name and statistical period, and calculate the cumulative growth rate according to the calculation method corresponding to the cumulative growth rate. The indicator name can be the product quantity, the statistical period can be one year, with the product quantity at the beginning of the year as the initial value and the product quantity at the end of the year as the current value. Next, server 104 can calculate the cumulative growth rate using the formula: (current value - initial value) / initial value × 100%.
[0092] For example, server 104 can use the ERP data model to find the corresponding data entity by matching the domain directory of the ERP data model, and import the data entity into the aforementioned indicator platform. The indicator platform then provides an indicator model to process and standardize the data output. The indicator model includes a core component and an enhancement component. The core component is used to obtain basic target data, and the enhancement component is used to obtain enhanced target data. After the data entity is imported into the indicator platform, server 104 can first match the fields of the data entity with the core component for output, which may include indicator name, analysis dimension, statistical period, filtering conditions, etc.; other fields are matched with the enhancement component output, such as ratios, etc., thereby obtaining the data results of each data indicator as target data. Then, based on the target data, data analysis results are obtained. This method utilizes the data standardization and templated analysis capabilities of the indicator platform, constructing analysis data for business entities according to indicator templates, enabling the ERP business objects to support a wide range of data, and allowing for temporary indicator processing of business objects.
[0093] For example, server 104 can establish an indicator platform based on the above-described use case to provide data analysis services to terminal 102. The indicator platform includes a pre-set set of data indicators for indicator queries and a corresponding indicator directory. When the data to be analyzed is obtained, server 104 can match the data content to be queried with the indicator directory, dimensions, etc., of the indicator platform. If a match is successful, the corresponding data indicators are obtained and invoked. Since the indicator platform pre-sets commonly used data indicators based on ERP systems, server 104 can accurately and quickly match commonly used data indicators.
[0094] Furthermore, during the data analysis process, server 104 can transmit target data to the expert analysis framework. The expert analysis framework provides expert analysis templates for the ERP business domain. By calling expert analysis templates for different problem types, expert analysis suggestions are generated, ultimately yielding data analysis results. For example, server 104 can receive target data from different data sources based on target data indicators, perform data cleaning and other preprocessing on this target data, and then transmit it to the expert analysis framework in a format conforming to the requirements of the expert analysis templates. The expert analysis framework is used to process data analysis within the ERP business domain. The framework integrates multiple expert analysis templates, which are developed by domain experts based on actual needs and experience, providing systematic analysis methods and solutions for specific business problems. Each expert analysis template targets different problem types, such as inventory management and data report analysis, with clearly defined objectives and analysis methods.
[0095] In practice, server 104 can select and invoke appropriate expert analysis templates based on the nature of the problem and different business needs, according to the received target data. For example, if the target data involves inventory change trend analysis, server 104 can select an expert analysis template related to inventory changes. Once the corresponding expert analysis template is invoked, the expert analysis framework performs specific calculations and data analysis tasks according to the template's specifications. Ultimately, server 104 can feed back the analysis results and suggestions obtained from the expert analysis framework to relevant personnel or systems to support a more efficient decision-making process. This process ensures that data in the ERP system is fully utilized, and the generated analysis suggestions provide reliable decision support for optimizing the company's operations.
[0096] In the aforementioned large language model data analysis method, the method acquires the question information to be analyzed and matches the target data indicator with a pre-set data indicator set based on this information. If the target data indicator fails to match, the method matches the corresponding target data entity based on the question information. If the target data entity matches successfully, the method acquires a data indicator template, determines the target data indicator based on the target data entity and the data indicator template, acquires the target data based on the target data indicator, and obtains the data analysis results based on the target data. This method combines indicator matching with data entity matching, using a direct indicator matching method to ensure data acquisition efficiency. Furthermore, for use cases with a large number of complex forms, where the increased form complexity prevents direct matching of target data indicators, the method uses target data entities and data indicator templates to determine the target data indicator, thereby processing the target object and improving data acquisition accuracy. This enhances the accuracy of intelligent question analysis even with a large number of complex forms.
[0097] In an exemplary embodiment, as shown in FIG3, before step S202, the above method may further include steps S302 to S304. Wherein:
[0098] Step S302: In response to the data analysis command, obtain the initial question information and extract the target question information belonging to the preset target domain from the initial question information.
[0099] For example, server 104 can receive data analysis instructions and initial question information through terminal 102. Specifically, server 104 can receive and obtain questions uttered by users via voice or text through mobile terminals, PC-based intelligent questioning, and intelligent assistant entry points. Next, server 104 can determine whether the obtained user questions are ERP-related questions by using the domain identifier of the vector layer ERP professional glossary; if they are not key ERP questions, they are matched to common sense questions; if they are ERP-related questions, they are extracted as target question information for a preset target domain.
[0100] Step S304: Input the target question number information into the semantic analysis model to perform question number intent recognition and obtain the intent recognition result.
[0101] For example, in an ERP system, user-generated questions often contain missing information or are incomplete. Server 104 can supplement user input through a vector layer, filling in key information that users often omit in their descriptions. By understanding the context of the user's question, the vector layer infers the missing parts or automatically completes the question description using other information from the dialogue, ensuring the system obtains complete context and data requirements for more accurate processing of subsequent requests. Server 104 can determine if there is a need for question decomposition. Some complex questions may contain multiple sub-questions. The system analyzes the structure of the user's question to identify which parts can be broken down into independent sub-questions for separate processing. After completing and decomposing the question, server 104 can enter the user intent recognition stage. By performing semantic analysis on the completed or decomposed question, it identifies the user's actual needs and clarifies what answer or result the user wants. Based on the identified intent, the system will call relevant data modules, relying on data from various business modules in the ERP system (such as sales, inventory, finance, etc.), to perform necessary data queries and processing.
[0102] Correspondingly, step S202 may include: step S306, obtaining the number of questions to be analyzed based on the intent recognition result.
[0103] For example, the server 104 can directly use the intent recognition result as the question information to be analyzed, or it can classify the intent recognition result to obtain different types of question information to be analyzed, so as to distinguish the corresponding analysis model and thus improve the data analysis efficiency. In addition, the server 104 can also set priorities for different types of intent recognition results according to the content of the intent recognition result, thereby further improving the data analysis efficiency and flexibility.
[0104] In an exemplary embodiment, during the process of question count intent recognition, the semantic analysis model can be used to supplement and / or split the target question count information. The server 104 can also input the target question count information into the semantic analysis model for supplementation and / or splitting, and match an approximate question template based on the supplemented and / or split target question count information; if the approximate question template matches successfully, the data indicators in the approximate question template are used as target data indicators, and the step of obtaining target data based on the target data indicators is executed; if the approximate question template fails to match, the step of obtaining the question count information to be analyzed based on the intent recognition result is executed.
[0105] Furthermore, the aforementioned ERP digital foundation can also include a vector layer. The vector layer can dynamically maintain a vector library. The server 104 can use the vector library to convert natural semantic questions and data items in the ERP (such as field names, table names, business terms, etc.) into vector tables. Through vector calculation, it can quickly find the content that matches the user's questions and answers, thereby more quickly supplementing the descriptions that users often omit, and determining whether the question needs to be split, and then supplementing the description of the question or splitting multiple questions.
[0106] In another exemplary embodiment, in response to a data analysis command, server 104 acquires initial question data and extracts target question data belonging to a preset target domain from the initial question data. The target question data is then input into a semantic analysis model to supplement and / or split the target question data, thereby performing question intent recognition to obtain intent recognition results. Approximate question templates are matched based on the supplemented and / or split target question data. If the approximate question template matches successfully, the data indicators in the approximate question template are used as target data indicators, and target data is obtained based on the target data indicators. If the approximate question template fails to match, the question data to be analyzed is obtained based on the intent recognition results.
[0107] Next, server 104 obtains the question information to be analyzed, and matches the target data indicator in the preset data indicator set according to the question information. If the target data indicator fails to match, the corresponding target data entity is matched according to the question information to be analyzed.
[0108] In the event that the target data entity fails to match, a pre-constructed analysis table is obtained based on the data entities and data models related to the question to be analyzed. The target data is then obtained based on the pre-constructed analysis table, and the data analysis results are obtained based on the target data.
[0109] Accordingly, if the target data entity is successfully matched, a data indicator template is obtained, the feature fields of the target data entity are extracted, basic data indicators and enhanced data indicators that match the feature fields are generated according to the data indicator template, and the basic data indicators and enhanced data indicators are aggregated to obtain the target data indicator.
[0110] Next, server 104 obtains basic target data based on basic data indicators. These basic data indicators include one or more of the following: indicator name, analysis dimension, statistical period, and filtering conditions. Finally, based on the enhanced data indicators and the basic target data, enhanced target data is calculated. Data analysis results are then obtained based on the target data.
[0111] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0112] Based on the same inventive concept, this application also provides a large language model data analysis apparatus for implementing the large language model data analysis method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the large language model data analysis apparatus provided below can be found in the limitations of the large language model data analysis method described above, and will not be repeated here.
[0113] In an exemplary embodiment, as shown in FIG4, a large language model data analysis device is provided, including: an information acquisition module 402, a data matching module 404, an indicator matching module 406, and a data analysis module 408, wherein:
[0114] The information acquisition module 402 is used to acquire the question number information to be analyzed, and to match the target data indicator in the preset data indicator set according to the question number information to be analyzed.
[0115] Data matching module 404 is used to match the corresponding target data entity based on the question information to be analyzed when the target data indicator fails to match.
[0116] The indicator matching module 406 is used to obtain the data indicator template when the target data entity is successfully matched, and to determine the target data indicator based on the target data entity and the data indicator template.
[0117] The data analysis module 408 is used to obtain target data based on target data indicators and to obtain data analysis results based on the target data.
[0118] In one embodiment, the indicator matching module 406 is specifically used to: extract the feature fields of the target data entity; generate basic data indicators and enhanced data indicators that match the feature fields according to the data indicator template; and aggregate the basic data indicators and enhanced data indicators to obtain the target data indicator.
[0119] In one embodiment, the target data includes basic target data and enhanced target data; the data analysis module 408 is specifically used to: obtain basic target data based on basic data indicators; wherein, the basic data indicators include any one or more of indicator names, analysis dimensions, statistical periods, and filtering conditions; and calculate enhanced target data based on enhanced data indicators and basic target data.
[0120] In one embodiment, the device further includes:
[0121] The analysis table acquisition unit is used to acquire a pre-built analysis table based on the question information to be analyzed when the target data entity matching fails; wherein, the pre-built analysis table is pre-built based on the data entities and data models related to the question information to be analyzed;
[0122] The data analysis unit is used to obtain target data based on pre-built analysis tables and to obtain data analysis results based on the target data.
[0123] In one embodiment, the device further includes:
[0124] The initial information acquisition unit is used to respond to data analysis instructions, acquire initial question information, and extract target question information belonging to a preset target domain from the initial question information;
[0125] The intent recognition unit is used to input the target question information into the semantic analysis model to perform question intent recognition and obtain the intent recognition result.
[0126] Accordingly, the information acquisition module 402 is specifically used to: obtain the question information to be analyzed based on the intent recognition result.
[0127] In one embodiment, the apparatus is further configured to: input target question number information into a semantic analysis model for supplementation and / or splitting; match an approximate question template based on the supplemented and / or split target question number information; if the approximate question template is successfully matched, use the data indicators in the approximate question template as target data indicators, and perform the step of obtaining target data based on the target data indicators; if the approximate question template is not matched, perform the step of obtaining the question number information to be analyzed based on the intent recognition result.
[0128] Each module in the aforementioned large language model data analysis device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0129] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram is shown in Figure 5. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device stores initial query information, query information to be analyzed, and other data that needs to be processed, and can also be used to store preset data such as preset data indicator sets. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a large language model data analysis method.
[0130] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram is shown in Figure 6. The computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a large language model data analysis method. The display unit of the computer device is used to form a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0131] Those skilled in the art will understand that the structure shown in Figure 6 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0132] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring question information to be analyzed, and matching a target data indicator with a preset data indicator set based on the question information; if the target data indicator matching fails, matching a corresponding target data entity based on the question information to be analyzed; if the target data entity matching succeeds, acquiring a data indicator template, and determining a target data indicator based on the target data entity and the data indicator template; acquiring target data based on the target data indicator, and obtaining data analysis results based on the target data.
[0133] In one embodiment, when the processor executes the computer program, it further performs the following steps: extracting feature fields of the target data entity; generating basic data indicators and enhanced data indicators that match the feature fields according to the data indicator template; and aggregating the basic data indicators and enhanced data indicators to obtain the target data indicator.
[0134] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining basic target data based on basic data indicators; wherein, the basic data indicators include any one or more of indicator names, analysis dimensions, statistical periods, and filtering conditions; and calculating enhanced target data based on enhanced data indicators and basic target data.
[0135] In one embodiment, when the processor executes the computer program, it further performs the following steps: in the case of a failure to match the target data entity, obtaining a pre-built analysis table based on the question information to be analyzed; wherein the pre-built analysis table is pre-built based on the data entities and data models related to the question information to be analyzed; obtaining target data based on the pre-built analysis table, and obtaining data analysis results based on the target data.
[0136] In one embodiment, when the processor executes the computer program, it further performs the following steps: in response to a data analysis instruction, it acquires initial question information and extracts target question information belonging to a preset target domain from the initial question information; it inputs the target question information into a semantic analysis model to perform question intent recognition and obtains intent recognition results; and it obtains the question information to be analyzed based on the intent recognition results.
[0137] In one embodiment, when the processor executes the computer program, it further implements the following steps: inputting the target question number information into the semantic analysis model for supplementation and / or splitting, and matching an approximate question template based on the supplemented and / or split target question number information; if the approximate question template is successfully matched, using the data indicators in the approximate question template as the target data indicators, and executing the step of obtaining target data based on the target data indicators; if the approximate question template is not matched, executing the step of obtaining the question number information to be analyzed based on the intent recognition result.
[0138] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring question information to be analyzed, and matching a target data indicator in a preset data indicator set based on the question information; if the target data indicator fails to match, matching a corresponding target data entity based on the question information to be analyzed; if the target data entity matches successfully, acquiring a data indicator template, determining the target data indicator based on the target data entity and the data indicator template; acquiring target data based on the target data indicator, and obtaining data analysis results based on the target data.
[0139] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: extracting feature fields of the target data entity; generating basic data indicators and enhanced data indicators that match the feature fields according to the data indicator template; and aggregating the basic data indicators and enhanced data indicators to obtain the target data indicator.
[0140] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining basic target data based on basic data indicators; wherein, the basic data indicators include any one or more of indicator names, analysis dimensions, statistical periods, and filtering conditions; and calculating enhanced target data based on enhanced data indicators and basic target data.
[0141] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in the case of failure to match the target data entity, obtaining a pre-built analysis table based on the question information to be analyzed; wherein the pre-built analysis table is pre-built based on the data entities and data models related to the question information to be analyzed; obtaining target data based on the pre-built analysis table, and obtaining data analysis results based on the target data.
[0142] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to a data analysis instruction, it acquires initial question information and extracts target question information belonging to a preset target domain from the initial question information; it inputs the target question information into a semantic analysis model to perform question intent recognition and obtains intent recognition results; and it obtains the question information to be analyzed based on the intent recognition results.
[0143] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: inputting the target question number information into the semantic analysis model for supplementation and / or splitting; matching an approximate question template based on the supplemented and / or split target question number information; if the approximate question template is successfully matched, using the data indicators in the approximate question template as the target data indicators, and performing the step of obtaining target data based on the target data indicators; if the approximate question template is not matched, performing the step of obtaining the question number information to be analyzed based on the intent recognition result.
[0144] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring question information to be analyzed, and matching a target data indicator with a preset data indicator set based on the question information; if the target data indicator matching fails, matching a corresponding target data entity based on the question information to be analyzed; if the target data entity matching succeeds, acquiring a data indicator template, and determining the target data indicator based on the target data entity and the data indicator template; acquiring target data based on the target data indicator, and obtaining data analysis results based on the target data.
[0145] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: extracting feature fields of the target data entity; generating basic data indicators and enhanced data indicators that match the feature fields according to the data indicator template; and aggregating the basic data indicators and enhanced data indicators to obtain the target data indicator.
[0146] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining basic target data based on basic data indicators; wherein, the basic data indicators include any one or more of indicator names, analysis dimensions, statistical periods, and filtering conditions; and calculating enhanced target data based on enhanced data indicators and basic target data.
[0147] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in the case of failure to match the target data entity, obtaining a pre-built analysis table based on the question information to be analyzed; wherein the pre-built analysis table is pre-built based on the data entities and data models related to the question information to be analyzed; obtaining target data based on the pre-built analysis table, and obtaining data analysis results based on the target data.
[0148] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to a data analysis instruction, it acquires initial question information and extracts target question information belonging to a preset target domain from the initial question information; it inputs the target question information into a semantic analysis model to perform question intent recognition and obtains intent recognition results; and it obtains the question information to be analyzed based on the intent recognition results.
[0149] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: inputting the target question number information into the semantic analysis model for supplementation and / or splitting; matching an approximate question template based on the supplemented and / or split target question number information; if the approximate question template is successfully matched, using the data indicators in the approximate question template as the target data indicators, and performing the step of obtaining target data based on the target data indicators; if the approximate question template is not matched, performing the step of obtaining the question number information to be analyzed based on the intent recognition result.
[0150] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0151] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0152] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A large language model data analysis method, characterized in that, The method comprises: acquiring to-be-analyzed question information, and matching a target data index in a preset data index set according to the to-be-analyzed question information; in a case where the target data index fails to be matched, matching a corresponding target data entity according to the to-be-analyzed question information; in a case where the target data entity is successfully matched, acquiring a data index template, and determining a target data index according to the target data entity and the data index template; acquiring target data according to the target data index, and obtaining a data analysis result according to the target data.
2. The method of claim 1, wherein, The determining of the target data index according to the target data entity and the data index template comprises: extracting a characteristic field of the target data entity; generating a basic data index and an enhanced data index matched with the characteristic field according to the data index template; pooled target data index, the basic data index and the enhanced data index are obtained.
3. The method of claim 2, wherein, The target data comprises basic target data and enhanced target data; the acquiring of the target data according to the target data index comprises: acquiring the basic target data according to the basic data index; wherein the basic data index comprises any one or more of an index name, an analysis dimension, a statistical period, and a filtering condition; the enhanced target data is calculated according to the enhanced data index and the basic target data.
4. The method of claim 1, wherein, After the matching of the target data entity according to the to-be-analyzed question information in a case where the target data index fails to be matched, the method further comprises: in a case where the target data entity fails to be matched, acquiring a pre-constructed analysis table according to the to-be-analyzed question information; wherein the pre-constructed analysis table is pre-constructed according to a data entity and a data model related to the to-be-analyzed question information; acquiring target data according to the pre-constructed analysis table, and obtaining a data analysis result according to the target data.
5. The method according to any one of claims 1 to 4, characterized in that, Before the acquiring of the to-be-analyzed question information, the method further comprises: in response to a data analysis instruction, acquiring initial question information, and extracting target question information belonging to a preset target field in the initial question information; inputting the target question information into a semantic analysis model for question intent recognition, to obtain an intent recognition result; the acquiring of the to-be-analyzed question information comprises: obtaining to-be-analyzed question information according to the intent recognition result.
6. The method of claim 5, wherein, The method further comprises: inputting the target question information into a semantic analysis model for supplementation and / or splitting; matching an approximate question template according to the supplemented and / or split target question information; in a case where the approximate question template is successfully matched, using a data index in the approximate question template as the target data index, and performing the acquiring of the target data according to the target data index; in a case where the approximate question template fails to be matched, performing the acquiring of the to-be-analyzed question information according to the intent recognition result.
7. A large language model data analysis apparatus, characterized by comprising: The device comprises: an information acquisition module, configured to acquire to-be-analyzed question information, and match a target data index in a preset data index set according to the to-be-analyzed question information; The data matching module is used to match the corresponding target data entity based on the question information to be analyzed when the target data indicator fails to match. The indicator matching module is used to obtain a data indicator template when the target data entity is successfully matched, and to determine the target data indicator based on the target data entity and the data indicator template. The data analysis module is used to obtain target data based on the target data indicators and to obtain data analysis results based on the target data.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.