A data encryption algorithm and system for a computer

By combining automated data collection, SHA algorithm-generated encryption keys, traversal verification, and management modules, the problem of low data verification accuracy and system crashes caused by damage to encryption devices in existing technologies is solved, achieving efficient and secure data encryption and verification.

CN122113130APending Publication Date: 2026-05-29GUIZHOU RADIO & TV UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU RADIO & TV UNIV
Filing Date
2025-12-15
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing data encryption systems for computers require manual comparison and verification of each piece of data in different computer databases, resulting in low accuracy of computer data verification. Furthermore, if the encryption device is damaged, the encryption key may become unreadable or corrupted, leading to system crashes.

Method used

The system employs a data acquisition module to automatically collect data, a key generation module to generate encryption keys using the SHA algorithm and process them through an encapsulation algorithm, a data verification module to perform full data verification using a traversal method, a key management module to manage encryption keys, and a display module to provide an intuitive interface.

Benefits of technology

It improves the accuracy of data verification, enhances key security, reduces key management costs, and ensures the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122113130A_ABST
    Figure CN122113130A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of data encryption, and discloses a data encryption algorithm and system for a computer, which comprises a data acquisition module, a main control module, a secret key generation module, an encryption module, a data verification module, a secret key management module, a security evaluation module and a display module. Different computer data verification processes are adopted for different computer data verification types in the source computer database and the target computer database through the data verification module, and the full amount of computer data is verified through the traversal mode, so that the accuracy of computer data verification is improved. Meanwhile, the security of the computer data secret key is effectively improved through the secret key management module. Moreover, the management method of the application does not need to bind other external hardware devices, and the management cost of the computer data secret key is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data encryption technology, and in particular relates to a data encryption algorithm and system for computers. Background Technology

[0002] Data encryption remains one of the most reliable methods for protecting information in computer systems. It utilizes cryptographic techniques to encrypt information, achieving information concealment and thus protecting information security. Data transmission encryption aims to encrypt the data stream during transmission, typically employing two types: line encryption and end-to-end encryption. Line encryption focuses on the transmission line itself, disregarding the source and destination, providing security by using different encryption keys for each line. End-to-end encryption refers to information being automatically encrypted at the sending end and encapsulated into data packets using TCP / IP, then transmitted as unreadable and unidentifiable data across the internet. Upon arrival at its destination, this information is automatically reassembled and decrypted, becoming readable data. Data storage encryption aims to prevent data loss during storage. Data storage encryption can be divided into two types: encrypted storage and access control. The former is generally achieved through encryption algorithm conversion, additional passwords, and encryption module methods; the latter involves reviewing and restricting user qualifications and permissions to prevent unauthorized users from accessing data or legitimate users from accessing data beyond their authority. However, existing data encryption systems for computers require manual comparison and verification of each computer's data in different computer databases, resulting in low accuracy of computer data verification. At the same time, if the encryption device is damaged, the data within the encryption device will be corrupted, leading to situations where the encryption key cannot be read or is destroyed. This would cause the entire system's encrypted data to be unable to be decrypted because the key cannot be read, rendering the data unusable and causing the entire system to crash and become unusable.

[0003] Based on the above analysis, the problems and shortcomings of the existing technology are as follows: (1) Existing data encryption systems for computers require manual comparison and verification of each computer data in different computer databases, resulting in low accuracy of computer data verification.

[0004] (2) If the encryption device is damaged, the data in the encryption device will be damaged, resulting in the encryption key being unreadable or destroyed. This will cause the encrypted data of the entire system to be unable to be decrypted because the key cannot be read, thus making the data unusable and causing the entire system to crash and become unusable. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention provides a data encryption algorithm and system for computers.

[0006] This invention is implemented as follows: a data encryption system for a computer includes: A data encryption system for computers, characterized in that it comprises: The data acquisition module, connected to the main control module, is used to collect computer data from the target computer according to customer requirements. The main control module, connected to the data acquisition module, key generation module, encryption module, data verification module, key management module, security evaluation module, and display module, is used to adjust and control based on the data transmitted by each module and to ensure the normal operation of each module. The key generation module, connected to the main control module, is used to initialize computer data by inputting password parameters and randomly generate a plaintext key. The plaintext key is then processed using the SHA algorithm to obtain the encrypted key. The plaintext key and the encrypted key are encapsulated using an encapsulation algorithm to obtain the encrypted key and generate a verification value. Both are stored in a preset file in the computer data directory. The encryption module, connected to the main control module, is used to obtain the encrypted key and verification value generated by the key generation module from a preset file, and decrypt the encrypted key through the decryption function to obtain the decryption key. The decryption key is verified using the verification value. When the verification is successful, the decryption key is used to encrypt the computer data. The data verification module, connected to the main control module, is used to build a computer database, receive computer data verification instructions, start computer data verification tasks according to the computer data verification instructions, determine the verification type according to the computer data verification tasks, and verify the computer data. The key management module, connected to the main control module, is used to manage the encryption keys and encrypted computer data generated by the key generation module and the encryption module. The security evaluation module, connected to the main control module, is used to perform a security assessment based on the target computer's encryption key and encrypted computer data, and to evaluate the security of the computer data. The display module, connected to the main control module, is used to display computer data, verification results, encryption results, and evaluation results based on the data transmitted by the main control module.

[0007] 2. The data encryption system according to claim 1, characterized in that the key generation module generates the encrypted key through the following steps: Enter the password parameters to initialize the computer data; Randomly generate plaintext keys; The plaintext key is processed using the SHA algorithm to obtain the key-encrypted key. The plaintext key and the key encryption key are encapsulated using an encapsulation algorithm to obtain the encrypted key. Generate a verification value and store the encrypted key and verification value in a preset file in the computer's data directory.

[0008] 3. The data encryption system according to claim 1, characterized in that the encryption module encrypts computer data through the following steps: Retrieve the encrypted key and verification value generated by the key generation module from the preset file; The encrypted key is decrypted using the decryption function to obtain the decryption key; The decryption key is verified using a checksum. If the verification passes, the computer data is encrypted using the decryption key.

