Data change method and device, computer equipment, medium and program product

By performing two checksums on the changed data, dividing new sectors without resetting the read-only area, the problem of low data security is solved, data security and integrity are achieved, and storage efficiency and data management flexibility are improved.

CN119513935AActive Publication Date: 2025-02-25北京长擎量子技术有限公司
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411566300.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-25
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

In the prior art, data security is low, which can easily lead to important data leakage and cause property losses to manufacturers.

Method used

By performing two verifications on the changed data (legality checksum integrity checksum) to generate new mirror files, and without resetting the read-only area, new sectors are divided into the remaining space of the read-only area, and each new mirror file is burned to achieve data change.

Benefits of technology

Ensure the security and integrity of data, prevent unauthorized tampering and data corruption, improve storage efficiency, provide a flexible data management method, and reduce the risk of error introduction by implementers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513935A_ABST
    Figure CN119513935A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a data change method and device, computer equipment, a medium and a program product. The method comprises the steps of performing first verification on to-be-changed data; the to-be-changed data is a programmed mirror image file; after the first verification of the to-be-changed data is passed, dividing the to-be-changed data according to a preset data type to obtain at least one new data fragment; each newly-added data fragment corresponds to one preset data type; performing second verification on each newly added data segment; after the second verification of each newly-added data segment is passed, generating a newly-added mirror image file, and determining whether to reset the read-only area; and when the read-only area is not reset, dividing a new sector in the residual space of the read-only area, and programming the newly added mirror image file in the new sector to realize data change. Based on the technical scheme of the invention, the protected data can be effectively prevented from being modified in a manner of disassembling the equipment, mounting a disk and reading the data, and the security of the data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data changing method, device, computer equipment, medium and program product. Background Art

[0002] Large-scale project delivery is often delivered together with the software and the hardware platform on which it runs, forming a simple and easy-to-use chassis box with a relatively closed operation entrance. This allows all user operations to be within a controllable range, forming a stable human-computer interaction function boundary. At the same time, only the debugging interface for developers is reserved for the system inside the device for maintenance and upgrade.

[0003] In the delivered equipment, the system integrated in the chassis is generally provided with upgrade functions according to the service life provided. However, the protection of core data and applications is generally achieved by closing the access rights of the built-in operating system. If the other party forcibly dismantles the machine and removes the disk for mounting and reading, it will easily lead to the leakage of important data and cause property losses to the manufacturer.

[0004] Therefore, there is an urgent need for a data change method that can reduce data risks and improve data security. Summary of the invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problem of low data security in related technologies.

[0006] In order to solve the above technical problem, the present invention provides a data modification method, which includes:

[0007] Performing a first check on the data to be changed; the data to be changed is a burned image file; the first check includes a legality check;

[0008] After the first verification of the data to be changed passes, the data to be changed is divided according to the preset data type to obtain at least one newly added data segment; each of the newly added data segments corresponds to a preset data type;

[0009] Performing a second check on each newly added data segment; the second check includes an integrity check;

[0010] After the second verification of each newly added data fragment passes, a new mirror file is generated to determine whether to reset the read-only area;

[0011] When the read-only area is not reset, a new sector is divided in the remaining space of the read-only area, and each newly added image file is burned in the new sector to realize data change.

[0012] In an optional implementation, before performing the first verification on the data to be changed, the method further includes:

[0013] Downloading an upgrade package, and transferring the downloaded upgrade package to a safe zone; the safe zone is provided with a firmware upgrade maintenance module; the upgrade package is processed and analyzed by the firmware upgrade module to determine the data to be changed;

[0014] Or, according to the partition where the data to be changed is currently located, call the data solidification module of the corresponding partition, determine the data to be changed through the data solidification module; transfer the data to be changed determined by the data solidification module to the safe area; wherein the data to be changed in the safe area is used for the first verification.

[0015] In an optional implementation, the preset data type includes a system kernel type, a business data type, and an application software type, and the second verification of each newly added data segment includes:

[0016] Performing a second check on the newly added data fragments whose preset data type is a system kernel type or a business data type;

[0017] Determine whether the newly added data segment whose preset data type is application software type is an external program;

[0018] When the newly added data segment whose preset data type is the application software type is not an external program, a second verification is performed on the newly added data segment whose preset data type is the application software type;

[0019] When the newly added data segment whose preset data type is an application software type is an external program, performing a running condition integrity check on the newly added data segment whose preset data type is an application software type;

