Data processing method and device

By constructing cost balancing coefficients and processing modes, and setting the life cycle of data partitions, the problems of poor data partition processing mode recognition accuracy and high processing costs are solved, and more efficient data processing is achieved.

CN118708659APending Publication Date: 2024-09-27BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410866584.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The recognition results of existing data partition processing modes are poor in accuracy, and the data processing cost is high and the efficiency is low.

Method used

By obtaining the storage data and processing record data of the data partition, the cost balancing coefficient is constructed and the processing mode of the data partition is determined. The target balancing value is determined based on the cost balancing coefficient and the processing mode, and the target balancing value is used to set the life cycle of the data partition.

Benefits of technology

It improves the accuracy of recognition results of data partition processing modes, reduces data processing costs, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708659A
    Figure CN118708659A
Patent Text Reader

Abstract

The invention discloses a data processing method and device, and relates to the technical field of big data. A specific embodiment of the method comprises the following steps: acquiring storage data and processing record data of a data partition; constructing a cost equalization coefficient according to the storage data, and determining a data partition processing mode according to the processing record data; and determining a target equalization value based on the cost equalization coefficient and the processing mode of the data partition, and setting the life cycle of the data partition by using the target equalization value. According to the embodiment, the accuracy of the recognition result of the data partition processing mode can be improved, the data processing cost is reduced, and the data processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a data processing method and device. Background Art

[0002] At present, there are two main methods for data processing. One is to set corresponding rules based on business research and R&D experience and refer to the data warehouse layer where the data is located, and use the rules to process data; the other is to process data based on all access date ranges within the preset time of the data model.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the related art:

[0004] The recognition result of the data partition processing mode is less accurate, and the data processing cost is high and the efficiency is low. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a data processing method and device, which can improve the accuracy of the recognition result of the data partition processing mode, reduce the data processing cost, and improve the efficiency of data processing.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a data processing method is provided, comprising:

[0007] Obtain storage data and process record data of data partitions;

[0008] Constructing a cost balancing coefficient according to the stored data, and determining a processing mode of the data partition according to the processed record data;

[0009] A target balancing value is determined based on the cost balancing coefficient and the processing mode of the data partition, and the life cycle of the data partition is set using the target balancing value.

[0010] Furthermore, constructing a cost balancing coefficient according to the stored data includes:

[0011] Determine a partition storage cost and a partition computing cost based on the stored data;

[0012] Dividing the partition storage cost by the partition calculation cost to obtain a calculation result;

[0013] A cost balancing coefficient is determined according to the calculation result.

[0014] Further, determining the processing mode of the data partition according to the processing record data includes:

[0015] identifying partition date data and access date data from the processing record data;

[0016] Determine an offset days feature based on the partition date data and the access date data;

[0017] A processing mode of the data partition is determined based on the offset day feature.

[0018] Further, determining the offset day feature according to the partition date data and the access date data includes:

[0019] Calculate the difference between the partition date data and the access date data to obtain a difference result;

[0020] A shift day feature is determined based on the difference result.

[0021] Further, determining a processing mode of data partition based on the offset day feature includes:

[0022] Calculate the cumulative number of visits for each of the offset day features within a preset time period using a pre-trained access offset statistical model;

[0023] Determine a partition access feature value according to the cumulative number of visits of each offset day feature;

[0024] A processing mode of the data partition is determined based on the partition access characteristic value.

[0025] Further, determining a target balancing value based on the cost balancing coefficient and the processing mode of the data partition includes:

[0026] Comparing the cost balancing coefficient with the numerical value of the partition access characteristic value in the processing mode of the data partition to obtain a comparison result;

[0027] A target equalization value is determined based on the comparison result.

[0028] Furthermore, before using the target balance value to set the life cycle of the data partition, the method includes:

[0029] A numerical range of the target balance value is set so that the life cycle of the data partition is set using the target balance value that satisfies the numerical range.

[0030] According to a second aspect of an embodiment of the present invention, there is provided a data processing device, including:

[0031] An acquisition module, used for acquiring storage data of data partitions and processing record data;

[0032] A construction module, used to construct a cost balancing coefficient according to the stored data, and determine a processing mode of the data partition according to the processing record data;