[0009] Another object of the present invention is to provide a data encryption algorithm for computers comprising the following steps: Step 1: Collect computer data using the data acquisition module; Step two: The main control module generates a computer data encryption key through the key generation module; Step 3: Encrypt the computer data using the key via the encryption module; verify the computer data via the data verification module. Step four: Manage the encryption keys for computer data through the key management module; evaluate the security of computer data through the security evaluation module. Step 5: Display the computer data, verification results, and evaluation results through the display module.

[0010] Furthermore, the data verification module uses the following verification method: (1) Construct a computer database, receive a computer data verification instruction, and start a computer data verification task according to the computer data verification instruction; execute the computer data verification task and create a connection relationship between the source computer database and the target computer database, generate a source connection and a target connection, and determine the verification type according to the computer data verification task; The verification types include: incremental computer data verification and full computer data verification; (2) If the verification type is incremental computer data verification, the computer data write event of the target computer database is monitored based on a preset time interval. When a computer data write event is detected in the target computer database, the unique computer data identifier address corresponding to the computer data write event is obtained through a preset field name. The computer data writing event includes: the content of the written computer data and the corresponding writing time, the method of writing the computer data, and the dynamic state of the current page or the user's auxiliary operations during the writing process. (3) Extract incremental verification computer data from the source computer database and the target computer database according to the unique identifier address of the computer data, the source connection and the target connection respectively, to obtain source incremental verification computer data and target incremental verification computer data; perform computer data consistency verification on the source incremental verification computer data and the target incremental verification computer data to obtain incremental computer data verification results; If the verification type is full computer data verification, then obtain the pre-set table name, sorting, and sorting field corresponding to the source computer database and the target computer database; Based on the table name, the sorting, and the sorting field, query the full verification computer data in the source computer database and the target computer database respectively to obtain the source full verification computer data and the target full verification computer data; Based on the source full-data verification computer data and the target full-data verification computer data, a full-data verification is performed on the source computer database and the target computer database using a traversal method to obtain a full-data verification result. The step of performing full-data verification on the source computer database and the target computer database using a traversal method to obtain a full-data verification result includes: querying cursors in the source computer database and the target computer database respectively to obtain a source computer database cursor and a target computer database cursor; initializing the source computer database cursor and the target computer database cursor according to preset initialization conditions to obtain an initial source cursor and an initial target cursor; traversing and comparing the source full-data verification computer data and the target full-data verification computer data based on the initial source cursor and the initial target cursor to generate a full-data verification result; the step of traversing and comparing the source full-data verification computer data and the target full-data verification computer data based on the initial source cursor and the initial target cursor to generate a full-data verification result includes: Set the cursor state of the initial source cursor to the first source state and the cursor state of the initial target cursor to the first target state; move the initial source cursor and set its cursor state to the second source state, and move the initial target cursor and set its cursor state to the second target state; during the movement of the initial source cursor and the initial target cursor, iterate and compare the source field computer data in the source computer database and the target field computer data in the target computer database to obtain a target comparison result, wherein the target comparison result includes: the source field computer data is larger, equal, and the target field computer data is larger; generate a full computer data verification result based on the comparison result.

[0011] Furthermore, the step of executing the computer data verification task and creating a connection between the source computer database and the target computer database, generating a source connection and a target connection, and determining the verification type according to the computer data verification task, wherein the verification type includes: incremental computer data verification and full computer data verification, including: When performing the computer data verification task, the preset source computer database and the preset target computer database are invoked; Obtain source field computer data from the source computer database, and obtain target field computer data from the target computer database; Create a field-computer data correspondence between the source field computer data and the target field computer data; Create a mapping relationship between the source computer database and the target computer database; Based on the correspondence between the computer data in the fields and the mapping relationship, a connection relationship between the source computer database and the target computer database is generated, resulting in a source connection and a target connection; The verification type is determined based on the computer data verification task, wherein the verification type includes: incremental computer data verification and full computer data verification.

[0012] Furthermore, during the movement of the initial source cursor and the initial target cursor, the process of traversing and comparing the source field computer data in the source computer database and the target field computer data in the target computer database to obtain the target comparison result includes: Based on the initial source cursor, locate the first row of source computer data in the source field computer data of the source computer database, and based on the initial target cursor, locate the second row of target computer data in the target field computer data of the target computer database; The first row of source computer data and the second row of target computer data are compared to obtain the comparison result of the first row. Based on the comparison result of the first row and according to the preset cursor movement strategy, the initial source cursor and the initial target cursor are moved until the source field computer data and the target field computer data are traversed to obtain the target comparison result. The target comparison result includes: the source field computer data is larger, equal, and the target field computer data is larger.

[0013] Further, the step of controlling the initial source cursor and the initial target cursor to move according to the first row comparison result and a preset cursor movement strategy until the source field computer data and the target field computer data have been traversed to obtain the target comparison result includes: If the first row comparison result is that the source field computer data is larger, then record that the source computer database is larger and control the initial source cursor to move in a preset direction to obtain the second row of source computer data; The source computer data in the second row and the target computer data in the second row are compared to obtain the comparison result in the second row. Based on the comparison result of the second row, control the initial source cursor and the initial target cursor to move to perform the next round of comparison, until the source field computer data and the target field computer data are read completely, and obtain the comparison result of each row; The comparison result of each row is used as the target comparison result and output.

[0014] Furthermore, the key management module's management method is as follows: 1) Input password parameters to initialize computer data. During the initialization process, a plaintext key is randomly generated; a salt value is randomly generated, and the password parameters and the salt value are processed using the SHA algorithm to generate a key encryption key. 2) The plaintext key and the key encryption key are encapsulated using the encapsulation algorithm to obtain the encrypted key and generate a verification value. The encrypted key and the verification value are stored in a preset file in the directory of the computer data.

[0015] Furthermore, the management method also includes: Start the computer data and obtain the encrypted key and the verification value from the preset file; Based on the encryption key, the encrypted key is decrypted using a decryption function to obtain the decryption key; The verification value is used to verify the unsealing key. If the verification is successful, the unsealing key is used to encrypt the data.

