Information system service data integrity checking method
By encoding and XORing instances of data entity classes in the information system, fine-grained integrity verification results are generated, solving the problems of the inability to achieve fine-grained verification and high cost in existing technologies, and realizing fast and comprehensive business data integrity verification.
Patent Information
- Application Number
- CN202311133249.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-09-04
AI Technical Summary
Existing technologies cannot achieve fine-grained verification of business data in information systems, cannot effectively protect the integrity of foreign key association information, and have high computational and storage costs.
The data entity class instances of the information system are encoded based on the data entity class data structure. The initial code and the current code are generated through the encoding. The XOR operation and fixed length information are used for verification to generate fine-grained integrity verification results.
It enables fine-grained business data integrity verification, saves storage space, improves verification speed, and can detect changes in the integrity of foreign key association information.
Smart Images

Figure CN117312337B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data processing, and particularly relates to a method for checking the integrity of business data of an information system. BACKGROUND
[0002] Data integrity is one of the three basic points of information security, and aims to ensure that information or data is not tampered with by unauthorized persons or can be quickly discovered after tampering during the process of transmitting, storing information or data processing.
[0003] Chinese Patent Publication No. CN115618428A discloses a data integrity checking method and system based on blockchain technology, the core principle of which is to divide a file containing a large amount of data into blocks and calculate the hash of the first block to ensure that the file data can be checked for changes by recalculating and comparing the hash value after the change, and to solve the problem of large computational load, performance problems and large server storage space consumption when using digital signatures and hash functions to process the original text. However, the data integrity checking method for files containing a large amount of data has the following problems:
[0004] 1. It is only applicable to checking the overall integrity of data blocks without fine-grained differentiation of content, so the checking result cannot guide the operation and maintenance personnel to take appropriate measures to deal with changes in specific business data items.
[0005] 2. Common low collision rate hash functions, such as MD5 or SHA1 algorithms, have hash values of 128 bits and 160 bits respectively. Since information system business data usually records a large number of short and small Chinese or foreign keys, using the hash function to calculate and store data items in business data results in space redundancy and computational time redundancy, and the effect is actually not as good as symmetric encoding.
[0006] The data integrity checking method based on database audit strategy can meet the full-process monitoring and recording of internal information changes in the database, but the data integrity checking method based on the database audit strategy has the following problems:
[0007] It can be understood that foreign key association is usually used in database table design in information systems to reduce data redundancy, insertion anomalies, deletion anomalies and update anomalies. Some of these foreign keys may contain associations with external services or even external databases, and it is difficult to manage this part of information. When the actual use of the business requires integrity protection of all information associated with the foreign key, this method can only check whether the stored data of the business has changed in integrity, but it cannot check when the associated external data changes.
[0008] Other commonly used data integrity check methods, such as directly serializing business class instances and storing, directly deserializing and using the text comparison tool Beyond Compare to compare one by one when checking, will have problems such as high storage space cost and slow calculation due to the need for full content comparison one by one when comparing in large quantities. SUMMARY
[0009] The technical problem to be solved by the present application is to provide an information system business data integrity check method.
[0010] To solve the above technical problems, the present application discloses an information system business data integrity check method, the method comprising:
[0011] Step 1, encode the data entity class instance of the information system based on the data structure of the data entity class to obtain the initial encoding;
[0012] Step 2, re-encode the data entity class instance to obtain the current time encoding;
[0013] Step 3, check the initial encoding and the current time encoding according to the data entity class and output the data integrity check result.
[0014] Further, in step 1, the data values that need to be encoded include one or more of null data, simple type data, collection type data and entity class data.
[0015] Further, in step 1, the null data is encoded by representing the null data with 1 bit 0;
[0016] The simple type data is encoded, including:
[0017] Step 101, encode the data value in UTF-8 and use it as the content encoding of the simple type encoding;
[0018] Step 102, represent the number of bytes of the content encoding of step 101 as a signed integer complement of 32 fixed bits, and use it as the length encoding of the simple type encoding;
[0019] Step 103, use 1 bit 1 as the type encoding of the simple type encoding to distinguish the null data encoding;
[0020] Step 104, sequentially concatenate the type encoding, length encoding and content encoding of the simple type encoding to form a simple type encoding unit.
[0021] Further, in step 1, the collection type data is encoded, including:
[0022] Step 111, sort the elements in the set, encode each set element according to the encoding method of each type of data value to obtain the encoding unit of each set element;
[0023] Step 112, concatenate the encoding unit of each element, and take it as the content encoding of the set type encoding;
[0024] Step 113, represent the number of bytes of the content encoding of step 112 in a fixed 32-bit signed integer complement, and take it as the length encoding of the set type encoding;
[0025] Step 114, take 1 bit 1 as the type encoding of the set type encoding to distinguish null data encoding;
[0026] Step 115, concatenate the type encoding, length encoding and content encoding of the set type encoding in sequence to form the set type data encoding unit.
[0027] Further, the encoding of the entity class data in step 1 includes:
[0028] Step 121, encode each attribute value in the entity class data according to the encoding method of each type of data value to obtain the encoding unit of each attribute value;
[0029] Step 122, concatenate the encoding unit of each attribute value, and take it as the content encoding of the entity type encoding;
[0030] Step 123, represent the number of bytes of the content encoding of step 122 in a fixed 32-bit signed integer complement, and take it as the length encoding of the entity type encoding;
[0031] Step 124, take 1 bit 1 as the type encoding of the entity type encoding to distinguish null data encoding;
[0032] Step 125, concatenate the type encoding, length encoding and content encoding of the entity type encoding in sequence to form the entity type data encoding unit.
[0033] Further, the step of re-encoding the data entity class instance in step 2 to obtain the current time encoding includes encoding the current time data entity class instance according to step 1, and outputting the current time encoding.
[0034] Further, the step of checking the initial encoding and the current time encoding according to the data entity class and outputting the data integrity check result in step 3 includes:
[0035] Step 301, read the encoding unit pair composed of the initial encoding and the current time encoding;
[0036] Step 302, read the first bit of the coding unit pair;
[0037] Step 303, performing an XOR operation on the first bit to determine whether they are the same;
[0038] Step 304: If the result of the first bit XOR operation is 1, and the first bits of the coding unit pair are different, indicating that there is a null value code in the coding unit pair, that is, one of the first bits of the two coding units is 0, then it is determined that the data has changed, and the comparison conclusion is output as different integrity comparison information;
[0039] Step 305: If the result of the first bit XOR operation is 0, the first bits of the encoding unit pairs are the same, and whether the original code is a null value is determined. If so, execute step 309; if not, execute step 306;
[0040] Step 306: Determine whether the current coding unit is a simple type coding according to the type of the coding unit pair. If so, execute step 320; if not, execute step 307;
[0041] Step 307: Determine whether the current coding unit is a set type coding according to the type of the coding unit pair. If so, execute step 330; if not, execute step 308;
[0042] Step 308: Determine whether the current encoding unit is an entity type encoding according to the type of the encoding unit pair. If so, execute step 330.
[0043] Step 309: If there are two null-value codes in the coding unit pair, that is, the first bits of both coding units are 0, it is determined that the data has not changed, and integrity comparison information indicating that the comparison conclusion is the same is output;
[0044] Step 320: compare the simple type coding unit pairs and output the data integrity check result;
[0045] Step 330: for the initial code and the current code in the code unit pair, split the code units according to the data type to obtain sub-code unit pairs;
[0046] Step 310: Execute step 3 for each sub-coding unit pair, and finally output the data integrity check result.
[0047] Further, the step 320 comprises: reading 32 bits starting from the second bit in the pair of encoding units and converting them into an integer as length information, respectively, and judging whether they are the same; if not, determining that the data has changed and outputting the integrity comparison information that the comparison result is different; if the length information is the same, recording the length as k, reading k bytes starting from the next bit in the pair of encoding units as content information, respectively, and judging whether the content part is the same; if not, determining that the data has changed and outputting the integrity comparison information that the comparison result is different, otherwise, determining that the data has not changed and outputting the integrity comparison information that the comparison result is the same.
[0048] Further, the step 330 comprises:
[0049] If the encoding unit is a set type encoding unit, the pair of set type encoding units is compared, comprising: cutting the content information in the encoding according to the encoding cutting mode to construct the pair of encoding units of set elements; for each pair of encoding units of set elements, the step 3 is performed to compare and output the integrity comparison information;
[0050] If the encoding unit is an entity type encoding unit, the pair of entity type encoding units is compared, comprising: cutting the content information in the encoding according to the encoding cutting mode to construct the pair of encoding units of attribute values; for each pair of encoding units of attribute values, the step 3 is performed to compare and output the integrity comparison information.
[0051] Further, the encoding cutting mode in the step 330 comprises:
[0052] Step 331, reading 1 bit;
[0053] Step 332, judging whether it is a null value encoding; if yes, executing step 333; if not, executing step 335;
[0054] Step 333, taking the bit as an encoding unit;
[0055] Step 334, repeating the step 330 from the next bit;
[0056] Step 335, reading 32 bits starting from the next bit in the encoding unit and converting them into an integer as content length, recording it as k;
[0057] Step 336, reading k bytes starting from the next bit in the encoding unit;
[0058] Step 337, splicing the contents read in the step 331, the step 335 and the step 336 as a sub-encoding unit; repeating the step 334 until the encoding unit cutting is completed.
[0059] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0060] Producing fine-grained verification results: Involving business entity classes in the encoding and encoding comparison process can produce understandable and business-related fine-grained integrity verification results.
[0061] Generate verification results for all information: Directly performing integrity verification on class instances used in the business system can verify the integrity changes of all information, including external information associated with foreign keys.
[0062] Saving storage space: The encoding method extracts the data content in the class instance, discards the data structure information in the original entity class, and performs flat symmetric encoding in sequence to save storage space.
[0063] Faster comparison speed: During the coding comparison process, the fixed-length length information is first compared. If they are different, the comparison of content information with a larger amount of information can be skipped, thereby speeding up the comparison process. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more apparent.
[0065] Figure 1 The present invention schematically illustrates a flowchart of the steps of a method for verifying the integrity of information system business data;
[0066] Figure 2 The following schematically illustrates the steps for encoding simple type data, collection type data, and entity type data proposed in the present invention;
[0067] Figure 3 The structure of the non-null value encoding unit and the null value encoding unit proposed in the present invention is schematically shown;
[0068] Figure 4 Schematically illustrates the steps and methods of comparing the initial code and the current code in conjunction with the entity class and outputting the data integrity verification result in the embodiment;
[0069] Figure 5 The steps of code cutting in an embodiment of the present invention are schematically shown.
[0070] Figure 6 The simple type coding comparison steps in the embodiment of the present invention are schematically shown.
[0071] Figure 7 The integrity check result of hypothetical business data in an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0072] Embodiments of the present application will be described below with reference to the accompanying drawings.
[0073] Embodiments of the present application will be described below with reference to the accompanying drawings. It should be understood, however, that the description that follows is illustrative only and is not intended to limit the scope of the present application. In the detailed description that follows, various specific details are set forth in order to provide a thorough understanding of embodiments of the present application. It will be apparent, however, to one of ordinary skill in the art that embodiments of the present application can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring the concepts of the present application.
[0074] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the term "includes" and tautological expressions thereof, such as "including," "includes," "include," "contains," "containing," and so forth, shall be read expansively and without limitation. The terms "comprising," "comprise" and / or "comprised of," and tautological expressions thereof (e.g., "comprising of") will be understood to enable recitations that they do not exclude additional matter.
[0075] All terms used herein (including technical and scientific terms) have the meanings commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein are defined as having a meaning that is consistent with the context of the specification in which the terms are utilized, and the terms should not be interpreted in an idealized or overly formal sense.
[0076] The terms and explanations appearing in the present application include:
[0077] Information system: a man-machine integrated system for the purpose of processing information flow, transmitting information, such as a company collaborative office system, an airline route management system, a library management system, etc.
[0078] Data entity class: in the present application, it represents a data structure, defines data and its data type and data storage and representation form, corresponds to the class in the programming language, and is simply referred to as an entity class in the present application.
[0079] Data entity class instance: in the present application, it represents specific business data stored and represented according to the data structure defined by the data entity class, corresponds to the instance or object in the programming language, and is simply referred to as a class instance in the present application.
[0080] Null data: in the present application, it represents that the data item is default, and corresponds to the null or empty in the programming language.
[0081] Simple type data: in the present application, it represents the eight basic data types corresponding to the programming language.
[0082] Collection type data: in the present application, it represents a data structure for storing a container of class instances, simple type data, null data, and collection type data, and corresponds to the collection in the programming language.
[0083] Encoding unit: in the present invention, it represents a complete encoding obtained by the encoding step proposed in the present invention, such as Figure 3
[0084] Encoding unit pair: in the present invention, it represents two encoding units of the same data, respectively from the initial encoding and the current time encoding.
[0085] The purpose of the present invention is to perform integrity check on business data and other data with business and real significance in information system, so as to obtain understandable, clear and comprehensive check results with relatively low storage and calculation cost. The mapping of business data and real significance is saved in the data structure of business data, which can be more specifically understood as saved in the business data entity class.
[0086] Therefore, the present invention more specifically proposes a method for encoding and comparing class instance data by using data entity class information, so as to overcome the problems of not being able to perform fine-grained, comprehensive and low-cost integrity check on business data in information system in the prior art.
[0087] Since the practical application business scene of the data integrity check method of the present invention contains secret information, a simple hypothetical airline flight business scene and data are used for illustration in the following embodiments. Therefore, all the data listed in the embodiments are only for more convenient explanation of the method proposed in the present invention and do not have any actual business significance.
[0088] The following will be described according to Figure 1 and in combination with Figure 2 , 3 , 4, 5, 6, 7 to illustrate the method implementation details with an example business data.
[0089] For example, if a flight business entity class can be simply described as {flight number, starting city, ending city, departure airport, landing airport, stopover airport, aircraft type}. The stopover airport data type is a set, and the set elements are a set of airport information entity classes. The elements in the departure airport, landing airport and stopover airport set can be simply described as {airport ID, longitude, latitude, altitude}. The aircraft type can be described as {aircraft ID, manufacturer, airworthiness certificate status}, and other attributes are character types. A class instance of this entity class is recorded as I.
[0090] According to step S100, I is encoded based on the entity class.
[0091] According to step S121, each attribute in I is traversed, and encoded according to its attribute type and attribute value.
[0092] All attribute values with null value are represented by 1 bit 0, such asFigure 3 The null value encoding unit structure is shown.
[0093] The encoding includes:
[0094] As shown in S101, the attribute value is encoded in UTF-8 and taken as the content encoding, denoted as p12.
[0095] As shown in S102, the number of bytes of p12 is represented in a fixed 32-bit signed integer complement representation and taken as the length encoding, denoted as p11.
[0096] As shown in S103, 1 bit 1 is taken as the type encoding, denoted as p10.
[0097] As shown in S104, p10, p11 and p12 are sequentially spliced as the encoding unit of the simple type attribute value, and the structure is shown in Figure 3 The non-null value encoding unit structure is shown.
[0098] Taking one set of example attribute and value “starting city: Chengdu” as an example, the encoding result of the attribute value “Chengdu” is “1 (omit 29 0) 110 11100110 10001000 10010000 11101001 10000011 10111101”.
[0099] The encoding includes:
[0100] As shown in S111, the attribute value of which all attribute types are set types is sorted and traversed through all elements in the set.
[0101] As shown in S112, each element in the set is encoded according to the encoding step of the element data type and spliced, denoted as p12.
[0102] As shown in S113, the number of bytes of p12 is represented in a fixed 32-bit signed integer complement representation and taken as the length encoding, denoted as p11.
[0103] As shown in S114, 1 bit 1 is taken as the type encoding, denoted as p10.
[0104] As shown in S115, p10, p11 and p12 are sequentially spliced as the encoding unit of the set type attribute value.
[0105] The attribute value of which all attribute types are entity types is iterated through S100 process, and the result is taken as the encoding unit of the entity type.
[0106] As step S122, concatenate the encoding units of all attribute values in I according to the encoding method of the above embodiment, and denote the result as p12.
[0107] As step S123, express the number of bytes of p12 in I as a signed integer complement of 32 bits, and denote the result as p11.
[0108] As step S124, express 1 as a type code, and denote the result as p10.
[0109] As step S125, concatenate p10, p11 and p12 in I in order to obtain the encoding unit of the attribute value of the entity type.
[0110] The final encoding of I is the initial encoding.
[0111] According to step S200, encode the class instance I' after a certain time to obtain the current-time encoding. The encoding method is the same as that of step S100.
[0112] According to step S300, check the initial encoding and the current-time encoding according to the data entity class, and output the data integrity check result. This process involves more iterations, and for the sake of clear description, the pseudo code shown in Figure 4 、 Figure 5 、 Figure 6 will be used for description.
[0113] As step S301, input the data type of I and the encoding unit of I, and I and I' form an encoding unit pair.
[0114] As step S302, read the first bit of the encoding unit pair.
[0115] As step S303, perform XOR operation on the bit to determine whether they are the same. If the result is 1, it means that they are different. It can be understood that at this time, it means that one of the initial encoding and the current-time encoding of the instance I is empty, and there is no need to continue comparison. Then, as shown in step S304, output information that the comparison result is different. If the result is 0, it means that they are the same.
[0116] As step S305, determine whether the original encoding is empty. It can be understood that if the original encoding is empty and the first bit of the encoding pair is the same, it means that the instances I and I' are both empty, and the integrity has not changed. Then, as shown in step S309, output information that the comparison result is the same.
[0117] As step S306, determine whether the current encoding unit is a simple type encoding according to the input type. If yes, execute step 320; if no, execute step 307.
[0118] As S307 step, according to the type of input to determine whether the current encoding unit is a set type encoding, if yes, execute step 330; if not, execute step 308.
[0119] As S308 step, according to the type of input to determine whether the current encoding unit is a set type encoding, if yes, execute step 330; if not, execute step 308.
[0120] As S330 step, cutting the initial encoding and the current time encoding p12 part, and corresponding in order, obtain a new encoding unit pair set.
[0121] As S330 step, for each encoding unit pair again iteration S300 step, and output its iteration results.
[0122] In step S330, the cutting process of the encoding unit is as shown in Figure 5 , taking the p12 part of I as an example.
[0123] As S331 step, read 1 bit of p12 part.
[0124] As S332 step, according to whether the bit is 0 or not to determine whether it is null value encoding.
[0125] If it is null value encoding, then as S333 step, the bit is taken as an encoding unit.
[0126] As S334 step, iteration S300 step from the next bit of the current bit to all bits are cut.
[0127] If it is not null value encoding, then as S335 step, read the next bit of 32 bits and convert it to an integer and mark it as k.
[0128] As S336 step, read the next bit of k bytes.
[0129] As S337 step, the contents read by S331, S335 and S336 are spliced as an encoding unit, and iteration is performed according to S334 step.
[0130] In step S320, the comparison process of simple type encoding is as shown in Figure 6 , taking one set element in the attribute value of the stopover airport in I as an example. Assume that after a certain period of time after data is stored, the external service managing the airport information changes the management data, resulting in the latitude of Xiamen Gaoqi International Airport with airport ID "ZSAM" being changed from "N24.539" to "N24.732".
[0131] As S321 step, read the p11 part of the encoding unit pair, respectively "(omit 29 0) 111" and "(omit 29 0) 111". The result of the bitwise XOR operation is "0". According to the result is 0 or not to determine whether the same. If different, can be skipped S322 step, according to S324 step output comparison results for different information.
[0132] As S322 step, read the p12 part of the encoding unit pair, respectively "01001110 00110010 0011010000101110 00110111 00110011 00110010" and "01001110 00110010 00110100 0010111000110111 00110011 00110010". The result of the bitwise XOR operation is "00000000 0000000000000000 00000000 00000010 00000000 00001011". If the same, according to step S232 output comparison results for the same information. The result is not 0, according to S324 output comparison results.
[0133] Finally, according to the traversal and layer-by-layer recursion, the data integrity check result is generated from bottom to top. It should be noted that the method according to the present application is sufficient to generate an understandable integrity check result, and the specific data structure is not within the description and specification range of the present application. Therefore, the present embodiment directly gives a convenient-to-understand exemplary data structure, according to which the integrity check result in the embodiment can be described as shown in Figure 7
[0134] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and the computer program can run the invention content of the information system business data integrity check method provided by the present application and part or all steps in each embodiment when executed by the data processing unit. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0135] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present application can be implemented by means of a computer program and a corresponding general hardware platform. Based on such understanding, the technical solutions in the embodiments of the present application can be embodied in the form of a computer program, i.e., a software product, which can be stored in a storage medium, including a plurality of instructions for causing a device (which can be a personal computer, a server, a single-chip microcomputer, a MUU or a network device, etc.) comprising a data processing unit to execute the method described in each embodiment or some parts of the embodiments of the present application.
[0136] The present application provides a kind of information system service data integrity verification method, the method and approach of specifically realizing this technical scheme are many, above-mentioned only is the specific embodiment of the present application, it should be pointed out, for the ordinary skilled in the art, on the premise of not departing from the principle of the present application, can also make a number of improvements and refinements, these improvements and refinements also should be regarded as the protection scope of the present application. The components not explicitly in the embodiments can be implemented by existing technology.
Claims
1. A method for verifying the integrity of business data in an information system, characterized in that: include: Step 1: Encode the data entity class instance of the information system based on the data structure of the data entity class to obtain an initial code; Step 2: Encode the data entity class instance again to obtain the current moment code; Step 3: Verify the initial code and current code according to the data entity class and output the data integrity verification result, including: Step 301, read the code unit pair consisting of the initial code and the current code; Step 302, read the first bit of the coding unit pair; Step 303, performing an XOR operation on the first bit to determine whether they are the same; Step 304: If the result of the first bit XOR operation is 1, and the first bits of the coding unit pair are different, indicating that there is a null value code in the coding unit pair, that is, one of the first bits of the two coding units is 0, then it is determined that the data has changed, and the comparison conclusion is output as different integrity comparison information; Step 305: If the result of the first bit XOR operation is 0, the first bits of the encoding unit pairs are the same, and whether the original code is a null value is determined. If so, execute step 309; if not, execute step 306; Step 306: Determine whether the current coding unit is a simple type coding according to the type of the coding unit pair. If so, execute step 320; if not, execute step 307; Step 307: Determine whether the current coding unit is a set type coding according to the type of the coding unit pair. If so, execute step 330; if not, execute step 308; Step 308: Determine whether the current encoding unit is an entity type encoding according to the type of the encoding unit pair. If so, execute step 330. Step 309: If there are two null-value codes in the coding unit pair, that is, the first bits of both coding units are 0, it is determined that the data has not changed, and integrity comparison information indicating that the comparison conclusion is the same is output; Step 320: compare the simple type coding unit pairs and output the data integrity check result; Step 330: for the initial code and the current code in the code unit pair, split the code units according to the data type to obtain sub-code unit pairs; Step 310: Execute step 3 for each sub-coding unit pair, and finally output the data integrity check result.
2. The method for verifying the integrity of information system business data according to claim 1, characterized in that: In step 1, the data entity class instance of the information system is encoded based on the data entity class data structure. The data values to be encoded include one or more of null value data, simple type data, collection type data and entity class data.
3. The method for verifying the integrity of information system business data according to claim 2, characterized in that: Encoding the null value data in step 1 includes representing the null value data as 1 bit 0; Encode simple data types, including: Step 101, encode the data value in UTF-8 and use it as the content encoding of the simple type encoding; Step 102: The number of bytes of the content encoding in step 101 is represented by a fixed 32-bit signed integer in two's complement format and used as the length code of the simple type encoding. Step 103: Use bit 1 as the type code of the simple type code to distinguish the null value data code; Step 104: sequentially concatenate the type code, length code, and content code of the simple type code to form a simple type code unit.
4. The method for verifying the integrity of information system business data according to claim 3, characterized in that: In step 1, the collection type data is encoded, including: Step 111, sorting the elements in the set, encoding each set element according to the encoding method of each type of data value to obtain a coding unit of each set element; Step 112, concatenate the coding units of each element and encode them as the content of the collection type encoding; Step 113: The number of bytes of the content encoding in step 112 is represented by a fixed 32-bit signed integer in two's complement format and used as the length code of the set type code; Step 114: Use bit 1 as the type code of the set type code to distinguish the null value data code; Step 115: sequentially concatenate the type code, length code, and content code of the set type code to form a set type data code unit.
5. The method for verifying the integrity of information system business data according to claim 4, characterized in that: In step 1, the entity class data is encoded, including: Step 121: Encode each attribute value in the entity class data according to the encoding method of each type of data value to obtain an encoding unit of each attribute value; Step 122, concatenate the encoding units of each attribute value and use them as the content encoding of the entity type encoding; Step 123: Express the number of bytes of the content encoding in step 122 as a fixed 32-bit signed integer in two's complement format and use it as the length code of the entity type code. Step 124: Use bit 1 as the type code of the entity type code to distinguish the null value data code; Step 125: sequentially concatenate the type code, length code, and content code of the entity type code to form an entity type data code unit.
6. The method for verifying the integrity of information system business data according to claim 5, characterized in that: Step 2: re-encoding the data entity class instance to obtain the current moment code includes encoding the current moment data entity class instance according to step 1 and outputting it as the current moment code.
7. The method for verifying the integrity of information system business data according to claim 6, characterized in that: Step 320 includes: reading the 32 bits starting from the second bit in the coding unit pair respectively and converting them into integers as length information, and judging whether they are the same. If they are different, it is judged that the data has changed, and the comparison conclusion is different integrity comparison information; if the length information is the same, the length is recorded as k, and the k bytes starting from the next bit in the coding unit pair are read respectively as content information, and judging whether the content part is the same. If they are different, it is judged that the data has changed, and the comparison conclusion is different integrity comparison information; otherwise, it is judged that the data has not changed, and the comparison conclusion is the same integrity comparison information.
8. The method for verifying the integrity of information system business data according to claim 7, characterized in that: Step 330 includes: If the coding unit is a set-type coding unit, comparing the set-type coding unit pairs, including: dividing the content information in the code according to the coding division method and constructing coding unit pairs of the set elements; comparing each coding unit pair of the set elements according to step 3 and outputting integrity comparison information; If the coding unit is an entity type coding unit, the entity type coding unit pair is compared, including: cutting the content information in the code into coding unit pairs of attribute values according to the coding cutting method; for each coding unit pair of attribute values, comparing according to step 3 and outputting integrity comparison information.
9. The method for verifying the integrity of information system business data according to claim 8, characterized in that: The code cutting method in step 330 includes: Step 331, read 1 bit; Step 332, determine whether it is a null value code; if so, execute step 333; if not, execute step 335; Step 333, taking the bit as a coding unit; Step 334, repeating step 330 starting from the next bit; Step 335: read the 32 bits starting from the next bit in the encoding unit and convert them into an integer as the content length, recorded as k; Step 336, read k bytes starting from the next bit position in the encoding unit; In step 337 , the contents read in steps 331 , 335 and 336 are spliced together as a sub-coding unit; and step 334 is repeated until the coding unit is cut.
Citation Information
Patent Citations
Verifying method and device for business data in medical-and-old-age-caring cooperative system
CN108021468A
Data coding method and device, storage medium and electronic device
CN110046331A
Data verification method and system for real-time data warehouse and computer readable medium
CN113076310A