Data processing method and device, electronic equipment, storage medium and program product

By receiving natural language content and automatically identifying intent using pre-trained models and large language models, it generates or analyzes indicator data, solving the problems of insufficient flexibility and real-time performance in existing technologies, and enabling rapid response and flexible data analysis in the fields of finance, e-commerce and online services.

CN121958306APending Publication Date: 2026-05-01CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511929587.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies suffer from poor flexibility and real-time performance when dealing with temporary and fragmented data analysis scenarios in the financial, e-commerce, and online service sectors, making it difficult to quickly respond to the flexible and agile data analysis needs of business personnel.

Method used

By receiving natural language input from users, and utilizing pre-trained intent recognition models and large language models, the system automatically identifies user intent and generates or analyzes indicator data. It extracts key indicators from multi-source heterogeneous data in real time, enabling business personnel to quickly create and obtain the required indicators without needing professional technical backgrounds, and to perform real-time monitoring and in-depth analysis.

Benefits of technology

It enhances the real-time performance and flexibility of time-series data analysis, lowers the threshold for data analysis, meets the rapid response needs for temporary and fragmented data analysis in business scenarios, and supports correlation analysis and real-time monitoring of multi-source data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958306A_ABST
    Figure CN121958306A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, electronic equipment, a storage medium and a program product. The method comprises the steps of receiving natural language content input by a user, and determining a processing intention of the user according to the natural language content; if the processing intention is an index generation intention, determining index information corresponding to the to-be-generated index according to the natural language content; obtaining an original data stream associated with the index according to the index information, and converting the original data stream into index data; wherein the index data is used for returning the index data to the user when the user queries the index data, or determining the index data corresponding to the natural language content when the processing intention of the user is an index analysis intention, and performing index analysis processing. According to the method, the real-time performance and flexibility of time sequence index data analysis are improved, so that the quick response requirement for temporary and fragmented data analysis in a service scene is met.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing methods, apparatuses, electronic devices, storage media and software products Technical Field

[0001] This application relates to the field of intelligent data analysis, and more particularly to a data processing method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] In sectors such as finance, e-commerce, and online services, business personnel and technical operations teams often face ad-hoc and fragmented data analysis needs, such as quickly evaluating the effectiveness of marketing campaigns, validating newly launched features, or troubleshooting sudden business anomalies. These needs typically require systems that can flexibly and agilely extract key metrics from multi-source heterogeneous data and perform real-time or near-real-time calculations and analyses.

[0003] Currently, the analysis of indicator data mainly relies on two types of technical solutions: one is a professional monitoring and alarm system, which is good at collecting and visualizing preset and stable system indicators; the other is a general big data platform and BI tool, which has powerful data processing capabilities.

[0004] However, the relevant technical solutions suffer from poor flexibility and real-time performance when dealing with the aforementioned temporary and fragmented time-series data analysis scenarios. Summary of the Invention

[0005] This application provides data processing methods, apparatus, electronic devices, storage media, and program products to improve the real-time performance and flexibility of time-series indicator data analysis, thereby meeting the rapid response requirements for temporary and fragmented data analysis in business scenarios.

[0006] In a first aspect, embodiments of this application provide a data processing method, including:

[0007] Receive natural language input from the user and determine the user's processing intention based on the natural language input;

[0008] If the processing intent is an intent to generate an indicator, then the indicator information corresponding to the indicator to be generated is determined based on the natural language content;

[0009] Based on the indicator information, the raw data stream associated with the indicator is obtained, and the raw data stream is converted into indicator data; wherein, the indicator data is used to return the indicator data to the user when the user queries the indicator data, or, when the user's processing intent is indicator analysis intent, the indicator data corresponding to the natural language content is determined and indicator analysis processing is performed.

[0010] In one possible implementation, determining the user's processing intent based on the natural language content includes:

[0011] The natural language content is identified using a pre-trained intent recognition model to obtain the first recognized intent and the corresponding intent confidence.

[0012] If the confidence level of the intent is not lower than the confidence threshold, then the first identified intent is determined to be the user's processing intent;

[0013] If the confidence level of the intent is lower than the confidence level threshold, a pre-constructed first prompt word template is obtained. The first prompt word template contains preset slots for receiving the natural language content to guide the generation of processing intent.

[0014] The natural language content is filled into the preset slot of the first prompt word template to generate an intent recognition prompt word;

[0015] The large language model is invoked to identify prompt words based on the intent, thereby obtaining a second identified intent, which is then determined as the user's processing intent.

[0016] In one possible implementation, (the indicator information to be generated is determined based on the natural language content, including:)

[0017] The natural language content is identified using a pre-trained indicator information recognition model to obtain the first indicator information and its corresponding information confidence level.

[0018] If the confidence level of the information is not lower than the confidence threshold, then the first indicator information is determined as the corresponding indicator information;

[0019] If the confidence level of the information is lower than the confidence level threshold, a pre-constructed second prompt word template is obtained. The second prompt word template contains preset slots for receiving the natural language content to guide the generation of indicator information.

[0020] The natural language content is filled into the preset slot of the second prompt word template to generate indicator information recognition prompt words;

[0021] The large language model is invoked to identify prompt words based on the indicator information, obtain second indicator information, and determine the second indicator information as the corresponding indicator information;

[0022] The indicator information includes indicator entities, indicator calculation rules, and indicator attributes.

[0023] In one possible implementation, based on the indicator information, obtaining the raw data stream associated with the indicator and converting the raw data stream into indicator data includes:

[0024] Based on the indicator information, generate the indicator rules corresponding to the indicator;

[0025] Based on the indicator information, obtain the raw data stream associated with the indicator;

[0026] The indicator rules are executed to calculate the original data stream and generate the indicator data.

[0027] In one possible implementation, generating indicator rules corresponding to the indicator based on the indicator information includes:

[0028] Based on the indicator entities and indicator calculation rules contained in the indicator information, code snippets conforming to predefined indicator templates are generated to obtain indicator rules.

[0029] In one possible implementation, based on the indicator entities and indicator calculation rules contained in the indicator information, a code snippet conforming to a predefined indicator template is generated, including:

[0030] Obtain a pre-built third prompt word template, the third prompt word template containing a preset slot for receiving the indicator entity and the indicator operation rules, so as to guide the generation of code snippets corresponding to the indicator;

[0031] The indicator entity and the indicator operation rule are filled into the preset slot of the third prompt word template to generate code and prompt words;

[0032] The large language model is invoked to generate prompt words based on the code, and corresponding code snippets are generated.

[0033] In one possible implementation, obtaining the raw data stream associated with the indicator based on the indicator information includes:

[0034] Invoke the first execution engine to obtain the raw data stream associated with the indicator entity;

[0035] Accordingly, the indicator rules are executed to calculate the original data stream and generate the indicator data, including:

[0036] The raw data stream is distributed to the second execution engine, so that the second execution engine can perform calculations on the raw data stream based on the indicator rules in the isolated environment provided by the first execution engine, and generate indicator data for the indicator.

[0037] In one possible implementation, after generating the indicator data for the indicator, the method further includes:

[0038] The first execution engine is invoked to retrieve the indicator data, and the indicator data, the indicator and its corresponding indicator attributes are stored in a pre-built time series database.

[0039] In one possible implementation, the method further includes:

[0040] If the processing intent is an indicator analysis intent, then determine the indicator data corresponding to the natural language content;

[0041] The indicator data is analyzed to obtain the indicator analysis results;

[0042] Return the indicator analysis results to the user.

[0043] In one possible implementation, determining the indicator data corresponding to the natural language content includes:

[0044] Determine the indicator information corresponding to the natural language content, and read the corresponding indicator data from the pre-built time series database according to the indicator attributes in the indicator information;

[0045] If the indicator data is not successfully read, then based on the indicator information, the original data stream associated with the indicator corresponding to the indicator information is obtained, and the original data stream is converted into indicator data.

[0046] In one possible implementation, based on the indicator attributes in the indicator information, corresponding indicator data is read from a pre-built time-series database, including:

[0047] The first execution engine is invoked to read the corresponding indicator data from the pre-built time-series database based on the indicator attributes in the indicator information.

[0048] If the indicator data is not successfully read, the first execution engine is called again to obtain the original data stream associated with the indicator corresponding to the indicator information based on the indicator information.

[0049] The second execution engine is invoked to convert the raw data stream into metric data.

[0050] In one possible implementation, the indicator data is analyzed to obtain indicator analysis results, including:

[0051] If the analysis type of the indicator analysis intent is simple analysis, then a fourth prompt word template is obtained. The fourth prompt word template contains a preset slot for receiving the indicator data and the indicator analysis intent, so as to guide the generation of indicator analysis results corresponding to the indicator.

[0052] The indicator data and the indicator analysis intent are filled into the preset slots of the fourth prompt word template to generate indicator analysis prompt words;

[0053] The large language model is invoked, and corresponding indicator analysis results are generated based on the indicator analysis prompts.

[0054] In one possible implementation, the indicator data is analyzed to obtain indicator analysis results, including:

[0055] If the analysis type of the indicator analysis intent is complex analysis, then obtain the pre-trained indicator analysis model;

[0056] Based on the indicator analysis model and the indicator analysis intent, the indicator data is analyzed to obtain preliminary analysis results and related analysis data;

[0057] Obtain the fifth prompt word template, which includes a preset slot for receiving the preliminary analysis results, the relevant analysis data, and the indicator analysis intent, so as to guide the generation of indicator analysis results corresponding to the indicator;

[0058] The preliminary analysis results, the relevant analysis data, and the indicator analysis intent are filled into the preset slots of the fifth prompt word template to generate data integration prompt words;

[0059] The large language model is invoked to integrate prompt words based on the data and generate corresponding indicator analysis results.

[0060] In one possible implementation, the method further includes:

[0061] Based on indicator data and / or indicator analysis results, at least one of the pre-trained intent recognition model, pre-trained indicator information recognition model, first prompt word template, second prompt word template, third prompt word template, fourth prompt word template, and fifth prompt word template is optimized and updated.

[0062] In one possible implementation, based on indicator data and / or indicator analysis results, at least one of the pre-trained intent recognition model and the pre-trained indicator information recognition model is optimized and updated, including:

[0063] Acquire at least one record data, wherein each record data includes: processing intent and / or indicator information output by the large language model when the confidence level output by the intent recognition model and / or the indicator information recognition model is lower than the confidence level threshold;

[0064] Using the at least one record data as a feedback signal, the parameters or structure of the intent recognition model and / or the indicator information recognition model are dynamically adjusted through the Bandit algorithm to optimize their recognition performance.

[0065] In one possible implementation, based on the generated indicator data and / or analysis results, at least one of the first prompt word template, the second prompt word template, the third prompt word template, the fourth prompt word template, and the fifth prompt word template is optimized and updated, including:

[0066] For any task type to be generated, obtain at least one candidate prompt word template corresponding to the task type;

[0067] Based on the candidate prompt word templates corresponding to each of the task types, a set of prompt word assembly measurements is generated, and each set of prompt word assembly strategies corresponds to a parameter arm.

