Database storage and encryption method

By introducing the main control module, file processing module, file header analysis module, data analysis module, decryption module and logging module in the database storage and encryption system, the existing database has solved the problems of high storage demand and poor platform adaptability in the automotive diagnostic equipment industry, and efficient, flexible and secure data storage is achieved.

CN119989372APending Publication Date: 2025-05-13SHENZHEN BONOR TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411810264.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing databases have problems such as high storage demand and poor platform adaptability in the automotive diagnostic equipment industry, especially on platforms such as ARM.

Method used

Using a database storage and encryption method, it works through a storage and encryption system. The system includes a main control module, a file processing module, a file header analysis module, a data analysis module, a decryption module and a logging module to realize efficient storage and encryption of data.

Benefits of technology

This method can effectively solve the problems of high database storage requirements and poor platform adaptability, and provides flexible, highly compatible, space-saving and data-safe data storage solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989372A_ABST
    Figure CN119989372A_ABST
Patent Text Reader

Abstract

The invention discloses a database storage and encryption method, and relates to the technical field of databases, the method adopts a storage and encryption system to work, and the system comprises a main control module, a file processing module, a file header analysis module, a data analysis module, a decryption module and a log recording module. The main control module is electrically connected with the file processing module, the file header analysis module, the data analysis module, the decryption module and the log recording module, the file processing module is electrically connected with the decryption module, and the main control module is used for being responsible for overall coordination and execution of data reading and processing flows. The file processing module is used for opening, reading and closing a file, the file header analysis module is used for analyzing and verifying file header information, and the data analysis module is used for extracting corresponding data from a data content area according to a specified address and a data type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of databases, and in particular to a method for storing and encrypting a database. Background Art

[0002] There is a need for databases in software development of various projects, especially in the automotive diagnostic equipment R&D and manufacturing industry, where a large amount of vehicle data information needs to be stored in the form of a database. In the process of automotive diagnostic software development, a large amount of vehicle model data needs to be stored, such as fault code library, data stream library, etc. Fault codes generally consist of index, code, content, help and other information. Data streams generally consist of name, unit, instruction, control bit, algorithm and other information.

[0003] The current common databases (such as MySQL, etc.) have obvious drawbacks when used in the automotive diagnostic equipment industry. Disadvantage 1: In addition to storing data, the current conventional databases also need to store a large amount of retrieval information. The data volume is large and the storage requirements are high. Disadvantage 2: The current conventional databases are basically based on system operation and are not suitable for platforms such as ARM. The current solution formulates a data information storage method, storing data in the form of XML files and reading files in a specific way. Summary of the invention

[0004] The purpose of the present invention is to provide a method for storing and encrypting a database to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a database storage and encryption method, the method adopts a storage and encryption system to work, the system includes a main control module, a file processing module, a file header parsing module, a data parsing module, a decryption module, and a log recording module, the main control module is electrically connected to the file processing module, the file header parsing module, the data parsing module, the decryption module, and the log recording module, the file processing module is electrically connected to the decryption module, the main control module is responsible for overall coordination and execution of data reading and processing procedures, the file processing module is used for file opening, reading and closing operations, the file header parsing module is used to parse file header information and perform verification, the data parsing module is used to extract corresponding data from a data content area according to a specified address and data type, the decryption module is used to decrypt the read data, and the log recording module is used to record information or errors in program operation for subsequent tracking and analysis.

[0006] According to the above technical solution, the file processing module includes a file opening module, a file reading module, and a file closing module. The file opening module is responsible for opening the specified file and verifying the existence and readability of the file to ensure that the file can be accessed normally. The file reading module is used to read the file data in binary mode and divide the file data into reasonable byte blocks for subsequent processing. The file closing module is used to close the opened file, release the file resources, and ensure that the system memory will not leak.

[0007] The file header parsing module includes a timestamp extraction module, a version number extraction module, a file header verification module, and a validity confirmation module. The timestamp extraction module extracts a 19-byte timestamp from the file header and formats it for subsequent processing. The version number extraction module is used to extract a 6-byte version number from the file header and verify that it complies with preset regulations. The file header verification module is used to check and calculate the file header information to ensure data integrity and prevent data damage. The validity confirmation module is used to verify whether the checksum obtained from the file header matches the calculated checksum to ensure the validity of the file;