[0033] The setting module is used to determine a target balance value based on the cost balance coefficient and the processing mode of the data partition, and use the target balance value to set the life cycle of the data partition.

[0034] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0035] one or more processors;

[0036] a memory for storing one or more programs,

[0037] When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method described in any one of the above embodiments.

[0038] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0039] An embodiment of the above invention has the following advantages or beneficial effects: by acquiring the storage data and processing record data of the data partition; constructing a cost balancing coefficient according to the storage data, and determining the processing mode of the data partition according to the processing record data; determining a target balancing value based on the cost balancing coefficient and the processing mode of the data partition, and using the target balancing value to set the life cycle of the data partition; this embodiment can improve the accuracy of the recognition result of the data partition processing mode, reduce the data processing cost, and improve the efficiency of data processing.

[0040] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0042] Figure 1 is a schematic diagram of the main flow of a data processing method according to an embodiment of the present invention;

[0043] Figure 2 is a schematic diagram of the main flow of a data processing method according to a reference embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of the main flow of a data processing method according to another reference embodiment of the present invention;

[0045] Figure 4 is a schematic diagram of the main flow of a data processing method according to another reference embodiment of the present invention;

[0046] Figure 5 is a schematic diagram of the main flow of a data processing method according to a preferred embodiment of the present invention;

[0047] Figure 6 is a schematic diagram of solving the optimal equilibrium point according to a preferred embodiment of the present invention;

[0048] Figure 7 is a schematic diagram of main modules of a data processing device according to an embodiment of the present invention;

[0049] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0050] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0052] It should be noted that the acquisition, storage and application of personal information etc. involved in the embodiments of the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0053] The rule-based management method is to set corresponding rules based on business research and R&D experience and refer to the data warehouse layer where the data is located, such as 7 days of buffer, permanent storage of the basic data layer that stores the source system business system data, 5 years of storage of the general data layer for subject and business process integration, 3 years of storage of the unified dimension indicator aggregation layer for data caliber encapsulation, and 2 years of storage of the application layer, etc. It does not take into account the characteristics of different business data and the actual use rules of the business, and ignores individuality. According to statistical data, there are few rule-based life cycle processing solutions. In addition, data that has not been used for a long time accounts for about 50% of the total data storage, which is a huge waste of resources for Internet data storage with massive data.

[0054] The consumption-based management method sets the life cycle based on the date range of all accesses in the data model in the past few days (such as the past 90 days, 180 days). The consumption-based life cycle management solution is greatly affected by the selected inspection period and cannot accurately identify the user's processing mode; at the same time, the existence of a large number of low-frequency or invalid accesses with error codes will also cause great interference to the calculation results, resulting in the identified processing mode being far from the actual one.

[0055] In summary, the recognition results of the current data partition processing mode have poor accuracy, high data processing costs and low efficiency.

[0056] In view of this, according to one aspect of an embodiment of the present invention, a data processing method is provided.

[0057] Figure 1 It is a schematic diagram of the main flow of the data processing method according to an embodiment of the present invention.

[0058] like Figure 1 As shown, the data processing method according to an embodiment of the present invention includes:

[0059] Step S101, obtaining storage data and processing record data of a data partition.

[0060] Data partitioning refers to dividing the area according to the set rules or algorithms, and storing similar or identical data in the same partition. Specifically, data partitioning can be based on the time, geographic location, business logic, etc. of the data.

[0061] Stored data refers to data that has been stored in a database or data warehouse, which can be structured data, semi-structured data or unstructured data. The stored data includes various types of business data, log data, historical data, etc. The above-mentioned stored data can be obtained by querying the system table or system view of the database management system, or by using data processing tools or API interfaces (Application Programming Interface).

[0062] Processing record data refers to data that describes and records relevant information in the data consumption process. The consumption process refers to the process of reading data from a data storage or data stream and processing it. Processing record data records relevant information such as the way, method and environment in which the data is accessed, used and processed. The above-mentioned processing record data can be obtained through log records, monitoring tools, data audits, data processing tools, etc.; the processing record data of data partitions can also be obtained through event-driven data stream processing systems. The data stream processing system can capture and process data streams in real time, and can record key events and indicators in the processing process in real time to the data storage or monitoring system. In this way, various record data in the data processing process can be obtained in real time, which is conducive to real-time monitoring and adjustment of the data processing process.