[0068] Based on historical interaction records, a corresponding weight vector is maintained for each parameter arm; the historical interaction records include: the prompt word assembly strategy adopted, the corresponding processing intent, the indicator data generated based on the processing intent, and / or the comprehensive reward value determined by the analysis results;

[0069] The Bandit algorithm is used to calculate the expected reward value of each cue word assembly strategy based on the current processing intent and the weight vector of each parameter arm.

[0070] Based on the expected reward value, a target strategy is selected from the plurality of prompt word assembly strategies;

[0071] Based on the overall reward value and the actual effect of the selected target strategy, the weight vector of the corresponding parameter arm is dynamically updated to optimize each of the prompt word templates.

[0072] Secondly, embodiments of this application provide a data processing apparatus, including:

[0073] The processing intent determination module is used to receive natural language content input by the user and determine the user's processing intent based on the natural language content;

[0074] The indicator information identification module is used to determine the indicator information corresponding to the indicator to be generated based on the natural language content if the processing intent is an indicator generation intent.

[0075] The indicator data generation module is used to obtain the raw data stream associated with the indicator based on the indicator information, and convert the raw data stream into indicator data; wherein, the indicator data is used to return the indicator data to the user when the user queries the indicator data, or, when the user's processing intention is indicator analysis intention, to determine the indicator data corresponding to the natural language content and perform indicator analysis processing.

[0076] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0077] The memory stores computer-executed instructions;

[0078] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0079] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0080] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0081] The data processing method, apparatus, electronic device, storage medium, and program product provided in this application embodiment receive natural language content input by a user; based on the natural language content, automatically identify the user's intent as generating or analyzing indicators; when the user's intent is identified as generating an indicator, determine the constituent information of the indicator to be generated according to the natural language content; based on the constituent information, obtain raw data streams from at least one data source; convert the raw data streams into queryable indicator data in real time; and store the indicator data for subsequent querying or analysis; when the user's intent is identified as analyzing an indicator, determine the indicator to be analyzed based on the natural language content, and perform in-depth analysis processing using the stored indicator data; in the above process, users do not need to have professional technical background or understand the underlying data structure to quickly create and obtain the required business indicators through natural language, and support correlation analysis and real-time monitoring of multi-source data. This not only lowers the threshold for data analysis, but also improves the real-time performance and flexibility of time-series data analysis, thereby meeting the rapid response needs for temporary and fragmented data analysis in business scenarios. Attached Figure Description

[0082] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0083] Figure 1 is an application scenario diagram of the data processing method provided in this application;

[0084] Figure 2 is a flowchart illustrating the data processing method provided in this application.

[0085] Figure 3 is a flowchart illustrating the data processing method provided in this application (II).

[0086] Figure 4 is a schematic diagram of the indicator analysis model provided in this application.

[0087] Figure 5 is a schematic diagram of the indicator analysis model provided in this application (II).

[0088] Figure 6 is a schematic diagram of the data processing device provided in this application;

[0089] Figure 7 is a block diagram of an electronic device provided in this application.

[0090] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0091] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0092] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0093] 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. The collection, use and processing of the relevant data shall comply with relevant laws, regulations and standards, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.

[0094] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0095] In sectors such as finance, e-commerce, and online services, business personnel and technical operations teams often face ad-hoc and fragmented data analysis needs, such as quickly evaluating the effectiveness of marketing campaigns, validating newly launched features, or troubleshooting sudden business anomalies. These needs typically require systems to be able to flexibly and agilely extract key metrics from multi-source heterogeneous data and perform real-time or near-real-time calculations and interpretations.

[0096] In the above description, temporary analysis requests can refer to urgent analysis requests put forward by business personnel for specific scenarios; fragmented analysis requests can refer to analysis requests that may involve multiple heterogeneous data sources and require cross-system correlation analysis through intermediate indicator objects.

[0097] For example, during marketing campaigns, business personnel can submit ad-hoc analysis requests, such as "statistics on the number of transactions and payment success rate completed by users in XX region using XX bank cards through a certain product within the next 24 hours." After a new feature or version is launched, the system can build temporary monitoring metrics for niche business scenarios (such as installment payments, foreign card transactions, etc.). For example, by detecting newly added business characteristic fields in the logs, the system can monitor the success rate and anomalies of related transactions in real time.

[0098] For time-series indicator analysis in the above scenarios, those skilled in the art typically adopt the following two architectures when observing indicators: one is an indicator system based on pre-calculation and fixed templates, which relies on fixed patterns or machine learning to preset indicators, such as traditional application performance monitoring systems; the other is an indicator platform based on rule configuration, which transforms raw data into indicator form and analyzes the indicator data based on query statements.

[0099] However, the above-mentioned technical solutions suffer from poor flexibility and real-time performance when dealing with temporary and fragmented time-series data analysis scenarios.

[0100] To address the aforementioned technical problems, this application provides a data processing method aimed at solving them. Specifically, it receives natural language input from a user; automatically identifies the user's intent as generating or analyzing metrics based on the natural language input; when the user's intent is identified as generating a metric, it determines the constituent information of the metric to be generated based on the natural language input; based on the constituent information, it obtains a raw data stream from at least one data source; it converts the raw data stream into queryable metric data in real time; and it stores the metric data for subsequent querying or analysis; when the user's intent is identified as analyzing a metric, it determines the metric to be analyzed based on the natural language input and performs in-depth analysis using the stored metric data. In this process, users do not need a professional technical background or understanding of the underlying data structure to quickly create and obtain the required business metrics through natural language, and it supports correlation analysis and real-time monitoring of multi-source data. This not only lowers the threshold for data analysis but also improves the real-time performance and flexibility of time-series data analysis, thereby meeting the rapid response needs for temporary and fragmented data analysis in business scenarios.

[0101] The data processing method provided in this application is applicable to various data processing scenarios that require the rapid definition, generation, and analysis of business metrics. For example, in enterprise business intelligence and operational analysis scenarios, business personnel can directly describe the data using natural language (such as "I want to see the average daily sales and inventory turnover rate of product A in East China") to automatically generate the corresponding metrics and perform analysis.

[0102] Furthermore, the above methods can also be applied to real-time operation monitoring and early warning scenarios, cross-domain data exploration and correlation analysis scenarios, etc. In short, any field that requires the definition of business indicators, real-time calculation and intelligent analysis through natural language interaction can fall under the application scenarios of the data processing technology solution in this application.

[0103] The application scenarios applicable to the embodiments of this application will be described below with reference to Figure 1. Figure 1 is an application scenario diagram of the data processing method provided by this application.

[0104] Referring to Figure 1, taking the intelligent business analytics scenario as an example, this scenario mainly involves a data processing system and multiple data source systems. The data processing system receives the user's natural language content, parses the user's intent, and executes metric generation or analysis tasks. Multiple data source systems, such as business databases, log systems, and third-party data platforms, provide raw data streams to support the real-time calculation and generation of metric data.

[0105] Based on this, the data processing technical solution provided in this application mainly includes the following steps:

[0106] 1. The data processing system receives natural language input from users and uses natural language processing technology to identify whether the user's intention is to generate or analyze indicators.

[0107] 2. If identified as a generated indicator, the system further parses the natural language description to determine the constituent elements of the indicator to be generated, including indicator name, calculation logic, data source, time range, dimensions and measures, etc.

[0108] 3. Based on the parsed indicator composition information, the system automatically associates with and accesses the corresponding data source system to obtain the required raw data stream.

[0109] 4. Based on the acquired raw data stream, the system performs real-time calculations according to the indicator calculation logic, generates structured indicator data, and stores it in the indicator library.

[0110] 5. If the user's intention is to analyze indicators, the system will retrieve relevant indicator data from the indicator library according to the instruction, and support further in-depth processing such as data aggregation, correlation analysis, and visualization.

[0111] 6. In addition, the system will also provide users with visual feedback on the generated indicator data or analysis results, and continuously optimize the multiple built-in models, prompt word templates and indicator calculation logic based on user interaction behavior.

[0112] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0113] Figure 2 is a flowchart illustrating the data processing method provided in this application. This method can be executed by a data processing device, which can be a server or an electronic device; the following description uses an electronic device as an example. The method in this embodiment can be implemented through software, hardware, or a combination of both. As shown in Figure 2, the method includes:

[0114] S201. Receive natural language input from the user and determine the user's processing intention based on the natural language input.

[0115] In this embodiment, natural language content refers to content input by the user through voice, text, or other interactive methods that expresses their operational or task requirements. For example, a user might input, "Help me find out the amount of money users from XX region will use with XX bank cards to use a certain product after the marketing campaign begins in the next 24 hours."

[0116] Upon receiving natural language content, the system currently performing data processing can parse the instruction using natural language processing technology to obtain the user's processing intent. In this embodiment, the processing intent is mainly divided into indicator generation intent and indicator analysis intent.

[0117] It should be noted that the data processing system in this embodiment is architecturally flexible: it may consist of only one processor, which centrally executes the entire processing from intent recognition, metric generation to metric analysis; or it may adopt a distributed or modular architecture, containing multiple independent processing modules, such as functional modules dedicated to intent recognition, metric generation, and metric analysis, which can be deployed on the same or different computing nodes to work collaboratively. This application does not limit the specific hardware composition and module division of the system.

[0118] In this embodiment, the intent to generate an indicator refers to the user's desire for the system to create or calculate a new indicator based on the original data source. For example, if a user inputs "Calculate the daily order conversion rate after the launch of the XX activity", the system will recognize that the user's intent is to generate an indicator named "Order Conversion Rate". The value of this indicator will be calculated based on the original order data and user data, with a daily time granularity, and will be accompanied by the corresponding timestamp.

[0119] The intent of indicator analysis refers to the user's desire to perform operations such as querying, statistical analysis, comparison, and trend judgment on the indicators that will be generated by the system. For example, if a user enters "compare the user activity trend this month and next month", the system will recognize that the user's intent is to conduct a time-based comparative analysis of the "user activity" indicator.

[0120] Here, an indicator can be understood as a descriptive data entity, that is, after the original data source is distributed to this system, it is processed and transformed into time-series data points that can reflect the state of a specific aspect. Each indicator includes core elements such as indicator name, label (indicator description), indicator value (indicator data), and timestamp.

[0121] Specifically, the metric name uniquely identifies the content measured by the metric, such as "system error rate" or "user session duration"; the label is a set of key-value pairs used to further subdivide and classify the metric in multiple dimensions, for example... A metric value is a specific numerical value measured by a metric at a particular point in time or within a specific time period. It should be understood that the metric value is defined and calculated based on its associated timestamp. For example, it can be an instantaneous value at a certain moment (such as CPU utilization) or an aggregated value based on a time window (such as the total number of requests in the past 5 minutes). The timestamp is used to record the point in time or the end of the time window corresponding to the metric value.

[0122] Based on this, the system can segment the input natural language content into independent lexical units and label the part of speech (such as noun, verb, adjective, etc.) of each word to initially understand the grammatical structure of the instruction. Furthermore, it analyzes the syntactic structure of the instruction, identifies components such as subject, predicate, and object, and determines the dependency relationships between words, thereby more accurately grasping the semantics of the instruction.

[0123] Based on the results of word segmentation, part-of-speech tagging, and syntactic analysis, the core semantic information of the instructions is further extracted. This module can use pre-trained semantic models or domain-specific knowledge graphs to map natural language content to structured intent representations.

