Data processing method and device, electronic equipment and storage medium
By creating a first interface that can connect multiple data engines, the cumbersome problem of obtaining data from multiple databases during report generation in the prior art is solved, and the integration and expansion of the data engine is realized, the report creation process is simplified and data processing efficiency is improved.
Patent Information
- Application Number
- CN202311424192.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-09
AI Technical Summary
When generating reports, the prior art requires the data from multiple databases through a data engine, which leads to cumbersome development and debugging, and consumes a lot of time and resources.
By creating a first interface that can connect multiple data engines, maintaining the mapping relationship between the data engine and the database, simplifying the report creation process and improving data processing efficiency.
It realizes integration and expansion of the data engine, simplifies the report creation process, improves data processing efficiency, and reduces time and resource consumption.
Smart Images

Figure CN119961332A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a data processing method, device, electronic device and storage medium. Background Art
[0002] Usually, battery manufacturers collect some data about the battery during actual use, such as battery temperature and battery voltage, analyze the collected data, and present the analysis results in the form of reports. The collected data is stored in a database, and when generating reports, data needs to be obtained from the database through a data engine. However, developing a data engine is cumbersome and requires a lot of time and resources. Summary of the invention
[0003] In view of the above technical problems, the embodiments of the present application provide a data processing method, device, electronic device and storage medium, which can integrate and expand the data engine, simplify the report creation process, improve data processing efficiency, and reduce time and resource consumption.
[0004] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0005] An instruction to create a target report is received, and the instruction to create a target report includes an identifier of the target data and a target database corresponding to the target data; in response to receiving the instruction to create the target report, a target data engine is determined from multiple data engines connected to a first interface according to a first mapping relationship, and the first mapping relationship is a mapping relationship between multiple data engines and multiple databases, the multiple data engines include the target data engine, and the multiple databases include the target database; according to the identifier of the target data, the target data engine is called to obtain the target data from the target database, and a target report is created according to the target data.
[0006] In the technical solution of the embodiment of the present application, a first interface is created, and the first interface can connect multiple data engines and maintain the mapping relationship between the data engine and the data engine and the database. After receiving the identifier of the target data and the target database corresponding to the target data, the target data engine corresponding to the target database can be determined through the first mapping relationship configured in the first interface, and then the target data engine is called, and the target data engine is obtained from the target database according to the identifier of the target data, and then a target report is created according to the target data. Among them, the first interface acts as a bridge between the front end and the data engine, and can connect multiple types of data engines, and uniformly maintain and manage the data engines connected to the first interface, so that various types of data engines can be called. When the target data for creating a target report is distributed in multiple target databases, it is only necessary to input the identifiers of the target data in multiple target databases and each target database respectively, and different data engines can be called through the configuration of the first interface to obtain data in different databases, and then obtain the target data, and realize the creation of a target report. There is no need to customize the addition or modification of the function of the data engine based on a data engine for the database, which can simplify the report creation process, improve data processing efficiency, and reduce the waste of time and resources. In addition, the method provided in the embodiment of the present application can conveniently integrate and expand a new data engine through the first interface, and has good scalability and flexibility.
[0007] In some embodiments, calling the target data engine to obtain target data from the target database includes: calling the target data engine to obtain original data from the target database; and cleaning the original data based on preset data processing rules to obtain the target data.
[0008] Since the original data from the database includes some additional data, such as timestamps, in addition to the data required to generate reports, data cleaning is required to remove the additional data. After calling the target data engine to obtain the original data from the target database, the original data is cleaned according to the data processing rules to obtain the target data, and the target data is provided to the front end. Among them, the data processing rules can be user-defined cleaning rules. When the user enters the instruction to create a target report, the instruction includes the data processing rules in addition to the identifier of the target data and the target database corresponding to the target data. Front-end users can set different cleaning rules according to different indicators and different business needs, which can make the data processing method more flexible.
[0009] In some embodiments, calling the target data engine to obtain target data from the target database includes: calling the target data engine to obtain original data from the target database; and processing the original data according to a preset data type to obtain the target data.
[0010] In the embodiment of the present application, different format conversion rules are configured for different data types, such as rules for processing character types, rules for processing integer types, etc. After receiving the data type, the corresponding format conversion rules can be matched according to the data type. The original data obtained by the data engine from the database has a certain format. According to the format conversion rules matched by the data type, the format of the original data is converted into the target format, and the original data in the target format is used as the target data. Through format conversion, all original data can be converted into a unified format, ensuring the accuracy and uniformity of the data, and providing a standard data format for front-end drawing.
[0011] In some embodiments, the instruction for creating a target report also includes a target display type. After acquiring the target data, the method further includes: arranging the target data according to the target display type.
[0012] The display type refers to the type of chart that presents the data analysis results in the report. In the embodiments of the present application, a variety of display types are provided for users to choose from. The display type can be one-dimensional, two-dimensional, or three-dimensional, and corresponding one-dimensional data, two-dimensional data, and three-dimensional data are required to generate charts. One-dimensional data is used to generate chart types such as bar charts and line charts, two-dimensional data is used to generate chart types such as tables, and three-dimensional data is used to generate chart types such as maps and stereograms. The user inputs the required target display type, so that the target data output to the front end can be arranged according to the target display type.
[0013] In some embodiments, the above method also includes: displaying a first interface, the first interface is used to create a target report; receiving an instruction to create a target report, including: after detecting the configuration information entered by the user in the first interface, generating an instruction to create the target report according to the configuration information.
[0014] The embodiment of the present application provides an operation interface, which enables customization and visual configuration of indicators through simple pull-down and text input.
[0015] In some embodiments, the method further includes: receiving a first instruction; in response to the first instruction, searching for a target report among a plurality of saved reports; and if the target report is not found, receiving configuration information input by a user on the first interface.
[0016] Since the report can be saved after each report is created, multiple reports have been created before the target report is created this time. When creating the target report this time, you can first find out whether there is a report that meets the requirements from multiple reports. If there is a report that meets the requirements, the report that meets the requirements is used as the target report; if there is no report that meets the requirements, choose to create a new report. In addition, before creating the target report this time, multiple charts have been created, which may include pre-set charts or charts in each report created. That is to say, after each report is created, multiple charts in the report can be saved separately. When adding a chart to a newly created report, you can first find out whether there is a chart that meets the requirements among multiple charts. If there is a chart that meets the requirements, drag it to the report; if there is no chart that meets the requirements, operate on the first interface to create a new chart and its indicators. In the embodiment of the present application, the indicators in the created report or chart have been customized. When using the created report or chart, data can be retrieved according to the original configuration information, and there is no need to customize the indicator configuration, which is more efficient and convenient.
[0017] In some embodiments, after creating the target report, the method further includes: displaying the target report.
[0018] According to different business needs, use different chart types to generate target reports and display target reports, which can display and analyze target data more intuitively and clearly.
[0019] In some embodiments, after creating the target report, the method further includes: storing the target report.
[0020] After the target report is created, the user can save the target report and save it as a template. The user can also share the target report with other users.
[0021] In some embodiments, after storing the target report, the method further includes: setting usage permissions for the target report.
[0022] When storing a target report, users can set the target report's usage permissions and sharing options as needed, that is, which department personnel can view, use, adjust, and modify the target report, and whether the target report can be shared with other users. By setting the target report's usage permissions and sharing options, you can ensure the security and accessibility of the report.
[0023] In a second aspect, an embodiment of the present application provides a data processing device, including:
[0024] A receiving module, configured to receive an instruction to create a target report, wherein the instruction to create a target report includes an identifier of target data and a target database corresponding to the target data;
[0025] a determination module, configured to, in response to receiving an instruction to create a target report, determine a target data engine from a plurality of data engines connected to the first interface according to a first mapping relationship, wherein the first mapping relationship is a mapping relationship between a plurality of data engines and a plurality of databases, the plurality of data engines including the target data engine, and the plurality of databases including the target database;
[0026] The processing module is used to call the target data engine to obtain the target data from the target database according to the identifier of the target data, and create a target report according to the target data.
[0027] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the data processing method as described in the first aspect when executing the computer program.
[0028] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed on a computer, the computer executes the data processing method as described in the first aspect.
[0029] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program product runs on a computer, it implements the data processing method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0031] Figure 1 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0032] Figure 2 It is a structural diagram of a system provided in an embodiment of the present application;
[0033] Figure 3 is a schematic diagram of an operation interface provided in an embodiment of the present application;
[0034] Figure 4 is a schematic diagram of another operation interface provided in an embodiment of the present application;
[0035] Figure 5is a schematic diagram of a target report provided in an embodiment of the present application;
[0036] Figure 6 is a schematic diagram of a target report provided in an embodiment of the present application;
[0037] Figure 7 It is a flowchart of a method for creating a target report provided by an embodiment of the present application;
[0038] Figure 8 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0039] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0042] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0043] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0044] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0045] Battery manufacturers often collect raw battery data, analyze the raw data, and store the raw battery data and analysis results in a database. When generating reports, battery manufacturers can access the data in the database through a data engine. The data engine is the core service of the database for storing, processing, and protecting data, and is the interface for operating data.
[0046] Due to the complexity of battery business-related scenarios, such as different data sources, different databases used by cooperative manufacturers, and the continuous expansion of the organizational scale of battery manufacturers, battery manufacturers use more than one database and the types are complex. For example, the battery raw data has a large amount of data and high real-time performance, and often requires the use of a real-time database for storage and reading and writing; the business data obtained by analyzing the battery raw data has complex relationships, and a high-performance relational database is required; the business also needs to introduce system monitoring data for performance analysis. The data in a report may be stored in multiple databases, and the storage method, storage structure, and query method of different databases are different. Correspondingly, the data processing process of the data engine required to obtain data from different databases is different. When generating a report, multiple data engines or a data engine that can support the acquisition of data from different databases are required. Independent research and development of data engines that can support various databases, or the introduction of an open source data analysis framework and secondary development on this basis, all require a lot of manpower and resources for development and debugging. The development process requires a lot of time and resources, and also requires developers to have rich professional knowledge and skills.
[0047] To this end, the embodiment of the present application proposes a data processing method that can integrate and expand the data engine, provide support for various types of databases, meet the data analysis and processing requirements of the battery business, simplify the report creation process, improve data processing efficiency, reduce time and resource consumption, and efficiently realize the support of the back-end system for business needs. The method provided by the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.
[0048] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes: step S101 to step S104.
[0049] S101, receiving an instruction to create a target report, where the instruction to create a target report includes an identifier of target data and a target database corresponding to the target data.
[0050] In some implementations, the front end may receive a user's instruction to create a target report inputted via voice, or may receive a user's instruction to create a target report inputted via a computer instruction, or may receive a user's instruction to create a target report inputted via an interactive interface. For example, in the interactive interface, the user's operation of clicking a report creation control in the interactive interface via an external device such as a mouse may be detected, and an instruction to create a target report may be generated for the operation behavior. There may also be other ways of receiving an instruction to create a target report, which are not limited here.
[0051] The instruction to create a target report includes an identifier of the target data and a target database corresponding to the target data, wherein the identifier of the target data may be a name of the target data, a code of the target data, etc., and the target database is a database storing the target data. The identifier of the target data is used to uniquely indicate the target data in the target database.
[0052] Reports are a commonly used display method that can intuitively display the analysis results of data in formats such as tables, bar charts, and three-dimensional graphics. A report can include multiple charts (i.e., tables, bar charts, etc.). A chart includes one or more indicators. Indicators are variables that make up the chart. For example, the x-axis variable and y-axis variable of a line chart are the vehicle operating time and battery capacity, respectively. The target data includes data corresponding to one or more indicators. For example, the target data includes the battery capacity of different models of batteries under different vehicle operating time. The name of the target data can be the name of the indicator, such as "battery capacity."
[0053] S102, in response to receiving an instruction to create a target report, determining a target data engine from multiple data engines connected to the first interface according to a first mapping relationship, the first mapping relationship being a mapping relationship between multiple data engines and multiple databases, the multiple data engines including the target data engine, and the multiple databases including the target database.
[0054] The first interface can connect and call multiple data engines, such as Grafana, Superset, Metabase, Rwdash, etc., and configure the first mapping relationship between multiple data engines and multiple databases, so that the target data engine can be determined according to the target database. The multiple databases can be databases such as MySQL, Prometheus, InfluxDB, Clickhouse, etc. The raw data stored in different databases are different. For example, InfluxDB is a time series database, which can store battery voltage, battery temperature, charging status, charging current, etc. reported by the battery management system. MySQL is a relational database, which can store some business data obtained after processing the raw data, such as battery health status, charging efficiency, temperature trend analysis, etc. Different data engines can support different databases. For example, the data engine Grafana supports the database Prometheus, and the data in Prometheus can be obtained through Grafana.
[0055] S103, calling a target data engine to obtain the target data from a target database according to the identifier of the target data.
[0056] After receiving the instruction to create the target report, the front end passes the instruction to create the target report to the first interface. The first interface determines the target data engine according to the mapping relationship and the target database, and then calls the target data engine to obtain the original data from the target database according to the identifier of the target data. The original data is cleaned and sorted and converted into target data in a unified format, or the original data is used as the target data, and the first interface provides the target data to the front end.
[0057] If the required target data includes data corresponding to multiple indicators, the instruction for creating a target report may include multiple sub-instructions, each of which includes an indicator name and a target database for storing the indicator data. Multiple sub-instructions are received at different time periods, and each time a sub-instruction is responded to, data corresponding to one indicator is obtained. After responding to multiple sub-instructions, data corresponding to multiple indicators are obtained, thereby obtaining the target data.
[0058] If a database corresponds to multiple data engines, the most efficient data engine can be selected from the multiple data engines for use based on the preset algorithm and the information in the instruction for creating the target report.
[0059] In some embodiments, the user may also input a target data engine, that is, the instruction for creating a target report includes an identifier of the target data, a target database, and a target data engine. After the front end passes the instruction for creating the target report to the first interface, the first interface may directly call the target data engine and obtain the original data from the target database according to the identifier of the target data.
[0060] S104, creating a target report based on the target data.
[0061] The front end draws one or more charts based on the target data to create a target report. The front end can then display the target report to show the data analysis results to the user. The presentation of the chart can be fixed or customized by the user.
[0062] In the technical solution of the embodiment of the present application, a first interface is created, and the first interface can connect multiple data engines and maintain the mapping relationship between the data engine and the data engine and the database. After receiving the identifier of the target data and the target database corresponding to the target data, the target data engine corresponding to the target database can be determined through the mapping relationship configured in the first interface, and then the target data engine is called, and the target data engine is obtained from the target database according to the identifier of the target data, and then a target report is created according to the target data. Among them, the first interface acts as a bridge between the front end and the data engine, and can connect multiple types of data engines, and uniformly maintain and manage the data engines connected to the first interface, so that various types of data engines can be called. When the target data for creating a target report is distributed in multiple target databases, it is only necessary to input the identifiers of the target data in multiple target databases and each target database respectively, and different data engines can be called through the configuration of the first interface to obtain data in different databases, and then obtain the target data, and realize the creation of a target report. There is no need to customize the addition or modification of the data engine function based on a data engine for the database, which can simplify the report creation process, improve data processing efficiency, and reduce the waste of time and resources. In addition, the method provided in the embodiment of the present application can conveniently integrate and expand a new data engine through the first interface, and has good scalability and flexibility.
[0063] Figure 2 FIG. 1 shows a schematic diagram of the structure of a system provided in an embodiment of the present application. Figure 2 As shown, the architecture of the system is divided into four layers, namely: front end, middleware, data engine, and database. Among them, the middleware includes a first interface.
[0064] The front end is used to manage the interaction with users. The front end includes multiple modules, namely indicator management, chart management, report management and report display. Report management is used to manage the created reports, chart management is used to manage the generated charts, and indicator management is used to manage the defined indicators. In addition, report management, chart management and indicator management also provide management interfaces for reports, charts and indicators respectively. Report display is used to provide a display interface for the target report to display the target report.
[0065] The middleware acts as a bridge connecting the front end and the data engine. The middleware includes multiple modules, namely indicator definition, data protocol definition, data conversion, and data cleaning. Among them, the data protocol definition is used to provide a protocol for interaction between the middleware and the data engine, such as how the middleware sends instructions to the data engine, how the data engine provides data to the middleware, etc. The data protocol is configured with mapping relationships between multiple data engines and multiple databases. Data conversion is used to convert the format of the original data obtained from the database. It can be understood that there are many formats of data stored in the database. Through data conversion, the original data obtained from different databases can be converted into a unified format. Data cleaning is used to filter, organize, and correct the original data obtained from the database to improve the accuracy and availability of the data. After the middleware performs data cleaning and data conversion on the original data, the target data is obtained. Among them, the rules for data conversion and data cleaning can be fixed rules set in the middleware, or they can be customized by the user according to the needs of different indicators.
[0066] The indicator definition is configured based on the business level and is used to receive the indicator information customized by the user. Specifically, the indicator definition has formulated a complete set of indicator structure customization schemes based on the characteristics of different indicators and various data engines. The indicator structure includes the indicator name and data source. Preferably, it can also include several key fields such as cleaning rules, data types, and display types. The indicator name field (name) is used to describe the name and meaning of the indicator so that users can understand the meaning of the indicator more clearly. The data source field (source) is used to describe the database or data engine to which the data corresponding to the indicator belongs, so that the system can obtain data from the correct database. The cleaning rule field (filter) is used to describe the filtering conditions and calculation methods of the indicator. By setting different cleaning rules, flexible screening and calculation of data can be achieved. The data type (type) is used to describe the different types of data corresponding to the data conversion processing of the middleware, such as integer type int, floating point type float, array, etc. The display type (display Type) is used to describe the different types of charts used in the report.
[0067] In an example, the indicator structure can be expressed as "enum Display Type{1D=1; 2D=2; 3D=3}, enum Source{MySQL=1; Prometheus=2; InfluxDB=3; Clickhouse=4}, message Metrix{string name=1; string type=2; Display Type display Type=3; Source source=4; string filter=5}". Users can also customize different indicator structure definitions as needed to meet different business needs.
[0068] The data engine layer is a plug-in data processing framework that includes multiple data engines. The target data engine can be flexibly selected according to business needs and the team's technical architecture. The middleware calls the data engine through the configured data protocol.
[0069] The database layer includes multiple databases. Through the support of rich data engines for various databases, it can avoid the complex structured query language (SQL) and database-driven development process, and can conveniently operate various databases according to actual business needs.
[0070] In some embodiments, calling the target data engine to obtain target data from the target database includes: calling the target data engine to obtain original data from the target database; and processing the original data according to a preset data type to obtain the target data.
[0071] In the embodiment of the present application, different format conversion rules are configured for different data types, such as rules for processing character types, rules for processing integer types, etc. The middleware can match the corresponding format conversion rules according to the preset data types. The original data obtained by the data engine from the database has a certain format. The data engine passes the original data to the middleware. After receiving the original data, the middleware converts the format of the original data into the target format according to the format conversion rules matched by the preset data type, and uses the original data in the target format as the target data. Through format conversion, all original data can be converted into a unified format, ensuring the accuracy and uniformity of the data, and providing a standard data format for front-end drawing. The preset data type can be a fixed setting in the middleware, or it can be a user-defined setting according to different needs. When the user enters the identifier of the target data and the target database, the data type is also entered, that is, the instruction to create the target report also includes the data type.
[0072] In some embodiments, calling the target data engine to obtain target data from the target database includes: calling the target data engine to obtain original data from the target database; and cleaning the original data based on preset data processing rules to obtain the target data.
[0073] Since the original data from the database includes some additional data, such as timestamps, in addition to the data required to generate the report, data cleaning is required to remove the additional data. After the front end sends the instruction to create the target report to the middleware, the middleware calls the target data engine to obtain the original data from the target database and passes it to the middleware. After receiving the original data, the middleware cleans the original data according to the preset data processing rules, obtains the target data, and provides the target data to the front end. Among them, the data processing rules can be user-defined cleaning rules. When the user enters the instruction to create the target report, the instruction includes data processing rules in addition to the identifier of the target data and the target database corresponding to the target data. The front-end user can set different cleaning rules according to different indicators and different business needs, which can make the data processing method more flexible.
[0074] In an example, the data obtained from the data engine is: {"is_cached":false,"query":"SELECT platform AS\"platform\",\nowner_count AS\"owner_count\",\nCOUNT(*)AS\"count\"\nFROM public.generated_latest_dataset_owners\nGROUP BYplatform,\nowner_count\nORDER BY\"count\"DESC\nLIMIT10000","from_dttm":1692489600000.0,"to_dttm":1693094400000.0,"status":"success","stacktrace":null,"rowcount":9,"data":[{"key":"0","values":[{"x":"bigquery",y":0.076923076 92307693},{"x":"snowflake","y":0.9076923076923077},{"x":"s3","y":1.0},{"x":"kafka","y":0.7142857 142857143}]},{"key":"1","values":{"x":"bigquery","y":0.34615384615384615},{"x":"snowflake","y":n ull},{"x":"s3","y":null},{"x":"kafka","y":null}]},{"key":"2","values":[{"x":"bigquery","y":0.09615384615384616},{"x":"snowflake","y":null},{"x":"s3","y":null},{"x":"kafka","y":null}]},"applied_filters":[],"rejected_filters":[]}。 When it is necessary to clean up the relevant data of Kafka, the data processing rule can be: {"data_path":"data","data_type":"list","field":"y","filters":[{"filter":{"field":"x","condition":"equals","value":"kafka"}}]}。This data processing rule specifies the data cleaning method for the middleware, that is, it requires the middleware to traverse the data array type, select the y field from it, and select the data corresponding to y when the x field is equal to "kafka".
[0075] In some embodiments, the instruction for creating a target report also includes a target display type. After acquiring the target data, the method further includes: arranging the target data according to the target display type.
[0076] In the embodiment of the present application, a variety of display types are provided for users to choose from. The display type refers to the chart type that presents the data analysis results in the report. The display type can be one-dimensional, two-dimensional, or three-dimensional, and one-dimensional data, two-dimensional data, or three-dimensional data is required to generate the corresponding chart. One-dimensional data is used to generate chart types such as bar charts and line charts, two-dimensional data is used to generate chart types such as tables, and three-dimensional data is used to generate chart types such as maps and stereograms. The user inputs the required target display type, and the middleware arranges the target data according to the target display type and outputs it to the front end. After the front end receives the target data from the middleware, the front end generates a chart displaying the target data. For example, for the data array, the middleware obtains the data of the x field and the y field. When the target display type is two-dimensional, the middleware arranges the x field data into a row and the y field data into a row for output. In the embodiment of the present application, the middleware outputs the data arrangement format as required, which can improve the data processing efficiency of the front end.
[0077] In some embodiments, the above method also includes: displaying the first interface; receiving an instruction to create a target report: after detecting configuration information input by the user on the first interface, generating an instruction to create a target report according to the configuration information.
[0078] Figure 3 An operation interface provided by an embodiment of the present application is shown. Figure 3 As shown, the front-end user can click the "Create More" control, and then enter the report name, such as "Life Overview", in the pop-up input box to create a new blank report. Then, multiple charts can be displayed on the right side of the operation interface. Users can select the existing charts that meet the requirements and drag them to the blank report. Users can also click the "New Chart" control and choose to create a new chart. Then, in the pop-up window, you can enter the chart name, select the chart type, such as a bar chart or a line chart, and further select the indicators in the chart. Users can select the existing indicators that meet the requirements, or click "Add" to create a new indicator.
[0079] Figure 4 Another operation interface provided by the embodiment of the present application is shown. After clicking "Add", the front end displays Figure 4The operation interface shown is a user interface on which the user can customize the configuration indicator information, including the indicator name, data source, and preferably, cleaning rules, data type, display type, etc. The user can enter the name of the indicator in the "Indicator Name" input box, such as battery capacity, enter the target database in the "Data Source" input box, select one-dimensional, two-dimensional, or three-dimensional in the "Display Type" drop-down selection box, select the required data type in the "Data Type" drop-down selection box, enter the aforementioned data processing rules in the "Cleaning Rules" input box, and then click "OK". According to the above series of operations, an instruction to create a target report is generated, and then the front end sends the instruction to create the target report to the middleware, so that the middleware executes the subsequent process. The first interface can be Figure 3 and Figure 4 The operation interface shown in Figure 4 In the operation interface shown, one indicator can be configured at a time. Users can create new indicators multiple times, thereby generating multiple sub-instructions. The front end sends the multiple sub-instructions to the middleware separately. The relevant information of existing indicators is stored in the front end or server. When the user selects an existing chart or an indicator that meets the requirements, the front end can send the corresponding information to the middleware, that is, the configuration information is input by selecting the instruction, and the user does not need to enter the indicator information again. Figure 5 An example of a target report provided in an embodiment of the present application is shown. Figure 5 As shown in the figure, the target report includes 6 curve graphs, and the indicators in each graph are different. Users can click a point in the curve and then Figure 6 As shown, the interface can display the relevant data of the point. The embodiment of the present application provides an operation interface, which can realize the customization and visual configuration of indicators through simple pull-down and text input.
[0080] In some embodiments, after creating the target report, the data processing method further includes: storing the target report.
[0081] After the target report is created, the user can save the target report as a template and then use it in Figure 3 In the "Template Management" shown, view the target report. Users can also share the target report with other users. When saving the target report, you can add a description of the target report. For example, the target report analyzes the battery life by vehicle running time, vehicle cumulative mileage, actual throughput, battery capacity, etc. Adding a description can facilitate subsequent report searches and quickly understand the report information.
[0082] In some embodiments, after storing the target report, the method further includes: setting usage permissions for the target report.
[0083] When storing a target report, users can set the target report's usage permissions and sharing options as needed, that is, which department personnel can view, use, adjust, and modify the target report, and whether the target report can be shared with other users. By setting the target report's usage permissions and sharing options, you can ensure the security and accessibility of the report.
[0084] In some embodiments, the method further includes: receiving a first instruction; searching for a target report among multiple saved reports in response to the first instruction; and receiving configuration information input by a user on the first interface if the target report is not found.
[0085] Since the report can be saved after each creation, multiple reports have been created before the target report is created this time. When creating the target report this time, the first instruction from the user can be received to find out whether there is a report that meets the requirements from multiple reports. If there is a report that meets the requirements, the user can select the report that meets the requirements and use it as the target report; if there is no report that meets the requirements, the user can choose to create a new report and perform related operations on the first interface. Figure 3 In the interface shown, multiple charts can be displayed on the right side of the interface. These charts can include pre-set charts and charts in each report created. That is, after each report is created, multiple charts in the report can be saved separately. When adding a chart to a newly created report, you can first search among multiple charts to see if there is a chart that meets your needs. If there is a chart that meets your needs, drag it to the report; if there is no chart that meets your needs, select Create a New Chart and create a new indicator. Figure 4 In the embodiment of the present application, the indicators in the created report or chart have been customized. When using the created report or chart, data can be retrieved according to the original configuration information without the need to customize the indicators, which is more efficient and convenient.
[0086] Figure 7 A flowchart of a method for creating a target report provided in an embodiment of the present application is shown as follows: Figure 7 As shown, the method includes steps S701-S711.
[0087] S701, determining whether there is a report that meets the requirements among the created reports.
[0088] The user can enter a first instruction in the template management. The first instruction includes a report name and may also include a related description of the report. After receiving the first instruction, the device can search for a report that meets the requirements based on the report name and description.
[0089] S702: If there is a report that meets the requirement, the report that meets the requirement selected by the user is used as the target report.
[0090] S703: If there is no report that meets the requirements, an instruction to create a new report is received.
[0091] In the above interface, users can click "Create More" to create a new report and enter the name of the report. Optionally, they can also enter a description of the report when creating it.
[0092] S704, determining whether there is a chart that meets the requirements among the existing charts.
[0093] Meeting the needs means that the chart type meets the user's business needs, or the chart type and the indicators in the chart meet the user's business needs.
[0094] S705, if there is a chart that meets the requirement, the chart selected by the user that meets the requirement is added to the report page.
[0095] S706: If there is no chart that meets the requirements, receive an instruction to create a new chart.
[0096] The process of creating a new chart can refer to the above content. When creating a new chart, in addition to selecting the chart type and chart name, users can also set the chart's color, style and other properties. Users can add different types of charts to a report and sort multiple charts.
[0097] S707, determine whether there is an indicator that meets the requirements.
[0098] S708: If there is an indicator that meets the requirement, determine the configuration information of the indicator that meets the requirement selected by the user.
[0099] The front end sends the configuration information of the indicators selected by the user that meet the requirements to the middleware.
[0100] S709: If there is no indicator that meets the requirement, receive the indicator information configured by the user.
[0101] Users only need to enter the indicator name, data type, display type, data source, cleaning rules and other information according to different business needs. The front end can generate instructions for creating the target report based on the user-configured information and send it to the middleware.
[0102] S710, the middleware obtains the target data and returns the target data to the front end.
[0103] The middleware determines the target data engine, format conversion rules, cleaning rules, and display type based on the custom configuration information. According to the data protocol, it obtains the original data from the target database through the target data engine, converts and cleans the original data to obtain the target data, and returns the target data to the front end in the specified format.
[0104] S711, the front end generates a target report and displays the target report.
[0105] Users can review the created target reports and adjust and modify them as needed.
[0106] In the technical solution provided by the embodiment of the present application, the user only needs to perform simple operations on the front end, input the indicator name, data type, display type, data source, and customized information such as cleaning rules, and then configure the report he wants by himself, so that the user can directly define the report, and generate reports using different chart types according to different business needs, so that the target data can be displayed and analyzed more intuitively and clearly, with flexibility and customizability. The front end detects the user operation and sends the customized information to the middleware, so that the target data can be received, and the target report can be generated according to the target data, which simplifies the report creation process. The middleware connects multiple data engines, obtains corresponding data from the corresponding data engines, integrates the data obtained by multiple data engines into the middleware, integrates and processes the data in the middleware, and converts the data obtained from the data engine into the target data in the standard data format required by the front end. The middleware can realize the unified management of different data engines, easily generate target data for use by the front end, and ensure the accuracy and consistency of the data, reducing the workload of developers and improving work efficiency.
[0107] Figure 8 A data processing device 800 provided in an embodiment of the present application is shown. The device 800 includes a receiving module 810, a determining module 820 and a processing module 830.
[0108] The receiving module 810 is used to receive an instruction to create a target report, where the instruction to create a target report includes an identifier of target data and a target database corresponding to the target data.
[0109] Determination module 820 is used to determine the target data engine from multiple data engines connected to the first interface according to a first mapping relationship in response to receiving an instruction to create a target report. The first mapping relationship is a mapping relationship between multiple data engines and multiple databases, and the multiple data engines include the target data engine, and the multiple databases include the target database.
[0110] The processing module 830 is used to call the target data engine to obtain the target data from the target database according to the identifier of the target data, and create a target report according to the target data.
[0111] In some embodiments, the instruction for creating the target report further includes at least one of a data type, a display type, and a data processing rule.
[0112] In some embodiments, the data processing device 800 further includes a display module for displaying a target report.
[0113] In some embodiments, the display module is also used to display the first interface.
[0114] In some embodiments, the data processing device 800 further includes a storage module for storing target reports.
[0115] It should be understood that the device 800 of the embodiment of the present application can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The data processing method can also be implemented by software. When the data processing method is implemented by software, the device 800 and its various modules can also be software modules.
[0116] Fig. 9 FIG. 9 is a schematic diagram of the structure of an electronic device 900 provided in an embodiment of the present application. Fig. 9 As shown, the device 900 includes a processor 901, a memory 902, a communication interface 903 and a bus 904. The processor 901, the memory 902 and the communication interface 903 communicate via the bus 904, and may also communicate via other means such as wireless transmission. The memory 902 is used to store instructions, and the processor 901 is used to execute the instructions stored in the memory 902. The memory 902 stores program code 9021, and the processor 901 can call the program code 9021 stored in the memory 902 to execute the above method.
[0117] It should be understood that in the embodiment of the present application, the processor 901 may be a CPU, and the processor 901 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0118] The memory 902 may include a read-only memory and a random access memory, and provide instructions and data to the processor 901. The memory 902 may also include a non-volatile random access memory. The memory 902 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct memory bus random access memory (DR RAM).
[0119] The bus 904 may include a power bus, a control bus, a status signal bus, etc. in addition to a data bus. Fig. 9 Various buses are labeled as bus 904.
[0120] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).
[0121] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: receiving an instruction to create a target report, wherein the instruction to create a target report includes an identifier of target data and a target database corresponding to the target data; In response to receiving the instruction to create the target report, determining a target data engine from a plurality of data engines connected to the first interface according to a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the plurality of data engines and a plurality of databases, the plurality of data engines including the target data engine, and the plurality of databases including the target database; According to the identifier of the target data, calling the target data engine to obtain the target data from the target database; A target report is created according to the target data.
2. The method according to claim 1, characterized in that The calling the target data engine to obtain the target data from the target database includes: Calling the target data engine to obtain original data from the target database; Based on preset data processing rules, the original data is cleaned to obtain the target data.
3. The method according to claim 1, characterized in that The calling the target data engine to obtain the target data from the target database includes: Calling the target data engine to obtain original data from the target database; The original data is processed according to a preset data type to obtain the target data.
4. The method according to claim 1, characterized in that The instruction to create a target report also includes a target display type. After acquiring the target data, the method further includes: The target data is arranged according to the target display type.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Displaying a first interface, where the first interface is used to create the target report; The receiving the instruction to create the target report includes: After receiving the configuration information input by the user on the first interface, an instruction for creating the target report is generated according to the configuration information.
6. The method according to claim 5, characterized in that The method further comprises: A first instruction is received; In response to the first instruction, searching for the target report in a plurality of saved reports; When the target report is not found, configuration information input by the user on the first interface is received.
7. The method according to claim 1, characterized in that After creating the target report, the method further includes: The target report is stored.
8. A data processing device, characterized in that: include: A receiving module, configured to receive an instruction to create a target report, wherein the instruction to create a target report includes an identifier of target data and a target database corresponding to the target data; a determination module, configured to, in response to receiving the instruction to create the target report, determine a target data engine from a plurality of data engines connected to the first interface according to a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the plurality of data engines and a plurality of databases, the plurality of data engines including the target data engine, and the plurality of databases including the target database; The processing module is used to call the target data engine to obtain the target data from the target database according to the identifier of the target data, and create a target report according to the target data.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
Citation Information
Cited By
Report display method and device, electronic equipment and storage medium
CN120723823A