[0020] After the running condition integrity check is passed, a second check is performed on the newly added data segment whose preset data type is the application software type.

[0021] In an optional implementation, the method further includes: when there is a new data segment that fails the second verification among all the new data segments, entering a preset exception handling process and outputting exception information.

[0022] In an optional implementation manner, the determining whether to reset the read-only area includes:

[0023] When it is determined to reset the read-only area, a backup image file corresponding to the image file that has not been changed in the read-only area is obtained, the read-only area is formatted, and a first burn is performed in the formatted read-only area; the first burn is used to burn the backup image file; wherein a new sector is divided in the remaining space after the first burn in the formatted read-only area;

[0024] A second programming is performed in the new sector; the second programming is used to program each newly added data segment.

[0025] In an optional implementation, after the new sector is burned with each newly added image file, the method further includes: changing the device mount configuration and the initialization script.

[0026] In a second aspect, the present invention provides a data changing device, the data changing device comprising:

[0027] A first processing module is used to perform a first check on the data to be changed; the data to be changed is a burned image file; the first check includes a legality check;

[0028] A second processing module is used to divide the data to be changed according to preset data types after the first verification of the data to be changed passes, so as to obtain at least one newly added data segment; each of the newly added data segments corresponds to a preset data type;

[0029] A third processing module, configured to perform a second check on each newly added data segment; the second check includes an integrity check;

[0030] A fourth processing module, configured to generate a new mirror file and determine whether to reset the read-only area after each new data segment passes the second verification;

[0031] The fifth processing module is used to divide a new sector from the remaining space of the read-only area when the read-only area is not reset, and burn each newly added image file in the new sector to realize data change.

[0032] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data changing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0033] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a single computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data changing method of the first aspect or any corresponding embodiment thereof.

[0034] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data changing method of the first aspect or any corresponding embodiment thereof.

[0035] The technical solution provided by the present invention has the following technical effects: through two checks (legitimacy check and integrity check), the security and integrity of data are ensured, and unauthorized tampering and data damage are prevented. The integrity check ensures the consistency of data during transmission and storage, and prevents data loss and damage. By presetting data types and adding new data fragments, data can be managed and organized more effectively, which is convenient for data maintenance and upgrading. When the read-only area is not reset, the remaining space is used to divide new sectors, which optimizes the use of storage space and improves storage efficiency. Data changes are allowed without resetting the read-only area, providing a flexible data management method. By dividing new sectors and burning new data fragments, it can be expanded as needed to adapt to different storage requirements. The technical solution of the present invention limits the read-only permissions of key data and programs from the hardware level, which can effectively prevent tampering and damage by malicious programs. In normal use, there is no need to control read and write permissions through the restrictions of the kernel or other applications, which improves the efficiency of software operation and reduces computing resource consumption. It can effectively prevent the device from being disassembled, mounted on a disk, and read data to modify protected data, ensuring the integrity of the current component operation. During the upgrade process, human operations are separated, core steps are encapsulated and performed atomically, reducing the risk of errors introduced by implementation personnel and the complexity of problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 is a schematic diagram of a device data security protection mechanism framework according to an embodiment of the present invention;

[0038] Figure 2 is a flow chart of a data changing method according to an embodiment of the present invention;

[0039] Figure 3 is a schematic diagram of the overall flow of the data modification method according to an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of the structure of a data changing device according to an embodiment of the present invention;

[0041] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0043] In the computer field, intellectual property protection and anti-tampering protection of commercial software are important measures for manufacturers to form a closed business loop while providing software services to users.

[0044] Large-scale project delivery is often delivered together with the software and the hardware platform on which it runs, forming a simple and easy-to-use chassis box with relatively closed operation entrances. This allows all user operations to be within a controllable range, forming a stable human-computer interaction function boundary. At the same time, only the debugging interface for developers is reserved for the system inside the device for maintenance and upgrade use.

[0045] In the delivered equipment, the system integrated in the chassis is generally provided with upgrade functions according to the service life provided. However, the protection of core data and applications is generally achieved by closing the access rights of the built-in operating system. If the other party forcibly dismantles the machine and removes the disk to read the data by mounting and reading, there is a chance that important business data will be leaked, and the data security is poor.

[0046] In the relevant technologies, there are generally the following ways to protect device data security and corresponding upgrade and maintenance methods:

[0047] (1) All are achieved through the multi-user permission control of the operating system.