[0063] Step S102: constructing a cost balancing coefficient according to the stored data, and determining a processing mode of the data partition according to the processing record data.

[0064] The cost balance coefficient is an indicator used to measure the balance between the storage cost and the computing cost of a data partition. The cost balance coefficient reflects the relationship between the resource costs required to store data and compute data in a data processing system. The cost balance coefficient is a constant. The closer it is to 1, the better the balance between storage cost and computing cost. The further it deviates from 1, the imbalance between storage cost and computing cost.

[0065] The processing mode refers to the strategy or mode for determining data partitions based on data usage and access patterns, which can be based on on-demand consumption, periodic consumption, consumption based on access frequency, etc. The processing mode of data partitions refers to analyzing and judging the consumption of data partitions to determine the processing modes of different data partitions; for example, how to select data partitions for consumption, how to adjust consumption strategies, etc.

[0066] Specifically, a feature analysis can be performed on the data to be stored, such as the type, size, access frequency, read-write ratio, etc. of the data; based on the feature analysis of the stored data, a mathematical model or empirical formula can be used to calculate the cost balance coefficient, for example, the cost balance coefficient can be calculated based on factors such as storage cost, computing cost, access speed, and data update frequency.

[0067] Use data analysis tools or scripts to analyze relevant information of the above-mentioned processing record data, such as data access frequency, access time, access volume, etc.; based on the analysis results, use machine learning algorithms and pre-trained processing mode prediction models to predict data partition processing modes.

[0068] It is also possible to collect historical information about stored data through data sampling and statistical analysis. The historical information includes key features such as data type, size, access pattern, and update frequency. The cost balancing coefficient can be calculated based on statistical models or empirical formulas. At the same time, based on real-time monitoring and analysis of key indicators of recorded data, such as the execution time of data processing tasks, resource utilization, and processing efficiency, the data partition processing mode can be adjusted in combination with a real-time feedback mechanism to optimize the data processing process and resource utilization efficiency.

[0069] Step S103: determining a target balancing value based on the cost balancing coefficient and the processing mode of the data partition, and setting the life cycle of the data partition using the target balancing value.

[0070] The target balance value is a measure used to achieve the balance and optimization of resource utilization. In data processing, it can represent the balance point between storing data and processing record data, so that the system can handle data requirements in an optimal way. For example, for a data storage system, the target balance value can be the balance point between storage cost and data access frequency, or the balance point between data processing resources and data processing requirements.

[0071] When determining the target balance value, the target balance value can be calculated or determined through mathematical models, optimization algorithms or empirical rules. For example, the cost balance coefficient and processing mode can be used as optimization targets, and the optimal target balance value can be calculated using methods such as linear programming and genetic algorithms. According to the determined target balance value, a lifecycle management strategy for data partitions can be formulated, including data storage cycle, backup strategy, data migration, etc.; for example, the data storage time can be determined according to the target balance value, and archiving or compressed storage can be adopted for data with low access frequency, and high-performance storage and backup strategies can be adopted for data with high access frequency.

[0072] The embodiment of the present invention obtains storage data and processing record data of a data partition; constructs a cost balancing coefficient based on the storage data, and determines a processing mode of the data partition based on the processing record data; determines a target balancing value based on the cost balancing coefficient and the processing mode of the data partition, and uses the target balancing value to set the life cycle of the data partition; this embodiment can improve the accuracy of the recognition result of the data partition processing mode, reduce the data processing cost, and improve the efficiency of data processing.

[0073] Figure 2 FIG. 1 is a schematic diagram of the main flow of a data processing method according to a reference embodiment of the present invention. Figure 2 As shown, step S102 constructs a cost balancing coefficient according to the stored data, including:

[0074] Step S201: determining a partition storage cost and a partition computing cost based on the stored data.

[0075] Step S202: Divide the partition storage cost by the partition calculation cost to obtain a calculation result.

[0076] Step S203: determining a cost balancing coefficient according to the calculation result.

