Data processing method, device and system
By traversing the original data in the data processing system to obtain statistical dimensions and indicators, and performing data statistics, it solves the problem of flexible and changeable statistical requirements in the data lake, improves the efficiency of data query and resource utilization, and satisfies users' real-time demand for data. sexual needs.
Patent Information
- Application Number
- CN202110702422.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-24
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-06-24
AI Technical Summary
The statistical requirements of data in the data lake are flexible and changeable, which leads to difficulty in computing and analysis. Especially when the data volume is large, querying statistical results consumes a lot of resources and is inefficient, which cannot meet the real-time needs of users for data, affecting user experience and satisfaction.
By traversing all fields in the received original data, at least one statistical dimension is obtained, and corresponding statistical indicators are determined based on the statistical dimensions and association rules, data statistics are performed, and statistical results are obtained to serve as source data for data query requests.
The efficiency of statistical analysis has been improved, the complicated calculations of raw data have been reduced, the resource utilization rate has been improved, the real -time demand for data has been met, and the user experience and satisfaction are improved.
Smart Images

Figure CN113392128B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device and system. Background Art
[0002] In related technologies, data from various data providers are collected in the data lake. However, different users focus on different aspects, and therefore have different requirements for data statistics. The flexibility and diversity of statistical dimensions make calculation and analysis difficult. Especially when the amount of data is large, querying statistical results requires a lot of resources, and the efficiency of data processing is low, which cannot meet the user's real-time needs for data, seriously affecting the user experience and satisfaction. Summary of the invention
[0003] The present invention provides a data processing method, device and system to solve the deficiencies in the related art.
[0004] According to a first aspect of an embodiment of the present invention, there is provided a data processing method, which is applied to a server, and the method includes:
[0005] Receive raw data;
[0006] Traversing all fields in the original data to obtain at least one statistical dimension; the statistical dimension corresponds to the field;
[0007] For each of the statistical dimensions, a corresponding statistical indicator is determined according to the statistical dimension and an association rule, wherein the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator;
[0008] Data statistics are performed according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, and the statistical results are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension.
[0009] In one embodiment, there are association relationships between some of the at least one statistical dimension; the association rule also includes the association relationship between the some statistical dimensions; the some statistical dimensions include high-level statistical dimensions and low-level statistical dimensions, and the low-level statistical dimensions are subordinate to the high-level statistical dimensions;
[0010] The performing data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results includes:
[0011] For the low-level statistical dimension, data statistics are performed according to the low-level statistical dimension and the corresponding statistical indicator to obtain the corresponding low-level statistical result;
[0012] According to the association relationship between the low-level statistical results and some statistical dimensions, high-level statistical results of high-level statistical dimensions are obtained;
[0013] The low-level statistical results and the high-level statistical results are folded to perform hierarchical display.
[0014] In one embodiment, all the fields include a time field; the association rule also includes a time granularity;
[0015] The performing data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results includes:
[0016] Data statistics are performed according to the statistical dimension, the statistical indicator and the time granularity to obtain corresponding statistical results.
[0017] In one embodiment, the time granularity includes a high-level time granularity and a low-level time granularity; the high-level time granularity is greater than the low-level time granularity; the association rule also includes a relationship between the high-level time granularity and the low-level time granularity;
[0018] The performing data statistics according to the statistical dimension, the statistical indicator and the time granularity to obtain corresponding statistical results includes:
[0019] Perform data statistics according to the statistical dimension, the statistical indicator and the low-level time granularity to obtain a small-granularity statistical result;
[0020] The large-granularity statistical result corresponding to the high-level time granularity is obtained according to the relationship between the small-granularity statistical result, the high-level time granularity and the low-level time granularity.
[0021] In one embodiment, the data processing method further includes:
[0022] Analyze the statistical results to obtain analysis results;
[0023] When it is determined according to the analysis result that an abnormal situation exists, a prompt message is output, where the prompt message is used to prompt the abnormal situation and / or provide suggestions for improving the abnormal situation.
[0024] According to a second aspect of an embodiment of the present invention, a data processing method is provided, which is applied to an application end, and the method includes:
[0025] Receiving a data query request input by a user; the data query request includes a statistical dimension;
[0026] Obtain corresponding statistical results from the server according to the statistical dimension; wherein, after receiving the original data, the server traverses all fields in the original data to obtain at least one statistical dimension, the statistical dimension corresponds to the field, and for each of the statistical dimensions, determines a corresponding statistical indicator according to the statistical dimension and an association rule, the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator, and performs data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, the statistical results are used as source data for querying data after receiving a data query request, the data query request includes the statistical dimension;
[0027] Data display is performed based on the statistical results.
[0028] According to a third aspect of an embodiment of the present invention, there is provided a data processing method, which is applied to a terminal device, and the method includes:
[0029] Collect raw data;
[0030] The original data is sent to a server, wherein after receiving the original data, the server traverses all fields in the original data to obtain at least one statistical dimension, wherein the statistical dimension corresponds to the field, and for each statistical dimension, a corresponding statistical indicator is determined according to the statistical dimension and an association rule, wherein the association rule includes a correspondence between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, wherein the statistical results are used as source data for querying data after receiving a data query request, wherein the data query request includes the statistical dimension.
[0031] According to a fourth aspect of an embodiment of the present invention, there is provided a data processing device, which is applied to a server, and the device includes:
[0032] A first receiving module is configured to receive original data;
[0033] A query module is configured to traverse all fields in the original data to obtain at least one statistical dimension; the statistical dimension corresponds to the field;
[0034] A first determination module is configured to determine, for each of the statistical dimensions, a corresponding statistical indicator according to the statistical dimension and an association rule, wherein the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator;
[0035] The first acquisition module is configured to perform data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, and the statistical results are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension.
[0036] According to a fifth aspect of an embodiment of the present invention, there is provided a data processing device, which is applied to an application end, and the device includes:
[0037] A second receiving module is configured to receive a data query request input by a user; the data query request includes a statistical dimension;
[0038] A second acquisition module is configured to acquire corresponding statistical results from the server according to the statistical dimension; wherein, after receiving the original data, the server traverses all fields in the original data to acquire at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, determines a corresponding statistical indicator according to the statistical dimension and an association rule, the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator, and performs data statistics according to the statistical dimension and the statistical indicator to acquire corresponding statistical results, the statistical results are used as source data for querying data after receiving a data query request, the data query request includes the statistical dimension;
[0039] The display module is configured to display data according to the statistical results.
[0040] According to a sixth aspect of an embodiment of the present invention, there is provided a data processing apparatus, applied to a terminal device, the apparatus comprising:
[0041] An acquisition module configured to acquire raw data;
[0042] A sending module is configured to send the original data to a server, wherein after receiving the original data, the server traverses all fields in the original data to obtain at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, a corresponding statistical indicator is determined according to the statistical dimension and an association rule, the association rule includes a correspondence between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, which are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension.
[0043] According to a seventh aspect of an embodiment of the present invention, there is provided a data processing system, comprising the data processing device described in the fourth aspect, the data processing device described in the fifth aspect, and the data processing device described in the sixth aspect.
[0044] According to an eighth aspect of an embodiment of the present invention, there is provided a data processing device, comprising a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to implement the above method.
[0045] According to a ninth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0046] According to the above embodiment, by traversing all the fields in the received raw data, at least one statistical dimension is obtained, and the statistical dimension corresponds to the field. For each statistical dimension, the corresponding statistical indicator is determined according to the statistical dimension and the association rule, wherein the association rule includes the correspondence between the statistical dimension and the statistical indicator. Then, data statistics are performed according to the statistical dimension and the statistical indicator to obtain the corresponding statistical result, and the statistical result is used as the source data for querying the data after receiving the data query request, and the data query request includes the statistical dimension. In this way, before receiving the data query request, data statistics are first performed according to the statistical dimension and the statistical indicator to obtain the corresponding statistical result, which is used as the source data for querying the data after receiving the data query request. In this way, no logical operation is required, which can improve the efficiency of statistical analysis, and no complicated calculations are required through the raw data, which can improve resource utilization.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] Figure 1 It is a structural schematic diagram of a data processing system according to an embodiment of the present invention.
[0050] Figure 2 The figure is a flow chart showing a data processing method according to an embodiment of the present invention.
[0051] Figure 3 is a flow chart of another data processing method according to an embodiment of the present invention.
[0052] Figure 4 is a flow chart of another data processing method according to an embodiment of the present invention.
[0053] Figure 5 is a flow chart of another data processing method according to an embodiment of the present invention.
[0054] Figure 6 is a flow chart of another data processing method according to an embodiment of the present invention.
[0055] Figure 7is a flow chart of another data processing method according to an embodiment of the present invention.
[0056] Figure 8 It is a schematic diagram of the structure of a data processing device according to an embodiment of the present invention.
[0057] Fig. 9 It is a schematic diagram of the structure of another data processing device according to an embodiment of the present invention.
[0058] Fig.10 It is a schematic diagram of the structure of another data processing device according to an embodiment of the present invention.
[0059] Fig.11 It is a structural block diagram of a data processing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0061] Before introducing the data processing method in the embodiment of the present invention, the application scenario of the data processing method is first introduced. In this application scenario, Figure 1 As shown, the data processing system includes a server 11, an application 12 and a terminal device 13. The terminal device 13 is connected to the server 11 in communication, and the server 11 is connected to the application 12 in communication. Among them, the terminal device 13 can be a terminal device for detecting health indicators in a health hut, for example, the terminal device can be a sphygmomanometer, a blood glucose meter or a sleep meter. The raw data collected by the terminal device 13 can be uploaded to the server 11. The server 11 performs statistics on the received raw data to obtain statistical results as the source data of the query data. The application end 12 is a terminal device for users to query data in the health hut. The application end 12 can also be used to receive prompt information sent by the server 11 for the administrator to view. The application end 12 and the terminal device 13 in multiple health huts can be connected to the same server 11. Multiple health huts can be distributed in different regions, for example, in different provinces, cities or districts.
[0062] The embodiment of the present invention provides a data processing method, which is applied to a server 11 .
[0063] like Figure 2 As shown, the following steps 201 to 204 are included:
[0064] In step 201, original data is received.
[0065] In this embodiment, the server 11 receives and stores the raw data sent by the terminal device 13. The raw data is the data collected by the terminal device 13. The structure of the raw data collected by different terminal devices 13 may be different or the same. For example, the terminal device 13 is a sphygmomanometer, and the raw data collected by the sphygmomanometer may be as shown in Table 1.
[0066] Table 1
[0067]
[0068] Among them, the user ID (code) is 93842938, the device SN (serial number) is 19C032001, the SBP (systolic blood pressure) is 168, the DBP (diastolic blood pressure) is 112, the AverageValue is 100, the PulseRate is 73, and the DetectionTime is 2015-10-21 08:38:23.
[0069] In this embodiment, the server 11 is configured with a data lake. The server 11 stores the received raw data in the data lake.
[0070] In step 202, all fields in the original data are traversed to obtain at least one statistical dimension; the statistical dimension corresponds to the field.
[0071] In this embodiment, the server 11 traverses all fields in the received raw data to obtain the statistical dimension corresponding to each field. For example, the fields of the raw data in Table 1 include user ID, device SN, SBP, DBP, AverageValue, PulseRate, and DetectionTime.
[0072] In this embodiment, the server 11 can perform data conversion on the received raw data to convert the raw data into a preset data structure, and then traverse all fields in the raw data to obtain at least one statistical dimension. For example, the server 11 performs data conversion on the raw data shown in Table 1 to obtain the data shown in Table 2.
[0073] Table 2
[0074] User ID Equipment SN Indicator Code value Upload time 93842938 19C032001 ZB000001 168 2015-10-21 08:38:23 93842938 19C032001 ZB000002 112 2015-10-21 08:38:23 93842938 19C032001 ZB000003 73 2015-10-21 08:38:23
[0075] Among them, the index code for systolic blood pressure is ZB000001, the index code for diastolic blood pressure is ZB000002, and the index code for pulse rate is ZB000003.
[0076] In this embodiment, before step 202, the server 11 can generate metadata for each dimension according to the dimension setting operation input by the administrator. The metadata is a data dictionary including a code (ID) and a name (NAME) definition.
[0077] In this embodiment, the dimensions may include product, product type, equipment, indicator, application, region (province, city, district), organization (level), user, sending, receiving, gender, age, and process link, but are not limited thereto.
[0078] In this embodiment, the metadata of the product may be as shown in Table 3.
[0079] Table 3
[0080] ID NAME CP000001 Pulse Wave Blood Pressure Monitor CP000002 Omron blood pressure monitor CP000003 GSM Blood Glucose Meter CP000004 MagiSleep Smart Sleep Device
[0081] In this embodiment, the metadata of the product type may be as shown in Table 4.
[0082] Table 4
[0083]
[0084]
[0085] In this embodiment, the metadata of the statistical indicators may be as shown in Table 5, but is not limited thereto.
[0086] Table 5
[0087] ID NAME ZB000001 Systolic blood pressure ZB000002 Diastolic blood pressure ZB000003 Fasting blood sugar ZB000004 Blood sugar 1 hour after meal ZB000005 Blood sugar 2 hours after meal
[0088] Among them, 1h means 1 hour and 2h means 2 hours.
[0089] In step 203, for each statistical dimension, a corresponding statistical indicator is determined according to the statistical dimension and an association rule, wherein the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator.
[0090] In this embodiment, the server 11 pre-stores the above-mentioned association rules, which include the correspondence between statistical dimensions and statistical indicators. The server 11 can receive the association rule setting operation input by the administrator, and generate the above-mentioned association rules according to the setting operation, and store them. The association rules are a collection of correspondences between different statistical dimensions and statistical indicators.
[0091] In this embodiment, the statistical indicators may include the number of users, the number of indicators, the number of devices, the number of transmissions, the number of receptions and the number of visits, but are not limited thereto.
[0092] In this embodiment, for each statistical dimension, the server 11 can determine the corresponding statistical index according to the statistical dimension and the association rule. For example, for the statistical dimension of blood pressure meter, the corresponding statistical index can include systolic pressure and diastolic pressure, but is not limited thereto.
[0093] In step 204, data statistics are performed according to the statistical dimensions and statistical indicators to obtain corresponding statistical results, which are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimensions.
[0094] In this embodiment, for each statistical dimension, the server 11 can perform data statistics according to the statistical dimension and the statistical index to obtain the corresponding statistical results. That is, each statistical dimension corresponds to a statistical result. The server 11 stores the statistical results corresponding to each statistical dimension. The statistical results can be used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension.
[0095] In this embodiment, after receiving the data query request, the server 11 can parse the data query request, obtain the statistical dimension, and determine the corresponding statistical result based on the statistical dimension. Since the statistical dimension and the corresponding statistical result have been stored in the server 11, no logical operation is required, which can save resources and time, improve the efficiency of data query, meet the user's requirements for real-time data query, and improve user experience and satisfaction.
[0096] In this embodiment, by traversing all the fields in the received raw data, at least one statistical dimension is obtained, the statistical dimension corresponds to the field, and for each statistical dimension, the corresponding statistical indicator is determined according to the statistical dimension and the association rule, wherein the association rule includes the corresponding relationship between the statistical dimension and the statistical indicator, and then, data statistics are performed according to the statistical dimension and the statistical indicator to obtain the corresponding statistical result, which is used as the source data for querying the data after receiving the data query request, and the data query request includes the statistical dimension. In this way, before receiving the data query request, data statistics are first performed according to the statistical dimension and the statistical indicator, and the corresponding statistical result is obtained to serve as the source data for querying the data after receiving the data query request. In this way, no logical operation is required, which can improve the efficiency of statistical analysis, and no complicated calculations are required through the raw data, which can improve resource utilization.
[0097] The embodiment of the present invention also provides a data processing method. Based on the above embodiment, in this embodiment, there is an association relationship between some statistical dimensions in at least one statistical dimension. The above association rule also includes the association relationship between some statistical dimensions. The some statistical dimensions include high-level statistical dimensions and low-level statistical dimensions, and the low-level statistical dimensions are subordinate to the high-level statistical dimensions.
[0098] In this embodiment, when the statistical dimension includes administrative agencies such as province, city, and district, there is an association relationship between the province, city, and district. Compared with the city, the province is a high-level statistical dimension, the city is a low-level statistical dimension, and the city is subordinate to the province. Compared with the district, the city is a high-level statistical dimension, the district is a low-level statistical dimension, and the district is subordinate to the city.
[0099] In this embodiment, when the statistical dimensions include the head office, branches, and third-level institutions, there is an association relationship between the head office, branches, and third-level institutions. Compared with the branches, the head office is a high-level statistical dimension, the branches are a low-level statistical dimension, and the branches are subordinate to the head office. Compared with the third-level institutions, the branches are high-level statistical dimensions, the third-level institutions are low-level statistical dimensions, and the third-level institutions are subordinate to the branches.
[0100] In this embodiment, when the statistical dimensions include equipment and products, there is an association relationship between the equipment and the product, the product is a high-level statistical dimension, and the equipment is a low-level statistical dimension.
[0101] In this embodiment, when the statistical dimensions include products and product types, there is an association relationship between products and product types, product type is a high-level statistical dimension, and product is a low-level statistical dimension.
[0102] In this embodiment, when the statistical dimensions include devices and the number of indicators, there is an association between the devices and the number of indicators, the devices are high-level statistical dimensions, and the number of indicators are low-level statistical dimensions.
[0103] In this embodiment, when the statistical dimension includes an indicator and an indicator type, the indicator is a low-level statistical dimension, and the indicator type is a high-level statistical dimension. The association relationship between the indicator and the indicator type can be shown in Table 6.
[0104] In this embodiment, when the statistical dimensions include equipment, products, and product types, there is an association relationship between equipment, products, and product types. Compared with products, equipment is a low-level statistical dimension, and products are high-level statistical dimensions. Compared with product types, products are low-level statistical dimensions, and product types are high-level statistical dimensions. The association relationship between equipment, products, and product types can be shown in Table 7.
[0105] Table 6
[0106] Indicator Code Indicator name Indicator type code Indicator Type Name ZB000001 Systolic blood pressure ZBLX0001 blood pressure ZB000002 Diastolic blood pressure ZBLX0001 blood pressure ZB000003 Fasting blood sugar ZBLX0002 blood sugar ZB000004 Blood sugar 1 hour after meal ZBLX0002 blood sugar ZB000005 Blood sugar 2 hours after meal ZBLX0002 blood sugar
[0107] Table 7
[0108]
[0109] In this embodiment, when the statistical dimension includes products and indicators, there is an association relationship between the product and the indicator. The product is a high-level statistical dimension, and the indicator is a low-level statistical dimension. The association relationship between the product and the indicator is shown in Table 8.
[0110] Table 8
[0111] Product Code Product Name Indicator Code Indicator name CP000001 Pulse Wave Blood Pressure Monitor ZB000001 Systolic blood pressure CP000001 Pulse Wave Blood Pressure Monitor ZB000002 Diastolic blood pressure CP000002 Omron blood pressure monitor ZB000001 Systolic blood pressure CP000002 Omron blood pressure monitor ZB000002 Diastolic blood pressure
[0112] In this embodiment, the above step 204, such as Figure 3 As shown, the following steps 301 to 303 are included:
[0113] In step 301, for low-level statistical dimensions, data statistics are performed according to the low-level statistical dimensions and corresponding statistical indicators to obtain corresponding low-level statistical results.
[0114] In step 302, high-level statistical results of high-level statistical dimensions are obtained according to the association relationship between low-level statistical results and some statistical dimensions.
[0115] In step 303, the low-level statistical results and the high-level statistical results are folded for hierarchical display.
[0116] In this embodiment, the server 11 performs data statistics according to the low-level statistical dimensions and the corresponding statistical indicators, obtains the corresponding low-level statistical results, and then obtains the high-level statistical results of the high-level statistical dimensions according to the correlation between the low-level statistical results and some statistical dimensions. For example, the statistical results of the city to which it belongs can be obtained by transferring and summarizing data according to the statistical results of multiple districts, and the statistical results of the province to which it belongs can be obtained by transferring and summarizing data according to the statistical results of multiple cities. Then, the server 11 folds the low-level statistical results and the high-level statistical results for hierarchical display. For example, when the server obtains the statistical results of multiple provinces, the statistical results of multiple cities in each province, and the statistical results of multiple districts in each city, the statistical results of multiple provinces can be displayed first, and after the statistical results of one of the provinces are selected, the statistical results of multiple cities in the province can be displayed, and after the statistical results of a city are selected, the statistical results of multiple districts in the city can be displayed. In this way, it is convenient for administrators or users to query statistical results.
[0117] For example, the application end is associated with the province, city, and district, and the application end is associated with the affiliated institution. The equipment is associated with the affiliated application end, and the equipment is associated with the product. The product is associated with the product type, and the product is associated with the indicator, and the indicator is associated with the indicator type. The affiliated application end means that the application end belongs to a certain institution.
[0118] For example, based on the association between provinces and cities, the association between applications and the number of indicators, the association between applications and products, the association between products and product types, the association between products and the number of indicators, and the association between product types and the number of indicators, the server 11 displays the number of application terminals in each province in the first-level view, the number of application terminals in each city under the province in the second-level view, the number of all indicators of each application terminal under the city in the third-level view, and the number of indicators of each product / product type under the application terminal in the fourth-level view.
[0119] In this embodiment, the server 11 may display the aforementioned low-level statistical results and high-level statistical results through the application 12 connected thereto, and may also display the aforementioned low-level statistical results and high-level statistical results through other terminal devices connected thereto.
[0120] The embodiment of the present invention further proposes a data processing method. Based on the above embodiment, in this embodiment, all fields also include a time field. The above association rules also include a time granularity.
[0121] In this embodiment, the attributes of the time granularity include time type, start time and end time. The time types include: total, year, quarter, month, week, day, hour, minute and second. When receiving the raw data specific to the hour, minute and second, it can be automatically transferred to other time granularities.
[0122] In this embodiment, the time granularity can be defined in advance by the administrator. The server 11 receives the setting operation of the administrator to set the time granularity and generates the corresponding time granularity. For example, the definition of the time granularity can be as follows:
[0123]
[0124] In this embodiment, step 204 may include: performing data statistics according to the statistical dimension, statistical index and time granularity, and obtaining corresponding statistical results. For example, data statistics may be performed on a statistical dimension and a corresponding statistical index and a corresponding time granularity to obtain corresponding statistical results. For example, when the time granularity is a year, the statistical result is a statistical result based on the original data of the whole year. In this way, statistics may be performed on the statistical dimension and time granularity to obtain corresponding statistical results.
[0125] In this embodiment, the time granularity may include a high-level time granularity and a low-level time granularity. The high-level time granularity is greater than the low-level time granularity. The association rule also includes the relationship between the high-level time granularity and the low-level time granularity. For example, the time granularity may include: total, year, quarter, month, week, day, hour, minute, and second. The above time granularities are arranged in order, and the levels are reduced in sequence. For example, compared with the year, the total is the high-level time granularity and the year is the low-level time granularity. Compared with the quarter, the year is the high-level time granularity and the quarter is the low-level time granularity.
[0126] In this embodiment, the association rule is a set of corresponding relationships among statistical dimensions, statistical indicators, and time granularity. The association rule may be shown in Table 9.
[0127] Table 9
[0128] Statistical Dimensions Time granularity Statistical indicators index day Number of indicators index moon Number of indicators index Year Number of indicators Indicator Type day Number of indicators Indicator Type moon Number of indicators Indicator Type Year Number of indicators equipment day Number of indicators equipment moon Number of indicators equipment Year Number of indicators product day Number of indicators product moon Number of indicators product Year Number of indicators Product Type day Number of indicators Product Type moon Number of indicators Product Type Year Number of indicators
[0129] In this embodiment, if Figure 4 As shown, step 204 may include the following steps 401-402:
[0130] In step 401, data statistics are performed according to statistical dimensions, statistical indicators, and low-level time granularity to obtain small-granularity statistical results.
[0131] In step 402, a large-granularity statistical result corresponding to the high-level time granularity is obtained according to the relationship between the small-granularity statistical result and the high-level time granularity and the low-level time granularity.
[0132] In this embodiment, the server 11 can perform data statistics according to the statistical dimensions, statistical indicators, and low-level time granularity to obtain small-granularity statistical results, and then, according to the relationship between the small-granularity statistical results and the high-level time granularity and the low-level time granularity, perform data transmission and aggregation on multiple small-granularity statistical results to obtain large-granularity statistical results corresponding to the high-level time granularity. For example, the server 11 can perform data statistics according to the statistical dimensions, statistical indicators, and the four quarters of 2020 to obtain four quarterly statistical results, and then aggregate the four quarterly statistical results to obtain the annual data statistical results for 2020.
[0133] In this embodiment, the server 11 can obtain the statistical results shown in Table 10 according to the association rules.
[0134] Table 10
[0135] Dimensions Time granularity time Number of indicators Indicator - Systolic blood pressure day 2015-10-21 +1 Indicator - Diastolic blood pressure day 2015-10-21 +1 Indicator - Pulse rate day 2015-10-21 +1 Indicator Type-Blood Pressure day 2015-10-21 +3 Indicator Type-Blood Pressure moon 2015-10 +3 Indicator Type-Blood Pressure Year 2015 +3 Equipment-19C032001 day 2015-10-21 +3 Equipment-19C032001 moon 2015-10 +3 Equipment-19C032001 Year 2015 +3 Products-Pulse Wave Blood Pressure Monitor day 2015-10-21 +3 Products-Pulse Wave Blood Pressure Monitor moon 2015-10 +3 Products-Pulse Wave Blood Pressure Monitor Year 2015 +3 Product Type-Sphygmomanometer day 2015-10-21 +3 Product Type-Sphygmomanometer moon 2015-10 +3 Product Type-Sphygmomanometer Year 2015 +3
[0136] In this embodiment, the large-granularity statistical results corresponding to the high-level time granularity are obtained based on the relationship between the obtained small-granularity statistical results and the high-level time granularity and the low-level time granularity, without the need to perform data statistics based on statistical dimensions, statistical indicators and high-level time granularity to obtain large-granularity statistical results. In this way, the statistical efficiency can be improved.
[0137] In this embodiment, the server 11 can generate an indicator trend chart, year-on-year / quarter-on-quarter or TopN (extracting the top N values of the statistical results), etc. according to the statistical request.
[0138] The embodiment of the present invention also proposes a data processing method. Based on the above embodiment, Figure 5As shown, the data processing method further includes the following steps 501-502:
[0139] In step 501, the statistical results are analyzed to obtain analysis results.
[0140] In step 502, when it is determined according to the analysis result that an abnormal situation exists, prompt information is output, and the prompt information is used to prompt the abnormal situation and provide suggestions for improving the abnormal situation.
[0141] In this embodiment, the server 11 may pre-store derivative rules, which are related to statistical dimensions, statistical indicators and time granularity. The server 11 may analyze the statistical results according to the derivative rules, obtain the analysis results, and output prompt information when determining that there is an abnormal situation according to the analysis results. The prompt information is used to prompt the abnormal situation and provide suggestions for improving the abnormal situation.
[0142] For example, the daily user load of a third-level institution is 2000, and the preset upper limit threshold is 2600. When the daily user load of the third-level institution is greater than 2600 in the statistical results, a prompt message is output. The prompt message is used to prompt that the daily user load of the third-level institution is too much, and automatically generate the hourly user load, so that the time-limited flow can be prepared in advance. Among them, the statistical method of the daily user load is that the statistical interval is 00:00:00-23:59:59 every day. As long as the user uploads a piece of data within this time range, the daily user load +1. Or, according to the user ID deduplication calculation, no matter how many pieces of data each user uploads, the daily load is only +1.
[0143] For another example, when the abnormal index rate generated by the equipment in a single day is less than or equal to 20%, the equipment is considered normal. The preset upper limit threshold of the abnormal index rate is 30%. When the abnormal index rate generated by the equipment in a single day exceeds the upper limit threshold, a prompt message is automatically generated to pay attention to the equipment operation status, reminding timely maintenance.
[0144] For another example, the server 11 may generate the best location recommendation for the health hut according to the residential area distribution of the users of the health hut. The user may input the residential area through the terminal device 13. The derived rules may be as shown in the following table 11:
[0145] Table 11
[0146]
[0147]
[0148] If the statistical results satisfy all the rules in Table 11, the server 11 sends a suggestion for a new layout of the health hut to the application 12. The server 11 can calculate the optimal location of the new layout of the health hut according to the user's residential area distribution and the shortest distance algorithm, and send the optimal location to the application 12.
[0149] For another example, if the server 11 detects that the terminal device has not monitored any indicator data for three days, it sends a prompt message to the application 12 to prompt the administrator to check the network status of the terminal device, etc.
[0150] The embodiment of the present invention further proposes a data processing method, which is applied to the application end 12. Figure 6 As shown, the data processing method includes the following steps 601 to 603:
[0151] In step 601, a data query request input by a user is received; the data query request includes a statistical dimension;
[0152] In step 602, corresponding statistical results are obtained from the server according to the statistical dimensions; wherein, after receiving the original data, the server traverses all fields in the original data to obtain at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, the corresponding statistical indicator is determined according to the statistical dimension and the association rule, the association rule includes the corresponding relationship between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, which are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension;
[0153] In step 603, data is displayed according to the statistical results.
[0154] In this embodiment, after receiving the data query request, the application end 12 can send the data query request to the server end 11. The server end 11 obtains the corresponding statistical results according to the statistical dimensions in the data query request, and sends the statistical results to the application end 12, so that the application end 12 displays the data according to the statistical results.
[0155] The embodiment of the present invention further proposes a data processing method, which is applied to the terminal device 13. Figure 7 As shown, the data processing method further includes the following steps 701-702:
[0156] In step 701, raw data is collected.
[0157] In step 702, the original data is sent to the server, wherein after receiving the original data, the server traverses all fields in the original data and obtains at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, the corresponding statistical indicator is determined according to the statistical dimension and the association rule, the association rule includes the correspondence between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to obtain the corresponding statistical result, which is used as the source data for querying the data after receiving the data query request, and the data query request includes the statistical dimension.
[0158] The embodiment of the present invention further provides a data processing device, which is applied to the server 11. Figure 8 As shown, the device comprises:
[0159] A first receiving module 81 is configured to receive original data;
[0160] The query module 82 is configured to traverse all fields in the original data and obtain at least one statistical dimension; the statistical dimension corresponds to the field;
[0161] A first determination module 83 is configured to determine, for each statistical dimension, a corresponding statistical indicator according to the statistical dimension and an association rule, wherein the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator;
[0162] The first acquisition module 84 is configured to perform data statistics according to statistical dimensions and statistical indicators, and obtain corresponding statistical results, which are used as source data for querying data after receiving a data query request, and the data query request includes a statistical dimension.
[0163] The embodiment of the present invention further provides a data processing device, which is applied to the application end 12, such as Fig. 9 As shown, the device comprises:
[0164] The second receiving module 91 is configured to receive a data query request input by a user; the data query request includes a statistical dimension;
[0165] The second acquisition module 92 is configured to acquire corresponding statistical results from the server according to the statistical dimension; wherein, after receiving the original data, the server traverses all fields in the original data to acquire at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, the corresponding statistical indicator is determined according to the statistical dimension and the association rule, the association rule includes the corresponding relationship between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to acquire corresponding statistical results, and the statistical results are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension;
[0166] The display module is configured to display data according to the statistical results.
[0167] The embodiment of the present invention further provides a data processing device, which is applied to a terminal device 13, such as Fig.10 As shown, the device comprises:
[0168] The acquisition module 1001 is configured to acquire raw data;
[0169] The sending module 1002 is configured to send the original data to the server, wherein after receiving the original data, the server traverses all fields in the original data and obtains at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, the corresponding statistical indicator is determined according to the statistical dimension and the association rule, the association rule includes the correspondence between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to obtain the corresponding statistical results, which are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension.
[0170] The embodiment of the present invention further provides a data processing system, comprising: Figures 8 to 10 The data processing device shown.
[0171] The embodiment of the present invention also provides a data processing device. Fig.11 As shown, the apparatus 1400 includes a processing component 1422, which further includes one or more processors, and a memory resource represented by a memory 1432 for storing instructions, such as applications, that can be executed by the processing component 1422. The application stored in the memory 1432 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1422 is configured to execute instructions to perform the above method.
[0172] The device 1400 may also include a wired or wireless network interface 1450 configured to connect the device 1400 to a network, and an input / output (I / O) interface 1458 .
[0173] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1432 including instructions, which can be executed by the processing component 1422 of the device 1400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0174] It should be noted that the display device in this embodiment can be: electronic paper, mobile phone, tablet computer, television, notebook computer, digital photo frame, navigator, or any other product or component with a display function.
[0175] In the present invention, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. The term "plurality" refers to two or more than two, unless otherwise clearly defined.
[0176] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the disclosure disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0177] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: Applied to the server, the method includes: Receive raw data; Traversing all fields in the original data to obtain at least one statistical dimension; the statistical dimension corresponds to the field; For each of the statistical dimensions, a corresponding statistical indicator is determined according to the statistical dimension and an association rule, wherein the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator; Perform data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, wherein the statistical results are used as source data for querying data after receiving a data query request, wherein the data query request includes the statistical dimension; There are association relationships between some of the at least one statistical dimension; the association rule also includes the association relationship between the some statistical dimensions; the some statistical dimensions include high-level statistical dimensions and low-level statistical dimensions, and the low-level statistical dimensions are subordinate to the high-level statistical dimensions; The performing data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results includes: For the low-level statistical dimension, data statistics are performed according to the low-level statistical dimension and the corresponding statistical indicator to obtain the corresponding low-level statistical result; According to the association relationship between the low-level statistical results and some statistical dimensions, high-level statistical results of high-level statistical dimensions are obtained; The low-level statistical results and the high-level statistical results are folded to perform hierarchical display.
2. The data processing method according to claim 1, characterized in that: All the fields include a time field; the association rule also includes a time granularity; The performing data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results includes: Data statistics are performed according to the statistical dimension, the statistical indicator and the time granularity to obtain corresponding statistical results.
3. The data processing method according to claim 2, characterized in that: The time granularity includes a high-level time granularity and a low-level time granularity; the high-level time granularity is greater than the low-level time granularity; the association rule also includes the relationship between the high-level time granularity and the low-level time granularity; The performing data statistics according to the statistical dimension, the statistical indicator and the time granularity to obtain corresponding statistical results includes: Perform data statistics according to the statistical dimension, the statistical indicator and the low-level time granularity to obtain a small-granularity statistical result; The large-granularity statistical result corresponding to the high-level time granularity is obtained according to the relationship between the small-granularity statistical result, the high-level time granularity and the low-level time granularity.
4. The data processing method according to claim 1, characterized in that: Also includes: Analyze the statistical results to obtain analysis results; When it is determined according to the analysis result that an abnormal situation exists, a prompt message is output, where the prompt message is used to prompt the abnormal situation and / or provide suggestions for improving the abnormal situation.
5. A data processing method, characterized in that: Applied to the application end, the method includes: Receiving a data query request input by a user; the data query request includes a statistical dimension; Obtain corresponding statistical results from the server according to the statistical dimension; wherein, after receiving the original data, the server traverses all fields in the original data to obtain at least one statistical dimension, the statistical dimension corresponds to the field, and for each of the statistical dimensions, determines a corresponding statistical indicator according to the statistical dimension and an association rule, the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator, and performs data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, the statistical results are used as source data for querying data after receiving a data query request, the data query request includes the statistical dimension; Data display is performed based on the statistical results.
6. A data processing method, characterized in that: Applied to a terminal device, the method comprises: Collect raw data; The original data is sent to a server, wherein after receiving the original data, the server traverses all fields in the original data to obtain at least one statistical dimension, wherein the statistical dimension corresponds to the field, and for each statistical dimension, a corresponding statistical indicator is determined according to the statistical dimension and an association rule, wherein the association rule includes a correspondence between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, wherein the statistical results are used as source data for querying data after receiving a data query request, wherein the data query request includes the statistical dimension.
7. A data processing device, characterized in that: Applied to the server, the device comprises: A first receiving module is configured to receive original data; A query module is configured to traverse all fields in the original data to obtain at least one statistical dimension; the statistical dimension corresponds to the field; A first determination module is configured to determine, for each of the statistical dimensions, a corresponding statistical indicator according to the statistical dimension and an association rule, wherein the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator; The first acquisition module is configured to perform data statistics according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, and the statistical results are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension.
8. A data processing device, characterized in that: Applied to the application end, the device includes: A second receiving module is configured to receive a data query request input by a user; the data query request includes a statistical dimension; A second acquisition module is configured to acquire corresponding statistical results from the server according to the statistical dimension; wherein, after receiving the original data, the server traverses all fields in the original data to acquire at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, determines a corresponding statistical indicator according to the statistical dimension and an association rule, the association rule includes a corresponding relationship between the statistical dimension and the statistical indicator, and performs data statistics according to the statistical dimension and the statistical indicator to acquire corresponding statistical results, the statistical results are used as source data for querying data after receiving a data query request, the data query request includes the statistical dimension; The display module is configured to display data according to the statistical results.
9. A data processing device, characterized in that: Applied to a terminal device, the device comprises: An acquisition module configured to acquire raw data; A sending module is configured to send the original data to a server, wherein after receiving the original data, the server traverses all fields in the original data to obtain at least one statistical dimension, the statistical dimension corresponds to the field, and for each statistical dimension, a corresponding statistical indicator is determined according to the statistical dimension and an association rule, the association rule includes a correspondence between the statistical dimension and the statistical indicator, and data statistics are performed according to the statistical dimension and the statistical indicator to obtain corresponding statistical results, which are used as source data for querying data after receiving a data query request, and the data query request includes the statistical dimension.
10. A data processing system, characterized in that: The data processing device comprises the data processing device described in claims 7-9.
11. A data processing device, characterized in that: The method comprises a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to implement the method described in any one of claims 1 to 6.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Heterogeneous source data processing method and device, storage medium and electronic equipment
CN110851495A