[0048] This method is the most common, because the operating system itself has a user permission system. By presetting user permissions based on the operating needs of its own equipment and providing customers with specified ordinary user permissions at the time of delivery, the user's access scope and operating boundaries to the built-in operating system can be controlled.

[0049] Correspondingly, when upgrading and maintenance are required, another dedicated user account can be used to obtain higher permissions to modify core data.

[0050] The disadvantage of this approach is that it may lead to loss of account information and uncontrollable boundaries of human operations, especially changes in maintenance personnel and products, which will lead to increased user account management costs and risks, and cause data security risks from social engineering.

[0051] (2) This is achieved through user authority control of the operating system and secondary development of the operating system’s interactive interface.

[0052] This method is a supplement to the single user permission system method. What is also delivered to the user is a device equipped with a customized operating system. Not only is the user's access rights configured, but the operation UI is also customized and developed separately, which blocks the general operating system login and access interaction interface, allowing users to interact in a specific UI interface.

[0053] Similarly, a separate operation UI will be developed for maintenance personnel, and a separate interaction boundary will be provided for maintenance personnel, which will only be used for upgrades and maintenance.

[0054] This method is common in devices with strong business and functional orientation, such as firewalls and switches. Due to its professional industry usage scenarios and relatively fixed business operation boundaries, developers can sort out the operation logic and develop UI interfaces based on the operation scenarios that do not change much. However, the disadvantages are obvious, such as low versatility, high development costs, and short update cycles. It is only suitable for large-scale manufacturers in specific industries.

[0055] (3) It is implemented by combining user permission control with permission verification components.

[0056] This method adds a permission verification component to a single method of controlling user permissions to avoid the implementation risks of key links of permission control introduced by operators' social engineering.

[0057] A universal standard device is provided at the time of delivery, and a firmware device is provided as a token. Different tokens are used to activate the user's corresponding business function usage rights and upgrade the maintenance personnel's operation rights.

[0058] However, this method is essentially still a user permission system configuration method at the software level, and has no control over the specific operations of various personnel and the protection of sensitive data.

[0059] The above protection mechanisms and corresponding upgrade and maintenance methods are all at the software level. If the device is directly disassembled, the disk is removed and mounted on another host to read data, the device information will be leaked, tampered with, and malicious programs will be implanted. When the device is put back into use, there will be security risks.

[0060] The technical solution of the present invention is as follows Figure 1Under the framework of the "device data security protection mechanism" shown in the figure, a technical solution for firmware upgrade and maintenance is implemented. The technical framework of the technical solution of the present invention is: the core data is stored in the form of CDROM (Compact Disc Read-Only Memory), and the read-only permission is controlled in hardware to prevent tampering. At the same time, the IOS and image mirror components are built-in for preparation and burning, and the core file area and program firmware are updated and maintained in software.

[0061] like Figure 1 It can be seen that the upgrade and maintenance implementation of the present invention is based on different partitions of the hardware disk. The storage disk is divided into four types in a hardware customized manner: a common area, a hidden area, a safe area, and a CDROM read-only area.

[0062] The CDROM read-only area is an area for storing data, programs, system kernels, etc. that need to be solidified to prevent tampering. This area is not a partition, but is implemented by configuring multiple CDROMs according to the needs of the usage scenario. I will not go into details here. For upgrade and maintenance, the principle is to separate the data that needs to be solidified to the CDROM read-only area in each partition into different image directories according to organizational needs, and then prepare different image files and burn them to the CDROM read-only area.

[0063] To this end, embodiments of the present invention provide a data change method, apparatus, computer equipment, medium, and program product to solve the above-mentioned problems.

[0064] According to an embodiment of the present invention, a data change method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0065] Figure 2 It is a flowchart of a data changing method according to an embodiment of the present invention.

[0066] like Figure 2 As shown, an embodiment of the present invention provides a data change method, which is applied to an operating system of a device. The data change method includes:

[0067] S101: Perform the first verification on the data to be changed.

[0068] In this embodiment, the data to be changed is the image file after burning. The first check includes a legality check.

[0069] In this embodiment, before the first verification of the data to be changed is performed in S101, the data change method further includes:

[0070] Download the upgrade package and transfer it to the safe zone. The safe zone is equipped with a firmware upgrade maintenance module. The firmware upgrade module processes and analyzes the upgrade package to determine the data to be changed.

