Multi-level associated data integrity protection method, device, equipment and medium
By generating multi-level digests and performing integrity verification, the shortcomings of the integrity protection of multi-level correlation data in the prior art are solved, and comprehensive protection and efficient verification of multi-level correlation data are achieved.
Patent Information
- Application Number
- CN202411978928.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to protect the integrity of multi-level correlation data as a whole, especially under the multi-level correlation data model, the effectiveness of the data correlation relationship is difficult to guarantee.
By obtaining the superior data to be protected and its associated subordinate data, a multi-level digest is generated to verify data integrity. The specific steps include generating the first superior digest, the subordinate digest and the second superior digest, and using these digests for integrity verification during data verification.
The integrity of multi-level correlation data is achieved overall protection, and the effectiveness and execution efficiency of data correlation relationships are improved.
Smart Images

Figure CN119622830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data integrity protection, and in particular to a multi-level associated data integrity protection method, device, equipment and medium. Background Art
[0002] In the process of application development, it is often necessary to protect the integrity of key data, but there are also multiple key data that need integrity protection, and there are associations between multiple data, and even multi-level associations. The existing technology protects the associated data by protecting the integrity of the relationship, and even only performs integrity protection from a single dimension, so that when the data of a certain dimension is tampered, the association of the data is still valid, or in a multi-level associated data model, if the data or association of a certain level is tampered, the associations of other levels are still valid.
[0003] From the above, it can be seen that how to protect the integrity of data with multi-level association relationships as a whole and improve the overall execution efficiency is an urgent problem to be solved. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for protecting the integrity of multi-level associated data, which can protect the integrity of multi-level associated data as a whole and improve the overall execution efficiency. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a multi-level association data integrity protection method, comprising:
[0006] Acquire the upper-level data to be protected and a plurality of lower-level data to be protected associated with the upper-level data to be protected, and generate a first upper-level summary based on the upper-level data to be protected;
[0007] Generate subordinate summaries corresponding to the subordinate data to be protected based on the characteristic information of the superior data to be protected and the subordinate data to be protected;
[0008] generating a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected;
[0009] When a data integrity verification request is obtained for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified, data integrity verification is performed on the upper-level data to be verified and each of the lower-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary.
[0010] Optionally, generating a first upper-level summary based on the upper-level data to be protected includes:
[0011] Using the data information of the upper-level data to be protected as a calculation parameter to perform summary calculation to obtain the first upper-level summary;
[0012] The data information is the data content to be protected in the upper-level data to be protected.
[0013] Optionally, the generating, based on the feature information of the upper-level data to be protected and the lower-level data to be protected, lower-level summaries corresponding to the lower-level data to be protected respectively include:
[0014] Using the characteristic information of the upper-level data to be protected as a parameter of the lower-level summary salt;
[0015] The digest salt of the subordinate data and the data information of the subordinate data to be protected are used as calculation parameters to perform digest calculation to obtain the subordinate digest.
[0016] Optionally, the generating a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected includes:
[0017] Using the subordinate summaries corresponding to all subordinate data to be protected associated with the superior data to be protected as calculation parameters to perform summary calculation to obtain a total summary of the subordinate data;
[0018] The summary of the subordinate data and the data information of the superior data to be protected are used as calculation parameters to perform summary calculation to obtain the second superior summary.
[0019] Optionally, the performing data integrity verification on the upper-level data to be verified and each of the lower-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary includes:
[0020] Acquire the upper-level data to be verified and the lower-level data to be verified associated with the upper-level data to be verified;
[0021] Performing integrity verification on the superior data to be verified based on the first superior summary to obtain a first verification result;
[0022] If the first verification result indicates that the verification is successful, then integrity verification is performed on the subordinate data to be verified based on the subordinate summary to obtain a second verification result;
[0023] If the second verification result indicates that the verification is successful, verifying the upper-level data to be verified and the lower-level data to be verified based on the second upper-level summary to obtain a third verification result;
[0024] Among them, the first verification result is the integrity verification result of the upper-level data; the second verification result is the integrity verification result of the lower-level data; and the third verification result is the integrity verification result of the association between the upper-level data and the lower-level data.
[0025] Optionally, the performing integrity verification on the superior data to be verified based on the first superior digest to obtain a first verification result includes:
[0026] Using the data information of the upper-level data to be verified as a calculation parameter to perform summary calculation to obtain a first verification summary;
[0027] Obtaining a first verification result by comparing the first verification summary with the first superior summary;
[0028] Correspondingly, the integrity verification of the subordinate data to be verified based on the subordinate summary to obtain a second verification result includes:
[0029] Using the characteristic information of the upper-level data to be verified as a parameter of the lower-level summary salt;
[0030] Performing digest calculation using the subordinate digest salt and data information of the subordinate data to be verified as calculation parameters to obtain a second verification digest;
[0031] Obtaining a second verification result by comparing the second verification summary with the subordinate summary;
[0032] Correspondingly, the verifying the upper-level data to be verified and the lower-level data to be verified based on the second upper-level summary to obtain a third verification result includes:
[0033] Using the second verification digests corresponding to all subordinate data to be verified associated with the superior data to be verified as calculation parameters to perform summary calculation to obtain a subordinate data verification total summary;
[0034] Performing summary calculation using the subordinate data verification summary and the data information of the upper-level data to be verified as calculation parameters to obtain a third verification summary;
[0035] A third verification result is obtained by comparing the third verification summary with the second upper-level summary.
[0036] Optionally, the multi-level association data integrity protection method further includes:
[0037] If a data maintenance operation for the upper-level data to be protected is triggered, the upper-level data after maintenance is obtained, and the first upper-level summary is updated according to the upper-level data after maintenance to complete the data maintenance operation;
[0038] If a data maintenance operation for the subordinate data to be protected is triggered, the subordinate data after maintenance is obtained, and the subordinate summary and the second superior summary are updated according to the subordinate data after maintenance to complete the data maintenance operation.
[0039] In a second aspect, the present application provides a multi-level association data integrity protection device, comprising:
[0040] A first upper-level summary generating module, used for acquiring upper-level data to be protected and a plurality of lower-level data to be protected associated with the upper-level data to be protected, and generating a first upper-level summary based on the upper-level data to be protected;
[0041] A lower-level summary generating module, configured to generate lower-level summaries corresponding to the lower-level data to be protected based on the feature information of the upper-level data to be protected and the lower-level data to be protected;
[0042] A second upper-level summary generating module, configured to generate a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected;
[0043] An integrity verification module is used to perform data integrity verification on the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary when a data integrity verification request is obtained for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified.
[0044] In a third aspect, the present application provides an electronic device, including:
[0045] Memory, used to store computer programs;
[0046] The processor is used to execute the computer program to implement the aforementioned multi-level associated data integrity protection method.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned multi-level associated data integrity protection method when executed by a processor.
[0048] The present application provides a multi-level associated data integrity protection method, which comprises the following steps: first, obtaining upper-level data to be protected and several lower-level data to be protected associated with the upper-level data to be protected, and generating a first upper-level summary based on the upper-level data to be protected; then, generating lower-level summaries corresponding to each lower-level data to be protected based on characteristic information of the upper-level data to be protected and the lower-level data to be protected; finally, generating a second upper-level summary based on each lower-level summary and the upper-level data to be protected; and when a data integrity verification request for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified is obtained, performing data integrity verification on the upper-level data to be verified and each lower-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary.
[0049] As can be seen from the above, the present application enhances the association between the upper-level data and the lower-level data by querying and calculating the integrity summary of the multi-level associated data during the integrity protection process, and using the integrity summary of the lower-level data as a calculation parameter in the calculation process of the integrity summary of the upper-level data. That is, when modifying the data at any level, it is necessary to recalculate the integrity summary of other data that has an associated relationship with the data, which can protect the integrity of the data with multi-level associated relationships as a whole and improve the overall execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0051] Figure 1 A flowchart of a multi-level association data integrity protection method disclosed in this application;
[0052] Figure 2 A schematic diagram of a specific multi-level association data integrity summary generation process disclosed in this application;
[0053] Figure 3 A schematic diagram of a specific multi-level association data integrity summary data structure disclosed in this application;
[0054] Figure 4 A schematic diagram of a specific multi-level association data integrity summary verification process disclosed in this application;
[0055] Figure 5 A schematic diagram of a multi-level association data integrity protection device disclosed in this application;
[0056] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] In the process of application development, it is often necessary to protect the integrity of key data, but there are also multiple key data that need to be protected in terms of integrity, and there are associations between the multiple data, and even multi-level associations. The existing technology protects associated data by protecting the integrity of the relationship, and even only performs integrity protection from a single dimension, so that when a certain dimension of data is tampered with, the association of the data is still valid, or in a multi-level associated data model, a certain level of data or association is tampered with, and other levels of association are still valid. To this end, the present application provides a multi-level associated data integrity protection scheme that can protect the integrity of data with multi-level association relationships as a whole and improve overall execution efficiency.
[0059] See also Figure 1 As shown, the embodiment of the present application discloses a multi-level association data integrity protection method, including:
[0060] Step S11: Acquire upper-level data to be protected and a plurality of lower-level data to be protected associated with the upper-level data to be protected, and generate a first upper-level summary based on the upper-level data to be protected.
[0061] In this embodiment, the upper-level data to be protected and several lower-level data to be protected associated with the upper-level data to be protected are obtained. The upper-level data to be protected may be associated with multiple types of lower-level data; it is understandable that the lower-level data to be protected may also be associated with other data.
[0062] In this embodiment, a commercial secret algorithm may be used to generate a first upper-level summary based on the upper-level data to be protected. Specifically, the generation of the first upper-level summary based on the upper-level data to be protected may include: using a commercial secret algorithm to perform summary calculation using data information of the upper-level data to be protected as a calculation parameter to obtain the first upper-level summary; wherein the data information is the data content to be protected in the upper-level data to be protected.
[0063] Step S12: generating subordinate summaries corresponding to each subordinate data to be protected based on the feature information of the superior data to be protected and the subordinate data to be protected.
[0064] In this embodiment, a secret algorithm can be used to generate subordinate summaries corresponding to each subordinate data to be protected based on the characteristic information of the superior data to be protected and the subordinate data to be protected. Wherein, the characteristic information is information that can represent the identity of the superior data to be protected, and the information type of the information can be determined based on the actual application scenario. For example, in a specific implementation, the primary key of the superior data to be protected can be used as the characteristic information. Specifically, the generation of subordinate summaries corresponding to each subordinate data to be protected based on the characteristic information of the superior data to be protected and the subordinate data to be protected can include: using the primary key of the superior data to be protected as a parameter of the subordinate summary salt; using the secret algorithm to calculate the summary using the subordinate summary salt and the data information of the subordinate data to be protected as calculation parameters to obtain the subordinate summary. That is, by adding the primary key information of the superior data to be protected in the process of calculating the subordinate summary, the association between the superior data to be protected and each subordinate data to be protected can be strengthened through the subordinate summary. The integrity of the data with multi-level association relationships can be protected as a whole.
[0065] Step S13: generating a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected.
[0066] In this embodiment, a commercial secret algorithm may be used to generate a second upper-level summary based on each of the subordinate summaries and the upper-level data to be protected. Specifically, the generation of the second upper-level summary based on each of the subordinate summaries and the upper-level data to be protected may include: using a commercial secret algorithm to perform summary calculation using the subordinate summaries corresponding to all subordinate data to be protected associated with the upper-level data to be protected as calculation parameters to obtain a total summary of the subordinate data; using a commercial secret algorithm to perform summary calculation using the total summary of the subordinate data and the data information of the upper-level data to be protected as calculation parameters to obtain the second upper-level summary. That is, by adding the total summary of the subordinate data related to each of the subordinate data to be protected in the process of calculating the second upper-level summary, the association between the upper-level data to be protected and each of the subordinate data to be protected can be strengthened through the second upper-level summary. The integrity of data with multi-level association relationships can be protected as a whole.
[0067] Furthermore, if the upper-level data to be protected or the lower-level data to be protected needs to be updated and maintained, the corresponding first upper-level summary, second upper-level summary and lower-level summary need to be updated synchronously. The specific method for protecting the integrity of multi-level associated data may also include: if a data maintenance operation for the upper-level data to be protected is triggered, the upper-level data after maintenance is obtained, and the first upper-level summary is updated according to the upper-level data after maintenance to complete the data maintenance operation; if a data maintenance operation for the lower-level data to be protected is triggered, the lower-level data after maintenance is obtained, and the lower-level summary and the second upper-level summary are updated according to the lower-level data after maintenance to complete the data maintenance operation. That is, for the update and maintenance operation of the upper-level data to be protected, only the corresponding first upper-level summary needs to be updated synchronously. For the lower-level data to be protected, in addition to updating the lower-level summary, the first upper-level summary and the second upper-level summary corresponding to the upper-level data that has an associated relationship with the lower-level data to be protected also need to be updated synchronously, so that the integrity of the data with multi-level associated relationships can be protected as a whole.
[0068] Step S14: When a data integrity verification request is obtained for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified, data integrity verification is performed on the upper-level data to be verified and each lower-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary.
[0069] In this embodiment, when a data integrity verification request is obtained for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified, wherein the several lower-level data to be verified associated with the upper-level data to be verified are the upper-level data to be protected and the lower-level data to be protected obtained by the other application ports, and accordingly, the data integrity verification request is a verification request initiated by other application ports for the upper-level data to be protected and several lower-level data to be protected associated with the upper-level data to be protected. Specifically, the data integrity verification of the upper-level data to be verified and each of the lower-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary may include: acquiring the upper-level data to be verified and the lower-level data to be verified associated with the upper-level data to be verified; performing integrity verification on the upper-level data to be verified based on the first upper-level summary to obtain a first verification result; if the first verification result indicates that the verification is successful, performing integrity verification on the lower-level data to be verified based on the lower-level summary to obtain a second verification result; if the second verification result indicates that the verification is successful, performing verification on the upper-level data to be verified and the lower-level data to be verified based on the second upper-level summary to obtain a third verification result; wherein the first verification result is an upper-level data integrity verification result; the second verification result is a lower-level data integrity verification result; and the third verification result is an integrity verification result associated with the upper-level data and the lower-level data.
[0070] It can be understood that the first verification result is the integrity verification result of the superior data. In a specific implementation, the first verification result can be obtained by comparing the superior data to be verified and the first superior summary of the superior data to be protected. Specifically, the integrity verification of the superior data to be verified based on the first superior summary to obtain the first verification result can include: using the data information of the superior data to be verified as a calculation parameter to perform summary calculation to obtain the first verification summary; and obtaining the first verification result by comparing the first verification summary with the first superior summary.
[0071] Correspondingly, the second verification result is a subordinate data integrity verification result. In a specific implementation, the second verification result can be obtained by comparing the subordinate data to be verified and the subordinate digest of the subordinate data to be protected. Specifically, the integrity verification of the subordinate data to be verified based on the subordinate digest to obtain the second verification result may include: using the characteristic information of the upper data to be verified as a parameter of the subordinate digest salt; using the subordinate digest salt and the data information of the subordinate data to be verified as calculation parameters to perform digest calculation to obtain a second verification digest; and obtaining the second verification result by comparing the second verification digest with the subordinate digest. It should be noted that the generation process of the subordinate digest of the subordinate data to be verified needs to be consistent with the generation process of the subordinate digest of the subordinate data to be protected.
[0072] Correspondingly, the third verification result is the integrity verification result of the association between the superior data and the subordinate data. In a specific implementation, the first verification result can be obtained by comparing the second superior summary of the superior data to be verified and the superior data to be protected. Specifically, the verification of the superior data to be verified and the subordinate data to be verified based on the second superior summary to obtain the third verification result may include: using the second verification summary corresponding to all subordinate data to be verified associated with the superior data to be verified as calculation parameters to perform summary calculation to obtain the subordinate data verification summary; using the subordinate data verification summary and the data information of the superior data to be verified as calculation parameters to perform summary calculation to obtain the third verification summary; and obtaining the third verification result by comparing the third verification summary with the second superior summary. It should be noted that the generation process of the second superior summary of the superior data to be verified needs to be consistent with the generation process of the second superior summary of the superior data to be protected.
[0073] As can be seen from the above, the embodiment of the present application enhances the association between the upper-level data and the lower-level data by querying and calculating the integrity summary of the multi-level associated data during the integrity protection process, using the integrity summary of the lower-level data as a calculation parameter in the calculation process of the integrity summary of the upper-level data, and using the characteristic information of the upper-level summary as a calculation parameter in the calculation process of the integrity summary of the upper-level data during the generation of the lower-level summary. That is, when modifying the data at any level, it is necessary to recalculate the integrity summary of other data that has an associated relationship with the data, which can protect the integrity of the data with multi-level associated relationships as a whole and improve the overall execution efficiency.
[0074] See also Figure 2 As shown, the embodiment of the present application provides a specific multi-level association data integrity protection method, including:
[0075] In the embodiment of the present application, the relationship between the business data and the summary calculation is associated, including the master-slave relationship, one-to-one relationship, one-to-many relationship, and many-to-many relationship, so as to establish the relationship between the data structure and the summary structure. Figure 3 As shown, the primary key of the previous level of data is used as the salt parameter for the summary calculation of the next level. When each level of data is integrity protected, the relevant data of each relationship level is queried, and its integrity summary is calculated and saved, and at the same time used as the input parameter for the integrity summary calculation of the protection subject; when the data of any dimension is modified, the integrity summary of other business model data related to the business data is recalculated.
[0076] In a specific implementation, taking a three-layer relationship as an example, users, roles, and permissions are the first, second, and third layers respectively, and all three types of data need to be integrity protected. Among them, a user may correspond to multiple roles, and a role may correspond to multiple permissions. When the role corresponding to a user is modified, the integrity of the user must be ensured at the same time. When the permissions of a user are modified, the integrity of the user and the corresponding role must also be ensured.
[0077] See also Figure 2 As shown, generating integrity summary is the core process of the multi-level associated data integrity protection method. Specifically, for user data, the integrity of user data is protected by calculating the summary of user data; for role data, in addition to calculating the summary of the current role data, the user summary corresponding to the current role needs to be updated to complete the integrity protection of the role data; wherein, updating the user summary requires calculating the summary of all role summaries corresponding to the current user; for permission data, the current permission summary is calculated, and the role summary corresponding to the current permission is updated, and then the user summary corresponding to the current role is updated based on the updated role summary to complete the integrity protection of the permission data; wherein, updating the role summary requires calculating the summary of all permission summaries corresponding to the current role; it should be noted that the current business data summary calculation process is called the first-level summary, and the upper-level business data summary calculation affected by the current data is called the second-level summary.
[0078] Accordingly, see Figure 4As shown, after generating the integrity summary, the integrity needs to be verified to complete the multi-level associated data integrity protection. Specifically, the user data is obtained and the user summary is verified; if the user summary verification fails, it means that the user data has been tampered with; if the user summary verification succeeds, the role data corresponding to the user is obtained and the role summary is verified; if the role summary verification fails, it means that the current role data has been tampered with; if the role summary verification succeeds, it is necessary to further verify all the role summaries of the current user; if the verification of all the role summaries of the current user fails, it means that the role association relationship of the current user is abnormal (add or reduce new associated roles); if the verification of all the role summaries of the current user succeeds, the permission data corresponding to the role is obtained and the permission summary is verified; if the permission summary verification fails, it means that the current permission data has been tampered with; if the permission summary verification succeeds, it is necessary to further verify all the permission summaries of the current role; if the permission summary verification succeeds, it is necessary to further verify all the permission summaries of the current role; if the verification of all the permission summaries of the current role fails, it means that the permission association relationship of the current role is abnormal (add or reduce new associated permissions); if the verification of all the permission summaries of the current role succeeds, the integrity verification of the current user data is completed.
[0079] As can be seen from the above, the embodiment of the present application associates the relationship between business data with summary calculation, including master-slave relationship, one-to-one relationship, one-to-many relationship, and many-to-many relationship, thereby establishing the relationship between data structure and summary structure. The primary key of the previous level of data is used as the salt of the next level summary calculation as a parameter. When each level of data is integrity protected, the relevant data of each relationship level is queried, and its integrity summary is calculated and saved, and at the same time used as the input parameter of the integrity summary calculation of the protection subject; when modifying the data at any level, it is necessary to recalculate the integrity summary of other data that has an associated relationship with the data. In this way, the integrity of data with multiple levels of association relationships can be protected as a whole, and the overall execution efficiency can be improved.
[0080] See also Figure 5 As shown, the present application also provides a multi-level association data integrity protection device, including:
[0081] A first upper-level summary generating module 11 is used to obtain upper-level data to be protected and a plurality of lower-level data to be protected associated with the upper-level data to be protected, and generate a first upper-level summary based on the upper-level data to be protected;
[0082] A lower-level summary generating module 12, configured to generate lower-level summaries corresponding to the lower-level data to be protected based on the feature information of the upper-level data to be protected and the lower-level data to be protected;
[0083] A second upper-level summary generating module 13, configured to generate a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected;
[0084] The integrity verification module 14 is used to perform data integrity verification on the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary when a data integrity verification request is obtained for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified.
[0085] As can be seen from the above, the embodiment of the present application enhances the association between the upper-level data and the lower-level data by querying and calculating the integrity summary of the multi-level associated data during the integrity protection process, and using the integrity summary of the lower-level data as a calculation parameter in the calculation process of the integrity summary of the upper-level data. That is, when modifying the data at any level, it is necessary to recalculate the integrity summary of other data that has an associated relationship with the data, which can protect the integrity of the data with multi-level associated relationships as a whole and improve the overall execution efficiency.
[0086] In some specific implementations, the first upper-level summary generating module 11 may specifically include:
[0087] A first upper-level summary calculation unit, configured to perform summary calculation using the data information of the upper-level data to be protected as a calculation parameter to obtain the first upper-level summary;
[0088] The data information is the data content to be protected in the upper-level data to be protected.
[0089] In some specific implementations, the subordinate summary generation module 12 may specifically include:
[0090] A lower-level summary salt determination unit, configured to use the characteristic information of the upper-level data to be protected as a parameter of the lower-level summary salt;
[0091] The lower-level digest calculation unit is used to perform digest calculation using the lower-level digest salt and data information of the lower-level data to be protected as calculation parameters to obtain the lower-level digest.
[0092] In some specific implementations, the second upper-level summary generating module 13 may specifically include:
[0093] A subordinate data total summary calculation unit, used for performing summary calculation using the subordinate summaries corresponding to all subordinate data to be protected associated with the superior data to be protected as calculation parameters to obtain a subordinate data total summary;
[0094] The second upper-level summary calculation unit is used to perform summary calculation using the lower-level data summary and the data information of the upper-level data to be protected as calculation parameters to obtain the second upper-level summary.
[0095] In some specific implementations, the second upper-level summary generating module 13 may specifically include:
[0096] A to-be-verified data acquisition unit, used to acquire the to-be-verified upper-level data and the to-be-verified lower-level data associated with the to-be-verified upper-level data;
[0097] A first verification result acquisition submodule, configured to perform integrity verification on the superior data to be verified based on the first superior summary to obtain a first verification result;
[0098] A second verification result acquisition submodule, configured to perform integrity verification on the subordinate data to be verified based on the subordinate summary to obtain a second verification result if the first verification result indicates that the verification is successful;
[0099] A third verification result acquisition submodule, configured to verify the upper-level data to be verified and the lower-level data to be verified based on the second upper-level summary to obtain a third verification result if the second verification result indicates that the verification is successful;
[0100] Among them, the first verification result is the integrity verification result of the upper-level data; the second verification result is the integrity verification result of the lower-level data; and the third verification result is the integrity verification result of the association between the upper-level data and the lower-level data.
[0101] Furthermore, in some specific implementations, the first verification result acquisition submodule may specifically include:
[0102] A first verification summary calculation unit, configured to perform summary calculation using the data information of the upper-level data to be verified as a calculation parameter to obtain a first verification summary;
[0103] A first verification result obtaining unit, configured to obtain a first verification result by comparing the first verification summary with the first superior summary;
[0104] Accordingly, in some specific implementations, the second verification result acquisition submodule may specifically include:
[0105] A lower-level summary salt determination unit, configured to use the characteristic information of the upper-level data to be verified as a parameter of the lower-level summary salt;
[0106] a second verification digest calculation unit, configured to perform a digest calculation using the subordinate digest salt and data information of the subordinate data to be verified as calculation parameters to obtain a second verification digest;
[0107] A second verification result obtaining unit, configured to obtain a second verification result by comparing the second verification summary with the subordinate summary;
[0108] Accordingly, in some specific implementations, the third verification result acquisition submodule may specifically include:
[0109] a subordinate data verification total summary calculation unit, configured to perform summary calculation using the second verification summaries corresponding to all subordinate data to be verified associated with the superior data to be verified as calculation parameters, so as to obtain a subordinate data verification total summary;
[0110] A third verification summary calculation unit, configured to perform summary calculation using the subordinate data verification summary and the data information of the upper-level data to be verified as calculation parameters to obtain a third verification summary;
[0111] The third verification result obtaining unit is configured to obtain a third verification result by comparing the third verification summary with the second upper-level summary.
[0112] Furthermore, in some specific implementations, the multi-level association data integrity protection device may further include:
[0113] A data maintenance module for upper-level data, configured to obtain the upper-level data after maintenance if a data maintenance operation for the upper-level data to be protected is triggered, and update the first upper-level summary according to the upper-level data after maintenance to complete the data maintenance operation;
[0114] The data maintenance module of the subordinate data is used to obtain the subordinate data after maintenance if a data maintenance operation is triggered for the subordinate data to be protected, and to update the subordinate summary and the second upper summary according to the subordinate data after maintenance to complete the data maintenance operation.
[0115] Furthermore, the present application also discloses an electronic device. Figure 6 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input and output interface 25 and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the multi-level associated data integrity protection method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment can specifically be an electronic computer.
[0116] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0117] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0118] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the multi-level associated data integrity protection method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.
[0119] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the multi-level associated data integrity protection method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0120] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0121] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0122] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0123] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0124] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A multi-level association data integrity protection method, characterized in that: include: Acquire the upper-level data to be protected and a plurality of lower-level data to be protected associated with the upper-level data to be protected, and generate a first upper-level summary based on the upper-level data to be protected; Generate subordinate summaries corresponding to the subordinate data to be protected based on the characteristic information of the superior data to be protected and the subordinate data to be protected; generating a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected; When a data integrity verification request is obtained for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified, data integrity verification is performed on the upper-level data to be verified and each of the lower-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary.
2. The multi-level association data integrity protection method according to claim 1, characterized in that: The step of generating a first upper-level summary based on the upper-level data to be protected includes: Using the data information of the upper-level data to be protected as a calculation parameter to perform summary calculation to obtain the first upper-level summary; The data information is the data content to be protected in the upper-level data to be protected.
3. The multi-level association data integrity protection method according to claim 1, characterized in that: The generating, based on the feature information of the upper-level data to be protected and the lower-level data to be protected, lower-level summaries corresponding to the lower-level data to be protected respectively include: Using the characteristic information of the upper-level data to be protected as a parameter of the lower-level summary salt; The digest salt of the subordinate data and the data information of the subordinate data to be protected are used as calculation parameters to perform digest calculation to obtain the subordinate digest.
4. The multi-level association data integrity protection method according to claim 1, characterized in that: The generating a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected includes: Using the subordinate summaries corresponding to all subordinate data to be protected associated with the superior data to be protected as calculation parameters to perform summary calculation to obtain a total summary of the subordinate data; The summary of the subordinate data and the data information of the superior data to be protected are used as calculation parameters to perform summary calculation to obtain the second superior summary.
5. The multi-level association data integrity protection method according to claim 1, characterized in that: The performing data integrity verification on the upper-level data to be verified and each of the lower-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary includes: Acquire the upper-level data to be verified and the lower-level data to be verified associated with the upper-level data to be verified; Performing integrity verification on the superior data to be verified based on the first superior summary to obtain a first verification result; If the first verification result indicates that the verification is successful, then integrity verification is performed on the subordinate data to be verified based on the subordinate summary to obtain a second verification result; If the second verification result indicates that the verification is successful, verifying the upper-level data to be verified and the lower-level data to be verified based on the second upper-level summary to obtain a third verification result; Among them, the first verification result is the integrity verification result of the upper-level data; the second verification result is the integrity verification result of the lower-level data; and the third verification result is the integrity verification result of the association between the upper-level data and the lower-level data.
6. The multi-level association data integrity protection method according to claim 5, characterized in that: The step of performing integrity verification on the superior data to be verified based on the first superior digest to obtain a first verification result includes: Using the data information of the upper-level data to be verified as a calculation parameter to perform summary calculation to obtain a first verification summary; Obtaining a first verification result by comparing the first verification summary with the first superior summary; Correspondingly, the integrity verification of the subordinate data to be verified based on the subordinate summary to obtain a second verification result includes: Using the characteristic information of the upper-level data to be verified as a parameter of the lower-level summary salt; Performing digest calculation using the subordinate digest salt and data information of the subordinate data to be verified as calculation parameters to obtain a second verification digest; Obtaining a second verification result by comparing the second verification summary with the subordinate summary; Correspondingly, the verifying the upper-level data to be verified and the lower-level data to be verified based on the second upper-level summary to obtain a third verification result includes: Using the second verification digests corresponding to all subordinate data to be verified associated with the superior data to be verified as calculation parameters to perform summary calculation to obtain a subordinate data verification total summary; Performing summary calculation using the subordinate data verification summary and the data information of the upper-level data to be verified as calculation parameters to obtain a third verification summary; A third verification result is obtained by comparing the third verification summary with the second upper-level summary.
7. The multi-level association data integrity protection method according to any one of claims 1 to 6, characterized in that: Also includes: If a data maintenance operation for the upper-level data to be protected is triggered, the upper-level data after maintenance is obtained, and the first upper-level summary is updated according to the upper-level data after maintenance to complete the data maintenance operation; If a data maintenance operation for the subordinate data to be protected is triggered, the subordinate data after maintenance is obtained, and the subordinate summary and the second superior summary are updated according to the subordinate data after maintenance to complete the data maintenance operation.
8. A multi-level association data integrity protection device, characterized in that: include: A first upper-level summary generating module, used for acquiring upper-level data to be protected and a plurality of lower-level data to be protected associated with the upper-level data to be protected, and generating a first upper-level summary based on the upper-level data to be protected; A lower-level summary generating module, configured to generate lower-level summaries corresponding to the lower-level data to be protected based on the feature information of the upper-level data to be protected and the lower-level data to be protected; A second upper-level summary generating module, configured to generate a second upper-level summary based on each of the lower-level summaries and the upper-level data to be protected; An integrity verification module is used to perform data integrity verification on the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified based on the first upper-level summary, the second upper-level summary and the lower-level summary when a data integrity verification request is obtained for the upper-level data to be verified and several lower-level data to be verified associated with the upper-level data to be verified.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the multi-level association data integrity protection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the multi-level associated data integrity protection method according to any one of claims 1 to 7 is implemented.