[0016] Furthermore, the preset file exists in binary form.

[0017] Furthermore, before initializing the computer data, the method further includes: inputting encryption algorithm parameters, and generating a plaintext key of the corresponding type based on the encryption algorithm parameters during the computer data initialization process.

[0018] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:

[0019] First, addressing the technical problems existing in the prior art and the difficulty in solving them, and closely combining the technical solution to be protected by this invention with the results and data from the research and development process, this paper provides a detailed and in-depth analysis of how the technical solution of this invention solves the technical problems, and the inventive technical effects brought about after solving the problems. The specific description is as follows: This invention employs different data verification processes for different data verification types in the source and target computer databases through a data verification module. By traversing the entire dataset, the accuracy of data verification is improved. Simultaneously, a key management module uses the SHA algorithm to process password parameters and salt values ​​to generate an encrypted key. An encapsulation module then uses an encapsulation algorithm to encapsulate the plaintext key with the encrypted key, resulting in an encrypted key. This effectively enhances the security of computer data keys. Furthermore, the management method of this application does not require binding to other external hardware devices, reducing the management cost of computer data keys.

[0020] second, This invention employs different data verification processes for different data verification types in the source and target computer databases through a data verification module. By traversing the entire dataset, the accuracy of data verification is improved. Simultaneously, a key management module uses the SHA algorithm to process password parameters and salt values ​​to generate an encrypted key. An encapsulation module then uses an encapsulation algorithm to encapsulate the plaintext key with the encrypted key, resulting in an encrypted key. This effectively enhances the security of computer data keys. Furthermore, the management method of this application does not require binding to other external hardware devices, reducing the management cost of computer data keys. Attached Figure Description

[0021] Figure 1 This is a flowchart of a data encryption algorithm for computers provided in an embodiment of the present invention.

[0022] Figure 2This is a block diagram of a data encryption system for computers provided in an embodiment of the present invention.

[0023] Figure 3 This is a flowchart of the data verification module verification method provided in an embodiment of the present invention.

[0024] Figure 4 This is a flowchart of the key management module management method provided in an embodiment of the present invention.

[0025] Figure 2 The module consists of: 1. Data acquisition module; 2. Main control module; 3. Key generation module; 4. Encryption module; 5. Data verification module; 6. Key management module; 7. Security evaluation module; and 8. Display module. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0027] This invention proposes improvements to existing computer data encryption systems to address the following problems: 1. Data acquisition complexity: Existing systems often require manual intervention during the data acquisition process, which is inefficient and prone to errors.

[0028] 2. Insecure key management: Traditional key generation and management mechanisms are at risk of leakage and cannot effectively guarantee key security.

[0029] 3. Low encryption efficiency: Existing encryption methods are inefficient when processing large amounts of data, affecting system performance.

[0030] 4. Incomplete data validation: Existing systems often lack comprehensive validation mechanisms, making it difficult to ensure data consistency and integrity.

[0031] 5. Insufficient security assessment: The existing system lacks an effective security assessment mechanism and cannot comprehensively evaluate the security of the data.

[0032] To address the aforementioned technical problems, this invention proposes a data encryption system for computers, comprising the following modules and methods: 1. Data Acquisition Module: Automated data collection from target computers based on customer needs reduces manual intervention and improves data collection efficiency and accuracy.

[0033] 2. Main control module: By connecting with various modules, data adjustment and control are performed to ensure the normal operation of all parts of the system and achieve efficient collaboration.

[0034] 3. Key generation module: Use the password parameter to initialize computer data and randomly generate a plaintext key.

[0035] The SHA algorithm is used to generate a key for encryption, and the key is then encrypted using a wrapping algorithm. This generates a checksum and the encrypted key, which are stored in a preset file to ensure key security.

[0036] 4. Encryption module: The encrypted key and verification value are obtained from a preset file. After verification, the decryption key is used to encrypt the data, thereby improving the efficiency and security of the encryption process.

[0037] 5. Data Validation Module: Build a computer database, initiate a verification task according to the verification instructions, determine the verification type, and perform a comprehensive verification of the data to ensure data consistency and integrity.

[0038] 6. Key Management Module: Responsible for the secure management of encryption keys and encrypted data, ensuring the long-term security of keys and data.

[0039] 7. Security Evaluation Module: Conduct security assessments on encryption keys and encrypted data, generate security evaluation reports, propose improvement suggestions, and comprehensively evaluate the security of the data.

[0040] 8. Display module: Based on the data transmitted by the main control module, the system displays information such as data acquisition, encryption, verification, and evaluation results, providing an intuitive user interface.

[0041] Significant technological advancements: 1. Improve data collection efficiency: By using automated data acquisition modules, manual intervention is reduced, the efficiency and accuracy of data acquisition are improved, and the needs of large-scale data processing are met.

[0042] 2. Enhance key security: The key generation module enhances key security through SHA and encapsulation algorithms, preventing key leakage and ensuring the reliability of data encryption.

[0043] 3. Optimize the encryption process: The encryption module improves the speed and efficiency of the encryption process through efficient key decryption and data encryption mechanisms, making it suitable for large-scale data encryption needs.

[0044] 4. Comprehensive data validation: The data verification module provides a comprehensive data consistency and integrity verification mechanism to ensure the accuracy of data during collection, transmission, and storage.

[0045] 5. Comprehensive safety assessment: The security evaluation module conducts a comprehensive security assessment of encrypted data, generates a detailed evaluation report, and proposes improvement suggestions to enhance the overall security of the system.

[0046] 6. User-friendly display interface: The display module provides an intuitive user interface that displays the results of each step of the operation in real time, improving the system's operability and user experience.

[0047] Through the data encryption system of this invention, enterprises can effectively protect sensitive data and prevent unauthorized access and leakage. The system has achieved significant progress in the following aspects: Automated data acquisition: Significantly reduces manual operations and improves data acquisition efficiency.

[0048] High-security key management: Advanced encryption algorithms ensure key security and reduce the risk of leakage.

[0049] Efficient data encryption: The optimized encryption process improves processing speed and is suitable for large-scale data processing.