[0008] The data parsing module includes an address verification module, a type parsing module, and a data extraction module. The address verification module verifies whether the data address provided by the file is within a valid range to prevent out-of-bounds errors. The type parsing module parses the data type requested by the file, including DB, DW, DD, DL, DF, DS, and DG, to determine how to read and process the corresponding data. The data extraction module extracts the data content of the specified address according to the parsed data type and returns it to the caller.

[0009] The decryption module includes a decryption algorithm selection module, a storage reversal module, and a formatting output module. The decryption algorithm selection module selects a suitable decryption algorithm according to the data type to ensure that the data can be correctly decrypted. The storage reversal module reverses the storage order of the read encrypted data according to a predefined format to restore the original data. The formatting output module formats the decrypted data into a usable output form to facilitate subsequent data processing or display.

[0010] The log recording module includes a log management module, an error recording module, and an operation recording module. The log management module manages the creation, storage, and output format of the log to ensure that the log information is clear and easy to track. The error recording module records the error information that occurs during program operation, including timestamps and error details, to facilitate subsequent debugging. The operation recording module is used to record important information during program operation, such as progress and operation steps, for reference by developers and maintenance personnel.

[0011] According to the above technical solution, the following working steps are included:

[0012] S1. Call the file processing module to perform file opening and reading operations, open the specified file, verify the existence and readability of the file, read the file content in binary mode, and divide the data block into reasonable byte blocks in preparation for subsequent processing;

[0013] S2. After the file is read, the main control module hands it over to the file header parsing module to parse the file header information, extract the 19-byte timestamp from the file header, and format it, extract the 6-byte version number in the file header and verify whether it meets the preset regulations, perform checksum calculation on the file header information, and verify whether the read checksum matches the calculated checksum;

[0014] S3. When the file is valid, the main control module requests the data parsing module to extract specific data, verifies whether the data address input by the file is within the available range, parses the data type requested by the file, extracts the data content of the specified address according to the parsed data type, selects an appropriate decryption algorithm according to the data type, and reverses the encrypted data storage order according to the predefined format to restore the original data;

[0015] S4. During the processing, all important information and errors are recorded. At the same time, the file is closed after the processing is completed. The error information that occurs during the program operation is recorded, including timestamps and error details, and important execution information is recorded.

[0016] According to the above technical solution, in S1, file opening refers to an operation in a computer program to request access to a specific file through a file processing module. After opening the file, the program can read the file content or write data. The opening operation requires verification of the file availability and its access rights. File verification includes checking whether the file path is correct, whether the file has been created, and whether it has read or write permissions.

[0017] According to the above technical solution, in S3, the encrypted data is the original data converted into an unreadable form through an encryption algorithm, and the order of the data may also be changed during storage. The specific method of reversing the storage order of the encrypted data according to the predefined format is: first read the length of the buffer to ensure that the correct space is allocated, then read the data of the corresponding number of bytes, and then reverse the character order in the same way, decrypt the data using a predefined decryption algorithm, and return to the decrypted original data.

[0018] According to the above technical solution, in S2, the specific method for verifying whether the read checksum matches the calculated checksum is as follows: first, the file specific data parsing speed P k Perform the test and multiply it by time to get the file parsing amount W = P k t, the total amount of parsing required for each formatting output module per decryption cycle is W 总 =∑Pk t, and the number of file headers is determined according to the data volume of a single file header to ensure that the number of file headers matches the single file parsing volume W and the degree of redundancy. The redundant file header is used for flexible configuration. 总 Evenly distributed to each file header for parsing output, the real-time output parsing speed of other formatting output modules is P q It cannot meet the file requirements, and the real-time output parsing speed of this formatted output module is P q When the file requirement is exceeded, bandwidth is allocated to the flexibly configured file header, where t is the time of a decryption cycle.

[0019] According to the above technical solution, in S2, firstly, according to the number of files corresponding to each formatting output module, the total parsing speed ΣP of the specific data of the file is calculated. k , when the file specific data runs the total parsing speed ∑P k Does not exceed the set value, that is The spare parsing speed of the flexibly configured file header can be fully allocated to other formatting output modules, and n is the number of file headers of the current formatting output module.