[0124] Based on the results of semantic understanding, a pre-set intent classification model or rule base can be used to determine the user's processing intent, thereby identifying whether it belongs to the intent of metric generation or the intent of metric analysis.

[0125] While outputting the processing intent, the system can also simultaneously output the parsing parameters associated with that intent. These parsing parameters may include, but are not limited to: the name of the relevant indicator, the time range, the label filtering conditions, and the type of analysis operation.

[0126] Optionally, the aforementioned processing intent and its associated parsing parameters are typically represented in a structured data format, such as a JSON object. By adopting a structured data format, clear and standardized inputs can be provided for subsequent processing steps, enabling them to directly parse and invoke the data, thereby effectively improving the overall efficiency and maintainability of the system's data processing.

[0127] S202. If the processing intent is to generate an indicator, then determine the indicator information corresponding to the indicator to be generated based on the natural language content.

[0128] In this embodiment, indicator information can be understood as multiple elements related to the indicator, including the indicator entity corresponding to the indicator, the calculation rules for generating the indicator data, and attribute information used to locate or describe the indicator. When the user intent is identified as an indicator generation intent based on the aforementioned implementation method, the natural language content will be analyzed at a deeper level to extract the above-mentioned information.

[0129] Specifically, natural language processing techniques, such as dependency parsing or named entity recognition models, are used to identify the indicator entities contained in the content.

[0130] Based on this, by analyzing verb phrases, numerical relationships, and logical connectors in the instructions, the indicator calculation rules are derived and constructed. Then, by calling pre-set rule templates or using a mapping knowledge base, the natural language description is converted into a formalized calculation expression, and combined with filtering conditions, an executable indicator calculation logic is constructed.

[0131] Simultaneously, the system extracts or supplements indicator attribute information. These attributes are used to further define and locate indicators, ensuring their uniqueness and manageability within the system. Attribute information may include, but is not limited to, business attributes, technical attributes, and representation attributes.

[0132] Specifically, business attributes can refer to the business department and category (financial, operational, etc.) to which the indicator belongs, which can be inferred from the instruction context or the associated business model. Technical attributes can refer to the data source table, update frequency, calculation engine, etc., which may come from the system's preset configuration or metadata repository. Identification attributes can refer to the indicator's unique code, name, version, etc., used for precise location in the indicator database.

[0133] The parsed indicator entities, indicator operation rules, and indicator attributes are structured and integrated to obtain the indicator information corresponding to the indicator.

[0134] In the above method, through a multi-level parsing and information extraction process, all the necessary information for generating indicators can be accurately determined from the fuzzy natural language content, realizing an efficient and accurate conversion from user needs to machine-executable instructions.

[0135] S203. Based on the indicator information, obtain the raw data stream associated with the indicator and convert the raw data stream into indicator data.

[0136] In this embodiment, based on the indicator information obtained from the above implementation method, the corresponding raw data stream can be located and accessed according to the indicator information. Here, the raw data stream may come from multiple heterogeneous data sources. For example, business transaction tables in relational databases; log file systems such as server application logs or user behavior logs that exist in streaming or batch file formats; real-time event streams in message queues such as Kafka; and real-time or near-real-time data obtained from third-party systems by calling external API interfaces.

[0137] It should be understood that the data acquisition process described above can be dynamic and adaptive. For example, if the metric is a real-time metric, a subscription to a message queue or database change log can be established to obtain a continuous data stream; if it is an offline T+1 metric, a batch read task of the corresponding partition data in the data warehouse or distributed file system can be automatically triggered based on the time attribute.

[0138] After acquiring the raw data stream, the system can clean, transform, and aggregate the raw data in the preset data processing engine according to the indicator calculation rules defined in the indicator information to generate the required indicator data.

[0139] Specifically, data extraction and filtering can be performed first according to the filtering conditions in the operation rules, extracting relevant records from the raw data stream and excluding irrelevant data. Next, field mapping and transformation are performed, mapping the raw data fields to the input fields required by the indicator operation logic, and performing necessary type conversions, null value handling, and simple calculations. Further, aggregation calculations are performed, completing grouping and aggregation operations according to the operation rules. For complex indicators, preset or dynamically generated composite calculation function chains can also be called to obtain the indicator data.

[0140] In this embodiment, the indicator data generated based on the above implementation method has multiple application scenarios, mainly reflected in the following two aspects:

[0141] On one hand, the indicator data is used to respond to query requests and directly return results to users. Specifically, when the system recognizes that a user intends to query a specific indicator, the user can initiate a request through natural language content or a structured query interface. After receiving the query, the system first parses the information in the query content, and then locates and retrieves the corresponding indicator data in the time-series database or cache system where the indicator data is stored. Considering that the indicator data has already been preprocessed and aggregated according to business needs, the system can return the data in tables, charts, or other visualization formats, thereby meeting the user's need for immediate access to and viewing of indicator data.

[0142] On the other hand, when the user's processing intent is indicator analysis, indicator data serves as the foundational input for further in-depth analysis. Specifically, the system first performs deep parsing of the natural language content to identify the analysis type and determine the required indicator data. Next, it extracts the corresponding data from a time-series database or caching system and performs data alignment, splicing, or derived calculations according to the analysis requirements to generate a dataset suitable for the analysis model. The system then calls the appropriate analysis model or algorithm, such as trend prediction or root cause localization models, to process the dataset and obtain the analysis results. Based on this, the analysis results can be returned to the user in the form of structured reports, key insights, or enhanced visualization charts, thereby transforming the indicator data into indicator analysis results to support business decisions.

[0143] The above methods, through two application approaches, not only enable convenient querying of indicator data, but also allow the indicator data to directly serve business decisions, thereby improving the efficiency of data utilization.

[0144] Referring to Figure 3, the detailed execution process of the data processing technical solution will be further described below. It should be noted that the following description is merely an exemplary implementation of the technical solution in this application and does not constitute a limitation on the technical solution of this application.

[0145] In this embodiment, an optional implementation of determining the user's processing intent based on the natural language content input by the user may include: using a pre-trained intent recognition model to recognize the natural language content, obtaining a first recognized intent and a corresponding intent confidence level; if the intent confidence level is not lower than a confidence threshold, then determining the first recognized intent as the user's processing intent; if the intent confidence level is lower than the confidence threshold, then obtaining a pre-constructed first prompt word template, the first prompt word template containing preset slots for receiving natural language content to guide the generation of processing intent; filling the preset slots of the first prompt word template with natural language content to generate intent recognition prompt words; calling a large language model, obtaining a second recognized intent based on the intent recognition prompt words, and determining the second recognized intent as the user's processing intent.

[0146] To overcome the knowledge barrier between large language models and domain-specific private data, directly training the large language model for a specific project often faces high costs and implementation difficulties. Therefore, this embodiment proposes a collaborative recognition method that integrates a lightweight dedicated model and a large language model. Specifically, a classification dictionary covering key domain concepts is first constructed. This dictionary includes at least a structured classification system such as intent categories, indicator entities, and callable functions. Then, a lightweight dedicated classification model is trained using samples labeled in this dictionary. This model can preferentially map the input natural language to the structured classification labels in the dictionary; and these classification labels are transformed into standardized instruction descriptions or case sets that are easy for the large language model to understand, serving as precise parameter inputs to guide the large language model in deep semantic understanding or directly triggering subsequent corresponding system interface calls.

[0147] In the current intent recognition stage, the system maps the natural language content input by the user into an executable processing intent, and accordingly links the corresponding project interface or triggers the corresponding workflow.

[0148] Specifically, the system predefines a series of standard intent categories. For example, when a user expresses "help me calculate" or "create an indicator," it is identified as the CreateMetric intent, triggering the indicator creation process; for simple query requests, it is identified as the SearchMetric intent; if the user's instruction contains keywords such as "compare," it is identified as the Compare intent, initiating the comparison analysis process; and when it involves future-oriented expressions such as "predict," it is identified as the Forecast intent, calling the predictive analysis interface.

[0149] Through the above classification mapping, the system can accurately understand the natural language content input by the user and trigger the execution of subsequent functions in a targeted manner.

[0150] In the aforementioned intent recognition process, the dedicated model can be a pre-trained intent recognition model. This model can be implemented using a deep learning-based classification model, such as a Bidirectional Encoder Representations from Transformers (BERT) model based on the Transformer architecture, a Text Convolutional Neural Network (TextCNN) model, or a Long Short-Term Memory Network (LSTM) model. These models can extract effective semantic features from natural language text and output the corresponding intent category and its confidence level through a classification layer.

[0151] Specifically, this embodiment uses the BERT model as an example. The received natural language content is input into the model, and the model output includes one or more possible first recognition intentions, and the intention confidence level corresponding to each first recognition intention. Here, the confidence level can characterize the degree of certainty that the model has about the corresponding recognition result of its output.

[0152] After obtaining the intent confidence score from the model output, the system compares it with a confidence threshold. Optionally, if the intent confidence score corresponding to a certain first identified intent is not lower than the confidence threshold (e.g., 0.9), it indicates that the current BERT model has a high degree of confidence in the identification result, and the system directly determines the first identified intent as the user's final processing intent.

[0153] In another scenario, if the intent confidence level is below the confidence threshold, it indicates that the user's natural language input may be complex or ambiguous, making it difficult for the current BERT model to make a reliable judgment. In this case, the system can invoke a large language model to enhance intent recognition.

[0154] Specifically, a pre-constructed first prompt word template can be obtained first. This template is a preset text structure containing preset slots for receiving natural language content, and its content is designed to guide the large language model to focus on the intent recognition task. For example, the template could be: "Please determine the core intent of the following user question and answer with a single keyword or phrase: [User Input]". The user's input natural language content is then filled into the preset slots of this template to generate structured intent recognition prompt words. Next, the large language model is invoked, the intent recognition prompt words are input, and the text output generated by the large language model is obtained as the second recognition intent, which is then determined as the user's final processing intent.

[0155] Specifically, by combining a lightweight intent recognition model with a large language model, while ensuring rapid response to common intents, the deep semantic understanding capability of the large language model is used to handle complex and ambiguous scenarios, thereby improving the overall accuracy of intent recognition and system accuracy.

[0156] When the user intent is identified as the intent to generate an indicator based on the aforementioned implementation method, the natural language content will be analyzed at a deeper level to extract the indicator information corresponding to the indicator to be generated, and the indicator data corresponding to the indicator will be obtained based on the indicator information.

[0157] Understandably, in order to improve overall processing efficiency during the current indicator information identification stage, the processing method of the aforementioned intent identification stage can also be referred to, that is, first use a lightweight dedicated model to identify information, and then call a large language model based on the identification results to complete the generation and processing of indicator data.

[0158] Based on this, one optional implementation method for determining the indicator information of the indicator to be generated in this embodiment may include: using a pre-trained indicator information recognition model to identify indicator information in natural language content to obtain first indicator information and its corresponding information confidence level; if the information confidence level is not lower than the confidence level threshold, then the first indicator information is determined as the corresponding indicator information; if the information confidence level is lower than the confidence level threshold, then a pre-constructed second prompt word template is obtained, the second prompt word template containing preset slots for receiving natural language content to guide the generation of indicator information; natural language content is filled into the preset slots of the second prompt word template to generate indicator information recognition prompt words; a large language model is called to identify prompt words based on indicator information to obtain second indicator information, and the second indicator information is determined as the corresponding indicator information; wherein, the indicator information includes indicator entities, indicator operation rules, and indicator attributes.