[0050] Comprehensive data validation: Ensures data consistency and integrity throughout the entire process.

[0051] Detailed security assessment: Provides comprehensive security assessment reports to help businesses improve their data protection measures.

[0052] User-friendly interface: The intuitive interface improves the ease of use of the system and the user experience.

[0053] Through the above improvements, the data encryption system of this invention has achieved significant technological advancements in data acquisition, encryption, verification, management, and security evaluation, providing reliable protection for enterprise data security. Figure 1 As shown, the data encryption algorithm for computers provided by this invention includes the following steps: S101, collects computer data through the data acquisition module; S102, the main control module generates a computer data encryption key through the key generation module; S103, the encryption module uses a key to encrypt computer data; the data verification module verifies the computer data. S104 manages computer data encryption keys through the key management module; evaluates computer data security through the security evaluation module; S105 displays computer data, verification results, and evaluation results through a display module.

[0054] like Figure 2 As shown, the data encryption system for a computer provided in this embodiment of the invention includes: a data acquisition module 1, a main control module 2, a key generation module 3, an encryption module 4, a data verification module 5, a key management module 6, a security evaluation module 7, and a display module 8.

[0055] Data acquisition module 1, connected to main control module 2, is used to collect computer data from the target computer according to customer requirements. The main control module 2 is connected to the data acquisition module 1, key generation module 3, encryption module 4, data verification module 5, key management module 6, security evaluation module 7, and display module 8. It is used to adjust and control the data transmitted by each module and ensure the normal operation of each module. The key generation module 3 is connected to the main control module 2. It is used to initialize the computer data by inputting password parameters and randomly generate a plaintext key. Then, it uses the SHA algorithm to process the plaintext key to obtain the encrypted key. The plaintext key and the encrypted key are encapsulated by the encapsulation algorithm to obtain the encrypted key and generate a verification value. Both are stored in a preset file in the directory of the computer data. Encryption module 4, connected to main control module 2, is used to obtain the encrypted key and verification value generated by the key generation module from a preset file, and decrypt the encrypted key through the decryption function to obtain the decryption key. The decryption key is verified by the verification value. When the verification is successful, the decryption key is used to encrypt the computer data. The data verification module 5 is connected to the main control module 2. It is used to build a computer database, receive computer data verification instructions, start computer data verification tasks according to the computer verification instructions, determine the verification type according to the computer data verification tasks, and verify the computer data. The key management module 6 is connected to the main control module 2 and is used to manage the encryption keys and encrypted computer data generated by the key generation module and the encryption module. The security evaluation module 7, connected to the main control module 2, is used to evaluate the security of computer data based on the data security assessment of the target computer's encryption key and encrypted computer data. Display module 8, connected to main control module 2, is used to display information such as computer data, verification results, encryption results, and evaluation results based on data transmitted by the main control module.

[0056] like Figure 3 As shown, the data verification module 5 provided by this invention uses the following verification method: S201, construct a computer database, receive a computer data verification instruction, and start a computer data verification task according to the computer data verification instruction; execute the computer data verification task and create a connection relationship between the source computer database and the target computer database, generate a source connection and a target connection, and determine the verification type according to the computer data verification task; The verification types include: incremental computer data verification and full computer data verification; S202, if the verification type is incremental computer data verification, then the computer data write event of the target computer database is monitored based on a preset time interval. When a computer data write event is detected in the target computer database, the unique computer data identifier address corresponding to the computer data write event is obtained through a preset field name. The computer data writing event includes: the content of the written computer data and the corresponding writing time, the method of writing the computer data, and the dynamic state of the current page or the user's auxiliary operations during the writing process. S203, based on the unique identifier address of the computer data, the source connection, and the target connection, extract incremental verification computer data from the source computer database and the target computer database respectively to obtain source incremental verification computer data and target incremental verification computer data; perform computer data consistency verification on the source incremental verification computer data and the target incremental verification computer data to obtain incremental computer data verification results; If the verification type is full computer data verification, then obtain the pre-set table name, sorting, and sorting field corresponding to the source computer database and the target computer database; Based on the table name, the sorting, and the sorting field, query the full verification computer data in the source computer database and the target computer database respectively to obtain the source full verification computer data and the target full verification computer data; Based on the source full-data verification computer data and the target full-data verification computer data, a full-data verification is performed on the source computer database and the target computer database using a traversal method to obtain a full-data verification result. The step of performing full-data verification on the source computer database and the target computer database using a traversal method to obtain a full-data verification result includes: querying cursors in the source computer database and the target computer database respectively to obtain a source computer database cursor and a target computer database cursor; initializing the source computer database cursor and the target computer database cursor according to preset initialization conditions to obtain an initial source cursor and an initial target cursor; traversing and comparing the source full-data verification computer data and the target full-data verification computer data based on the initial source cursor and the initial target cursor to generate a full-data verification result; the step of traversing and comparing the source full-data verification computer data and the target full-data verification computer data based on the initial source cursor and the initial target cursor to generate a full-data verification result includes: Set the cursor state of the initial source cursor to the first source state and the cursor state of the initial target cursor to the first target state; move the initial source cursor and set its cursor state to the second source state, and move the initial target cursor and set its cursor state to the second target state; during the movement of the initial source cursor and the initial target cursor, iterate and compare the source field computer data in the source computer database and the target field computer data in the target computer database to obtain a target comparison result, wherein the target comparison result includes: the source field computer data is larger, equal, and the target field computer data is larger; generate a full computer data verification result based on the comparison result.

[0057] This invention provides a method for executing the computer data verification task and creating a connection between a source computer database and a target computer database, generating a source connection and a target connection, and determining the verification type according to the computer data verification task. The verification type includes: incremental computer data verification and full computer data verification, including: When performing the computer data verification task, the preset source computer database and the preset target computer database are invoked; Obtain source field computer data from the source computer database, and obtain target field computer data from the target computer database; Create a field-computer data correspondence between the source field computer data and the target field computer data; Create a mapping relationship between the source computer database and the target computer database; Based on the correspondence between the computer data in the fields and the mapping relationship, a connection relationship between the source computer database and the target computer database is generated, resulting in a source connection and a target connection; The verification type is determined based on the computer data verification task, wherein the verification type includes: incremental computer data verification and full computer data verification.