[0071] Or, according to the partition where the data to be changed is currently located, the data hardening module of the corresponding partition is called, and the data to be changed is determined by the data hardening module. The data to be changed determined by the data hardening module is transferred to the safe zone.

[0072] In this embodiment, the data to be changed in the security zone is used for the first verification.

[0073] The above embodiment illustrates the data change solution of triggering S101 - S105 when the above two scenarios exist.

[0074] In this embodiment, when a firmware upgrade request is obtained, the implementation personnel generally download the upgrade package, perform the upgrade operation, and run the upgrade script. The upgrade package contains all new code and data required for the system firmware upgrade or change. These contents can be updates to the driver, operating system kernel, system tools, or other system components. Execute the upgrade operation: By running the script or program in the upgrade package, the system can automatically execute the upgrade process, including processing and analyzing the upgrade package through the firmware upgrade module in the security zone to determine the data to be changed, as well as the technical solutions of S101-S105, and also including installing new code, configuring system settings, updating system components, etc. This embodiment illustrates one of the scenarios that triggers a change in solidified data, that is, how to update the upgraded component that happens to be solidified in the system.

[0075] In this embodiment, or during use, when it is necessary to solidify and protect the key information, the data solidification module of the corresponding partition will be called according to the partition where the data to be changed, that is, the key information is currently located, and the data files to be solidified will be sorted to obtain the data to be changed. This embodiment illustrates another scenario that triggers the update of solidified data, that is, some data of the user is not expected to be tampered with, and the data may be broken by simply protecting it with the write permission in the operating system in a privilege escalation manner, so the technical solution of the present invention can be directly solidified to prevent tampering.

[0076] In this embodiment, the storage disk is pre-divided into a common area, a hidden area, a secure area and a read-only area. The hidden area and the secure area are equipped with built-in file reading and writing modules. Except for the common area, the data reading and writing of the hidden area and the secure area are completed by the file reading and writing module. The data to be changed corresponding to each partition is transferred to the secure area. The corresponding API interface can be called through the upgrade script of the upgrade package to transfer the upgrade package to the secure area for processing.

[0077] This embodiment introduces the processing before data solidification, which is performed in the secure zone. Therefore, an interface is developed in the secure zone to transfer the data to be changed in the hidden zone and the common zone to the secure zone in advance for pre-processing. At the same time, the upgrade package will also call the interface (i.e., API) to transfer the upgrade package to the secure zone through the interface.

[0078] In this embodiment, the security zone has built-in components required for upgrading and fixing, which are functionally called firmware upgrade modules, and uniformly process all data to be changed that need to be fixed to the read-only zone (for example, the optical disk zone). The fixing process of the data to be changed is executed by the firmware upgrade module.

[0079] In this embodiment, the first check is a legality check. The data to be changed in the security zone is checked for legality, specifically malware is checked to prevent the intrusion of malware. Through scanning, the intrusion of malware such as viruses and Trojans can be identified and prevented, protecting the system and data from damage. When the data is changed, upgraded and solidified, anti-virus and Trojan scanning is performed. Its main purpose is to ensure that no malicious files are introduced, to prevent sensitive data from being stolen or destroyed by malware, and to ensure the confidentiality, integrity and availability of data.

[0080] S102: After the first verification of the data to be changed passes, the data to be changed is divided according to preset data types to obtain at least one newly added data segment.

[0081] In this embodiment, each newly added data fragment corresponds to a preset data type. The preset data types may include system kernel types, business data types, and application software types. Corresponding data kernel image files, business data image files, and application software image files. System kernel data image files usually include core components of the operating system, such as kernel files, system libraries, boot loaders, etc. They are the basis for the operation of the operating system. Business data image files usually contain business logic and data required for the operation of the application, such as configuration files, user data, transaction records, etc. These files support the business operations of the application. The application software image file includes the application itself and all its dependencies, which may include executable files, resource files, library files, etc. These files enable the application to be installed and run independently of the operating system. In this embodiment, when the first check of the data to be changed fails, the preset exception handling process is entered and the exception information is output.

[0082] In this embodiment, the preset exception handling process refers to a series of measures that the system will take to handle these abnormal data when the legality check fails during the data change upgrade and solidification process. The preset exception handling process usually includes the following steps:

[0083] Abnormal information recording: Once an abnormality is detected, the abnormal information is recorded. The abnormal information usually includes key information such as the type of abnormality, location and time of occurrence. This information is helpful for subsequent problem diagnosis and repair.