[0159] In this embodiment, the indicator information may include indicator entities and indicator calculation rules. Here, indicator entities can be understood as user-defined metrics (UDMs); indicator calculation rules can be understood as user-defined indicator calculation methods (UDFs).

[0160] Specifically, taking the BERT model as an example again, the received natural language is input into the model, and the model output includes one or more possible first indicator information, and the information confidence level corresponding to each first indicator information. Here, the confidence level can characterize the degree of confidence of the model in the corresponding recognition result of the current output.

[0161] After obtaining the confidence level of the model output, the system compares it with a confidence threshold. Optionally, if the confidence level of the information corresponding to a certain second recognition intent is not lower than the confidence threshold (e.g., 0.9), it indicates that the current BERT model has a high degree of confidence in the recognition result, and the system directly determines the first indicator information as the final indicator information.

[0162] If the confidence level of the information is lower than the confidence threshold, it indicates that the current input may be complex or ambiguous, making it difficult for a dedicated model to reliably identify. In this case, the system can further utilize a large language model for enhancement processing.

[0163] Specifically, the system obtains a pre-built second prompt word template, which also contains preset slots for receiving natural language content. However, this template is used to guide the large language model to focus on the task of extracting indicator information. For example, the template could be: "Please extract indicator-related information from the following user input, including indicator name and calculation rules, and output it in a structured form: [User Input]".

[0164] The user-input natural language content is filled into the preset slots of the second prompt word template to generate structured indicator information recognition prompt words. Subsequently, the large language model is invoked, the prompt words are input, and the text output generated by the model is obtained as the second indicator information, which is then determined as the final indicator information.

[0165] Through the above methods, while maintaining the ability to quickly identify common indicators, the system can leverage the deep semantic understanding capabilities of large language models to effectively handle complex, ambiguous, or novel indicator description scenarios, thereby improving the overall coverage and accuracy of indicator information identification.

[0166] In addition, the indicator information also includes the number of indicators, which describes the characteristics or constraints of the indicators and provides structured information for subsequent correlation identification and processing.

[0167] One explanation is that traditional indicator construction typically involves designing directly based on indicator labels. However, when there are many associated attribute dimensions, such as a transaction table containing fields like transaction type, transaction status, and transaction amount, directly relying on a large language model to generate combined labels like "trans_amt_by_transaction type_transaction status_..." could lead to an explosive increase in the number of indicator labels, which is detrimental to system maintenance and use.

[0168] To avoid generating redundant or invalid indicator labels due to endless attribute concatenation, this embodiment can pre-build a data structure information database corresponding to the original data source. This database can be configured with metadata such as system affiliation and business content based on the data tables in the large model platform. When indicator information is subsequently identified, the system can assign indicator data to it according to the business meaning of the indicator, such as descriptive information and primary key identifier (ID). At this time, other auxiliary information is uniformly maintained and managed through a structured metadata system.

[0169] Based on the indicator information obtained from the above implementation method, the corresponding raw data stream can be located and accessed according to the indicator information, and the raw data stream can be converted into indicator data.

[0170] Optionally, one possible implementation method for accessing the raw data stream based on indicator information and converting it into indicator data may include: generating indicator rules corresponding to the indicator based on the indicator information; obtaining the raw data stream associated with the indicator based on the indicator information; executing the indicator rules to calculate the raw data stream and generate indicator data for the indicator.

[0171] Specifically, the system can parse the defined calculation logic, data processing steps, and output format requirements based on the indicator calculation rules (such as user-defined functions, UDFs) contained in the indicator information, and generate executable code based on these rules and the indicator entity to obtain the corresponding indicator rules. In this embodiment, these indicator rules can be used to guide subsequent calculations and transformations of the original data stream.

[0172] During this process, the system can also synchronously retrieve the raw data stream associated with the metric from relevant data sources based on the metric entity (such as a user-defined metric UDM). It can be understood that the raw data stream may originate from one or more of the following: a database, message queue, log file, or real-time data interface, and its data content corresponds to the business dimensions and attributes that the metric focuses on.

[0173] Based on this, the system executes the generated indicator rules to calculate and process the acquired raw data stream, generating indicator data that conforms to preset format and semantic requirements. Specifically, this processing may include data cleaning, field mapping, aggregation operations, conditional filtering, and other operations, and outputs structured indicator results for subsequent analysis, storage, or visualization.

[0174] In this way, the system can automatically construct executable indicator rules based on the user's natural language description and associate them with the corresponding data source to realize the automatic conversion from raw data stream to indicator data, thereby improving the efficiency of indicator construction and data generation.

[0175] In the process of generating the above indicator data, one optional implementation method for generating indicator rules based on indicator information may include: generating code snippets that conform to a predefined indicator template based on the indicator entities and indicator operation rules contained in the indicator information, thereby obtaining the indicator rules.

[0176] Specifically, a pre-built indicator template library is obtained. This template library pre-defines code frameworks, i.e., code templates, corresponding to different types of indicators. Each code template reserves indicator entity placeholders, calculation rule placeholders, etc., for receiving specific indicator information.

[0177] Furthermore, based on the current indicator generation intention, the system determines the code template corresponding to the indicator to be generated, and fills the indicator entity and indicator operation rules identified in the aforementioned implementation into the corresponding placeholders of the template, thereby generating a preliminary code fragment.

[0178] To obtain grammatically correct and logically complete code snippets, the system can perform syntax validation and code optimization on the filled code. For example, the syntax parser can check whether the code snippet conforms to the syntax of the corresponding programming language, or verify whether it completely covers all entities and operation rules in the indicator information, and whether any dimension filtering conditions are missing, or whether the operation logic is completely consistent with the indicator rules.

[0179] Optionally, if syntax errors or rule omissions are found during the verification process, the system can attempt to automatically locate and correct the erroneous nodes; if automatic correction is not possible, the exception information can be fed back to the manual configuration end for intervention and adjustment by operations and maintenance personnel. After successful verification, the system encapsulates the code snippet into an indicator rule that can be recognized and executed by the indicator data calculation engine.

[0180] In some implementations, the code generation process can also be implemented through a pre-trained machine learning model or a large language model. This embodiment does not limit the specific method of code generation.

[0181] Through the above methods, the system can automatically convert indicator information into executable code rules, thereby improving the efficiency and accuracy of indicator construction, while reducing the technical threshold and maintenance cost of manual coding.

[0182] In the above code generation process, the implementation process of generating code snippets based on the large language model may include: obtaining a pre-built third prompt word template, which contains preset slots for receiving indicator entities and indicator operation rules to guide the generation of code snippets corresponding to the indicators; filling the indicator entities and indicator operation rules into the preset slots of the third prompt word template to generate code generation prompt words; calling the large language model to generate corresponding code snippets based on the code generation prompt words.

[0183] Specifically, a pre-configured third prompt word template is obtained. This template is a prompt word framework customized for the indicator code generation scenario, which is intended to guide the large language model to focus on performing code snippet generation tasks.

[0184] The indicator entities and indicator operation rules obtained based on the aforementioned implementation method are accurately filled into the corresponding preset slots of the third prompt word template to generate complete code generation prompt words.

[0185] After constructing the code generation prompts, the large language model is invoked by calling the preset API interface, and the complete code generation prompts are passed into the model as input parameters.

[0186] After receiving the prompt words, the large language model, based on its code generation capabilities and domain knowledge of index calculation, parses the instruction requirements, index entities and calculation rules in the prompt words, generates code snippets that conform to the predefined template specifications, and outputs them.

[0187] Optionally, the system can verify and optimize the code snippets generated by the large language model to obtain code snippets that conform to the specifications.

[0188] Through the above methods, the system can leverage the code generation capabilities of large language models to transform indicator information into executable indicator rules, thereby reducing the technical threshold and time cost of manually writing indicator rules and improving the efficiency and code quality of indicator construction.

[0189] During the generation of the aforementioned indicator rules, the raw data stream used for subsequent calculations can also be synchronized. Optionally, one possible implementation of obtaining the raw data stream may include: invoking a first execution engine to obtain the raw data stream associated with the indicator entity. Based on this, the process of calculating the raw data stream according to the indicator rules to obtain indicator data may include: distributing the raw data stream to a second execution engine, so that the second execution engine can perform calculations on the raw data stream based on the indicator rules in the isolated environment provided by the first execution engine to generate the indicator data of the indicator.

[0190] In this embodiment, considering that traditional monitoring systems rely on hard-coded logic, changes to indicator rules require recompilation and deployment, making it difficult to quickly respond to temporary data analysis needs, and that directly using large models to generate code poses security risks, this embodiment adopts a dual-execution engine strategy. That is, the first execution engine handles high-concurrency I / O tasks, and the second execution engine executes data processing logic, in order to solve the problems of poor flexibility and insufficient security of traditional systems. At the same time, by decoupling resources and optimizing hardware utilization, the system can still maintain low latency and high stability in high-concurrency scenarios.

[0191] It can be explained that the first execution engine can be a Go service, or it can be any other service framework with high concurrency and high performance characteristics. This embodiment does not limit this.

[0192] Taking Go service as the first execution engine as an example, during the synchronization phase of indicator rule generation, the system can utilize the high-performance characteristics of Go service to retrieve the original data associated with the indicator entity.

[0193] Specifically, the system can trigger the Go service to perform data acquisition tasks through a preset interface. Based on pre-configured data source connection information, the Go service quickly establishes connections to data sources such as databases, message queues, or real-time data interfaces, and continuously performs raw data acquisition actions to extract raw data streams related to the indicator entities.

[0194] Because of Go's high concurrency and low latency, even when faced with massive data scenarios such as order tables with tens of millions of records, Go services can achieve parallel data reading and streaming through the coroutine mechanism. This can effectively avoid memory overflow problems caused by loading all data, thereby ensuring the efficiency and stability of the system's data acquisition process.

[0195] The Go service also outputs the acquired raw data stream to the second execution engine in real time through a preset interface for data computation. It should be noted that the second execution engine can be a Lua virtual machine, or other scripting or computational engines, such as a Python interpreter or a custom rule engine; this embodiment does not specifically limit this. Furthermore, the system distributes the raw data stream output by the Go service to the Lua virtual machine at a preset rate, simultaneously triggering the initialization process of the isolated environment (sandbox).

[0196] It is understood that in this embodiment, the Go service pre-creates an independent isolated environment, i.e., a sandbox, for each Lua virtual machine instance. This sandbox can strictly limit the system resource access permissions of the Lua virtual machine and set resource usage thresholds to avoid system risks caused by malicious computing logic or data overflow.

[0197] Based on this, the previously generated indicator rules (code snippets) can be converted into bytecode executable by the Lua virtual machine and loaded into the sandbox environment. Optionally, for different types of indicator calculation rules, the Lua virtual machine can automatically match the corresponding built-in function library, such as loading the math library when calculating the growth rate and loading the datetime library when processing time dimension filtering, to ensure the complete execution of the indicator rules.