[0058] The present invention provides a method for comparing source field computer data in the source computer database and target field computer data in the target computer database during the movement of the initial source cursor and the initial target cursor, to obtain a target comparison result, including: Based on the initial source cursor, locate the first row of source computer data in the source field computer data of the source computer database, and based on the initial target cursor, locate the second row of target computer data in the target field computer data of the target computer database; The first row of source computer data and the second row of target computer data are compared to obtain the comparison result of the first row. Based on the comparison result of the first row and according to the preset cursor movement strategy, the initial source cursor and the initial target cursor are moved until the source field computer data and the target field computer data are traversed to obtain the target comparison result. The target comparison result includes: the source field computer data is larger, equal, and the target field computer data is larger.

[0059] The present invention provides a method for controlling the movement of an initial source cursor and an initial target cursor based on the comparison result of the first row and according to a preset cursor movement strategy, until the source field computer data and the target field computer data have been traversed to obtain a target comparison result, including: If the first row comparison result is that the source field computer data is larger, then record that the source computer database is larger and control the initial source cursor to move in a preset direction to obtain the second row of source computer data; The source computer data in the second row and the target computer data in the second row are compared to obtain the comparison result in the second row. Based on the comparison result of the second row, control the initial source cursor and the initial target cursor to move to perform the next round of comparison, until the source field computer data and the target field computer data are read completely, and obtain the comparison result of each row; The comparison result of each row is used as the target comparison result and output.

[0060] like Figure 4 As shown, the key management module 6 provided by this invention has the following management method: S301, Input password parameters to initialize computer data. During the initialization of computer data, a plaintext key is randomly generated; a salt value is randomly generated, and the password parameters and the salt value are processed using the SHA algorithm to generate a key encryption key. S302, the plaintext key and the key encryption key are encapsulated using the key encryption key through an encapsulation algorithm to obtain an encrypted key, and a verification value is generated. The encrypted key and the verification value are stored in a preset file in the directory of the computer data.

[0061] The management method provided by this invention also includes: Start the computer data and obtain the encrypted key and the verification value from the preset file; Based on the encryption key, the encrypted key is decrypted using a decryption function to obtain the decryption key; The verification value is used to verify the unsealing key. If the verification is successful, the unsealing key is used to encrypt the data.

[0062] The preset file provided by this invention exists in binary form.

[0063] Before initializing the computer data, the present invention further includes: inputting encryption algorithm parameters, and generating a plaintext key of the corresponding type based on the encryption algorithm parameters during the computer data initialization process.

[0064] This invention employs different data verification processes for different data verification types in the source and target computer databases through a data verification module. By traversing the entire dataset, the accuracy of data verification is improved. Simultaneously, a key management module uses the SHA algorithm to process password parameters and salt values ​​to generate an encrypted key. An encapsulation module then uses an encapsulation algorithm to encapsulate the plaintext key with the encrypted key, resulting in an encrypted key. This effectively enhances the security of computer data keys. Furthermore, the management method of this application does not require binding to other external hardware devices, reducing the management cost of computer data keys.

[0065] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0066] This invention employs different data verification processes for different data verification types in the source and target computer databases through a data verification module. By traversing the entire dataset, the accuracy of data verification is improved. Simultaneously, a key management module uses the SHA algorithm to process password parameters and salt values ​​to generate an encrypted key. An encapsulation module then uses an encapsulation algorithm to encapsulate the plaintext key with the encrypted key, resulting in an encrypted key. This effectively enhances the security of computer data keys. Furthermore, the management method of this application does not require binding to other external hardware devices, reducing the management cost of computer data keys.

[0067] Based on the existing data encryption system, a data preprocessing module, a dynamic key update module, and a log recording and analysis module have been added. The overall system architecture is as follows: 1) Data acquisition module: Data is collected from the target computer and transmitted to the data preprocessing module.

[0068] 2) Data preprocessing module: The raw data is preprocessed, including data cleaning, data formatting, and data standardization, to ensure the consistency and efficiency of subsequent encryption processing.

[0069] The preprocessed data is then transmitted to the main control module.

[0070] 3) Main control module: Connect the various modules, perform data adjustment and control, and ensure the system works normally.

[0071] It receives preprocessed data transmitted from the data preprocessing module and coordinates the work of the key generation module, encryption module, data verification module, key management module, security evaluation module, and display module.

[0072] Monitor the system's operational status in real time and coordinate the dynamic key update module and the log recording and analysis module.

[0073] 4) Key generation module: Generate and manage encryption keys, and use the SHA algorithm to process the generated encryption keys.

[0074] The encrypted key and verification value are stored in a preset file.

[0075] 5) Encryption module: Obtain the encrypted key and verification value from the preset file, and then use the decryption key to encrypt the data after verification.

[0076] The encrypted data is stored in a secure storage area.

[0077] 6) Data verification module: Perform consistency and integrity checks on the data to ensure its accuracy.

[0078] 7) Key Management Module: Manage encryption keys and encrypted data to ensure their security.

[0079] 8) Security Evaluation Module: Perform security assessments on encrypted data and keys, and generate security evaluation reports.

[0080] 9) Display module: Displays the results of various operations and evaluation reports, providing a user-friendly interface.

[0081] 10) Dynamic key update module: The encryption key is automatically updated based on preset time intervals or triggering conditions.

[0082] The updated key is distributed through a secure channel, and the old key is ensured to expire in a timely manner.

[0083] 11) Log recording and analysis module: Record all relevant operations of the system, including data acquisition, key generation, data encryption, and data verification.

[0084] It has log analysis capabilities to detect abnormal behavior and issue alerts to address potential security threats.

[0085] #### Specific implementation of the data preprocessing module.

[0086] 1) Data cleaning: Remove noise, errors, and duplicate data from the data.

[0087] Data cleaning is performed using Python's pandas library.