[0077] In step S201, the partition storage cost refers to the cost required to store data in the data partition, including the purchase cost of storage devices, the cost of using storage space (such as cloud storage service fees), the cost of data backup and recovery, etc. The partition computing cost refers to the cost required to perform operations such as computing, querying, and analyzing the storage data of the data partition, including the cost of computing resources (such as servers, processors, memory, etc.), the license fee of data processing software, maintenance and management costs, etc.

[0078] The data is divided into different partitions or storage levels, and the storage requirements of each partition are estimated, such as storage space, backup space, and archive space; the storage cost of each data partition is calculated based on the estimated results, the price of the storage medium, and the usage rules. The computing requirements of each partition are estimated, such as the consumption of computing resources, computing time, and real-time requirements; the computing cost of each partition is calculated based on the estimated results, the price of computing resources, and the usage rules.

[0079] Step S202 divides the partition storage cost by the partition computing cost to obtain a calculation result, which is used to evaluate the trade-off between storage and computing. For example, assuming that there is data A, the storage cost is 1,000 yuan / month, and the computing cost is 500 yuan / month, the calculation result corresponding to data A is 2, which means that a copy of data A needs to be accessed twice to equal the cost of computing this data A on demand when it is consumed.

[0080] The cost balancing coefficient in step S203 is a measurement indicator determined based on the cost ratio of storage data and computing data. The calculation result can be directly defined as the cost balancing coefficient a, or the calculation result can be mapped to a range or a set of rules can be defined to determine the value of the cost balancing coefficient. For example, the calculation result can be mapped to between 0 and 1, and the closer to 1, the higher the storage cost, and the closer to 0, the higher the computing cost.

[0081] The embodiment of the present invention constructs a cost balancing coefficient based on the storage data, which is beneficial to optimizing the storage and computing resource utilization of the data partition and improving the economic benefits and performance of the system.

[0082] Figure 3 FIG. 1 is a schematic diagram of the main flow of a data processing method according to another reference embodiment of the present invention. Figure 3As shown, step S102 determines the processing mode of the data partition according to the processing record data, including:

[0083] Step S301, identifying partition date data and access date data from the processing record data.

[0084] Step S302: determining the offset day feature according to the partition date data and the access date data.

[0085] Step S303: determining a processing mode of the data partition based on the offset day feature.

[0086] Before step S301, the processing record data may be preprocessed, such as cleaning the data, formatting the date field, etc. Step S301 identifies partition date data from the preprocessed processing record data, where the partition date refers to the time period or time segment to which the data belongs; and identifies access date data from the processing record data, where the access date refers to the time point or time period when the data is accessed or consumed.

[0087] In step S302, for each processed record data, the offset days are calculated according to the partition date and the access date, that is, the time difference between the access date and the partition date; the calculated offset days are used as features to perform statistical analysis on the offset days, such as calculating the average offset days, the maximum offset days, etc.; the offset days features are visualized through charts and the like, so as to intuitively understand and analyze the processing mode of the data partitions.

[0088] Alternatively, you can map the access date and partition date to a time window, and then determine the offset days feature based on the position of the data in the time window. For example, divide each month into several time periods, and then determine the offset days based on the position of the access date and partition date in the time period. You can also perform periodic analysis on the access date and partition date, such as whether there is a significant difference in the access pattern from Monday to Sunday, or whether certain dates of each month are more likely to be accessed, and determine the offset days feature through periodic analysis.

[0089] Step S303 performs data analysis based on the characteristics of the offset days, such as which data partitions have longer access offset days and which have shorter ones, etc.; determines the processing mode of the data partition based on the analysis results, such as hot data partitions, warm data partitions and cold data partitions, or divides high-frequency access partitions and low-frequency access partitions according to the access frequency, etc.; it is also possible to predict and identify the processing mode by training a processing mode prediction model, using machine learning algorithms or statistical analysis methods.

[0090] Optionally, step S302 determines the offset day feature according to the partition date data and the access date data, including:

[0091] The difference between the partition date data and the access date data is calculated to obtain a difference result; and the offset day feature is determined based on the difference result.