[0198] Specifically, within the sandboxed isolation environment provided by the Go service, the Lua virtual machine performs computational tasks on the incoming raw data streams based on pre-generated metric rules. This computation process may include data filtering, field mapping, aggregation operations, and conditional judgments. After completing the computation, the Lua virtual machine further aggregates and formats the intermediate results to generate metric data that conforms to preset output formats and semantic requirements.

[0199] The above methods ensure both the efficiency of raw data retrieval and the security and controllability of the computation process through sandbox isolation.

[0200] After generating the indicator data, the technical solution provided in this application may further include: calling the first execution engine to retrieve the indicator data, and storing the indicator data, the indicator and its corresponding indicator attributes into a pre-built time series database.

[0201] Specifically, the system calls the first execution engine (i.e., the Go service) to periodically retrieve metric data generated within a specified time window from the output of the second execution engine (i.e., the Lua virtual machine) at preset time intervals. Furthermore, the metric data, the corresponding metric entity, and its related attributes are stored in a pre-built time-series database. In this embodiment, this time-series database can be used to support efficient writing, persistent storage, and fast time-series-based querying of metric data.

[0202] Through the above methods, the system realizes the timed collection and automated archiving of indicator data, providing a complete, traceable and structured time-series data foundation for subsequent data analysis, monitoring and early warning and visualization.

[0203] It should be noted that the first execution engine provided in this embodiment supports dynamic loading and hot updating capabilities during operation.

[0204] Specifically, taking the first execution engine and Go service as an example: the system maintains two configuration instances based on the Dynamic library, labeled as the active instance and the shadow instance. During service operation, the current service only uses the active instance to perform data acquisition and processing tasks. When the configuration in the metrics database is updated, the system asynchronously loads the new configuration parameters on the shadow replica. This loading process is completely independent and does not affect the active instance that is providing services, thus ensuring service continuity. After the new configuration is loaded in the shadow instance and completes internal validation (such as syntax checking, dependency validation, etc.), the system uses an atomic operation (such as atomic pointer swapping) to point the active instance to the new configuration instance. This operation is completed in a very short time and can be considered an instantaneous switch.

[0205] Through the above mechanism, the system can ensure that at any time the configuration is updated, there is at least one complete and consistent configuration instance available for the service, thereby achieving smooth, lock-free and thread-safe hot reload and effectively supporting the real-time update and deployment of business rules.

[0206] Based on the above implementation method, if the user's processing intent is determined to be an indicator analysis intent based on the aforementioned intent recognition method, the technical solution provided in this embodiment further includes: determining the indicator data corresponding to the natural language content; analyzing the indicator data to obtain the indicator analysis result; and returning the indicator analysis result to the user.

[0207] Specifically, natural language content can be parsed based on the aforementioned implementation methods to obtain indicator information corresponding to the indicator to be analyzed. Then, indicator data can be queried in a pre-built time-series database based on the indicator attributes contained in the indicator information to obtain the corresponding indicator data.

[0208] The system analyzes the indicator data to obtain indicator analysis results. This analysis process may include trend calculation, year-on-year and month-on-month analysis, anomaly detection, multi-indicator correlation analysis, etc., and may be combined with preset business rules or machine learning models for in-depth mining. This embodiment does not limit the analysis method.

[0209] Based on the analysis results, the indicator analysis results are returned to the user through a pre-defined interactive interface or message channel. Optionally, the returned data may include structured data, visual charts, or natural language descriptions to meet the user's needs for real-time perception of indicator status and decision support.

[0210] Through the above methods, the system has achieved automated processing from natural language input to indicator analysis result output, improving the user's interaction efficiency and experience in indicator query and analysis scenarios.

[0211] In the above analysis process, one possible implementation of determining the indicator data corresponding to the natural language input by the user may include: determining the indicator information corresponding to the natural language content, reading the corresponding indicator data from a pre-built time series database according to the indicator attributes in the indicator information; if the indicator data is not successfully read, obtaining the original data stream associated with the indicator corresponding to the indicator information according to the indicator information, and converting the original data stream into indicator data.

[0212] Specifically, when querying indicator data in a time-series database based on indicator information, if the system fails to find indicator data corresponding to the natural language content entered by the user in the time-series database, it can provide the user with a prompt message, such as: "The indicator data you are querying is not currently stored in the system. Please confirm whether the input content is correct."

[0213] If the user confirms that the input is correct, the system can further explain to the user: "To analyze what you have entered, we need to generate the corresponding indicator data first." After the user confirms the generation operation, the system will automatically switch to the aforementioned process branch for generating indicator data based on indicator information.

[0214] Furthermore, after completing the indicator data generation process and obtaining the corresponding indicator data, the system can retrieve the indicator data from the time series database or cache based on the indicator's attribute information, continue to execute the subsequent indicator analysis process, and return the indicator analysis result to the user after obtaining the result.

[0215] Through the above methods, the system enables on-demand generation and seamless analysis of non-preset indicators, enhancing the system's adaptability and user experience in dynamic business scenarios.

[0216] In the process of querying indicator data in the time series database based on indicator information, an optional implementation method may include: calling a first execution engine to read the corresponding indicator data from the pre-built time series database according to the indicator attributes in the indicator information; if the indicator data is not successfully read, continuing to call the first execution engine to obtain the original data stream associated with the indicator corresponding to the indicator information according to the indicator information; and calling a second execution engine to convert the original data stream into indicator data.

[0217] Specifically, referring to the aforementioned implementation method, the system can invoke the first execution engine (i.e., the Go service). Based on the metric attributes identified in the aforementioned steps, the Go service pulls the corresponding metric data from the pre-built time-series database.

[0218] Optionally, if the corresponding metric data cannot be successfully retrieved (for example, the metric has not yet been calculated or stored), the first execution engine is invoked. In this case, the first execution engine reads the raw data stream from the data source associated with the metric to be generated based on the metric entity defined in the metric information, and transmits it to the second execution engine (i.e., the Lua virtual machine).

[0219] Next, the Lua virtual machine, within the sandboxed isolation environment provided by the Go service, loads and executes the metric rules (such as Lua scripts) corresponding to the metric to be generated, performing calculations on the incoming raw data stream. This calculation process may include operations such as data filtering, aggregation statistics, and conditional judgments, ultimately generating metric data that conforms to a preset format.

[0220] Through the above methods, the system can achieve on-demand acquisition and real-time calculation of indicator data, and automatically fill in missing data during the query, thereby supporting dynamic and real-time indicator query and analysis needs.

[0221] Based on the above-mentioned indicator data, it should be noted that different indicator analysis tasks can correspond to different computational complexities and resource requirements. Therefore, in order to improve analysis efficiency and resource utilization, this embodiment can first identify the analysis type corresponding to the indicator analysis intention before performing the analysis, that is, determine whether it is a simple analysis or a complex analysis, and adopt different analysis strategies for different analysis types.

[0222] For example, for simple analyses (such as single-indicator numerical queries and trend viewing within a fixed time range), the system can adopt a lightweight real-time computing strategy to respond quickly based directly on the query results; for complex analyses (such as multi-indicator correlation analysis, large-scale historical data mining, and anomaly detection based on machine learning models), the system can enable strategies such as asynchronous computing, distributed processing, or calling a dedicated analysis engine to ensure the depth of analysis and the overall performance of the system.

[0223] It can be noted that the determination of the analysis type can be automatically identified by a pre-trained classification model, or it can be determined by preset classification rules, such as based on query keywords, number of indicators, time range complexity, etc. This embodiment does not limit the specific classification method.

[0224] In this way, the system can dynamically adapt the processing strategy according to the actual situation of the analysis task, so as to meet the user's analysis needs while achieving reasonable scheduling of computing resources and optimized balance of system load.

[0225] Based on this, an optional implementation of the system to analyze indicator data to obtain indicator analysis results may include: if the analysis type of the indicator analysis intent is simple analysis, then obtaining a fourth prompt word template, which contains preset slots for receiving indicator data and indicator analysis intent to guide the generation of indicator analysis results corresponding to the indicators; filling the preset slots of the fourth prompt word template with indicator data and indicator analysis intent to generate indicator analysis prompt words; and calling a large language model to generate corresponding indicator analysis results based on the indicator analysis prompt words.

[0226] Specifically, when the current indicator analysis intent is determined to be simple analysis based on the above implementation method, the system obtains a pre-configured fourth prompt word template. This template contains preset slots for receiving indicator data and indicator analysis intent, and its structure is designed to guide the large language model to generate concise, direct indicator analysis results that match the user's input intent.

[0227] Furthermore, the system fills the indicator data and indicator analysis intent obtained in the aforementioned steps into the corresponding preset slots of the fourth prompt word template, generating structured analysis prompt words.

[0228] Based on this, the system calls the large language model, takes the indicator analysis prompt words as input, and the large language model generates the corresponding indicator analysis results in natural language form based on its internal knowledge and understanding of the prompt word structure, and returns them to the user.

[0229] Through the above methods, the system can directly utilize the semantic understanding and text generation capabilities of large language models in a lightweight and efficient manner for simple analysis scenarios, achieving rapid conversion from structured data to natural language analysis results, thereby improving the interactive experience and response efficiency.

[0230] Another optional implementation method for analyzing indicator data and generating indicator analysis results may include: if the analysis type of the indicator analysis intent is complex analysis, then obtaining a pre-trained indicator analysis model; based on the indicator analysis model and the indicator analysis intent, performing indicator analysis on the indicator data to obtain preliminary analysis results and related analysis data; obtaining a fifth prompt word template, which contains preset slots for receiving preliminary analysis results, related analysis data, and indicator analysis intent to guide the generation of indicator analysis results corresponding to the indicators; filling the preset slots of the fifth prompt word template with the indicator data and indicator analysis intent to generate data integration prompt words; and calling a large language model to generate corresponding indicator analysis results based on the data integration prompt words.

[0231] Specifically, when determining the current indicator analysis intent as complex based on the above implementation method, considering that directly calling a large language model to handle complex analysis tasks might require constructing extremely complex prompts and relying on the model for extensive inference calculations, resulting in high response latency, high computational costs, and difficulty in guaranteeing result stability, this embodiment obtains a lightweight indicator analysis model corresponding to the current indicator analysis intent to improve processing efficiency and the professionalism of the results. This model can be a specialized analysis model trained based on machine learning or deep learning techniques, such as a model used for trend prediction, anomaly detection, or multi-indicator correlation analysis.

[0232] Specifically, the analysis can be implemented in two ways: offline mode and online mode.

[0233] Referring to Figure 4, in offline mode, the system uses task parameters (including the training interval `fit_every`, the inference interval `infer_every`, and the training data time window `fit_window`) to assist in timed scheduling, achieving phased online training and inference. For example, setting... The system will select data from the most recent period as the training baseline, and then use the data from the new period for inference. Example functions, such as trend prediction, can be used... And complete it in conjunction with the corresponding training intervals.