[0020] According to the above technical solution, in S2, when the total parsing speed ∑P of the specific data of the file is k Exceeding the set value, that is The proportion of the free parsing speed allocation of the flexibly configured file header is reduced. The specific allocation method is to allocate the parsing speed of other formatting output modules in real time as the total parsing speed ∑P of the specific data of the file runs. k The time exceeding the set value is reduced proportionally until the specified time is reached and the remaining distribution resolution speed is zero.

[0021] Compared with the prior art, the beneficial effects achieved by the present invention are: the present invention defines a method for data storage and encryption, which is very suitable for project development in the fields of automotive diagnostic software, etc., and the method has the following obvious advantages. 1. This method only defines the storage method of data, and the definition of data blocks is completely determined by the programmer, which is flexible and highly compatible. 2. The data storage method is simple and has good readability. 3. The current data storage method is very space-saving, and no additional information is stored except for the necessary data content. 4. This method also encrypts and stores the data, which can better protect data resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0023] Figure 1It is a schematic diagram of the overall process of the present invention;

[0024] Figure 2 It is a schematic diagram of the database compilation principle of the present invention;

[0025] Figure 3 It is a schematic diagram of reading the encrypted database of the present invention. DETAILED DESCRIPTION

[0026] 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.

[0027] See also Figure 1-Figure 3 The present invention provides a technical solution: a method for storing and encrypting a database, the method adopts a storage and encryption system to work, the system includes a main control module, a file processing module, a file header parsing module, a data parsing module, a decryption module, and a log recording module, the main control module is electrically connected to the file processing module, the file header parsing module, the data parsing module, the decryption module, and the log recording module, the file processing module is electrically connected to the decryption module, the main control module is responsible for overall coordination and execution of data reading and processing procedures, the file processing module is used for opening, reading and closing files, the file header parsing module is used for parsing file header information and performing verification, the data parsing module is used for extracting corresponding data from a data content area according to a specified address and data type, the decryption module is used for decrypting the read data, and the log recording module is used for recording information or errors in program operation to facilitate subsequent tracking and analysis;

[0028] The file processing module includes a file opening module, a file reading module, and a file closing module. The file opening module is responsible for opening the specified file and verifying the existence and readability of the file to ensure that the file can be accessed normally. The file reading module is used to read the file data in binary mode and divide the file data into reasonable byte blocks for subsequent processing. The file closing module is used to close the opened file, release the file resources, and ensure that the system memory will not leak;

[0029] The file header parsing module includes a timestamp extraction module, a version number extraction module, a file header verification module, and a validity confirmation module. The timestamp extraction module extracts a 19-byte timestamp from the file header and formats it for subsequent processing. The version number extraction module is used to extract a 6-byte version number from the file header and verify that it complies with the preset regulations. The file header verification module is used to check and calculate the file header information to ensure data integrity and prevent data damage. The validity confirmation module is used to verify whether the checksum obtained from the file header matches the calculated checksum to ensure the validity of the file;

[0030] The data parsing module includes an address verification module, a type parsing module, and a data extraction module. The address verification module verifies whether the data address provided by the file is within the valid range to prevent out-of-bounds errors. The type parsing module parses the data type requested by the file, including DB, DW, DD, DL, DF, DS, and DG, to determine how to read and process the corresponding data. The data extraction module extracts the data content of the specified address according to the parsed data type and returns it to the caller.

[0031] The decryption module includes a decryption algorithm selection module, a storage reversal module, and a formatting output module. The decryption algorithm selection module selects a suitable decryption algorithm according to the data type to ensure that the data can be correctly decrypted. The storage reversal module reverses the storage order of the read encrypted data according to a predefined format to restore the original data. The formatting output module formats the decrypted data into a usable output form to facilitate subsequent data processing or display.

[0032] The log recording module includes the log management module, the error recording module, and the operation recording module. The log management module manages the creation, storage, and output format of the log to ensure that the log information is clear and easy to track. The error recording module records the error information that occurs during program operation, including timestamps and error details, which is convenient for subsequent debugging. The operation recording module is used to record important information during program operation, such as progress and operation steps, for reference by developers and maintenance personnel;

[0033] The following steps are included:

[0034] S1. Call the file processing module to perform file opening and reading operations, open the specified file, verify the existence and readability of the file, read the file content in binary mode, and divide the data block into reasonable byte blocks in preparation for subsequent processing;

