Data processing method and device, equipment, storage medium and computer program product
By dividing and logically decomposing data, combined with batch and stream processing technology, the problem of inefficiency of traditional data processing technology under massive data is solved, the demand for real-time data analysis is realized, and the efficiency and quality of data processing are improved.
Patent Information
- Application Number
- CN202411312759.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-10-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional data processing technology is inefficient when faced with massive data, causing data analysis results to be unable to be generated in a timely manner, affecting business decisions, and making it difficult to meet the needs of real-time processing and rapid response.
By dividing the data stored in the database according to the data type and expected access mode, determining the processing logic, and decomposing it into multiple micro-processing tasks, using scheduling algorithms to sort, realize batch processing and stream processing, and improve data processing efficiency and quality.
It improves data processing efficiency and quality, meets the needs of real-time data analysis, reduces hardware investment and maintenance costs, and ensures the timeliness and accuracy of data analysis results.
Smart Images

Figure CN118838701A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a data processing method, device, equipment, storage medium and computer program product. Background Art
[0002] At present, with the exponential growth of data volume, traditional data processing technology is inefficient in the face of massive data, resulting in the inability to generate data analysis results in a timely manner, affecting business decisions and making it difficult to meet the needs of real-time processing and rapid response. Summary of the invention
[0003] The main purpose of this application is to provide a data processing method, device, equipment, storage medium and computer program product, aiming to solve the technical problem that with the exponential growth of data volume, traditional data processing technology is inefficient in the face of massive data, resulting in the inability to generate data analysis results in a timely manner, affecting business decisions, and making it difficult to meet the needs of real-time processing and rapid response.
[0004] To achieve the above purpose, the present application proposes a data processing method, which includes: The preprocessed data stored in the database is divided according to data types and expected access patterns to obtain divided data sets; Determining processing logic corresponding to each of the divided data sets; Decomposing the processing logic into a plurality of micro-processing tasks according to the processing type, and sorting the micro-processing tasks according to the scheduling algorithm to obtain an optimal processing sequence; The data in each divided data set is batch processed and stream processed according to the optimal processing sequence and the processing logic to obtain target data and analysis results.
[0005] Optionally, the step of decomposing the processing logic into a plurality of micro-processing tasks according to the processing type, and sorting the micro-processing tasks according to a preset scheduling algorithm to obtain an optimal processing sequence includes: Identify the processing logic to obtain key steps and dependencies; Decomposing the processing logic into a plurality of micro-processing tasks according to attributes of the key steps, wherein the attributes are at least one of independence, complexity, and execution time; A scheduling algorithm is determined according to the dependency relationship, and the microprocessing tasks are sorted based on the scheduling algorithm to obtain an optimal processing sequence.
[0006] Optionally, the step of determining the processing logic corresponding to each divided data set includes: Extracting keywords from each of the divided data sets; Classify the keywords based on business fields, data types and processing requirements, and map the keywords to corresponding processing logic templates or processes according to the classification results to obtain a mapping relationship table; The processing logic corresponding to each divided data set is determined according to the keyword and the mapping relationship table.
[0007] Optionally, before the step of dividing the preprocessed data stored in the storage module according to the data type and the expected access mode to obtain each divided data set, the step further includes: Periodically collect data from a data source based on a data routing mechanism, and pre-process the collected data to obtain pre-processed data; A tiered storage strategy is generated according to the data type and access requirement of the pre-processed data, and the pre-processed data is stored in a database based on the tiered storage strategy.
[0008] Optionally, after the step of performing batch processing and stream processing on the data in each divided data set according to the optimal processing sequence and the processing logic to obtain target data and analysis results, the step further includes: comparing the analysis result with a preset data quality threshold; When the integrity and consistency of the target data are less than the preset data quality threshold, generating a data quality management strategy; The processed data is cleaned and quality controlled based on the data quality management strategy to obtain display data.
[0009] Optionally, after the step of cleaning and quality controlling the processed data based on the data quality management strategy to obtain the display data, the step further includes: Obtain the business needs of the target terminal; Establishing a demand index table according to the business demand, the display data and the analysis result; When the demand sent by the terminal is detected, the display data and the analysis result are sent to the target terminal according to the demand index table.
[0010] In addition, to achieve the above-mentioned purpose, the present application also provides a data processing device, the device comprising: A data partitioning module is used to partition the pre-processed data stored in the storage module according to data types and expected access patterns to obtain partitioned data sets; A logic determination module, used to determine the processing logic corresponding to each of the divided data sets; A sequence generation module, used to decompose the processing logic into multiple processing tasks according to the processing type, and sort them according to a preset scheduling algorithm to obtain an optimal processing sequence; The data analysis module is used to perform batch processing and stream processing on the data in each divided data set according to the optimal processing sequence and the processing logic to obtain data reports and analysis results.
[0011] In addition, to achieve the above-mentioned purpose, the present application also provides a data processing device, which includes: a memory, a processor, and a data processing program stored in the memory and executable on the processor, and when the data processing program is executed by the processor, it implements the data processing method described above.
[0012] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, on which a data processing program is stored, and when the data processing program is executed by a processor, the data processing method as described above is implemented.
[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a data processing program, and when the data processing program is executed by a processor, it implements the data processing method described above.
[0014] The present application discloses dividing the preprocessed data stored in the database according to the data type and the expected access mode to obtain each divided data set; determining the processing logic corresponding to each divided data set; decomposing the processing logic into multiple micro-processing tasks according to the processing type, and sorting the micro-processing tasks according to the scheduling algorithm to obtain the optimal processing sequence; batch processing and stream processing are performed on the data in each divided data set according to the optimal processing sequence and the processing logic to obtain the target data and analysis results. Since the present application divides the data and determines the corresponding processing strategy, after obtaining the processing sequence according to the processing strategy, distributed computing and real-time stream processing are used to improve the data processing efficiency and data quality, meeting the real-time data analysis needs of the target terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] Figure 1 This is a flow chart of the first embodiment of the data processing method of the present application; Figure 2This is a flow chart of the second embodiment of the data processing method of the present application; Figure 3 This is a schematic diagram of the decomposition of the e-commerce data analysis and processing tasks of the second embodiment of the present application; Figure 4 This is a dependency diagram of the e-commerce data analysis steps of the second embodiment of the present application; Figure 5 This is a flow chart of the third embodiment of the data processing method of the present application; Figure 6 This is a flow chart of a fourth embodiment of the data processing method of the present application; Figure 7 This is a schematic diagram of the module structure of the data processing device according to an embodiment of the present application; Figure 8 Schematic diagram of the device structure of the hardware operating environment involved in the data processing method in the embodiment of the present application.
[0018] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0019] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0020] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0021] The main solution of the embodiment of the present application is: divide the pre-processed data stored in the database according to the data type and the expected access pattern to obtain each divided data set; determine the processing logic corresponding to each divided data set; decompose the processing logic into multiple micro-processing tasks according to the processing type, and sort the micro-processing tasks according to the scheduling algorithm to obtain the optimal processing sequence; batch process and stream process the data in each divided data set according to the optimal processing sequence and processing logic to obtain the target data and analysis results.
[0022] As big data technology is widely used in all walks of life, related technologies and products emerge in an endless stream from data collection, storage to processing and analysis. However, with the exponential growth of data volume, traditional data processing technology and architecture are unable to meet the needs of real-time processing and rapid response in the face of massive data. Traditional data processing systems require a lot of hardware investment and maintenance costs, and the data processing efficiency is low, resulting in the inability to generate data analysis results in a timely manner, affecting business decisions and making it difficult to adapt to rapidly changing market demands.
[0023] Therefore, this application provides a new type of data processing platform, which realizes real-time data collection, processing and analysis by building a scalable and easy-to-manage data processing system, improves data processing efficiency and data quality, and meets the real-time data analysis needs of enterprises.
[0024] It should be noted that the execution subject of this embodiment can be a computer service device with data processing, network communication and program running functions, such as a computer, or an electronic device capable of realizing the above functions. The following takes a data processing platform as an example to illustrate this embodiment and the following embodiments.
[0025] Based on this, the present application embodiment provides a data processing method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the data processing method of the present application.
[0026] In this embodiment, the data processing method includes: Step S10, dividing the preprocessed data stored in the database according to the data type and the expected access mode to obtain each divided data set.
[0027] It should be noted that data types refer to the characteristics or properties of each data item or field in the database, including the size, length, default value, constraints, etc. of the data. Expected access patterns refer to the expected access methods of target users or applications to the data stored in the database. For example, the frequency of data queries, the complexity of queries (such as whether it involves multi-table joins, complex calculations, etc.), and the time distribution of data access (such as peak periods and trough periods) will all affect the access pattern.
[0028] In addition, it should be noted that data partitioning is the process of dividing a large amount of data into multiple smaller, easier-to-manage parts according to certain standards (such as data type, access frequency, geographic location, etc.), which can improve query efficiency, enhance data security, and facilitate data migration and maintenance. Partitioned data sets refer to the independent data sets obtained after data partitioning, and the data can be processed according to different processing methods.
[0029] It is understandable that based on the analysis results of data types and expected access patterns, the data partitioning strategy can be based on target range partitioning, such as partitioning data within a date range into different data sets; it can also be based on hash partitioning, such as mapping data to different data sets through hash functions; it can also be based on function partitioning, such as storing data of related functions together.
[0030] Step S20: determining the processing logic corresponding to each of the divided data sets.
[0031] It should be noted that processing logic is the sum of a series of steps, rules and algorithms for processing data, which can achieve specific business goals or data requirements.
[0032] Specifically, when determining the processing logic corresponding to each divided data set, it is necessary to understand the type of data contained in each data set and the structure of the data, and clarify the processing objectives of each data set based on the basis for dividing the data set, and clarify which query operations the data set needs to support, such as simple data retrieval, complex data aggregation, and real-time analysis. Consider whether the data set needs to support data insertion, update, and deletion operations, as well as the frequency and complexity of these operations.
[0033] Furthermore, in order to ensure that each data set receives the processing method that best suits its characteristics, step S20 may include: extracting keywords from each divided data set; classifying the keywords based on business domain, data type and processing requirements, and mapping the keywords to corresponding processing logic templates or processes based on the classification results to obtain a mapping relationship table; determining the processing logic corresponding to each divided data set based on the keywords and the mapping relationship table.
[0034] Step S30, decomposing the processing logic into a plurality of micro-processing tasks according to the processing type, and sorting the micro-processing tasks according to the scheduling algorithm to obtain an optimal processing sequence.
[0035] It should be noted that microprocessing tasks are decomposed into multiple smaller, manageable processing steps in the data processing process in order to improve efficiency and optimize resource usage, so that each step can be more easily processed, tested and optimized separately. In addition, there may be dependencies between microprocessing tasks, that is, the execution of some tasks may need to wait for other tasks to complete their output. The optimal processing sequence refers to the task execution order obtained by the scheduling algorithm that can maximize system performance or minimize certain costs under given conditions.
[0036] It should be understood that during the decomposition process, each microprocessing task should be ensured to be logically independent as much as possible to reduce the dependencies between tasks and increase the possibility of parallel processing. At the same time, the location of the data in physical storage should be taken into consideration, and tasks operating the same data or adjacent data should be placed together as much as possible to reduce the overhead of data movement.
[0037] It is understandable that, according to the dependencies between tasks and the availability of system resources, selecting a suitable scheduling algorithm to sort the microprocessor tasks may be sorting according to a first-come, first-served algorithm or a critical path method. Of course, in order to reduce the average waiting time, the shortest job first algorithm may be used to give priority to the task with the shortest expected execution time to obtain the optimal processing sequence. This embodiment does not limit this.
[0038] Step S40, performing batch processing and stream processing on the data in each divided data set according to the optimal processing sequence and the processing logic to obtain target data and analysis results.
[0039] It should be noted that batch processing is a data processing mode suitable for large amounts of data. It uses computing resources more efficiently by collecting large amounts of data and processing them all at once in a concentrated period of time. Stream processing is a data processing mode that processes data immediately after it arrives, without waiting for the entire data set to be complete. It can be used to process large amounts of data in real time and perform real-time analysis and calculations on the data.
[0040] Specifically, when batch processing and stream processing are performed on the data in each partitioned data set according to the optimal processing sequence and processing logic, for the data portion that does not require real-time response, the batch processing mode is adopted, and the defined processing logic is executed one by one or in parallel on the partitioned data set according to the optimal processing sequence, including pre-processing steps such as data cleaning and conversion, to obtain the final target data for subsequent statistical analysis or machine learning model application. For the data portion that needs real-time processing, the stream processing mode is adopted, by configuring the stream processing system to receive the real-time data stream from the data source, and the data stream is processed and analyzed in real time according to the processing logic to obtain real-time analysis results.
[0041] For ease of understanding, the following examples are given, but this application is not limited. In one example, in order to analyze the user's purchasing behavior, the sales trend of goods, etc., it is necessary to process the massive transaction data generated by large e-commerce platforms every day. The data is divided into multiple data sets, each of which contains transaction records within a certain time range. First, duplicate transaction records must be removed, incorrect transaction information, such as incorrect product prices, timestamps, etc., must be corrected, and missing necessary information, such as user ID, product ID, etc., must be filled in. At the same time, historical transaction data is aggregated and calculated, such as calculating the total sales of each product, the number of purchases by each user, etc. The sales trends of different time periods (such as months, quarters, and years) are classified and counted, and the sales of the current time period are calculated in real time, and the hot product rankings are updated.
[0042] In this embodiment, it is disclosed that the pre-processed data stored in the database is divided according to the data type and the expected access mode to obtain each divided data set; the processing logic corresponding to each divided data set is determined; the processing logic is decomposed into multiple micro-processing tasks according to the processing type, and the micro-processing tasks are sorted according to the scheduling algorithm to obtain the optimal processing sequence; the data in each divided data set is batch processed and stream processed according to the optimal processing sequence and processing logic to obtain the target data and analysis results. By dividing the data and determining the corresponding processing strategy, after obtaining the processing sequence according to the processing strategy, distributed computing and real-time stream processing are used to improve data processing efficiency and data quality, meeting the real-time data analysis needs of the target terminal.
[0043] Reference Figure 2 , Figure 2 This is a flow chart of the second embodiment of the data processing method of the present application. Based on the above-mentioned first embodiment, the second embodiment of the data processing method of the present application is proposed.
[0044] In the second embodiment, the step S30 includes: Step S301, identifying the processing logic to obtain key steps and dependencies.
[0045] It should be noted that key steps refer to the steps in the decomposed processing logic that have a significant impact on the final result, usually involving the improvement of data quality, the application of core analysis models, or the support of key business decisions. Dependencies refer to the interdependencies and constraints between different processing steps or components. These dependencies determine the order of data processing, the direction of data flow, and the need for resource allocation, including sequence dependency, data dependency, resource dependency, etc.
[0046] Step S302: decompose the processing logic into a plurality of micro-processing tasks according to the attributes of the key steps, wherein the attributes are at least one of independence, complexity and execution time.
[0047] It should be noted that microprocessing tasks are a series of smaller, more specific, easier to manage and execute task units obtained by decomposing complex processing logic during data processing and analysis.
[0048] Specifically, the properties of each key step are evaluated. The evaluation steps include: determining whether the step can be executed independently without relying on the output of other steps, evaluating the computational complexity, logical complexity, and data processing complexity of the step, and predicting or measuring the execution time of the step under given resource conditions. Based on the evaluation results, each key step is further decomposed into multiple micro-processing tasks. When decomposing, the principles of maintaining independence, balancing complexity and execution time need to be followed.
[0049] For ease of understanding, the following examples are provided, but are not intended to limit the present application. Figure 3 , Figure 3 This is a diagram of the decomposition of the e-commerce data analysis and processing tasks in the second embodiment of this application. Consider the e-commerce data analysis process, where the key steps include data collection, data cleaning, feature extraction, model training, and result reporting. Following the principles of maintaining independence, balancing complexity and execution time, the key steps are decomposed, and the results are as follows: 1. Data Collection Microtask A1: Get order data from the e-commerce platform API (high independence, medium complexity, medium execution time); Microtask A2: Get user information from the database (high independence, medium complexity, medium execution time); 2. Data cleaning Microtask B1: Remove duplicates from order data (medium independence, medium complexity, medium execution time); Microtask B2: Processing missing values and outliers in order data (medium independence, high complexity, long execution time); Microtask B3: Clean user information data (medium independence, medium complexity, medium execution time); 3. Feature extraction Microtask C1: Extract purchase frequency features from order data (medium independence, medium complexity, short execution time); Microtask C2: Extract age and gender features from user information (medium independence, medium complexity, short execution time); Microtask C3: Combine order and user information to calculate cross-features (low independence, high complexity, medium execution time); 4. Model training Microtask D1: data partitioning (high independence, low complexity, short execution time); Microtask D2: Select and initialize the model (medium independence, medium complexity, short execution time); Microtask D3: model training (low independence, high complexity, long execution time); 5. Result Report Microtask E1: Generate model evaluation report (low independence, medium complexity, short execution time); Microtask E2: Prepare visualization chart (low independence, medium complexity, short execution time); Microtask E3: Write a final report (low independence, low complexity, medium execution time).
[0050] Step S303: determining a scheduling algorithm according to the dependency relationship, and sorting the microprocessing tasks based on the scheduling algorithm to obtain an optimal processing sequence.
[0051] It should be understood that the scheduling algorithm determined according to the dependency relationship can be represented by a tree diagram or a linked list. Of course, in order to more clearly represent the dependency relationship, a directed acyclic graph can also be set to determine the scheduling algorithm.
[0052] For ease of understanding, the following examples are provided, but are not intended to limit the present application. Figure 4 , Figure 4 This is a dependency diagram of the e-commerce data analysis steps in the second embodiment of the present application. According to the analysis, the dependency between the current tasks is mainly based on the flow of data and the logical order of processing. Based on the logical order, the dependency is as follows: The data collection task is independent, and the data cleaning task depends on the results of the data collection task. Specifically, B1 and B2 depend on the results of A1, and B3 depends on the results of A2. The feature extraction task depends on the results of the data cleaning task. C1 depends on the results of B1 and B2, C2 depends on the results of B3, and C3 depends on the results of C1 and C2. The model training task depends on the results of the feature extraction task. D1 can be performed after any of C1, C2, and C3 is completed, but D2 and D3 depend on the results of all feature extraction tasks. The result reporting task depends on the results of model training, especially the result of D3.
[0053] Through the above dependencies, we can build a DAG (Directed Acyclic Graph) and use the topological sorting algorithm to determine the execution order of the tasks. The results are as follows: 1. A1 (obtaining order data from the e-commerce platform API) 2. A2 (getting user information from the database) 3. B1, B3 (can be executed in parallel because B1 depends on the result of A1 and B3 depends on the result of A2) 4. B2 (executed after B1, because B2 also depends on the result of A1 and may need the data processed by B1) 5. C1, C2 (can be executed in parallel because C1 depends on the results of B1 and B2, and C2 depends on the result of B3) 6. C3 (executed after C1 and C2) 7. D1 (can be executed after any of C1, C2, C3 is completed) 8. D2 (executed after C1, C2, and C3 are completed) 9. D3 (executed after D2) 10. E1, E2 (can be executed in parallel because they both depend on the result of D3) 11. E3 (executed after E1 and E2) The optimal processing sequence obtained according to the execution order is: A1, A2—>B1, B3—>B2—>C1, C2—>C3, D1—>D2—>D3—>E1, E2—>E3.
[0054] In this embodiment, the complex processing logic is decomposed into multiple micro-processing tasks, and the tasks are sorted and optimized according to a preset scheduling algorithm to obtain an optimal processing sequence, thereby improving the efficiency and accuracy of data processing and enhancing the flexibility and scalability of the system.
[0055] Reference Figure 5 , Figure 5 This is a flow chart of the third embodiment of the data processing method of the present application. Based on the above-mentioned first embodiment, the third embodiment of the data processing method of the present application is proposed.
[0056] In the third embodiment, the step S20 includes: Step S201, extracting keywords from each of the divided data sets.
[0057] It should be understood that extracting keywords from each divided data set may be to count the number of times each word appears in the current data set, and use the most frequent words in the data set as keywords for the current data set.
[0058] It is understandable that the keywords of each divided data set can also be extracted by using TF-IDF (Term Frequency-Inverse Document Frequency) to calculate the positioning weight of each word in the data set, and identifying the keywords of each data set according to the weight and probability.
[0059] Step S202: classify the keywords based on business domain, data type and processing requirement, and map the keywords to corresponding processing logic templates or processes according to the classification results to obtain a mapping relationship table.
[0060] It should be understood that before classification, it is necessary to have a deep understanding of the business domain involved, including its expertise, industry terminology, business processes, etc. Keywords are classified into different categories according to the business domain, data type, and processing requirements. The classification process can be rule-based (such as using a predefined keyword list or regular expression) or statistical (such as using a clustering algorithm).
[0061] For ease of understanding, the following examples are provided, but are not intended to limit the present application. In one example, Table 1 is a mapping relationship table, including keyword categories, instance keywords, and processing logic templates. The business areas involved include "financial services", "health care", and "e-commerce". Keywords can be divided into different categories based on business areas, data types, and processing requirements, for example: 1. Financial services: Loan application (keywords: loan, interest rate, credit score); Investment portfolio (keywords: stocks, funds, bonds, income); Risk management (keywords: risk, assessment, hedging).
[0062] 2. Healthcare: Disease diagnosis (keywords: symptoms, diagnosis, treatment); Drug research (keywords: drugs, clinical trials, efficacy); Health management (keywords: nutrition, exercise, prevention).
[0063] 3. E-commerce: Product search (keywords: price, discount, inventory); User evaluation (keywords: evaluation, rating, satisfaction); Shopping cart management (keywords: shopping cart, checkout, payment).
[0064] According to a set of predefined processing steps or algorithms and automatic triggering according to the keyword category, each category of keywords is mapped to the corresponding processing logic template or process, and finally the mapping relationship is organized into a table form.
[0065] Table 1_Mapping relationship table
[0066] Step S203: determining the processing logic corresponding to each divided data set according to the keyword and the mapping relationship table.
[0067] It is understandable that once a data set is classified into a specific keyword category, the corresponding processing logic template or process can be found according to the mapping table. The processing logic may include a series of predefined operation steps, such as data cleaning, feature extraction, model training and result analysis.
[0068] It should be understood that after the processing logic is determined, verification is usually required to ensure its effectiveness and accuracy. This can be done by conducting a trial run on a small-scale data set and providing feedback based on the trial run results. If problems are found in the processing logic or the effect is not good, adjustments and optimizations need to be made based on the verification results, such as modifying certain steps in the processing logic, reallocating the categories of the data set, or updating the mapping relationship table.
[0069] In this embodiment, it is disclosed to extract keywords of each divided data set, classify the keywords based on business field, data type and processing requirements, and map the keywords to corresponding processing logic templates or processes according to the classification results to obtain a mapping relationship table, determine the processing logic corresponding to each divided data set according to the keywords and the mapping relationship table, and customize the corresponding processing logic according to the keywords of each data set to ensure that each data set is processed in a way that best suits its characteristics, thereby improving the accuracy and relevance of the processing results.
[0070] Reference Figure 6 , Figure 6 This is a flow chart of the fourth embodiment of the data processing method of the present application. Based on the above-mentioned first embodiment, the fourth embodiment of the data processing method of the present application is proposed.
[0071] In the fourth embodiment, before step S10, the method further includes: Step S01: periodically collect data from a data source based on a data routing mechanism, and pre-process the collected data to obtain pre-processed data.
[0072] It should be noted that the data routing mechanism is a technology or strategy used to manage and control data flow in a data system, which determines how data is transmitted from the data source to the target system. The data source refers to the original location or system that provides data, which can be a database, a file, a sensor network, a web service, or any other entity that can generate or store data. Preprocessed data refers to the data obtained after a series of preliminary processing operations are performed on the original collected data. These processing operations may include data cleaning (such as removing noise, filling missing values), data conversion (such as format conversion, unit unification), data compression, data aggregation, etc.
[0073] It should be understood that the data routing mechanism specifies the data collection frequency, collection path, data screening conditions, etc. The system reads or retrieves data from the specified data source (such as database, file, sensor, etc.). The collection process involves steps such as connecting to the data source, query execution, and data reception.
[0074] It is understandable that the data collection process may be repeated at certain time intervals, and the intervals may be fixed (eg, every hour, every day) or may be triggered based on specific events.
[0075] Step S02: generating a tiered storage strategy according to the data type and access requirements of the pre-processed data, and storing the pre-processed data in a database based on the tiered storage strategy.
[0076] It should be noted that the tiered storage strategy is a data storage management method that allocates data to different storage tiers or storage media based on access frequency, importance, size or other factors.
[0077] Specifically, before storage, you need to understand the type of preprocessed data, including its size, structure, complexity, and possible access patterns. Next, evaluate the data access requirements, including access frequency, response time requirements, data recovery time objectives, and recovery point objectives. Then, based on the analysis results of data types and access requirements, formulate a tiered storage strategy. The strategy should clearly define which data should be stored on the high-performance storage layer (such as frequently accessed hot data) and which data can be stored on the lower-cost storage layer (such as historical data or backup data). Finally, store the preprocessed data in the database according to the requirements of the tiered storage strategy.
[0078] In the fourth embodiment, after step S40, the method further includes: Step S501: compare the analysis result with a preset data quality threshold.
[0079] It should be noted that the preset data quality thresholds are standard values or acceptable ranges for a series of data quality indicators set before data processing and analysis based on business needs, industry standards or internal regulations of the organization, including the proportion of missing values must not exceed a certain percentage, the threshold set in the outlier detection algorithm, the allowable error range in the data consistency check, etc.
[0080] It should be understood that comparing the analysis results with the preset data quality threshold can be done by comparing each indicator of the target data to determine whether it meets the preset threshold. If it does, it is considered that the indicator is acceptable in terms of data quality; if it does not, it is considered that there is a quality problem. Comparing the analysis results with the preset data quality threshold can also be done by selecting specific data indicators for comparison according to business needs to form a data quality assessment report.
[0081] Step S502: When the integrity and consistency of the target data are less than the preset data quality threshold, a data quality management strategy is generated.
[0082] It should be noted that data integrity refers to the accuracy and reliability of data, ensuring that data remains unaltered, unlost, and undamaged during input, processing, transmission, and storage. Data consistency means that the same or related data should remain consistent in different data sources or data systems. This includes logical consistency, physical consistency, and temporal consistency of data. In order to improve and ensure that data quality meets business needs, data quality management strategies are a combination of a series of plans, measures, and processes, which usually include key elements such as data source control, data processing process optimization, data storage and access management, data quality monitoring and evaluation, and problem tracking and resolution.
[0083] Specifically, when the integrity and consistency of the target data are less than the preset data quality threshold, it is necessary to first analyze the root causes of the data quality problems, including problems with the data source, problems in the data processing process, or problems in the data storage and access process. When generating a data quality management strategy, it is necessary to set specific and quantifiable data quality management goals based on the results of problem identification and analysis, such as reducing the proportion of missing data to X%, reducing the number of inconsistent data to Y, etc. At the same time, determine the priority order for solving data quality problems based on business needs and resource constraints.
[0084] Step S503: clean and quality control the processed data based on the data quality management strategy to obtain display data.
[0085] It is important to understand that data cleaning is the step of correcting or removing errors, inconsistencies, and outliers in the data during data processing. Data quality control is a series of checks and verification activities performed after data cleaning. Display data is the data obtained between data processing processes for display to target users.
[0086] Furthermore, in order to make the data management and distribution process more orderly and efficient, after step S503, the following is further included: Obtain the business needs of the target terminal; Establishing a demand index table according to the business demand, the display data and the analysis result; When the demand sent by the terminal is detected, the display data and the analysis result are sent to the target terminal according to the demand index table.
[0087] It should be understood that the demand index table is a table or database table used to manage and map the relationship between business requirements and corresponding data resources, processing logic and display methods. It can help the system or application quickly respond to specific needs from different terminals or users, and ensure that data can be transmitted and displayed accurately and efficiently.
[0088] Specifically, when establishing a demand index table, it is necessary to collect the business needs of target terminal users or relevant stakeholders through market research, user interviews, questionnaires, historical data analysis, and other methods, and the demand index table should be able to clearly map the relationship between each business demand and the corresponding display data and analysis results. The index table may contain multiple fields, such as demand ID, demand description, data type, data source, analysis dimension, display method, etc. Through API interfaces, message queues, polling, etc., the demand requests sent by the target terminal are detected in real time, and the received demands are matched with the demand index table to find the corresponding data and analysis results. According to the matching results, the corresponding display data and analysis results are sent to the target terminal in an appropriate manner (such as JSON, XML, charts, etc.).
[0089] In this embodiment, data is acquired from different data sources in real time based on the data acquisition module and the data storage module, and the processed data is stored in the database using distributed storage technology. At the same time, the data management and distribution process is made more orderly and efficient by establishing a demand index table. When the terminal sends a demand, the system can quickly respond and send the corresponding display data and analysis results to ensure the high availability and reliability of the data.
[0090] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data processing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0091] This application also provides a data processing device, please refer to Figure 7 , the data processing device comprises: A data partitioning module 10 is used to partition the pre-processed data stored in the storage module according to data types and expected access patterns to obtain partitioned data sets; A logic determination module 20, used to determine the processing logic corresponding to each of the divided data sets; A sequence generation module 30 is used to decompose the processing logic into multiple processing tasks according to the processing type, and sort them according to a preset scheduling algorithm to obtain an optimal processing sequence; The data analysis module 40 is used to perform batch processing and stream processing on the data in each divided data set according to the optimal processing sequence and the processing logic to obtain data reports and analysis results.
[0092] The data processing device provided by the present application adopts the data processing method in the above embodiment, which can solve the technical problem that with the exponential growth of data volume, the traditional data processing technology is inefficient in the face of massive data, resulting in the inability to generate data analysis results in a timely manner, affecting business decisions, and it is difficult to meet the needs of real-time processing and rapid response. Compared with the prior art, the beneficial effects of the data processing device provided by the present application are the same as the beneficial effects of the data processing method provided by the above embodiment, and the other technical features in the data processing device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0093] The present application provides a data processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data processing method in the above-mentioned embodiment 1.
[0094] Reference below Figure 8 , which shows a schematic diagram of the structure of a data processing device suitable for implementing an embodiment of the present application. The data processing device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The data processing 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 application.
[0095] like Figure 8As shown, the data processing device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data processing device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data processing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a data processing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0096] In particular, according to the embodiments disclosed in the present application, 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 application 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 a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0097] The data processing device provided by the present application adopts the data processing method in the above embodiment, which can solve the technical problem that with the exponential growth of the amount of data, the traditional data processing technology is inefficient in the face of massive data, resulting in the inability to generate data analysis results in a timely manner, affecting business decisions, and it is difficult to meet the needs of real-time processing and rapid response. Compared with the prior art, the beneficial effects of the data processing device provided by the present application are the same as the beneficial effects of the data processing method provided by the above embodiment, and the other technical features in the data processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0098] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0100] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data processing method in the above-mentioned embodiment.
[0101] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, 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: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0102] The computer-readable storage medium may be included in a data processing device, or may exist independently without being incorporated into a data processing device.
[0103] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by a data processing device, the data processing device: divides the pre-processed data stored in the database according to the data type and the expected access mode to obtain each divided data set; determines the processing logic corresponding to each divided data set; decomposes the processing logic into multiple micro-processing tasks according to the processing type, and sorts the micro-processing tasks according to the scheduling algorithm to obtain an optimal processing sequence; batch processes and stream processes the data in each divided data set according to the optimal processing sequence and the processing logic to obtain target data and analysis results.
[0104] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0105] 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 application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / 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.
[0106] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0107] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data processing method, and can solve the technical problem that with the exponential growth of the amount of data, the traditional data processing technology is inefficient in the face of massive data, resulting in the inability to generate data analysis results in a timely manner, affecting business decisions, and being difficult to meet the needs of real-time processing and rapid response. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data processing method provided by the above-mentioned embodiment, and will not be repeated here.
[0108] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data processing method when executed by a processor.
[0109] The computer program product provided by the present application can solve the technical problem that with the exponential growth of data volume, traditional data processing technology is inefficient in the face of massive data, resulting in the inability to generate data analysis results in a timely manner, affecting business decisions, and it is difficult to meet the needs of real-time processing and rapid response. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data processing method provided by the above embodiment, and will not be repeated here.
[0110] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data processing method, characterized in that: The data processing method comprises: The preprocessed data stored in the database is divided according to data types and expected access patterns to obtain divided data sets; Determining processing logic corresponding to each of the divided data sets; Decomposing the processing logic into a plurality of micro-processing tasks according to the processing type, and sorting the micro-processing tasks according to the scheduling algorithm to obtain an optimal processing sequence; The data in each divided data set is batch processed and stream processed according to the optimal processing sequence and the processing logic to obtain target data and analysis results.
2. The data processing method according to claim 1, characterized in that: The step of decomposing the processing logic into a plurality of micro-processing tasks according to the processing type, and sorting the micro-processing tasks according to a preset scheduling algorithm to obtain an optimal processing sequence includes: Identify the processing logic to obtain key steps and dependencies; Decomposing the processing logic into a plurality of micro-processing tasks according to attributes of the key steps, wherein the attributes are at least one of independence, complexity, and execution time; A scheduling algorithm is determined according to the dependency relationship, and the microprocessing tasks are sorted based on the scheduling algorithm to obtain an optimal processing sequence.
3. The data processing method according to claim 1, characterized in that: The step of determining the processing logic corresponding to each of the divided data sets includes: Extracting keywords from each of the divided data sets; Classify the keywords based on business fields, data types and processing requirements, and map the keywords to corresponding processing logic templates or processes according to the classification results to obtain a mapping relationship table; The processing logic corresponding to each divided data set is determined according to the keyword and the mapping relationship table.
4. The data processing method according to claim 1, characterized in that: Before the step of dividing the preprocessed data stored in the storage module according to the data type and the expected access mode to obtain each divided data set, the step further includes: Periodically collect data from a data source based on a data routing mechanism, and pre-process the collected data to obtain pre-processed data; A tiered storage strategy is generated according to the data type and access requirement of the pre-processed data, and the pre-processed data is stored in a database based on the tiered storage strategy.
5. The data processing method according to claim 1, characterized in that: After the step of performing batch processing and stream processing on the data in each divided data set according to the optimal processing sequence and the processing logic to obtain target data and analysis results, the method further includes: comparing the analysis result with a preset data quality threshold; When the integrity and consistency of the target data are less than the preset data quality threshold, generating a data quality management strategy; The processed data is cleaned and quality controlled based on the data quality management strategy to obtain display data.
6. The data processing method according to claim 5, characterized in that: After the step of cleaning and quality controlling the processed data based on the data quality management strategy to obtain the display data, the method further includes: Obtain the business needs of the target terminal; Establishing a demand index table according to the business demand, the display data and the analysis result; When the demand sent by the terminal is detected, the display data and the analysis result are sent to the target terminal according to the demand index table.
7. A data processing device, characterized in that: The device comprises: A data partitioning module is used to partition the pre-processed data stored in the storage module according to data types and expected access patterns to obtain partitioned data sets; A logic determination module, used to determine the processing logic corresponding to each of the divided data sets; A sequence generation module, used to decompose the processing logic into multiple processing tasks according to the processing type, and sort them according to a preset scheduling algorithm to obtain an optimal processing sequence; The data analysis module is used to perform batch processing and stream processing on the data in each divided data set according to the optimal processing sequence and the processing logic to obtain data reports and analysis results.
8. A data processing device, characterized in that: The data processing device comprises: a memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein the data processing program implements the data processing method according to any one of claims 1 to 6 when executed by the processor.
9. A storage medium, characterized in that: The storage medium stores a data processing program, and when the data processing program is executed by the processor, the data processing method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a data processing program, and when the data processing program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Cash flow task processing method, device and equipment based on task data
CN113298420A
Multilayer service fusion decision-making method and system
CN113961615A
Real-time quality management and control method, device and equipment in data management process and medium
CN114610702A
Cited By
Data analysis method and device based on artificial intelligence, equipment and medium
CN119202910A
Quantile obtaining method, device, equipment and product
CN121029823A