[0234] Referring to Figure 5, in online mode, the system directly defines a smaller time interval for real-time anomaly detection, constructing an inference window corresponding to the current time period. For example, using data from the most recent day as a "normal" baseline, it is divided into 12 or 24 time points for observation. Any newly arriving delayed data points are immediately compared to this dynamic baseline. Example functions are as follows... It also enables real-time analysis by using a balanced online interval.

[0235] In this embodiment, the preliminary analysis results obtained based on the index analysis model may include the numerical values, classification labels, or probability information output by the model, and the relevant analysis data may include intermediate model results, confidence indexes, or feature data for auxiliary analysis.

[0236] Considering that the analysis results of complex analyses may be technical and difficult for users to understand, or that users expect more interpretable and readable summaries, this embodiment can further process the preliminary analysis results and related analysis data obtained above by using a large language model to generate final index analysis results in natural language form that are easy to understand.

[0237] Before further processing based on the large model, the system first obtains a pre-configured fifth prompt word template. This template contains preset slots for receiving preliminary analysis results, relevant analysis data, and indicator analysis intentions. The structure of this template is designed to guide the large language model to generate final indicator analysis results in natural language form that are easy to understand.

[0238] Furthermore, the preliminary analysis results, relevant analysis data, and indicator analysis intentions obtained in the aforementioned steps are filled into the corresponding preset slots of the fifth prompt word template to generate structured data integration prompt words.

[0239] Based on this, the system calls the large language model, takes the data integration prompt words as input, and the large language model generates the corresponding natural language form of indicator analysis results based on its internal knowledge and understanding of the prompt word structure, and returns them to the user.

[0240] Based on this, the indicator analysis results obtained from the above analysis and processing can be stored in a time series database, and the corresponding indicator attributes can be configured for the indicator data according to the indicator information construction process described in the aforementioned embodiments, so as to realize the association storage of indicator data and indicator attributes, thereby supporting users' real-time or subsequent query and analysis needs.

[0241] The above implementation method, by introducing a pre-trained index analysis model and a large language model guided by prompt word templates for collaborative analysis, can efficiently handle complex analysis tasks, automatically generate accurate and interpretable index analysis results, and improve analysis efficiency, readability and interpretability of results.

[0242] Based on the above implementation methods, this embodiment further introduces an optimization mechanism to continuously update and optimize the various recognition models and prompt word templates involved in the aforementioned implementation methods, thereby improving the system's execution efficiency and analysis effect during data processing.

[0243] Optionally, the optimized and updated technical solution in this embodiment may include: optimizing and updating at least one of the pre-trained intent recognition model, the pre-trained indicator information recognition model, the first prompt word template, the second prompt word template, the third prompt word template, the fourth prompt word template, and the fifth prompt word template based on indicator data and / or indicator analysis results.

[0244] In this embodiment, the system supports continuous optimization and updating of relevant models and prompt word templates based on indicator data and / or indicator analysis results generated during actual operation. Specifically, the objects of optimization and updating may include one or more of the pre-trained intent recognition model, the pre-trained indicator information recognition model, and the first to fifth prompt word templates.

[0245] In one implementation, the system can periodically or triggerively collect historical indicator data and its corresponding analysis results to construct an optimized training sample set. For example, when a user provides feedback or corrections to the generated indicator analysis results, this feedback information can be recorded along with the corresponding indicator data and analysis intent for subsequent model fine-tuning.

[0246] For intent recognition models and indicator information recognition models, incremental learning or online learning methods can be used to update model parameters with new samples in order to improve their recognition accuracy and generalization ability.

[0247] For the first to fifth prompt word templates, the guiding statements, slot settings, or contextual structure in the templates can be dynamically adjusted based on the quality of the actual generated results and user interaction feedback. For example, if a prompt word template frequently generates analysis results that do not meet expectations, the expression of the template can be revised in conjunction with successful cases, or constraints can be added to improve the standardization and accuracy of the large language model output.

[0248] Through the aforementioned continuous optimization mechanism, the system can gradually adapt to changes in different business scenarios and user needs, enabling the self-evolution of models and templates, thereby maintaining the reliability and effectiveness of the analysis process in the long term.

[0249] In the above optimization and update process, an optional implementation of optimizing the relevant model may include: acquiring at least one record data, wherein each record data includes: processing intent and / or indicator information output by the large language model when the confidence level of the intent recognition model and / or indicator information recognition model is lower than the confidence level threshold; using at least one record data as a feedback signal, dynamically adjusting the parameters or structure of the intent recognition model and / or indicator information recognition model through the Bandit algorithm to optimize its recognition performance.

[0250] Specifically, when the confidence level of the intent recognition model and / or indicator information recognition model outputs is lower than a preset confidence level threshold, the system triggers the intervention of the large language model. At this time, the system records the current input data and its corresponding processing intent and / or indicator information output by the large language model, forming a record. Multiple such records can constitute a feedback dataset.

[0251] Furthermore, the system utilizes this feedback dataset to dynamically optimize the intent recognition model and / or indicator information recognition model using Bandit algorithms (such as contextual Bandit or multi-armed Bandit). Specifically, the Bandit algorithm can evaluate the benefits of the current model strategy based on the difference between the model output and the large language model output in each record, and adjust the model's parameters or structure accordingly (e.g., updating neural network weights, adjusting feature extraction layers, or modifying the classification head).

[0252] Specifically, in this embodiment, the Bandit algorithm can dynamically adjust model parameters or structure using a strategy based on upper confidence bounds (UCB) to achieve a balance between exploration and exploitation during model optimization. The core of this strategy lies in calculating a comprehensive score for each possible model adjustment action (e.g., different parameter update directions or structure adjustment options), which is composed of a value estimate of historical performance and an exploration reward.

[0253] Specifically, for each candidate action (a), its score (UCB(a)) can be calculated using the following formula:

[0254]

[0255] in, This represents the historical average reward, which is an estimated improvement in recognition performance obtained after adjusting the model using this action; The number of times the selection has been made is indicated; t represents the total number of iterations or decisions made in the model optimization process so far. This represents an exploration reward, the value of which increases as the number of times action (a) is selected decreases, thereby encouraging exploration of adjustment options that have not been tried sufficiently.

[0256] In each round of optimization decision-making, the system selects the action with the highest UCB(a) score to adjust the parameters or structure of the intent recognition model or indicator information recognition model. This mechanism can automatically balance the use of known effective adjustment strategies with the exploration of new strategies that may have greater potential: for actions with fewer attempts (i.e., smaller N(a)), their exploration reward will be increased accordingly, thereby increasing the chance of being selected and avoiding getting trapped in local optima; as the number of attempts increases, the algorithm will gradually converge to actions with better long-term performance.

[0257] From a theoretical perspective, the Bandit algorithm based on UCB can, with a high probability, control the accumulated regret (i.e. the total performance loss caused by not always choosing the optimal action) within a logarithmically increasing upper bound after a finite number of attempts, thereby ensuring that the optimization process can eventually converge stably to the actual optimal model adjustment strategy.

[0258] For example, the process of utilization and exploration may include:

[0259] "Exploration: When N(a) is small: the second term is large, encouraging experimentation."

[0260] The new option automatically receives a high score.

[0261] Exploitation: When N(a) is large: the second term is small, so we mainly look at Q(a).

[0262] According to the formula's effect: good options will continue to be selected.

[0263] # First time: No locations have been explored

[0264] Strategy A: 0 + ∞ = ∞

[0265] Strategy B: 0 + ∞ = ∞

[0266] Strategy C: 0 + ∞ = ∞

[0267] # Randomly select one (e.g., location A)

[0268] # Second attempt: Strategy A was explored once, yielding 50 gold coins.

[0269] Strategy A: 50+ ≈ 50 + 1.18 = 51.18

[0270] Strategy B: 0 + ∞ = ∞

[0271] Strategy C: 0 + ∞ = ∞

[0272] # Choose strategy B or C (e.g., strategy B)

[0273] # 10th time: There are some exploration records in various locations.

[0274] Strategy A: Explore 5 times, average 55 → 55 + smaller bonus points

[0275] Strategy B: Explore twice, average 75 → 75 + moderate bonus

[0276] Strategy C: Explore once, average score 40 → 40 + larger bonus

[0277] # Possible choices: Strategy B (high known value) or Strategy C (great exploration potential)".

[0278] In this implementation, the Bandit algorithm employs a comprehensive reward mechanism to quantify the overall benefit of each action when evaluating different model adjustment actions. This reward mechanism, using metric generation and preliminary calculation rules as an application example, consists of a weighted combination of sub-rewards from multiple dimensions. The specific calculation formula is as follows:

[0279]

[0280] in, The validation reward reflects the degree of consistency between the model's adjusted output and the preset rules or benchmark.

[0281] This represents the performance reward, used to evaluate the stability and success rate of the adjusted model in a real-world operating environment.

[0282] This indicates feedback rewards, which are quantified based on direct evaluations of the model's output results by users or the system, or feedback from subsequent use.

[0283] This represents an efficiency reward, used to measure the improvement in processing speed or reduction in resource consumption resulting from model adjustments.

[0284] W1, W2, W, and W4 are the weighting coefficients for each sub-reward, which can be configured and adjusted according to actual business needs.

[0285] In each round of model optimization, the system calculates the corresponding total reward value based on the performance of the selected adjustment action in the above dimensions collected in actual operation, and uses it to update the historical average reward Q(a) of the action.

[0286] Through this multi-dimensional weighted reward mechanism, the Bandit algorithm can more comprehensively and evenly evaluate the combined effects of different model adjustment strategies, thereby making more reasonable decisions between exploration and utilization, and promoting the continuous optimization of model recognition performance.

[0287] To further optimize the exploration strategy, this implementation may use either the UCB algorithm or the Thompson Sampling algorithm.

[0288] For example, when using the UCB algorithm, the algorithm calculates a confidence upper bound for each candidate action (or "arm"). For an action with fewer attempts, the uncertainty of its reward estimate is high, and the UCB algorithm tends to select it because of its higher confidence upper bound. This provides an opportunity to explore actions that have been under-tried but may have high potential.

[0289] If the Thompson sampling method for online learning is chosen for unknown intentions or scenarios, then a pair of Beta distribution parameters is maintained for each instance (or action) to be explored. Its probability density function is:

[0290]

[0291] in, Represents the probability of success;

[0292] This is a shape parameter, typically associated with the number of observed successes;

[0293] This is a shape parameter, typically associated with the number of observed failures;

[0294] Let be the Beta function, which serves as a normalization constant to ensure that the integral of the probability density function over its domain is 1.

[0295] In each round of decision-making, the Thompson sampling algorithm randomly samples a success probability value from the Beta distribution corresponding to each action, and then selects the action with the highest sample value to execute.

[0296] In this way, the algorithm balances exploration and utilization through probability matching, making it particularly suitable for handling online learning scenarios where reward feedback is uncertain.