[0035] S2. After the file is read, the main control module hands it over to the file header parsing module to parse the file header information, extract the 19-byte timestamp from the file header, and format it, extract the 6-byte version number in the file header and verify whether it meets the preset regulations, perform checksum calculation on the file header information, and verify whether the read checksum matches the calculated checksum;

[0036] S3. When the file is valid, the main control module requests the data parsing module to extract specific data, verifies whether the data address input by the file is within the available range, parses the data type requested by the file, extracts the data content of the specified address according to the parsed data type, selects an appropriate decryption algorithm according to the data type, and reverses the encrypted data storage order according to the predefined format to restore the original data;

[0037] S4. During the processing, all important information and errors are recorded, and the file is closed after the processing is completed. Error information that occurs during program operation is recorded, including timestamps and error details, and important execution information is recorded;

[0038] In S1, file opening refers to an operation in a computer program that requests access to a specific file through a file processing module. After opening a file, the program can read the file content or write data. The opening operation requires verification of the availability of the file and its access rights. File verification includes checking whether the file path is correct, whether the file has been created, and whether the read or write permissions are available;

[0039] In S3, encrypted data is the original data that is converted into an unreadable form through an encryption algorithm, and the order of the data may also be changed during storage. The specific method of reversing the storage order of encrypted data according to the predefined format is: first read the length of the buffer to ensure that the correct space is allocated, then read the data of the corresponding number of bytes, and then reverse the character order, decrypt the data using the predefined decryption algorithm, and return to the decrypted original data;

[0040] In S2, the specific method of verifying whether the read checksum matches the calculated checksum is as follows: first, the file specific data parsing speed P k Perform the test and multiply it by time to get the file parsing amount W = P k t, the total amount of parsing required for each formatting output module per decryption cycle is W 总 =∑P k t, and the number of file headers is determined according to the data volume of a single file header to ensure that the number of file headers matches the single file parsing volume W and the degree of redundancy. The redundant file header is used for flexible configuration. 总 Evenly distributed to each file header for parsing output, the real-time output parsing speed of other formatting output modules is P qIt cannot meet the file requirements, and the real-time output parsing speed of this formatted output module is P q When the file requirements are exceeded, bandwidth is allocated to the flexibly configured file header, where t is the time of a decryption cycle;

[0041] In S2, firstly, the total parsing speed ∑P of the specific data of the file is calculated according to the number of files corresponding to each formatting output module. k , when the file specific data runs the total parsing speed ΣP k Does not exceed the set value, that is The spare parsing speed of the flexibly configured file header can be fully allocated to other formatting output modules, where n is the number of file headers in the current formatting output module;

[0042] In S2, when the file specific data runs the total parsing speed ∑P k Exceeding the set value, that is The proportion of the free parsing speed allocation of the flexibly configured file header is reduced. The specific allocation method is to allocate the parsing speed of other formatting output modules in real time as the total parsing speed ∑P of the specific data of the file runs. k The time exceeding the set value is reduced proportionally until the specified time is reached and the remaining distribution resolution speed is zero.

[0043] Example:

[0044] The current solution stores raw data in the form of xxx.xml files, and the storage method is as follows

[0045] Data is stored in the database as data blocks, and the database allows the storage of multiple data.

[0046] The data block label ends with a colon, which represents the 4-byte address of the data block and can be stored as data;

[0047] The content of a data block is composed of data one by one, and the specific composition method is determined by the designer.

[0048] Data composition: data type + < + data description + = + data content + > + separator

[0049] Data Type Definition

[0050] DB(1BYTE) 1 byte integer

[0051] DW(2BYTE) 2-byte integer

[0052] DD(4BYTE) 4-byte integer

[0053] DL(8BYTE) 8-byte integer

[0054] DF(8BYTE) 8-byte floating point type

[0055] DS(N BYTE) N-byte string

[0056] DG(N BYTE) N-byte buffer

[0057] Data description: briefly explain the specific purpose of the data

[0058] Data content: specify the specific data of the specified type;

[0059] Delimiters: Use commas in the middle of a line and semicolons at the end of a line.

[0060] Data annotation: The annotation method is synchronized with the XML file annotation method.

[0061] The original data file is processed into binary by the compilation tool, and the processed data is stored in the following way

[0062] 2.1 Storage format: file header + data content area

[0063] 2.2 File header (total size 64 bytes)

