A privacy encryption method for archival record tracing based on blockchain
By preprocessing and classifying and grading the archive record data, building encryption strategy and optimizing the model, the problems of low data security and encryption efficiency in the archive management system are solved, and efficient and flexible privacy encryption and security enhancement are achieved to adapt to different archive record traceability needs.
Patent Information
- Application Number
- CN202510400037.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-04-01
AI Technical Summary
The existing archive management system faces the risks of data leakage, tampering and unauthorized access during data sharing and transmission. Although blockchain technology has high security, it has the risk of delay and sensitive information leakage when processing large amounts of high-frequency archival data. Traditional encryption methods have problems such as low encryption efficiency and complex key management, making it difficult to achieve flexible classification and hierarchical encryption.
By collecting archival record data, preprocessing and classification hierarchy, constructing encryption strategies, using the European-style distance matrix and local density calculation to determine the K nearest neighbor set, combining the Gaussian kernel function to calculate the sparse local density, extract the importance of feature information, and embed the timestamp for hierarchical encryption according to the importance, combining the autoencoder, blockchain technology and deep learning algorithm to optimize the encryption model, and using the particle swarm optimization algorithm to optimize the encryption error.
It improves the accuracy and efficiency of privacy encryption in archival record traceability, realizes intelligent hierarchical encryption and resource saving, adapts to the privacy encryption needs of different standards, and enhances data security and reliability.
Smart Images