[0092] For example, the partition date data includes 2023-04-01 and 2023-04-30, and the corresponding access date data are 2023-04-03 and 2023-04-25 respectively; the difference between each group of partition date data and access date data is calculated, that is, the access date minus the partition date. For example, the difference between 2023-04-03 and 2023-04-01 is 2 days, and the difference between 2023-04-30 and 2023-04-30 is 5 days; the above difference result is used as the offset day feature, which indicates the number of days of delay in data access.

[0093] Figure 4 FIG. 1 is a schematic diagram of the main flow of a data processing method according to another reference embodiment of the present invention. Figure 4 As shown, step S303 determines the processing mode of the data partition based on the offset day feature, including:

[0094] Step S401, using a pre-trained access offset statistical model to calculate the cumulative number of accesses for each of the offset day features within a preset time.

[0095] Step S402: determining a partition access feature value according to the cumulative number of accesses of each offset day feature.

[0096] Step S403: determining a processing mode of the data partition based on the partition access characteristic value.

[0097] Among them, the pre-trained access offset statistical model can calculate the cumulative number of visits for each offset day feature within a preset time according to the offset day feature. Specifically, the above-mentioned access offset statistical model can be trained based on historical data or a machine learning algorithm. Step S401 inputs the offset day feature within a preset time into the trained model to obtain the cumulative number of visits for each offset day feature within the preset time. The above-mentioned cumulative number of visits is used to show the access status of the data partition under different offset days.

[0098] In step S402, the partition access characteristic value can be calculated according to the cumulative access times of each offset day feature. The partition access characteristic value includes the cumulative average access times, the maximum access times of the cumulative access times, the minimum access times, etc., which are used to describe the access situation of the data partition.

[0099] Step S403 analyzes the calculated partition access characteristic values ​​to obtain analysis results under different offset day characteristics, for example, which offset day characteristics have higher access times and which have lower access times, etc.; determine the processing mode of the data partition based on the analysis results, for example, the offset day characteristics with high access times can be divided into hot data partitions, and the offset day characteristics with low access times can be divided into cold data partitions, or different processing modes can be divided according to the distribution of access times; finally, cross-validation, model evaluation and other methods can be used to verify and adjust the processing mode.

[0100] The embodiment of the present invention determines the processing mode of data partitions based on the offset day feature, and further improves the accuracy of processing mode recognition and the applicability of the mode.

[0101] Optionally, step S103 determines a target balancing value based on the cost balancing coefficient and the processing mode of the data partition, including: comparing the numerical values ​​of the partition access characteristic values ​​in the cost balancing coefficient and the processing mode of the data partition to obtain a comparison result; and determining a target balancing value based on the comparison result.

[0102] Specifically, the numerical values ​​of the cost balance coefficient and the partition access characteristic value in the processing mode of the data partition are compared. The cost balance coefficient indicates the balance between the storage cost and the computing cost; the partition access characteristic value indicates the access situation of the data partition, including the access frequency, the number of accesses, etc. According to the comparison results, it can be divided into the following situations: one is that the cost balance coefficient is large and the partition access characteristic value is small, which means that the storage cost is relatively high, but the access situation of the data partition is relatively cold, that is, the data access is less, in this case, the storage strategy can be optimized to reduce unnecessary storage costs; the other is that the cost balance coefficient is small and the partition access characteristic value is large, which means that the storage cost is relatively low, but the access situation of the data partition is relatively hot, that is, the data access is more frequent, in this case, storage resources can be increased to meet the high-frequency access requirements of the data; another is that the cost balance coefficient and the partition access characteristic value are relatively matched, indicating that the balance between the storage cost and the computing cost is better, and the access situation of the data partition matches the storage cost, in this case, the utilization of storage resources is relatively reasonable and does not require too much adjustment.

[0103] The target balance value is determined based on the comparison result. For example, the cost balance coefficient is 0.4. When the offset days are 1, 2, 3, 4, and 7, the partition access characteristic values ​​all exceed the cost balance coefficient of 0.4. The point with an offset day of 7 is determined as the target balance value, indicating that the processing mode of the data partition is determined to achieve a balance between storage and computing costs when the offset day is 7. The data partition has achieved a good balance between storage cost and computing cost, and the access situation when the offset day is 7 is also relatively reasonable.