[0088] Python import pandas as pd def clean_data(data): # Remove duplicate data data = data.drop_duplicates() # Fill missing values data = data.fillna(method='ffill') return data 2) Data formatting: Convert the data into a uniform format for subsequent processing.

[0089] Python def format_data(data): # Convert data type data['date'] = pd.to_datetime(data['date']) data['value'] = data['value'].astype(float) return data 3) Data standardization: Data is processed according to certain standards.

[0090] Python from sklearn.preprocessing import StandardScaler def standardize_data(data): scaler = StandardScaler() data[['value']] = scaler.fit_transform(data[['value']]) return data 4) Synthetic preprocessing function: Python def preprocess_data(raw_data): data = clean_data(raw_data) data = format_data(data) data = standardize_data(data) return data #### Specific implementation of the dynamic key update module: 1) Key update logic: Update the key regularly or automatically based on trigger conditions.

[0091] Python import time from Crypto.Random import get_random_bytes class DynamicKeyUpdate: def __init__(self, interval): self.interval = interval self.current_key = self.generate_key() self.start_time = time.time() def generate_key(self): return get_random_bytes(32) def update_key(self): if time.time() - self.start_time > self.interval: self.current_key = self.generate_key() self.start_time = time.time() self.distribute_key() return True return False def distribute_key(self): # Distribute new keys via secure channel pass def invalidate_old_key(self): # Deactivate old keys pass 2) Key update process: Regularly check and update the key.

[0092] Python key_updater = DynamicKeyUpdate(interval=3600) # Update once per hour while True: if key_updater.update_key(): key_updater.invalidate_old_key() time.sleep(60) #### Specific implementation of the log recording and analysis module: 1) Log recording: Record all relevant operations performed by the system.

[0093] Python import logging logging.basicConfig(filename='system.log', level=logging.INFO) def log_operation(operation): logging.info(f'{time.strftime("%Y-%m-%d %H:%M:%S")}:{operation}') 2) Log analysis: Analyze log records to detect abnormal behavior.

[0094] Python def analyze_logs(): with open('system.log', 'r') as f: logs = f.readlines() # Simple anomaly detection example for log in logs: if 'error' in log.lower(): print(f'Alert: Abnormal behavior detected - {log}') ``` ### Comprehensive Implementation: All modules are integrated into the data encryption system and coordinated and managed through the main control module.

[0095] Python class DataEncryptionSystem: def __init__(self, password): self.password = password self.key_updater = DynamicKeyUpdate(interval=3600) self.log_file = 'system.log' def preprocess_and_encrypt_data(self, raw_data): data = preprocess_data(raw_data) log_operation('Data preprocessing complete') # Encrypted data logic self.key_updater.update_key() log_operation('Key update complete') # Other operations def monitor_system(self): while True: analyze_logs() time.sleep(300) # Analyze the log every 5 minutes ``` Through the above specific implementation scheme, the data encryption system of the present invention can effectively solve the problems of complex data acquisition, insecure key management, low encryption process efficiency, incomplete data verification and insufficient security evaluation, and significantly improve the security, reliability and operating efficiency of the system.

[0096] Implementation Case: Computer Data Encryption System for Protecting Sensitive Corporate Data # System Architecture: 1. Data Acquisition Module: Used to collect sensitive data from computers in various departments within an enterprise's internal network, including financial statements, customer information, and R&D data.

[0097] 2. Main control module: Responsible for regulating and controlling the operation of each module to ensure the smooth progress of the data encryption process.

[0098] 3. Key generation module: The computer data encryption system is initialized by entering the password parameters set by the administrator.

[0099] A plaintext key is randomly generated, and the SHA-256 algorithm is used to process the generated key to encrypt the key.

[0100] The plaintext key and the key encryption key are encapsulated using the AES-256 algorithm to generate the encrypted key and a verification value.

[0101] The encrypted key and verification value are stored in a configuration file in a preset directory of the enterprise file system.

[0102] 4. Encryption module: Retrieve the encrypted key and verification value from the configuration file in the preset directory.

[0103] The encrypted key is decrypted using the AES-256 algorithm to obtain the decryption key.

[0104] Verify the checksum to ensure the correctness of the decryption key.

[0105] Use the decryption key to encrypt sensitive data, and then store the encrypted data in a secure storage area.

[0106] 5. Data Validation Module: Build an enterprise database and receive and execute data verification commands.

[0107] Encrypted data is verified according to different verification tasks (such as file integrity verification and data consistency verification) to ensure the integrity of data during transmission and storage.

[0108] 6. Key Management Module: Responsible for managing all keys generated during the key generation and encryption process.

[0109] Ensure that the keys are stored securely and updated regularly.

[0110] 7. Security Evaluation Module: Assess the security of enterprise data based on encryption keys and encrypted data.

[0111] Provide a security assessment report and recommended security improvement measures.

[0112] 8. Display module: It provides a user interface to display the results of various operations, including data collection status, encryption process, verification results, and security evaluation report.

[0113] # Detailed operation steps: 1. Data Acquisition: The system administrator configures the data acquisition module to collect sensitive data from the computers of various departments according to the company's needs.

[0114] 2. Key generation: The administrator enters the password parameters, and the key generation module starts working.

[0115] Generate a random plaintext key, and use the SHA-256 algorithm to generate a key for encryption.

[0116] The plaintext key and the key encryption key are encapsulated using the AES-256 algorithm to generate the encrypted key and the verification value.

[0117] The encrypted key and verification value are stored in a preset directory in the enterprise file system.

[0118] 3. Data encryption: The encryption module retrieves the encrypted key and verification value from a preset directory.

[0119] The encrypted key is decrypted using the AES-256 algorithm to obtain the decryption key.

[0120] Verify the checksum to ensure the unblocking key is correct.

[0121] The collected sensitive data is encrypted using the decryption key, and the encrypted data is stored in a secure storage area.

[0122] 4. Data validation: The data verification module receives and executes data verification tasks.

[0123] Perform integrity and consistency checks on encrypted data to ensure data integrity during encryption and storage.

[0124] 5. Safety assessment: The security evaluation module assesses the security of encrypted data and encryption keys.