[0084] Logging: Exception information will be written to the system log. The log records the specific details of the exception, including timestamp, error code, error message, etc., which is crucial for subsequent analysis and debugging.

[0085] Exception notification: In some cases, relevant personnel or teams may be notified through monitoring and alarm mechanisms so that the exception can be handled as quickly as possible.

[0086] Exception handling: Depending on the type and severity of the exception, different handling measures may be taken. This may include deleting the abnormal data, correcting the error, replacing the data, or rolling back to the last stable state.

[0087] Data correction: For data inconsistencies caused by abnormal operations, data correction is required to ensure the final consistency of the data. This may involve locking mechanisms to handle concurrency issues and ensure the correctness of the correction operation.

[0088] Subsequent analysis: After handling the exception, subsequent analysis may be required to determine the cause of the exception and take measures to prevent future exceptions.

[0089] Exception information refers to information such as the type of exception, the location and time of the exception. It can be divided into defined exception information and undefined exception information. Defined exception information means that the software system or program has explained the type of exception and the handling method for some common exceptions. Undefined exception information means that the exception is not within the expected range of the system or program. This type of exception information generally only explains the location where the exception occurred, and there is no exception handling method. This type of information can also be called vulnerability information. The exception log is part of the system log, which records detailed information when the exception occurs, including timestamp, error level, error message, etc. These logs are very important for post-analysis, problem location and system maintenance.

[0090] S103: Perform a second check on each newly added data segment.

[0091] In this embodiment, the second check includes an integrity check, specifically a static integrity check. Specifically, each newly added data segment can be checked for the second time using a check value. The check value can specifically be a hash value generated before the upgrade package or data solidification module is transmitted. The integrity check can ensure that the newly added data segment can normally perform its own business functions.

[0092] In this embodiment, when the preset data types include system kernel type, business data type and application software type, a second check is performed on each newly added data segment, specifically including:

[0093] A second check is performed on the newly added data fragments whose preset data type is the system kernel type or the business data type, that is, the integrity check is directly performed on the system kernel image file or the business data image file.

[0094] However, for a newly added data segment whose preset data type is an application software type, it is necessary to determine whether the newly added data segment whose preset data type is an application software type is an external program.

[0095] When the newly added data segment of the preset data type is the application software type is not an external program, the newly added data segment of the preset data type is the application software type is checked for the second time. That is, the newly added data segment of the preset data type is the application software type that is not an external program can be directly checked for integrity.

[0096] However, when the newly added data segment whose preset data type is the application software type is an external program, it is necessary to perform a running condition integrity check on the newly added data segment whose preset data type is the application software type.

[0097] Only after the running condition integrity check is passed, the newly added data fragments whose preset data type is the application software type will be subject to a second check. In other words, the newly added data fragments whose preset data type is the application software type of the external program cannot be directly checked for integrity. The running condition integrity check must be performed first, and only after the running condition integrity check is passed will the newly added data fragments whose preset data type is the application software type be subject to a second check. The second check actually refers to the static integrity check of ordinary image files after sorting and division, and the integrity check of the dynamic running environment of application image files. This is the second check relative to the first legitimacy check. Through two checks, the legitimacy and integrity of the data are ensured to prevent unauthorized data tampering.

[0098] In this embodiment, when the running condition integrity check fails or there is a new data segment that fails the second check among all the new data segments, the preset exception handling process is entered and the exception information is output. By using the preset exception handling process, it is ensured that the abnormal situation in the data change process is properly handled to prevent data damage or loss. For details, refer to the technical solution when the first check fails, which will not be repeated here.

[0099] In this embodiment, considering that the image file after burning is located in different partitions, it is best to store the independent function execution components (independent function execution components: refers to the modules with independent functions in the system, such as the system kernel (corresponding to the preset data type of the system kernel type newly added data fragment), the driver (corresponding to the preset data type of the business data type newly added data fragment), the application (corresponding to the preset data type of the application software type newly added data fragment), etc.) in the same read-only area (for example, the optical disk area) and call it using a relative path. When other components of the system are needed, they can be loaded by finding the environment variables in the form of connection. Therefore, after the first verification is passed, the data to be changed is sorted, that is, the data to be changed is divided according to the preset data type to obtain at least one newly added data fragment. If it is found that the solidified image file has an application and is external (that is, the preset data type is the newly added data fragment of the application software type is an external program), it is necessary to perform additional independent operation verification (that is, the operation condition integrity check) to ensure that it will not be affected by the partition path problem after burning the image. In order to ensure that these independent function execution components can be correctly identified and called, they can be stored in the relative path of the same partition. The benefit of doing this is that it simplifies path management and component calling, because the system only needs to know a base path to access all components through relative paths.