[0104] Optionally, before using the target balance value to set the life cycle of the data partition, step S103 includes: setting a numerical range of the target balance value, so that the life cycle of the data partition is set using a target balance value that satisfies the numerical range.

[0105] Before setting the target balance value, you can define the numerical range of the target balance value, including the minimum value, maximum value, ideal value, etc., according to business needs, budget constraints, and technical requirements. When determining the numerical range, you can base it on factors such as storage cost, computing cost, data access frequency, and data importance. For example, if the business has high requirements for data real-time performance, the target balance value can be biased towards a smaller numerical range to ensure fast data access and processing. In addition, formulate a strategy to adjust the target balance value according to different situations. For example, if the target balance value deviates from the numerical range by a large margin, you can increase storage resources or optimize computing resources to improve data access efficiency.

[0106] In addition, machine learning and data analysis technologies can be used to design an intelligent data partition lifecycle management system. By analyzing large amounts of data access patterns and trends, the system can automatically adjust the target balance value and lifecycle strategy to improve management efficiency and data utilization. Data analysis and feedback mechanisms can be used to continuously monitor and evaluate the effectiveness of target balance values ​​and lifecycle strategies, and regular optimization and adjustments can be made to continuously improve data processing efficiency and cost control capabilities.

[0107] Figure 5 It is a preferred embodiment of the present invention, such as Figure 5 As shown, first, according to the model storage metadata, the average storage capacity of the partition of the model in the past d (90) days is calculated, and according to the task operation log, the average computing resource (processor, memory, etc.) consumption of the partition of the model in the past d days is calculated. Then, according to the corresponding resource procurement operation cost, the storage and computing resource consumption is converted into a unified and comparable unit of measurement (RMB, yuan) to obtain the storage cost amount and the computing cost amount. Finally, the ratio of the storage cost amount to the computing cost amount is abstracted as the number of times a piece of data storage needs to be accessed to be equal to the cost of calculating this data on demand when consuming. For example, the average storage cost of the table partition (unit: yuan) is divided by the average computing cost of the table partition (unit: yuan). The conversion can be done in the same unit of measurement, not limited to RMB units; the relationship between the amount measurement and the number of visits is established to obtain the cost balance coefficient a, as shown Figure 6 As shown on the vertical axis, the cost balancing coefficient a is a constant.

[0108] To calculate the partition access feature value based on the consumption metadata of the data table partition, first extract, parse and process the user access details of each table partition data date (dt) based on the access audit log of the big data platform. The data access is aggregated to each date partition according to the task granularity, and the processing information records in detail when the partition data is read and accessed by what user through what task. Then, calculate the partition data date dt and the partition access date access_dt, and then calculate diff(access_dt, dt) to get the difference between the two, which is the access offset days recorded as o, and the number of accesses is recorded as 1. Then, based on the access offset statistical model, calculate the cumulative number of accesses t of the table partition in each access offset day in the past d (90) days. Finally, calculate the total number of accesses ts accumulated to the current offset day o, and calculate the cumulative average number of accesses for each offset day as ts / d, such as Figure 6 As shown, curve a represents the cost coefficient a (cost balance coefficient), and curve b represents the cumulative average number of visits Es.

[0109] The above steps give the cost balance coefficient a and the average number of accesses accumulated to the current offset days Es. The process of solving the cost balance point is as follows: average partition calculation cost × average cumulative number of accesses for each offset day = average partition storage cost (the assumption here is that the data is automatically cleaned up one day after the calculation is completed, so the average partition storage cost here is the cost of storing the partition for one day); if the average partition calculation cost × average cumulative number of accesses for each offset day > average partition storage cost, it means that the data access is hot, and saving the calculation results can reduce the overall cost. Conversely, recalculating the cost when access is needed is lower; and the equal point is the critical balance point (in fact, there may be multiple, or none). As shown in Table 1 below, assuming that the calculated cost balance coefficient is 0.4, and the cumulative average number of accesses Es is ts / d / o, it can be seen that the Es of offset days 1, 2, 3, 4, and 7 all exceed the value of a of 0.4. Therefore, the point with an offset of 7 days is the final balance point E (the balance point with the maximum offset days). Although the data generated on day 365 is also accessed, the cost of saving the data from days 8 to 364 is too high and should be discarded and calculated when needed.

