Business data chart generation method and device, electronic equipment and storage medium
By analyzing data processing requirements using pre-trained large language models, generating FlinkSQL code and deploying it to a real-time data processing platform, the problem of low efficiency in real-time business data chart display in the existing technology is solved, and fast and accurate data visualization is achieved.
Patent Information
- Application Number
- CN202411585201.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the visualization efficiency of real-time business data display is low, and it has failed to effectively solve the efficiency problem of real-time business data generation.
By receiving data processing requirements, using pre-trained large language model (LLM) to parse requirements, generate FlinkSQL data processing code and task configuration files, automatically compile and deploy to the real-time data processing platform, and generate target display charts of target business data.
It significantly improves the efficiency of real-time business data graph generation, realizes fast and accurate visual display of static and dynamic data, and reduces the development and deployment cycle.
Smart Images

Figure CN119516030A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for generating a chart of business data, an electronic device, and a storage medium. Background Art
[0002] In recent years, with the rapid growth of business data, real-time analysis of business data as part of BI (Business Intelligence) and smart management has played an increasingly important role. Traditional real-time data analysis requires developers to develop corresponding processing and display components based on the characteristics of data charts and data formats. This may take several days or even longer from the clarification of requirements to the development and testing of technical personnel to the actual deployment of the business, which is inefficient.
[0003] In order to solve the development and deployment efficiency problem of real-time business data conversion, it is proposed to configure and deploy FlinkSQL real-time analysis tasks based on a graphical interface. This method also effectively lowers the development threshold of FlinkSQL. In order to solve the on-demand display of database data charts, a real-time chart generation method based on LLM is proposed. This method uses interactive questions and answers between data analysts and LLM (Large Language Model) and pre-definition of database table structures to achieve real-time generation of SQL (Structure Query Language) to query and convert static data in the database, and generate corresponding data charts, effectively shielding the writing of data query SQL and display component code, and improving the efficiency of chart generation. However, neither of them takes into account the generation of charts for real-time business data, resulting in the low efficiency of visual display of real-time business data charts.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for generating a business data chart, an electronic device, and a storage medium, so as to at least solve the technical problem of low efficiency in visually displaying real-time business data in a business data chart display method in the related art.
[0006] According to one aspect of an embodiment of the present invention, a method for generating charts of business data is provided, comprising: receiving a data processing requirement, wherein the data processing requirement is a requirement for generating charts of target business data input by a target user through a real-time interactive platform, and the target business data comprises: static data and / or dynamic data; inputting the data processing requirement into a target model, and outputting a data processing code and a task configuration file, wherein the target model is a large language model pre-trained for a chart generation task, and is used to parse the data processing requirement to obtain a parsing result, and generate a data processing code and a task configuration file based on data source information and output target information of the target business data in the parsing result; compiling the data processing code to obtain a data processing task, and deploying the task configuration file and the data processing task to a real-time data processing platform; running the data processing task based on the task configuration file in the real-time data processing platform to generate a target display chart of the target business data.
[0007] Furthermore, the step of receiving data processing requirements includes: determining an interaction method proposed by the target user, wherein the interaction method includes any one of the following: text interaction and voice interaction; when it is determined that the interaction method is text interaction, receiving a first requirement text through a real-time interaction platform; when it is determined that the interaction method is voice interaction, receiving the requirement voice through the real-time interaction platform, and converting the requirement voice into text form to obtain a second requirement text; extracting key requirement information in the first requirement text and / or the second requirement text based on a key information list, wherein the key information list contains R key information items, and R is a positive integer; when less than R items of key requirement information are extracted, generating an information supplement prompt based on the key information items that have not been extracted, and sending the information supplement prompt to the real-time interaction platform; when R items of key requirement information are extracted, generating the data processing requirements based on the R items of key requirement information.
[0008] Furthermore, the step of inputting the data processing requirements into the target model and outputting the data processing code includes: obtaining the parsing result of the data processing requirements through the target model, and generating a first code based on the data source information in the parsing result, wherein the first code is used to extract the original data corresponding to the target business data from the specified data source; determining the chart form and data display format of the target display chart expected by the target user based on the target output information in the parsing result; determining a data format conversion strategy based on the data display format, and generating a second code based on the data format conversion strategy, wherein the second code is used to convert the format of the original data to obtain the display data corresponding to the target business data; determining a chart generation strategy based on the chart form, and generating a third code based on the chart generation strategy, wherein the third code is used to construct an initial display chart according to the chart form; integrating the first code, the second code and the third code to obtain the data processing code.
[0009] Furthermore, after integrating the first code, the second code and the third code to obtain the data processing code, the method also includes: generating a fourth code, wherein the fourth code is used to write the display data into the initial display chart to obtain the target display chart; generating a fifth code, wherein the fifth code is used to perform graphical processing on the target display chart to obtain a target graphic component to be displayed; and integrating the fourth code and the fifth code into the data processing code.
[0010] Furthermore, after deploying the task configuration file and the data processing task to the real-time data processing platform, the method also includes: creating a task record table, wherein the task record table includes the following key fields: task identifier, user ID, task date, task status identifier, and task sub-stage identifier; writing the data processing task into the task record table and filling in all the key fields; in the process of running the data processing task on the real-time data processing platform, obtaining the task running progress according to a preset period, and updating the task status identifier and the task sub-stage identifier according to the task running progress.
[0011] Furthermore, after generating a target display chart of the target business data, the method also includes: initiating a preview display request for the target display chart to the real-time interactive platform, and receiving the preview opinion of the target user returned by the real-time interactive platform; when the preview opinion indicates to keep the chart, archiving the target display chart; when the preview opinion indicates to abandon the chart, modifying the task status identifier in the task record table, and clearing all system resources corresponding to the target display chart.
[0012] Furthermore, the step of archiving the target display chart includes: creating a display chart archiving table, wherein the display chart archiving table includes the following archiving fields: archiving record identifier, user ID, chart name, archiving date, archiving content and archiving details description; obtaining the data processing code corresponding to the target display chart, and the operation log of the data processing task; storing the target display chart in the display chart archiving table, and filling in all the archiving fields in the display chart archiving table based on the data processing code and the operation log.
[0013] According to another aspect of an embodiment of the present invention, a business data chart generation device is also provided, comprising: a receiving unit, for receiving a data processing requirement, wherein the data processing requirement is a chart generation requirement for target business data input by a target user through a real-time interactive platform, and the target business data comprises: static data and / or dynamic data; an input unit, for inputting the data processing requirement into a target model, and outputting a data processing code and a task configuration file, wherein the target model is a large language model pre-trained for a chart generation task, for parsing the data processing requirement to obtain a parsing result, and generating a data processing code and a task configuration file based on the data source information and output target information of the target business data in the parsing result; a deployment unit, for compiling the data processing code to obtain a data processing task, and deploying the task configuration file and the data processing task to a real-time data processing platform; a generation unit, for running the data processing task based on the task configuration file in the real-time data processing platform, and generating a target display chart of the target business data.
[0014] Furthermore, the receiving unit includes: a first determination module, used to determine the interaction mode proposed by the target user, wherein the interaction mode includes any one of the following: text interaction and voice interaction; a first receiving module, used to receive a first requirement text through a real-time interaction platform when it is determined that the interaction mode is text interaction; a second receiving module, used to receive the requirement voice through the real-time interaction platform when it is determined that the interaction mode is voice interaction, and convert the requirement voice into text form to obtain a second requirement text; an extraction module, used to extract key requirement information in the first requirement text and / or the second requirement text based on a key information list, wherein the key information list contains R key information items, and R is a positive integer; a first generation module, used to generate an information supplement prompt based on the key information items that have not been extracted when less than R items of key requirement information are extracted, and send the information supplement prompt to the real-time interaction platform; a second generation module, used to generate the data processing requirement based on the R items of key requirement information when R items of key requirement information are extracted.
[0015] Furthermore, the input unit includes: a third generation module, which is used to obtain the analysis result of the data processing requirement through the target model, and generate a first code based on the data source information in the analysis result, wherein the first code is used to extract the original data corresponding to the target business data from the specified data source; a second determination module, which is used to determine the chart form and data display format of the target display chart expected by the target user based on the target output information in the analysis result; a fourth generation module, which is used to determine the data format conversion strategy based on the data display format, and generate a second code based on the data format conversion strategy, wherein the second code is used to format the original data to obtain the display data corresponding to the target business data; a fifth generation module, which is used to determine the chart generation strategy based on the chart form, and generate a third code based on the chart generation strategy, wherein the third code is used to construct an initial display chart according to the chart form; a first integration module, which is used to integrate the first code, the second code and the third code to obtain the data processing code.
[0016] Furthermore, the input unit also includes: a sixth generation module, used to generate a fourth code, wherein the fourth code is used to write the display data into the initial display chart to obtain the target display chart; a seventh generation module, used to generate a fifth code, wherein the fifth code is used to perform graphical processing on the target display chart to obtain a target graphic component to be displayed; and a second integration module, used to integrate the fourth code and the fifth code into the data processing code.
[0017] Furthermore, the business data chart generating device also includes: a creation module, used to create a task record table, wherein the task record table includes the following key fields: task identifier, user ID, task date, task status identifier and task sub-stage identifier; a filling module, used to write the data processing task into the task record table and fill in all the key fields; an update module, used to obtain the task running progress according to a preset period during the process of running the data processing task on the real-time data processing platform, and update the task status identifier and the task sub-stage identifier according to the task running progress.
[0018] Furthermore, the business data chart generation device also includes: a third receiving module, used to initiate a preview display request of the target display chart to the real-time interactive platform, and receive the preview opinion of the target user returned by the real-time interactive platform; an archiving module, used to archive the target display chart when the preview opinion indicates to keep the chart; and a cleaning module, used to modify the task status identifier in the task record table and clean up all system resources corresponding to the target display chart when the preview opinion indicates to abandon the chart.
[0019] Furthermore, the archiving module includes: a creation submodule for creating a display chart archiving table, wherein the display chart archiving table includes the following archiving fields: an archiving record identifier, a user ID, a chart name, an archiving date, an archiving content, and an archiving details description; an acquisition submodule for acquiring the data processing code corresponding to the target display chart, and an operation log of the data processing task; a filling submodule for storing the target display chart in the display chart archiving table, and filling in all the archiving fields in the display chart archiving table based on the data processing code and the operation log.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned business data chart generation methods.
[0021] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned methods for generating charts of business data.
[0022] In the present invention, a method for generating charts of business data is proposed, which first receives data processing requirements, wherein the data processing requirements are requirements for generating charts of target business data input by target users through a real-time interactive platform, and the target business data includes: static data and / or dynamic data, and then inputs the data processing requirements into a target model, outputs data processing code and a task configuration file, wherein the target model is a large language model pre-trained for a chart generation task, and is used to parse the data processing requirements to obtain a parsing result, and generate a data processing code and a task configuration file based on data source information and output target information of the target business data in the parsing result, and then compiles the data processing code to obtain a data processing task, and deploys the task configuration file and the data processing task to a real-time data processing platform, and finally runs the data processing task based on the task configuration file in the real-time data processing platform to generate a target display chart of the target business data.
[0023] In the present invention, the user's demand for chart generation of target business data is received through a real-time interactive platform, which can be an analysis of static data or real-time processing of dynamic data, ensuring the wide applicability and real-time performance of the method. The demand is then input into a pre-trained LLM. The LLM model can deeply understand and parse user needs for the chart generation task, extract key information such as data source, data format, chart type and display requirements, etc. The model directly generates data processing code and task configuration file based on the analysis results, which greatly improves data processing efficiency compared to the complexity and time-consuming characteristics of manually writing SQL or chart display code in traditional methods.
[0024] In addition, the steps of automatically compiling data processing codes to obtain executable data processing tasks ensure the correctness of the code and the feasibility of its operation. Deploying the task configuration files and data processing tasks to the real-time data processing platform can achieve rapid application of the code and instant processing of real-time data, avoiding the long cycle from development to deployment in traditional methods, thereby improving the real-time and efficiency of data visualization.
[0025] Finally, in the real-time data processing platform, we combine Flink's stream processing and LLM's chart generation logic, and run the data processing task based on the task configuration file to generate the target display chart of the target business data. This can not only process static data, but also efficiently process dynamic data, realizing real-time analysis and visualization of data.
[0026] Through the above series of automated processes, the entire chart generation process is significantly accelerated from demand input to chart display, and the required real-time business data charts can be generated quickly and accurately, thereby solving the technical problem of low efficiency in visual display of real-time business data in business data chart display methods in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 is a flowchart of an optional method for generating a chart of business data according to an embodiment of the present invention;
[0029] Figure 2 is a schematic diagram of the basic structure of an optional chart generation system according to an embodiment of the present invention;
[0030] Figure 3 is an optional real-time chart generation flow chart according to an embodiment of the present invention;
[0031] Figure 4 is a flow chart of an optional real-time chart archiving and reproducing method according to an embodiment of the present invention;
[0032] Figure 5 is a schematic diagram of the transition of an optional task state and a processing sub-stage state according to an embodiment of the present invention;
[0033] Figure 6 is a schematic diagram of an optional device for generating a chart of business data according to an embodiment of the present invention;
[0034] Figure 7 The present invention is a hardware structure block diagram of an electronic device (or mobile device) for a method for generating a chart of business data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] The following embodiments of the present invention can be applied to various systems / applications / devices that require real-time business data display and efficient real-time data chart generation, and can realize a real-time data chart generation system based on the LLM large language model. The present invention receives user requirements through an interactive platform, uses a pre-trained LLM model to parse the requirements, generates FlinkSQL data processing code and task configuration, automatically compiles and deploys them to a real-time data processing platform, and the platform automatically runs data processing tasks and generates display charts, ultimately achieving rapid generation and display of dynamic data charts, while also supporting chart information archiving, significantly improving chart generation efficiency and user experience.
[0038] The present invention is described in detail below in conjunction with various embodiments.
[0039] Embodiment 1
[0040] According to an embodiment of the present invention, an embodiment of a method for generating a chart of business data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] The implementation subject of the embodiment of the present invention can be a real-time data display system. Combining the strategies of real-time reception, intelligent analysis, automatic code generation and rapid deployment, and utilizing the efficient processing capabilities of LLM and Flink, a system is constructed that can instantly respond to user needs, process dynamic business data in real time, and automatically generate chart displays. This significantly improves the efficiency and convenience of business data chart display, and overcomes the problems of low efficiency, long development cycle, high technical threshold and poor flexibility in traditional technologies.
[0042] The embodiment of the present invention is described in detail below in combination with the above steps.
[0043] Figure 1is a flowchart of an optional method for generating a chart of business data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0044] Step S101 , receiving a data processing requirement, wherein the data processing requirement is a requirement for generating a chart of target business data input by a target user through a real-time interactive platform, and the target business data includes: static data and / or dynamic data.
[0045] It should be noted that the interaction mode selected by the user is first identified and determined, whether it is text input or voice input. This identification process can be performed through preset options in the user interface. For example, when the user inputs a requirement, he can select a "text input" or "voice input" button. The system design in the embodiment of the present invention should take into account the user-friendly interaction experience. For example, for voice input, advanced voice recognition technology can be integrated to ensure that the user's voice instructions can be accurately understood even in a noisy environment.
[0046] After determining the interaction mode, receiving user needs, optionally, step S101 includes: determining the interaction mode proposed by the target user, wherein the interaction mode includes any of the following: text interaction and voice interaction; when it is determined that the interaction mode is text interaction, receiving a first demand text through a real-time interaction platform; when it is determined that the interaction mode is voice interaction, receiving the demand voice through the real-time interaction platform, and converting the demand voice into text form to obtain a second demand text; extracting key demand information in the first demand text and / or the second demand text according to a key information list, wherein the key information list contains R key information items, and R is a positive integer; when less than R items of key demand information are extracted, generating information supplement prompts based on the key information items that have not been extracted, and sending the information supplement prompts to the real-time interaction platform; when R items of key demand information are extracted, generating data processing requirements based on the R items of key demand information.
[0047] It should be noted that the extraction of key demand information is completed by comparing it with the preset key information list, which includes but is not limited to: data source type, time range, chart type, data field, aggregation operation, etc. If all R key information items cannot be extracted from the user's needs, information supplement prompts will be automatically generated to guide users to supplement the missing details, such as "Please specify the time range of the data" or "Please describe the type of chart you want to see", which can be returned to the target user through the real-time interactive platform.
[0048] When all key information is successfully extracted, data processing requirements are generated to guide the subsequent real-time data chart generation process, including the generation and execution of FlinkSQL statements, the construction of chart components, and the display of data.
[0049] The present invention provides an example of key information extraction. Assuming that the target user inputs in text form through the real-time interactive platform: "Please generate a bar chart of the sales data of the past week for me, and display it by product category.", the identified R items of key demand information will include: time range - past week; data source - sales data; chart type - bar chart; classification field - product category.
[0050] Another example of voice input: the target user says through voice: "I want to see the revenue comparison of each department yesterday, displayed in a pie chart." The system converts the voice into text and recognizes the R key requirement information including: time range - yesterday; data source - department revenue data; chart type - pie chart; classification field - department.
[0051] If the target user only provides "Generate a chart of sales data" without specifying a time range, chart type, or category field, the system will generate the following additional information prompts:
[0052] “You need to clarify the time frame of the data, such as whether it is last week, last month, or a specific date.”;
[0053] "Please specify the type of chart you would like to see, such as a line chart, bar chart, or pie chart.";
[0054] "To present data more precisely, you need to clarify the classification criteria of the data, such as by product, by region or by time."
[0055] The above-mentioned embodiments can ensure the accuracy and completeness of data processing requirements, so as to more effectively generate and display the required data charts. In addition, it can also lower the technical threshold for users, so that users without technical background in this field can also easily obtain visualization results of real-time business data through natural language descriptions.
[0056] Step S102, input the data processing requirements into the target model, and output the data processing code and the task configuration file, wherein the target model is a large language model pre-trained for the chart generation task, which is used to parse the data processing requirements to obtain the parsing results, and generate the data processing code and the task configuration file based on the data source information and output target information of the target business data in the parsing results.
[0057] In the embodiment of the present invention, the process of inputting data processing requirements into the target model to output data processing code and task configuration files involves a deep understanding and analysis of the data processing requirements, and code generation based on the analysis results. The above process is implemented through a pre-trained large language model (LLM), and the model has professional knowledge and skills for chart generation tasks.
[0058] Optionally, the step of inputting the data processing requirements into the target model and outputting the data processing code in step S102 includes: obtaining the parsing results of the data processing requirements through the target model, and generating a first code based on the data source information in the parsing results, wherein the first code is used to extract the original data corresponding to the target business data from the specified data source; determining the chart form and data display format of the target display chart expected by the target user based on the target output information in the parsing results; determining a data format conversion strategy based on the data display format, and generating a second code based on the data format conversion strategy, wherein the second code is used to convert the format of the original data to obtain the display data corresponding to the target business data; determining a chart generation strategy based on the chart form, and generating a third code based on the chart generation strategy, wherein the third code is used to construct an initial display chart in chart form; integrating the first code, the second code and the third code to obtain the data processing code.
[0059] It should be noted that in the steps of parsing the data processing requirements and generating the parsed requirements with the first code, the target model receives the data processing requirements input by the user, including but not limited to: time range, data screening conditions, aggregation functions, sorting, etc. The model fully understands all the requirements and converts them into specific data source information and target output information, and generates Flink SQL statements or similar data extraction codes (first codes) based on the data source information, which are used to extract raw data from the specified data source (such as a database, message queue, etc.). For example, if the data source is a MySQL database, the first code includes connection parameters and SQL query statements.
[0060] In addition, in the step of determining the chart form and data display format, the target model determines the type of target display chart, such as line chart, bar chart, pie chart, etc., according to user needs or target output information in the parsing results, and uses it as guidance information for chart generation. The target model is also used to fully understand the user's specific requirements for data display, such as time series display, percentage display, numerical display, etc., so as to determine the data format conversion strategy.
[0061] Next, the target model generates Flink SQL or similar data processing code (second code) based on the data format conversion strategy, which is used to clean, convert, aggregate and other operations on the original data to obtain display data suitable for chart display; then, according to the chart form, it generates code for building the initial display chart (third code), such as using the configuration information and JavaScript code of chart libraries such as D3.js and ECharts, or generating data structure definitions for data visualization frameworks.
[0062] Finally, the first code, the second code and the third code are integrated to obtain a complete data processing code, which directly acts on the data source to complete data extraction, conversion and chart generation.
[0063] Optionally, after integrating the first code, the second code and the third code to obtain the data processing code, the method also includes: generating a fourth code, wherein the fourth code is used to write the display data into an initial display chart to obtain a target display chart; generating a fifth code, wherein the fifth code is used to perform graphical processing on the target display chart to obtain a target graphic component to be displayed; and integrating the fourth code and the fifth code into the data processing code.
[0064] Specifically, the fifth code performs graphical processing on the target display chart, including but not limited to adding dynamic effects, interactive functions, etc., with the purpose of making it a target graphic component that can be directly used or displayed.
[0065] Step S103, compile the data processing code to obtain the data processing task, and deploy the task configuration file and the data processing task to the real-time data processing platform.
[0066] Specifically, the process of compiling data processing code to obtain data processing tasks involves at least compiling FlinkSQL code and related configurations into executable Flink jobs, and compiling front-end component codes into deployable Web application codes; deploying data processing tasks to the real-time data processing platform means uploading the compiled Flink jobs and front-end Web applications, where the Flink jobs are deployed to the Flink task platform and the front-end Web applications are uploaded to the front-end Web server. In addition, the back-end display data query code will be deployed to the back-end basic service module so that the front-end components can call these codes to obtain data.
[0067] It should be noted that the task configuration file is a detailed description of the data processing task, including but not limited to: data source connection information, data processing logic, chart style requirements, and any other necessary configuration information. The above information is collected when LLM parses user instructions and stored in the task record table when the task is created. The task configuration file ensures the uniqueness and traceability of each task, and also provides the necessary context information for the generation of FlinkSQL code.
[0068] Optionally, after executing step S103 to deploy the task configuration file and the data processing task to the real-time data processing platform, the method also includes: creating a task record table, wherein the task record table includes the following key fields: task identifier, user ID, task date, task status identifier, and task sub-stage identifier; writing the data processing task into the task record table and filling in all key fields; in the process of running the data processing task on the real-time data processing platform, obtaining the task running progress according to a preset period, and updating the task status identifier and task sub-stage identifier according to the task running progress.
[0069] It should be noted that creating a task record table is a key step to ensure the correct operation of the task. The task identifier (taskID) in the task record table refers to the ID that uniquely identifies each data processing task. It is automatically generated by the system and is used to uniquely identify each task in the task record table; the user ID (userID) is used to identify the user who initiated the data processing task. It is assigned by the system when the user logs in and is used to trace the initiator of the task; the task date (taskDate) is used to record the date when the task is created and started. The format is YYYYMMDD, which is convenient for sorting and querying tasks by time.
[0070] The task status identifier (taskStatus) is used to identify the current status of the task, including but not limited to: "CREATED" (created); "DEPLOYED" (deployed); "RUNNING" (running); "FINISHED" (finished); "ERROR" (running error); "STOPPED" (stopped).
[0071] The task subphase identifier (taskPhase) is used to identify the subphase that the task is currently in, including but not limited to:
[0072] "SOURCE_SQL_GENERATED" (source SQL generation completed);
[0073] "TRANSFORM_SQL_GENERATED" (Transformation SQL generation completed);
[0074] "SINK_SQL_GENERATED" (target SQL generation completed);
[0075] "DATA_QUERY_CODE_GENERATED" (data query code generation completed);
[0076] "FRONTEND_COMPONENT_CODE_GENERATED" (Front-end component code generation completed).
[0077] The above steps can achieve refined management of each data processing task by creating a task record table and recording the status and sub-stage information of each task in detail, so that data analysts and system administrators can monitor the execution progress of tasks in real time, adjust and optimize task configurations in a timely manner, and ensure efficient operation of tasks. In addition, the task record table also provides storage for task history and execution logs, which facilitates subsequent task audits and problem tracing, laying a solid foundation for the maintainability and scalability of the system.
[0078] Step S104: running the data processing task based on the task configuration file in the real-time data processing platform to generate a target display chart of the target business data.
[0079] Specifically, in the real-time data processing platform, the task configuration file is first parsed to determine key parameters such as the data source, data processing logic, target chart type and format. For example, the configuration file in JSON or YAML format is parsed, the fields therein are extracted, and mapped to the FlinkSQL statement.
[0080] Automatically orchestrate FlinkSQL tasks based on the parsed task configuration, including but not limited to: defining the data source (Source), data processing logic (Transform) and data target (Sink). The above process is based on familiarity with the Flink environment and in-depth understanding of the real-time data stream processing framework to ensure that the generated FlinkSQL tasks can process real-time data streams efficiently and accurately.
[0081] Taking into account the real-time performance of data and the response speed of the chart in the process of generating the target display chart, the embodiment of the present invention can adopt a high-performance chart generation library, such as ECharts, D3.js, etc., combined with Flink processing results, to dynamically generate charts. It can also introduce chart optimization strategies (such as data preprocessing, chart data caching, etc.) to ensure the performance and stability of the chart in high-concurrency scenarios.
[0082] Step S104 can significantly improve the efficiency of chart display of real-time business data, and provide data analysts with intuitive and real-time data visualization tools. Through automated FlinkSQL task scheduling and chart generation, the need for manual intervention is greatly reduced, the cost of chart updates and maintenance is reduced, and the feedback speed of data analysis is accelerated, allowing analysts to respond to changes in business needs more quickly.
[0083] Optionally, after executing step S104 to generate a target display chart of the target business data, the method also includes: initiating a preview display request for the target display chart to the real-time interactive platform, and receiving the preview opinion of the target user returned by the real-time interactive platform; when the preview opinion indicates to keep the chart, archiving the target display chart; when the preview opinion indicates to abandon the chart, modifying the task status identifier in the task record table, and clearing all system resources corresponding to the target display chart.
[0084] The embodiment of the present invention automatically initiates a preview request to the real-time interactive platform after the chart is generated to display the effect of the chart on the real-time data. The preview display can be dynamic, that is, the chart will be updated as the real-time data stream changes, and the user can preview the chart and provide feedback through the real-time interactive platform. The feedback may include: chart style adjustment, data attribute modification or optimization suggestions for data processing logic.
[0085] The embodiment of the present invention can also automatically or semi-automatically adjust the FlinkSQL task configuration and chart generation logic according to the loop optimization strategy and user feedback. The above loop optimization process requires re-running the FlinkSQL task or adjusting the style of the chart and the data display method until the user is satisfied.
[0086] Optionally, the step of archiving the target display chart includes: creating a display chart archiving table, wherein the display chart archiving table includes the following archiving fields: archiving record identifier, user ID, chart name, archiving date, archiving content and archiving details description; obtaining the data processing code corresponding to the target display chart, and the operation log of the data processing task; storing the target display chart in the display chart archiving table, and filling in all the archiving fields in the display chart archiving table based on the data processing code and the operation log.
[0087] Specifically, the archiving logic adopted by the embodiment of the present invention is: when the user confirms to keep the chart, the display chart archive table is automatically created or updated. In addition to the basic record identifier, user ID, chart name, archiving date, etc., the archive field also includes detailed information such as the specific FlinkSQL task configuration used to generate the chart, chart style definition, data processing logic, and operation log, which can provide complete context for the later reuse and audit of the chart.
[0088] If the user decides to abandon the chart, all resources related to the chart will be cleaned up, including but not limited to: FlinkSQL tasks, temporary data tables, chart generation code, and related files to avoid resource waste.
[0089] Optionally, the user can also retrieve the display chart archive table and call the archived chart. The embodiment of the present invention can automatically redeploy the FlinkSQL task according to the archive information, load the chart generation code, and quickly display the chart, which greatly improves work efficiency and reduces duplication of work.
[0090] In another optional embodiment, an exception detection mechanism may be established in the process of running a FlinkSQL task or generating a chart. Once an exception such as data inconsistency, task timeout, or chart generation failure is detected, it is immediately recorded and marked in the task record table.
[0091] In addition, if the user finds that the data display is incorrect or the chart style does not meet expectations when previewing the chart, the user can request the system to repair it, including but not limited to: requesting to modify the FlinkSQL task configuration, adjusting the chart style or data preprocessing logic. The embodiment of the present invention provides a user-friendly repair interface and process, reducing the complexity of the repair.
[0092] Through the above steps S101 to S104, data processing requirements can be received first, wherein the data processing requirements are requirements for chart generation of target business data input by the target user through the real-time interactive platform, and the target business data includes: static data and / or dynamic data, and then the data processing requirements are input into the target model, and the data processing code and task configuration file are output, wherein the target model is a large language model pre-trained for the chart generation task, which is used to parse the data processing requirements to obtain parsing results, and generate data processing code and task configuration file based on the data source information and output target information of the target business data in the parsing results, and then compile the data processing code to obtain the data processing task, and deploy the task configuration file and the data processing task to the real-time data processing platform, and finally run the data processing task based on the task configuration file in the real-time data processing platform to generate a target display chart of the target business data.
[0093] In the embodiment of the present invention, the user's demand for chart generation of target business data is received through a real-time interactive platform, which can be an analysis of static data or real-time processing of dynamic data, ensuring the wide applicability and real-time performance of the method. The demand is then input into a pre-trained LLM. The LLM model can deeply understand and parse user needs for the chart generation task, extract key information such as data source, data format, chart type and display requirements, etc. The model directly generates data processing code and task configuration files based on the analysis results, which greatly improves data processing efficiency compared to the complexity and time-consuming characteristics of manually writing SQL or chart display code in traditional methods.
[0094] In addition, the steps of automatically compiling data processing codes to obtain executable data processing tasks ensure the correctness of the code and the feasibility of its operation. Deploying the task configuration files and data processing tasks to the real-time data processing platform can achieve rapid application of the code and instant processing of real-time data, avoiding the long cycle from development to deployment in traditional methods, thereby improving the real-time and efficiency of data visualization.
[0095] Finally, in the real-time data processing platform, we combine Flink's stream processing and LLM's chart generation logic, and run the data processing task based on the task configuration file to generate the target display chart of the target business data. This can not only process static data, but also efficiently process dynamic data, realizing real-time analysis and visualization of data.
[0096] Through the above series of automated processes, the entire chart generation process is significantly accelerated from demand input to chart display, and the required real-time business data charts can be generated quickly and accurately, thereby solving the technical problem of low efficiency in visual display of real-time business data in business data chart display methods in related technologies.
[0097] The present invention is described below in conjunction with another specific implementation manner.
[0098] The embodiment of the present invention provides a real-time data chart generation method based on LLM. Based on the front-end and back-end separation technology, FlinkSQL is used to process the original data (the existing static data in the database or the dynamic data in the message queue), generate display data and store it in the database, and display the chart through the front-end component.
[0099] Figure 2 is a schematic diagram of the basic structure of an optional chart generation system according to an embodiment of the present invention, such as Figure 2 As shown, the chart generation system includes: Web service, background service and database, wherein the Web service and the background service interact through Http or Websocket, and the background service is coupled with the database to obtain the target data to be displayed from the database. The background service includes at least: LLM module, basic service module, Flink task platform, knowledge base module and execution module.
[0100] The functions of each module of the above chart generation system are introduced as follows:
[0101] 1. Web service: responsible for the front-end pages for user interaction, including LLM interaction, chart display and other pages. It is responsible for receiving user input instructions, calling back-end services, and dynamically updating chart display components based on the chart style and format returned by the back-end service and the generated data acquisition code.
[0102] 2. LLM module: Provides API for external calls, and performs fine-tuning training on the general LLM model for chart generation scenarios, so that it has the ability to handle the functions required by this system.
[0103] 3. Basic service module: receives web calls, including adding, deleting, modifying and checking chart generation task records, accesses the generated back-end display data query code, completes prompts at different stages of the task according to the preset prompt template, and gives prompts to the LLM module so that the LLM module can accurately complete the tasks of each sub-stage. In addition, this module is also responsible for code archiving.
[0104] 4. Knowledge base module: provides the LLM module with data source information, database information and system configuration related information, so that it can generate code according to the actual configuration.
[0105] 5. Execution module: responsible for the execution of database DML statements (database data manipulation language), code file generation, compilation and upload deployment, and FlinkSQL task deployment.
[0106] 6. Flink task platform: receives and runs FlinkSQL processing tasks issued by the execution module.
[0107] Figure 3 is an optional real-time chart generation flow chart according to an embodiment of the present invention, corresponding to the real-time chart generation method proposed based on the above-mentioned chart generation system, such as Figure 3 As shown, the real-time chart generation method includes the following steps: user instruction input; preliminary analysis of the input user instruction; judging whether necessary information is missing, if so, controlling the front end to prompt the user to supplement the information, and if not, executing the subsequent process; configuring the data processing task into the database based on the preliminary analyzed user instruction information, and reading the knowledge base according to the task information to complete the model prompt, calling LLM to start the icon generation process; generating the table creation SQL and FlinkSQL destination table statements for the display data table; generating FlinkSQL source table statements and data processing statements; generating backend query code; generating front-end display code; compiling and deploying all generated codes, and deploying FlinkSQL tasks; sending a notification to the target display browser to control the browser to refresh the preview effect of the display chart.
[0108] The process of each stage of the chart generation system running the above real-time chart generation method is described as follows:
[0109] Through the graphical interactive interface, the user inputs the data range (for example, time range, interval), data label, processing requirements, chart format, etc. to be displayed into the LLM model in text or voice form, and the LLM module parses the user's text or voice commands.
[0110] When the user's input command lacks key information or the input meaning is unclear, a message is pushed to prompt the user to supplement or modify it; when the input command or the supplemented information is complete and correct, the task interface of the basic service is called, a chart is created to generate a task record, the task configuration information is saved and the task status is set to "CREATED".
[0111] The basic service module calls the knowledge base service according to the task configuration, obtains the connection configuration and data structure information of the data source, then completes the prompt based on this information, calls the LLM module to start the chart generation task, and sets the task status to "PROCESSING".
[0112] The LLM model generates the target database table creation SQL and the target data table FlinkSQL according to the display requirements, and then generates the source table FlinkSQL according to the original data configuration format, and generates the data conversion FlinkSQL based on the source table FlinkSQL and the target table FlinkSQL. Finally, the above FlinkSQL is written into the file and the file address is updated to the task record table.
[0113] After the basic service module completes the data table format through Prompt, it calls the LLM module to generate query code for back-end display data, writes the file, and updates the file address to the task record table.
[0114] The basic service module calls the LLM module to generate the front-end component code after completing the prompt according to the previously determined chart style and data labels and the data query code generated in the previous step, writes the file and updates the file address to the task record table.
[0115] Next, compile and deploy the code, including the following steps: execute the SQL for creating the target database table; deploy the generated FlinkSQL task to the Flink platform; obtain the front-end and back-end code files generated earlier and compile them. After compilation, upload them to the specified location of the front-end web server and the back-end basic service module. If no error occurs, change the task status to "FINISH"; call the loading interface of the back-end basic service module to dynamically load the compiled code; notify the front-end browser through WebSocket to enable it to obtain and display the chart component.
[0116] After the chart generation task is completed, the chart is archived and reproduced. Figure 4 is a flow chart of an optional real-time chart archiving and reproducing method according to an embodiment of the present invention, such as Figure 4As shown in the figure, the archiving process includes: after the chart is generated, the user can preview the display effect through the LLM interactive interface, and enter instructions through subsequent interactions with LLM to choose whether to archive the generated chart. If the user instruction is yes, the chart data is stored in the database. If the user instruction is no, the Flink task is stopped and the deployed codes of the front-end and back-end are removed. The reproduction process includes: the user can actively enter the chart display page to check whether there is a suitable chart in the archived chart list. If there is, the archive information is read and displayed. If not, enter the LLM real-time interaction page to create a real-time chart.
[0117] It should be noted that the default user instructions in the implementation mode of the present invention are for the latest generation task, unless the user manually specifies the task through the LLM module. In actual operation, the user may have the need to pause the generation of the chart when communicating with the LLM. When receiving the user's request to pause the generation (usually by clicking a "Stop" button on the front end), the Web server will call the back-end task interface to set the current task status to "Stopped" and return the sub-stage of the current task to the user. After that, the user can choose to continue the generation, or abandon the current task and perform a new generation task.
[0118] When an error occurs during the generation process, such as a SQL execution error or a compilation error, the system will set the task status to "Error" and push the error information to the user. The user can then choose to add a description, or manually modify the code generated by LLM and choose to continue the chart generation task, or abandon the current task and perform a new generation task.
[0119] When the user chooses to abandon the current task, the system will set the task status to "Abandon".
[0120] Another thing to note is that the chart generation process is divided into multiple sub-stages and processed serially, which is convenient for fine-grained control of the chart generation process. Figure 5 is a schematic diagram of an optional task state and processing sub-stage state transition according to an embodiment of the present invention, such as Figure 5As shown, "Created" means "create a data processing task / chart generation task"; when a data processing task / chart generation task in the "Created" state starts to generate tasks, the state changes to "Processing"; if a task in the "Processing" state is completed normally, the task state changes to "Finish", if an error occurs, the task state changes to "Error", and if a user clicks to stop, the task state changes to "Stopped"; if a task in the "Error" state is supplemented / modified by the user and continues to be executed, the state is restored to "Processing", otherwise, if the user abandons generating the chart, the state is changed to "Abandon"; if a task in the "Stopped" state is supplemented / modified by the user and continues to be executed, the state is restored to "Processing", otherwise, if the user abandons generating the chart, the state is changed to "Abandon".
[0121] Still Figure 5 As shown in the figure, a task in the "Processing" state can have several processing sub-stage states. The correspondence between the sub-stage description and the sub-stage identifier is as follows:
[0122] The sub-stage of "Show data table generation completed" is marked as "DEST_SQL_GENERATED";
[0123] The sub-stage of "Backend query code generation completed" is marked as "QUERY_GENERATED";
[0124] The sub-stage of "FlinkSQL source table generation completed" is marked as "SOURCE_SQL_GENERATED";
[0125] The sub-stage of "FlinkSQL transformation generation completed" is marked as "TRANSFORM_SQL_GENERATED";
[0126] The sub-stage of "FlinkSQL target table generation completed" is marked as "SINK_SQL_GENERATED";
[0127] The sub-phase of "Front-end code generation completed" is marked as "WEB_GENERATED";
[0128] The sub-stage of "Backend code deployment completed" is marked as "BACKEND_DEPLOYED";
[0129] The sub-stage of "Front-end code deployment completed" is marked as "WEB_DEPLOYED".
[0130] In the above execution process, the data tables required include:
[0131] 1. Data conversion result table: The table fields are dynamically generated by the LLM model according to user instructions, source data format, and display data format. The real-time data processed by Flink conversion will be entered into the table.
[0132] 2. Task record table, key fields include:
[0133] id (a unique identifier generated internally for each task in the system); chatID (a unique identifier for marking the conversation between the user and LLM. Each user in this system has a unique chatID, which is generated when the user first talks with LLM); task date (in the format of YYYYMMDD); task status ("CREATED", "PROCESSING", "STOPPED", "FINISH", "ERROR"); sub-stage identifier ("SOURCE_SQL_GENERATED", "TRANSFORM_SQL_GENERATED", "SINK_SQL_GENERATED", "DEST_SQL_GENERATED", "WEB_GENERATED", "QUERY_GENERATED", "BACKEND_DEPLOYED", "WEB_DEPLOYED"), which is used to record the status of the entire chart generation task when the system processes user instructions.
[0134] 3. Archive table, key fields include:
[0135] id (a unique identifier generated internally by the system for each archived record); chatID (used to distinguish different users); chart name; generation date; archive content (JSON format, including the generated display data query class address, SQL statement, FlinkSQL information, etc.); description (chart label, including data source, chart style, label, etc.).
[0136] The implementation mode of the present invention uses LLM and Flink to realize the generation and automatic deployment of FlinkSQL based on LLM. The interactive dialogue based on LLM lowers the usage threshold of FlinkSQL, realizes the chart display function for real-time business data, and improves the development and deployment efficiency of real-time data chart display.
[0137] The implementation mode of the present invention also supports various forms of charts and can realize on-demand archiving and echoing of data charts, making it convenient for the front end to add and use them as fixed components.
[0138] The present invention is described below in conjunction with another optional embodiment.
[0139] Embodiment 2
[0140] A business data chart generation device provided in this embodiment includes multiple implementation units, each implementation unit corresponds to each implementation step in the above-mentioned embodiment 1.
[0141] Figure 6 is a schematic diagram of an optional business data chart generating device according to an embodiment of the present invention, such as Figure 6 As shown, the device may include: a receiving unit 61, an input unit 62, a deployment unit 63, and a generation unit 64.
[0142] The receiving unit 61 is used to receive data processing requirements, wherein the data processing requirements are requirements for chart generation of target business data input by the target user through the real-time interactive platform, and the target business data includes: static data and / or dynamic data.
[0143] The input unit 62 is used to input the data processing requirements into the target model, and output the data processing code and the task configuration file, wherein the target model is a large language model pre-trained for the chart generation task, and is used to parse the data processing requirements to obtain the parsing results, and generate the data processing code and the task configuration file based on the data source information and output target information of the target business data in the parsing results.
[0144] The deployment unit 63 is used to compile the data processing code to obtain the data processing task, and deploy the task configuration file and the data processing task to the real-time data processing platform.
[0145] The generating unit 64 is used to run the data processing task based on the task configuration file in the real-time data processing platform to generate a target display chart of the target business data.
[0146] The above-mentioned business data chart generation device can first receive data processing requirements through the receiving unit 61, wherein the data processing requirements are the chart generation requirements for target business data input by the target user through the real-time interactive platform, and the target business data includes: static data and / or dynamic data, and then input the data processing requirements into the target model through the input unit 62, and output data processing code and task configuration file, wherein the target model is a large language model pre-trained for the chart generation task, which is used to parse the data processing requirements to obtain the parsing results, and generate the data processing code and task configuration file based on the data source information and output target information of the target business data in the parsing results, and then compile the data processing code through the deployment unit 63 to obtain the data processing task, and deploy the task configuration file and the data processing task to the real-time data processing platform, and finally run the data processing task based on the task configuration file in the real-time data processing platform through the generation unit 64 to generate the target display chart of the target business data.
[0147] In an embodiment of the present invention, a user's demand for chart generation of target business data is received through a real-time interactive platform, which may be an analysis of static data or real-time processing of dynamic data, thereby ensuring the wide applicability and real-time performance of the method. The demand is then input into a pre-trained LLM, and the LLM model can deeply understand and parse user needs for the chart generation task, extract key information such as data source, data format, chart type, and display requirements, etc. The model directly generates data processing code and task configuration files based on the parsing results, which greatly improves data processing efficiency compared to the complexity and time-consuming characteristics of manually writing SQL or chart display code in traditional methods.
[0148] In addition, the steps of automatically compiling data processing codes to obtain executable data processing tasks ensure the correctness of the code and the feasibility of its operation. Deploying the task configuration files and data processing tasks to the real-time data processing platform can achieve rapid application of the code and instant processing of real-time data, avoiding the long cycle from development to deployment in traditional methods, thereby improving the real-time and efficiency of data visualization.
[0149] Finally, in the real-time data processing platform, we combine Flink's stream processing and LLM's chart generation logic, and run the data processing task based on the task configuration file to generate the target display chart of the target business data. This can not only process static data, but also efficiently process dynamic data, realizing real-time analysis and visualization of data.
[0150] Through the above series of automated processes, the entire chart generation process is significantly accelerated from demand input to chart display, and the required real-time business data charts can be generated quickly and accurately, thereby solving the technical problem of low efficiency in visual display of real-time business data in business data chart display methods in related technologies.
[0151] Optionally, the receiving unit includes: a first determination module, used to determine the interaction mode proposed by the target user, wherein the interaction mode includes any of the following: text interaction and voice interaction; a first receiving module, used to receive the first requirement text through the real-time interaction platform when the interaction mode is determined to be text interaction; a second receiving module, used to receive the requirement voice through the real-time interaction platform when the interaction mode is determined to be voice interaction, and convert the requirement voice into text form to obtain the second requirement text; an extraction module, used to extract key requirement information in the first requirement text and / or the second requirement text based on a key information list, wherein the key information list contains R key information items, and R is a positive integer; a first generation module, used to generate information supplement prompts based on the key information items that have not been extracted when less than R items of key requirement information are extracted, and send the information supplement prompts to the real-time interaction platform; a second generation module, used to generate data processing requirements based on R items of key requirement information when R items of key requirement information are extracted.
[0152] Optionally, the input unit includes: a third generation module, which is used to obtain the parsing results of the data processing requirements through the target model, and generate a first code based on the data source information in the parsing results, wherein the first code is used to extract the original data corresponding to the target business data from the specified data source; a second determination module, which is used to determine the chart form and data display format of the target display chart expected by the target user based on the target output information in the parsing results; a fourth generation module, which is used to determine the data format conversion strategy based on the data display format, and generate a second code based on the data format conversion strategy, wherein the second code is used to convert the format of the original data to obtain the display data corresponding to the target business data; a fifth generation module, which is used to determine the chart generation strategy based on the chart form, and generate a third code based on the chart generation strategy, wherein the third code is used to construct an initial display chart in chart form; a first integration module, which is used to integrate the first code, the second code and the third code to obtain a data processing code.
[0153] Optionally, the input unit also includes: a sixth generation module for generating a fourth code, wherein the fourth code is used to write the display data into an initial display chart to obtain a target display chart; a seventh generation module for generating a fifth code, wherein the fifth code is used to perform graphical processing on the target display chart to obtain a target graphic component to be displayed; and a second integration module for integrating the fourth code and the fifth code into the data processing code.
[0154] Optionally, the business data chart generating device also includes: a creation module, used to create a task record table, wherein the task record table includes the following key fields: task identifier, user ID, task date, task status identifier and task sub-stage identifier; a filling module, used to write the data processing task into the task record table and fill in all key fields; an update module, used to obtain the task running progress according to a preset cycle during the process of running the data processing task on the real-time data processing platform, and update the task status identifier and task sub-stage identifier according to the task running progress.
[0155] Optionally, the business data chart generation device also includes: a third receiving module, used to initiate a preview display request of the target display chart to the real-time interactive platform, and receive the preview opinion of the target user returned by the real-time interactive platform; an archiving module, used to archive the target display chart when the preview opinion indicates to keep the chart; and a cleaning module, used to modify the task status identifier in the task record table and clean up all system resources corresponding to the target display chart when the preview opinion indicates to abandon the chart.
[0156] Optionally, the archiving module includes: a creation submodule for creating a display chart archiving table, wherein the display chart archiving table includes the following archiving fields: an archiving record identifier, a user ID, a chart name, an archiving date, an archiving content, and an archiving details description; an acquisition submodule for acquiring the data processing code corresponding to the target display chart, and an operation log of the data processing task; a filling submodule for storing the target display chart in the display chart archiving table, and filling in all the archiving fields in the display chart archiving table based on the data processing code and the operation log.
[0157] The above-mentioned business data chart generation device may also include a processor and a memory. The above-mentioned receiving unit 61, input unit 62, deployment unit 63, generation unit 64, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0158] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the data processing code is compiled by adjusting the kernel parameters to obtain the data processing task, and the task configuration file and the data processing task are deployed to the real-time data processing platform, and the data processing task is run based on the task configuration file in the real-time data processing platform to generate the target display chart of the target business data.
[0159] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0160] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: receiving data processing requirements, wherein the data processing requirements are requirements for generating charts of target business data input by a target user through a real-time interactive platform, and the target business data includes: static data and / or dynamic data; inputting the data processing requirements into a target model, and outputting data processing code and a task configuration file, wherein the target model is a large language model pre-trained for a chart generation task, and is used to parse the data processing requirements to obtain a parsing result, and generate a data processing code and a task configuration file based on the data source information and output target information of the target business data in the parsing result; compiling the data processing code to obtain a data processing task, and deploying the task configuration file and the data processing task to a real-time data processing platform; running the data processing task based on the task configuration file in the real-time data processing platform to generate a target display chart of the target business data.
[0161] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for generating a chart of business data of any one of the above-mentioned embodiments.
[0162] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method for generating charts of business data of any one of the above-mentioned embodiments one.
[0163] Figure 7 1 is a hardware structure block diagram of an electronic device (or mobile device) for a method for generating a chart of business data according to an embodiment of the present invention. Figure 7 As shown, the electronic device may include one or more ( Figure 7 The processor 702 (the processor 702 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 704 for storing data. In addition, the following may also be included: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 7 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations shown.
[0164] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0165] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0166] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0168] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0169] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0170] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for generating a chart of business data, characterized in that: include: Receiving a data processing requirement, wherein the data processing requirement is a chart generation requirement for target business data input by a target user through a real-time interactive platform, and the target business data includes: static data and / or dynamic data; Input the data processing requirements into the target model, and output the data processing code and the task configuration file, wherein the target model is a large language model pre-trained for the chart generation task, which is used to parse the data processing requirements to obtain a parsing result, and generate the data processing code and the task configuration file based on the data source information and output target information of the target business data in the parsing result; Compiling the data processing code to obtain a data processing task, and deploying the task configuration file and the data processing task to a real-time data processing platform; The data processing task is run in the real-time data processing platform based on the task configuration file to generate a target display chart of the target business data.
2. The method for generating a graph according to claim 1, wherein: The steps of receiving data processing requirements include: Determining an interaction method proposed by the target user, wherein the interaction method includes any one of the following: text interaction and voice interaction; In the case where it is determined that the interaction mode is text interaction, receiving a first demand text through a real-time interaction platform; In the case where it is determined that the interaction mode is voice interaction, receiving the required voice through the real-time interaction platform, and converting the required voice into text form to obtain a second required text; Extracting key requirement information in the first requirement text and / or the second requirement text according to the key information list, wherein the key information list includes R key information items, where R is a positive integer; In the case where less than R items of key demand information are extracted, generating an information supplement prompt based on the key information items that have not been extracted, and sending the information supplement prompt to the real-time interaction platform; When R items of key requirement information are extracted, the data processing requirement is generated based on the R items of key requirement information.
3. The method for generating a graph according to claim 1, wherein: The step of inputting the data processing requirements into the target model and outputting the data processing code comprises: Obtaining a parsing result of the data processing requirement through a target model, and generating a first code based on data source information in the parsing result, wherein the first code is used to extract original data corresponding to the target business data from a specified data source; Determine the chart form and data display format of the target display chart expected by the target user based on the target output information in the analysis result; Determining a data format conversion strategy based on the data display format, and generating a second code based on the data format conversion strategy, wherein the second code is used to perform format conversion on the original data to obtain display data corresponding to the target business data; Determining a chart generation strategy based on the chart form, and generating a third code based on the chart generation strategy, wherein the third code is used to construct an initial display chart according to the chart form; The first code, the second code and the third code are integrated to obtain the data processing code.
4. The method for generating a graph according to claim 3, wherein: After integrating the first code, the second code and the third code to obtain the data processing code, the method further includes: generating a fourth code, wherein the fourth code is used to write the display data into the initial display chart to obtain the target display chart; Generate a fifth code, wherein the fifth code is used to perform graphical processing on the target display chart to obtain a target graphic component to be displayed; The fourth code and the fifth code are integrated into the data processing code.
5. The method for generating a graph according to claim 1, wherein: After deploying the task configuration file and the data processing task to the real-time data processing platform, the method further includes: Creating a task record table, wherein the task record table includes the following key fields: task identifier, user ID, task date, task status identifier, and task sub-stage identifier; Writing the data processing task into the task record table and filling in all the key fields; In the process of the real-time data processing platform running the data processing task, the task running progress is obtained according to a preset period, and the task state identifier and the task sub-stage identifier are updated according to the task running progress.
6. The method for generating a graph according to claim 1, wherein: After generating the target display chart of the target business data, the method further includes: Initiating a preview display request of the target display chart to the real-time interactive platform, and receiving the preview opinion of the target user returned by the real-time interactive platform; When the preview opinion indicates to keep the chart, archiving the target display chart; In the case where the preview opinion indicates to abandon the chart, the task status identifier in the task record table is modified, and all system resources corresponding to the target display chart are cleared.
7. The method for generating a graph according to claim 6, wherein: The step of archiving the target display chart includes: Creating a display chart archiving table, wherein the display chart archiving table includes the following archiving fields: archiving record identifier, user ID, chart name, archiving date, archiving content, and archiving details description; Obtain the data processing code corresponding to the target display chart and the running log of the data processing task; The target display chart is stored in the display chart archive table, and all the archive fields in the display chart archive table are filled in based on the data processing code and the operation log.
8. A device for generating a chart of business data, characterized in that: include: A receiving unit, configured to receive a data processing requirement, wherein the data processing requirement is a chart generation requirement for target business data input by a target user through a real-time interactive platform, and the target business data includes: static data and / or dynamic data; An input unit, used to input the data processing requirements into a target model, and output a data processing code and a task configuration file, wherein the target model is a large language model pre-trained for a chart generation task, and is used to parse the data processing requirements to obtain a parsing result, and generate a data processing code and a task configuration file based on the data source information and output target information of the target business data in the parsing result; A deployment unit, used for compiling the data processing code to obtain a data processing task, and deploying the task configuration file and the data processing task to a real-time data processing platform; A generating unit is used to run the data processing task based on the task configuration file in the real-time data processing platform to generate a target display chart of the target business data.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for generating a chart of business data according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating charts of business data as described in any one of claims 1 to 7.
Citation Information
Cited By
Information display method and device, equipment, storage medium and program product
CN121092029A