[0064] Starting address: 0x00000000

[0065] Timestamp: 19 bytes (2024-10-1912:15:19)

[0066] Timestamp padding bytes: 13 00s (filling the timestamp bytes to 32 bytes) Version number: 6 bytes V01.00

[0067] Version number padding bytes: 10 00s (fill the version number bytes to 16 bytes) Random number: 14 bytes

[0068] Checksum: 2 bytes (double-byte accumulation and inversion plus one)

[0069] 2.3 Data Content Area

[0070] Starting address: 0x00000040

[0071] Data encryption and storage: (only data content is stored)

[0072] DB(1BYTE) 1 byte integer

[0073] The data is inverted and stored in a single byte

[0074] DW(2BYTE) 2-byte integer

[0075] The data is inverted and stored in double-byte little endian format.

[0076] DD(4BYTE) 4-byte integer

[0077] The data is inverted and stored in four-byte little-endian format

[0078] DL(8BYTE) 8-byte integer

[0079] The data is inverted and stored in eight-byte little-endian format

[0080] DF(8BYTE) 8-byte floating point type

[0081] The data is inverted and stored in eight-byte little-endian format

[0082] DS(N BYTE) N-byte string

[0083] Double-byte length little-endian storage + n-byte string data order is reversed and stored DG (N BYTE) N-byte buffer Double-byte length little-endian storage + n-byte buffer data order is reversed and stored Storage example: (According to the above example, the data before encryption is taken as an example)

[0084] 010001020201040304030201080706050807060504030201…

[0085] 3. Compiled binary data, read data during program use

[0086] 3.1 Function definition xml_read (file name, address, data type, data);

[0087] 3.2 The data file needs to perform double-byte accumulation and inversion plus one check of the 64-byte file header

[0088] 3.3 Read data according to data address and type

[0089] 3.4 Read the data content and decrypt it.

[0090] 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.

[0091] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for storing and encrypting a database, characterized in that: The method adopts a storage and encryption system to work, and the system includes a main control module, a file processing module, a file header parsing module, a data parsing module, a decryption module, and a log recording module. The main control module is electrically connected to the file processing module, the file header parsing module, the data parsing module, the decryption module, and the log recording module. The file processing module is electrically connected to the decryption module. The main control module is responsible for overall coordination and execution of data reading and processing processes. The file processing module is used for opening, reading and closing operations of files. The file header parsing module is used to parse file header information and perform verification. The data parsing module is used to extract corresponding data from a data content area according to a specified address and data type. The decryption module is used to decrypt the read data. The log recording module is used to record information or errors in program operation to facilitate subsequent tracking and analysis.

2. A method for storing and encrypting a database according to claim 1, characterized in that: The file processing module includes a file opening module, a file reading module, and a file closing module. The file opening module is responsible for opening a specified file and verifying the existence and readability of the file to ensure that the file can be accessed normally. The file reading module is used to read file data in binary mode and divide the file data into reasonable byte blocks for subsequent processing. The file closing module is used to close the opened file, release file resources, and ensure that the system memory will not leak; The file header parsing module includes a timestamp extraction module, a version number extraction module, a file header verification module, and a validity confirmation module. The timestamp extraction module extracts a 19-byte timestamp from the file header and formats it for subsequent processing. The version number extraction module is used to extract a 6-byte version number from the file header and verify that it complies with preset regulations. The file header verification module is used to check and calculate the file header information to ensure data integrity and prevent data damage. The validity confirmation module is used to verify whether the checksum obtained from the file header matches the calculated checksum to ensure the validity of the file; The data parsing module includes an address verification module, a type parsing module, and a data extraction module. The address verification module verifies whether the data address provided by the file is within a valid range to prevent out-of-bounds errors. The type parsing module parses the data type requested by the file, including DB, DW, DD, DL, DF, DS, and DG, to determine how to read and process the corresponding data. The data extraction module extracts the data content of the specified address according to the parsed data type and returns it to the caller. The decryption module includes a decryption algorithm selection module, a storage reversal module, and a formatting output module. The decryption algorithm selection module selects a suitable decryption algorithm according to the data type to ensure that the data can be correctly decrypted. The storage reversal module reverses the storage order of the read encrypted data according to a predefined format to restore the original data. The formatting output module formats the decrypted data into a usable output form to facilitate subsequent data processing or display. The log recording module includes a log management module, an error recording module, and an operation recording module. The log management module manages the creation, storage, and output format of the log to ensure that the log information is clear and easy to track. The error recording module records the error information that occurs during program operation, including timestamps and error details, to facilitate subsequent debugging. The operation recording module is used to record important information during program operation, such as progress and operation steps, for reference by developers and maintenance personnel.