[0110] Table 1 Equilibrium point

[0111]

[0112] The offset days calculation scheme adopted in the embodiment of the present invention plays a key role in eliminating the interference of the selected observation period and the accuracy of the model processing mode recognition. For example, it is set that 10 tasks access the partition data of the most recent day of the table every day. According to the traditional statistical scheme, the observation period is selected as 15 days, and the access pattern of the data partition is obtained in the past 15 days. The partition access pattern obtained by selecting 31 days is 31 days. However, by adopting the embodiment of the present invention, the processing mode of the user is the data of the past 1 day, which more truly restores and recognizes the actual processing mode of the partition, improves the accuracy of processing mode recognition, and the embodiment of the present invention is not limited to the processing mode recognition of table partitions.

[0113] Based on the storage and computing cost balance solution, accidental random access interference is eliminated to further improve the accuracy of pattern recognition. The storage cost and computing cost are converted into a unified unit of measurement as a basis for comparison, and the ratio of the storage cost amount to the computing cost amount is abstracted as the average number of times a data partition storage needs to be accessed to be equal to the cost of calculating the data once. A relational algebra model is established between the amount measurement and the number of accesses to minimize the interference of accidental low-frequency and erroneous accesses on pattern recognition. The embodiments of the present invention include but are not limited to a cost conversion solution based on amount.

[0114] According to a second aspect of the embodiment of the present invention, Figure 7 As shown, a data processing device 700 is provided, including:

[0115] An acquisition module 701 is used to acquire storage data and process record data of a data partition;

[0116] A construction module 702, configured to construct a cost balancing coefficient according to the stored data, and determine a processing mode of a data partition according to the processing record data;

[0117] The setting module 703 is used to determine a target balance value based on the cost balance coefficient and the processing mode of the data partition, and use the target balance value to set the life cycle of the data partition.

[0118] Optionally, the building module 702 is further used for:

[0119] Determine a partition storage cost and a partition computing cost based on the stored data;

[0120] Dividing the partition storage cost by the partition calculation cost to obtain a calculation result;

[0121] A cost balancing coefficient is determined according to the calculation result.

[0122] Optionally, the building module 702 is further used for:

[0123] identifying partition date data and access date data from the processing record data;

[0124] Determine an offset days feature based on the partition date data and the access date data;

[0125] A processing mode of the data partition is determined based on the offset day feature.

[0126] Optionally, the building module 702 is further used for:

[0127] Calculate the difference between the partition date data and the access date data to obtain a difference result;

[0128] A shift day feature is determined based on the difference result.

[0129] Optionally, the building module 702 is further used for:

[0130] Calculate the cumulative number of visits for each of the offset day features within a preset time period using a pre-trained access offset statistical model;

[0131] Determine a partition access feature value according to the cumulative number of visits of each offset day feature;

[0132] A processing mode of the data partition is determined based on the partition access characteristic value.

[0133] Optionally, the setting module 703 is further used to:

[0134] Comparing the cost balancing coefficient with the numerical value of the partition access characteristic value in the processing mode of the data partition to obtain a comparison result;

[0135] A target equalization value is determined based on the comparison result.

[0136] Optionally, the data processing device 700 further includes a restriction module, and the restriction module is used to:

[0137] A numerical range of the target balance value is set so that the life cycle of the data partition is set using the target balance value that satisfies the numerical range.

[0138] It should be noted that the specific implementation content of the data processing device of the present invention has been described in detail in the above-mentioned data processing method, so the repeated content will not be described again here.

[0139] According to a third aspect of an embodiment of the present invention, there is provided a data processing electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present invention.

[0140] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0141] Figure 8 An exemplary system architecture 800 is shown to which the data processing method or data processing device according to the embodiment of the present invention can be applied.

[0142] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0143] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0144] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0145] The server 805 may be a server that provides various services, such as a background management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The background management server may analyze and process the received data such as the data analysis request, and feed back the processing results (data partition life cycle - only an example) to the terminal device.

