Blockchain-based sales data management method, device and electronic equipment
By analyzing the access parameters and sales data of blockchain storage nodes to calculate the storage security space and dynamically adjusting the encryption strategy, the contradiction between security and efficiency in sales data management is resolved, and a precise match and dynamic response between data security and storage security are achieved.
Patent Information
- Application Number
- CN202511483430.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-10-17
AI Technical Summary
Existing technologies in sales data management suffer from fragmented analysis of data security and storage security, insufficient dynamic threat response, and a contradiction between migration efficiency and security, failing to achieve accurate matching and dynamic response.
By analyzing the access parameters of each storage node in the blockchain and the sales data of encrypted storage, the storage security space is calculated, the optimal sales data is determined, and the optimal data is matched and managed to dynamically adjust the encrypted storage strategy.
It achieves a precise match between data security and storage security, dynamically responds to threats, improves the security and management efficiency of sales data, and avoids the contradiction between speed and security in traditional methods.
Smart Images

Figure CN120995484B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data management, in particular to a sales data management method and device based on a blockchain and an electronic device. BACKGROUND
[0002] As a decentralized distributed ledger, the blockchain has the characteristics of block chain storage, tamper resistance, and security and trust. Combined with distributed storage, peer-to-peer transmission, consensus mechanism, and other technologies, it has been widely used in the field of data security. For example, the education data management system based on a blockchain disclosed in Chinese patent CN 114219322 B realizes data interaction by applying parallel chains and relay chains, but this scheme is not designed and optimized for the particularity of commercial sales data.
[0003] In the sales data management scenario, the existing technology has three defects: first, the data security and storage security are analyzed separately, the data encryption strength and node protection capability are evaluated independently, and the precise matching of storage resources and data security level cannot be achieved; second, the dynamic threat response is insufficient, relying on historical attack data for passive defense, lacking prediction of real-time anti-attack trend of nodes, leading to lag in storage strategy adjustment; third, there is a contradiction between migration efficiency and security, and pursuing speed during migration may reduce encryption strength, and strengthening security may increase delay, lacking a dynamic mechanism that takes into account both. With the rapid development of blockchain technology, its distributed storage and decentralized characteristics provide important support for data security and trusted sharing. However, in the storage scenario of commercial sensitive information such as sales data, the dynamic security threats faced by blockchain nodes are increasingly complex, and traditional storage strategies still have significant shortcomings in responding to attack destructiveness, data security, and storage efficiency optimization. Therefore, there is an urgent need for a sales data management method that can evaluate and dynamically respond to threats from both the data end and the storage end. SUMMARY
[0004] The main purpose of the present application is to provide a sales data management method based on a blockchain, comprising the following steps:
[0005] Performing attack destructiveness analysis on the access parameters of each storage node in the blockchain to obtain a storage trend factor of each storage node;
[0006] Performing security loss analysis on the encrypted storage sales data of each storage node in the blockchain to obtain a data trend factor of each storage node;
[0007] According to the storage trend factor and the data trend factor of each storage node, a storage security space of each storage node is calculated to determine the optimized sales data.
[0008] The storage node corresponding to the optimized sales data is used as the optimization object. All optimized sales data are matched and managed with the optimization object, and the final encrypted storage strategy is determined.
[0009] In one embodiment, the step of performing attack and destructive analysis on the access parameters of each storage node in the blockchain to obtain the storage trend factor of each storage node includes:
[0010] The online time for each access and the interval between adjacent accesses are obtained, and then discretized to obtain the online access variance and the interval access variance.
[0011] Calculate the sum of the online access variance and the interval access variance to obtain the attack damage impact coefficient;
[0012] The attack damage frequency and the attack damage impact coefficient are multiplied to obtain the attack damage value of each storage node;
[0013] Set a processing cycle, use the first trend formula to process the attack damage value of each storage node within the processing cycle, and calculate the storage trend factor of each storage node.
[0014] In one embodiment, the step of performing security loss analysis on the encrypted sales data stored at each storage node in the blockchain to obtain the data trend factor for each storage node includes:
[0015] Obtain the percentage of de-identified sales data encrypted and stored on each storage node in the blockchain within a preset time period;
[0016] The difference between the desensitization rate at the start of the preset time and the desensitization rate at the end of the preset time is used to obtain the data desensitization amplitude.
[0017] The data trend factor is calculated by using the second trend formula to process the data desensitization magnitude of each storage node within the cycle.
[0018] In one embodiment, the step of calculating the storage safety space of each storage node based on the storage trend factor and data trend factor of each storage node, and determining the optimal sales data, includes:
[0019] The storage safety space is obtained by calculating the difference between the storage trend factor and the data trend factor.
[0020] The storage security space is compared with a preset range value to determine the optimal sales data.
[0021] In one embodiment, the step of comparing the storage security space with a preset range value to determine the optimal sales data specifically includes:
[0022] If the storage security space is not within the preset range value corresponding to the storage security space, the sales data stored in the storage node is defined as the sales data to be optimized.
[0023] In one embodiment, the step of matching and managing the sales data and the target of optimization includes:
[0024] The storage node corresponding to the sales data being optimized is taken as the optimization object;
[0025] Extract any sales data from the target search and any target search object to form a matching group;
[0026] Obtain the data trend factor corresponding to the sales data to be optimized and the storage trend factor corresponding to the optimization object, perform difference calculation, and obtain the storage safety space to be determined;
[0027] Calculate the correlation coefficient between the sales data of the target optimization and the sales data within the target optimization object;
[0028] The safe storage space to be matched is calculated using the formula:
[0029]
[0030] Where A represents the storage security space to be matched, R represents the correlation coefficient, Rb represents the preset standard correlation coefficient, and U represents the storage security space to be judged.
[0031] If the storage security space to be matched is within the preset range value corresponding to the storage security space, then the sales data will be migrated to the optimization object for storage.
[0032] In one embodiment, the step of calculating the correlation coefficient between the sales data being optimized and the sales data within the optimization target includes:
[0033] Obtain the data anonymization magnitude sequence of the sales data for optimization and the sales data within the optimization target during the processing cycle;
[0034] The correlation between the two desensitized amplitude sequences is calculated using the Pearson correlation coefficient formula, and the result is the correlation coefficient.
[0035] In one embodiment, the step of determining the final encrypted storage strategy includes:
[0036] The parameters of the encryption storage algorithm of the optimization object are adjusted based on the storage trend factor of the optimization object so that the encryption strength matches the anti-attack performance of the optimization object.
[0037] The migration log is generated and uploaded to the consensus node of the blockchain to complete the decentralized storage of migration records.
[0038] A blockchain-based sales data management device includes: a storage node evaluation module, a storage data evaluation module, a storage node security module, and an optimization management module;
[0039] The storage node evaluation module performs attack and destructive analysis on the access parameters of each storage node in the blockchain to obtain the storage trend factor of each storage node.
[0040] The storage data evaluation module performs a security loss analysis on the encrypted sales data stored in each storage node in the blockchain to obtain the data trend factor for each storage node.
[0041] The storage node security module calculates the storage security space of each storage node based on the storage trend factor and data trend factor of each storage node, and determines the optimal sales data.
[0042] The optimization management module uses the storage node corresponding to the optimized sales data as the optimization object, matches and manages all optimized sales data with the optimization object, and determines the final encrypted storage strategy.
[0043] An electronic device includes a processor and a memory; the memory is used to store a computer program; the processor is used to load and execute the computer program to enable the electronic device to perform any of the aforementioned blockchain-based sales data management methods.
[0044] Therefore, this application has the following beneficial effects:
[0045] This application provides a blockchain-based sales data management method, including the following steps:
[0046] This application analyzes the attack and destructive potential of access parameters for each storage node in the blockchain to obtain a storage trend factor for each node. It also analyzes the security loss potential of the encrypted sales data stored on each storage node to obtain a data trend factor. Based on the storage trend factor and data trend factor, the storage security space of each storage node is calculated, and optimal sales data is determined. The storage node corresponding to the optimal sales data is used as the optimization target. All optimal sales data are matched and managed with the optimization target to determine the final encrypted storage strategy. This application aims to solve the problems of fragmented analysis of data security and storage security, insufficient dynamic threat response, and the contradiction between migration efficiency and security in existing technologies. By analyzing the anti-attack performance of storage nodes and the security performance requirements of the stored sales data, a comprehensive assessment of the blockchain's storage capacity is achieved from both the data and storage ends. Furthermore, by comprehensively analyzing the anti-attack performance of storage nodes and the security performance of the stored sales data, the migration and storage of sales data is achieved, ensuring single-point storage security of sales data while guaranteeing data efficiency and compatibility during migration. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a system flowchart for a blockchain-based sales data management method;
[0049] Figure 2 This is a block diagram of a blockchain-based sales data management method. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0052] To address the shortcomings of existing technologies, this application provides a blockchain-based sales data management method, aiming to solve key problems in current blockchain sales data management such as the disconnect between data security and storage security analysis, insufficient dynamic threat response, and the contradiction between migration efficiency and security. This method achieves intelligent secure management and dynamic migration of sales data by constructing a coupled analysis model that integrates the attack resistance performance of storage nodes with the security requirements of sales data. Specifically, the process includes the following steps: First, an attack and destructive analysis is performed on the access parameters of each storage node in the blockchain to obtain indicators such as access frequency, online time variance, and interval time variance, and a storage trend factor is calculated. Second, a security loss analysis is performed on the sales data encrypted and stored by each storage node to obtain the trend of the sales data anonymization ratio and a data trend factor is calculated. Then, a storage security space is calculated based on the storage trend factor and the data trend factor. When the storage security space is not within a preset range, the sales data in that storage node is identified as "optimized data". Finally, the storage node corresponding to the optimized data is taken as the optimization object, the data correlation is calculated using the Pearson correlation coefficient, the storage security space to be matched is calculated using a formula, and when it is within the security range, data migration is performed. The encrypted storage algorithm parameters are adjusted based on the storage trend factor of the optimization object, a migration log is generated, and it is uploaded to the blockchain consensus node to complete decentralized evidence storage.
[0053] The core innovation of this application lies in achieving a precise match between data security and storage security by constructing a dual trend analysis model for storage nodes and sales data. The dynamic trend analysis mechanism enables the system to predict changes in node anti-attack performance in real time, avoiding the passive reliance on historical attack data in traditional methods. By setting the storage security space range and calculating the correlation coefficient, a dynamic balance between migration efficiency and security is achieved, effectively resolving the contradiction in traditional methods that excessively pursue either transmission speed or security strength. In practical applications, this method can significantly improve the security and management efficiency of sales data.
[0054] This application provides a blockchain-based sales data management method including steps S10-S40, as described in the embodiments below. Figure 1 , Figure 1 This is a system flowchart for a blockchain-based sales data management method.
[0055] Step S10: Perform attack and destructive analysis on the access parameters of each storage node in the blockchain to obtain the storage trend factor of each storage node.
[0056] Step S20: Perform security loss analysis on the encrypted sales data stored in each storage node in the blockchain to obtain the data trend factor for each storage node.
[0057] Step S30: Calculate the storage safety space of each storage node based on the storage trend factor and data trend factor of each storage node, and determine the optimal sales data.
[0058] Step S40: The storage node corresponding to the optimized sales data is taken as the optimization object. All optimized sales data are matched and managed with the optimization object, and the final encrypted storage strategy is determined.
[0059] Specifically, in this embodiment, step S10 involves performing attack and destructive analysis on the access parameters of each storage node in the blockchain to obtain the storage trend factor for each storage node. The process of obtaining the storage trend factor includes the following steps:
[0060] Obtain the number of accesses to each storage node in the blockchain within a preset time period, calculate the difference between the number of accesses and the access limit, and obtain the deviation access count.
[0061] The frequency of attack and damage is obtained by calculating the frequency of the number of biased accesses and the preset time.
[0062] Get the online time for each access (the online time is the time period from the start to the end of the access) and the interval between adjacent accesses (the interval is the time period from the end of the previous access to the start of the next access).
[0063] Discretize the online time and interval time of all accesses within a preset time period to obtain the online access variance and the interval access variance; calculate the sum of the online access variance and the interval access variance to obtain the attack damage impact coefficient.
[0064] The attack damage frequency and the attack damage impact coefficient are multiplied to obtain the attack damage value of each storage node;
[0065] The processing cycle is set in advance by technicians. The attack damage value of each storage node within the processing cycle is calculated using the first trend formula to obtain the storage trend factor of each storage node.
[0066] The first trend formula is: obtain the first time series of attack damage values of storage nodes within the processing cycle, calculate the average slope of the first time series, and obtain the storage trend factor for each storage node.
[0067] Step S20: Perform a security vulnerability analysis on the encrypted sales data stored at each storage node in the blockchain to obtain the data trend factor for each storage node. The process of obtaining the data trend factor includes the following steps:
[0068] Obtain the percentage of de-identified sales data encrypted and stored on each storage node in the blockchain within a preset time period;
[0069] The difference between the desensitization rate at the start of the preset time and the desensitization rate at the end of the preset time is used to obtain the data desensitization amplitude.
[0070] The processing cycle is set in advance by technical personnel. The data desensitization amplitude of each storage node within the processing cycle is calculated using the second trend formula to obtain the data trend factor of each storage node.
[0071] The second trend formula is: obtain the second time series of the data desensitization magnitude of the storage nodes within the processing cycle, calculate the average slope of the second time series, and obtain the data trend factor for each storage node.
[0072] Step S30: Based on the storage trend factor and data trend factor of each storage node, calculate the storage safety space for each storage node to determine the optimal sales data. The calculation process for the storage safety space includes the following steps:
[0073] Obtain the storage trend factor for each storage node, as well as the data trend factor corresponding to that storage node;
[0074] The storage safety space of each storage node is obtained by calculating the difference between the storage trend factor and the data trend factor.
[0075] The stored safe space is compared with the preset range value [-0.5, 0.5].
[0076] If the storage security space is not within the storage security space range of [-0.5, 0.5], the sales data stored in this storage node is defined as the optimized sales data.
[0077] Step S40: The storage node corresponding to the optimized sales data is taken as the optimization object. All optimized sales data is matched and managed with the optimization objects, and the final encrypted storage strategy is determined. The matching and management process of optimized sales data and optimization objects includes the following steps:
[0078] The storage node corresponding to the sales data to be optimized is used as the optimization object;
[0079] Extract any sales data from the target search and any target search object to form a matching group;
[0080] Obtain the data trend factor corresponding to the sales data to be optimized and the storage trend factor corresponding to the optimization object, perform difference calculation, and obtain the storage safety space to be determined.
[0081] Calculate the correlation coefficient between the sales data of the target optimization and the sales data within the target optimization object;
[0082] The correlation coefficient between the two desensitized amplitude sequences of data was calculated using the Pearson correlation coefficient formula.
[0083] The target storage security space is calculated using a formula. If the target storage security space falls within the storage security space range [-0.5, 0.5], the sales data stored in that storage node is migrated to the identified target for storage. The steps to determine the final encrypted storage strategy include:
[0084] The parameters of the encryption storage algorithm for the optimization object are adjusted based on the storage trend factor of the optimization object so that the encryption strength matches the anti-attack performance of the optimization object.
[0085] The migration log is generated and uploaded to the consensus node of the blockchain to complete the decentralized storage of migration records.
[0086] Furthermore, in this embodiment, the step of performing attack and destructive analysis on the access parameters of each storage node in the blockchain to obtain the storage trend factor of each storage node includes:
[0087] The online time for each access and the interval between adjacent accesses are obtained, and then discretized to obtain the online access variance and the interval access variance.
[0088] Calculate the sum of the online access variance and the interval access variance to obtain the attack damage impact coefficient;
[0089] The attack damage frequency and the attack damage impact coefficient are multiplied to obtain the attack damage value of each storage node;
[0090] Set a processing cycle, use the first trend formula to process the attack damage value of each storage node within the processing cycle, and calculate the storage trend factor of each storage node.
[0091] Specifically, in this embodiment, attack and destructive analysis is performed on the access parameters of each storage node in the blockchain to obtain the storage trend factor of each storage node. This is a key preliminary step for the present invention to achieve intelligent and secure management of sales data. This step quantifies the abnormal fluctuations and attack frequency of node access behavior to construct a dynamic anti-attack capability assessment model, providing a scientific basis for subsequent data migration and security matching. Specifically, this process includes four core sub-steps, which are progressively advanced to construct a complete attack and destructive assessment system.
[0092] Storage nodes are participants in a blockchain network that store complete or partial blockchain data (such as blocks, transaction records, smart contracts, etc.). The meaning of the attack damage value for each storage node is determined by analyzing the frequency of accesses exceeding a certain limit within a preset time period. A higher frequency indicates a higher probability of the storage node being attacked, and conversely, a higher probability of reduced security. Furthermore, an attack damage impact coefficient calculated based on the fluctuation of online and intermittent access is considered. A larger coefficient indicates greater access dispersion, a higher probability of attack, and a higher probability of reduced security. Therefore, the attack damage value allows for a more comprehensive assessment of the extent of attack damage to each storage node in the blockchain.
[0093] First, the system obtains the online time of each access and the interval between adjacent accesses, and performs discretization processing to calculate the online access variance and the interval access variance. Online time refers to the duration of a single access from connection establishment to disconnection, reflecting the activity level of attackers or abnormal visitors residing on the node; interval time refers to the idle time between two adjacent accesses, reflecting the suddenness or regularity of access behavior. Normal business access typically exhibits stable and regular online durations and intervals, while attack behavior often manifests as extremely short online times (such as scanning attacks) or extremely long intervals, which may show dense bursts or sudden outbreaks after long periods of silence. By calculating the variance of the online time and interval time of all access records within a preset time window, its dispersion can be quantified—the larger the variance, the more irregular the access behavior, and the more likely it is to contain attack intent. The online access variance and the interval access variance together constitute a two-dimensional indicator of the volatility of access behavior.
[0094] Secondly, the two variance values are added together to obtain the "attack damage impact coefficient". This coefficient is essentially a comprehensive measure of the abnormal volatility of access behavior. It does not directly reflect the attack frequency, but rather the potential destructive power of a single or multiple access behaviors on node stability. For example, even if the number of attacks is not high, if each attack is accompanied by drastic fluctuations in online time or interval (such as high-frequency short-term reconnection, or sudden disconnection after a long delay), its impact coefficient will still be high, indicating that such attacks cause significant disturbances to system modules such as node resource scheduling, connection pool management, and log recording, and have high destructive potential.
[0095] The third step involves multiplying the "attack damage frequency" and the "attack damage impact coefficient" to obtain the "attack damage value" for each storage node. The attack damage frequency is calculated by statistically analyzing the deviation of access frequency from the normal access limit within a preset time period, then dividing by the time length. This reflects the intensity of attack behavior per unit of time. Multiplying it by the impact coefficient achieves a coupled evaluation of "attack frequency" and "single-attack damage," thus providing a more comprehensive characterization of the overall attack pressure borne by the node. A high-frequency, low-impact scanning attack and a low-frequency, high-impact resource exhaustion attack may have comparable attack damage values, and both can be identified as high-risk nodes by the system.
[0096] Finally, a processing period (e.g., daily, weekly, or monthly) is set, and the average slope of the attack damage value sequence within the processing period is calculated using the first trend formula—resulting in a storage trend factor for each storage node. This factor is no longer a static value, but an indicator reflecting the dynamic trend of a node's resistance to attacks. If the slope is positive, it indicates that the node has recently experienced increasing attack pressure, and its security is deteriorating; if the slope is negative, it indicates that the security situation is improving; if the slope is close to zero, the node is in a relatively stable state. This trend analysis enables the system to have predictive capabilities, allowing it to identify risky nodes in advance before a large-scale attack erupts, thus gaining a valuable time window for proactively migrating sensitive sales data.
[0097] Furthermore, in this embodiment, the step of performing security loss analysis on the encrypted sales data stored by each storage node in the blockchain to obtain the data trend factor of each storage node includes:
[0098] Obtain the percentage of de-identified sales data encrypted and stored on each storage node in the blockchain within a preset time period;
[0099] The difference between the desensitization rate at the start of the preset time and the desensitization rate at the end of the preset time is used to obtain the data desensitization amplitude.
[0100] The data trend factor is calculated by using the second trend formula to process the data desensitization magnitude of each storage node within the cycle.
[0101] Specifically, in this embodiment, a security vulnerability analysis is performed on the sales data encrypted and stored by each storage node in the blockchain to obtain data trend factors. This is a key step in achieving dynamic matching between sales data and the security capabilities of storage nodes. This step focuses on the evolving security needs of the sales data itself, rather than the external attack pressure on the nodes, thereby constructing a quantitative model of data-side security needs and forming a two-dimensional collaborative evaluation system with the aforementioned storage-side anti-attack capabilities. Specifically, this process includes three core sub-steps: collecting the anonymization ratio, calculating the anonymization magnitude, and modeling the trend factors, progressing step by step to accurately depict the dynamic changes in the security level of sales data.
[0102] First, the system obtains the anonymization ratio of the encrypted sales data stored by each storage node in the blockchain within a preset time period. The anonymization ratio is defined as the proportion of sensitive fields that have undergone anonymization processing (such as data masking, generalization, perturbation, tokenization, etc.) to the total number of sensitive fields in the sales data stored by that node. For example, if a node stores 1000 customer sales records, each containing four sensitive fields: customer name, ID number, phone number, and purchase amount, and if the "ID number field" of 800 records is anonymized, the anonymization ratio is 800 / 1000 = 80%. A higher anonymization ratio indicates a higher level of data security protection and higher security requirements for the storage environment; conversely, a lower anonymization ratio may mean that the business requires higher data availability or that the security level has been reduced after risk assessment. The system collects the anonymization ratio of sales data from each node at fixed time granularities (such as hourly or daily) to form time-series data.
[0103] Secondly, the difference in the anonymization rate between the start and end points of the preset time is calculated to obtain the data anonymization magnitude. This magnitude reflects the direction and intensity of adjustments to the sales data security strategy within a specific observation period. For example, if the anonymization rate is 60% at the beginning of a certain period and rises to 85% at the end, the anonymization magnitude is +25%, indicating that the security requirements for the sales data stored at that point have significantly increased during the period, possibly due to regulatory updates, customer complaints, internal audits, or an increase in high-risk transactions. If the anonymization rate drops from 80% to 50%, the magnitude is -30%, indicating a decrease in security requirements, possibly due to data entering the archiving stage, increased business analysis needs, or a reassessment of risk levels. The sign and magnitude of the anonymization magnitude directly quantify the rate and direction of change in data security requirements, serving as a core input for dynamic security assessment.
[0104] Finally, using the same time processing period as the aforementioned storage trend factor, the "data trend factor" is derived by applying the second trend formula, which calculates the average slope of the data anonymization magnitude sequence at each time point within the period. This factor is not the absolute value of the current anonymization ratio, but rather a derivative-type indicator of its changing trend. If the slope is positive and large, it indicates that data security needs are accelerating, and this node will bear data with higher security levels in the future, placing higher demands on the storage environment's resistance to attacks; if the slope is negative, the security needs tend to ease; if the slope approaches zero, the data security strategy is in a stable period.
[0105] Further, in this embodiment, the step of calculating the storage safety space of each storage node based on the storage trend factor and data trend factor of each storage node, and determining the optimal sales data, includes:
[0106] The storage safety space is obtained by calculating the difference between the storage trend factor and the data trend factor.
[0107] The storage security space is compared with a preset range value to determine the optimal sales data.
[0108] Specifically, in this embodiment, calculating the storage security space based on the storage trend factor and data trend factor of each storage node, and determining the optimal sales data accordingly, is the core decision-making step for achieving intelligent migration and security matching of sales data in this invention. This step constructs a dynamically coupled evaluation model that quantitatively compares the changing trends of node anti-attack capabilities with the changing trends of data security requirements, thereby identifying risky or inefficient nodes where the current storage resource configuration does not match security requirements, providing accurate targets for subsequent data migration. The entire process includes three key sub-steps: factor acquisition, difference calculation, and threshold comparison, which are interconnected to form a closed-loop decision-making mechanism.
[0109] First, the system acquires the storage trend factor and data trend factor for each storage node. Both factors are dynamic trend indicators calculated by the aforementioned analysis module, not static snapshots. The storage trend factor reflects the evolution of a node's anti-attack capability within the processing cycle—an increase in value indicates increased attack pressure and weakened security, while a decrease indicates stronger security. The data trend factor reflects the evolution of the security requirements for the sales data stored on that node—an increase in value indicates increased data sensitivity and stronger security requirements, while a decrease indicates weaker security requirements. Both factors are calculated under the same processing cycle and time scale, ensuring consistency and comparability of the evaluation dimensions. For example, if a node's storage trend factor is +0.35 (deteriorating security) and its data trend factor is +0.42 (increasing security requirements), it indicates that the node is facing the dual pressure of "decreasing capability and increasing requirements," and is highly likely to become a weak point in the system's security.
[0110] Secondly, the storage trend factor and the data trend factor are subtracted to calculate the storage safety space. The calculation formula is: Storage Safety Space = Storage Trend Factor - Data Trend Factor. This difference has a clear physical meaning.
[0111] If the result is positive (e.g., +0.5), it means that the rate of decline (or degree of deterioration) of the node's resistance to attacks exceeds the rate of growth of data security needs, that is, the capability cannot keep up with the demand, and there is a security gap.
[0112] If the result is negative (e.g., -0.6), it means that the rate of decline in data security demand exceeds the rate of deterioration in node capabilities, i.e., demand is lower than capability, and resources are redundant or wasted.
[0113] If the result approaches zero (e.g., ±0.1), it indicates that the node's capabilities and data demands change in a basically synchronized manner, showing a good match. This safety space is essentially a quantitative indicator of the dynamic balance between capabilities and demands; the larger its absolute value, the more severe the imbalance, and the greater the need for intervention.
[0114] Finally, the calculated storage security space is compared with a preset range value (set to [-0.5, +0.5] in this embodiment) to determine the optimal sales data. This range value is an empirical threshold derived from extensive simulation experiments and analysis of historical attack data, representing the system's tolerable capacity-demand imbalance boundary.
[0115] If the storage safety space ∈ [-0.5, +0.5], it means that the current node's capabilities are basically matched with the data requirements, and no migration is needed. The data within this node is defined as non-optimal data.
[0116] If the storage security space > +0.5, it means that the node's security is deteriorating much faster than the growth in data security needs, and the node has become a high-risk point. The sales data stored in it needs to be migrated to a more secure node.
[0117] If the storage security space is less than -0.5, it indicates a significant reduction in data security requirements while node capabilities remain high, resulting in resource waste. Data can be migrated to ordinary nodes to free up high-security resources. In both of the above scenarios where the threshold is exceeded, the sales data stored within is defined as sales data requiring optimization, meaning data needs to be found that better matches the storage node.
[0118] Furthermore, in this embodiment, the step of comparing the storage security space with a preset range value to determine the optimal sales data specifically includes:
[0119] If the storage security space is not within the preset range corresponding to the storage security space, the sales data stored in the storage node is defined as the sales data to be optimized.
[0120] Specifically, in this embodiment, comparing the calculated storage security space with a preset range value ([-0.5, +0.5]) is a key decision point for determining whether sales data needs to be migrated. The core logic of this step is simple and efficient: if the storage security space exceeds the preset range, the sales data stored in that node is defined as the optimal sales data, meaning that a data object with a more suitable secure storage environment needs to be found. The numerical value of the storage security space essentially reflects the relative deviation between the node's anti-attack trend and the data security demand trend. When its absolute value exceeds 0.5, it means that the imbalance has reached an intolerable level for the system—either the node's security is seriously lagging behind the data protection demand (too large a positive value), posing a security risk; or the data security level has been significantly reduced while the node still maintains a high protection level (too small a negative value), resulting in resource misallocation and waste.
[0121] Once a data point is determined to be outside the acceptable range, the system automatically marks all or part of the sales data within that node as "optimization data," triggering the subsequent migration process. For example, if a node suffers a continuous scanning attack, causing its storage trend factor to rise to +0.9, while its customer transaction data has a trend factor of +0.3 due to increased anonymization requirements for compliance, the difference of +0.6 > +0.5 immediately identifies it as a high-risk state, marks its data as "optimization data," and prepares to migrate it to a node with stronger defense capabilities. Conversely, if a node has not been attacked for a long time (storage trend factor -0.6), but its stored data has been archived and anonymized (data trend factor -0.8), the difference of +0.2 is still within the acceptable range, then migration is unnecessary, and the status quo is maintained to conserve resources. This threshold-based judgment strategy balances security and efficiency, avoiding frequent and meaningless data migrations while ensuring rapid response in the event of a genuine imbalance. Through this step, the system achieves a seamless connection from trend analysis to action triggering, enabling blockchain sales data management to have self-diagnostic and self-optimization capabilities, significantly improving the resilience and resource utilization of the overall architecture.
[0122] Furthermore, in this embodiment, the step of matching and managing the sales data and the target data for optimization includes:
[0123] The storage node corresponding to the sales data being optimized is taken as the optimization object;
[0124] Extract any sales data from the target search and any target search object to form a matching group;
[0125] Obtain the data trend factor corresponding to the sales data to be optimized and the storage trend factor corresponding to the optimization object, perform difference calculation, and obtain the storage safety space to be determined;
[0126] Calculate the correlation coefficient between the sales data of the target optimization and the sales data within the target optimization object;
[0127] The safe storage space to be matched is calculated using the formula:
[0128]
[0129] Where A represents the storage security space to be matched, R represents the correlation coefficient, Rb represents the preset standard correlation coefficient, and U represents the storage security space to be judged.
[0130] If the storage security space to be matched is within the preset range value corresponding to the storage security space, then the sales data will be migrated to the optimization object for storage.
[0131] Specifically, in this embodiment, the matching management of optimized sales data and optimized objects is the core decision engine for achieving intelligent, secure, and efficient migration of sales data. This step is not simply about moving high-risk data to high-security nodes, but rather constructing a two-dimensional intelligent matching mechanism that integrates node capability adaptability and data attribute compatibility to ensure that the overall security performance of the system is maximized, resource utilization is optimized, and business continuity is most stable after the migration. Its specific process includes five precisely coordinated sub-steps, forming a closed-loop dynamic matching model.
[0132] First, the system automatically includes the original storage nodes corresponding to all sales data marked for optimization into a candidate optimization pool. These nodes may have the potential to handle highly sensitive data due to their low storage trend factor (strong security) or resource redundancy. For example, a node with a storage trend factor of -0.6 due to a long period of no attack activity may not currently store highly sensitive data, but its defense capabilities are sufficient, making it a high-quality migration target.
[0133] Secondly, the system employs a combination trial and greedy optimization strategy, randomly or by priority extracting a pair of combinations from the optimization dataset and the optimization object pool to form a matching group. This process can perform multiple matching calculations in parallel to improve efficiency; alternatively, it can sort by data sensitivity or node load, prioritizing the matching of high-value data while balancing performance and security.
[0134] The third step involves the system acquiring the data trend factor (reflecting the strength of security requirements) of the sales data being optimized within the group and the storage trend factor (reflecting the anti-attack capability) of the target object, and calculating the difference to obtain the storage security space U to be determined. For example, if the data trend factor is +0.8 (high security requirements) and the object storage trend factor is -0.3 (high defense capability), then U = -0.3 - 0.8 = -1.1, initially indicating that the capability far exceeds the requirements, providing a basis for matching.
[0135] The fourth step involves the system further calculating the correlation coefficient R between the optimized sales data and the existing sales data within the target object, and using the Pearson formula to analyze the evolutionary similarity of the two in the anonymization magnitude sequence. If the R value is high (e.g., 0.75), it indicates that the two types of data are highly coordinated in terms of security level adjustment rhythm and business cycle sensitivity, and can share encryption strategies and access control rules after migration, reducing management complexity; if the R value is low (e.g., 0.1), it may cause policy conflicts or resource mismatch.
[0136] Fifth, the system introduces a comprehensive evaluation formula: A = R × Rb + U, where Rb is a preset standard correlation coefficient (0.4 in this embodiment), used to weight and balance data compatibility and capability adaptability. The final calculated A is the storage safety space to be matched, reflecting the comprehensive matching degree of the combination. If the A value falls within the preset safety range [-0.5, +0.5], the match is considered successful, and data migration is triggered; otherwise, the combination is abandoned, and a new matching pair is selected.
[0137] For example, if a group has U=-1.1 (excess capacity) and R=0.75 (highly correlated), then A = 0.75×0.4 + (-1.1) =0.3 - 1.1 = -0.8, which exceeds the lower limit and is not matched temporarily. However, for another group with U=-0.3 and R=0.6, A=0.6×0.4 -0.3=0.24-0.3=-0.06, which is within the safe range and matches successfully. Through these steps, the system achieves an intelligent leap from coarse screening to fine matching, considering not only whether storage is possible (safety capability) but also whether storage is suitable (data semantics), avoiding the blindness of traditional migration that only considers hardware and ignores content. Simultaneously, this mechanism supports dynamic re-matching; when node status or data requirements change, the matching process can be re-triggered to ensure the system is always in the optimal safe configuration.
[0138] Further, in this embodiment, the step of calculating the correlation coefficient between the sales data being optimized and the sales data within the optimization target includes:
[0139] Obtain the data anonymization magnitude sequence of the sales data for optimization and the sales data within the optimization target during the processing cycle;
[0140] The correlation between the two desensitized amplitude sequences is calculated using the Pearson correlation coefficient formula, and the result is the correlation coefficient.
[0141] Specifically, in this embodiment, to achieve security, compatibility, and business continuity during the sales data migration process, the system needs to calculate the correlation between the sales data to be migrated and the existing sales data within the target optimization object, and use the correlation coefficient as an important basis for matching decisions. The core of this step is to ensure that after migration, management chaos or security policy failure will not occur due to data attribute conflicts by quantifying the similarity of the two types of data in security evolution trends.
[0142] Specifically, the system first extracts the data anonymization magnitude sequences of the sales data being optimized and the sales data within the target optimization area within the same processing period. This sequence consists of the anonymization percentage changes at multiple time points, reflecting the dynamic trajectory of the security level adjustments of each dataset within the period. For example, the anonymization magnitude sequence of a certain promotional dataset over 7 days is [+5%, +10%, +15%, +8%, +20%, +12%, +18%], while the historical sales data sequence within the target node is [+3%, +6%, +9%, +5%, +15%, +8%, +14%], both showing an upward trend and possessing a potential matching basis.
[0143] Subsequently, the system uses the Pearson Correlation Coefficient formula to calculate the correlation coefficient between the two sequences:
[0144] R = cov(X,Y) / (σ x × σ y )
[0145] Where X and Y are two sets of desensitization amplitude sequences, cov(X,Y) is their covariance, and σ x σ y Let R be the standard deviation of each group. The calculated result R ∈ [-1, +1], where R > 0 indicates a positive correlation, and the closer R is to 1, the more synchronized the safe evolution trends of the two groups of data are; R ≈ 0 indicates no correlation; and R < 0 indicates a divergence in trends.
[0146] If the R-value is high (e.g., > 0.6), it indicates that the two types of sales data are highly coordinated in terms of security sensitivity changes. After migration, they can share similar encryption strategies, access control rules, and auditing mechanisms, reducing management complexity and improving system stability. Conversely, if the R-value is too low, it may lead to resource waste or security vulnerabilities due to security policy conflicts. Through this step, the system not only assesses whether the node capabilities match, but also further determines whether the data attributes are compatible.
[0147] Furthermore, in this embodiment, the step of determining the final encrypted storage strategy includes:
[0148] The parameters of the encryption storage algorithm of the optimization object are adjusted based on the storage trend factor of the optimization object so that the encryption strength matches the anti-attack performance of the optimization object.
[0149] The migration log is generated and uploaded to the consensus node of the blockchain to complete the decentralized storage of migration records.
[0150] Specifically, in this embodiment, determining the final encrypted storage strategy is not only the endpoint of data migration, but also the starting point for dynamic adaptation of security capabilities and operational traceability. This step includes two core actions: first, dynamically adjusting encryption parameters based on the storage trend factor of the optimization object to achieve on-demand supply of security strength; second, generating and uploading migration logs to the blockchain to ensure that the entire process is transparent and tamper-proof.
[0151] First, the system intelligently adjusts the key parameters of the encryption storage algorithm based on the storage trend factor of the target optimization object. For example, if a node's storage trend factor is +0.7 (attack pressure is continuously increasing), the system will automatically increase its encryption strength—such as upgrading the AES encryption key length from 128 bits to 256 bits, increasing the number of hash iterations, enabling a more complex obfuscation algorithm, or shortening the key rotation cycle. Conversely, if the trend factor is -0.4 (security is steadily improving), the encryption overhead can be appropriately reduced, such as using a lightweight SM4 algorithm or extending the key update interval, to balance performance and security. This trend-driven elastic encryption mechanism avoids a one-size-fits-all static encryption strategy, allowing security resources to accurately match the actual risk level of nodes, preventing resource waste on low-risk nodes and eliminating insufficient protection for high-risk nodes.
[0152] Secondly, the system automatically generates a structured migration log, which includes key metadata such as source node ID, target node ID, migration data fingerprint (hash value), timestamp, adjusted encryption parameters, correlation coefficient, and security space value. This log is then written to the blockchain's consensus node via a smart contract. Due to the immutable and distributed nature of the blockchain, this record is permanently stored once it is on the chain. Any administrator or auditor can verify the legality, integrity, and timing of the migration, effectively preventing internal tampering, blame-shifting, or compliance risks.
[0153] Reference Figure 2 , Figure 2 This is a block diagram of a blockchain-based sales data management method. (Example:) Figure 2 As shown, this application embodiment also provides an electronic device 3, including: a memory 302 and a processor 301, and a computer program 303 stored on the memory 302. When the computer program 303 is executed on the processor 301, it implements a blockchain-based sales data management method as described in any of the above systems.
[0154] Electronic device 3 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. This electronic device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that... Figure 2 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0155] The processor 301 may be a central processing unit, or it may be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0156] In some embodiments, memory 302 may be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. In other embodiments, memory 302 may also be an external storage device of the electronic device 3, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., equipped on the electronic device 3. Furthermore, memory 302 may include both internal storage units and external storage devices of the electronic device 3. Memory 302 is used to store operating systems, applications, boot loaders, data, and other programs, such as program code of computer programs. Memory 302 may also be used to temporarily store data that has been output or will be output.
[0157] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0158] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0159] It should be particularly noted that, through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, or of course, by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A blockchain-based sales data management method, characterized by, The method comprises the following steps: An attack destructive analysis is performed on the access parameters of each storage node in the blockchain, and a storage trend factor of each storage node is obtained; A security loss analysis is performed on the encrypted stored sales data of each storage node in the blockchain, and a data trend factor of each storage node is obtained; A storage security space of each storage node is calculated according to the storage trend factor and the data trend factor of each storage node, and an optimized sales data is determined; The storage node corresponding to the optimized sales data is taken as an optimization object, and all the optimized sales data is matched with the optimization object for management, and a final encrypted storage strategy is determined.
2. The sales data management method according to Claim 1, wherein The attack destructive analysis on the access parameters of each storage node in the blockchain comprises the following steps: The online time of each access and the interval time of adjacent accesses are obtained, and discrete processing is performed on the online time and the interval time respectively to obtain an online access variance and an interval access variance; The sum of the online access variance and the interval access variance is calculated to obtain an attack destructive influence coefficient; The attack destructive frequency is multiplied by the attack destructive influence coefficient to obtain an attack destructive value of each storage node; A processing period is set, and the attack destructive value of each storage node in the processing period is processed by using a first trend formula to calculate a storage trend factor of each storage node.
3. The sales data management method according to Claim 1, characterized by, The security loss analysis on the encrypted stored sales data of each storage node in the blockchain comprises the following steps: The desensitization proportion of the encrypted stored sales data of each storage node in the blockchain in a preset time is obtained; The difference between the desensitization proportion at the beginning of the preset time and the desensitization proportion at the end of the preset time is calculated to obtain a data desensitization amplitude; The data desensitization amplitude of each storage node in the processing period is processed by using a second trend formula to calculate a data trend factor.
4. The sales data management method according to Claim 1, characterized by, The calculation of the storage security space of each storage node according to the storage trend factor and the data trend factor of each storage node comprises the following steps: The storage trend factor and the data trend factor are calculated by using a difference value to obtain the storage security space; The storage security space is compared with a preset range value to determine the optimized sales data.
5. The sales data management method according to Claim 4, characterized by, The comparison of the storage security space with the preset range value to determine the optimized sales data comprises the following steps: If the storage security space is not in the preset range value corresponding to the storage security space, the sales data stored in the storage node is defined as the optimized sales data.
6. The sales data management method according to Claim 1, characterized by, The matching management of the optimized sales data and the optimization object comprises the following steps: The storage node corresponding to the optimized sales data is taken as the optimization object; Any one of the optimized sales data and any one of the optimization objects is extracted to form a to-be-matched group; The data trend factor corresponding to the optimized sales data and the storage trend factor corresponding to the optimization object are obtained, and a difference value is calculated to obtain a to-be-determined storage security space; The correlation degree of the optimized sales data and the sales data in the optimization object is calculated to obtain a correlation coefficient; The to-be-matched storage security space is calculated by using a formula: ; Wherein A represents a storage security space to be matched, R represents a correlation coefficient, Rb represents a preset standard correlation coefficient, and U represents a storage security space to be determined. If the storage security space to be matched is within the preset range value corresponding to the storage security space, the sales data is migrated to the optimization object for storage.
7. The sales data management method according to Claim 6, characterized by, The step of calculating the correlation degree of the optimized sales data and the sales data in the optimization object to obtain a correlation coefficient includes: Respectively acquiring data desensitization amplitude sequences of the optimized sales data and the sales data in the optimization object within a processing period; The correlation degree of the two data desensitization amplitude sequences is calculated by using a Pearson correlation coefficient formula, and the result is the correlation coefficient.
8. The sales data management method according to Claim 1, characterized by, The step of determining the final encryption storage strategy includes: Adjusting the parameters of the encryption storage algorithm of the object based on the storage trend factor of the optimization object, so that the encryption strength matches the attack resistance performance of the optimization object; A migration log is generated and uploaded to a consensus node of a blockchain to complete the decentralized evidence of migration record. 9.A blockchain-based sales data management apparatus, characterized by, The device includes a storage node evaluation module, a storage data evaluation module, a storage node security module, and an optimization management module. The storage node evaluation module performs attack damage analysis on the access parameters of each storage node in the blockchain to obtain a storage trend factor of each storage node. The storage data evaluation module performs security loss analysis on the encrypted sales data of each storage node in the blockchain to obtain a data trend factor of each storage node. The storage node security module calculates the storage security space of each storage node based on the storage trend factor and the data trend factor of each storage node, and determines the optimized sales data. The optimization management module takes the storage node corresponding to the optimized sales data as an optimization object, matches all the optimized sales data with the optimization object, and determines the final encryption storage strategy.
10. An electronic device comprising a processor and a memory; characterized in that, The memory is used to store a computer program, and the processor is used to load and execute the computer program to enable the electronic device to perform the blockchain-based sales data management method of any one of claims 1-8.
Citation Information
Patent Citations
Educational data management system based on blockchain
CN114219322B
Data storage method and data storage system
CN107203344A
Customer information storage management method and system based on block chain
CN117055818A