[0125] Generate a security assessment report and provide recommendations for improving data security.

[0126] 6. Results show: The display module presents the operation results, verification results, and security evaluation reports of each step to the system administrator.

[0127] By following the steps outlined above, enterprises can effectively protect their sensitive internal data, preventing unauthorized access and leakage. This system automates data collection, encryption, verification, management, and security evaluation, simplifying enterprise data security management processes and significantly improving data security.

[0128] Specific implementation example code.

[0129] Python import hashlib import os import base64 from Crypto.Cipher import AES from Crypto.Random import get_random_bytes class DataEncryptionSystem: def __init__(self, password): self.password = password self.key = self.generate_key(password) self.encrypted_key_file = "encrypted_key.txt" self.encrypted_data_file = "encrypted_data.txt" def generate_key(self, password): sha = hashlib.sha256() sha.update(password.encode('utf-8')) return sha.digest() def encrypt_key(self): plaintext_key = get_random_bytes(32) cipher = AES.new(self.key, AES.MODE_EAX) ciphertext, tag = cipher.encrypt_and_digest(plaintext_key) with open(self.encrypted_key_file, 'wb') as f: [f.write(x) for x in (cipher.nonce, tag, ciphertext)] return plaintext_key def decrypt_key(self): with open(self.encrypted_key_file, 'rb') as f: nonce, tag, ciphertext = [f.read(x) for x in (16, 16, -1)] cipher = AES.new(self.key, AES.MODE_EAX, nonce=nonce) plaintext_key = cipher.decrypt_and_verify(ciphertext, tag) return plaintext_key def encrypt_data(self, data): plaintext_key = self.decrypt_key() cipher = AES.new(plaintext_key, AES.MODE_EAX) ciphertext, tag = cipher.encrypt_and_digest(data.encode('utf-8')) with open(self.encrypted_data_file, 'wb') as f: [f.write(x) for x in (cipher.nonce, tag, ciphertext)] def decrypt_data(self): plaintext_key = self.decrypt_key() with open(self.encrypted_data_file, 'rb') as f: nonce, tag, ciphertext = [f.read(x) for x in (16, 16, -1)] cipher = AES.new(plaintext_key, AES.MODE_EAX, nonce=nonce) data = cipher.decrypt_and_verify(ciphertext, tag) return data.decode('utf-8') # Example usage password = "securepassword" data_system = DataEncryptionSystem(password) # Generate and encrypt the key data_system.encrypt_key() # Encrypted data data_system.encrypt_data("This is a secret message.") # Decrypting the data decrypted_data = data_system.decrypt_data() print("Decrypted data:", decrypted_data) Through the above cases and sample code, we can see how this data encryption system protects sensitive data and ensures data security and integrity in practical applications.

[0130] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A data encryption system for computers, characterized in that, include: The data acquisition module, connected to the main control module, is used to collect computer data from the target computer according to customer requirements. The main control module, connected to the data acquisition module, key generation module, encryption module, data verification module, key management module, security evaluation module, and display module, is used to adjust and control based on the data transmitted by each module and to ensure the normal operation of each module. The key generation module, connected to the main control module, is used to initialize computer data by inputting password parameters and randomly generate a plaintext key. The plaintext key is then processed using the SHA algorithm to obtain the encrypted key. The plaintext key and the encrypted key are encapsulated using an encapsulation algorithm to obtain the encrypted key and generate a verification value. Both are stored in a preset file in the computer data directory. The encryption module, connected to the main control module, is used to obtain the encrypted key and verification value generated by the key generation module from a preset file, and decrypt the encrypted key through the decryption function to obtain the decryption key. The decryption key is verified using the verification value. When the verification is successful, the decryption key is used to encrypt the computer data. The data verification module, connected to the main control module, is used to build a computer database, receive computer data verification instructions, start computer data verification tasks according to the computer data verification instructions, determine the verification type according to the computer data verification tasks, and verify the computer data. The key management module, connected to the main control module, is used to manage the encryption keys and encrypted computer data generated by the key generation module and the encryption module. The security evaluation module, connected to the main control module, is used to perform a security assessment based on the target computer's encryption key and encrypted computer data, and to evaluate the security of the computer data. The display module, connected to the main control module, is used to display computer data, verification results, encryption results, and evaluation results based on the data transmitted by the main control module.

2. The data encryption system according to claim 1, characterized in that, Also includes: The data preprocessing module, connected to the main control module, is used to preprocess the raw data collected from the target computer, including but not limited to data cleaning, data formatting, and data standardization, to ensure the consistency and efficiency of subsequent encryption processing. The dynamic key update module, connected to the main control module, automatically updates the encryption key according to preset time intervals or trigger conditions, thereby improving the system's security and protection capabilities. The updated key is distributed to relevant modules through a secure channel, ensuring the timely invalidation of the old key. The logging and analysis module, connected to the main control module, records all relevant operations during system operation, including but not limited to data acquisition, key generation, data encryption, and data verification. This module also has log analysis capabilities, enabling it to detect abnormal behavior and issue alerts for timely responses to potential security threats.

3. The data encryption system according to claim 1, characterized in that, The key generation module generates the encrypted key through the following steps: Enter the password parameters to initialize the computer data; Randomly generate plaintext keys; The plaintext key is processed using the SHA algorithm to obtain the key-encrypted key. The plaintext key and the key encryption key are encapsulated using an encapsulation algorithm to obtain the encrypted key. Generate a verification value and store the encrypted key and verification value in a preset file in the computer's data directory; The encryption module encrypts computer data through the following steps: Retrieve the encrypted key and verification value generated by the key generation module from the preset file; The encrypted key is decrypted using the decryption function to obtain the decryption key; The decryption key is verified using a checksum. If the verification passes, the computer data is encrypted using the decryption key.