3. The method for storing and encrypting a database according to claim 2, characterized in that: The following steps are included: S1. Call the file processing module to perform file opening and reading operations, open the specified file, verify the existence and readability of the file, read the file content in binary mode, and divide the data block into reasonable byte blocks in preparation for subsequent processing; S2. After the file is read, the main control module hands it over to the file header parsing module to parse the file header information, extract the 19-byte timestamp from the file header, and format it, extract the 6-byte version number in the file header and verify whether it meets the preset regulations, perform checksum calculation on the file header information, and verify whether the read checksum matches the calculated checksum; S3. When the file is valid, the main control module requests the data parsing module to extract specific data, verifies whether the data address input by the file is within the available range, parses the data type requested by the file, extracts the data content of the specified address according to the parsed data type, selects an appropriate decryption algorithm according to the data type, and reverses the encrypted data storage order according to the predefined format to restore the original data; S4. During the processing, all important information and errors are recorded. At the same time, the file is closed after the processing is completed. The error information that occurs during the program operation is recorded, including timestamps and error details, and important execution information is recorded.

4. A method for storing and encrypting a database according to claim 3, characterized in that: In S1, file opening refers to an operation in a computer program to request access to a specific file through a file processing module. After opening the file, the program can read the file content or write data. The opening operation requires verification of the file availability and access rights. File verification includes checking whether the file path is correct, whether the file has been created, and whether the read or write permissions are available.

5. A method for storing and encrypting a database according to claim 4, characterized in that: In S3, the encrypted data is the original data converted into an unreadable form through an encryption algorithm, and the order of the data may also be changed during storage. The specific method of reversing the storage order of the encrypted data according to the predefined format is: first read the length of the buffer to ensure that the correct space is allocated, then read the data of the corresponding number of bytes, and then reverse the character order in the same way, decrypt the data using a predefined decryption algorithm, and return to the decrypted original data.

6. A method for storing and encrypting a database according to claim 5, characterized in that: In S2, the specific method for verifying whether the read checksum matches the calculated checksum is as follows: first, the file specific data parsing speed P k Perform the test and multiply it by time to get the file parsing amount W = P k t, the total amount of parsing required for each formatting output module per decryption cycle is W 总 =∑P k t, and the number of file headers is determined according to the data volume of a single file header to ensure that the number of file headers matches the single file parsing volume W and the degree of redundancy. The redundant file header is used for flexible configuration. 总 Evenly distributed to each file header for parsing output, the real-time output parsing speed of other formatting output modules is P q It cannot meet the file requirements, and the real-time output parsing speed of this formatted output module is P q When the file requirement is exceeded, bandwidth is allocated to the flexibly configured file header, where t is the time of a decryption cycle.

7. A method for storing and encrypting a database according to claim 6, characterized in that: In S2, firstly, the total parsing speed ∑P of the specific data of the file is calculated according to the number of files corresponding to each formatting output module. k , when the file specific data runs the total parsing speed ∑P k Does not exceed the set value, that is The spare parsing speed of the flexibly configured file header can be fully allocated to other formatting output modules, and n is the number of file headers of the current formatting output module.

8. A method for storing and encrypting a database according to claim 7, characterized in that: In S2, when the file specific data runs the total parsing speed ∑P k Exceeding the set value, that is The proportion of the free parsing speed allocation of the flexibly configured file header is reduced. The specific allocation method is to allocate the parsing speed of other formatting output modules in real time as the total parsing speed ∑P of the specific data of the file runs. k The time exceeding the set value is reduced proportionally until the specified time is reached and the remaining distribution resolution speed is zero.

Citation Information

Patent Citations

  • Embedded security and protection equipment data extracting method

    CN106557524A

  • Computing resource scheduling method and device and electronic equipment

    CN111400008A

  • Log recording method and device

    CN111400267A

  • Data encryption method and device, equipment and medium

    CN113111356A

  • Binary programming format loading method and system under embedded system

    CN113590227A