[0297] In the above optimization and update process, an optional implementation of optimizing the prompt word template may include: for any task type to be generated, obtaining at least one candidate prompt word template corresponding to the task type; generating a set of prompt word assembly measurements based on the candidate prompt word templates corresponding to each task type, with each set of prompt word assembly strategies corresponding to a parameter arm; maintaining a corresponding weight vector for each parameter arm based on historical interaction records; the historical interaction records include: the prompt word assembly strategy adopted, the corresponding processing intent, the indicator data generated based on the processing intent, and / or the comprehensive reward value determined by the analysis results; using the Bandit algorithm, calculating the expected reward value of each prompt word assembly strategy based on the current processing intent and the weight vector of each parameter arm; selecting a target strategy from multiple prompt word assembly strategies based on the expected reward value; and dynamically updating the weight vector of the corresponding parameter arm based on the comprehensive reward value and the actual effect of the selected target strategy to optimize each prompt word template.

[0298] Specifically, for any task type to be generated (e.g., generating intent recognition, indicator information recognition, or code snippet generation), the system obtains at least one candidate prompt word template corresponding to that task type. These templates may include different strategy orientations, such as providing multiple code examples, generating Lua scripts by combining formulas, or guiding a large language model for step-by-step inference. Based on these candidate templates, the system generates a set of prompt word assembly strategies, each strategy corresponding to a parameter arm (Arm), which serves as an option in the Bandit algorithm.

[0299] Based on this, the system also maintains a weight vector for each parameter arm based on historical interaction records. In this embodiment, historical interaction records mainly include: the prompt word assembly strategy adopted, the processing intent parsed from the corresponding user query (such as aggregation analysis, anomaly location, etc.), the indicator data or analysis results generated after the execution based on the processing intent, and the comprehensive reward value calculated based on these results. This reward value can be obtained through multi-dimensional evaluation, such as a reward of 0.5 for passing code verification, a reward of 1.0 for successful execution, and a reward of 2.0 for user voluntary likes, etc., which are finally weighted into a single reward signal.

[0300] Each time a prompt needs to be generated, the system can use a Bandit algorithm (such as Linear Thompson Sampler or a variant thereof) to select a strategy.

[0301] Specifically, the system transforms the processing intent corresponding to the current user query into a feature vector (i.e., a context vector). This vector can include dimensions such as intent type, entities, number of data sources, and descriptive text features. Based on the current context and the weight vectors of each parameter arm, the expected reward value of each prompt word assembly strategy is calculated, i.e., through a linear model. Make predictions.

[0302] in, For context feature vectors, This is the weight vector for the corresponding arm.

[0303] Furthermore, based on the expected reward value of each strategy and combined with a certain exploration mechanism, the system selects the target strategy from multiple prompt word assembly strategies and applies it to each prompt word template.

[0304] Based on this, the error between the comprehensive reward value and the predicted reward value of each prompt word template in the target strategy obtained after actual execution is obtained, and the weight vector of the selected parameter arm is dynamically updated.

[0305] For example, the update process can employ gradient descent-like methods.

[0306] In the above implementation, by continuously accumulating interaction data and iteratively updating the weight vector, the system can gradually learn the inherent relationship between different contextual features and prompt strategies, thereby achieving continuous optimization and accurate adaptation of prompt word templates.

[0307] Figure 6 is a schematic diagram of the structure of the data processing device provided in this application. As shown in Figure 6, the data processing device 60 provided in this embodiment includes:

[0308] The processing intent determination module 601 is used to receive natural language content input by the user and determine the user's processing intent based on the natural language content.

[0309] The indicator information recognition module 602 is used to determine the indicator information corresponding to the indicator to be generated based on the natural language content if the processing intent is the indicator generation intent.

[0310] The indicator data generation module 603 is used to obtain the raw data stream associated with the indicator based on the indicator information and convert the raw data stream into indicator data. The indicator data is used to return indicator data to the user when the user queries indicator data, or to determine the indicator data corresponding to the natural language content and perform indicator analysis processing when the user's processing intention is indicator analysis.

[0311] In one alternative implementation, when determining the user's processing intent based on the natural language content, the processing intent determination module 601 is specifically used for:

[0312] A pre-trained intent recognition model is used to identify natural language content, and the first recognized intent and the corresponding intent confidence are obtained.

[0313] If the confidence level of the intent is not lower than the confidence threshold, then the first identified intent is determined to be the user's processing intent;

[0314] If the confidence level of the intent is lower than the confidence level threshold, a pre-constructed first prompt word template is obtained. The first prompt word template contains preset slots for receiving natural language content to guide the generation of processing intent.

[0315] Natural language content is filled into the preset slots of the first prompt word template to generate intent recognition prompt words;

[0316] The large language model is invoked to identify the prompt words based on intent, thereby obtaining the second identified intent, which is then determined as the user's processing intent.

[0317] In one optional implementation, when determining the indicator information of the indicator to be generated based on the natural language content, the indicator information recognition module 602 is specifically used for:

[0318] A pre-trained indicator information recognition model is used to identify indicator information in natural language content, and the first indicator information and its corresponding information confidence score are obtained.

[0319] If the confidence level of the information is not lower than the confidence threshold, then the first indicator information is determined as the corresponding indicator information;

[0320] If the information confidence level is lower than the confidence level threshold, a pre-constructed second prompt word template is obtained. The second prompt word template contains preset slots for receiving natural language content to guide the generation of indicator information.

[0321] The natural language content is filled into the preset slots of the second prompt word template to generate indicator information recognition prompt words;

[0322] The large language model is invoked to identify prompt words based on indicator information, obtain second indicator information, and determine the second indicator information as the corresponding indicator information;

[0323] The indicator information includes the indicator entity, indicator calculation rules, and indicator attributes.

[0324] In one optional implementation, when obtaining the raw data stream associated with the indicator based on the indicator information and converting the raw data stream into indicator data, the indicator data generation module 603 is specifically used for:

[0325] Based on the indicator information, generate the corresponding indicator rules;

[0326] Based on the indicator information, obtain the raw data stream associated with the indicator;

[0327] The indicator rules are executed to calculate the raw data stream and generate indicator data.

[0328] In one optional implementation, when generating indicator rules corresponding to an indicator based on indicator information, the indicator data generation module 603 is specifically used for:

[0329] Based on the indicator entities and indicator calculation rules contained in the indicator information, code snippets that conform to the predefined indicator template are generated to obtain the indicator rules.

[0330] In one optional implementation, when generating a code snippet conforming to a predefined indicator template based on the indicator entities and indicator calculation rules contained in the indicator information, the indicator data generation module 603 is specifically used for:

[0331] Obtain a pre-built third prompt word template, which contains preset slots for receiving indicator entities and indicator calculation rules to guide the generation of code snippets corresponding to the indicators;

[0332] Fill the indicator entity and indicator calculation rules into the preset slots of the third prompt word template, and generate code to generate prompt words;

[0333] The large language model is invoked to generate prompt words based on the code, and corresponding code snippets are generated.

[0334] In one optional implementation, when obtaining the raw data stream associated with the indicator based on the indicator information, the indicator data generation module 603 is specifically used for:

[0335] Invoke the first execution engine to obtain the raw data stream associated with the indicator entity;

[0336] When executing indicator rules, calculating on the raw data stream, and generating indicator data, the indicator data generation module 603 is specifically used for:

[0337] The raw data stream is distributed to the second execution engine, which then performs calculations on the raw data stream based on the metric rules within the isolated environment provided by the first execution engine, generating metric data for the metrics.

[0338] In one alternative implementation, after generating the indicator data, the indicator data generation module 603 is further configured to: call the first execution engine, retrieve the indicator data, and store the indicator data, the indicator and its corresponding indicator attributes into a pre-built time series database.

[0339] In one optional embodiment, the device further includes: an index analysis module; the index analysis module is used for:

[0340] If the processing intent is to analyze indicators, then determine the indicator data corresponding to the natural language content;

[0341] Analyze the indicator data to obtain the indicator analysis results;

[0342] Return the metric analysis results to the user.

[0343] In one optional implementation, when determining the indicator data corresponding to the natural language content, the indicator analysis module is specifically used for:

[0344] Determine the indicator information corresponding to the natural language content, and read the corresponding indicator data from the pre-built time series database based on the indicator attributes in the indicator information;

[0345] If the indicator data is not successfully read, the original data stream associated with the indicator corresponding to the indicator information is obtained based on the indicator information, and the original data stream is converted into indicator data.

[0346] In one optional implementation, when reading corresponding indicator data from a pre-built time-series database based on indicator attributes in the indicator information, the indicator analysis module is specifically used for:

[0347] The first execution engine is invoked to read the corresponding indicator data from the pre-built time series database based on the indicator attributes in the indicator information.

[0348] If the indicator data is not successfully read, the first execution engine will continue to be called to obtain the raw data stream associated with the indicator corresponding to the indicator information.

[0349] The second execution engine is invoked to convert the raw data stream into metric data.

[0350] In one optional implementation, when analyzing indicator data and obtaining indicator analysis results, the indicator analysis module is specifically used to: if the analysis type of the indicator analysis intent is simple analysis, obtain a fourth prompt word template, the fourth prompt word template containing a preset slot for receiving indicator data and indicator analysis intent, so as to guide the generation of indicator analysis results corresponding to the indicator.

[0351] Fill the indicator data and indicator analysis intent into the preset slots of the fourth prompt word template to generate indicator analysis prompt words;

[0352] The large language model is invoked, and corresponding indicator analysis results are generated based on the indicator analysis prompts.

[0353] In one optional implementation, when analyzing indicator data to obtain indicator analysis results, the indicator analysis module is specifically used for:

[0354] If the analysis type intended by the indicator analysis is complex analysis, then obtain the pre-trained indicator analysis model;

[0355] Based on the indicator analysis model and the indicator analysis intent, indicator analysis is performed on the indicator data to obtain preliminary analysis results and related analysis data.

[0356] Obtain the fifth prompt word template, which contains preset slots for receiving preliminary analysis results, relevant analysis data, and indicator analysis intent, to guide the generation of indicator analysis results corresponding to the indicators;

[0357] Fill the preset slots of the fifth prompt word template with the preliminary analysis results, relevant analysis data and indicator analysis intentions to generate data integration prompt words;

[0358] The system calls upon a large language model, integrates prompts based on data, and generates corresponding indicator analysis results.

[0359] In one optional embodiment, the device further includes: an optimization module; the optimization module is configured to:

[0360] Based on indicator data and / or indicator analysis results, at least one of the pre-trained intent recognition model, pre-trained indicator information recognition model, first prompt word template, second prompt word template, third prompt word template, fourth prompt word template, and fifth prompt word template is optimized and updated.

[0361] In one optional implementation, when optimizing and updating at least one of the pre-trained intent recognition model and the pre-trained indicator information recognition model based on indicator data and / or indicator analysis results, the optimization module is specifically used for:

[0362] Obtain at least one record data, wherein each record data includes: processing intent and / or indicator information output by the large language model when the confidence level of the intent recognition model and / or indicator information recognition model output is lower than the confidence level threshold;

[0363] Using at least one record as a feedback signal, the parameters or structure of the intent recognition model and / or indicator information recognition model are dynamically adjusted through the Bandit algorithm to optimize their recognition performance.

[0364] In one optional implementation, when optimizing and updating at least one of the first prompt word template, the second prompt word template, the third prompt word template, the fourth prompt word template, and the fifth prompt word template based on the generated indicator data and / or analysis results, the optimization module is specifically used for:

[0365] For any task type to be generated, obtain at least one candidate prompt word template corresponding to the task type;

