Data processing method and device, electronic equipment and readable storage medium
By introducing multi-level data storage and associated reference query mechanisms into the data processing method, the problems of data redundancy and low query efficiency in the prior art are solved, and efficient multi-level data query and automatic data summary display are realized.
Patent Information
- Application Number
- CN202411657273.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the single-level structure of data storage results in high data redundancy and low query efficiency. When storing multi-level data, the query process is complicated and inefficient.
A data processing method is proposed, by receiving update data and query requests from the client, obtaining historical data and initial dimension tables, updating data and generating updated data and first dimension tables, realizing multi-level classification and independent storage of data. Introduce an associated reference query mechanism to quickly correlate and query multi-level data, and automatically identify and associate data at different levels when data summary and display.
It effectively reduces data redundancy, improves data query efficiency, simplifies the query process of multi-level data, improves query response speed, and reduces manual intervention.
Smart Images

Figure CN119576934A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic equipment, and in particular to a data processing method, device, electronic equipment and readable storage medium. Background Art
[0002] At present, in the relevant technology, when a single-level structure is used to store data, the data lacks a hierarchical relationship, resulting in repeated storage of data in different locations and excessive data redundancy. In order to avoid excessive data redundancy, data can be stored through multi-level data storage. However, when querying data, it is necessary to query different levels multiple times and then splice the data to obtain the data to be queried, which will result in low query efficiency. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0004] To this end, a first aspect of the present invention provides a data processing method.
[0005] A second aspect of the present invention provides a data processing device.
[0006] A third aspect of the present invention provides an electronic device.
[0007] A fourth aspect of the present invention provides a readable storage medium.
[0008] In view of this, a first aspect of the present invention provides a data processing method, which is used for a server, and the data processing method includes: receiving update data and update data requests sent by a client; obtaining historical data and an initial dimension table of the historical data according to the update data request; obtaining updated data and a first dimension table of the updated data according to the update data, the initial dimension table and the historical data; responding to a query request sent by the client, extracting query data information in the query request; obtaining query data based on the updated data, the first dimension table and the query data information, and transmitting the query data to the client.
[0009] The present application provides a data processing method, which is used in a server, and includes: receiving update data and update data requests sent by a client; obtaining historical data and an initial dimension table of historical data according to the update data request; obtaining updated data and a first dimension table of updated data according to the update data, the initial dimension table and the historical data, and the data can be classified and stored independently according to different levels. Each level is stored in the initial dimension table according to the hierarchical relationship, which is convenient for organizing and managing data. At the same time, the data processing method allows the storage of updated data, that is, the storage structure is automatically adjusted according to data changes. It can ensure that the updated data can use the latest business logic and data structure to maintain the efficient data processing capability of the product. The data processing method responds to the query request sent by the client, extracts the query data information in the query request; based on the updated data, the first dimension table and the query data information, obtains the query data, and transmits the query data to the client. By introducing an associated reference query mechanism, a relationship model between data can be established through the updated data, the first dimension table and the query data information, so as to realize a fast associated query of multi-level data. When summarizing and displaying data, it can automatically identify and associate data of different levels, reduce manual intervention, and improve the query response speed.
[0010] In addition, the data processing method in the above technical solution provided by the present invention may also have the following additional technical features:
[0011] In some technical solutions of the present invention, optionally, query data is obtained based on the updated data, the first dimension table and the query data information, including: obtaining the query data level based on the first dimension table and the query data information; and obtaining the query data according to the query data level and the updated data.
[0012] In this technical solution, based on the updated data, the first dimension table and the query data information, the query data is obtained, including: based on the first dimension table and the query data information, the query data level is obtained; according to the query data level and the updated data, the query data is obtained. The introduction of the associated reference query mechanism can realize the fast associated query of multi-level data through the hierarchical relationship of the data, thereby improving the query response speed.
[0013] In some technical solutions of the present invention, optionally, query data is obtained based on the updated data, the first dimension table and the query data information, including: obtaining the data query frequency based on the query data information and the updated data; obtaining the data update cycle and the data to be cleared based on the data query frequency and the updated data; deleting the data to be cleared in the updated data based on the data update cycle to obtain the first stored data; and querying the first stored data based on the query data information and the first dimension table to obtain the query data.
[0014] In this technical solution, query data is obtained based on the updated data, the first dimension table and the query data information, including: obtaining the data query frequency based on the query data information and the updated data; obtaining the data update cycle and the data to be cleared based on the data query frequency and the updated data; deleting the data to be cleared in the updated data based on the data update cycle to obtain the first stored data; querying the first stored data based on the query data information and the first dimension table to obtain the query data. In this way, the query and use of data can be regularly analyzed to extract the data to be cleared that is no longer needed, eliminate redundant information in a timely manner, and reduce storage costs.
[0015] In some technical solutions of the present invention, optionally, based on the data query frequency and the updated data, the data update cycle and the data to be cleared are obtained, including: responding to a preset request sent by the client to obtain a preset frequency threshold; based on the data query frequency and the updated data, obtaining the level query frequency of each level in the updated data; marking the level whose level query frequency is less than or equal to the preset frequency threshold as a level to be cleared to obtain the level to be cleared; based on the updated data and the level to be cleared, obtaining the data to be cleared.
[0016] In this technical solution, obtaining the data update cycle and the data to be cleared includes: responding to the preset request sent by the client to obtain the preset frequency threshold; based on the data query frequency and the updated data, obtaining the layer query frequency of each layer in the updated data; marking the layer whose layer query frequency is less than or equal to the preset frequency threshold as the layer to be cleared to obtain the layer to be cleared; based on the updated data and the layer to be cleared, obtaining the data to be cleared. By regularly analyzing the data usage in the updated data, identifying the layers to be cleared that are no longer needed, and clearing the data to be cleared in the layers in a timely manner, the storage cost can be further reduced.
[0017] In some technical solutions of the present invention, optionally, based on the updated data, the initial dimension table and the historical data, the updated data and the first dimension table of the updated data are obtained, including: based on the updated data, obtaining the second hierarchical relationship; based on the second hierarchical relationship and the historical data, storing the updated data hierarchically in the historical data to obtain the updated data; based on the second hierarchical relationship, the initial dimension table and the updated data, obtaining the first dimension table of the updated data.
[0018] In this technical solution, updated data and the first dimension table of updated data are obtained according to updated data, initial dimension table and historical data, including: obtaining the second hierarchical relationship according to the updated data, that is, obtaining the hierarchical relationship of the updated data to be updated, storing the updated data hierarchically in the historical data according to the second hierarchical relationship and historical data to obtain updated data; adopting a dynamic data model update mechanism, the data processing method can allow data updates and automatically adjust the storage structure and query method. It can ensure that the updated data always uses the latest business logic and data structure to maintain the product's efficient data processing capabilities. At the same time, according to the second hierarchical relationship, the initial dimension table and the updated data, the first dimension table of the updated data is obtained to realize the update of the dimension table, which is convenient for fast associative query of multi-level data through associative reference query.
[0019] In some technical solutions of the present invention, optionally, after obtaining query data based on the updated data, the first dimension table and the query data information, and transmitting the query data to the client, the data processing method also includes: receiving a data display request sent by the client, extracting the display data information in the data display request; obtaining multiple display data levels according to the display data information and the first dimension table; obtaining multiple display data according to the display data levels and the updated data; obtaining a display report according to the display data information and the multiple display data, so that the client displays the display report.
[0020] In this technical solution, after obtaining query data based on updated data, the first dimension table and query data information, and transmitting the query data to the client, the data processing method also includes: receiving a data display request sent by the client, extracting display data information in the data display request; obtaining multiple display data levels according to the display data information and the first dimension table; obtaining multiple display data according to the display data level and the updated data; obtaining a display report according to the display data information and the multiple display data, so that the client displays the display report. The client can provide an intuitive and easy-to-use user interface, allowing users to customize data storage and query settings according to actual needs. Users can easily configure a multi-level structure and select a suitable query method to meet the needs of different roles. After querying the data through the data processing method, they can obtain a display report according to the display data information and the multiple display data, so that the client displays the display report, so that the customer can intuitively understand the specific situation of the data.
[0021] In some technical solutions of the present invention, optionally, a display report is obtained based on display data information and multiple display data, including: aggregating multiple display data into an initial display report; obtaining a report page template based on the display data information; and rendering the initial display report through the report page template based on the display data information to obtain the display report.
[0022] In the technical solution, a display report is obtained according to display data information and multiple display data, including: aggregating multiple display data into an initial display report; obtaining a report page template according to the display data information; and rendering the initial display report through the report page template based on the display data information to obtain the display report. When performing data aggregation and display, the data processing method renders the display report and presents it to the customer through the client to improve practicality.
[0023] In a second aspect of the present invention, a data processing device is provided, comprising: a receiving unit, a first acquisition unit, a second acquisition unit, an extraction unit, a third acquisition unit and a transmission unit. The receiving unit is used to receive update data and update data requests sent by a client; the first acquisition unit is used to acquire historical data and an initial dimension table of historical data according to the update data request; the second acquisition unit is used to acquire updated data and a first dimension table of updated data according to the update data, the initial dimension table and the historical data; the extraction unit is used to respond to a query request sent by the client and extract query data information in the query request; the third acquisition unit is used to acquire query data based on the updated data, the first dimension table and the query data information; and the transmission unit is used to transmit the query data to the client.
[0024] The data processing device provided by the present application includes: a receiving unit, a first acquisition unit, a second acquisition unit, an extraction unit, a third acquisition unit and a transmission unit. The receiving unit can receive the update data and the update data request sent by the client, so as to facilitate the work according to the request of the client. The first acquisition unit is used to acquire the historical data and the initial dimension table of the historical data according to the update data request, so as to complete the acquisition of the association table and improve the efficiency of subsequent queries; the second acquisition unit is used to acquire the updated data and the first dimension table of the updated data according to the update data, the initial dimension table and the historical data; the extraction unit is used to respond to the query request sent by the client and extract the query data information in the query request; the third acquisition unit is used to acquire the query data based on the updated data, the first dimension table and the query data information; the transmission unit is used to transmit the query data to the client. The data can be classified and stored independently according to different levels. Each level is stored in the initial dimension table according to the hierarchical relationship, so as to facilitate the organization and management of data. At the same time, the storage of the updated data is allowed, that is, the storage structure is automatically adjusted according to the data changes. It can ensure that the updated data can use the latest business logic and data structure to maintain the efficient data processing capability of the product. The data processing device responds to the query request sent by the client, extracts the query data information in the query request; obtains the query data based on the updated data, the first dimension table and the query data information, and transmits the query data to the client. By introducing the association reference query mechanism, a relationship model between data can be established through the updated data, the first dimension table and the query data information, so as to realize the fast association query of multi-level data. When summarizing and displaying data, it can automatically identify and associate data at different levels, reduce manual intervention, and improve the query response speed.
[0025] In a third aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method as described in any one of the above technical solutions are implemented.
[0026] An electronic device provided in the present application can implement the data processing method in any of the above-mentioned technical solutions. Therefore, the electronic device has the advantages of the data processing method in any of the above-mentioned technical solutions and can implement the technical effects of the data processing method in any of the above-mentioned technical solutions. To avoid repetition, it will not be repeated here.
[0027] In a fourth aspect of the present invention, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the data processing method in any of the above technical solutions are implemented.
[0028] The present application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, a data processing method as in any of the above-mentioned technical solutions is implemented. Therefore, the readable storage medium has the advantages of the data processing method in any of the above-mentioned technical solutions and can achieve the technical effects of the data processing method in any of the above-mentioned technical solutions. To avoid repetition, it will not be repeated here.
[0029] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0031] Figure 1 is one of the flow charts of a data processing method according to an embodiment of the present invention;
[0032] Figure 2 A structural block diagram of a data processing device according to an embodiment of the present invention is shown;
[0033] Figure 3 A structural block diagram of an electronic device according to an embodiment of the present invention is shown;
[0034] Figure 4 This is a second flowchart of a data processing method according to an embodiment of the present invention;
[0035] Figure 5 One of the process schematic diagrams of a data processing method according to an embodiment of the present invention is shown;
[0036] Figure 6 A second process schematic diagram of a data processing method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0037] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0038] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0039] Refer to the following Figures 1 to 6A data processing method, an apparatus, an electronic device, and a readable storage medium according to some embodiments of the present invention are described.
[0040] like Figure 1 As shown, in an embodiment of the present invention, a data processing method is provided, the data processing method is used for a server, and the data processing method includes:
[0041] Step 102, receiving update data and update data request sent by the client;
[0042] Step 104, acquiring historical data and an initial dimension table of the historical data according to the data update request;
[0043] Step 106, obtaining updated data and a first dimension table of the updated data according to the updated data, the initial dimension table and the historical data;
[0044] Step 108, responding to the query request sent by the client, and extracting the query data information in the query request;
[0045] Step 110, based on the updated data, the first dimension table and the query data information, obtain the query data, and transmit the query data to the client.
[0046] The present application provides a data processing method, which is used in a server, and includes: receiving update data and update data requests sent by a client; obtaining historical data and an initial dimension table of historical data according to the update data request; obtaining updated data and a first dimension table of updated data according to the update data, the initial dimension table and the historical data, and the data can be classified and stored independently according to different levels. Each level is stored in the initial dimension table according to the hierarchical relationship, which is convenient for organizing and managing data. At the same time, the data processing method allows the storage of updated data, that is, the storage structure is automatically adjusted according to data changes. It can ensure that the updated data can use the latest business logic and data structure to maintain the efficient data processing capability of the product. The data processing method responds to the query request sent by the client, extracts the query data information in the query request; based on the updated data, the first dimension table and the query data information, obtains the query data, and transmits the query data to the client. By introducing an associated reference query mechanism, a relationship model between data can be established through the updated data, the first dimension table and the query data information, so as to realize a fast associated query of multi-level data. When summarizing and displaying data, it can automatically identify and associate data of different levels, reduce manual intervention, and improve the query response speed.
[0047] This embodiment provides a data processing method. In addition to the technical features of the above embodiments, this embodiment further includes the following technical features.
[0048] Based on the updated data, the first dimension table and the query data information, query data is obtained, including: based on the first dimension table and the query data information, query data level is obtained; according to the query data level and the updated data, query data is obtained.
[0049] In this embodiment, based on the updated data, the first dimension table and the query data information, the query data is obtained, including: based on the first dimension table and the query data information, the query data level is obtained; according to the query data level and the updated data, the query data is obtained. The introduction of the associated reference query mechanism can realize the fast associated query of multi-level data through the hierarchical relationship of the data, thereby improving the query response speed.
[0050] This embodiment provides a data processing method. In addition to the technical features of the above embodiments, this embodiment further includes the following technical features.
[0051] Based on the updated data, the first dimension table and the query data information, query data is obtained, including: obtaining the data query frequency according to the query data information and the updated data; obtaining the data update cycle and the data to be cleared based on the data query frequency and the updated data; deleting the data to be cleared in the updated data based on the data update cycle to obtain the first stored data; querying the first stored data according to the query data information and the first dimension table to obtain the query data.
[0052] In this embodiment, query data is obtained based on the updated data, the first dimension table and the query data information, including: obtaining the data query frequency based on the query data information and the updated data; obtaining the data update cycle and the data to be cleared based on the data query frequency and the updated data; deleting the data to be cleared in the updated data based on the data update cycle to obtain the first stored data; and querying the first stored data based on the query data information and the first dimension table to obtain the query data. In this way, the query and use of data can be regularly analyzed to extract the data to be cleared that is no longer needed, and redundant information can be eliminated in time to reduce storage costs.
[0053] This embodiment provides a data processing method. In addition to the technical features of the above embodiments, this embodiment further includes the following technical features.
[0054] Based on the data query frequency and the updated data, the data update cycle and the data to be cleared are obtained, including: responding to a preset request sent by the client to obtain a preset frequency threshold; based on the data query frequency and the updated data, obtaining the layer query frequency of each layer in the updated data; marking the layer whose layer query frequency is less than or equal to the preset frequency threshold as a layer to be cleared to obtain the layer to be cleared; based on the updated data and the layer to be cleared, obtaining the data to be cleared.
[0055] In this embodiment, obtaining the data update cycle and the data to be cleared includes: responding to a preset request sent by a client to obtain a preset frequency threshold; based on the data query frequency and the updated data, obtaining the layer query frequency of each layer in the updated data; marking the layer whose layer query frequency is less than or equal to the preset frequency threshold as a layer to be cleared to obtain the layer to be cleared; based on the updated data and the layer to be cleared, obtaining the data to be cleared. By regularly analyzing the data usage in the updated data, identifying the layers to be cleared that are no longer needed, and clearing the data to be cleared in the layers in a timely manner, the storage cost can be further reduced.
[0056] This embodiment provides a data processing method. In addition to the technical features of the above embodiments, this embodiment further includes the following technical features.
[0057] According to the updated data, the initial dimension table and the historical data, the updated data and the first dimension table of the updated data are obtained, including: according to the updated data, the second hierarchical relationship is obtained; according to the second hierarchical relationship and the historical data, the updated data is stored hierarchically in the historical data to obtain the updated data; according to the second hierarchical relationship, the initial dimension table and the updated data, the first dimension table of the updated data is obtained.
[0058] In this embodiment, updated data and the first dimension table of updated data are obtained according to the updated data, the initial dimension table and the historical data, including: obtaining the second hierarchical relationship according to the updated data, that is, obtaining the hierarchical relationship of the updated data to be updated, storing the updated data hierarchically in the historical data according to the second hierarchical relationship and the historical data to obtain the updated data; adopting a dynamic data model update mechanism, the data processing method can allow data updates and automatically adjust the storage structure and query method. It can ensure that the updated data always uses the latest business logic and data structure to maintain the product's efficient data processing capabilities. At the same time, according to the second hierarchical relationship, the initial dimension table and the updated data, the first dimension table of the updated data is obtained to implement the update of the dimension table, which is convenient for fast associative query of multi-level data through associative reference query.
[0059] This embodiment provides a data processing method. In addition to the technical features of the above embodiments, this embodiment further includes the following technical features.
[0060] After query data is acquired based on the updated data, the first dimension table and the query data information, and the query data is transmitted to the client, the data processing method further includes: receiving a data display request sent by the client, extracting display data information in the data display request; acquiring multiple display data levels according to the display data information and the first dimension table; acquiring multiple display data according to the display data levels and the updated data; acquiring a display report according to the display data information and the multiple display data, so that the client displays the display report.
[0061] In this embodiment, after obtaining query data based on updated data, the first dimension table and query data information, and transmitting the query data to the client, the data processing method also includes: receiving a data display request sent by the client, extracting display data information in the data display request; obtaining multiple display data levels according to the display data information and the first dimension table; obtaining multiple display data according to the display data level and the updated data; obtaining a display report according to the display data information and the multiple display data, so that the client displays the display report. The client can provide an intuitive and easy-to-use user interface, allowing the user to customize data storage and query settings according to actual needs. The user can easily configure a multi-level structure and select a suitable query method to meet the needs of different roles. After querying the data through the data processing method, the display report can be obtained according to the display data information and the multiple display data, so that the client displays the display report, so that the customer can intuitively understand the specific situation of the data.
[0062] This embodiment provides a data processing method. In addition to the technical features of the above embodiments, this embodiment further includes the following technical features.
[0063] Obtaining a display report according to display data information and multiple display data, including: aggregating multiple display data into an initial display report; obtaining a report page template according to the display data information; rendering the initial display report through the report page template based on the display data information to obtain the display report.
[0064] In this embodiment, obtaining a display report according to display data information and multiple display data includes: aggregating multiple display data into an initial display report; obtaining a report page template according to the display data information; and rendering the initial display report through the report page template based on the display data information to obtain the display report. When performing data aggregation and display, the data processing method renders the display report and presents it to the client through the client to improve practicality.
[0065] like Figure 2As shown, in an embodiment of the present invention, a data processing device 200 is provided, comprising: a receiving unit 210, a first acquiring unit 220, a second acquiring unit 222, an extracting unit 230, a third acquiring unit 223 and a transmitting unit 240. The receiving unit 210 is used to receive update data and update data requests sent by a client; the first acquiring unit 220 is used to acquire historical data and an initial dimension table of historical data according to the update data request; the second acquiring unit 222 is used to acquire updated data and a first dimension table of updated data according to the update data, the initial dimension table and the historical data; the extracting unit 230 is used to respond to a query request sent by a client and extract query data information in the query request; the third acquiring unit 223 is used to acquire query data based on the updated data, the first dimension table and the query data information; and the transmitting unit 240 is used to transmit the query data to the client.
[0066] A data processing device 200 provided in the present application includes: a receiving unit 210, a first acquisition unit 220, a second acquisition unit 222, an extraction unit 230, a third acquisition unit 223 and a transmission unit 240. Through the receiving unit 210, the update data and the update data request sent by the client can be received, so as to facilitate the work according to the request of the client. The first acquisition unit 220 is used to obtain the historical data and the initial dimension table of the historical data according to the update data request, and the acquisition of the association table can be completed to improve the efficiency of subsequent queries; the second acquisition unit 222 is used to obtain the updated data and the first dimension table of the updated data according to the update data, the initial dimension table and the historical data; the extraction unit 230 is used to respond to the query request sent by the client and extract the query data information in the query request; the third acquisition unit 223 is used to obtain the query data based on the updated data, the first dimension table and the query data information; the transmission unit 240 is used to transmit the query data to the client. The data can be classified and stored independently according to different levels. Each level is stored in the initial dimension table according to the hierarchical relationship, which is convenient for organizing and managing data. At the same time, it allows the storage of updated data, that is, automatically adjusts the storage structure according to data changes. It can ensure that the updated data can use the latest business logic and data structure to maintain the product's efficient data processing capabilities. The data processing device 200 responds to the query request sent by the client, extracts the query data information in the query request; based on the updated data, the first dimension table and the query data information, obtains the query data, and transmits the query data to the client. By introducing the associated reference query mechanism, a relationship model between data can be established through the updated data, the first dimension table and the query data information, so as to realize fast associated query of multi-level data. When summarizing and displaying data, it can automatically identify and associate data at different levels, reduce manual intervention, and improve query response speed.
[0067] like Figure 3As shown, in an embodiment of the present invention, an electronic device 300 is provided, including a processor 304 and a memory 302, wherein the memory 302 stores programs or instructions that can be executed on the processor 304, and when the programs or instructions are executed by the processor 304, the steps of the method in any one of the above embodiments are implemented.
[0068] An electronic device 300 provided in the present application can implement the data processing method in any of the above-mentioned embodiments. Therefore, the electronic device 300 has the advantages of the data processing method in any of the above-mentioned embodiments and can implement the technical effects of the data processing method in any of the above-mentioned technical solutions. To avoid repetition, it will not be repeated here.
[0069] In an embodiment of the present invention, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the data processing method in any of the above embodiments are implemented.
[0070] The present application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, a data processing method as in any of the above embodiments is implemented. Therefore, the readable storage medium has the advantages of the data processing method in any of the above embodiments and can achieve the technical effects of the data processing method in any of the above embodiments. To avoid repetition, it will not be described here.
[0071] Specifically, as shown in Table 1-1 below, the updated data may be table data, which includes whether the row of data in the table is the primary key of the table. The primary key is a unique identifier for each record in the table, which is used to ensure the uniqueness and integrity of each record. The field name identity, id (identity identifier) is of type Long (long integer data type), with a length of 20 characters, and is a required field. It is not allowed to be empty, and is the data primary key in the data; pro_class (material category) is not the data primary key in the data, is of type varchar (variable-length character data type), has a character length of 50, and is a required field. It is not allowed to be empty; pro1_class (first-level classification) is not the data primary key in the data, is of type varchar (variable-length character data type), has a character length of 50, and is a required field. It is not allowed to be empty; pro2_class (secondary classification) is not the data primary key in the data, is of type varchar (variable-length character data type), has a character length of 50, and is a required field. It is not allowed to be empty; pro3_class (tertiary classification) is not the data primary key in the data, is of type varchar (variable-length character data type), has a character length of 50, and is a required field. It is not allowed to be empty; It is not the primary key of the data, the type is varchar (variable-length character data type), the character length is 50, and it is a required field, and it is not allowed to be empty; key_pro_class (business category name, business storage reference), that is, business category ID and business storage reference, is of type Long (long integer data type), with a length of 20 characters, and it is a required field, and it is not allowed to be empty; key_pro1_class (first-level category ID), type is Long (long integer data type), with a length of 20 characters, and it is a required field, and it is not allowed to be empty; key_pro2_class (second-level category ID), type is Long (long integer data type), with a length of 20 characters, and it is a required field, and it is not allowed to be empty; key_pro3_class (third-level category ID), type is Long (long integer data type), with a length of 20 characters, and it is a required field, and it is not allowed to be empty; pubts (time), the field type is timestamps (timestamp) type is Long (long integer data type), with a length of 20 characters, and it is a required field, and it is not allowed to be empty.
[0072] Table 1-1
[0073]
[0074] In one embodiment of the present application, after the data in the above Table 1-1 is stored in layers, the stored data association table is the following Table 1-2, where the data with identity,id (identity identifier) is 1: the material classification is communication equipment, the first category classification is mobile phone, the second category classification is brand A mobile phone, the third category classification is touch screen mobile phone, the material classification ID is 1, the first category ID is 11, the second category ID is 111, the third category ID is 1111, and the timestamp is 2024 / 8 / 16 13:30:01;
[0075] In the data with identity,id (identity identifier) of 2: the material classification is communication equipment, the first classification is mobile phone, the second classification is brand A mobile phone, the third classification is flip phone, the material classification ID is 1, the first classification ID is 11, the second classification ID is 111, the third classification ID is 1112, and the timestamp is 2024 / 8 / 1613:30:02;
[0076] In the data with identity,id (identity identifier) 3: the material classification is communication equipment, the first classification is mobile phone, the second classification is brand B mobile phone, the third classification is touch screen mobile phone, the material classification ID is 1, the first classification ID is 11, the second classification ID is 112, the third classification ID is 1111, and the timestamp is 2024 / 8 / 1613:30:03;
[0077] In the data with identity,id (identity identifier) of 4: the material classification is communication equipment, the first category classification is router, the second category classification is brand C router, the third category classification is coverage of 10 meters, the material classification ID is 1, the first category ID is 22, the second category ID is 221, the third category ID is 2211, and the timestamp is 2024 / 8 / 1614:13:26;
[0078] In the data with identity,id (identity identifier) of 5: the material classification is communication equipment, the first category classification is router, the second category classification is brand D router, the third category classification is coverage of 30 meters, the material classification ID is 1, the first category ID is 22, the second category ID is 222, the third category ID is 2212, and the timestamp is 2024 / 8 / 1614:13:06;
[0079] In the data with identity,id (identity identifier) of 6: the material classification is communication equipment, the first category classification is router, the second category classification is brand E router, the third category classification is coverage of 50 meters, the material classification ID is 1, the first category ID is 22, the second category ID is 223, the third category ID is 2213, and the timestamp is 2024 / 8 / 1614:13:09;
[0080] In the data with identity,id (identity identifier) of 7: the material classification is household appliances, the first category classification is washing machines, the second category classification is brand F washing machines, the third category classification is fully automatic, the material classification ID is 2, the first category ID is 33, the second category ID is 331, the third category ID is 3311, and the timestamp is 2024 / 8 / 1614:19:08;
[0081] In the data with identity,id (identity identifier) of 8: the material classification is household appliances, the first category classification is washing machines, the second category classification is brand G washing machines, the third category classification is semi-automatic, the material classification ID is 2, the first category ID is 33, the second category ID is 332, the third category ID is 3312, and the timestamp is 2024 / 8 / 1614:21:07;
[0082] In the data with identity,id (identity identifier) of 9: the material classification is household appliances, the first category classification is television, the second category classification is brand H television, the third category classification is high-definition 4K, the material classification ID is 2, the first category ID is 44, the second category ID is 441, the third category ID is 4411, and the timestamp is 2024 / 8 / 1614:23:05;
[0083] In the data where identity,id (identity identifier) is 10: the material classification is household appliances, the first category classification is air conditioners, the second category classification is brand I air conditioners, the third category classification is high-definition 8K, the material classification ID is 2, the first category ID is 55, the second category ID is 551, the third category ID is 5511, and the timestamp is 2024 / 8 / 1614:25:15.
[0084] Table 1-2
[0085]
[0086]
[0087] like Figure 4 As shown, in one embodiment of the present application, the steps of the data processing method may also include:
[0088] Step 401, responding to the storage request of the client, and acquiring historical data according to the storage request;
[0089] Step 402, obtaining an initial dimension table of the historical data according to the historical data, and storing the historical data in layers according to the initial dimension table of the historical data;
[0090] Step 403, responding to the update request from the client, and obtaining update data according to the update request;
[0091] Step 404, obtaining updated data and a first dimension table of the updated data according to the updated data, the initial dimension table and the historical data;
[0092] Step 405, responding to the query request sent by the client, and extracting the query data information in the query request;
[0093] Step 406, based on the updated data, the first dimension table and the query data information, the query data is obtained, and the query data is transmitted to the client so that the client displays the query data.
[0094] like Figure 5 As shown, after responding to the client's storage request, according to the storage request, in the step of obtaining historical data, the client can input the instructions for storing and managing data through the client's configuration and management interface 510. Through data configuration, the historical data can be stored in layers according to the initial dimension table, that is, the multi-level dimension storage unit stores the data, and the data will be stored in the multi-level dimension storage unit 520. The stored data is updated by the dynamic data model update mechanism 530 through Extract transformload, ETL (data extraction, transformation and loading process). The client can query the data required by the customer by referring to the query mechanism 540, thereby improving the data query efficiency. Based on the query data information and query data, the training model generates an intelligent data processing engine, and through the intelligent data processing engine configuration and management interface 550, it is realized to automatically identify data at different levels and select the best data processing strategy. At the same time, the engine supports real-time analysis and processing of data, and can quickly respond to changes in business needs. Finally, the query data that the customer needs to query is summarized and sent to the client, and the client displays the query data through the visual display 560.
[0095] Specifically, Figure 6As shown, in the dynamic data model update mechanism 530, the operation process of the data is to receive the update data request sent by the client, obtain the updated data and the first dimension table of the updated data according to the updated data, the initial dimension table and the historical data, that is, the classification dimension change, and change the storage model of the historical data through the model change translation. The data will identify the structured query language, SQL (Structured Query Language) type of the data in the dynamic data model update mechanism, and update the Extract transform load, etl (data extraction, transformation and loading process) task, which includes Data manipulation language, DML (Data Operation Language) to insert, delete, update and retrieve data. At the same time, the Data definition language, DDL (Data Definition Language) is applied to change the storage structure of the historical data, and the historical data in the Extract transform load, ETL (data extraction, transformation and loading process) task is synchronized to achieve data update.
[0096] In the claims, specification and drawings of the present invention, the term "multiple" refers to two or more than two. Unless otherwise clearly defined, the orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the drawings, which is only for the purpose of more conveniently describing the present invention and making the description process simpler, rather than indicating or implying that the device or element referred to must have the specific orientation described, be constructed and operated in a specific orientation, so these descriptions cannot be understood as limiting the present invention; the terms "connect", "install", "fix" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection between multiple objects, or a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects, or an indirect connection between multiple objects through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood based on the specific circumstances of the above data.
[0097] In the claims, specification and drawings of the present invention, the description of the terms "one embodiment", "some embodiments", "specific embodiments" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In the claims, specification and drawings of the present invention, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: The data processing method is used for a server, and the data processing method comprises: Receive update data and update data request sent by the client; According to the data update request, historical data and an initial dimension table of the historical data are obtained; Acquire updated data and a first dimension table of the updated data according to the updated data, the initial dimension table and the historical data; Responding to the query request sent by the client, and extracting the query data information in the query request; Based on the updated data, the first dimension table and the query data information, query data is acquired, and the query data is transmitted to the client.
2. The data processing method according to claim 1, characterized in that: The acquiring query data based on the updated data, the first dimension table and the query data information includes: Based on the first dimension table and the query data information, obtaining a query data level; According to the query data level and the updated data, query data is acquired.
3. The data processing method according to claim 1, characterized in that: The acquiring query data based on the updated data, the first dimension table and the query data information includes: Acquire data query frequency according to the query data information and the updated data; Based on the data query frequency and the updated data, obtaining a data update cycle and data to be cleared; Based on the data update cycle, deleting the data to be cleared in the updated data to obtain first stored data; The first stored data is queried according to the query data information and the first dimension table to obtain query data.
4. The data processing method according to claim 3, characterized in that: The acquiring of the data update cycle and the data to be cleared based on the data query frequency and the updated data includes: Responding to a preset request sent by the client, obtaining a preset frequency threshold; Based on the data query frequency and the updated data, obtaining the hierarchical query frequency of each hierarchical level in the updated data; Marking a level whose level query frequency is less than or equal to the preset frequency threshold as a level to be cleared, so as to obtain the level to be cleared; Based on the updated data and the level to be cleared, the data to be cleared is acquired.
5. The data processing method according to claim 1, characterized in that: The acquiring, according to the updated data, the initial dimension table and the historical data, the updated data and the first dimension table of the updated data comprises: According to the updated data, obtaining a second-level relationship; According to the second hierarchical relationship and the historical data, the updated data is stored hierarchically in the historical data to obtain updated data; According to the second hierarchical relationship, the initial dimension table and the updated data, a first dimension table of the updated data is obtained.
6. The data processing method according to any one of claims 1 to 5, characterized in that: After acquiring query data based on the updated data, the first dimension table and the query data information and transmitting the query data to the client, the data processing method further includes: Receive a data display request sent by the client, and extract display data information in the data display request; Acquire multiple display data levels according to the display data information and the first dimension table; Acquire multiple display data according to the display data level and the updated data; A presentation report is obtained according to the presentation data information and the plurality of presentation data, so that the client displays the presentation report.
7. The data processing method according to claim 6, characterized in that: The obtaining of a display report according to the display data information and the plurality of display data includes: Aggregate multiple impression data into an initial impression report; According to the display data information, obtain a report page template; Based on the display data information, the initial display report is rendered through the report page template to obtain the display report.
8. A data processing device, characterized in that: include: A receiving unit, used for receiving update data and update data request sent by the client; A first acquisition unit, configured to acquire historical data and an initial dimension table of the historical data according to the data update request; A second acquisition unit, configured to acquire updated data and a first dimension table of the updated data according to the updated data, the initial dimension table and the historical data; An extraction unit, used to respond to the query request sent by the client and extract the query data information in the query request; A third acquisition unit, acquiring query data based on the updated data, the first dimension table and the query data information; A transmission unit is used to transmit the query data to the client.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.