[0146] It should be noted that the data processing method provided in the embodiment of the present invention is generally executed by the server 805, and accordingly, the data processing device is generally set in the server 805. The data processing method provided in the embodiment of the present invention can also be executed by the terminal devices 801, 802, and 803, and accordingly, the data processing device can be set in the terminal devices 801, 802, and 803.

[0147] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0148] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0149] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0150] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0151] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0152] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0153] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0154] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a setting module, a construction module and an acquisition module, wherein the names of these modules do not constitute a limitation on the modules themselves in certain circumstances, for example, the acquisition module may also be described as "a module for acquiring storage data of a data partition and processing record data".

[0155] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method: obtaining storage data and processing record data of a data partition; constructing a cost balancing coefficient based on the storage data, and determining a processing mode of the data partition based on the processing record data; determining a target balancing value based on the cost balancing coefficient and the processing mode of the data partition, and using the target balancing value to set the life cycle of the data partition.

[0156] According to the technical solution of an embodiment of the present invention, the data processing method of an embodiment of the present invention obtains the storage data and processing record data of a data partition; constructs a cost balancing coefficient based on the storage data, and determines the processing mode of the data partition based on the processing record data; determines a target balancing value based on the cost balancing coefficient and the processing mode of the data partition, and uses the target balancing value to set the life cycle of the data partition; this embodiment can improve the accuracy of the recognition result of the data partition processing mode, reduce the data processing cost, and improve the efficiency of data processing.

[0157] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0158] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

Claims

1. A data processing method, characterized in that: include: Obtain storage data and process record data of data partitions; Constructing a cost balancing coefficient according to the stored data, and determining a processing mode of the data partition according to the processed record data; A target balancing value is determined based on the cost balancing coefficient and the processing mode of the data partition, and the life cycle of the data partition is set using the target balancing value.

2. The method according to claim 1, characterized in that Constructing a cost balancing coefficient according to the storage data includes: Determine a partition storage cost and a partition computing cost based on the stored data; Dividing the partition storage cost by the partition calculation cost to obtain a calculation result; A cost balancing coefficient is determined according to the calculation result.

3. The method according to claim 1, characterized in that Determining a processing mode of the data partition according to the processing record data includes: identifying partition date data and access date data from the processing record data; Determine an offset days feature based on the partition date data and the access date data; A processing mode of the data partition is determined based on the offset day feature.

4. The method according to claim 3, characterized in that Determining the offset day feature according to the partition date data and the access date data includes: Calculate the difference between the partition date data and the access date data to obtain a difference result; A shift day feature is determined based on the difference result.

5. The method according to claim 3, characterized in that: Determining a processing mode of data partition based on the offset day feature includes: Calculate the cumulative number of visits for each of the offset day features within a preset time period using a pre-trained access offset statistical model; Determine a partition access feature value according to the cumulative number of visits of each offset day feature; A processing mode of the data partition is determined based on the partition access characteristic value.

6. The method according to claim 5, characterized in that Determining a target balancing value based on the cost balancing coefficient and the processing mode of the data partition includes: Comparing the cost balancing coefficient with the numerical value of the partition access characteristic value in the processing mode of the data partition to obtain a comparison result; A target equalization value is determined based on the comparison result.

7. The method according to claim 1, characterized in that Before setting the life cycle of the data partition using the target balance value, the following steps are included: A numerical range of the target balance value is set so that the life cycle of the data partition is set using the target balance value that satisfies the numerical range.

8. A data processing device, characterized in that: include: An acquisition module, used for acquiring storage data of data partitions and processing record data; A construction module, used to construct a cost balancing coefficient according to the stored data, and determine a processing mode of the data partition according to the processing record data; The setting module is used to determine a target balance value based on the cost balance coefficient and the processing mode of the data partition, and use the target balance value to set the life cycle of the data partition.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Big data life cycle setting method and device, storage medium and server

    CN111459900A

  • Big data life cycle management method based on cross-engine horizontal partition table

    CN111752930A

  • Data life cycle management method and device

    CN112365244A

  • Data processing method, distributed database system, equipment and storage medium

    CN114911794A

  • Method for caching of data items in a chache area of a data processing system and corresponding device

    US20150033255A1