Figure CN120197197B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of privacy encryption, and in particular to a privacy encryption method for archival record tracing based on blockchain. Background Art
[0002] With the rapid development of information technology, the digital management of archival records has become increasingly important. However, issues related to privacy protection and data security are also becoming increasingly prominent. Traditional archival management systems face risks such as data leakage, tampering, and unauthorized access during data sharing and transmission. To address these challenges, blockchain technology has been introduced into archival record management. Leveraging its decentralized, tamper-proof, and highly secure nature, it provides a new solution for archival record traceability and privacy protection.
[0003] Although blockchain technology itself possesses high security capabilities, its inherent characteristics alone cannot fully meet the privacy protection requirements for archival data. Furthermore, while traditional encryption methods can encrypt and protect data, they often suffer from low encryption efficiency and complex key management when faced with massive amounts of archival data. Furthermore, it is difficult to flexibly classify and encrypt data based on its importance, making it impossible to achieve precise privacy protection.
[0004] Although blockchain technology has many advantages in archive management, it also faces some challenges in practical applications: how to seamlessly connect the existing archive management system with the blockchain platform is a key issue; since each additional record in the blockchain requires verification by all nodes in the entire network, there may be delays when processing large amounts of high-frequency archive data; although the blockchain itself is highly secure, improper design may also lead to the leakage of sensitive information.
[0005] Therefore, Kou Dai invented a new privacy encryption method to improve the security, efficiency and reliability of privacy encryption. Summary of the Invention
[0006] The purpose of this invention is to provide a privacy encryption method for archival record tracing based on blockchain.
[0007] To achieve the above object, the present invention is implemented according to the following technical solutions:
[0008] The present invention comprises the following steps:
[0009] Collecting archival record data under archival record tracing and preprocessing the archival record data;
[0010] In the actual evaluation, the archival record data of XXX is taken as the research object, which includes record A, record B and record C;
[0011] Classifying and grading the archive record data according to their importance to obtain sub-control data, and constructing an encryption strategy based on the sub-control data; comprising:
[0012] Construct a Euclidean distance matrix through the archival record data, determine the K nearest neighbor set, and calculate the local density of the archival record data:
[0013] ,
[0014] The local density of the x-th archive record data is , the cth file record data is , the xth file record data is , archival record data and archival record data The Euclidean distance is , archival record data The number of elements in the neighbor set of , archival record data The neighbor set of , the adjustment factor is , the archive record data set is B, the archive record data The probability of occurrence is ;
[0015] For local archival record data with less than 3 samples, the Gaussian kernel function is used to calculate the sparse local density:
[0016] ,
[0017] The sparse local density of the x-th archive record data is , the cutoff distance of the cth archive record data is ;
[0018] Obtain clusters based on local density and calculate the optimized mean shift for archival data:
[0019] ,
[0020] The archive records data The optimized mean shift of , the bandwidth parameter is , dimension The bandwidth parameter is , the number of archive record data is , the kernel density gradient is estimated as ;
[0021] The archival record data with the largest optimized mean shift is used as the cluster center of the classification cluster, the feature information of the archival record data in the classification cluster is extracted, and the importance of the feature information is calculated:
[0022] ,
[0023] The probability of the xth feature information appearing in the yth classification cluster is , the number of classification clusters is , the adjustment factor of the xth feature information is , the correlation degree of the xth feature information in the yth classification cluster is , the importance of the xth feature information is ;
[0024] Sort the feature information in descending order according to importance to obtain the sub-control data; the feature information with a value less than 1 and greater than or equal to 0.752 is ranked as level one, the feature information with a value greater than or equal to 0.479 and less than 0.752 is ranked as level two, the feature information with a value greater than or equal to 0.283 and less than 0.479 is ranked as level three, and the feature information with a value greater than or equal to 0 and less than 0.283 is ranked as level four;
[0025] In the actual evaluation, the importance of the characteristic information of record A is level one, the importance of the characteristic information of record B is level three, and the importance of the characteristic information of record C is level two;
[0026] Record A has a timestamp embedded in the middle, record B has a timestamp embedded in the start and middle, and record C has a timestamp embedded in the start and end.
[0027] Record A: Only accessible to personnel with top-level permissions; Record B: Only accessible to personnel with level 2 permissions and above;
[0028] Record C: Accessible to personnel with Level 3 clearance and above;
[0029] Performing hierarchical encryption on the archive record data according to the encryption strategy to obtain encrypted data, and constructing an archive record traceability privacy encryption model based on the encrypted data;
[0030] In the actual evaluation, record A: The timestamp 2023-10-01T12:00:00Z is embedded in the data middle end; record B: The timestamp 2023-10-01T12:00:00Z is embedded in the starting end and the timestamp 2023-10-01T12:02:30Z is embedded in the middle end; record C: The timestamp 2023-10-01T12:00:00Z is embedded in the starting end and the timestamp 2023-10-01T12:05:00Z is embedded in the terminal end;
[0031] The archive record tracing privacy encryption model is optimized according to the encryption error, the data to be encrypted is input into the archive record tracing privacy encryption model, and the privacy encryption result is output.
[0032] Furthermore, the method for constructing an encryption strategy based on the distributed control data includes:
[0033] When the importance of the characteristic information of the sub-control data is level one, a timestamp is embedded in the middle of the archive record data; when the importance of the characteristic information of the sub-control data is level two, a timestamp is embedded in the starting and ending ends of the archive record data; when the importance of the characteristic information of the sub-control data is level three, a timestamp is embedded in the starting and ending ends of the archive record data; when the importance of the characteristic information of the sub-control data is level four, a timestamp is embedded in the starting, ending, and middle ends of the archive record data;
[0034] At the same time, identity restrictions are added. When the importance of the characteristic information of the sub-control data is level one, the identity restriction is to the top-level authority personnel; when the importance of the characteristic information of the sub-control data is level two, the identity restriction can be required to be level two authority personnel and above; when the importance of the characteristic information of the sub-control data is level three, the identity restriction can be required to be level three authority personnel and above; when the importance of the characteristic information of the sub-control data is level four, the identity restriction can be required to be level four authority personnel and above;
[0035] The top-level authority personnel are engineers, the second-level authority personnel are project leaders, the third-level authority personnel are project executors, and the fourth-level authority personnel are ordinary employees.
[0036] Furthermore, the method for hierarchically encrypting the archive record data according to the encryption strategy to obtain encrypted data includes:
[0037] Extract the characteristic information of the archival record data, use the characteristic information as nodes, and calculate the importance of the nodes;
[0038] Calculate the weight coefficient of the node:
[0039] ,
[0040] The importance of the w-th node is , the joint distribution of the wth node and the kth node is , the weight coefficient of the wth node is , the edge distribution of the w-th node is , the edge distribution of the kth node is , the importance of the kth node is ;
[0041] Calculate the privacy matching index of the node according to the encryption strategy:
[0042] ,
[0043] The privacy matching index of the w-th node is , the jth privacy policy is , the average value of privacy policy is , the number of privacy policies is , the wth node is The average value of the node is , the control parameters are , the balance factor is , the number of privacy policies is ;
[0044] like , then the encryption level of the node is level 4; if , then the encryption level of the node is level three; if , then the encryption level of the node is level 2; if , then the encryption level of the node is level one;
[0045] The three-dimensional point cloud model is used to embed the timestamp of the archival record data according to the encryption level, and the bit weight is calculated:
[0046] ,
[0047] The weight of node u is , the number of nodes is N, and the bit form of the node is ;
[0048] Embed timestamp, the expression is:
[0049] ,
[0050] ,
[0051] The coordinates of the vertices are , the x-axis coordinate of the vertex is , the y-axis coordinate of the vertex is , the coordinate of the vertex z axis is , the timestamp embedding parameters are , the three-dimensional unit vector is , the error value of the vertex coordinates is ;
[0052] Converts archive record data with embedded timestamps into a byte string and outputs it as encrypted data.
[0053] Furthermore, a method for constructing an archive record tracing privacy encryption model based on the encrypted data includes:
[0054] Archival record traceability privacy encryption models include autoencoders, blockchain technology, and deep learning algorithms;
[0055] The autoencoder compresses the encrypted data into a low-dimensional representation through the encoder, and then reconstructs the original data through the decoder to learn the essential characteristics of the data and obtain the encrypted features;
[0056] Blockchain technology uses hash functions, asymmetric encryption, and consensus mechanisms to encrypt data, ensuring its immutability and security. It also utilizes distributed ledgers to achieve decentralized storage and verification of encrypted data, thereby obtaining private encrypted data.
[0057] Deep learning algorithms acquire encryption skills and enhance data security by combining encryption features and privacy-encrypted data to learn the encryption patterns and verification rules of the data during training.
[0058] Furthermore, the method for optimizing the archival record tracing privacy encryption model based on encryption error includes:
[0059] The particle swarm optimization algorithm is introduced, the error between the predicted encryption result and the actual encryption result is used as the fitness function, and the encryption result is used as the particle;
[0060] The particle position with the minimum fitness is taken as the optimal position, and the particle position is updated. The expression is:
[0061] ,
[0062] The updated position of the zth particle in the t+1th iteration is , the initial position of the zth particle is , the control coefficient is , the scan factor is , a random number from 0 to 1 is , the original sequence of the zth particle in the tth iteration is , the best position is ;
[0063] The particle position is updated through the distribution operator to obtain the motion position. The expression is:
[0064] ,
[0065] The motion position of the zth particle in the t+1th iteration is , a random number between 0 and 1 is , a random number between -1 and 1 is , the updated position of the zth particle at the tth iteration is ;
[0066] Update the motion position according to the spiral coefficient to obtain the spiral position. The expression is:
[0067] ,
[0068] The spiral coefficient is , the current number of iterations is t, and the maximum number of iterations is , the motion position of the zth particle in the tth iteration is , the position of the random particle in the tth iteration is , the spiral position of the zth particle in the t+1th iteration is ;
[0069] The inhibition factor is introduced, and the spiral position is updated and adjusted according to the inhibition factor to obtain the inhibition position. The expression is:
[0070] ,
[0071] ,
[0072] The suppression factor for the tth iteration is , the random numbers from 0 to 1 are 、 , the spiral position of the zth particle in the tth iteration is , the suppression position of the zth particle in the t+1th iteration is ;
[0073] Continue to iterate until the maximum number of iterations is reached, otherwise update the suppression factor and reselect the optimal solution.
[0074] In a second aspect, an embodiment of the present application further provides an electronic device, including:
[0075] A processor; and a memory arranged to store computer executable instructions, which when executed cause the processor to perform the method steps described in the first aspect.
[0076] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple applications, the electronic device executes the method steps described in the first aspect.
[0077] The beneficial effects of the present invention are:
[0078] The present invention is a privacy encryption method for archival record tracing based on blockchain. Compared with the existing technology, the present invention has the following technical effects:
[0079] The present invention can improve the accuracy of privacy encryption in archival record tracing through preprocessing, classification and grading, encryption strategy construction, hierarchical encryption, model construction and model optimization steps, thereby improving the precision of privacy encryption in archival record tracing, optimizing privacy encryption in archival record tracing, greatly saving resources, and improving work efficiency. It can realize intelligent privacy encryption in archival record tracing, and automatically perform classification and grading and hierarchical encryption in real time, which is of great significance to privacy encryption in archival record tracing, can adapt to privacy encryption in archival record tracing of different standards and privacy encryption requirements in archival record tracing, and has a certain universality. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 This is a flowchart of the steps of a privacy encryption method for archival record tracing based on blockchain in the present invention;
[0081] Figure 2 This is a schematic diagram of the structure of an electronic device in an embodiment of this specification. DETAILED DESCRIPTION
[0082] The present invention will be further described below through specific examples. The illustrative examples and descriptions of the present invention are used to explain the present invention but are not intended to limit the present invention.
[0083] The present invention provides a privacy encryption method for archival record tracing based on blockchain, comprising the following steps:
[0084] like Figure 1 As shown, in this embodiment, the following steps are included:
[0085] Collecting archival record data under archival record tracing and preprocessing the archival record data;
[0086] Classifying and grading the archive record data according to their importance to obtain sub-control data, and constructing an encryption strategy based on the sub-control data; comprising:
[0087] Construct a Euclidean distance matrix through the archival record data, determine the K nearest neighbor set, and calculate the local density of the archival record data:
[0088] ,
[0089] The local density of the x-th archive record data is , the cth file record data is , the xth file record data is , archival record data and archival record data The Euclidean distance is , archival record data The number of elements in the neighbor set of , archival record data The neighbor set of , the adjustment factor is , the archive record data set is B, the archive record data The probability of occurrence is ;
[0090] For local archival record data with less than 3 samples, the Gaussian kernel function is used to calculate the sparse local density:
[0091] ,
[0092] The sparse local density of the x-th archive record data is , the cutoff distance of the cth archive record data is ;
[0093] Obtain clusters based on local density and calculate the optimized mean shift for archival data:
[0094] ,
[0095] The archive records data The optimized mean shift of , the bandwidth parameter is , dimension The bandwidth parameter is , the number of archive record data is , the kernel density gradient is estimated as ;
[0096] The archival record data with the largest optimized mean shift is used as the cluster center of the classification cluster, the feature information of the archival record data in the classification cluster is extracted, and the importance of the feature information is calculated:
[0097] ,
[0098] The probability of the xth feature information appearing in the yth classification cluster is , the number of classification clusters is , the adjustment factor of the xth feature information is , the correlation degree of the xth feature information in the yth classification cluster is , the importance of the xth feature information is ;
[0099] Sort the feature information in descending order according to importance to obtain the sub-control data; the feature information with a value less than 1 and greater than or equal to 0.752 is ranked as level one, the feature information with a value greater than or equal to 0.479 and less than 0.752 is ranked as level two, the feature information with a value greater than or equal to 0.283 and less than 0.479 is ranked as level three, and the feature information with a value greater than or equal to 0 and less than 0.283 is ranked as level four;
[0100] Performing hierarchical encryption on the archive record data according to the encryption strategy to obtain encrypted data, and constructing an archive record traceability privacy encryption model based on the encrypted data;
[0101] The archive record tracing privacy encryption model is optimized according to the encryption error, the data to be encrypted is input into the archive record tracing privacy encryption model, and the privacy encryption result is output.
[0102] In this embodiment, the method for constructing an encryption strategy based on the distributed control data includes:
[0103] When the importance of the characteristic information of the sub-control data is level one, a timestamp is embedded in the middle of the archive record data; when the importance of the characteristic information of the sub-control data is level two, a timestamp is embedded in the starting and ending ends of the archive record data; when the importance of the characteristic information of the sub-control data is level three, a timestamp is embedded in the starting and ending ends of the archive record data; when the importance of the characteristic information of the sub-control data is level four, a timestamp is embedded in the starting, ending, and middle ends of the archive record data;
[0104] At the same time, identity restrictions are added. When the importance of the characteristic information of the sub-control data is level one, the identity restriction is to the top-level authority personnel; when the importance of the characteristic information of the sub-control data is level two, the identity restriction can be required to be level two authority personnel and above; when the importance of the characteristic information of the sub-control data is level three, the identity restriction can be required to be level three authority personnel and above; when the importance of the characteristic information of the sub-control data is level four, the identity restriction can be required to be level four authority personnel and above;
[0105] The top-level authority personnel are engineers, the second-level authority personnel are project leaders, the third-level authority personnel are project executors, and the fourth-level authority personnel are ordinary employees.
[0106] In this embodiment, the method for hierarchically encrypting the archive record data according to the encryption strategy to obtain encrypted data includes:
[0107] Extract the characteristic information of the archival record data, use the characteristic information as nodes, and calculate the importance of the nodes;
[0108] Calculate the weight coefficient of the node:
[0109] ,
[0110] The importance of the w-th node is , the joint distribution of the wth node and the kth node is , the weight coefficient of the wth node is , the edge distribution of the w-th node is , the edge distribution of the kth node is , the importance of the kth node is ;
[0111] Calculate the privacy matching index of the node according to the encryption strategy:
[0112] ,
[0113] The privacy matching index of the w-th node is , the jth privacy policy is , the average value of privacy policy is , the number of privacy policies is , the wth node is , the average value of the node is , the control parameters are , the balance factor is , the number of privacy policies is ;
[0114] like , then the encryption level of the node is level 4; if , then the encryption level of the node is level three; if , then the encryption level of the node is level 2; if , then the encryption level of the node is level one;
[0115] The three-dimensional point cloud model is used to embed the timestamp of the archival record data according to the encryption level, and the bit weight is calculated:
[0116] ,
[0117] The weight of node u is , the number of nodes is N, and the bit form of the node is ;
[0118] Embed timestamp, the expression is:
[0119] ,
[0120] ,
[0121] The coordinates of the vertices are , the x-axis coordinate of the vertex is , the y-axis coordinate of the vertex is , the coordinate of the vertex z axis is , the timestamp embedding parameters are , the three-dimensional unit vector is , the error value of the vertex coordinates is ;
[0122] Converts archive record data with embedded timestamps into a byte string and outputs it as encrypted data.
[0123] In this embodiment, the method for constructing an archive record traceability privacy encryption model based on the encrypted data includes:
[0124] Archival record traceability privacy encryption models include autoencoders, blockchain technology, and deep learning algorithms;
[0125] The autoencoder compresses the encrypted data into a low-dimensional representation through the encoder, and then reconstructs the original data through the decoder to learn the essential characteristics of the data and obtain the encrypted features;
[0126] Blockchain technology uses hash functions, asymmetric encryption, and consensus mechanisms to encrypt data, ensuring its immutability and security. It also utilizes distributed ledgers to achieve decentralized storage and verification of encrypted data, thereby obtaining private encrypted data.
[0127] Deep learning algorithms acquire encryption skills and enhance data security by combining encryption features and privacy-encrypted data to learn the encryption patterns and verification rules of the data during training.
[0128] In this embodiment, the method for optimizing the archival record tracing privacy encryption model based on encryption error includes:
[0129] The particle swarm optimization algorithm is introduced, the error between the predicted encryption result and the actual encryption result is used as the fitness function, and the encryption result is used as the particle;
[0130] The particle position with the minimum fitness is taken as the optimal position, and the particle position is updated. The expression is:
[0131] ,
[0132] The updated position of the zth particle in the t+1th iteration is , the initial position of the zth particle is , the control coefficient is , the scan factor is , a random number from 0 to 1 is , the original sequence of the zth particle in the tth iteration is , the best position is ;
[0133] The particle position is updated through the distribution operator to obtain the motion position. The expression is:
[0134] ,
[0135] The motion position of the zth particle in the t+1th iteration is , a random number between 0 and 1 is , a random number between -1 and 1 is , the updated position of the zth particle at the tth iteration is ;
[0136] Update the motion position according to the spiral coefficient to obtain the spiral position. The expression is:
[0137] ,
[0138] The spiral coefficient is , the current number of iterations is t, and the maximum number of iterations is , the motion position of the zth particle in the tth iteration is , the position of the random particle in the tth iteration is , the spiral position of the zth particle in the t+1th iteration is ;
[0139] The inhibition factor is introduced, and the spiral position is updated and adjusted according to the inhibition factor to obtain the inhibition position. The expression is:
[0140] ,
[0141] ,
[0142] The suppression factor for the tth iteration is , the random numbers from 0 to 1 are 、 , the spiral position of the zth particle in the tth iteration is , the suppression position of the zth particle in the t+1th iteration is ;
[0143] Continue to iterate until the maximum number of iterations is reached, otherwise update the suppression factor and reselect the optimal solution.
[0144] Figure 2 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 2At the hardware level, the electronic device includes a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for its services.
[0145] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 2 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0146] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0147] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, logically forming a privacy encryption device for blockchain-based archival record tracing. The processor executes the program stored in the memory and is specifically used to implement any of the aforementioned privacy encryption methods for blockchain-based archival record tracing.
[0148] The above application Figure 1The privacy encryption method for blockchain-based archival record tracing disclosed in the illustrated embodiment can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be performed by hardware integrated logic circuits or software instructions within the processor. The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly executed by a hardware decoding processor or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0149] The electronic device may also perform Figure 1 A privacy encryption method for archival record tracing based on blockchain, and implementation Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0150] An embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by an electronic device including multiple applications, they execute any of the aforementioned privacy encryption methods in blockchain-based archival record tracing.
[0151] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0152] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0153] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0155] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0156] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0157] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0158] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A privacy encryption method for archival record tracing based on blockchain, characterized in that: The following steps are involved: Collecting archival record data under archival record tracing and preprocessing the archival record data; Classifying and grading the archive record data according to their importance to obtain sub-control data, and constructing an encryption strategy based on the sub-control data; comprising: Construct a Euclidean distance matrix through the archival record data, determine the K nearest neighbor set, and calculate the local density of the archival record data: , The local density of the x-th archive record data is , the cth file record data is , the xth file record data is , archival record data and archival record data The Euclidean distance is , archival record data The number of elements in the neighbor set of , archival record data The neighbor set of , the adjustment factor is , the archive record data set is B, the archive record data The probability of occurrence is ; For local archival record data with less than 3 samples, the Gaussian kernel function is used to calculate the sparse local density: , The sparse local density of the x-th archive record data is , the cutoff distance of the cth archive record data is ; Obtain clusters based on local density and calculate the optimized mean shift for archival data: , The archive records data The optimized mean shift of , the bandwidth parameter is , dimension The bandwidth parameter is , the number of archive record data is , the kernel density gradient is estimated as ; The archival record data with the largest optimized mean shift is used as the cluster center of the classification cluster, the feature information of the archival record data in the classification cluster is extracted, and the importance of the feature information is calculated: , The probability of the xth feature information appearing in the yth classification cluster is , the number of classification clusters is , the adjustment factor of the xth feature information is , the correlation degree of the xth feature information in the yth classification cluster is , the importance of the xth feature information is ; Sort the feature information in descending order according to importance to obtain the sub-control data; the feature information with a value less than 1 and greater than or equal to 0.752 is ranked as level one, the feature information with a value greater than or equal to 0.479 and less than 0.752 is ranked as level two, the feature information with a value greater than or equal to 0.283 and less than 0.479 is ranked as level three, and the feature information with a value greater than or equal to 0 and less than 0.283 is ranked as level four; Performing hierarchical encryption on the archive record data according to the encryption strategy to obtain encrypted data, and constructing an archive record traceability privacy encryption model based on the encrypted data; The archive record tracing privacy encryption model is optimized according to the encryption error, the data to be encrypted is input into the archive record tracing privacy encryption model, and the privacy encryption result is output.
2. The privacy encryption method for archival record tracing based on blockchain according to claim 1 is characterized in that: The method for constructing an encryption strategy based on the distributed control data includes: When the importance of the characteristic information of the sub-control data is level one, a timestamp is embedded in the middle of the archive record data; when the importance of the characteristic information of the sub-control data is level two, a timestamp is embedded in the starting and ending ends of the archive record data; when the importance of the characteristic information of the sub-control data is level three, a timestamp is embedded in the starting and ending ends of the archive record data; when the importance of the characteristic information of the sub-control data is level four, a timestamp is embedded in the starting, ending, and middle ends of the archive record data; At the same time, identity restrictions are added. When the importance of the characteristic information of the sub-control data is level one, the identity restriction is to the top-level authority personnel; when the importance of the characteristic information of the sub-control data is level two, the identity restriction can be required to be level two authority personnel and above; when the importance of the characteristic information of the sub-control data is level three, the identity restriction can be required to be level three authority personnel and above; when the importance of the characteristic information of the sub-control data is level four, the identity restriction can be required to be level four authority personnel and above; The top-level authority personnel are engineers, the second-level authority personnel are project leaders, the third-level authority personnel are project executors, and the fourth-level authority personnel are ordinary employees.
3. The privacy encryption method for archival record tracing based on blockchain according to claim 1 is characterized in that: The method for hierarchically encrypting the archive record data according to the encryption strategy to obtain encrypted data includes: Extract the characteristic information of the archival record data, use the characteristic information as nodes, and calculate the importance of the nodes; Calculate the weight coefficient of the node: , The importance of the w-th node is , the joint distribution of the wth node and the kth node is , the weight coefficient of the wth node is , the edge distribution of the w-th node is , the edge distribution of the kth node is , the importance of the kth node is ; Calculate the privacy matching index of the node according to the encryption strategy: , The privacy matching index of the w-th node is , the jth privacy policy is , the average value of privacy policy is , the number of privacy policies is , the wth node is , the average value of the node is , the control parameters are , the balance factor is , the number of privacy policies is ; like , then the encryption level of the node is level 4; if , then the encryption level of the node is level three; if , then the encryption level of the node is level 2; if , then the encryption level of the node is level one; The three-dimensional point cloud model is used to embed the timestamp of the archival record data according to the encryption level, and the bit weight is calculated: , The weight of node u is , the number of nodes is N, and the bit form of the node is ; Embed timestamp, the expression is: , , The coordinates of the vertices are , the x-axis coordinate of the vertex is , the y-axis coordinate of the vertex is , the coordinate of the vertex z axis is , the timestamp embedding parameters are , the three-dimensional unit vector is , the error value of the vertex coordinates is ; Converts archive record data with embedded timestamps into a byte string and outputs it as encrypted data.
4. The privacy encryption method for archival record tracing based on blockchain according to claim 1 is characterized in that: The method for constructing an archive record tracing privacy encryption model based on the encrypted data includes: Archival record traceability privacy encryption models include autoencoders, blockchain technology, and deep learning algorithms; The autoencoder compresses the encrypted data into a low-dimensional representation through the encoder, and then reconstructs the original data through the decoder to learn the essential characteristics of the data and obtain the encrypted features; Blockchain technology uses hash functions, asymmetric encryption, and consensus mechanisms to encrypt data, ensuring its immutability and security. It also utilizes distributed ledgers to achieve decentralized storage and verification of encrypted data, thereby obtaining private encrypted data. Deep learning algorithms acquire encryption skills and enhance data security by combining encryption features and privacy-encrypted data to learn the encryption patterns and verification rules of the data during training.
5. The privacy encryption method for archival record tracing based on blockchain according to claim 1 is characterized in that: The method for optimizing the archival record tracing privacy encryption model according to encryption error includes: The particle swarm optimization algorithm is introduced, the error between the predicted encryption result and the actual encryption result is used as the fitness function, and the encryption result is used as the particle; The particle position with the minimum fitness is taken as the optimal position, and the particle position is updated. The expression is: , The updated position of the zth particle in the t+1th iteration is , the initial position of the zth particle is , the control coefficient is , the scan factor is , a random number from 0 to 1 is , the original sequence of the zth particle in the tth iteration is , the best position is ; The particle position is updated through the distribution operator to obtain the motion position. The expression is: , The motion position of the zth particle in the t+1th iteration is , a random number between 0 and 1 is , a random number between -1 and 1 is , the updated position of the zth particle at the tth iteration is ; Update the motion position according to the spiral coefficient to obtain the spiral position. The expression is: , The spiral coefficient is , the current number of iterations is t, and the maximum number of iterations is , the motion position of the zth particle in the tth iteration is , the position of the random particle in the tth iteration is , the spiral position of the zth particle in the t+1th iteration is ; The inhibition factor is introduced, and the spiral position is updated and adjusted according to the inhibition factor to obtain the inhibition position. The expression is: , , The suppression factor for the tth iteration is , the random numbers from 0 to 1 are 、 , the spiral position of the zth particle in the tth iteration is , the suppression position of the zth particle in the t+1th iteration is ; Continue to iterate until the maximum number of iterations is reached, otherwise update the suppression factor and reselect the optimal solution.
6. An electronic device comprising: processor; as well as A memory arranged to store computer-executable instructions, wherein when the instructions are executed, the processor performs the method according to any one of claims 1 to 5.
7. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to execute the method according to any one of claims 1 to 5.