Big data platform data processing method, device and system
By performing heterogeneous processing and data attribute analysis on the cluster nodes of the big data platform, the decision tree algorithm classification model is used to divide the data into hot data and cold data, which are stored on different nodes respectively, solving the problem of low data storage efficiency and insufficient security. problems, enabling more efficient data management and security.
Patent Information
- Application Number
- CN202410753262.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-30
AI Technical Summary
The unified storage method of data in the existing big data platform leads to low storage efficiency, insufficient security and stability, especially for data management and storage that require fast response and high availability.
By performing heterogeneous processing on the cluster nodes, the attribute information of the data is obtained and the data classification model trained by the decision tree algorithm is used to classify the data, and hot data and cold data are stored on different types of nodes.
It optimizes the efficiency and cost of data storage and management, and improves data security and stability.
Smart Images

Figure CN118568790A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a big data platform data processing method, device and system. Background Art
[0002] At present, the data collected by various management units and project sites through the big data platform are generally managed and stored in a unified way. In other words, the various data storage strategies and methods are the same, which increases the efficiency and cost of data storage and management.
[0003] Since all types of data are stored in a unified manner, the storage efficiency of the data is low. At the same time, for data that requires rapid response and high availability strategies, unified management and storage of data will reduce the security and stability of such data. Summary of the invention
[0004] The present invention provides a big data platform data processing method, device and system to solve at least one of the above-mentioned problems.
[0005] According to a first aspect of the present invention, a method for processing data on a big data platform is provided, the method comprising: performing heterogeneous processing on at least two cluster nodes for storing data in advance according to predetermined rules to obtain first-type nodes and second-type nodes; obtaining attribute information of each data in a database; inputting the attribute information of each data in the database into a pre-trained data classification model to output a classification label of each data, the data classification model being trained based on a decision number algorithm and training text; and storing each data in the first-type node or the second-type node according to the classification label of each data.
[0006] Specifically, performing heterogeneous processing on at least two cluster nodes for storing data in advance according to a predetermined rule includes: performing heterogeneous processing on the at least two cluster nodes in advance according to storage performance of each cluster node.
[0007] Preferably, before acquiring the attribute information of each data in the database, the method further comprises: recording and storing operation information related to each data in the database; and generating the attribute information of each data according to the operation information.
[0008] Specifically, the attribute information includes: access mode and access requirement, and the data classification model is trained in the following manner: constructing an initial data classification model based on the decision number algorithm; training the initial data classification model according to the training text, and the training text includes: historical data in the database and its historical attribute information; when the evaluation result of the initial data classification model meets the predetermined conditions, it is determined that the training of the initial data classification model is completed, and the data classification model is obtained.
[0009] Preferably, the decision tree algorithm is a gradient boosting decision tree algorithm, and training the initial data classification model according to the training text includes: preprocessing the training file; inputting the preprocessed training file into the initial data classification model, and training the initial data classification model based on the gradient boosting decision tree algorithm.
[0010] According to a second aspect of the present invention, there is provided a data processing device, the device comprising: a heterogeneous processing unit, for pre-processing heterogeneously at least two cluster nodes for storing data according to predetermined rules to obtain first-category nodes and second-category nodes; an information acquisition unit, for acquiring attribute information of each data in a database; a classification unit, for inputting the attribute information of each data in the database into a pre-trained data classification model to output a classification label of each data, the data classification model being trained based on a decision number algorithm and training text; and a storage unit, for storing each data in the first-category node or the second-category node according to the classification label of each data.
[0011] Specifically, the heterogeneous processing unit is specifically used to: pre-perform heterogeneous processing on the at least two cluster nodes according to the storage performance of each cluster node.
[0012] Preferably, the device further comprises: a recording unit, used for recording and storing operation information related to each data in the database; and an attribute information generating unit, used for generating attribute information of each data according to the operation information.
[0013] Preferably, the attribute information includes: access mode and access requirement, and the device also includes: a model training unit for training the data classification model, and the model training unit includes: a model construction module for constructing an initial data classification model based on the decision number algorithm; a training module for training the initial data classification model according to the training text, and the training text includes: historical data in a database and its historical attribute information; an evaluation module for determining that the training of the initial data classification model is completed and obtaining the data classification model when the evaluation result of the initial data classification model meets a predetermined condition.
[0014] According to a third aspect of the present invention, there is provided a data processing system, the system comprising: at least two cluster nodes, and the above-mentioned data processing device.
[0015] At the same time, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the above method is implemented when the processor executes the computer program.
[0016] At the same time, the present invention also provides a computer-readable storage medium, which stores a computer program for executing the above method.
[0017] It can be seen from the above technical solution that by performing heterogeneous classification processing on the cluster nodes, different types of nodes are obtained. At the same time, each data is classified and processed through the data classification model according to the attribute information of each data in the database, and then the classified data is stored in different nodes respectively. Compared with the unified data storage method in the prior art, this technical solution adopts different data storage strategies based on data attributes, which can optimize the efficiency and cost of data storage and management, and improve the security and stability of data.
[0018] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 is a flow chart of a big data platform data processing method according to an embodiment of the present invention;
[0021] Figure 2 It is a schematic diagram of the data processing flow based on MySQL (relational database management system) database;
[0022] Figure 3 is a structural block diagram of a data processing system according to an embodiment of the present invention;
[0023] Figure 4 is a structural block diagram of a data processing device 1 according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Since there is no analysis and calculation of data usage and usage value at present, a unified method is used to store data, which leads to low data storage efficiency, and low security and stability. Based on this, an embodiment of the present invention proposes a data processing solution, which analyzes the usage and value of data, divides the data into "hot data" and "cold data", and adopts different storage strategies for hot and cold data, so as to optimize the efficiency and cost of data storage and management, and improve the security and stability of data.
[0026] In one embodiment, hot data and cold data can be determined by the access frequency of data. Hot data refers to data that is frequently accessed and used, while cold data refers to data that is infrequently accessed and used.
[0027] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0028] Figure 1 is a flow chart of a big data platform data processing method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0029] Step 101 : heterogeneously process at least two cluster nodes for storing data in advance according to a predetermined rule to obtain a first type of node and a second type of node.
[0030] In one embodiment, multiple cluster nodes can be processed heterogeneously in advance according to the storage performance of each cluster node, and the cluster nodes can be classified so that data of different types or different requirements can be stored. For example, nodes with high-speed and high-performance storage performance are first-class nodes, and storage nodes with low cost, large capacity, and low maintenance cost are second-class nodes.
[0031] Step 102: Obtain attribute information of each data in the database.
[0032] The attribute information here may be the access mode and access requirements of the data, for example, access frequency, usage value, etc.
[0033] Before executing step 102, operation information related to each data in the database may be recorded and stored, such as the frequency of data read and write operations, etc. Subsequently, attribute information of each data may be generated based on the operation information, so as to classify the data into "hot data" and "cold data".
[0034] Step 103, inputting the attribute information of each data in the database into a pre-trained data classification model to output a classification label of each data, wherein the data classification model is trained based on a decision number algorithm and training text.
[0035] Step 104 , storing each data into the first type of node or the second type of node respectively according to the classification label of each data.
[0036] In specific implementation, hot data is data that is frequently used and accessed, usually of high value and importance, and requires fast response and high availability. Therefore. This type of data requires the use of high-speed, high-performance storage devices and technologies, such as solid-state drives (SSDs), in-memory databases, etc. Cold data is data that is not frequently accessed and used, usually of low value, but needs to be retained for a long time. Therefore, storage devices and technologies with lower costs, larger capacity, and lower maintenance costs can be used, such as mechanical hard drives, tape storage, etc.
[0037] The embodiment of the present invention obtains different types of nodes by performing heterogeneous classification processing on cluster nodes, and classifies each data through a data classification model according to the attribute information of each data in the database, and then stores the classified data in different nodes respectively. Compared with the unified data storage method in the prior art, the embodiment of the present invention adopts different data storage strategies based on data attributes, which can optimize the efficiency and cost of data storage and management and improve the security and stability of data.
[0038] In actual operation, the above-mentioned data classification model can be trained in the following manner: constructing an initial data classification model based on the decision number algorithm; training the initial data classification model according to the training text, wherein the training text includes: historical data in a database and its historical attribute information; when the evaluation result of the initial data classification model meets predetermined conditions, determining that the training of the initial data classification model is completed, and obtaining the data classification model.
[0039] In one embodiment, the above-mentioned decision tree algorithm can adopt the gradient boosting decision tree (Gradient Boosting Decision Tree, GBDT) algorithm. The GBDT algorithm is an integrated algorithm based on decision trees, which has good effects in data analysis and prediction. Among them, Gradient Boosting is an algorithm in the integrated method boosting, which iterates the new learner by gradient descent. And the CART decision tree is used in GBDT. Boosting is generally equivalent to connecting multiple learners in series. The GBDT algorithm improves the accuracy of the overall classifier by continuously iterating weak classifiers. The GBDT algorithm is mainly used to solve regression and classification problems. The GBDT algorithm performs well in regression problems, especially in dealing with nonlinear regression problems. In classification problems, the GBDT algorithm performs better when dealing with high-dimensional sparse data.
[0040] In the specific model training process, the training file can be preprocessed first; then the preprocessed training file is input into the initial data classification model, and the initial data classification model is trained based on the gradient boosting decision tree algorithm.
[0041] The preprocessing operations here include: filling missing data, deleting abnormal data, removing duplicate data, etc. Through preprocessing operations, the quality and accuracy of the data can be guaranteed.
[0042] In specific implementation, the database in the embodiment of the present invention can also provide data collection and data sharing for multiple units and multiple project sites through "data sharing". Data sharing can not only collect data from the bottom up, but also manage data from the top down. The data sharing platform collects, cleans, mines, and stores data in warehouses. By monitoring the database and learning and analyzing historical data, a data classification model is trained to achieve real-time analysis of data and efficient classification storage.
[0043] In actual operation, the learning and analysis process of historical data first requires the collection of historical data, which can be data from various data sources such as databases, files, logs, sensors, etc. Subsequently, the data needs to be cleaned and preprocessed, including operations such as filling missing values, deleting outliers, and removing duplicate values to ensure the quality and accuracy of the data. After modeling and training the historical data, the model needs to be evaluated and optimized. In specific implementation, the performance of the model can be evaluated using evaluation indicators in related technologies, and optimization operations such as parameter adjustment and feature selection can be performed based on the evaluation results to improve the accuracy and generalization ability of the model. Using the trained model to perform analysis operations such as prediction, classification, clustering, and association rule mining on historical data can obtain insights and understanding of historical data. Specifically, the analysis operations may include: analyzing trends, discovering patterns, identifying anomalies, etc. In one embodiment, the analysis results can be visualized by making charts, drawing maps, generating reports, etc., so that the analysis conclusions can be better understood and communicated.
[0044] In one example, when constructing and training a data classification model based on the GBDT algorithm, it is first necessary to collect data and perform preprocessing operations such as data cleaning, feature selection, and feature transformation to ensure the quality and accuracy of the data. In the GBDT algorithm, features usually use numerical data and need to be discretized. Next, a data classification model based on the GBDT algorithm is established. The process includes: determining the number of decision trees, the depth of the tree, the loss function, the learning rate and other hyperparameters, and then training the model. In the GBDT algorithm, each decision tree is established based on the residual of the previous tree, that is, the target value minus the predicted value is used as the new target value for learning. During the training process, the GBDT model iteratively constructs multiple decision trees. First, the predicted value of the model is initialized to the global average or other initial value. Then, the residual is calculated, that is, the actual target value is subtracted from the predicted value of the current model. Next, a new decision tree is trained based on the residual and added to the model. By iterating this process, the prediction ability of the model is gradually improved. After the GBDT model is trained, model evaluation is required. The performance of the model can be evaluated using indicators such as cross-validation, ROC curve, AUC, etc., and parameter adjustment and optimization operations can be performed as needed to improve the accuracy and generalization ability of the model. After that, the trained GBDT model is used to predict or classify new data. During the prediction process, the new data needs to be input into the trained model to obtain the corresponding prediction results. The GBDT model obtains the final prediction result by weighted summing the prediction results of multiple decision trees. When using the GBDT algorithm for data analysis, the prediction results of the model can be explained by analyzing the structure and feature importance of the decision tree.
[0045] In actual operation, the GBDT algorithm may have problems such as overfitting and underfitting, which need to be solved by adjusting parameters, adding regularization terms, etc. In addition, the GBDT algorithm may be affected by outliers and missing values in some cases, so data cleaning and preprocessing are required to ensure data quality.
[0046] The embodiment of the present invention trains a data classification model based on data collection, data analysis and learning, classifies the data in the database into cold and hot data, and distinguishes which data needs to be read in real time and which data does not have high real-time requirements, thereby providing customers with more reliable, fast and accurate data services.
[0047] In the specific implementation process, a data classification model can also be constructed based on a CBR (Case-Based Reasoning) algorithm. The CBR algorithm is an artificial intelligence algorithm based on analogical reasoning, and its main idea is to solve the current problem by analogy with the problems that have been solved. First, it is necessary to obtain the current problem to be solved. The CBR algorithm will search for historical cases similar to the current problem in the case library. If a historical case similar to the current problem is found, the CBR algorithm will apply the solution in the historical case to the current problem through analogical reasoning and generate a new solution. The CBR algorithm will evaluate the feasibility and effectiveness of the generated solution to determine whether the solution can be used to solve the current problem. If the generated solution is confirmed to be feasible and effective, the CBR algorithm will apply the solution to the current problem and output the final result. That is, by constructing and training a data classification model based on the CBR algorithm, data can also be predicted and classified into hot and cold data. For the specific implementation process, reference can be made to the relevant technology, and the present invention is not limited to this.
[0048] Figure 2 This is a data processing flow diagram based on MySQL (relational database management system) database, such as Figure 2 As shown in the figure, the data in the database can be classified and processed through write requests. According to the data access mode and requirements, the data can be classified and stored in layers, and hot data can be placed on faster and higher-performance storage media, while cold data can be stored on cheaper and lower-performance storage media to achieve more efficient data management and resource utilization.
[0049] See also Figure 2 As shown in the figure, binlog is a binary log file in the MySQL database, which records all modification operations on the MySQL database. It contains a series of events, such as insert, update, delete, etc., which are recorded in the binlog in binary format. Binlog can be used for data recovery, master-slave replication and other functions. In terms of data recovery, if the MySQL database crashes or data is lost for some reason, binlog can be used to restore the data. In terms of master-slave replication, the binlog of the master database can be transferred to the slave database to achieve data synchronization between the master and slave databases.
[0050] Canal can capture the binlog logs of the MySQL database, parse these logs into data change events, and then push these events to downstream applications for consumption. At the same time, Canal can help realize real-time data synchronization, data decoupling, real-time monitoring and data analysis.
[0051] By separating hot and cold data, we can effectively improve data storage efficiency, reduce data management and storage costs, ensure fast response and high availability of hot data, and improve data security and stability.
[0052] Based on similar inventive concepts, an embodiment of the present invention further provides a data processing system, see Figure 3 The system comprises: a data processing device 1 and at least two cluster nodes 2. The data processing device 1 can preferably be used to implement each process of the above-mentioned big data platform data processing method.
[0053] Figure 4 is a structural block diagram of the data processing device 1, such as Figure 4 As shown, the data processing device 1 includes: a heterogeneous processing unit 11, an information acquisition unit 12, a classification unit 13 and a storage unit 14, wherein:
[0054] The heterogeneous processing unit 11 is used to perform heterogeneous processing on at least two cluster nodes for storing data in advance according to a predetermined rule to obtain a first type of node and a second type of node.
[0055] Specifically, the heterogeneous processing unit may perform heterogeneous processing on the at least two cluster nodes in advance according to the storage performance of each cluster node.
[0056] The heterogeneous processing unit 11 regularly divides the cluster nodes into different types, some of which are high-performance nodes for storing hot data, and some of which are relatively poor performance large-capacity nodes for storing cold data. In this way, not only the performance of hot data can be guaranteed, but also the storage of cold data can be guaranteed, reducing storage costs.
[0057] The information acquisition unit 12 is used to acquire the attribute information of each data in the database, wherein the attribute information includes: access mode and access requirement.
[0058] A classification unit 13, used for inputting attribute information of each data in the database into a pre-trained data classification model to output a classification label of each data, wherein the data classification model is trained based on a decision number algorithm and training text;
[0059] The storage unit 14 is used to store each data into the first type of node or the second type of node according to the classification label of each data.
[0060] The embodiment of the present invention performs heterogeneous classification processing on the cluster nodes through the heterogeneous processing unit 11 to obtain different types of nodes. At the same time, the classification unit 13 classifies each data according to the attribute information of each data in the database obtained by the information acquisition unit 12. Then the storage unit 14 stores the classified data in different nodes respectively. Compared with the unified data storage method in the prior art, the embodiment of the present invention adopts different data storage strategies based on data attributes, which can optimize the efficiency and cost of data storage and management and improve the security and stability of data.
[0061] In one embodiment, the above-mentioned device also includes: a recording unit and an attribute information generating unit, wherein: the recording unit is used to record and store operation information related to each data in the database; the attribute information generating unit is used to generate attribute information of each data according to the operation information.
[0062] In a specific implementation, the above device further includes: a model training unit for training the above data classification model. Specifically, the model training unit includes: a model building module, a training module and an evaluation module, wherein:
[0063] A model building module, used to build an initial data classification model based on the decision number algorithm;
[0064] A training module, used to train the initial data classification model according to the training text, wherein the training text includes: historical data and historical attribute information in a database;
[0065] An evaluation module is used to determine that the training of the initial data classification model is completed and obtain the data classification model when the evaluation result of the initial data classification model meets a predetermined condition.
[0066] Preferably, the decision tree algorithm may be a gradient boosting decision tree algorithm. The training module may perform a preprocessing operation on the training file, then input the preprocessed training file into the initial data classification model, and perform a training operation on the initial data classification model based on the gradient boosting decision tree algorithm.
[0067] In one embodiment, the data processing device 1 can also scan the incoming and outgoing data, and the scanning results will be uploaded to the server for processing and storage, thereby providing statistical analysis and query functions. Users can view the network behavior analysis data of the past 6 months and customize daily / weekly / monthly reports through the human-computer interface to facilitate subsequent work.
[0068] The specific execution process of the above-mentioned units and modules can be found in the description of the above-mentioned method embodiment, which will not be repeated here.
[0069] In actual operation, the above-mentioned units and modules may be provided in combination or individually, and the present invention is not limited thereto.
[0070] This embodiment also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The electronic device may be a desktop computer, a tablet computer, a mobile terminal, etc., but this embodiment is not limited thereto. In this embodiment, the electronic device may be implemented with reference to the above method embodiment and the data processing device / system embodiment, the contents of which are incorporated herein, and the repeated parts are not repeated.
[0071] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned big data platform data processing method are implemented.
[0072] The embodiment of the present invention classifies data into hot and cold data based on data collection, data analysis and learning, and stores the hot and cold data respectively in matching nodes. Compared with the unified data storage method in the prior art, the embodiment of the present invention adopts different data storage strategies based on data attributes, which can optimize the efficiency and cost of data storage and management and improve the security and stability of data.
[0073] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A big data platform data processing method, characterized in that: The method comprises: Performing heterogeneous processing on at least two cluster nodes for storing data in advance according to a predetermined rule to obtain a first type of node and a second type of node; Get the attribute information of each data in the database; Inputting attribute information of each data in the database into a pre-trained data classification model to output a classification label of each data, wherein the data classification model is trained based on a decision number algorithm and training text; Each data is stored in the first type of node or the second type of node according to the classification label of each data.
2. The method according to claim 1, characterized in that Preliminarily performing heterogeneous processing on at least two cluster nodes for storing data according to a predetermined rule includes: Heterogeneous processing is performed on the at least two cluster nodes in advance according to the storage performance of each cluster node.
3. The method according to claim 1, characterized in that Before obtaining the attribute information of each data in the database, the method further includes: Record and store operation information related to each data in the database; The attribute information of each data is generated according to the operation information.
4. The method according to claim 1, characterized in that The attribute information includes: access mode and access requirement. The data classification model is trained in the following manner: Constructing an initial data classification model based on the decision number algorithm; The initial data classification model is trained according to the training text, wherein the training text includes: historical data and historical attribute information thereof in a database; When the evaluation result of the initial data classification model meets a predetermined condition, it is determined that the training of the initial data classification model is completed, and the data classification model is obtained.
5. The method according to claim 4, characterized in that The decision tree algorithm is a gradient boosting decision tree algorithm, and training the initial data classification model according to the training text includes: Performing a preprocessing operation on the training file; The preprocessed training file is input into the initial data classification model, and a training operation is performed on the initial data classification model based on the gradient boosting decision tree algorithm.
6. A data processing device, characterized in that: The device comprises: A heterogeneous processing unit, used to perform heterogeneous processing on at least two cluster nodes for storing data in advance according to a predetermined rule to obtain a first type of node and a second type of node; An information acquisition unit, used to acquire attribute information of each data in the database; A classification unit, used for inputting attribute information of each data in the database into a pre-trained data classification model to output a classification label of each data, wherein the data classification model is trained based on a decision number algorithm and training text; The storage unit is used to store each data into the first type of node or the second type of node according to the classification label of each data.
7. The device according to claim 6, characterized in that The heterogeneous processing unit is specifically used for: Heterogeneous processing is performed on the at least two cluster nodes in advance according to the storage performance of each cluster node.
8. The device according to claim 6, characterized in that The device also includes: A recording unit, used to record and store operation information related to each data in the database; The attribute information generating unit is used to generate the attribute information of each data according to the operation information.
9. The device according to claim 6, characterized in that The attribute information includes: access mode and access requirement, and the device further includes: A model training unit, used for training the data classification model, The model training unit comprises: A model building module, used to build an initial data classification model based on the decision number algorithm; A training module, used to train the initial data classification model according to the training text, wherein the training text includes: historical data and historical attribute information in a database; An evaluation module is used to determine that the training of the initial data classification model is completed and obtain the data classification model when the evaluation result of the initial data classification model meets a predetermined condition.
10. A data processing system, characterized in that: The system comprises: at least two cluster nodes, and the data processing device according to any one of claims 6 to 9.
Citation Information
Cited By
Comprehensive analysis and management system for data platform
CN119597604A
Node classification method and device, related equipment and computer program product
CN119697020A