[0100] S104: After each newly added data segment passes the second verification, a newly added mirror file is generated to determine whether to reset the read-only area.

[0101] In this embodiment, a new mirror file can be generated based on the new data segment that passes the second verification to determine whether to reset the read-only area. Specifically, the mirror file can be prepared in the directory structure where the new data segment is currently located.

[0102] S105: When the read-only area is not reset, a new sector is divided in the remaining space of the read-only area, and each newly added image file is burned in the new sector to realize data change.

[0103] In this embodiment, the above technical solution is a specific implementation of optimizing the storage space of the CDROM read-only area. That is, the image file that does not involve changes can be directly burned, because it is re-burned, its sector address is at the front, and there will be no waste of vacant addresses. For changes or additions, the address is extended backward in the form of appending.

[0104] In this embodiment, when it is determined to reset the read-only area, a backup image file corresponding to the image file that has not been changed in the read-only area is obtained, the read-only area is formatted, and the first burning is performed in the formatted read-only area. The first burning is used to burn the backup image file. Among them, a new sector is divided in the remaining space after the first burning in the formatted read-only area. The second burning is performed in the new sector. The second burning is used to burn each newly added data fragment. By formatting the read-only area, the security of the data is ensured to prevent unauthorized access and tampering.

[0105] In this embodiment, the ISO image file will be backed up in the partition, and the ISO image file will be backed up separately in the partition for the following reasons: solidifying data in the form of CDROM is to prevent tampering while allowing the files inside to participate in the normal operation of the system business, so the focus is on anti-tampering, rather than recovery after tampering. The backup ISO image file, in the form of an ISO image file, does not participate in the operation of the system business. Its significance is that before the next solidification, there is no need to export the ISO image file from the CDROM read-only area, but directly retain the ISO image file prepared last time. Save time to reset the CDROM read-only area.

[0106] Before burning, it is necessary to determine whether the change needs to change the entire CDROM read-only area. The preset conditions can be used to determine whether to reset the read-only area. The preset conditions include: the newly added data segment is a change to an existing CDROM read-only area, the component memory size after the change by adding the new data segment is larger than the remaining space capacity of the CDROM read-only area, the change process does not want to be carried out by reclaiming the original partition and expanding the new partition, and the total capacity of the CDROM read-only area does not meet the conditions for expanding the partition backward. Generally speaking, if it is an operation to add solidified data, as long as the capacity is sufficient, you only need to generate a new ISO image file and burn it to the corresponding sector of the CDROM in the form of backward appending. However, when any of the four situations in the preset conditions occurs, you have to find the backup image file of the ISO image file that has not been changed in the CDROM read-only area, rearrange it, and then burn it a second time.

[0107] If at least one of the above preset conditions is met, it is determined to reset the read-only area; if every one of the above preset conditions is met, it is determined not to reset the read-only area.

[0108] When at least one of the above preset conditions is triggered, the entire disk space of the current CDROM needs to be formatted. Before that, the ISO image file corresponding to the partition backup needs to be found.

[0109] After formatting, the image file that will not change is burned, and the remaining space is allocated as a new sector to burn the image file that has been changed or added.

[0110] In an optional implementation, after each newly added image file is burned in the new sector, the data change method further includes: changing the device mount configuration and initialization script. By changing the device mount configuration and initialization script, it is ensured that the system after the data change can correctly identify and use the new data.

[0111] After the sector is updated, the device mount configuration and initialization script of the file system need to be changed so that the use of the solidified file in the file system can be as close to the normal path as possible, which is convenient for upper-level software calls and users to use. Considering that the sector position of the CDROM has changed, in the upper-level application, in order to keep the original file system directory position unchanged, it is necessary to update the address mapping table, that is, the directory mapping relationship between the CDROM read-only area mounted to the file system in the operating system (change the device mount configuration of the file system). If it involves changes to the operating system kernel and boot files, it is necessary to re-update the boot program and restart the system to switch to the new kernel. This is a process that must be experienced when the kernel or boot program is updated. It can be understood by analogy: if the configuration file is updated, the corresponding process needs to reload the configuration file. If the application service is updated, the service process needs to be restarted. If the kernel program is updated, the new kernel needs to be loaded, and the new kernel can only be loaded by restarting the operating system.

