Sales data management method and device based on block chain, and electronic equipment
By analyzing the attack and destructive effects and data security of blockchain storage nodes, and calculating storage trend factors and data trend factors, intelligent security management and dynamic migration of sales data are achieved. This solves the problems of data security and storage security separation and insufficient dynamic threat response in existing technologies, and improves the security and management efficiency of sales data.
Patent Information
- Application Number
- CN202511483430.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2025-11-21
- 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 performing attack and destructive analysis on the access parameters of each storage node in the blockchain and security loss analysis on the encrypted sales data, the storage trend factor and data trend factor of the storage nodes are calculated to determine the optimal sales data, which is then matched and managed with the optimal target to 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 CN120995484A_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 taken as an optimization object, all the optimized sales data are matched with the optimization object for management, and a final encryption storage strategy is determined.
[0009] In an embodiment, the step of performing attack-destructive analysis on the access parameters of each storage node in the blockchain to obtain a storage trend factor of each storage node includes:
[0010] The online time of each access and the interval time of adjacent accesses are obtained, and discrete processing is performed on the online access variance and the interval access variance, respectively;
[0011] The sum of the online access variance and the interval access variance is calculated to obtain an attack-destructive impact coefficient;
[0012] The attack-destructive frequency and the attack-destructive impact coefficient are multiplied to obtain an attack-destructive value of each storage node;
[0013] 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.
[0014] In an embodiment, the step of performing 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 includes:
[0015] The desensitization ratio of the encrypted sales data of each storage node in the blockchain at a preset time is obtained;
[0016] The difference between the desensitization ratio at the beginning of the preset time and the desensitization ratio at the end of the preset time is calculated to obtain a data desensitization amplitude;
[0017] 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.
[0018] In an embodiment, the step of calculating a storage security space of each storage node according to the storage trend factor and the data trend factor of each storage node and determining the optimized sales data includes:
[0019] The storage trend factor and the data trend factor are calculated by difference to obtain the storage security space;
[0020] The storage security space is compared with a preset range value to determine the optimized sales data.
[0021] In an embodiment, the step of comparing the storage security space with the preset range value to determine the optimized sales data specifically includes:
[0022] If the storage security space is not within the preset range value corresponding to the storage security space, the stored sales data in the storage node is defined as the optimized sales data.
[0023] In an embodiment, the step of matching the optimized sales data with the matching management object comprises:
[0024] The storage node corresponding to the optimized sales data is taken as the matching management object.
[0025] Any one of the optimized sales data and any one of the matching management objects form a group to be matched.
[0026] The data trend factor corresponding to the optimized sales data and the storage trend factor corresponding to the matching management object are obtained, and a difference calculation is performed to obtain a storage security space to be determined.
[0027] The correlation degree between the optimized sales data and the sales data in the matching management object is calculated to obtain a correlation coefficient.
[0028] The matching storage security space is calculated by a formula:
[0029]
[0030] Wherein A represents the matching storage security space, R represents the correlation coefficient, Rb represents the preset standard correlation coefficient, and U represents the storage security space to be determined.
[0031] If the matching storage security space is within the preset range value corresponding to the storage security space, the sales data is migrated to the matching management object for storage.
[0032] In an embodiment, the step of calculating the correlation degree between the optimized sales data and the sales data in the matching management object to obtain a correlation coefficient comprises:
[0033] The data desensitization amplitude sequence of the sales data in the matching management object and the optimized sales data in a processing period is obtained respectively.
[0034] The correlation degree between the two data desensitization amplitude sequences is calculated by using the Pearson correlation coefficient formula, and the result is the correlation coefficient.
[0035] In an embodiment, the step of determining the final encrypted storage strategy comprises:
[0036] The parameters of the encryption storage algorithm of the object are adjusted based on the storage trend factor of the matching management object, so that the encryption strength matches the attack resistance performance of the matching management object.
[0037] A migration log is generated and uploaded to the consensus node of the blockchain to complete the decentralized notarization of the migration record.
[0038] A blockchain-based sales data management device, comprising: 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-destructive analysis on the access parameters of each storage node in the blockchain to obtain a storage trend factor of each storage node;
[0040] The storage data evaluation module performs security-loss analysis on the encrypted stored sales data of each storage node in the blockchain to obtain a data trend factor of each storage node;
[0041] The storage node security module calculates the storage security space of each storage node according to the storage trend factor and the data trend factor of each storage node, and determines the optimized sales data;
[0042] The optimization management module matches all the optimized sales data with the optimization object, and determines the final encryption storage strategy.
[0043] An electronic device, comprising 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, so that the electronic device executes any of the above blockchain-based sales data management methods.
[0044] Therefore, the present application has the following beneficial effects:
[0045] The present application provides a blockchain-based sales data management method, comprising the following steps:
[0046] The access parameter of each storage node in the blockchain is subjected to attack destructive analysis, and a storage trend factor of each storage node is obtained; the encrypted storage sales data of each storage node in the blockchain is subjected to security loss analysis, and a data trend factor of each storage node is obtained; the 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 the optimized sales data is determined; the storage node corresponding to the optimized sales data is taken as an optimization object, all the optimized sales data is matched and managed with the optimization object, and a final encryption storage strategy is determined. The present application aims to solve the problems of fragmented analysis of data security and storage security, insufficient dynamic threat response, and contradiction between migration efficiency and security in the prior art. Through the anti-attack performance analysis of the storage node and the security performance requirement analysis of the stored sales data, the storage capacity of the blockchain is comprehensively evaluated from the data end and the storage end. Through the comprehensive analysis of the anti-attack performance of the storage node and the security performance of the stored sales data, the migration storage of the sales data is realized, the single-point storage security of the sales data is realized, and the high efficiency and compatibility of the data during migration are ensured. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. 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.
[0048] Figure 1 is a system flowchart of a sales data management method based on a blockchain;
[0049] Figure 2 is a device block diagram of a sales data management method based on a blockchain. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below in combination with the drawings 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 scope of protection of the present application.
[0051] It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0052] To solve the key problems of the existing blockchain sales data management, such as the disjointed analysis of data security and storage security, insufficient dynamic threat response, and the contradiction between migration efficiency and security, the application provides a blockchain-based sales data management method. The method realizes intelligent security management and dynamic migration of sales data by constructing a coupling analysis model of the anti-attack performance of storage nodes and the security requirements of sales data. The method includes the following steps: first, the access parameters of each storage node in the blockchain are analyzed for attack destructiveness to obtain indicators such as access frequency, online time variance, and interval time variance, and a storage trend factor is calculated; second, the encrypted sales data stored in each storage node is analyzed for security loss to obtain the desensitization proportion change trend of the sales data, and a data trend factor is calculated; third, the storage security space is calculated based on the storage trend factor and the data trend factor, and when the storage security space is not within the preset range, the sales data in the storage node is determined as "optimization data"; finally, the storage node corresponding to the optimization data is taken as the optimization object, the data correlation is calculated by Pearson correlation coefficient, the matching storage security space is calculated by a formula, and when it is within the security range, data migration is performed, the encryption storage algorithm parameters are adjusted based on the storage trend factor of the optimization object, a migration log is generated and uploaded to the blockchain consensus node to complete the decentralized notarization.
[0053] The core innovation of the application lies in the construction of a dual trend analysis model of storage nodes and sales data, which realizes the precise matching of data security and storage security. The dynamic trend analysis mechanism enables the system to predict the changes in node attack resistance in real time, avoiding the passive dependence on historical attack data in traditional methods. By setting the storage security space range value and calculating the correlation coefficient, the dynamic balance between migration efficiency and security is achieved, effectively solving the contradiction between excessive pursuit of transmission speed or security strength in traditional methods. In practical applications, the method can significantly improve the security and management efficiency of sales data.
[0054] The embodiment of the application provides a blockchain-based sales data management method, which includes steps S10-S40, as shown in Figure 1 , Figure 1 The system flowchart of the blockchain-based sales data management method is shown in FIG. 1.
[0055] Step S10, attack destructiveness analysis is performed on the access parameters of each storage node in the blockchain to obtain the storage trend factor of each storage node;
[0056] Step S20, security loss analysis is performed on the encrypted sales data stored in each storage node in the blockchain to obtain the data trend factor of each storage node;
[0057] Step S30, according to the storage trend factor and the data trend factor of each storage node, the storage security space of each storage node is calculated, and the optimized sales data is determined;
[0058] Step S40, the storage node corresponding to the optimized sales data is taken as the optimization object, all the optimized sales data is matched and managed with the optimization object, and the final encryption storage strategy is determined.
[0059] Specifically, in the embodiment, step S10, the access parameter of each storage node in the block chain is attacked and destructively analyzed to obtain the storage trend factor of each storage node. The obtaining process of the storage trend factor includes the following steps:
[0060] Obtain the access frequency of each storage node in the block chain within a preset time, and calculate the difference between the access frequency and the access limit frequency to obtain the deviation access frequency;
[0061] The attack and destruction frequency is obtained by frequency calculation of the deviation access frequency and the preset time;
[0062] Obtain the online time of each access (online time is the time period from access start to access end) and the interval time of adjacent access (interval time is the time period from the end of the previous access to the start of the next access);
[0063] Discrete processing is performed on the online time and interval time of all accesses within the preset time to obtain the online access variance and interval access variance; the sum of the online access variance and the interval access variance is calculated to obtain the attack and destruction influence coefficient;
[0064] The attack and destruction frequency and the attack and destruction influence coefficient are multiplied to obtain the attack and destruction value of each storage node;
[0065] Set the processing period, which is set by the technician in advance, and use the first trend formula to process the attack and destruction value of each storage node within the processing period to calculate the storage trend factor of each storage node.
[0066] The first trend formula is: obtain the first time sequence of the attack and destruction value of the storage node within the processing period, calculate the average change slope of the first time sequence, and obtain the storage trend factor of each storage node.
[0067] Step S20, the encrypted storage sales data of each storage node in the block chain is subjected to security loss analysis to obtain the data trend factor of each storage node. The obtaining process of the data trend factor includes the following steps:
[0068] Obtain the desensitization ratio of the encrypted storage sales data of each storage node in the block chain within a preset time;
[0069] a difference between the desensitization ratio at the beginning of the preset time and the desensitization ratio at the end of the preset time, to obtain a data desensitization amplitude;
[0070] a processing period is set, the processing period is set in advance by a technician, and 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 of each storage node.
[0071] The second trend formula is: obtaining a second time sequence of the data desensitization amplitude of the storage node in the processing period, calculating an average change slope of the second time sequence to obtain the data trend factor of each storage node.
[0072] In step S30, the 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 the sales data to be optimized is determined. The calculation process of the storage security space includes the following steps:
[0073] The storage trend factor of each storage node and the data trend factor corresponding to the storage node are obtained;
[0074] The storage trend factor and the data trend factor are calculated by difference to obtain the storage security space of each storage node;
[0075] The storage security space is compared with the preset range value [-0.5, 0.5];
[0076] If the storage security space is not in the storage security space range value [-0.5, 0.5], the sales data stored in the storage node is defined as the sales data to be optimized.
[0077] In step S40, the storage node corresponding to the sales data to be optimized is taken as the optimization object, all the sales data to be optimized is matched with the optimization object for management, and the final encryption storage strategy is determined. The matching management process of the sales data to be optimized and the optimization object includes the following steps:
[0078] The storage node corresponding to the sales data to be optimized is taken as the optimization object;
[0079] Any sales data to be optimized and any optimization object are extracted to form a to-be-matched group;
[0080] The data trend factor corresponding to the sales data to be optimized and the storage trend factor corresponding to the optimization object are obtained, and the difference is calculated to obtain a to-be-judged storage security space;
[0081] The correlation degree between the sales data to be optimized and the sales data in the optimization object is calculated to obtain a correlation coefficient;
[0082] The correlation degree of the two data desensitization amplitude sequences is calculated by using a Pearson correlation coefficient formula to obtain a correlation coefficient;
[0083] The to-be-matched storage security space is obtained by calculation, and if the to-be-matched storage security space is in the storage security space range value [-0.5, 0.5], the stored sales data in the storage node is migrated to the determined optimization object for storage. The steps of determining the final encryption storage strategy include:
[0084] The parameter of the encryption storage algorithm of the optimization object is adjusted based on the storage trend factor of the optimization object, so that the encryption strength matches the attack resistance performance of the optimization object;
[0085] A migration log is generated and uploaded to the consensus node of the blockchain to complete the decentralized notarization of the migration record.
[0086] Further, in the embodiment, the step of obtaining the storage trend factor of each storage node by performing attack damage analysis on the access parameters of each storage node in the blockchain includes:
[0087] The online time of each access and the interval time of adjacent accesses are obtained and are respectively discretely processed to obtain online access variance and interval access variance;
[0088] The sum of the online access variance and the interval access variance is calculated to obtain an 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] A processing period is set, and the attack damage value of each storage node in the processing period is processed by using a first trend formula to calculate the storage trend factor of each storage node.
[0091] Specifically, in the embodiment, the access parameters of each storage node in the blockchain are analyzed for attack damage, thereby obtaining the storage trend factor of each storage node, which is a key pre-step for the sales data intelligent security management realized by the present application. This step quantifies the abnormal fluctuations and attack frequency of node access behavior, constructs a dynamic attack resistance capability evaluation model, and provides a scientific basis for subsequent data migration and security matching. Specifically, this process includes four core sub-steps, which are progressive and build a complete attack damage evaluation system.
[0092] The storage node is a participant in the blockchain network that saves complete or partial blockchain data (such as blocks, transaction records, smart contracts, etc.); the meaning of the attack damage value of each storage node is analyzed by analyzing the frequency of access exceeding the limit within a preset time, indicating that the higher the probability of attack on the storage node, the higher the probability of reduced security; wherein, the attack damage influence coefficient is calculated by considering the online access and interval access fluctuation degree, the greater the influence coefficient indicates that the discrete degree of access is greater, the probability of being attacked is also higher, and the probability of reduced security is also higher, therefore, the attack damage value can more comprehensively evaluate the attack damage degree of each storage node of the blockchain;
[0093] Firstly, the system obtains the online time of each access and the interval time of adjacent accesses, and performs discrete processing thereon to calculate the online access variance and interval access variance. The online time refers to the duration from connection establishment to disconnection of a single access, reflecting the activity level of the attacker or abnormal visitor on the node; the interval time refers to the idle duration between adjacent two accesses, reflecting the burstiness or regularity of the access behavior. Normal business access usually presents stable and regular online duration and interval, while attack behavior often presents extremely short (such as scanning attack) or extremely long online time, and the interval time may present intensive burst or long time silence followed by sudden outbreak. By calculating the variance of the online time and the interval time of all access records within a preset time window, the discrete degree can be quantified - the greater the variance, the more irregular the access behavior, and the more likely to imply attack intention. The online access variance and interval access variance jointly constitute the two-dimensional index of access behavior volatility.
[0094] Secondly, the above two variance values are added to obtain the "attack damage influence coefficient". The coefficient is essentially a comprehensive measure of abnormal volatility of access behavior, which does not directly reflect the attack frequency, but reflects the potential damage caused by single or multiple access behaviors to the stability of the node. For example, even if the number of attacks is not large, but if each attack is accompanied by severe online time or interval time fluctuation (such as high-frequency short-time reconnection, long-time residence followed by sudden disconnection), the influence coefficient will still be high, indicating that such attacks cause great disturbance to the system modules such as resource scheduling, connection pool management, log recording of the node, and have high damage potential.
[0095] Thirdly, the attack damage frequency is multiplied by the attack damage influence coefficient to obtain the attack damage value of each storage node. The attack damage frequency is calculated by dividing the deviation value of the access times exceeding the normal access limit times within a preset time by the time length, reflecting the intensity of attack behavior occurring within a unit time. Multiplying it by the influence coefficient realizes the coupling evaluation of "attack frequency" and "single damage power", thereby more comprehensively depicting the comprehensive attack pressure borne by the node. A high-frequency low-impact scanning attack and a low-frequency high-impact resource depletion attack may have equivalent attack damage values, and the system can identify both as high-risk nodes.
[0096] Finally, a processing period (such as day, week or month) is set, and the first trend formula is used to calculate the average change slope of the attack damage value sequence within the processing period, thereby obtaining the storage trend factor of each storage node. The factor is no longer a static value, but an index reflecting the dynamic change trend of the node's attack resistance. If the slope is positive, it means that the attack pressure recently suffered by the node is on the rise, and the security is deteriorating; if the slope is negative, it means that the security situation is improving; if the slope is close to zero, the node is in a relatively stable state. This trend analysis makes the system have the ability to predict, and can identify risk nodes in advance before the attack has not yet broken out on a large scale, thereby gaining valuable time window for the active migration of sensitive sales data.
[0097] Further, in the embodiment, the step of performing security loss analysis on the encrypted and stored sales data of each storage node in the blockchain to obtain a data trend factor of each storage node includes:
[0098] Obtaining the desensitization ratio of the encrypted and stored sales data of each storage node in the blockchain within a preset time;
[0099] Calculating the difference between the desensitization ratio at the beginning of the preset time and the desensitization ratio at the end of the preset time to obtain a data desensitization amplitude;
[0100] Using the second trend formula to process the data desensitization amplitude of each storage node within the processing period to calculate the data trend factor.
[0101] Specifically, in the present embodiment, the secure loss analysis is performed on the encrypted sales data stored by each storage node in the blockchain to obtain a data trend factor, which is a key link for the application to realize dynamic matching of sales data and storage node security capability. This step focuses on the evolution trend of the security requirements of sales data itself, rather than the external attack pressure of the node, thereby constructing a quantitative model of data end security requirements, and forming a two-dimensional collaborative evaluation system with the aforementioned storage end attack resistance capability. Specifically, this process includes three core sub-steps of desensitization ratio collection, desensitization amplitude calculation, and trend factor modeling, which are progressive and accurately depict the dynamic changes of the security level of sales data.
[0102] Firstly, the system acquires the desensitization ratio of the encrypted sales data stored by each storage node in the blockchain within a preset time. The desensitization ratio is defined as: the number of sensitive fields after desensitization (such as data masking, generalization, perturbation, tokenization, etc.) accounts for the total number of sensitive fields of the sales data stored by the node. For example, a node stores 1000 customer sales records, each record contains customer name, ID number, phone number and purchase amount, and if 800 records of the "ID number field" are desensitized, the desensitization ratio is 800 / 1000=80%. The higher the desensitization ratio, the higher the current data security protection strength, and the higher the security requirement for the storage environment; on the contrary, the desensitization ratio decreases, which may mean that the business needs higher data availability, or the security level is reduced after risk assessment. The system collects the desensitization ratio of the sales data of each node according to a fixed time granularity (such as every hour, every day), forming time series data.
[0103] Secondly, the desensitization amplitude between the start and end points of the preset time is calculated, and the data desensitization amplitude is obtained. This amplitude reflects the adjustment direction and strength change of the sales data security strategy within a certain observation period. For example, if the desensitization ratio of a node is 60% at the beginning of the month and rises to 85% at the end of the month, the desensitization amplitude is +25%, indicating that the security requirement of the sales data stored by the node has been significantly improved within the period, which may be caused by regulatory updates, customer complaints, internal audits, or an increase in high-risk transactions; if the desensitization ratio decreases from 80% to 50%, the amplitude is -30%, indicating that the security requirement is reduced, which may be caused by data entering the archiving stage, business analysis requirements increasing, or risk level re-evaluation. The positive and negative and size of the desensitization amplitude directly quantify the change rate and change direction of the data security requirement, which is the core input of dynamic security evaluation.
[0104] Finally, the same time processing cycle as the aforementioned storage trend factor is set, and a second trend formula is used to calculate the average change slope of the data desensitization amplitude sequence at each time point in the cycle to obtain a "data trend factor". The factor is not an absolute value of the current desensitization ratio, but a derivative index of the change trend of the desensitization ratio. If the slope is positive and large, it means that the data security demand is accelerating, and the node will carry higher security level data in the future, and put forward higher requirements for the anti-attack ability of the storage environment; if the slope is negative, the security demand tends to be eased; if the slope tends to zero, the data security strategy is in a stable period.
[0105] Further, in the embodiment, the step of calculating the storage security space of each storage node according to the storage trend factor and the data trend factor of each storage node, and determining the sales data for optimization, comprises:
[0106] The storage trend factor and the data trend factor are calculated by difference to obtain the storage security space;
[0107] The storage security space is compared with a preset range value to determine the sales data for optimization.
[0108] Specifically, in the embodiment, the storage security space is calculated according to the storage trend factor and the data trend factor of each storage node, and the sales data for optimization is determined accordingly, which is the core decision-making link of the intelligent migration and security matching of sales data. This step builds a dynamic coupling evaluation model, quantitatively compares the change trend of the node's anti-attack ability with the change trend of the data security demand, and thus identifies the risk nodes or inefficient nodes that do not match the current storage resource configuration and security demand, providing accurate targets for subsequent data migration. The whole process includes three key sub-steps of factor acquisition, difference calculation and threshold comparison, which are closely related to each other, forming a closed-loop decision-making mechanism.
[0109] Firstly, the system obtains the storage trend factor and the data trend factor of each storage node. Both of the two factors are dynamic trend indexes calculated by the aforementioned analysis module, rather than static snapshots. The storage trend factor reflects the evolution direction of the node's anti-attack ability in the processing cycle - a rising value indicates that the attack pressure is increasing and the security is weakening, and a falling value indicates that the security is strengthening. The data trend factor reflects the evolution direction of the security demand of the sales data stored in the node - a rising value indicates that the data sensitivity is improving and the security requirement is increasing, and a falling value indicates that the security requirement is decreasing. Both factors are calculated in the same processing cycle and time scale, ensuring the consistency and comparability of the evaluation dimension. For example, if the storage trend factor of a node is +0.35 (security deterioration) and the data trend factor is +0.42 (security demand rising), it means that the node is facing the dual pressure of "capability decline and demand rise", and it is likely to become a security short board of the system.
[0110] Secondly, the storage trend factor is subtracted from the data trend factor to obtain a storage security space, and the calculation formula is: storage security space = storage trend factor - data trend factor. The difference has a clear physical meaning:
[0111] If the result is positive (such as +0.5), it means that the decline speed (or deterioration degree) of the node attack resistance capability exceeds the growth speed of the data security demand, that is, the capability cannot keep up with the demand, and there is a security gap;
[0112] If the result is negative (such as -0.6), it means that the data security demand decreases at a speed exceeding the speed of the node capability deterioration, that is, the demand is lower than the capability, and the resources are redundant or wasted;
[0113] If the result approaches zero (such as ±0.1), it means that the node capability and the data demand change synchronously, and the matching is good. The security space is essentially a quantitative indicator of dynamic balance between capability and demand. The greater the absolute value, the more serious the imbalance, and the more intervention is needed.
[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 sales data to be optimized. The range value is an empirical threshold obtained through a large number of simulation experiments and historical attack data analysis, representing the capability-demand imbalance boundary that the system can tolerate:
[0115] If the storage security space is in [-0.5, +0.5], it means that the current node capability and data demand are basically matched, and there is no need to migrate. The data in the node is defined as non-optimized data;
[0116] If the storage security space is greater than +0.5, it means that the node security deterioration speed far exceeds the data security demand growth, and the node becomes a high-risk point. The sales data stored in the node needs to be migrated to a safer node;
[0117] If the storage security space is less than -0.5, it means that the data security demand has decreased significantly, while the node capability remains high, causing resource waste. The data can be migrated to a normal node to release high-security resources. In the above two cases where the threshold is exceeded, the sales data stored in the node is defined as the sales data to be optimized, that is, the data needs to be found in a more optimal matching storage node.
[0118] Further, in this embodiment, the step of comparing the storage security space with the preset range value to determine the sales data to be optimized specifically comprises:
[0119] If the storage security space is not in 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 the present embodiment, the calculated storage security space is compared with the preset range value ([-0.5, +0.5]), which is the key decision point for determining whether the 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 the node is defined as the sales data to be optimized, that is, the data object needs to find a more matching secure storage environment. The value of the storage security space essentially reflects the relative deviation between the node attack resistance trend and the data security demand trend. When its absolute value exceeds 0.5, it means that the imbalance has reached an intolerable level of the system - either the node security lags far behind the data protection requirements (positive value is too large), constituting a security risk; or the data security level has been greatly reduced while the node still maintains a high protection level (negative value is too small), causing resource mismatch and waste.
[0121] Once it is determined that it is not within the range, the system automatically marks all or part of the sales data in the node as optimization data, triggering the subsequent migration process. For example, a node is subjected to continuous scanning attacks, and the storage trend factor rises to +0.9, while the customer transaction data it carries is desensitized due to compliance requirements, and the data trend factor is +0.3, the difference is +0.6 > +0.5, the system immediately identifies it as a high-risk state and marks its data as "optimization" and prepares to migrate to a node with stronger defense capabilities. Conversely, if a node has been under attack for a long time (storage trend factor -0.6), but the data stored has been archived and desensitized (data trend factor -0.8), the difference +0.2 is still within the range, no migration is needed, and the status quo is maintained to save resources. This threshold decision strategy takes into account safety and efficiency, avoiding frequent meaningless data movement while ensuring a quick response when there is a real imbalance. Through this step, the system realizes seamless connection from trend analysis to action triggering, enabling the blockchain sales data management to have the ability of self-diagnosis and self-optimization, significantly improving the overall architecture's resilience and resource utilization.
[0122] Further, in the present embodiment, the step of matching management of the optimized sales data and the optimization object comprises:
[0123] taking the storage node corresponding to the optimized sales data as the optimization object;
[0124] extracting any one of the optimized sales data and any one of the optimization objects to form a to-be-matched group;
[0125] obtaining the data trend factor corresponding to the optimized sales data and the storage trend factor corresponding to the optimization object, performing difference calculation to obtain the to-be-judged storage security space;
[0126] The correlation coefficient is obtained by calculating the correlation degree of the sales data of the optimization and the sales data in the optimization object;
[0127] The to-be-matched storage security space is obtained by formula calculation:
[0128]
[0129] Wherein A represents the to-be-matched storage security space, R represents the correlation coefficient, Rb represents the preset standard correlation coefficient, and U represents the to-be-judged storage security space;
[0130] If the to-be-matched storage security space is within the preset range value corresponding to the storage security space, the sales data is migrated to the optimization object for storage.
[0131] Specifically, in the embodiment, the matching management of the optimized sales data and the optimization object is the core decision engine for realizing intelligent, safe and efficient migration of sales data. Instead of simply moving high-risk data to a high-security node, a dual-dimensional intelligent matching mechanism integrating node capability adaptability and data attribute compatibility is constructed to ensure that the overall system safety and efficiency is maximized, resource utilization is optimized, and business continuity is most stable after migration. The specific process includes five precisely coordinated sub-steps, forming a closed-loop dynamic matching model.
[0132] Firstly, the system automatically includes all original storage nodes corresponding to the sales data marked for optimization into the candidate optimization object pool. These nodes themselves may have the potential to undertake high-sensitive data due to low storage trend factor (strong security) or resource redundancy. For example, a node has a storage trend factor of -0.6 due to long-term no attack behavior, although it does not currently store high-sensitive data, its defense capability is redundant, and it can be used as a high-quality migration target.
[0133] Secondly, the system adopts a combination of trial and error + greedy optimization strategy to extract a pair of combinations from the optimization data set and the optimization object pool at random or according to priority, forming a to-be-matched group. This process can be parallel multi-group matching calculation to improve efficiency, or can be sorted by data sensitivity or node load to prioritize matching high-value data, taking into account performance and security.
[0134] Thirdly, the system obtains the data trend factor (reflecting the security demand intensity) of the optimization sales data and the storage trend factor (reflecting the attack resistance ability) of the optimization object in the group, and performs difference calculation to obtain the to-be-judged storage security space U. For example, if the data trend factor is +0.8 (high security demand) and the object storage trend factor is -0.3 (high defense capability), then U = -0.3 - 0.8 = -1.1, which preliminarily shows that the ability far exceeds the demand and has a matching basis.
[0135] Fourthly, the system further calculates the correlation coefficient R between the optimized sales data and the existing sales data in the target object, and analyzes the evolution similarity of the two in the desensitization amplitude sequence by using the Pearson formula. If the R value is high (such as 0.75), it means that the two types of data are highly coordinated in the safety level adjustment rhythm and the business cycle sensitivity, and can share the encryption strategy and access control rules after migration, thereby reducing the management complexity; if the R value is low (such as 0.1), it may cause policy conflicts or resource mismatch.
[0136] Fifthly, the system introduces a comprehensive evaluation formula: A = R × Rb + U, wherein Rb is a preset standard correlation coefficient (0.4 in this embodiment), which is used to balance the data compatibility and the capacity adaptability. The finally calculated A is the comprehensive matching degree of the combination, which reflects the comprehensive matching degree of the combination. If the A value falls within the preset safety range [-0.5, +0.5], it is determined that the matching is successful, and the data migration is triggered; otherwise, the combination is abandoned, and a matching pair is selected again.
[0137] For example, a group of U = -1.1 (overcapacity), R = 0.75 (high correlation), then A = 0.75 × 0.4 + (-1.1) = 0.3 - 1.1 = -0.8, which is out of the lower limit, and is not matched temporarily; and another group of U = -0.3, R = 0.6, then A = 0.6 × 0.4 - 0.3 = 0.24 - 0.3 = -0.06, which is within the safety range, and the matching is successful. Through the above steps, the system realizes the intelligent transition from rough screening to precise matching, not only considers whether it can be stored (safety capacity), but also considers whether it is suitable to be stored (data semantics), thereby avoiding the blindness of only looking at hardware and not looking at content in the traditional migration. At the same time, the mechanism supports dynamic rematching, and when the node state or data demand changes, the matching process can be triggered again to ensure that the system is always in the optimal security configuration.
[0138] Further, in the embodiment, the step of calculating the correlation degree between the optimized sales data and the sales data in the optimized object to obtain a correlation coefficient comprises:
[0139] respectively obtaining the data desensitization amplitude sequence of the optimized sales data and the sales data in the optimized object within a processing period;
[0140] The Pearson correlation coefficient formula is used to calculate the correlation degree of the two data desensitization amplitude sequences, and the result is the correlation coefficient.
[0141] Specifically, in the present embodiment, to achieve security compatibility and business continuity in the sales data migration process, the system needs to calculate the correlation between the sales data to be migrated and the existing sales data in the target optimization object, and use the correlation coefficient as an important basis for matching decision. The core of this step is to quantify the similarity of the two types of data in the security evolution trend, to ensure that after migration, data attribute conflicts do not cause management confusion or security policy failure.
[0142] Specifically, the system first extracts the data de-sensitization amplitude sequence of the optimization sales data and the sales data in the optimization object within the same processing period. This sequence is composed of multiple time point de-sensitization proportion change values, reflecting the dynamic trajectory of the security level adjustment of each data set within the period. For example, a certain promotion data set has a de-sensitization amplitude sequence of [+5%, +10%, +15%, +8%, +20%, +12%, +18%] within 7 days, and the historical sales data sequence in the target node is [+3%, +6%, +9%, +5%, +15%, +8%, +14%], both of which show an upward trend, providing a potential matching basis.
[0143] Subsequently, the system calculates the two sequences using the Pearson Correlation Coefficient formula:
[0144] R = cov(X,Y) / (σ x × σ y )
[0145] Where X and Y are the two de-sensitization amplitude sequences, cov(X,Y) is their covariance, and σ x and σ y are their standard deviations. The calculation result R ∈ [-1, +1], R > 0 indicates a positive correlation, and the closer to 1, the more synchronized the security evolution trend of the two data sets; R ≈ 0 indicates no correlation; R < 0 indicates a divergent trend.
[0146] If the R value is high (such as > 0.6), it indicates that the two types of sales data are highly coordinated in terms of security sensitivity changes, and after migration, similar encryption strategies, access control rules, and audit mechanisms can be shared, 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 evaluates whether the node capabilities match, but also further judges whether the data attributes are compatible.
[0147] Further, in the present embodiment, the step of determining the final encryption storage strategy comprises:
[0148] adjust parameters of the encryption storage algorithm of the object based on the storage trend factor of the object to be optimized, so that the encryption strength matches the anti-attack performance of the object to be optimized;
[0149] generate a migration log and upload it to a consensus node of the blockchain to complete the decentralized notarization of the migration record.
[0150] Specifically, in the embodiment, determining the final encryption storage strategy is not only the end point of data migration, but also the starting point of dynamic adaptation of security capability and traceability of operation. This step includes two core actions: one is to dynamically adjust the encryption parameters based on the storage trend factor of the object to be optimized, to realize on-demand supply of security strength; the other is to generate and chain the migration log to ensure transparency and non-tamperability of the whole process.
[0151] First, the system intelligently adjusts the key parameters of the encryption storage algorithm of the target object to be optimized according to the storage trend factor. For example, if the storage trend factor of a node is +0.7 (attack pressure continuously rising), the system will automatically increase the encryption strength - such as upgrading the AES encryption key length from 128 bits to 256 bits, increasing the number of hash iterations, enabling more complex confusion algorithms or shortening the key rotation period; on the contrary, if the trend factor is -0.4 (security steadily enhanced), the encryption overhead can be appropriately reduced, such as using lightweight SM4 algorithm or extending the key update interval, to balance performance and security. This trend-driven elastic encryption mechanism avoids the one-size-fits-all static encryption strategy, so that the security resources accurately match the actual risk level of the node, preventing both resource waste of low-risk nodes and insufficient protection of high-risk nodes.
[0152] Second, 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, security space value, and writes the log into the consensus node of the blockchain through the smart contract. Due to the non-tamperable and distributed nature of the blockchain, this record is permanently notarized once it is chained, and any administrator or auditor can verify the legality, integrity and timing of the migration behavior, effectively preventing internal tampering, responsibility shirking or compliance risks.
[0153] Referring to Figure 2 , Figure 2 is a device block diagram of a blockchain-based sales data management method. As Figure 2 shown, the present application embodiment also provides an electronic device 3, comprising a memory 302 and a processor 301 and a computer program 303 stored in the memory 302, when the computer program 303 is executed on the processor 301, realizing a kind of blockchain-based sales data management method as any one of the above system.
[0154] The electronic device 3 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The electronic device 3 can include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art can understand that Figure 2 The electronic device 3 is only an example and does not limit the electronic device 3, which can include more or fewer components than shown, or combine some components, or include different components, such as an input / output device, a network access device, and the like.
[0155] The processor 301 can be a central processing unit, and can also be other general-purpose processors, digital signal processors, application-specific integrated circuits, programmable logic devices, discrete gates or transistor logic components, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or can be any conventional processor.
[0156] The memory 302 can be an internal storage unit of the electronic device 3, such as a hard disk or a memory of the electronic device 3 in some embodiments. The memory 302 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, and the like equipped on the electronic device 3 in other embodiments. Further, the memory 302 can include both the internal storage unit and the external storage device of the electronic device 3. The memory 302 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of computer programs, and the like. The memory 302 can 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 term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or system. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or system including the element.
[0158] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0159] In particular, it should be noted that through the above description of the embodiments, those skilled in the art can clearly understand the embodiments, which can be implemented by means of software and necessary general hardware platforms, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment 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 the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; 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 blockchain-based sales data management method, characterized in that, Includes the following steps: 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; Security vulnerability analysis is performed on the encrypted sales data stored at each storage node in the blockchain to obtain the data trend factor for each storage node; Based on the storage trend factor and data trend factor of each storage node, the storage safety space of each storage node is calculated, and the optimal sales data is determined. 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.
2. The sales data management method as described in claim 1, characterized in that, 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: 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. Calculate the sum of the online access variance and the interval access variance to obtain the attack damage impact coefficient; The attack damage frequency and the attack damage impact coefficient are multiplied to obtain the attack damage value of each storage node; 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.
3. The sales data management method according to claim 1, characterized in that, 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: Obtain the percentage of de-identified sales data encrypted and stored on each storage node in the blockchain within a preset time period; 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. The data trend factor is calculated by using the second trend formula to process the data anonymization magnitude of each storage node within the processing period.
4. The sales data management method according to claim 1, characterized in that, 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: The storage safety space is obtained by calculating the difference between the storage trend factor and the data trend factor. The storage security space is compared with a preset range value to determine the optimal sales data.
5. The sales data management method according to claim 4, characterized in that, The step of comparing the storage security space with a preset range value to determine the optimal sales data specifically includes: 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.
6. The sales data management method according to claim 1, characterized in that, The steps for matching and managing the sales data and target objects for optimization include: The storage node corresponding to the sales data being optimized is taken as the optimization object; Extract any sales data from the target search and any target search object to form a matching group; 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; Calculate the correlation coefficient between the sales data of the target optimization and the sales data within the target optimization object; The safe storage space to be matched is calculated using the formula: ; 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. 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.
7. The sales data management method according to claim 6, characterized in that, The step of calculating the correlation coefficient between the sales data of the optimization search and the sales data within the optimization target includes: Obtain the data anonymization magnitude sequence of the sales data for optimization and the sales data within the optimization target during the processing cycle; The correlation between the two desensitized amplitude sequences is calculated using the Pearson correlation coefficient formula, and the result is the correlation coefficient.
8. The sales data management method according to claim 1, characterized in that, The step of determining the final encrypted storage strategy includes: 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. The migration log is generated and uploaded to the consensus node of the blockchain to complete the decentralized storage of migration records.
9. A blockchain-based sales data management device, characterized in that, 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 and destructive analysis on the access parameters of each storage node in the blockchain to obtain the storage trend factor of each storage node. 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. 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. 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.
10. An electronic device, comprising a processor and a memory; characterized in that, The memory is used to store a computer program; the processor is used to load and execute the computer program to cause the electronic device to perform the blockchain-based sales data management method as described in 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
Distributed data encryption and verification system and method based on block chain
CN120710777A
Data security storage protection device and system
CN120744958A