[0366] Based on the candidate prompt word templates corresponding to each task type, a set of prompt word assembly measurements is generated, and each set of prompt word assembly strategies corresponds to a parameter arm.

[0367] Based on historical interaction records, maintain a corresponding weight vector for each parameter arm; historical interaction records include: the prompt word assembly strategy adopted, the corresponding processing intent, the indicator data generated based on the processing intent, and / or the comprehensive reward value determined by the analysis results;

[0368] The Bandit algorithm is used to calculate the expected reward value of each cue word assembly strategy based on the current processing intent and the weight vector of each parameter arm.

[0369] Based on the expected reward value, select the target strategy from multiple prompt word assembly strategies;

[0370] Based on the overall reward value and the actual effect of the selected target strategy, the weight vector of the corresponding parameter arm is dynamically updated to optimize each prompt word template.

[0371] The data processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0372] Figure 7 is a block diagram of an electronic device provided in this application. This device can be a client terminal device or a cloud server, etc. Referring to Figure 7, device 700 may include one or more of the following components: processing component 702, memory 704, power supply component 706, multimedia component 708, audio component 710, input / output interface 712, sensor component 714, and communication component 716.

[0373] Processing component 702 typically controls the overall operation of device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0374] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0375] Power supply component 706 provides power to various components of device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 700.

[0376] Multimedia component 708 includes a screen that provides an output interface between device 700 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0377] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

[0378] Input / output interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.

[0379] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of device 700. For example, sensor assembly 714 may detect the on / off state of device 700, the relative positioning of components such as the display and keypad of device 700, changes in the position of device 700 or a component of device 700, the presence or absence of user contact with device 700, the orientation or acceleration / deceleration of device 700, and temperature changes of device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include optical sensors, such as complementary metal-oxide-semiconductor (CMOS) sensors or charge-coupled device (CCD) sensors, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0380] Communication component 716 is configured to facilitate wired or wireless communication between device 700 and other devices. Device 700 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0381] In an exemplary embodiment, device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processors (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0382] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of the device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0383] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a server's processor, enable the server to perform the aforementioned large model data processing method.

[0384] This application also provides a chip for executing instructions, which is used to execute the technical solution of the large model data processing method in the above embodiments.

[0385] This application also provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer performs the technical solution of the large model data processing method described in the above embodiments.

[0386] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the large model data processing method described in the above embodiments.

[0387] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0388] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

[0389] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0390] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A data processing method, characterized in that, include: Receive natural language input from the user and determine the user's processing intention based on the natural language input; If the processing intent is an indicator generation intent, then the indicator information corresponding to the indicator to be generated is determined based on the natural language content; based on the indicator information, the raw data stream associated with the indicator is obtained, and the raw data stream is converted into indicator data; wherein, the indicator data is used to return the indicator data to the user when the user queries the indicator data, or, when the user's processing intent is an indicator analysis intent, the indicator data corresponding to the natural language content is determined, and indicator analysis processing is performed.

2. The method according to claim 1, characterized in that, Determining the user's processing intent based on the natural language content includes: using a pre-trained intent recognition model to recognize the natural language content, obtaining a first recognized intent and a corresponding intent confidence level; if the intent confidence level is not lower than a confidence threshold, then determining the first recognized intent as the user's processing intent; if the intent confidence level is lower than the confidence threshold, then obtaining a pre-constructed first prompt word template, the first prompt word template containing preset slots for receiving the natural language content to guide the generation of a processing intent; filling the preset slots of the first prompt word template with the natural language content to generate intent recognition prompt words; calling a large language model, obtaining a second recognized intent based on the intent recognition prompt words, and determining the second recognized intent as the user's processing intent.

3. The method according to claim 1, characterized in that, Determining the indicator information for the indicator to be generated based on the natural language content includes: using a pre-trained indicator information recognition model to recognize the indicator information in the natural language content, obtaining first indicator information and its corresponding information confidence level; if the information confidence level is not lower than a confidence level threshold, then the first indicator information is determined as the corresponding indicator information; if the information confidence level is lower than the confidence level threshold, then a pre-constructed second prompt word template is obtained, the second prompt word template containing preset slots for receiving the natural language content to guide the generation of indicator information; the natural language content is filled into the preset slots of the second prompt word template to generate indicator information recognition prompt words; a large language model is invoked to recognize the prompt words based on the indicator information, obtaining second indicator information, and the second indicator information is determined as the corresponding indicator information; wherein, the indicator information includes indicator entities, indicator operation rules, and indicator attributes.

4. The method according to claim 1, characterized in that, Based on the indicator information, the process of obtaining the raw data stream associated with the indicator and converting the raw data stream into indicator data includes: generating indicator rules corresponding to the indicator based on the indicator information; obtaining the raw data stream associated with the indicator based on the indicator information; and executing the indicator rules to calculate the raw data stream and generate indicator data for the indicator.

5. The method according to claim 4, characterized in that, Based on the indicator information, the indicator rules corresponding to the indicator are generated, including: generating code snippets that conform to a predefined indicator template based on the indicator entities and indicator operation rules contained in the indicator information, thereby obtaining the indicator rules.

6. The method according to claim 5, characterized in that, Based on the indicator entities and indicator operation rules contained in the indicator information, a code snippet conforming to a predefined indicator template is generated, including: obtaining a pre-constructed third prompt word template, the third prompt word template containing preset slots for receiving the indicator entities and the indicator operation rules to guide the generation of code snippets corresponding to the indicator; filling the indicator entities and the indicator operation rules into the preset slots of the third prompt word template to generate code generation prompt words; calling a large language model to generate prompt words based on the code and generate corresponding code snippets.

7. The method according to claim 4, characterized in that, Based on the indicator information, obtaining the raw data stream associated with the indicator includes: invoking a first execution engine to obtain the raw data stream associated with the indicator; correspondingly, executing the indicator rules to calculate the raw data stream and generate indicator data for the indicator includes: distributing the raw data stream to a second execution engine so that the second execution engine, in an isolated environment provided by the first execution engine, calculates the raw data stream based on the indicator rules to generate indicator data for the indicator.

8. The method according to claim 7, characterized in that, After generating the indicator data for the indicator, the method further includes: calling the first execution engine to retrieve the indicator data, and storing the indicator data, the indicator and its corresponding indicator attributes into a pre-built time series database.

9. The method according to claim 1, characterized in that, The method further includes: if the processing intent is an indicator analysis intent, then determining the indicator data corresponding to the natural language content; analyzing the indicator data to obtain the indicator analysis result; and returning the indicator analysis result to the user.

10. The method according to claim 9, characterized in that, Determining the indicator data corresponding to the natural language content includes: determining the indicator information corresponding to the natural language content; reading the corresponding indicator data from a pre-built time-series database based on the indicator attributes in the indicator information; if the indicator data is not successfully read, obtaining the original data stream associated with the indicator corresponding to the indicator information based on the indicator information, and converting the original data stream into indicator data.

11. The method according to claim 10, characterized in that, Based on the indicator attributes in the indicator information, the corresponding indicator data is read from the pre-built time series database, including: calling the first execution engine to read the corresponding indicator data from the pre-built time series database based on the indicator attributes in the indicator information; if the indicator data is not successfully read, the first execution engine is called again to obtain the original data stream associated with the indicator corresponding to the indicator information based on the indicator information; and the second execution engine is called to convert the original data stream into indicator data.

12. The method according to claim 10, characterized in that, The analysis of the indicator data to obtain indicator analysis results includes: if the analysis type of the indicator analysis intent is simple analysis, then obtaining a fourth prompt word template, the fourth prompt word template containing preset slots for receiving the indicator data and the indicator analysis intent to guide the generation of indicator analysis results corresponding to the indicator; filling the indicator data and the indicator analysis intent into the preset slots of the fourth prompt word template to generate indicator analysis prompt words; and calling a large language model to generate corresponding indicator analysis results based on the indicator analysis prompt words.

13. The method according to claim 10, characterized in that, The analysis of the indicator data to obtain indicator analysis results includes: if the analysis type of the indicator analysis intent is complex analysis, then obtaining a pre-trained indicator analysis model; based on the indicator analysis model and the indicator analysis intent, performing indicator analysis on the indicator data to obtain preliminary analysis results and related analysis data; obtaining a fifth prompt word template, the fifth prompt word template containing preset slots for receiving the preliminary analysis results, the related analysis data, and the indicator analysis intent to guide the generation of indicator analysis results corresponding to the indicator; filling the preliminary analysis results, the related analysis data, and the indicator analysis intent into the preset slots of the fifth prompt word template to generate data integration prompt words; and calling a large language model to generate corresponding indicator analysis results based on the data integration prompt words.

14. The method according to any one of claims 1-13, characterized in that, The method further includes: optimizing and updating at least one of the pre-trained intent recognition model, the pre-trained indicator information recognition model, the first prompt word template, the second prompt word template, the third prompt word template, the fourth prompt word template, and the fifth prompt word template based on indicator data and / or indicator analysis results.

15. The method according to claim 14, characterized in that, Based on indicator data and / or indicator analysis results, at least one of the pre-trained intent recognition model and the pre-trained indicator information recognition model is optimized and updated, including: acquiring at least one record data, wherein each record data includes: the processing intent and / or indicator information output by the large language model when the confidence level of the output of the intent recognition model and / or the indicator information recognition model is lower than the confidence level threshold; using the at least one record data as a feedback signal, the parameters or structure of the intent recognition model and / or the indicator information recognition model are dynamically adjusted through the Bandit algorithm to optimize their recognition performance.

16. The method according to claim 14, characterized in that, Based on the generated indicator data and / or analysis results, at least one of the first, second, third, fourth, and fifth prompt word templates is optimized and updated, including: for any task type to be generated, obtaining at least one candidate prompt word template corresponding to the task type; generating a set of prompt word assembly measurements according to the candidate prompt word templates corresponding to each task type, with each set of prompt word assembly strategies corresponding to a parameter arm; maintaining a corresponding weight vector for each parameter arm based on historical interaction records; the historical interaction records include: the prompt word assembly strategy adopted, the corresponding processing intent, the indicator data generated based on the processing intent, and the comprehensive reward value determined by the analysis results; using the Bandit algorithm, calculating the expected reward value of each prompt word assembly strategy according to the current processing intent and the weight vector of each parameter arm; selecting a target strategy from multiple prompt word assembly strategies based on the expected reward value; and dynamically updating the weight vector of the corresponding parameter arm according to the comprehensive reward value and the actual effect of the selected target strategy to optimize each prompt word template.

17. A data processing apparatus, characterized in that, include: The processing intent determination module is used to receive natural language content input by the user and determine the user's processing intent based on the natural language content; The indicator information identification module is used to determine the indicator information corresponding to the indicator to be generated based on the natural language content if the processing intent is an indicator generation intent; the indicator data generation module is used to obtain the raw data stream associated with the indicator based on the indicator information and convert the raw data stream into indicator data; wherein, the indicator data is used to return the indicator data to the user when the user queries the indicator data, or, when the user's processing intent is an indicator analysis intent, to determine the indicator data corresponding to the natural language content and perform indicator analysis processing.

18. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-16.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-16.

20. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-16.