4. The data encryption system for a computer as described in claim 1, characterized in that, The data verification module uses the following verification method: (1) Construct a computer database, receive a computer data verification instruction, and start a computer data verification task according to the computer data verification instruction; execute the computer data verification task and create a connection relationship between the source computer database and the target computer database, generate a source connection and a target connection, and determine the verification type according to the computer data verification task; The verification types include: incremental computer data verification and full computer data verification; (2) If the verification type is incremental computer data verification, the computer data write event of the target computer database is monitored based on a preset time interval. When a computer data write event is detected in the target computer database, the unique computer data identifier address corresponding to the computer data write event is obtained through a preset field name. The computer data writing event includes: the content of the written computer data and the corresponding writing time, the method of writing the computer data, and the dynamic state of the current page or the user's auxiliary operations during the writing process. (3) Extract incremental verification computer data from the source computer database and the target computer database according to the unique identifier address of the computer data, the source connection and the target connection respectively, to obtain source incremental verification computer data and target incremental verification computer data; perform computer data consistency verification on the source incremental verification computer data and the target incremental verification computer data to obtain incremental computer data verification results; If the verification type is full computer data verification, then obtain the pre-set table name, sorting, and sorting field corresponding to the source computer database and the target computer database; Based on the table name, the sorting, and the sorting field, query the full verification computer data in the source computer database and the target computer database respectively to obtain the source full verification computer data and the target full verification computer data; Based on the source full-data verification computer data and the target full-data verification computer data, a full-data verification is performed on the source computer database and the target computer database using a traversal method to obtain a full-data verification result. The step of performing full-data verification on the source computer database and the target computer database using a traversal method to obtain a full-data verification result includes: querying cursors in the source computer database and the target computer database respectively to obtain a source computer database cursor and a target computer database cursor; initializing the source computer database cursor and the target computer database cursor according to preset initialization conditions to obtain an initial source cursor and an initial target cursor; traversing and comparing the source full-data verification computer data and the target full-data verification computer data based on the initial source cursor and the initial target cursor to generate a full-data verification result; the step of traversing and comparing the source full-data verification computer data and the target full-data verification computer data based on the initial source cursor and the initial target cursor to generate a full-data verification result includes: Set the cursor state of the initial source cursor to the first source state and the cursor state of the initial target cursor to the first target state; move the initial source cursor and set its cursor state to the second source state, and move the initial target cursor and set its cursor state to the second target state; during the movement of the initial source cursor and the initial target cursor, traverse and compare the source field computer data in the source computer database and the target field computer data in the target computer database to obtain a target comparison result, wherein the target comparison result includes: the source field computer data is larger, and the target field computer data is larger; generate a full computer data verification result based on the comparison result.

5. The data encryption system for a computer as described in claim 4, characterized in that, The process involves executing the computer data verification task and creating a connection between the source computer database and the target computer database, generating a source connection and a target connection, and determining the verification type based on the computer data verification task. The verification types include incremental computer data verification and full computer data verification. When performing the computer data verification task, the preset source computer database and the preset target computer database are invoked; Obtain source field computer data from the source computer database, and obtain target field computer data from the target computer database; Create a field-computer data correspondence between the source field computer data and the target field computer data; Create a mapping relationship between the source computer database and the target computer database; Based on the correspondence between the computer data in the fields and the mapping relationship, a connection relationship between the source computer database and the target computer database is generated, resulting in a source connection and a target connection; The verification type is determined based on the computer data verification task, wherein the verification type includes: incremental computer data verification and full computer data verification.

6. The data encryption system for a computer as described in claim 4, characterized in that, During the movement of the initial source cursor and the initial target cursor, the source field computer data in the source computer database and the target field computer data in the target computer database are traversed and compared to obtain the target comparison result, including: Based on the initial source cursor, locate the first row of source computer data in the source field computer data of the source computer database, and based on the initial target cursor, locate the second row of target computer data in the target field computer data of the target computer database; The first row of source computer data and the second row of target computer data are compared to obtain the comparison result of the first row. Based on the comparison result of the first row and according to the preset cursor movement strategy, the initial source cursor and the initial target cursor are moved until the source field computer data and the target field computer data are traversed to obtain the target comparison result. The target comparison result includes: the source field computer data is larger, equal, and the target field computer data is larger.

7. The data encryption system for a computer as described in claim 4, characterized in that, The step of controlling the initial source cursor and the initial target cursor to move according to the first row comparison result and a preset cursor movement strategy until the source field computer data and the target field computer data have been traversed to obtain the target comparison result includes: If the first row comparison result is that the source field computer data is larger, then record that the source computer database is larger and control the initial source cursor to move in a preset direction to obtain the second row of source computer data; The source computer data in the second row and the target computer data in the second row are compared to obtain the comparison result in the second row. Based on the comparison result of the second row, control the initial source cursor and the initial target cursor to move to perform the next round of comparison, until the source field computer data and the target field computer data are read completely, and obtain the comparison result of each row; The comparison result of each row is used as the target comparison result and output.

8. The data encryption system for a computer as described in claim 1, characterized in that, The key management module uses the following management method: 1) Input password parameters to initialize computer data. During the initialization process, a plaintext key is randomly generated; a salt value is randomly generated, and the password parameters and the salt value are processed using the SHA algorithm to generate a key encryption key. 2) The plaintext key and the key encryption key are encapsulated using the encapsulation algorithm to obtain the encrypted key and generate a verification value. The encrypted key and the verification value are stored in a preset file in the directory of the computer data.

9. The data encryption system for a computer as described in claim 8, characterized in that, The management method also includes: Start the computer data and obtain the encrypted key and the verification value from the preset file; Based on the encryption key, the encrypted key is decrypted using a decryption function to obtain the decryption key; The verification value is used to verify the unsealing key. If the verification is successful, the unsealing key is used to encrypt the data.

10. A method for encrypting data in a computer that implements the data encryption system for a computer as described in any one of claims 1 to 9, characterized in that, The data encryption algorithm for computers includes the following steps: Step 1: Collect computer data using the data acquisition module; Step two: The main control module generates a computer data encryption key through the key generation module; Step 3: Encrypt the computer data using the key via the encryption module; verify the computer data via the data verification module. Step four: Manage the encryption keys for computer data through the key management module; evaluate the security of computer data through the security evaluation module. Step 5: Display the computer data, verification results, and evaluation results through the display module.