A data processing method based on blockchain technology
By optimizing the burning consensus mechanism and combining the annealing moth algorithm with vertical correlation analysis, the efficiency and adaptability issues of game data blockchain were solved, achieving efficient data processing and abnormal data identification, and improving the stability and security of the game system.
Patent Information
- Application Number
- CN202511352662.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-09-22
AI Technical Summary
Existing technologies for game data blockchains suffer from inefficiency, lack of adaptability, and inadequate handling and adjustment of abnormal data, impacting game experience and system stability.
The combustion consensus mechanism is optimized by adopting the annealing moth algorithm. Combined with vertical correlation analysis and cluster anomaly analysis, the transaction operation set is screened, abnormal data is identified and adjusted, and parameters, rules and technologies are optimized to adapt to the business logic and processing needs of different games.
It improves the efficiency of blockchain nodes in verifying transaction operation sets, enhances the stability and reliability of the system in complex game scenarios, can promptly fix system vulnerabilities, prevent potential attacks, and adapt to the ever-changing game environment and business needs.
Smart Images

Figure CN120849515B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a data processing method based on blockchain technology. BACKGROUND
[0002] In today's booming digital game industry, blockchain technology has been widely applied in the game field due to its characteristics of decentralization, tamper resistance, security and reliability. Blockchain technology brings new economic systems, asset ownership and player interaction patterns to games, such as players can truly own virtual assets in games and trade between different games.
[0003] Due to the unique business logic and processing needs of different games, such as competitive games focusing on real-time and high-frequency transactions, and role-playing games focusing on long-term value and stability of assets. The traditional burn proof mechanism often uses fixed parameters and rules, which cannot be dynamically adjusted according to the specific characteristics of the game, resulting in low verification efficiency and long transaction confirmation time in some game scenarios, affecting the gaming experience of players. With the continuous development and innovation of the game industry, new game modes and play methods emerge in an endless stream. The traditional burn proof mechanism is difficult to quickly adapt to these changes, and cannot meet the needs of game developers and players in a timely manner, limiting the further promotion and application of blockchain technology in the game field.
[0004] In the blockchain network, due to various reasons such as network attacks, node failures, player violations, etc., abnormal data may be generated. These abnormal data not only affect the stability and reliability of the blockchain system, but also may cause the imbalance of the economic system in the game and harm the interests of players.
[0005] In summary, in order to solve the problems of low efficiency, insufficient adaptability and insufficient processing and mechanism adjustment of abnormal data of the burn proof mechanism of the game data blockchain in the prior art, a more efficient, flexible and intelligent data processing method based on blockchain technology is needed to meet the needs of the continuous development of the game industry. SUMMARY
[0006] The present application provides a data processing method based on blockchain technology to solve the defects of low efficiency, insufficient adaptability and insufficient processing and mechanism adjustment of abnormal data of the burn proof mechanism of the game data blockchain in the prior art.
[0007] The present application provides a data processing method based on blockchain technology, which is used for processing game data according to an optimized consensus mechanism, comprising:
[0008] Collecting operation data and user behavior data of players in the game process at a predetermined time interval.
[0009] An improved combustion consensus mechanism is obtained by optimizing the combustion proof mechanism using an annealing moth algorithm, operation data is processed according to the business logic and processing requirements of different games to obtain a transaction operation set, and the transaction operation set is analyzed according to user behavior data using a longitudinal correlation analysis method to obtain a screening data set.
[0010] It is judged whether the number of screening data sets of each node in the area chain verified by the improved combustion consensus mechanism reaches a preset number, if yes, the screening data sets are taken as game record data, and if not, the screening data sets are taken as abnormal data.
[0011] An abnormal reason is obtained by analyzing the abnormal data according to user behavior data using a clustering anomaly analysis method, and the improved combustion consensus mechanism is adjusted.
[0012] According to the data processing method based on the blockchain technology provided by the application, the step of optimizing the improved combustion consensus mechanism comprises:
[0013] Each parameter of the combustion consensus mechanism is taken as a moth individual in the annealing moth algorithm, and the position and speed of each moth individual are randomly initialized.
[0014] The fitness function is determined according to the optimization target of the combustion proof mechanism, and the corresponding fitness value is calculated in combination with the initial state and speed of different nodes, and the formula is expressed as:
[0015]
[0016] In the formula, is the combustion amount, is the combustion time, is the cost of combustion , is the historical contribution score of the node, is the weight coefficient, is the maximum allowed combustion time, is the fitness function. All fitness values are arranged in ascending order, the positions of the first preset number of moth individuals are selected as flame positions, and the highest fitness value is selected as the current optimal position.
[0017] All current moth individuals are updated according to the flame position and the current optimal position to obtain a plurality of updated positions.
[0018] The fitness value corresponding to each updated position is calculated according to the fitness function, and the parameters corresponding to the highest updated position are selected to form the combustion consensus mechanism to obtain the improved combustion consensus mechanism.
[0019]
[0020] According to the data processing method based on the blockchain technology, the step of obtaining the transaction operation set comprises:
[0021] The field representing the transaction behavior and the identifier are taken as the transaction related field, and the transaction data is filtered from the operation data according to the transaction related field.
[0022] The repeated records in the transaction data are removed, the missing values are processed according to the business logic, and the abnormal records are obtained by analyzing the range and distribution of the transaction data.
[0023] The abnormal records are analyzed according to the processing requirement, the unreasonable reasons are determined, the transaction data is checked based on the business rules, and the transaction operation set is obtained by grouping according to the transaction time field.
[0024] According to the data processing method based on the blockchain technology, the step of obtaining the transaction operation set comprises:
[0025] The basic statistical quantity in the transaction operation set is calculated to obtain the transaction scale distribution data, and the sensitive field in the user behavior data is counted to obtain the behavior sensitive data.
[0026] The correlation between the transaction scale distribution data and the behavior sensitive data is analyzed by using the longitudinal correlation analysis method.
[0027] The transaction operation set is classified according to different dimensions, and the category difference data is obtained by analyzing the difference of the user behavior data in different categories.
[0028] The screening condition is determined according to the correlation and the category difference data, the transaction operation set is screened to obtain the screening data set.
[0029] According to the data processing method based on the blockchain technology, the step of obtaining the transaction operation set comprises:
[0030] The transaction scale distribution data is taken as the response variable, the behavior sensitive data is taken as the explanatory variable, and the Poisson distribution family is selected according to the nature of the response variable to determine the log link function.
[0031] The generalized estimating equation is constructed according to the Poisson distribution family, the log link function and the exchange structure matrix.
[0032] The generalized estimating equation is solved by using the spectrum optimization algorithm to obtain the correlation parameter, and the correlation is obtained by analyzing the correlation parameter.
[0033] According to the data processing method based on the blockchain technology, the step of obtaining the transaction operation set comprises:
[0034] The generalized estimating equation is converted into a matrix form, and the formula is expressed as:
[0035]
[0036] wherein, is the observed response variable value, is the mean vector of the predicted response variable, is a diagonal matrix, is a transpose matrix.
[0037] The objective function related to the generalized estimating equation is constructed, and the forward gradient of the forward parameter and the backward gradient of the backward parameter are calculated, which is expressed as:
[0038]
[0039]
[0040] wherein, is the forward gradient of the forward parameter, is the backward gradient of the backward parameter, is the partial derivative of the mean vector with respect to the forward parameter, is the derivative of the diagonal matrix with respect to the backward parameter, is the transpose. The eigenvalue decomposition of the matrix form is performed to obtain the eigenvector, and the search direction is determined according to the eigenvector, and the objective function is updated combined with the forward gradient and the backward gradient, until the preset iteration number is reached, to obtain the associated parameters, which is expressed as:
[0041]
[0042]
[0043]
[0044] wherein, is the step size of the th iteration, is the search direction of the forward parameter at the th iteration, is the value of the forward parameter at the th iteration, is the value of the forward parameter after the th iteration update, is the search direction of the backward parameter at the th iteration, is the value of the backward parameter at the th iteration, is the value of the backward parameter after the th iteration update.
[0045] According to the data processing method based on the blockchain technology provided by the application, the step of analyzing the abnormal reason comprises:
[0046] The user behavior data of different sources and types is integrated into a unified comprehensive database, and the repeated values and abnormal values are removed.
[0047] The abnormal related features are determined according to the type and business background of the abnormal data, and the key abnormal features are screened from the abnormal related features by using the chi-square test.
[0048] The user behavior data and the key abnormal features after processing are integrated to obtain associated record data.
[0049] The associated record data is calculated by using the K-Means algorithm, and the abnormal data cluster is determined by combining the business background, and the abnormal data cluster is compared and analyzed with other data clusters to obtain the abnormal data common features.
[0050] The abnormal reason is determined according to the abnormal data common features and the discovered behavior mode.
[0051] According to the data processing method based on the blockchain technology provided by the application, the step of screening the key abnormal features comprises:
[0052] Samples containing abnormal data and other data are collected from the database and log files of the game, and the abnormal feature values of each sample are recorded.
[0053] For each abnormal related feature, the abnormal feature values are classified, a contingency table is constructed, and the expected frequency of each cell is calculated according to the row sum, column sum and total sample number in the contingency table.
[0054] The chi-square statistic is calculated according to the expected frequency.
[0055] The degrees of freedom are calculated according to the contingency table.
[0056] The critical value is determined according to the degrees of freedom and the preset significance level, and it is judged whether it is greater than the chi-square statistic, yes, as the key abnormal feature, otherwise, delete.
[0057] According to the data processing method based on the blockchain technology provided by the application, the step of adjusting the improved combustion consensus mechanism comprises:
[0058] According to the abnormal reason, the system log and data flow are tracked, the abnormal source is determined, and the parameters, rules and technologies in the improved combustion consensus mechanism are adjusted.
[0059] The improved combustion consensus mechanism is tested, and feedback data is obtained by selecting nodes of preset areas in a regional chain network using different game data and scenes.
[0060] The parameters, rules and technologies are adjusted based on the feedback data until the preset requirements are met.
[0061] According to the data processing method based on the blockchain technology provided by the application, the step of adjusting the parameters, rules and technologies comprises:
[0062] The combustion rate, combustion interval and node reward parameters in the parameters are adjusted.
[0063] The verification condition is added, the process is optimized, and the punishment mechanism is introduced.
[0064] The network is optimized, the smart contract code is reviewed and updated, and the hardware is upgraded.
[0065] The data processing method based on the blockchain technology provided by the application uses the annealing moth algorithm to optimize the combustion proof mechanism, and obtains the improved combustion consensus mechanism. The algorithm optimizes and adjusts the parameters of the combustion consensus mechanism, so that the improved mechanism can dynamically adapt to different games according to the specific conditions, and improves the applicability and efficiency of the consensus mechanism in different game scenes. And the operation data is processed, according to the business logic and processing requirements of different games, the transaction related fields are screened out, the repeated records are removed, the missing values and abnormal records are processed, and finally the transaction operation set is obtained, which improves the quality and usability of the data.
[0066] The data processing method based on the blockchain technology provided by the application uses the longitudinal correlation analysis method, combines the user behavior data to analyze the transaction operation set, determines the screening condition, obtains the screening data set, can mine the internal correlation between data, accurately screens out valuable data, and provides more accurate basis for subsequent verification and analysis. By judging whether the number of screening data sets passing the improved combustion consensus mechanism verification reaches the preset number, abnormal data can be quickly and accurately identified. Also using clustering anomaly analysis method, according to user behavior data, the abnormal data is analyzed in depth, and the abnormal reason is found out. Then according to the abnormal reason, the improved combustion consensus mechanism is adjusted, so that the consensus mechanism can continuously adapt to new situation, improve the stability and security of the system. BRIEF DESCRIPTION OF DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0068] Fig. 1 is one of the flow diagrams of the data processing method based on the blockchain technology provided by the embodiments of the present application.
[0069] Fig. 2 is another flow diagram of the data processing method based on the blockchain technology provided by the embodiments of the present application. DETAILED DESCRIPTION
[0070] In order to make the objects, technical solutions and advantages of the present application clearer, the following will combine the drawings in the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0071] The following will combine Figs. 1-2 to describe a data processing method based on the blockchain technology of the present application.
[0072] As Fig. 1 shown, the data processing method based on the blockchain technology provided by the embodiments of the present application comprises:
[0073] Collecting the operation data and user behavior data of the players in the game process at preset time intervals. The operation data can include the operation instructions (moving, attacking, using props, etc.) of the players, the character attributes (level, health, attack power, etc.), the in-game transaction information (buying props, selling equipment, etc.), and the game scene data (map information, monster distribution, etc.).
[0074] The user behavior data can include the login information of the user (such as login time, location, device type), the in-game operation record (frequency and time point of moving, attacking, using props, etc.), the transaction behavior data (transaction object, transaction amount, transaction item, etc.), the social interaction data (chat record with other players, teaming situation, etc.), and any other data that can be related to the game state.
[0075] An improved burning consensus mechanism is obtained by optimizing the burning proof mechanism using the annealing moth algorithm. Based on the business logic and processing requirements of different games, the operation data is processed to obtain a transaction operation set. The vertical correlation analysis method is used to analyze the transaction operation set based on user behavior data to obtain a filtered dataset.
[0076] The steps to optimize and improve the combustion consensus mechanism include:
[0077] Each parameter of the burning consensus mechanism is treated as an individual moth in the annealing moth algorithm, and the position and velocity of each individual moth are randomly initialized. Position can be represented as a vector, the dimension of which is related to the parameters to be optimized, such as the parameter vector related to energy consumption and verification time in the burning proof mechanism. Velocity is also a vector, used to represent the speed and direction of a node's movement in the search space.
[0078] The fitness function is determined based on the optimization objective of the combustion proof mechanism, and the corresponding fitness value is calculated by combining the initial state and velocity of different nodes. The formula is expressed as follows:
[0079]
[0080] In the formula, It's the amount of fuel burned. It is the burning time. It is combustion The cost, It is a score based on the node's historical contribution. These are weighting coefficients. It is the maximum permissible combustion time. It is the fitness function.
[0081] The steps to obtain the node's historical contribution score may include: burning behavior history: the cumulative amount of burning in the past period (the historical cumulative value of burning), burning frequency, and burning stability (such as whether the burning is completed on time).
[0082] Network contribution: Burning behavior contributes to network security (e.g., increasing consensus credibility) and to the fairness of resource allocation (e.g., preventing monopolistic burning).
[0083] Time decay factor: The contribution weight of recent periods is higher than that of distant periods.
[0084] Collection Nodes The historical combustion records are used, and the combustion volume is time-weighted to reflect the priority of the contribution.
[0085] A scoring function is set for combustion behavior history, network contribution, and time decay factor, and the node historical contribution score is calculated by combining empirical coefficients.
[0086] According to the core target (such as safety, efficiency, fairness) of the burning proof mechanism, the three indexes in the formula are associated with the target, and the weights are manually set by domain experts according to the mechanism design target (applicable to the scene with clear target), and The sum is equal to 1.
[0087] All fitness values are arranged in ascending order, and the positions of the first preset number of firefly individuals are selected as the flame positions, and the highest fitness value is selected as the current optimal position.
[0088] All current firefly individuals are updated according to the flame position and the current optimal position to obtain a plurality of updated positions, which is expressed by the formula:
[0089]
[0090] In the formula, is the updated position, is the current firefly individual position, and is the moving distance of the firefly at the th iteration, is a coefficient for controlling the step length, is a weight coefficient, is the flame position, is the current optimal position, is the spiral flight trajectory of the simulated firefly around the flame.
[0091] According to the fitness function, the fitness value corresponding to each updated position is calculated, and the parameters corresponding to the highest updated position are selected to form the improved burning consensus mechanism.
[0092] The step of obtaining the transaction operation set includes:
[0093] The fields representing the transaction behavior and the identifier are taken as the transaction related fields, and the transaction data is filtered from the operation data according to the transaction related fields. Only records containing in-game transaction information are filtered from the operation data, and the operation instructions (such as moving, attacking, etc.), character attributes (level, health, etc.) and game scene data (map information, monster distribution, etc.) unrelated to transactions are excluded. For example, only records involving purchase of props, sale of equipment and other transaction behaviors are retained.
[0094] Remove duplicate records in the transaction data, and for the existing missing values, process according to the business logic, and obtain abnormal records by analyzing the range and distribution of the transaction data.
[0095] According to the processing requirements, the abnormal records are analyzed to determine the unreasonable reasons, and the transaction data is checked based on the business rules, and the transaction operation set is obtained by grouping according to the transaction time field.
[0096] For example Fig. 2As shown, the steps for analyzing and selecting the dataset include:
[0097] The basic statistics in the transaction operation set are calculated to obtain transaction size distribution data, and the sensitive fields in the user behavior data are statistically analyzed to obtain behavior-sensitive data.
[0098] The longitudinal correlation analysis method was used to analyze the correlation between transaction size distribution data and behaviorally sensitive data.
[0099] The steps to obtain the correlation include:
[0100] The transaction size distribution data is used as the response variable, and the behavior-sensitive data is used as the explanatory variable. Based on the properties of the response variable, the Poisson distribution family is selected, and the log link function is determined.
[0101] Based on the Poisson distribution family, log link function, and commutative structure matrix, a generalized estimation equation is constructed, which is expressed as follows:
[0102]
[0103] In the formula, It is the first The response variable values of the explanatory variables. It is the first The mean of each explanatory variable, It is the first The covariance matrix of the explanatory variables. It is the derivative matrix of the mean.
[0104] The correlation parameters are obtained by solving the generalized estimation equation using a spectral optimization algorithm, and the correlation is obtained by analyzing the correlation parameters.
[0105] The steps to obtain the correlation parameters include:
[0106] Transforming the generalized estimation equation into matrix form, the formula is expressed as follows:
[0107]
[0108] In the formula, These are the observed values of the response variable. It is the mean vector of the predicted response variable. It is a diagonal matrix. It is the transpose of the matrix.
[0109] Construct the objective function related to the generalized estimation equation, and calculate the forward gradient of the forward parameters and the backward gradient of the backward parameters, expressed as follows:
[0110]
[0111]
[0112] In the formula, It's about the positive parameters. The positive gradient, It's about the inverse parameter. The inverse gradient, It is the partial derivative of the mean vector with respect to the positive parameters. It is the derivative of the diagonal matrix with respect to the inverse parameter. It is transpose.
[0113] The matrix form is decomposed into eigenvalues to obtain eigenvectors. The search direction is determined based on these eigenvectors, and the objective function is updated using both forward and backward gradients until a preset number of iterations is reached. The associated parameters are then obtained, as expressed by the formula:
[0114]
[0115]
[0116] In the formula, It is the first The step size of the next iteration. It is the first The search direction for the positive parameters in the next iteration. It is the first The value of the positive parameter in the next iteration It is the first The value of the positive parameter after the next iteration update It is the first The search direction for the inverse parameter in the next iteration. It is the first The value of the inverse parameter in the next iteration. It is the first The value of the inverse parameter is updated after the next iteration.
[0117] The transaction operation set is classified according to different dimensions, and the differences in user behavior data under different categories are analyzed to obtain category difference data. Different dimensions may include transaction type (buying items, selling equipment, etc.), the role type or level range of the transacting parties, etc.
[0118] Based on correlation and category difference data, filtering criteria are determined. These criteria might include identifying a specific user behavior pattern associated with high-value transactions, allowing for the selection of transaction records exhibiting this pattern for in-depth analysis. Alternatively, they might identify certain transaction categories closely related to specific player groups or behavioral characteristics, enabling data filtering based on these transaction categories and related features. The filtered transaction dataset is then obtained by filtering the transaction operation set.
[0119] The screening data set of each node in the region chain is verified by improving the burning consensus mechanism. If the number of verifications reaches a preset number, the screening data set is regarded as game record data, otherwise, the screening data set is regarded as abnormal data.
[0120] The abnormal reason is obtained by using a clustering anomaly analysis method to analyze the abnormal data according to the user behavior data, and the burning consensus mechanism is adjusted.
[0121] The step of analyzing the abnormal reason includes:
[0122] User behavior data of different sources and types is integrated into a unified comprehensive database, and repeated values and abnormal values are removed. The integration method can include correlating and matching data from game server logs, database records, etc. to form a comprehensive view of each user behavior.
[0123] According to the type and business background of the abnormal data, determine the abnormal related features, and use chi-square test to screen the key abnormal features from the abnormal related features.
[0124] The step of screening the key abnormal features includes:
[0125] Samples containing abnormal data and other data are collected from the database and log files of the game, and the abnormal feature values of each sample are recorded.
[0126] For each abnormal related feature, classify according to the abnormal feature value, construct a contingency table, and calculate the expected frequency of each cell according to the row sum, column sum and total sample number in the contingency table. The formula is expressed as:
[0127]
[0128] In the formula, is the expected frequency of the cell in the row and the column, is the total of the row, is the total of the column, is the total sample number.
[0129] Calculate the chi-square statistic according to the expected frequency. The formula is expressed as:
[0130]
[0131] In the formula, is the chi-square statistic, is the actual observed frequency of the cell in the row and the column.
[0132] The degrees of freedom are calculated according to the contingency table, and the formula is expressed as:
[0133]
[0134] In the formula, is the number of rows of the contingency table, is the number of columns of the contingency table, is the degrees of freedom.
[0135] According to the degrees of freedom and the preset significance level, the critical value is determined, and it is judged whether it is greater than the chi-square statistic. If yes, it is regarded as a key abnormal feature, otherwise it is deleted. The abnormal related features can include: whether the transaction amount exceeds the normal range, whether the transaction time is in an irregular time period, whether the transaction object is a stranger player, whether the operation frequency is too high or too low, whether the interval time of continuous operation is abnormal, etc.
[0136] The processed user behavior data and the key abnormal features are integrated to obtain association record data.
[0137] The K-Means algorithm is used to calculate the association record data, and combined with the business background, the abnormal data cluster is determined, and the abnormal data cluster is compared and analyzed with other data clusters to obtain abnormal data common features.
[0138] According to the abnormal data common features and the discovered behavior patterns, the abnormal reasons are determined.
[0139] The steps of adjusting the improved combustion consensus mechanism include:
[0140] According to the abnormal reasons, the system log and data flow are tracked to determine the abnormal source, and the parameters, rules and technologies in the improved combustion consensus mechanism are adjusted. The abnormal source can include incomplete data transmission due to hardware failure, network delay or attack of part of the nodes, unreasonable parameter setting of the consensus mechanism itself, or vulnerability of the smart contract code, etc.
[0141] The steps of adjusting the parameters, rules and technologies include:
[0142] The combustion rate, combustion interval and node reward parameters in the parameters are adjusted.
[0143] The verification conditions are added, the process is optimized, and the punishment mechanism is introduced.
[0144] The network is optimized, the smart contract code is reviewed and updated, and the hardware is upgraded.
[0145] Parameter optimization:
[0146] Combustion rate adjustment: If it is found that the node's participation is not high due to the high combustion rate, the combustion rate can be appropriately reduced. Conversely, if the system safety is threatened due to the low combustion rate, the combustion rate can be increased.
[0147] Combustion interval adjustment: If the consensus time is too long, it may be that the combustion interval is set too large, and the interval time can be shortened to make the nodes perform combustion operations more frequently to speed up the consensus. If the system performs combustion verification too frequently, resulting in resource waste, the combustion interval can be extended. For example, from every 10 minutes to every 5 minutes or every 15 minutes.
[0148] Node reward parameter adjustment: According to the performance and contribution of nodes in the consensus process, the reward mechanism is adjusted. If it is found that some nodes lack enthusiasm due to insufficient rewards, the reward amount can be increased. If the reward is too high, some bad nodes try to obtain rewards through improper means, and the reward can be reduced. For example, originally, a successful verification of a block can obtain 10 tokens of reward, which can be adjusted to 8 or 12.
[0149] Rule improvement:
[0150] Increase verification conditions: If it is found that the exception is due to insufficient verification of nodes, verification conditions can be added in the combustion consensus mechanism. For example, in addition to verifying the number of tokens burned by the node, credit rating, historical transaction records, and other aspects of the node can also be verified.
[0151] Optimize consensus process: If there are unreasonable links in the consensus process that cause exceptions, the process can be optimized. For example, a pre-verification step is added before the combustion verification link to filter out nodes or transactions that may have problems in advance, reducing invalid combustion operations.
[0152] Introduce punishment mechanism: For malicious nodes or nodes that violate consensus rules, a punishment mechanism is established. For example, a certain number of tokens are deducted, the right to participate in consensus is limited, or even the node is excluded from the network to maintain the fairness and stability of the consensus mechanism.
[0153] Technology upgrade:
[0154] Optimize blockchain network: If the exception is caused by network congestion or delay, the blockchain network can be optimized, such as increasing network bandwidth, optimizing network topology, using more efficient communication protocols, etc. to ensure timely and accurate information transmission between nodes.
[0155] Smart contract code review and update: If the smart contract code has vulnerabilities that cause exceptions, the code is thoroughly reviewed, vulnerabilities are fixed, and the code is updated to the blockchain network in a timely manner. At the same time, the testing and auditing of the smart contract code are strengthened to ensure that similar problems do not occur again.
[0156] Node hardware and software upgrade: If the node's hardware performance is insufficient or the software version is too low, causing abnormalities, the node operator is urged to upgrade the hardware equipment, such as replacing higher-performance processors, increasing memory, etc., and updating the software version to improve the processing capacity and stability of the node.
[0157] Test the improved combustion consensus mechanism after adjustment, use different game data and scenes to select the nodes of the preset area in the regional chain network to obtain feedback data.
[0158] Adjust the parameters, rules and technologies based on the feedback data until the preset requirements are met. Feedback data can include consensus time, node participation, transaction success rate and other indicators.
[0159] The data processing method based on blockchain technology provided in the embodiment can better adapt to the business logic and processing requirements of different games by improving the combustion consensus mechanism, improve the verification efficiency of the blockchain node on the transaction operation set, enhance the stability and reliability of the system in complex game scenarios, and use the longitudinal correlation analysis method and clustering anomaly analysis method to deeply mine the internal correlation and rules between user behavior data and transaction operation sets, providing more valuable information for game operation and security management. It can also accurately find out the reasons for abnormal data and make targeted adjustments to the improved combustion consensus mechanism, timely repair system vulnerabilities, and enhance the security and stability of the blockchain system, effectively preventing potential attacks and risks. At the same time, the parameters, rules and technologies of the improved combustion consensus mechanism are systematically adjusted, so that the system can be flexibly optimized according to the actual situation, improving the maintainability and scalability of the system, and adapting to the changing game environment and business requirements.
[0160] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software and the necessary general hardware platform, or by hardware. Based on such understanding, the above technical solutions or the essential part of the prior art can be embodied in the form of a software product, which can be stored in a computer readable storage medium such as ROM / RAM, magnetic disk, optical disk, etc., including a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the methods described in each embodiment or some parts of the embodiment.
[0161] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method based on blockchain technology, used to process game data according to an optimized consensus mechanism, characterized in that, The data processing method includes: Player action data and user behavior data are collected at preset time intervals during the game. An improved burning consensus mechanism is obtained by optimizing the burning proof mechanism using the annealing moth algorithm. Based on the business logic and processing requirements of different games, the operation data is processed to obtain a transaction operation set. A longitudinal correlation analysis method is used to analyze the transaction operation set based on the user behavior data to obtain a filtered dataset. The steps for optimizing the improved burning consensus mechanism include: Each parameter of the combustion consensus mechanism is treated as an individual moth in the annealing moth algorithm, and the position and velocity of each individual moth are randomly initialized; The fitness function is determined based on the optimization objective of the combustion proof mechanism, and the fitness value is calculated. The formula is as follows: ; In the formula, It's the amount of fuel burned. It is the burning time. It is combustion The cost, It is a score based on the node's historical contribution. These are weighting coefficients. It is the maximum permissible combustion time. It is the fitness function; Sort all fitness values in ascending order, select the positions of the first preset number of moth individuals as the flame positions, and select the position with the highest fitness value as the current optimal position; All current moth individuals are updated to multiple updated positions based on the flame position and the current optimal position; The fitness value corresponding to each update position is calculated according to the fitness function, and the parameter corresponding to the highest update position is selected to form the combustion consensus mechanism to obtain the improved combustion consensus mechanism. Determine whether the number of times the filtered dataset of each node in the blockchain has been verified by the improved burning consensus mechanism has reached a preset number. If so, it is used as game record data; otherwise, it is used as abnormal data. Cluster anomaly analysis is used to analyze the abnormal data based on the user behavior data to find the cause of the anomaly, and then the improved combustion consensus mechanism is adjusted accordingly.
2. The data processing method based on blockchain technology according to claim 1, characterized in that, The steps to obtain the transaction operation set include: Fields and identifiers representing transaction behavior are used as transaction-related fields, and transaction data is filtered out from the operation data based on the transaction-related fields; Remove duplicate records from the transaction data; for any missing values, process them according to the business logic; and identify abnormal records by analyzing the range and distribution of the transaction data. The abnormal records are analyzed according to the processing requirements to determine the reasons for the unreasonableness, and the transaction data is checked based on business rules. The transaction operation set is obtained by grouping the data according to the transaction time field.
3. The data processing method based on blockchain technology according to claim 1, characterized in that, The steps involved in analyzing and filtering the dataset include: The basic statistics in the transaction operation set are calculated to obtain transaction size distribution data, and the sensitive fields in the user behavior data are statistically analyzed to obtain behavior-sensitive data. The longitudinal correlation analysis method is used to analyze the correlation between the transaction size distribution data and the behavior-sensitive data; The transaction operation set is classified according to different dimensions, and the differences in user behavior data under different categories are analyzed to obtain category difference data; Based on the correlation and category difference data, the filtering conditions are determined, and the transaction operation set is filtered to obtain the filtered dataset.
4. The data processing method based on blockchain technology according to claim 3, characterized in that, The steps to obtain the correlation include: The transaction size distribution data is used as the response variable, the behavior-sensitive data is used as the explanatory variable, and the Poisson distribution family is selected according to the properties of the response variable to determine the log link function; A generalized estimation equation is constructed, and the correlation parameters are obtained by solving the generalized estimation equation using a spectral optimization algorithm. The correlation is obtained by analyzing the correlation parameters.
5. A data processing method based on blockchain technology according to claim 4, characterized in that, The steps for obtaining the correlation parameters include: The generalized estimation equation is transformed into matrix form, expressed as follows: ; In the formula, These are the observed values of the response variable. It is the mean vector of the predicted response variable. It is a diagonal matrix. It is the transpose matrix; Construct an objective function related to the generalized estimation equation, and calculate the forward gradient of the forward parameters and the backward gradient of the backward parameters, expressed as follows: , ; In the formula, It's about the positive parameters. The positive gradient, It's about the inverse parameter. The inverse gradient, It is the partial derivative of the mean vector with respect to the positive parameters. It is the derivative of the diagonal matrix with respect to the inverse parameter. It is transpose; The matrix is decomposed into eigenvalues to obtain eigenvectors. The search direction is determined based on these eigenvectors, and the objective function is updated using both the forward and backward gradients until a preset number of iterations is reached. The associated parameters are then obtained, as expressed by the formula: , ; In the formula, It is the first The step size of the next iteration. It is the first The search direction for the positive parameters in the next iteration. It is the first The value of the positive parameter in the next iteration It is the first The value of the positive parameter after the next iteration update It is the first The search direction for the inverse parameter in the next iteration. It is the first The value of the inverse parameter in the next iteration. It is the first The value of the inverse parameter is updated after the next iteration.
6. The data processing method based on blockchain technology according to claim 1, characterized in that, The steps for analyzing and determining the cause of the anomaly include: The user behavior data from different sources and types are integrated into a unified comprehensive database, and duplicate and outlier values are removed; Based on the type and business background of the abnormal data, anomaly-related features are determined, and key anomaly features are screened from the anomaly-related features using the chi-square test. The processed user behavior data and the key abnormal features are integrated to obtain associated record data; The K-Means algorithm is used to calculate the associated record data, and combined with the business background, abnormal data clusters are identified. The abnormal data clusters are then compared and analyzed with other data clusters to obtain the common characteristics of the abnormal data. Based on the common characteristics of the abnormal data and the discovered behavioral patterns, the cause of the anomaly is determined.
7. A data processing method based on blockchain technology according to claim 6, characterized in that, The steps for screening the key anomaly features include: Collect samples containing the anomalous data and other data from the game's database and log files, and record the anomalous feature values of each sample; For each anomaly-related feature, classify according to the anomaly feature value, construct a contingency table, and calculate the expected frequency of each cell based on the row sum, column sum, and total number of samples in the contingency table; Calculate the chi-square statistic based on the expected frequency; Calculate the degrees of freedom based on the contingency table; A critical value is determined based on the degrees of freedom and a preset significance level, and it is determined whether it is greater than the chi-square statistic. If it is, it is taken as the key anomaly feature; otherwise, it is deleted.
8. A data processing method based on blockchain technology according to claim 1, characterized in that, The parameters for burning rate, burning interval, and node reward in the improved burning consensus mechanism are adjusted.
Citation Information
Patent Citations
Game process data production system
CN109078323A
Fraudulent website identification method based on selection variation moth flame optimization algorithm
CN114282130A