[0112] The overall process of the technical solution of the present invention is as follows Figure 3 As shown, the technical solution of the present invention limits the read-only permissions of key data and programs from the hardware level, which can effectively prevent tampering and damage by malicious programs. Through built-in image preparation, image burning, and organization of directory partitions, after an update and organization, in normal use, there is no need to control read and write permissions through restrictions of the kernel or other applications, which improves the efficiency of software operation and reduces computing resource consumption. It can effectively prevent the device from being disassembled, mounted on the disk, and reading data to modify the protected data, ensuring the integrity of the current component operation. In the upgrade process, the human operation is independent, the core steps are encapsulated and atomically operated, reducing the risk of error introduction and the complexity of the problem by the implementers. The upgrade of the technical solution of the present invention involves the update after obtaining the upgrade package, and does not involve how to obtain the upgrade package. The technical solution of the present invention involves file solidification, specifically to achieve file solidification based on burning the image to the CDROM read-only area, and the upgrade, update and maintenance of solidified files.

[0113] Considering that if a large ISO image is created and burned every time the data is changed, it will inevitably waste computing resources, slow down the system and do useless work. In order to avoid the waste of computing resources, the technical solution of the present invention classifies the data to be changed into three types according to function, and divides the remaining space in the CDROM read-only area to determine the corresponding new sector. This helps to keep irrelevant solidified data unchanged when updating and solidifying data, reducing unnecessary consumption.

[0114] It should be noted that the contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.

[0115] In the present embodiment, a data changing device is also provided, and a single device is used to implement the above-mentioned embodiment and optional implementation methods, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0116] Figure 4 It is a structural diagram of a data changing device according to an embodiment of the present invention.

[0117] The present invention provides a data changing device, such as Figure 4 As shown, the data changing device comprises:

[0118] The first processing module 11 is used to perform a first check on the data to be changed. The data to be changed is a burned image file. The first check includes a legality check.

[0119] The second processing module 12 is used to divide the data to be changed according to the preset data type after the first verification of the data to be changed passes, so as to obtain at least one newly added data segment. Each newly added data segment corresponds to a preset data type.

[0120] The third processing module 13 is used to perform a second check on each newly added data segment. The second check includes an integrity check.

[0121] The fourth processing module 14 is used to generate a new mirror file after each new data segment passes the second verification, and determine whether to reset the read-only area.

[0122] The fifth processing module 15 is used to divide a new sector in the remaining space of the read-only area when the read-only area is not reset, and burn each newly added image file in the new sector to realize data change.

[0123] In an optional implementation, the data changing device further includes: a data acquisition module.

[0124] The data acquisition module is used to download the upgrade package before the first verification of the data to be changed, and transfer the downloaded upgrade package to the safe zone. The safe zone is provided with a firmware upgrade maintenance module. The firmware upgrade module processes and analyzes the upgrade package to determine the data to be changed.

[0125] Or, according to the partition where the data to be changed is currently located, call the data hardening module of the corresponding partition, and determine the data to be changed through the data hardening module. The data to be changed determined by the data hardening module is transferred to the safe zone. The data to be changed in the safe zone is used for the first verification.

[0126] In an optional embodiment, when the preset data type includes a system kernel type, a business data type, and an application software type, the third processing module 13 is specifically used to perform a second check on the newly added data segment whose preset data type is the system kernel type or the business data type. Determine whether the newly added data segment whose preset data type is the application software type is an external program. When the newly added data segment whose preset data type is the application software type is not an external program, perform a second check on the newly added data segment whose preset data type is the application software type. When the newly added data segment whose preset data type is the application software type is an external program, perform a running condition integrity check on the newly added data segment whose preset data type is the application software type. After the running condition integrity check passes, perform a second check on the newly added data segment whose preset data type is the application software type.

[0127] In an optional implementation, the data changing device further includes: an exception handling module. The exception handling module is used to enter a preset exception handling process and output exception information when there is a new data segment that fails the second verification among all the new data segments.

[0128] In an optional embodiment, the data changing device further includes: a sixth processing module. The sixth processing module is used to obtain a backup image file corresponding to the image file that has not been changed in the read-only area when determining to reset the read-only area, format the read-only area, and perform the first burning in the formatted read-only area. The first burning is used to burn the backup image file. A new sector is divided in the remaining space after the first burning in the formatted read-only area. A second burning is performed in the new sector. The second burning is used to burn each newly added data fragment.

