Register description file protection method and device, storage medium and equipment
By installing the device control program on the control terminal and storing and using encrypted register description files, the error writing problems and security risks caused by users' own development of programs are solved, and the device usage experience and security are improved.
Patent Information
- Application Number
- CN202411063901.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-20
AI Technical Summary
In existing industrial equipment, users need to develop user-side programs to read and write registers by themselves, which can easily lead to incorrect parameters writing, resulting in equipment damage, and the register description file exposed to users poses a security risk.
Install a common device control program on the control terminal. By establishing a communication connection with the target device, determining and storing the encrypted register description file, avoiding the user directly writing error parameters, and increasing the difficulty of file parsing to improve security.
Improves user experience, avoids device damage, enhances the security of register description files, reduces the difficulty of users developing programs, and improves the security of devices.
Smart Images

Figure CN119166554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of industrial equipment, and in particular to a method and device for protecting a register description file, a storage medium, and a computer device. Background Art
[0002] At present, in industrial equipment with complex functions, most of them use MCU (Microcontroller Unit) core to control various parts of the equipment. For example, the MCU receives external input of the equipment, analyzes the rationality of the external input of the equipment, and controls the equipment to respond to the external input. In order to complete these control activities, some registers need to be defined inside the MCU, and these registers are used to store the operation data of the MCU so that the MCU can operate normally. As the complexity of the equipment increases, more and more registers are defined inside the MCU, and there are complex associations between registers. In order to facilitate user use and reduce the complexity of equipment design and replacement, the industry has introduced register description files. This register description file is embedded in the MCU memory of the device. When the user uses the device, he can read this file through the data port, read and write the corresponding register in the device according to the register name or address defined in the file, so that the MCU can achieve the purpose of controlling the device through the read and write data in the register.
[0003] When users currently control devices, they usually develop their own user-side programs and interact with registers through the user-side programs. In this case, users need to obtain register description files and analyze the relationship between register addresses and registers contained in the register description files, so that users can directly read and write registers through user-side programs and register addresses. However, this method requires users to develop user-side programs, which increases the difficulty for users to use the device. At the same time, users directly read and write registers according to register addresses, which can easily write wrong parameters to registers, causing fatal damage to the device. In addition, directly exposing the register description file to users, if users want to imitate the device, analyzing and even using its register description file can reduce a lot of design work, which is very detrimental to device security. Summary of the invention
[0004] In view of this, the present application provides a method and device for protecting a register description file, a storage medium, and a computer device. By installing a general device control program on a control terminal, the target device is controlled through the device control program. Users do not need to develop user-side programs by themselves, which can improve the user experience of using the device. At the same time, users do not need to interpret the register description file. The entire control process is implemented through the device control program, which can prevent users from writing incorrect parameters in the device register, thereby causing damage to the device. In addition, storing encrypted register description files in local storage space can further increase the difficulty of parsing the register description file, thereby indirectly improving the security of the device.
[0005] According to one aspect of the present application, a register description file protection method is provided, which is applied to a control terminal, and a target device is controlled by a device control program installed in the control terminal while protecting the security of the register description file. The method includes:
[0006] In response to a start instruction of the device control program, a communication connection is established with the target device, and it is determined whether a target register description file corresponding to the target device exists in the local storage space;
[0007] When the target register description file does not exist in the local storage space, based on the register description file obtained from the target device, the encrypted target register description file is stored in the local storage space to control the target device based on the target register description file.
[0008] According to another aspect of the present application, a register description file protection device is provided, which is applied to a control terminal, and controls a target device while protecting the security of the register description file through a device control program installed in the control terminal, and the device includes:
[0009] a communication connection establishing module, configured to establish a communication connection with the target device in response to a start instruction of the device control program, and determine whether a target register description file corresponding to the target device exists in the local storage space;
[0010] The file storage module is used to store the encrypted target register description file in the local storage space based on the register description file obtained from the target device when the target register description file does not exist in the local storage space, so as to control the target device based on the target register description file.
[0011] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned register description file protection method is implemented.
[0012] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned register description file protection method when executing the program.
[0013] By means of the above technical scheme, the present application provides a register description file protection method and device, storage medium, and computer equipment, which respond to the startup instruction of the device control program, establish a communication connection with the corresponding target device, and determine whether there is a target register description file corresponding to the target device in the local storage space of the control terminal. If it is found through judgment that there is no target register description file in the local storage space of the control terminal, then the encrypted target register description file can be stored in the local storage space based on the register description file obtained from the target device. The subsequent device control program can use the encrypted target register description file stored in the local storage space to control the target device. The embodiment of the present application installs a general device control program on the control terminal, and controls the target device through the device control program. The user does not need to develop the user-side program by himself, which can improve the user's experience of using the device. At the same time, the user does not need to interpret the register description file. The entire control process is implemented by the device control program, which can prevent the user from writing wrong parameters in the device register, thereby causing damage to the device. In addition, storing the encrypted register description file in the local storage space can further increase the difficulty of parsing the register description file, thereby indirectly improving the security of the device.
[0014] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 A schematic diagram of a flow chart of a register description file protection method provided in an embodiment of the present application is shown;
[0017] Figure 2 A schematic diagram of a flow chart of another register description file protection method provided in an embodiment of the present application is shown;
[0018] Figure 3A schematic diagram of a key generation process provided by an embodiment of the present application is shown;
[0019] Figure 4 A schematic diagram of a flow chart of another register description file protection method provided in an embodiment of the present application is shown;
[0020] Figure 5 A schematic diagram of the structure of a register description file protection device provided in an embodiment of the present application is shown;
[0021] Figure 6 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0023] In this embodiment, a register description file protection method is provided, which is applied to a control terminal, and a device control program installed in the control terminal is used to control a target device while protecting the security of the register description file. Figure 1 As shown, the method includes:
[0024] Step 101, in response to a start instruction of a device control program, establish a communication connection with the target device, and determine whether there is a target register description file corresponding to the target device in a local storage space.
[0025] A register description file protection method provided in an embodiment of the present application can be applied to a control terminal, which can be a computer device such as a laptop computer, a desktop computer, a tablet computer, etc. A device control program can be installed on the control terminal, and the device control program can control the register description file stored in the local storage space to be an encrypted register description file, that is, the device control program can control the target device through the encrypted register description file while protecting the security of the register description file. The device control program can be a general control program corresponding to the same type of device. Specifically, the device control program can be obtained by installing a program installation package provided by the device manufacturer of the target device, and the program installation package is matched with the target device; the target device is a device with a register, and the register is read and written by the device control program, so that the target device can be controlled.
[0026] When the user wants to control the target device, the device control program installed on the control terminal can be started. The control terminal can respond to the start-up instruction of the device control program and establish a communication connection with the corresponding target device, so that the control terminal can exchange data with the target device. In addition, since the device control program can rely on the register description file to read and write the register, the device control program can also determine whether there is a target register description file corresponding to the target device in the local storage space of the control terminal.
[0027] Step 102 : When the target register description file does not exist in the local storage space, based on the register description file obtained from the target device, the encrypted target register description file is stored in the local storage space to control the target device based on the target register description file.
[0028] In this embodiment, if it is determined that the target register description file does not exist in the local storage space of the control terminal, then the encrypted target register description file can be stored in the local storage space based on the register description file obtained from the target device. Here, if the register description file obtained from the target device is an encrypted file, then the encrypted file can be directly stored in the local storage space as the target register description file; if the register description file obtained from the target device is not an encrypted file, that is, not a plaintext file, then the device control program can encrypt the register description file, use the obtained encrypted file as the target register description file, and store the target register description file in the local storage space. The subsequent device control program can use the encrypted target register description file stored in the local storage space to control the target device.
[0029] In addition, after the encrypted target register description file is stored in the local storage space, when the user subsequently starts the device control program again, the device control program can determine that the encrypted target register description file stored last time exists in the local storage space of the control terminal. In this case, there is no need to obtain the register description file from the target device, and the encrypted target register description file can be directly used to control the target device.
[0030] By applying the technical solution of this embodiment, in response to the startup instruction of the device control program, a communication connection is established with the corresponding target device, and it is determined whether there is a target register description file corresponding to the target device in the local storage space of the control terminal. If it is found through judgment that there is no target register description file in the local storage space of the control terminal, then the encrypted target register description file can be stored in the local storage space based on the register description file obtained from the target device. The subsequent device control program can use the encrypted target register description file stored in the local storage space to control the target device. The embodiment of the present application controls the target device by installing a general device control program on the control terminal, and the target device is controlled by the device control program. The user does not need to develop the user-side program by himself, which can improve the user's experience of using the device. At the same time, the user does not need to interpret the register description file. The entire control process is implemented by the device control program, which can avoid the user from writing wrong parameters in the device register, thereby causing damage to the device. In addition, storing the encrypted register description file in the local storage space can further increase the difficulty of parsing the register description file, thereby indirectly improving the security of the device.
[0031] In an embodiment of the present application, optionally, after step 102, the method further includes: monitoring the access operation of the target register description file, and when it is monitored that the target register description file is accessed, calling a preset tracking function, and determining the access path of the target register description file through the preset tracking function; judging whether the access path is a secure path, and when the judgment result is no, obtaining user identity information, generating an alarm email according to the access path and the user identity information, and sending the alarm email to a preset receiving address.
[0032] In this embodiment, a monitoring mechanism can be set in the device control program to monitor the access operation to the target register description file in real time. Whenever a process or user attempts to read, write, execute or modify the target register description file, the monitoring mechanism can be triggered. If the device control program monitors that the target register description file is accessed, a preset tracking function can be called immediately. Through the preset tracking function, the access path of the target register description file can be determined. The access path can be a series of operations or event sequences from the start of the device control program to the access of the target register description file. The determination of the access path can help determine the path through which the target register description file is accessed, thereby helping to identify potential malicious behavior. After determining the access path, the access path can be evaluated for security. Specifically, multiple security paths can be pre-set, and the access path can be compared with the security path. If it is determined that the access path is not a secure path, it means that this is an unsafe access. At this time, the device control program can obtain the user identity information (such as user name, user ID, etc.) of the user accessing the target register description file, and according to the user identity information and the access path, an alarm email can be generated and sent to a preset receiving address. Here, the preset receiving address may be a mailbox of the security team or other mailboxes responsible for handling such security incidents, etc. The embodiment of the present application effectively protects the target register description file from malicious access through a series of steps such as real-time monitoring, tracking, evaluation and alarm, improves the access security of the target register description file, and reduces potential security risks.
[0033] In an embodiment of the present application, optionally, the "determining whether the access path is a safe path" includes: obtaining a path sequence based on each access node in the access path, and inputting the path sequence into a preset feature recognition model to obtain a node feature vector corresponding to each access node in the path sequence; inputting the node feature vector corresponding to each node into a preset classification model to obtain a predicted classification value corresponding to the path sequence, and determining whether the access path is a safe path based on the predicted classification value.
[0034] In this embodiment, first, an ordered path sequence can be generated according to each access node in the access path, and the path sequence arranges all nodes in the order of access. For example, if the access path is a→b→c, then the corresponding path sequence can be (a, b, c). After that, this path sequence is input into a preset feature recognition model that has been trained, and the features of each access node can be extracted from the path sequence through the preset feature recognition model to generate the corresponding node feature vector. Here, the features of the access node may include the type, attributes, location information of the access node in the path sequence, and the association with other access nodes. Then, the node feature vector corresponding to each access node is input into a preset classification model. Here, the preset classification model can be a model that has been trained and can judge the category to which the entire path sequence may belong based on the node feature vector. According to the prediction result of the preset classification model, that is, the predicted classification value, it can be judged whether this access path is a safe path. Among them, the predicted classification value can be a probability value indicating that the path is safe, or it can be a direct classification label (such as "safe" or "unsafe"), etc. According to this predicted classification value, the device control program can make corresponding decisions, such as allowing or preventing further access. The embodiment of the present application determines the path sequence corresponding to the access path, and then determines the node feature vector of each access node in the path sequence, and then determines whether the access path is a safe path based on the node feature vector, which effectively improves the efficiency and accuracy of determining the security of the access path, thereby preventing the target register description file from being maliciously accessed.
[0035] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another register description file protection method is provided, which is applied to a control terminal, and a device control program installed in the control terminal controls the target device while protecting the security of the register description file, such as Figure 2 As shown, the method includes:
[0036] Step 201, in response to a start instruction of a device control program, establish a communication connection with the target device, and determine whether there is a target register description file corresponding to the target device in a local storage space.
[0037] Step 202: when the target register description file does not exist in the local storage space, obtain the register description file from the target device and determine whether the register description file is an encrypted file.
[0038] Step 203: When the register description file is not an encrypted file, encrypt the register description file to obtain an encrypted target register description file, and store the encrypted target register description file in the local storage space.
[0039] Step 204: When the register description file is an encrypted file, store the register description file as an encrypted target register description file in the local storage space.
[0040] In this embodiment, if it is determined that the target register description file does not exist in the local storage space, then the register description file can be obtained from the target device to further determine whether the register description file is an encrypted file. Here, when the target device leaves the factory, a register description file can be embedded in the target device, and the register description file embedded in each target device can indicate information such as the address of the register in the target device. The device control program of the present application can be a control program common to different devices. By installing the device control program on the control terminal corresponding to the target device, the corresponding target device can be controlled.
[0041] It should be noted that, since some devices are shipped earlier, the register description files embedded in the devices are unencrypted files, that is, plain text files. In order to further ensure the security of the register description files stored locally, when the user starts the device control program, the device control program can first determine whether the register description file obtained from the target device is encrypted. If it is found that the register description file obtained from the target device is not an encrypted file, the device control program can encrypt the register description file and then store it in the local storage space; if it is found that the register description file obtained from the target device is an encrypted file, the device control program can directly store the encrypted file in the local storage space. In this way, regardless of whether the register description file obtained from the target device is an encrypted file or an unencrypted file, the register description file finally stored in the local storage space is an encrypted register description file, thereby ensuring the security of the register description file in the local storage space. In addition, for newly shipped target devices, the encrypted register description file can be directly embedded, thereby reducing the steps for the subsequent device control program to encrypt the register description file.
[0042] In an embodiment of the present application, optionally, the method further includes: in response to a device control instruction, reading a target register description file from the local storage space, and determining whether the target register description file is an encrypted file; when the target register description file is an encrypted file, decrypting the target register description file to obtain a temporary decrypted description file, wherein the temporary decrypted description file is deleted after the target device executes a control action corresponding to the device control instruction; loading the temporary decrypted description file, and when the loading is successful, reading and writing the register indicated by the temporary decrypted description file according to the device control instruction through a preset output function, so as to control the target device through the register.
[0043] In this embodiment, after starting the device control program and successfully establishing a communication connection with the target device, the user can further operate and control the target device through the device control program interface displayed on the control terminal. Specifically, the user can issue a device control instruction by triggering the control icon on the device control program interface. The device control program responds to the device control instruction and can read the target register description file from the local storage space and determine whether the target register description file is an encrypted file. Here, since some target devices are put into use earlier, their embedded register description files can be unencrypted files. When controlling the target device, the client developed by the user can also obtain the unencrypted register description file from the target device and store it in the local storage space. In this way, when the user uses the new device control program (i.e., the device control program of the present application), the device control program can read the unencrypted target register description file in the local storage space. Therefore, when the device control program is applied to control the target device, the device control program can first determine whether the target register description file in the local storage space is an encrypted file after responding to the device control instruction each time to determine the subsequent processing strategy.
[0044] Specifically, if the target register description file stored in the local storage space is an encrypted file, the target register description file can be decrypted to obtain a temporary decrypted description file. Then, the temporary decrypted description file can be loaded, and when the loading is successful, the register that receives the device control instruction can be determined according to the temporary decrypted description file, and the control data corresponding to the device control instruction can be output through the preset output function, and the determined register can be read and written according to the control data, so as to achieve the purpose of controlling the target device. Here, the preset output function can be a function for performing read and write operations on the register indicated by the temporary decrypted description file according to the device control instruction, such as an I / O operation function. In addition, it should be noted that in order to ensure the security of the register description file in the local storage space, the temporary decrypted file can be deleted every time the target device executes the control action corresponding to the device control instruction. When the user issues the device control instruction again, the target register description file is decrypted again, and the target device is controlled by the decrypted target register description file...
[0045] If the target register description file stored in the local storage space is an unencrypted file, the unencrypted file can be directly loaded at this time. After the loading is successful, the register that receives the device control instruction can be determined based on the unencrypted file, and the control data corresponding to the device control instruction can be output through a preset output function. The determined register is read and written according to the control data, thereby achieving the purpose of controlling the target device.
[0046] In the embodiment of the present application, for different types of target register description files (encrypted type and unencrypted type) stored in the local storage space, the device control program can use different processing strategies respectively, so that the control of the target device is more flexible, which is conducive to the realization of various user needs and is conducive to improving the wide application of the device control program.
[0047] In an embodiment of the present application, optionally, the "reading and writing the register indicated by the temporary decryption description file according to the device control instruction through a preset output function" includes: parsing the device control instruction through the preset output function to obtain control data and user identity information; based on the temporary decryption description file, determining the target interaction register corresponding to the preset output function, and the target operation authority under the user identity information corresponding to the target interaction register; judging whether the data authority corresponding to the control data exceeds the target operation authority, and when the data authority does not exceed the target operation authority, performing read and write operations on the target interaction register based on the control data, so as to control the target device through the target interaction register.
[0048] In this embodiment, when the register is read and written by the preset output function, specifically, the device control instruction can be parsed by the preset output function first, and the control data and user identity information can be obtained. Here, the control data can be used to control the target device, and the user identity information can be a unique identification information used to indicate the user identity, such as a user name, a user ID, etc. Then, the device control program can determine which target interactive register corresponds to the preset output function and the target operation permission under the user identity information corresponding to the target interactive register according to the temporary decryption description file that has been loaded. Here, the target operation permissions corresponding to different user levels can be pre-written in the temporary decryption description file, for example, ordinary users have A read permission and B write permission, while senior users have A read permission, B write permission, and C and D read and write permissions, etc. Therefore, after determining the user identity information, the device control program can determine the user level (such as ordinary user, senior user, etc.) according to the user identity information, and then query the target operation permission corresponding to the user level in the temporary decryption description file. Specifically, the device control program can send the user identity information to the server, and the server queries the user level corresponding to the user identity information, and returns the user level to the device control program.
[0049] After that, the data permissions corresponding to the control data can be determined, such as what operations the control data wants to perform and what data permissions these operations correspond to. It is further determined whether the data permissions exceed the target operation permissions. If it is determined that the data permissions do not exceed the target operation permissions, then the target interaction register can be read and written according to the control data, so that the target device can be controlled by performing the read and write operations on the target interaction register.
[0050] The embodiment of the present application records the operation permissions corresponding to different user levels in a temporary decryption description file, and can determine whether the user's control operation exceeds the user's permissions when the user controls the target device, thereby improving the operational security of the target device.
[0051] In an embodiment of the present application, optionally, the "encrypting the register description file to obtain an encrypted target register description file" in step 203 includes: obtaining target data, wherein the target data includes encryption verification data of a first preset byte, a random number of a second preset byte, and a key of a first preset byte corresponding to the unencrypted register description file; inputting the target data and the unencrypted register description file into a preset encryption and decryption algorithm to obtain a ciphertext file corresponding to the unencrypted register description file; inputting the encrypted verification data into a preset integrity verification algorithm to obtain first verification data of a third preset byte; and obtaining an encrypted target register description file based on the ciphertext file, the first verification data, and the encrypted verification data.
[0052] In this embodiment, the process of encrypting the register description file by the device control program may be as follows:
[0053] First, the target data is obtained. Here, the target data may include the encryption verification data of the first preset byte, the random number of the second preset byte, and the key of the first preset byte corresponding to the unencrypted register description file. The encryption verification data is used to participate in the encryption of the unencrypted register description file on the one hand, and to verify whether the encrypted target register description file has been modified on the other hand. The random number can be determined according to the system clock value.
[0054] Next, the target data and the unencrypted register description file may be input into a preset encryption and decryption algorithm, so that a ciphertext file corresponding to the unencrypted register description file may be obtained. Here, the preset encryption and decryption algorithm may be a ChaCha20 encryption and decryption algorithm.
[0055] In addition, the encrypted verification data can be input into a preset integrity check algorithm, and the first check data of the third preset byte can be output accordingly. Here, the preset integrity check algorithm can be the Poly1305 algorithm, and the first check data is used to verify whether the encrypted target register description file has been modified.
[0056] Finally, the ciphertext file, the first check data and the encrypted verification data obtained above may be packaged to obtain an encrypted target register description file.
[0057] For example, the encrypted verification data of the first preset byte (32 bytes), the random number of the second preset byte (12 bytes), that is, nonce (Number used once; an arbitrary or non-repeating random value used only once), the key of the first preset byte (32 bytes) corresponding to the unencrypted register description file, and the unencrypted register description file can be input into the preset encryption and decryption algorithm to obtain a ciphertext file. At the same time, the encrypted verification data of the first preset byte (32 bytes) is input into the preset integrity verification algorithm, and the first verification data of the third preset byte (16 bytes) is output. The ciphertext file, the first verification data, and the encrypted verification data obtained above are packaged to obtain the encrypted target register description file.
[0058] In an embodiment of the present application, optionally, before the "obtaining target data", the method further includes: obtaining a target chip identifier of a fourth preset byte, and disturbance amount data of a fifth preset byte generated according to a preset rule, wherein the target chip identifier is determined according to the chip identifier of the chip where the register is located; based on the target chip identifier and the disturbance amount data, generating a key seed of a first preset byte, and inputting the key seed into a key generation algorithm to obtain a key of the first preset byte corresponding to the register description file.
[0059] In this embodiment, before acquiring the target data, a key of the first preset byte may be generated. Specifically, the target chip identifier of the fourth preset byte may be acquired first. Here, the target chip identifier may be a part of the chip identifier of the chip where the register is located. For example, the chip identifier of the chip where the register is located is 12 bytes, and the fourth preset byte is 8 bytes, then the first 8 bytes of data or the last 8 bytes of data may be taken from the chip identifier as the target chip identifier. At the same time, the disturbance amount data of the fifth preset byte may also be generated according to the preset rules. The disturbance amount data may be random noise, pseudo-random numbers, etc. For example, the noise data of the fifth preset byte may be intercepted from the acquired random noise as the disturbance amount data, and the pseudo-random number generator may be directly used to generate the pseudo-random number of the fifth preset byte as the disturbance amount data, etc.
[0060] Next, a key seed can be generated according to the target chip identification and the disturbance amount data. Here, the number of bytes of the key seed is the first preset byte, and the first preset byte can specifically be the sum of the fourth preset byte and the fifth preset byte. For example, the fourth preset byte is 8 bytes, the fifth preset byte is 24 bytes, and the first preset byte is 32 bytes. After that, the key seed can be input into the key generation algorithm, and then the key of the first preset byte corresponding to the register description file is output. Among them, the key generation algorithm can be an existing algorithm for generating keys based on the key seed. The embodiment of the present application generates a key based on the target chip identification and the disturbance amount data, which can ensure that when the device control program encrypts the register description files of different devices, the keys are different, thereby increasing the difficulty of cracking the encrypted register description files.
[0061] like Figure 3 The diagram shows a schematic diagram of a key generation process of an embodiment of the present application. According to the target chip identification of the fourth preset byte (8 bytes) and the disturbance amount data of the fifth preset byte (24 bytes), a key seed of the first preset byte (32 bytes) is spliced, and then the key seed is input into the key generation algorithm to obtain a key of the first preset byte (32 bytes).
[0062] In an embodiment of the present application, optionally, before the "obtaining target data", the method also includes: obtaining a chip identifier of the chip where the register is located and an algorithm identifier of the preset encryption and decryption algorithm, and generating first data of the sixth preset byte according to the chip identifier and the algorithm identifier; obtaining a system clock value, and generating second data of the seventh preset byte according to the system clock value; generating third data of the seventh preset byte according to the first data and the second data through a cyclic redundancy check algorithm; and concatenating the first data, the second data and the third data to obtain encryption verification data of the first preset byte.
[0063] In this embodiment, before acquiring the target data, encrypted verification data of the first preset byte may be generated. Specifically, the chip identifier of the chip where the register is located and the algorithm identifier of the preset encryption and decryption algorithm may be first acquired, and the first data of the sixth preset byte may be generated based on the chip identifier and the algorithm identifier. For example, the sixth preset byte is 24 bytes, the chip identifier is 12 bytes, and the algorithm identifier is 16 bytes, then the chip identifier and the algorithm identifier may be spliced together to take the first 24 bytes of data as the first data. Next, the current system clock value may be acquired, and the second data of the seventh preset byte may be generated according to the current system clock value. For example, the seventh preset byte is 4 bytes, then after acquiring the current system clock value, the first 4 bytes or the last 4 bytes of data in the current system clock value may be intercepted as the second data. In order to ensure that the second data is different each time the encryption is performed, the millisecond value of the current system clock value may be taken as the main component of the second data.
[0064] After determining the first data and the second data, a cyclic redundancy check algorithm can be used to generate third data of the seventh preset byte based on the first data and the second data. For example, if the seventh preset byte is 4 bytes, the first data and the second data can be used to generate 4 bytes of third data.
[0065] Finally, the first data, the second data, and the third data can be spliced together to obtain the encrypted verification data of the first preset byte. The first preset byte is equal to the sum of the sixth preset byte, the seventh preset byte, and the seventh preset byte. For example, the sixth preset byte is 24 bytes, the seventh preset byte is 4 bytes, then the first preset byte is 24+4+4=32 bytes. The splicing process can be to directly connect the second data after the first data, and directly connect the third data after the second data. The embodiment of the present application composes the encrypted verification data through three parts, and each part has greater randomness, which can increase the difficulty of cracking the encrypted verification data, thereby improving the security of the encrypted register description file.
[0066] In an embodiment of the present application, optionally, the "decrypting the target register description file to obtain a temporary decrypted description file" includes: inputting the encrypted verification data in the target register description file into the preset integrity verification algorithm to obtain second verification data, and determining whether the second verification data is consistent with the first verification data in the encrypted target register description file; when the judgment result is consistent, obtaining the target data, inputting the target data and the ciphertext file in the encrypted target register description file into the preset encryption and decryption algorithm to obtain the temporary decrypted description file.
[0067] In this embodiment, when decrypting the encrypted target register description file, first, the encrypted verification data in the target register description file can be input into the above-mentioned preset integrity verification algorithm, such as the Poly1305 algorithm, and then the second verification data can be obtained. Under normal circumstances, if the encrypted target register description file has not been tampered with, then the same verification data can be generated correspondingly using the same encrypted verification data and the same preset integrity verification algorithm. Therefore, it can be determined whether the obtained second verification data is consistent with the first verification data in the encrypted target register description file. If it is inconsistent, it means that the integrity of the encrypted target register description file has been destroyed, either the encrypted verification data has been tampered with, or the first verification data has been tampered with, and it can be reported to the server at this time. If it is determined that the second verification data is consistent with the first verification data, then the above-mentioned target data can be obtained at this time, and the target data and the ciphertext file of the target register description file can be input into the preset encryption and decryption algorithm used during encryption, and a temporary decryption description file can be output accordingly. Before decrypting an encrypted file, the embodiment of the present application first determines whether the encrypted file has been tampered with. The encrypted file is decrypted only after it is determined that it has not been tampered with. Thereafter, a temporary decryption description file is used to control the target device, thereby ensuring the control security of the target device and avoiding illegal operations by the user caused by controlling the target device using a tampered register description file.
[0068] In an embodiment of the present application, optionally, after the "inputting the encrypted verification data into a preset integrity verification algorithm to obtain first verification data of a third preset byte", the method further includes: writing the first verification data into a blockchain and recording a corresponding blockchain address; accordingly, the "decrypting the target register description file to obtain a temporary decrypted description file" includes: obtaining the blockchain address, and obtaining the first verification data from the corresponding blockchain according to the blockchain address; determining whether the first verification data is consistent with the first verification data in the encrypted target register description file; when the determination result is consistent, obtaining the target data, and inputting the target data and the ciphertext file in the encrypted target register description file into the preset encryption and decryption algorithm to obtain the temporary decryption description file.
[0069] In this embodiment, after the first verification data is generated by the preset integrity verification method, in order to be able to use the first verification data to verify whether the encrypted target register description file has been tampered with, the first verification data can also be written into the blockchain, and at the same time, the blockchain address corresponding to the blockchain can be recorded. In this way, when the encrypted target register description file is decrypted, the first verification data can be obtained according to the recorded blockchain address, and then the first verification data obtained from the blockchain is determined to be consistent with the first verification data in the encrypted target register description file. If it is inconsistent, it means that the integrity of the encrypted target register description file has been destroyed, either the encrypted verification data has been tampered with, or the first verification data has been tampered with, and it can be reported to the server at this time. If it is found that the second verification data is consistent with the first verification data after judgment, then the above-mentioned target data can be obtained at this time, and the target data and the ciphertext file of the target register description file can be input into the preset encryption and decryption algorithm used during encryption, and a temporary decryption description file can be output accordingly. Before decrypting an encrypted file, the embodiment of the present application first determines whether the encrypted file has been tampered with. The encrypted file is decrypted only after it is determined that it has not been tampered with. Thereafter, a temporary decryption description file is used to control the target device, thereby ensuring the control security of the target device and avoiding illegal operations by the user caused by controlling the target device using a tampered register description file.
[0070] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another register description file protection method is provided, which is applied to a control terminal, and a device control program installed in the control terminal controls the target device while protecting the security of the register description file, such as Figure 4 As shown, the method includes:
[0071] Step 301, in response to a start instruction of a device control program, establish a communication connection with the target device, and determine whether there is a target register description file corresponding to the target device in a local storage space.
[0072] Step 302: When a target register description file corresponding to the target device exists in the local storage space, it is determined whether the target register description file is an encrypted file.
[0073] Step 303, when the target register description file is not an encrypted file, encrypt the target register description file to obtain an encrypted target register description file, and store the encrypted target register description file in the local storage space to control the target device based on the target register description file.
[0074] In this embodiment, if it is found that there is a target register description file corresponding to the target device in the local storage space after judgment, then it can be further determined whether the target register description file is an encrypted file. It should be noted that if the device control program is newly installed and enabled for the first time, in this case, if the target register description file is stored in the local storage space, it means that the target device has been put into use before, and the target register description file is likely not an encrypted file. Therefore, in order to further improve the security of the register description file in the local storage space, it can be further determined whether the target register description file is an encrypted file. If it is found that it is not an encrypted file after judgment, then the device control program can further encrypt the target register description file at this time to obtain an encrypted target register description file, and then store the encrypted target register description file in the local storage space, overwrite the previous unencrypted file, and then use the encrypted target register description file to control the target device. After the embodiment of the present application finds that the unencrypted target register description file is stored in the local storage space, it is encrypted and stored, thereby further improving the security of the register description file in the local storage space.
[0075] In the embodiment of the present application, optionally, after step 302, the method further includes: when the target register description file is not an encrypted file, generating authorization query information, and sending the authorization query information to the target server, so that the target server determines the user identity information based on the authorization query information, and queries whether the user corresponding to the user identity information is a designated authorized user; receiving feedback information returned by the target server, and when the feedback information indicates that the user is a non-designated authorized user, executing the step of encrypting the target register description file.
[0076] In this embodiment, if it is found through judgment that the target register description file in the local storage space is not an encrypted file, authorization query information can also be generated, and whether the target register description file stored in the local storage space needs to be encrypted can be determined through the authorization query information. Specifically, the authorization query information can be sent to the target server. After the target server receives the authorization query information, the user identity information of the user corresponding to the target device can be determined based on the authorization query information, and further inquires whether the user corresponding to the user identity information is a designated authorized user. Here, the designated authorized user can be a user approved by the manufacturer who can directly use the plaintext register description file. The target server can generate feedback information based on the user identity information and return the feedback information to the control terminal. The control terminal analyzes whether the user is a designated authorized user based on the feedback information. If it is a non-designated authorized user, it means that the user does not have the right to use the plaintext register description file. At this time, the target register description file can be encrypted, and the encrypted target register description file is used to replace the previous unencrypted target register description file. The embodiment of the present application can meet the usage needs of different users by sending authorization query information to the target server after determining that an unencrypted target register description file is stored in the local storage space, determining whether the user is a designated authorized user based on the authorization query information, and then determining the processing strategy of the unencrypted target register description file.
[0077] In an embodiment of the present application, optionally, the "establishing a communication connection with the target device in response to a startup instruction of the device control program" in step 301 includes: in response to a startup instruction of the device control program, detecting a preset binding device, wherein the preset binding device includes at least one, and the preset binding device is bound when the device control program is registered; when multiple preset binding devices are successfully detected, outputting a target device selection interface, and obtaining user input data from the target device selection interface, determining a target device from the detected multiple preset binding devices based on the user input data, and establishing a communication connection with the target device.
[0078] In this embodiment, when the user starts the device control program, the device control program can receive a startup instruction, and can respond to the startup instruction to detect the preset bound devices. Here, when the device control program is first installed or registered, the user can bind one or more devices that he wants to control to the program, and these devices can be called preset bound devices. Specifically, the device information (such as device ID, IP address, port number, etc.) of the preset bound device can be stored in the configuration file of the device control program or on the cloud server so that the device control program can identify and communicate with it. In response to the startup instruction, the device control program will try to detect all preset bound devices. If the detection is successful, that is, the target device responds to the detection signal, then the target device can be regarded as online and connectable, and the device control program can record the device information of all successfully detected preset bound devices. When multiple preset bound devices are successfully detected, the device control program can output a target device selection interface, which can list all successfully detected preset bound devices, such as the name, model, current status, etc. of the preset bound device, so that the user can identify it. Next, the user can input their selection through the interactive elements (such as buttons, drop-down menus, etc.) on the target device selection interface, at which point the device control program can extract the user input data. Afterwards, the device control program can determine the target device that the user wants to control from the multiple detected preset bound devices based on the user input data, and establish a communication connection with the target device. The embodiment of the present application can enhance the user experience while improving the efficiency of target device determination by automatically detecting preset bound devices and allowing the user to select a target device after detecting multiple preset bound devices.
[0079] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a register description file protection device, which is applied to a control terminal, and controls the target device by a device control program installed in the control terminal while protecting the security of the register description file, such as Figure 5 As shown, the device comprises:
[0080] a communication connection establishing module, configured to establish a communication connection with the target device in response to a start instruction of the device control program, and determine whether a target register description file corresponding to the target device exists in the local storage space;
[0081] The file storage module is used to store the encrypted target register description file in the local storage space based on the register description file obtained from the target device when the target register description file does not exist in the local storage space, so as to control the target device based on the target register description file.
[0082] Optionally, the file storage module is used to:
[0083] Obtain a register description file from the target device, and determine whether the register description file is an encrypted file;
[0084] When the register description file is not an encrypted file, encrypting the register description file to obtain an encrypted target register description file, and storing the encrypted target register description file in the local storage space;
[0085] When the register description file is an encrypted file, the register description file is stored in the local storage space as an encrypted target register description file.
[0086] Optionally, the device further comprises:
[0087] a file reading module, configured to read a target register description file from the local storage space in response to a device control instruction, and determine whether the target register description file is an encrypted file;
[0088] a decryption module, configured to decrypt the target register description file to obtain a temporary decrypted description file when the target register description file is an encrypted file, wherein the temporary decrypted description file is deleted after the target device executes the control action corresponding to the device control instruction;
[0089] The loading module is used to load the temporary decryption description file, and when the loading is successful, read and write the register indicated by the temporary decryption description file according to the device control instruction through a preset output function, so as to control the target device through the register.
[0090] Optionally, the loading module is used to:
[0091] Parsing the device control instruction through the preset output function to obtain control data and user identity information;
[0092] Based on the temporary decryption description file, determining a target interaction register corresponding to the preset output function and a target operation permission under the user identity information corresponding to the target interaction register;
[0093] Determine whether the data permission corresponding to the control data exceeds the target operation permission, and when the data permission does not exceed the target operation permission, perform read and write operations on the target interaction register based on the control data to control the target device through the target interaction register.
[0094] Optionally, the file storage module is further used to:
[0095] Acquire target data, wherein the target data includes encrypted verification data of a first preset byte, a random number of a second preset byte, and a key of a first preset byte corresponding to an unencrypted register description file;
[0096] Input the target data and the unencrypted register description file into a preset encryption and decryption algorithm to obtain a ciphertext file corresponding to the unencrypted register description file;
[0097] Inputting the encrypted verification data into a preset integrity check algorithm to obtain first check data of a third preset byte;
[0098] An encrypted target register description file is obtained according to the ciphertext file, the first verification data and the encrypted verification data.
[0099] Optionally, the device further comprises:
[0100] A data acquisition module, used for acquiring a target chip identifier of a fourth preset byte and a disturbance amount data of a fifth preset byte generated according to a preset rule before acquiring the target data, wherein the target chip identifier is determined according to the chip identifier of the chip where the register is located;
[0101] The key generation module is used to generate a key seed of a first preset byte based on the target chip identifier and the disturbance amount data, and input the key seed into a key generation algorithm to obtain a key of a first preset byte corresponding to the register description file.
[0102] Optionally, the device further comprises:
[0103] A data generation module, used for obtaining the chip identifier of the chip where the register is located and the algorithm identifier of the preset encryption and decryption algorithm before obtaining the target data, and generating the first data of the sixth preset byte according to the chip identifier and the algorithm identifier; obtaining the system clock value, and generating the second data of the seventh preset byte according to the system clock value; and generating the third data of the seventh preset byte according to the first data and the second data through a cyclic redundancy check algorithm;
[0104] The data splicing module is used to splice the first data, the second data and the third data to obtain the encrypted verification data of the first preset bytes.
[0105] Optionally, the decryption module is further used to:
[0106] Inputting the encrypted verification data in the target register description file into the preset integrity check algorithm to obtain second check data, and determining whether the second check data is consistent with the first check data in the encrypted target register description file;
[0107] When the judgment result is consistent, the target data is obtained, and the target data and the ciphertext file in the encrypted target register description file are input into the preset encryption and decryption algorithm to obtain the temporary decryption description file.
[0108] Optionally, the device further comprises:
[0109] A data writing module, configured to input the encrypted verification data into a preset integrity verification algorithm, obtain first verification data of a third preset byte, write the first verification data into a blockchain, and record a corresponding blockchain address;
[0110] Accordingly, the decryption module is also used for:
[0111] Obtain the blockchain address, and obtain the first verification data from the corresponding blockchain according to the blockchain address;
[0112] Determining whether the first verification data is consistent with the first verification data in the encrypted target register description file;
[0113] When the judgment result is consistent, the target data is obtained, and the target data and the ciphertext file in the encrypted target register description file are input into the preset encryption and decryption algorithm to obtain the temporary decryption description file.
[0114] Optionally, the device further comprises:
[0115] A judging module, configured to judge whether the target register description file is an encrypted file after judging whether the target register description file corresponding to the target device exists in the local storage space, when the target register description file corresponding to the target device exists in the local storage space;
[0116] The encryption module is used for encrypting the target register description file when the target register description file is not an encrypted file to obtain an encrypted target register description file, and storing the encrypted target register description file in the local storage space.
[0117] Optionally, the device further comprises:
[0118] an information sending module, configured to generate authorization query information after determining whether the target register description file is an encrypted file, and send the authorization query information to a target server when the target register description file is not an encrypted file, so that the target server determines the user identity information based on the authorization query information, and inquires whether the user corresponding to the user identity information is a designated authorized user;
[0119] The information receiving module is used to receive feedback information returned by the target server, and when the feedback information indicates that the user is a non-designated authorized user, execute the step of encrypting the target register description file.
[0120] Optionally, the communication connection establishing module is used to:
[0121] In response to a start-up instruction of a device control program, detecting a preset binding device, wherein the preset binding device includes at least one, and the preset binding device is bound when the device control program is registered;
[0122] When multiple preset binding devices are successfully detected, a target device selection interface is output, and user input data is obtained from the target device selection interface. Based on the user input data, a target device is determined from the detected multiple preset binding devices, and a communication connection with the target device is established.
[0123] Optionally, the device further comprises:
[0124] a function calling module, for monitoring the access operation of the target register description file after the encrypted target register description file is stored in the local storage space, and calling a preset tracking function after monitoring that the target register description file is accessed, and determining the access path of the target register description file through the preset tracking function;
[0125] The path judgment module is used to judge whether the access path is a safe path, and when the judgment result is no, obtain the user identity information, generate an alarm email according to the access path and the user identity information, and send the alarm email to a preset receiving address.
[0126] Optionally, the path determination module is used to:
[0127] Obtain a path sequence according to each access node in the access path, and input the path sequence into a preset feature recognition model to obtain a node feature vector corresponding to each access node in the path sequence;
[0128] The node feature vector corresponding to each node is input into a preset classification model to obtain a predicted classification value corresponding to the path sequence, and whether the access path is a safe path is determined according to the predicted classification value.
[0129] It should be noted that for other corresponding descriptions of various functional units involved in a register description file protection device provided in an embodiment of the present application, reference can be made to Figures 1 to 4 The corresponding description in the method will not be repeated here.
[0130] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 6 As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0131] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0132] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0133] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0134] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for protecting a register description file, characterized in that: Applied to a control terminal, a target device is controlled by a device control program installed in the control terminal while protecting the security of a register description file, the method comprising: In response to a start instruction of the device control program, a communication connection is established with the target device, and it is determined whether a target register description file corresponding to the target device exists in the local storage space; When the target register description file does not exist in the local storage space, based on the register description file obtained from the target device, the encrypted target register description file is stored in the local storage space to control the target device based on the target register description file.
2. The method according to claim 1, characterized in that Based on the register description file obtained from the target device, storing the encrypted target register description file in the local storage space includes: Obtain a register description file from the target device, and determine whether the register description file is an encrypted file; When the register description file is not an encrypted file, encrypting the register description file to obtain an encrypted target register description file, and storing the encrypted target register description file in the local storage space; When the register description file is an encrypted file, the register description file is stored in the local storage space as an encrypted target register description file.
3. The method according to claim 2, characterized in that The method further comprises: In response to the device control instruction, read the target register description file from the local storage space, and determine whether the target register description file is an encrypted file; When the target register description file is an encrypted file, decrypting the target register description file to obtain a temporary decrypted description file, wherein the temporary decrypted description file is deleted after the target device executes a control action corresponding to the device control instruction; The temporary decryption description file is loaded, and when the loading is successful, the register indicated by the temporary decryption description file is read and written according to the device control instruction through a preset output function, so as to control the target device through the register.
4. The method according to claim 3, characterized in that The step of reading and writing the register indicated by the temporary decryption description file according to the device control instruction by using a preset output function includes: Parsing the device control instruction through the preset output function to obtain control data and user identity information; Based on the temporary decryption description file, determining a target interaction register corresponding to the preset output function and a target operation permission under the user identity information corresponding to the target interaction register; Determine whether the data permission corresponding to the control data exceeds the target operation permission, and when the data permission does not exceed the target operation permission, perform read and write operations on the target interaction register based on the control data to control the target device through the target interaction register.
5. The method according to claim 3 or 4, characterized in that: The step of encrypting the register description file to obtain an encrypted target register description file includes: Acquire target data, wherein the target data includes encrypted verification data of a first preset byte, a random number of a second preset byte, and a key of a first preset byte corresponding to an unencrypted register description file; Input the target data and the unencrypted register description file into a preset encryption and decryption algorithm to obtain a ciphertext file corresponding to the unencrypted register description file; Inputting the encrypted verification data into a preset integrity check algorithm to obtain first check data of a third preset byte; An encrypted target register description file is obtained according to the ciphertext file, the first verification data and the encrypted verification data.
6. The method according to claim 5, characterized in that Before acquiring the target data, the method further includes: Obtaining a target chip identifier of a fourth preset byte and disturbance amount data of a fifth preset byte generated according to a preset rule, wherein the target chip identifier is determined according to a chip identifier of a chip where the register is located; Based on the target chip identifier and the disturbance amount data, a key seed of a first preset byte is generated, and the key seed is input into a key generation algorithm to obtain a key of a first preset byte corresponding to the register description file.
7. The method according to claim 5, characterized in that Before acquiring the target data, the method further includes: Obtaining a chip identifier of a chip where the register is located and an algorithm identifier of the preset encryption and decryption algorithm, and generating first data of a sixth preset byte according to the chip identifier and the algorithm identifier; Acquire a system clock value, and generate second data of a seventh preset byte according to the system clock value; Generate third data of a seventh preset byte according to the first data and the second data by a cyclic redundancy check algorithm; The first data, the second data and the third data are concatenated to obtain the encrypted verification data of the first preset bytes.
8. A register description file protection device, characterized in that: The device is applied to a control terminal, and controls a target device by a device control program installed in the control terminal while protecting the security of a register description file. The device comprises: a communication connection establishing module, configured to establish a communication connection with the target device in response to a start instruction of the device control program, and determine whether a target register description file corresponding to the target device exists in the local storage space; The file storage module is used to store the encrypted target register description file in the local storage space based on the register description file obtained from the target device when the target register description file does not exist in the local storage space, so as to control the target device based on the target register description file.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