[0129] In an optional implementation, the data changing device further includes: an updating module. The updating module is used to change the device mounting configuration and the initialization script after each newly added image file is burned in the new sector.

[0130] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0131] The data changing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0132] The embodiment of the present invention also provides a computer device having the above Figure 4 The data changing device shown.

[0133] See also Figure 5 , Figure 5 Schematic diagram of the hardware structure of the computer device according to the embodiment of the present invention. Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In an optional embodiment, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor device). Figure 5 A processor 10 is taken as an example.

[0134] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0135] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0136] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating device, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In an optional embodiment, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0137] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.

[0138] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0139] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0140] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0141] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data modification method, characterized in that: include: Perform the first verification on the data to be changed; The data to be changed is the image file after burning; The first verification includes a legality verification; After the first verification of the data to be changed passes, the data to be changed is divided according to the preset data type to obtain at least one newly added data segment; each of the newly added data segments corresponds to a preset data type; Performing a second check on each newly added data segment; the second check includes an integrity check; After the second verification of each newly added data fragment passes, a new mirror file is generated to determine whether to reset the read-only area; When the read-only area is not reset, a new sector is divided in the remaining space of the read-only area, and each newly added image file is burned in the new sector to realize data change.

2. The method according to claim 1, characterized in that Before performing the first verification on the data to be changed, the method further includes: Downloading an upgrade package, and transferring the downloaded upgrade package to a safe zone; the safe zone is provided with a firmware upgrade maintenance module; the upgrade package is processed and analyzed by the firmware upgrade module to determine the data to be changed; Or, according to the partition where the data to be changed is currently located, call the data solidification module of the corresponding partition, determine the data to be changed through the data solidification module; transfer the data to be changed determined by the data solidification module to the safe area; wherein the data to be changed in the safe area is used for the first verification.

3. The method according to claim 1, characterized in that The preset data types include system kernel types, business data types and application software types, and the second verification of each newly added data segment includes: Performing a second check on the newly added data fragments whose preset data type is a system kernel type or a business data type; Determine whether the newly added data segment whose preset data type is application software type is an external program; When the newly added data segment whose preset data type is the application software type is not an external program, a second verification is performed on the newly added data segment whose preset data type is the application software type; When the newly added data segment whose preset data type is an application software type is an external program, performing a running condition integrity check on the newly added data segment whose preset data type is an application software type; After the running condition integrity check is passed, a second check is performed on the newly added data segment whose preset data type is the application software type.

4. The method according to claim 1, characterized in that: The method further includes: when there is a new data segment that fails the second verification among all the new data segments, entering a preset exception handling process and outputting exception information.

5. The method according to claim 1, characterized in that: The step of determining whether to reset the read-only area comprises: When it is determined to reset the read-only area, a backup image file corresponding to the image file that has not been changed in the read-only area is obtained, the read-only area is formatted, and a first burn is performed in the formatted read-only area; the first burn is used to burn the backup image file; wherein a new sector is divided in the remaining space after the first burn in the formatted read-only area; A second programming is performed in the new sector; the second programming is used to program each newly added data segment.

6. The method according to claim 1, characterized in that After the new sector is burned with each newly added image file, the method further includes: changing the device mounting configuration and the initialization script.

7. A data changing device, characterized in that: include: A first processing module, used for performing a first verification on the data to be changed; The data to be changed is the image file after burning; The first verification includes a legality verification; A second processing module is used to divide the data to be changed according to preset data types after the first verification of the data to be changed passes, so as to obtain at least one newly added data segment; each of the newly added data segments corresponds to a preset data type; A third processing module, configured to perform a second check on each newly added data segment; the second check includes an integrity check; A fourth processing module, configured to generate a new mirror file and determine whether to reset the read-only area after each new data segment passes the second verification; The fifth processing module is used to divide a new sector from the remaining space of the read-only area when the read-only area is not reset, and burn each newly added image file in the new sector to realize data change.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data changing method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data changing method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the data changing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dynamic storage method of Flash memory

    CN101446921A

  • Program code protection method for microprocessor adopting flash memory

    CN104268448A

  • Firmware upgrading method, system and device and medium

    CN109992287A

  • Encryption and decryption method and device for mirror image verification, and medium

    CN111125725A

  • Firmware upgrading method and device, computer equipment and storage medium

    CN111176702A