A device management method, device, medium and device applied to FTTR network

By verifying the digital signature header and file merge package of the target file in the FTTR network, filtering and executing relevant files, the management complexity problem caused by different device models is solved, and the security and simplification of device updates and configurations are achieved.

CN118432953BActive Publication Date: 2024-09-13SICHUAN TIANYI COMHEART TELECOM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410889519.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-13
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

In the FTTR network, due to different communication equipment models and complex connection relationships, equipment debugging and update operations are complicated and management is difficult.

Method used

By obtaining the target file sent by the management platform, verify the digital signature header and the file header information of the file merge package, filter out the target file related to the main gateway, download it to the specified directory, and perform update and configuration operations.

Benefits of technology

Ensure the security and integrity of files, simplify the device management process, reduce management difficulty, and avoid misleading updates and configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118432953B
    Figure CN118432953B
Patent Text Reader

Abstract

The present application discloses a device management method, apparatus, medium and equipment applied to FTTR network, the method comprising: verifying the digital signature header of the target file; if the verification is successful, decrypting the file description table of the target file to obtain the first file description table; reading and decrypting the file merge package of the target file to obtain the file header information of the file merge package; verifying the file header information based on the first file description table; if the verification is successful, screening the first sub-file in the file merge package based on the main device file and the first file description table pre-stored in the main gateway to determine the first target file; downloading the first target file to the directory corresponding to the download path of the first file description table; executing the first target file to update and / or configure the corresponding file to obtain the updated and / or configured file. The present application aims to solve the technical problem that it is difficult to manage each communication device in the FTTR network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a device management method, apparatus, medium and equipment applied to an FTTR network. Background Art

[0002] The FTTR network includes multiple communication devices. When operating multiple communication devices, such as debugging and updating, the debugging and / or updating operations of the communication devices are relatively complicated because the models of the various communication devices and the connection relationships of the various communication devices are different, which in turn makes it difficult to manage the various communication devices in the FTTR network. Summary of the invention

[0003] The main purpose of this application is to provide a device management method, apparatus, medium and equipment applied to FTTR network, aiming to solve the technical problem that it is difficult to manage each communication device in FTTR network.

[0004] To achieve the above-mentioned purpose, the present application provides a device management method applied to an FTTR network, the method comprising: obtaining a target file sent by a management platform, and verifying a digital signature header of the target file; if the verification is successful, decrypting a file description table of the target file to obtain a first file description table; reading in and decrypting a file merge package of the target file to obtain file header information of the file merge package; verifying the file header information based on the first file description table; if the verification is successful, screening a first sub-file in the file merge package based on the first file description table and a main device file pre-stored in a main gateway to determine a first target file; downloading the first target file to a directory corresponding to a download path of the first file description table; executing the first target file to update and / or configure the corresponding file to obtain an updated and / or configured file.

[0005] Optionally, the digital signature header of the target file includes fixed plaintext information and encrypted information; verifying the digital signature header of the target file includes: verifying the fixed plaintext information of the digital signature header; if the verification passes, decrypting the encrypted information of the digital signature header to obtain file header data; verifying the file header data.

[0006] Optionally, the verification of the fixed plaintext information of the digital signature header includes: verifying whether the magic number of the fixed plaintext information matches a preset magic number; if so, verifying whether the authentication code of the fixed plaintext information is the same as the preset authentication code; if so, verifying whether the hash value of the fixed plaintext information is the same as the preset hash value; if so, the fixed plaintext information verification passes; the verification of the file header data includes: verifying whether the format of the file header data matches the preset format; if so, verifying whether the file header data contains a preset field; if so, verifying whether the hash value of the file header data is the same as the preset value; if so, the file header data verification passes, and the file header data is stored in the designated directory of the main gateway.

[0007] Optionally, the first sub-file in the file merge package is screened based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file, including: calling the main device file to mark the first file description table to determine the target download file; reading and decrypting the content of the file merge package to obtain the first sub-file; each time the first preset byte is read, it is determined whether the read first sub-file is the target download file; if so, the first sub-file is determined to be the first target file; if not, after reading the second preset byte, the first sub-file is discarded, the next sub-file of the file merge package is read and the next first target file is determined, and so on until all the sub-files in the file merge package are read and all the first target files in the file merge package are determined.

[0008] Optionally, the target file also includes an execution file; the first sub-file in the file merge package is screened based on the main device file pre-stored in the main gateway and the first file description table to determine the first target file, including: using the execution file to mark the acquired main device file to obtain the configuration file to be updated; marking the first file description table based on the configuration file to be updated to determine the target download file; reading and decrypting the content of the file merge package to obtain the first sub-file; each time the first preset byte is read, it is determined whether the read first sub-file is the target download file; if so, it is determined that the first sub-file is the first target file; if not, after reading the second preset byte, the first sub-file is discarded, the next sub-file of the file merge package is read and the next first target file is determined, and so on until all the sub-files in the file merge package are read and all the first target files in the file merge package are determined.

[0009] Optionally, while determining whether the first sub-file read in is the target download file each time the first preset byte is read in, the method further includes: identifying a tag file contained in the target file each time the first preset byte is read in to obtain a sub-target file; and sending the sub-target file to a sub-gateway so that the sub-gateway updates and / or configures the corresponding file based on the sub-target file to obtain an updated and / or configured file.

[0010] In addition, to achieve the above-mentioned purpose, the present application also provides an equipment management device applied to an FTTR network, the device comprising: a management platform, including a management platform server, the management platform server storing a target file for updating and / or configuring the equipment; a main gateway, which is communicated with the management platform, and is used to obtain the target file sent by the management platform and verify the digital signature header of the target file; if the verification is successful, the file description table of the target file is decrypted to obtain a first file description table; the file merge package of the target file is read in and decrypted to obtain the file header information of the file merge package; based on the first file description table, the file header information is verified; if the verification is successful, the first sub-file in the file merge package is screened based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file; the first target file is downloaded to a directory corresponding to the download path of the first file description table; the first target file is executed to update and / or configure the corresponding file to obtain the updated and / or configured file.

[0011] Optionally, the device also includes a sub-gateway that is communicatively connected to the main gateway; the main gateway is also used to read in the first preset byte each time, identify the tag file contained in the target file, and obtain the sub-target file; send the sub-target file to the sub-gateway so that the sub-gateway updates and / or configures the corresponding file based on the sub-target file to obtain the updated and / or configured file; the sub-gateway is used to obtain the sub-target file sent by the main gateway and verify the digital signature header of the sub-target file; if the verification is successful, decrypt the file description table of the sub-target file to obtain the second file description table; read in and decrypt the file merge package of the sub-target file to obtain the sub-file header information; based on the second file description table, verify the sub-file header information; if the verification is successful, screen the second sub-file in the sub-target file based on the sub-device file pre-stored in the sub-gateway and the second file description table to determine the second target file; download the second target file to a directory corresponding to the download path of the second file description table; execute the second target file to update and / or configure the corresponding file to obtain the updated and / or configured file.

[0012] In addition, the present application also provides a computer-readable storage medium, which includes instructions, and when the instructions are executed on a computer, the computer executes any one of the above methods.

[0013] In addition, the present application also provides a computing device, which includes: at least one processor, a memory and an input and output unit; wherein the memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute any of the methods described above.

[0014] In addition, the present application also provides a computer program product, including a computer program / instruction, which implements any of the above methods when executed by a processor.

[0015] The present application proposes a device management method, apparatus, medium and device for FTTR network. On the one hand, by verifying the digital signature header of the acquired target file and the file header information of the file merge package, it can ensure that the received target file and the file merge package have not been maliciously tampered with, thereby ensuring that when the main gateway is updated and / or configured using the files in the file merge package, it will not be misled to update and / or configure, thereby ensuring the security of device management; on the other hand, through the first file description table and the main device file pre-stored in the main gateway, the first sub-file of the file merge package is screened to determine the file related to the update and / or configuration of the main gateway, that is, the first target file; by executing the first target file to update and / or configure the corresponding file in the main gateway, the update and / or configuration of the main gateway is realized, which can effectively simplify the process of updating and / or configuring the main gateway and reduce the difficulty of device management. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of the structure of a device management device applied to an FTTR network provided in one embodiment of the present application;

[0017] Figure 2 A schematic diagram of a flow chart of a device management method applied to an FTTR network provided in an embodiment of the present application;

[0018] Figure 3 A schematic diagram of the structure of a target file of a device management method applied to an FTTR network provided by an embodiment of the present application;

[0019] Figure 4 A schematic diagram of the structure of a medium provided in one embodiment of the present application;

[0020] Figure 5 A schematic diagram of the structure of a main gateway provided in one embodiment of the present application;

[0021] Figure 6 A schematic diagram of the interaction between the management platform and the main gateway provided in one embodiment of the present application;

[0022] Figure 7 A schematic diagram of the interaction between the management platform and the sub-gateway provided in one embodiment of the present application.

[0023] Among them: 10, management platform; 20, main gateway; 30, sub-gateway; 40, optical disk; 50, computing device; 501, processing unit; 502, system memory; 5021, RAM; 5022, cache memory; 5023, ROM; 5024, program module; 5025, utility tool; 503, bus; 504, external device; 505, I / O interface; 506, network adapter.

[0024] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0025] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0026] Those skilled in the art know that the embodiments of the present application can be implemented as a system, device, equipment, method or computer program product. Therefore, the present application can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0027] The FTTR network includes multiple communication devices. When operating multiple communication devices, such as debugging and updating, the debugging and / or updating operations of the communication devices are complicated because of the different models of the communication devices and the different connection relationships of the communication devices, which in turn makes it difficult to manage the various communication devices in the FTTR network. For example, the main gateway is connected to multiple sub-gateways. The main gateway and the multiple sub-gateways have different device models, and the versions of the files required for debugging and / or updating are also different. Different debugging and / or updating files need to be sent to the main gateway and / or sub-gateways, resulting in a cumbersome debugging and / or updating operation process and difficulty in managing the main gateway and / or sub-gateways.

[0028] The main solution of the embodiment of the present application is: obtain the target file sent by the management platform, and verify the digital signature header of the target file; if the verification is successful, decrypt the file description table of the target file to obtain a first file description table; read in and decrypt the file merge package of the target file to obtain the file header information of the file merge package; based on the first file description table, verify the file header information; if the verification is successful, screen the first sub-file in the file merge package based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file; download the first target file to a directory corresponding to the download path of the first file description table; execute the first target file to update and / or configure the corresponding file to obtain the updated and / or configured file.

[0029] The present application provides a solution. On the one hand, by verifying the digital signature header of the acquired target file and verifying the file header information of the file merge package of the target file, it can be ensured that the received target file and the file merge package have not been maliciously tampered with, and further, it can be ensured that when the sub-file in the file merge package is used to update and / or configure the main gateway, it will not be misled to update and / or configure, thereby ensuring the security of device management; on the other hand, through the first file description table and the main device file pre-stored in the main gateway, the first sub-file of the file merge package is screened to determine the file related to the update and / or configuration of the main gateway, that is, the first target file; by executing the first target file to update and / or configure the corresponding file in the main gateway, the update and / or configuration of the main gateway can be realized, which can effectively simplify the process of updating and / or configuring the main gateway and reduce the difficulty of management.

[0030] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.

[0031] The principles of the present application are explained in detail below with reference to several representative implementations of the present application.

[0032] refer to Figure 1 , an embodiment of the present application provides a device management apparatus applied to an FTTR network, the device management apparatus applied to an FTTR network includes a management platform 10 and a main gateway 20 connected to the management platform 10 in communication; wherein the management platform includes a management platform server, the management platform server stores a target file for updating and / or configuring the device, and when the main gateway needs to be updated and / or configured, the management platform sends the target file to the main gateway. The main gateway receives the target file, and uses the target file to update and / or configure the relevant files on the main gateway, so as to achieve the purpose of updating and / or configuring the main gateway.

[0033] For example, Figure 6 As shown, the management platform server of the management platform sends the target file to the main gateway through the update / configuration interface. A device management method applied to the FTTR network is run on the main gateway. After the main gateway receives the target file, it can be used to obtain the target file sent by the management platform by executing a device management method applied to the FTTR network, and verify the digital signature header of the target file; if the verification is successful, the file description table of the target file is decrypted to obtain the first file description table; the file merge package of the target file is read in and decrypted to obtain the file header information of the file merge package; based on the first file description table, the file header information is verified; if the verification is successful, the first sub-file in the file merge package is screened based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file; the first target file is downloaded to the directory corresponding to the download path of the first file description table; the first target file is executed to update and / or configure the corresponding file to obtain the updated and / or configured file.

[0034] It should be noted that after the update and / or configuration of the main gateway is completed, the main gateway will feedback the update and / or configuration results to the management platform to facilitate the management platform to manage the main gateway.

[0035] Furthermore, through the first file description table and the main device file pre-stored in the main gateway, the first sub-file of the file merge package is screened to determine the file related to the update and / or configuration of the main gateway, that is, the first target file; by executing the first target file to update and / or configure the corresponding file in the main gateway, the update and / or configuration of the main gateway can be achieved, which can effectively simplify the process of updating and / or configuring the main gateway and reduce the difficulty of management.

[0036] In other embodiments, the above-mentioned apparatus may further include a sub-gateway 30 that is communicatively connected to the main gateway 20; a plurality of sub-gateways 30 may be provided.

[0037] In this embodiment, the main gateway is also used to read the first preset byte each time, identify the tag file contained in the target file, and obtain the sub-target file; send the sub-target file to the sub-gateway so that the sub-gateway updates and / or configures the corresponding file based on the sub-target file to obtain the updated and / or configured file.

[0038] For example, Figure 7As shown, a device management method applied to the FTTR network can also be run on the sub-gateway 30. After the main gateway sends the sub-target file to the sub-gateway, the sub-gateway 30 can be used to obtain the sub-target file sent by the main gateway and verify the digital signature header of the sub-target file by executing a device management method applied to the FTTR network; if the verification is successful, the file description table of the sub-target file is decrypted to obtain the second file description table; the file merge package of the sub-target file is read in and decrypted to obtain the sub-file header information; based on the second file description table, the sub-file header information is verified; if the verification is successful, the second sub-file in the sub-target file is screened based on the sub-device file and the second file description table pre-stored in the sub-gateway to determine the second target file; the second target file is downloaded to the directory corresponding to the download path of the second file description table; the second target file is executed to update and / or configure the corresponding file to obtain the updated and / or configured file.

[0039] It should be noted that after the sub-gateway is updated and / or configured, the sub-gateway will feedback the update and / or configuration results to the main gateway, so that the main gateway can monitor the sub-gateway.

[0040] And, in combination with the above embodiments, after the main gateway is updated and / or configured, the main gateway sends the sub-device file to the sub-gateway, and screens the second sub-file of the file merging package through the second file description table and the sub-device file pre-stored in the sub-gateway, and determines the file related to the sub-gateway update and / or configuration, that is, the second target file; by executing the second target file, the corresponding file in the sub-gateway is updated and / or configured, thereby realizing the update and / or configuration of the sub-gateway, which can effectively simplify the process of sub-gateway update and / or configuration, and further reduce the management difficulty.

[0041] In addition, in other embodiments, the main gateway or sub-gateway in the embodiments of the present application may also be a GPON / EPON device, and the WIFI router represented by the main gateway or sub-gateway is only equivalent to a subset of the FTTR device, and no specific examples or explanations are given.

[0042] Reference Figure 2 , an embodiment of the present application provides a device management method applied to an FTTR network, the method comprising:

[0043] Step S210, obtaining the target file sent by the management platform, and verifying the digital signature header of the target file.

[0044] In an exemplary embodiment, the device management method applied to the FTTR network can be applied to the main gateway 20 in the above embodiment, and the management platform is the management platform 10 in the above embodiment; the target file includes a digital signature header, a file description table and a file merge package; the digital signature header can be used to identify whether the target file has been maliciously tampered with, and the file description table can be used to describe which files are in the file merge package, the file name, file size, file date, function, checksum, whether it is suitable for the current device model, whether it needs to be downloaded to the current device, the download path, whether it needs to be executed, etc. of each file.

[0045] The digital signature header includes fixed plaintext information and encrypted information, both of which are 256 bytes, totaling 512 bytes. Specifically, the fixed plaintext information format can be shown in Table 1, where each line in Table 1 has 4 bytes:

[0046] Table 1

[0047]

[0048] Understandably, the fixed plaintext information includes a 4-byte magic number, which can be identified by the manufacturer's abbreviation, such as SCTY (0x53, 0x43, 0x54, 0x59), which can be used by the main gateway to quickly identify the file type. The 1-byte version number is used to identify the version of the file format. For example, if the defined version number is 1, it can indicate that the updated version of the file is 1. If the main gateway needs to be updated in the future, it can be increased on the number 1 to facilitate subsequent expansion. The 32-byte HMAC (Hash-based Message Authentication Code) is an overall calculation of the entire file description table and file merge package, which is mainly used to verify whether the file description table and file merge package have been tampered with. The 16-byte digital signature header MD5 value (Message-Digest Algorithm 5) is a widely used cryptographic hash function. It is the MD5 calculation value of the digital signature header. Before calculation, the 16 bytes need to be cleared to 0 (0x0), and then the calculated value is filled into this field. After the main gateway receives the target file, it can verify the MD5 value to determine whether the digital signature header has been tampered with. It can effectively identify illegal files and ensure the security of the file system in the main gateway. The encrypted information is 256 bytes, and the plain text is JSON format information of no more than 256 bytes. The information includes AES256 password, device manufacturer (vendor), HMAC key, etc.

[0049] It should be noted that all fields involved in the embodiments of the present application use network byte order.

[0050] In combination with the above embodiment, the above step S210 may include: verifying the fixed plaintext information of the digital signature header; if the verification is successful, decrypting the encrypted information of the digital signature header to obtain the file header data; and verifying the file header data.

[0051] Furthermore, the fixed plaintext information of the digital signature header is verified, including: verifying whether the magic number of the fixed plaintext information matches the preset magic number; if so, verifying whether the authentication code of the fixed plaintext information is the same as the preset authentication code; if so, verifying whether the hash value of the fixed plaintext information is the same as the preset hash value; if so, the fixed plaintext information verification is passed.

[0052] In an exemplary embodiment, the main gateway verifies the 4-byte magic number of the digital signature header to determine whether the magic number of the digital signature header matches the initials of the manufacturer of the main gateway; if it matches, then verify whether the 32-byte HMAC is the same as the preset HMAC stored by the main gateway; if so, then determine whether the MD5 value of the digital signature header is the same as the MD5 value stored by the main gateway, and if so, it proves that the fixed plaintext information of the digital signature header has not been tampered with. Further, the file header data is verified, including: verifying whether the format of the file header data matches the preset format; if so, verifying whether the file header data contains preset fields; if so, verifying whether the hash value of the file header data is the same as the preset value; if so, the file header data verification passes, and the file header data is stored in the designated directory of the main gateway.

[0053] In an exemplary embodiment, after the main gateway decrypts the encrypted information of the digital signature header through the stored RSA public key of the manufacturer, it first determines whether the format of the file header data is a legal JSON format; if so, it then determines whether the file header data contains preset fields, such as whether it contains AES256KEY, vendor, HMACKEY and other fields; if so, it determines whether the hash value of the file header data is consistent with the expected value stored by the main gateway, and if it is consistent, it is processed subsequently, and if it is not consistent, it is discarded. It further ensures that the received target file has not been tampered with, and then ensures that the main gateway is not misled by illegal files to update or configure.

[0054] It should be noted that if any of the above verifications fails, the target file is judged to be abnormal, and the main network directly discards the target file without processing it.

[0055] By verifying the digital signature header of the obtained target file, it can be ensured that the received target file and the file merge package have not been maliciously tampered with, thereby ensuring that when the main gateway is updated and / or configured using the files in the file merge package, it will not be misled to update and / or configure, thereby ensuring the security of device management.

[0056] Step S220: If the verification is successful, the file description table of the target file is decrypted to obtain a first file description table.

[0057] In an exemplary embodiment, the first file description table is used to describe which files are in the file merge package, as well as the file name, file size, file date, function, checksum, device model, whether to download, download path, whether to execute, etc. of each file. The actual size of the first file description table can be found in the plain text information of the digital signature header and is aligned with 512 bytes. If the part is insufficient, it is filled with 0 (0x0).

[0058] It should be noted that, for the sake of flexibility and scalability, the first file description table is described in JSON format, as shown below:

[0059] { "fileName": "000readme", "size": 13207, "time": "2025-08-25 18:00:58", "needSave": false, "ChunkedHashing": "ed423f6fe2eac936233df1e8149208df11049e841ec00a72ffdfe2b7168ad00f"}

[0060] { "fileName": "001MainFTTR.img", "size": 13207, "time": "2025-08-25 18:00:58", "matchDevices": "TEWA-861G, TEWA-862G", "needSave": true, "saveAs": " / image", "ChunkedHashing": "8263f85512b94f69f2d2f9e9ee20d4597b9fa979c99b3959a43f76f3fdc02832"}

[0061] Among them, the matchDevices field above is used by the device itself to determine whether the current file is compatible with the subset. In this embodiment, the device can be a main gateway or a sub-gateway. In matchDevices, all compatible device models are listed, and each device model is separated by a comma ','. If a matching device type is found, it means that it is compatible with the current version. Wildcard symbols, regular expressions, etc. are supported. For example, * represents all device models, and "TEWA-*" represents all devices starting with TEWA-. The needSave field indicates whether downloading is required, and the saveAs field indicates where the download is. The ChunkedHashing field is a method of calculating hash values ​​by chunking files, which can verify whether the file has been tampered with.

[0062] It should be noted that the file description table is encrypted using AES256, and the encryption method is AES256 counter method. This encryption method has good performance and anti-attack capabilities. The AES256 password and initialization vector (IV) are obtained from the JSON data in the encrypted information of the digital signature header.

[0063] Step S230, reading and decrypting the file merge package of the target file to obtain the file header information of the file merge package.

[0064] In an exemplary embodiment, reference Figure 3 The file merging package is to package multiple files into one file in the required order. In the embodiment of the present application, each file in the file merging package can be compressed according to its own needs, and whether it is compressed is described in the file description table, but the overall compression is not performed.

[0065] Among them, the file merge package in the embodiment of the present application is not compressed as a whole in order to facilitate the location of the offset value of each specific file. For example, the file merge package is in tar file format, and the tar file format is 512-byte aligned, including a 512-byte tar file description header and a 512-byte aligned file content (if less than 512 bytes, 0 is used for padding), and the tar file description header is the file header information; according to the file description table, the offset position of each file in the target file can be directly located.

[0066] In addition, each file stored in the tar package format, including the tar file header, is encrypted using AES256, and the encryption method is also the AES256 counter method (counter); the AES256 password is obtained from the RSA encrypted json data, and the initialization vector (IV) is different for each file. Considering that each file name in the tar package is different, this uses the file name as the calculation factor, and the 16-byte data of the MD5 calculation file name is used as the IV. In this way, even if the plain text content of the same file is encrypted by AES256, it can be encrypted into different contents. For example, the result of the MD5 calculation of the file "001MainFTTR.img" is 66b41d37915f511135b2b0c877e85ad4, and this parameter is used as the IV of AES. After the above processing, the entire tar package looks like a random number after encryption, even the part filled with 0 is encrypted into data that looks like a random number, without any rules, which can prevent the target file from being spied on during transmission.

[0067] It should be noted that, in the above embodiment, the file merge package is illustrated by taking the tar format as an example, and in other embodiments, the file merge package may be in other formats.

[0068] Step S240: verify the file header information based on the first file description table.

[0069] In combination with the above embodiment, after the file description table is decrypted to obtain the first file description table, the file header information of the file merge package is parsed. If the file name, file size, etc. are different from the data in the first file description table, it means that the file is an illegal file or the file content has been tampered with, and no subsequent processing will be performed.

[0070] In a specific embodiment, before writing a file, a chunked hashing algorithm can be used to perform a hash check on the file header information. Select a suitable hash algorithm, such as SHA-256, and initialize the algorithm. Each time a 512-byte data block is received, the data is processed using a hash algorithm. For each received data block (512 bytes), the current hash value is updated. After receiving and processing all data blocks, the algorithm will produce a final hash value. This value is the unique fingerprint of the entire file, and any slight change in the file will cause this hash value to be very different. This hash value is then compared with the hash value of the file with the same name in the file description table. If they are the same, it means that the file has not been tampered with. Otherwise, the file has not been tampered with, and the save of the file is withdrawn and subsequent processing is stopped.

[0071] Step S250: If the verification is successful, the first sub-file in the file merging package is screened based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file.

[0072] In a specific embodiment, the above step S250 may include: calling the main device file to mark the first file descriptor table to determine the target download file; reading and decrypting the content of the file merge package to obtain the first sub-file; each time the first preset byte is read, it is determined whether the read first sub-file is the target download file; if so, the first sub-file is determined to be the first target file; if not, after reading the second preset byte, the first sub-file is discarded, the sub-file of the next file merge package is read and the next first target file is determined, and so on until all the sub-files in the file merge package are read and all the first target files in the file merge package are determined.

[0073] It can be understood that the master device file is a file to be updated and / or configured by the master gateway stored in the master gateway. The first preset byte is 512. The master device file is compared with the first file description table to determine the file that needs to be updated and / or configured by the master gateway, that is, the target download file. When reading the content of the file merge package, the files to be downloaded are downloaded to the specified directory according to the target download file, and the files that do not need to be downloaded are discarded after reading 512 bytes, until all sub-files of the file merge package are read, and all sub-files that need to be downloaded in the file merge package are determined.

[0074] For example, every time 512 bytes are read in, if there is a run field, they are first stored in the specified location of saveAs, and then the current file is executed immediately. The current executable file can be a script file (linux shell, Python, Javascript, etc.), a binary file (such as ELF file under linux, etc.), or a dynamic library (such as so file under linux).

[0075] If the file is not the one you need, discard each 512 bytes read in until the file is finished, and then read the next file. In this way, you can parse and receive the required file without a large memory (or other storage space). Also, during the reading process, in order to further save memory, you can read and write at the same time, especially for devices that use flash as the storage medium, write to flash every time 128K bytes (or bytes of other sizes) are read in (128K is the smallest unit block for many flash storage reads and writes), so you don't need to read a complete file into the memory to start writing, thereby further reducing memory usage.

[0076] In other embodiments, the target file also includes an execution file, and the above step S250 may include: using the execution file to mark the acquired main device file to obtain the configuration file to be updated; marking the first file description table based on the configuration file to be updated to determine the target download file; reading and decrypting the content of the file merge package to obtain the first sub-file; each time the first preset byte is read, it is determined whether the read first sub-file is the target download file; if so, it is determined that the first sub-file is the first target file; if not, after reading the second preset byte, the first sub-file is discarded, the sub-file of the next file merge package is read and the next first target file is determined, and so on until all the sub-files in the file merge package are read and all the first target files in the file merge package are determined.

[0077] In an exemplary embodiment, the main gateway may not have the ability to directly identify the configuration file to be updated, and may give a certain executable file the ability to identify the configuration file to be updated when the management platform packages the target file. In other embodiments, some executable files can not only be used for direct and indirect update and / or configuration, but also for collecting device information, operating environment information, debugging devices, and interacting with the platform.

[0078] It should be noted that during the update process, the main gateway needs to save a series of version information, such as system version information, plug-in version information, configuration version information, etc., and if necessary, it is also necessary to maintain the checksum values ​​of these files (such as SHA-256 hash values). In this way, each time an update is made, an executable file can be built into the updated version file, such as 001a, to check the information in the updated version file and the device version information, and make a series of comprehensive judgments to determine whether the current device needs a full update, a partial update, or no update is required. After that, the first file description table is marked according to the judgment result to determine which sub-files of the file merge package of the target file need to be downloaded and saved and which need to be discarded, so that the corresponding operations can be performed when reading the sub-files of the file merge package, thereby avoiding unnecessary updates or some operations that may have negative effects, such as unnecessary restarts.

[0079] Step S260: download the first target file to a directory corresponding to the download path of the first file description table.

[0080] In an exemplary embodiment, in order to prevent duplicate file names and to arrange the file sequence in the desired order, a 3-byte serial number is added to each file name regardless of the original file name, in the format of: XYZ [original file name]. Where XYZ represents a number from 0 to 9. For example, if there are three files with the same name of a, regardless of whether the file contents are the same, they are modified to: 000a, 001a, 002a by the new rule. The three-digit XYZ can represent 1000 numbers in the range of 000-999.

[0081] After the above rules are modified, for example, when using the tar command to package, three files can be placed in the same directory without duplication of names or overwriting each other. The tar command automatically sorts the files by numerical sequence number when packaging. If you want a file to be ranked higher in the tar package, set the XYZ numerical value to a smaller one, otherwise, set it to a larger one. For example, 000a is at the front, 001a is next, and 002a is at the end. And when the main gateway receives the target file, the main gateway can also receive the files in the order of the sequence number, with the files with smaller sequence numbers before the files with larger sequence numbers, to ensure that the main gateway filters out the files that need to be downloaded during the reading and writing process.

[0082] In addition, in the tarball, the minimum space occupied by each file is a multiple of 512 bytes, including 512 bytes of tar file header information and 512 bytes of file content. The insufficient part is filled with 0x0. The real length of the file can be found in the tar file header information and the file description table. When using socket to read file data transmitted over the network, read exactly 512 bytes each time. When it is less than 512 bytes, wait for the insufficient part until either 512 bytes are read or the waiting timeout (timeout indicates network failure) stops.

[0083] In combination with the above embodiment, after reading the 512-byte tar file header, decrypt the file tar file header, and then decrypt the file content. If there is saveAs field information in the previous file description table, it is stored in the specified location. And according to the chmod, owner and other fields in the first file description table, the executable attribute, read-write attribute, file group and other information of the file are modified.

[0084] Step S270: executing the first target file to update and / or configure the corresponding file to obtain an updated and / or configured file.

[0085] In an exemplary embodiment, the file downloaded in the embodiment of the present application can be an image file for updating the main gateway (a system file after the device is started next time), or a configuration file, an executable file for performing specific functions (including ELF files and various script files), etc. For example, 001a is a configuration file, 002b is a file for repartitioning, 003d is a file for performing specific operations before updating, 004d is an image file, and 005e is a file for performing specific operations after updating. In the embodiment of the present application, files 001a to 005e are downloaded to the specified location in sequence according to the above download rules. After 003d is downloaded and before 004d is downloaded, 003d checks various conditions of the configuration and system to determine whether the flash partition needs to be repartitioned. If repartitioning is required, call the executable file 002b to repartition the flash partition according to the new configuration, and safely transfer the previous configuration data to the new partition. After execution, download 004d to the new image partition, then download and run file 005e. File 005e determines whether the entire update is successful, reports platform-specific information, updates the device's update information, and decides whether and when to restart.

[0086] It should be noted that the main gateway cannot be restarted temporarily during the sub-gateway update process to avoid the sub-gateway update file transfer being interrupted by the main gateway restart. It can only be restarted after confirming that the sub-gateway update is successful.

[0087] In other embodiments, when the update or configuration steps of the main gateway or the sub-gateway need to be changed, an agent field can be added to the file description table when the management platform packages the file to change the update or configuration steps of the main gateway or the sub-gateway. For example:

[0088] {"fileName": "000libagent.so", "size": 13207, "time": "2024-01-05 11:12:58", "needSave": true, "saveAs": " / var / libagent.so", "agent": "upgradeHandle"}

[0089] Understandably, the above content indicates that you need to first download the 000libagent.so file and store it in / var / libagent.so, then use dlopen to open the dynamic library libagent.so and execute the upgradeHandle function. At this time, all subsequent file data reception and processing are performed by the upgradeHandle agent. In this way, you can change the execution steps of the update or configuration directly in the target file, further simplify the management program, and facilitate device management.

[0090] In other embodiments, while determining whether the first sub-file read in is the target download file each time the first preset byte is read in, the method also includes: identifying a marker file contained in the target file each time the first preset byte is read in to obtain a sub-target file; sending the sub-target file to the sub-gateway so that the sub-gateway updates and / or configures the corresponding file based on the sub-target file to obtain an updated and / or configured file.

[0091] In an exemplary embodiment, both the sub-target file and the target file include a digital signature header, a file description table, and a file merge package; the sub-target file is a file in the file merge package of the main gateway. If there are multiple models of sub-gateways under the main gateway, the number of sub-gateway models is the number of sub-target files, and one sub-target file corresponds to one model of sub-gateway. The first preset byte is 512 bytes.

[0092] It is understandable that when the management platform updates and / or configures the equipment connected to the FTTR network, because there are multiple main gateways and multiple sub-gateways with multiple models, for example, a main gateway and several sub-gateways communicating with the main gateway have multiple models, and the update and / or configuration files corresponding to each model are different, this results in the management platform performing unified updates and / or configurations on a main gateway and multiple sub-gateways connected to the main gateway, which makes the operation more complicated and the management more difficult. Therefore, in order to conveniently and quickly update and / or configure a main gateway and multiple sub-gateways, the management platform of the embodiment of the present application packages all the files required for updating and / or configuring a main gateway and its connected sub-gateways into a target file. The file merge package of the target file contains the sub-target file. After the sub-target file is recognized by the main gateway, the main gateway stores the sub-target file in the memory of the main gateway or in other storage space (for example, in flash). At this time, the main gateway acts as an upgrade server and pushes the sub-target file to the sub-gateway of the corresponding model. The sub-gateway processes and executes the sub-target file. The specific steps are consistent with the above-mentioned main gateway processing and executing the target file. Please refer to the above-mentioned steps S210 to S270 for details, and the embodiment of the present application will not be repeated.

[0093] In other embodiments, the main gateway may not have the ability to identify the marker file contained in the target file, and may identify it through the files packaged by the management platform. For example, the main gateway downloads and runs the 007e executable file. Through the 007e executable file, the main gateway understands how to update / configure the sub-gateway, how to obtain the sub-target file, and the directory to download the sub-target file, etc.

[0094] Furthermore, in other embodiments, in order to make the packaged file smaller and the transmission and execution efficiency more efficient, the common files used for updating / configuration of the main gateway and the sub-gateway can be extracted as shared files of the main gateway and the sub-gateway, and only the sub-target files customized for a single model of device are dedicated to a certain device.

[0095] By implementing the above-mentioned steps S210 to S270, on the one hand, by verifying the digital signature header of the acquired target file and verifying the file header information of the file merge package, it can be ensured that the received target file and the file merge package have not been maliciously tampered with, thereby ensuring that when the files in the file merge package are used to update and / or configure the main gateway, it will not be misled to update and / or configure, thereby ensuring the security of device management; on the other hand, through the first file description table and the main device file pre-stored in the main gateway, the first sub-file of the file merge package is screened to determine the file related to the update and / or configuration of the main gateway, that is, the first target file; by executing the first target file to update and / or configure the corresponding file in the main gateway, the update and / or configuration of the main gateway is realized, which can effectively simplify the process of updating and / or configuring the main gateway and reduce the difficulty of management.

[0096] In addition, in the embodiment of the present application, after the main gateway is updated and / or configured, the main gateway sends a sub-target file to the sub-gateway, and screens the second sub-file of the file merging package through the second file description table and the sub-device file pre-stored in the sub-gateway to determine the file related to the sub-gateway update and / or configuration, that is, the second target file; by executing the second target file to update and / or configure the corresponding file in the sub-gateway, the sub-gateway can be updated and / or configured, which can effectively simplify the process of sub-gateway update and / or configuration, and further reduce the management difficulty.

[0097] After introducing the method and apparatus of the exemplary embodiment of the present application, next, reference is made to Figure 4 For a description of the computer-readable storage medium of the exemplary embodiment of the present application, please refer to Figure 4, the computer-readable storage medium shown is a CD 40, on which a computer program (i.e., a program product) is stored. When the computer program is executed by the processor, the steps recorded in the above method implementation are implemented, for example, obtaining the target file sent by the management platform and verifying the digital signature header of the target file; if the verification is successful, decrypting the file description table of the target file to obtain a first file description table; reading in and decrypting the file merge package of the target file to obtain the file header information of the file merge package; verifying the file header information based on the first file description table; if the verification is successful, screening the first sub-file in the file merge package based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file; downloading the first target file to a directory corresponding to the download path of the first file description table; executing the first target file to update and / or configure the corresponding file to obtain the updated and / or configured file; the specific implementation method of each step is not repeated here.

[0098] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0099] After introducing the method, apparatus and medium of the exemplary embodiments of the present application, next, reference is made to Figure 5 A computing device for computing processing according to an exemplary embodiment of the present application.

[0100] Figure 5 A block diagram of an exemplary computing device 50 suitable for implementing embodiments of the present application is shown. Figure 5 The computing device 50 shown is merely an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present application.

[0101] It should be noted that in the embodiment of the present application, the computing device 50 can be the main gateway 20 in the above embodiment, which is used to perform storage calculations when executing the device management method applied to the FTTR network; it can also be the sub-gateway 30 in the above embodiment, which is used to perform storage calculations when updating and / or configuring.

[0102] like Figure 5 As shown, the components of the computing device 50 may include, but are not limited to: one or more processors or processing units 501 , a system memory 502 , and a bus 503 connecting different system components (including the system memory 502 and the processing unit 501 ).

[0103] The computing device 50 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computing device 50, including volatile and non-volatile media, removable and non-removable media.

[0104] The system memory 502 may include computer system readable media in the form of volatile memory, such as RAM 5021 and / or cache memory 5022, where RAM is a random access memory. The computing device 50 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, ROM 5023 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 is not shown in the Figure 5 As shown in the figure, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical media) can be provided. In these cases, each drive can be connected to the bus 503 through one or more data medium interfaces. The system memory 502 may include at least one program product, which has a set (such as at least one) of program modules, which are configured to perform the functions of each embodiment of the present application.

[0105] A program / utility 5025 having a set (at least one) of program modules 5024 may be stored, for example, in system memory 502, and such program modules 5024 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 5024 generally perform the functions and / or methods of the embodiments described herein.

[0106] The computing device 50 may also communicate with one or more external devices 504 (e.g., a keyboard, a pointing device, a display, etc.). Such communication may be performed via an I / O interface 505, which is an input / output interface. Furthermore, the computing device 50 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 506. Figure 5 As shown, the network adapter 506 communicates with other modules (such as the processing unit 501, etc.) of the computing device 50 via the bus 503. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with computing device 50 .

[0107] The processing unit 501 executes various functional applications and data processing by running the program stored in the system memory 502, for example, obtaining the target file sent by the management platform and verifying the digital signature header of the target file; if the verification is successful, decrypting the file description table of the target file to obtain the first file description table; reading and decrypting the file merge package of the target file to obtain the file header information of the file merge package; verifying the file header information based on the first file description table; if the verification is successful, screening the first sub-file in the file merge package based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file; downloading the first target file to the directory corresponding to the download path of the first file description table; executing the first target file to update and / or configure the corresponding file to obtain the updated and / or configured file. The specific implementation method of each step will not be repeated here. It should be noted that although several units / modules or sub-units / sub-modules of the equipment management device applied to the FTTR network are mentioned in the above detailed description, this division is only exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0108] In the description of the present application, it should be noted that the terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0110] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0112] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0113] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0114] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

[0115] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

Claims

1. A device management method applied to an FTTR network, characterized in that: The method comprises: Obtain the target file sent by the management platform, and verify the digital signature header of the target file; If the verification is successful, the file description table of the target file is decrypted to obtain a first file description table; Read in and decrypt the file merge package of the target file to obtain the file header information of the file merge package; Based on the first file description table, verifying the file header information; If the verification is successful, the first sub-file in the file merging package is screened based on the first file description table and the master device file pre-stored in the master gateway to determine the first target file; Downloading the first target file to a directory corresponding to the download path of the first file description table; Executing the first target file to update and / or configure the corresponding file to obtain an updated and / or configured file; The digital signature header of the target file includes fixed plaintext information and encrypted information; and verifying the digital signature header of the target file includes: Verifying the fixed plaintext information of the digital signature header; If the verification is successful, the encrypted information of the digital signature header is decrypted to obtain the file header data; Verifying the file header data; The verifying the fixed plaintext information of the digital signature header includes: Verify whether the magic number of the fixed plaintext information matches the preset magic number; if so, verify whether the authentication code of the fixed plaintext information is the same as the preset authentication code; if so, verify whether the hash value of the fixed plaintext information is the same as the preset hash value; if so, the fixed plaintext information is authenticated; The verifying the file header data includes: Verifying whether the format of the file header data matches a preset format; If yes, verify whether the file header data contains a preset field; If it does, verify whether the hash value of the file header data is the same as the preset value; If yes, the file header data verification is passed, and the file header data is stored in the designated directory of the main gateway; The method of screening the first sub-file in the file merging package based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file includes: calling the main device file to mark the first file description table to determine the target download file; reading and decrypting the content of the file merging package to obtain the first sub-file; each time the first preset byte is read, determining whether the read first sub-file is the target download file; if so, determining that the first sub-file is the first target file; if not, after reading the second preset byte, discarding the first sub-file, reading the next sub-file of the file merging package and determining the next first target file, and so on until all the sub-files in the file merging package are read and all the first target files in the file merging package are determined; or, The target file also includes an execution file, and the first sub-file in the file merge package is screened based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file, including: using the execution file to mark the acquired main device file to obtain the configuration file to be updated; marking the first file description table based on the configuration file to be updated to determine the target download file; reading and decrypting the content of the file merge package to obtain the first sub-file; each time the first preset byte is read, it is determined whether the read first sub-file is the target download file; if so, it is determined that the first sub-file is the first target file; if not, after reading the second preset byte, the first sub-file is discarded, the next sub-file of the file merge package is read and the next first target file is determined, and so on until all the sub-files in the file merge package are read and all the first target files in the file merge package are determined.

2. The method according to claim 1, characterized in that While each time the first preset byte is read in and whether the first sub-file read in is the target download file, the method further includes: Each time the first preset byte is read in, a marker file contained in the target file is identified to obtain a sub-target file; The sub-target file is sent to the sub-gateway, so that the sub-gateway updates and / or configures the corresponding file based on the sub-target file to obtain the updated and / or configured file.

3. A device management device applied to FTTR network, characterized in that: The device comprises: A management platform, including a management platform server storing target files for updating and / or configuring devices; The main gateway is connected to the management platform for communication, and is used to obtain the target file sent by the management platform, and verify the digital signature header of the target file; if the verification is successful, the file description table of the target file is decrypted to obtain the first file description table; the file merge package of the target file is read in and decrypted to obtain the file header information of the file merge package; based on the first file description table, the file header information is verified; if the verification is successful, the first sub-file in the file merge package is screened based on the main device file pre-stored in the main gateway and the first file description table to determine the first target file; the first target file is downloaded to the first file description table connected to the first file description table. the directory corresponding to the download path of the table; executing the first target file to update and / or configure the corresponding file to obtain the updated and / or configured file; the digital signature header of the target file includes fixed plaintext information and encrypted information; the verification of the digital signature header of the target file includes: verifying the fixed plaintext information of the digital signature header; if the verification is successful, decrypting the encrypted information of the digital signature header to obtain file header data; verifying the file header data; the verification of the fixed plaintext information of the digital signature header includes: verifying whether the magic number of the fixed plaintext information matches the preset magic number; if so, verifying the authentication code of the fixed plaintext information is the same as the preset authentication code; if so, verifying whether the hash value of the fixed plaintext information is the same as the preset hash value; if so, the fixed plaintext information is verified; the verification of the file header data includes: verifying whether the format of the file header data matches the preset format; if so, verifying whether the file header data contains a preset field; if so, verifying whether the hash value of the file header data is the same as the preset value; if so, the file header data is verified, and the file header data is stored in the designated directory of the main gateway; the first sub-file in the file merge package is screened based on the first file description table and the main device file pre-stored in the main gateway, Determining the first target file includes: calling the main device file to mark the first file description table to determine the target download file; reading and decrypting the content of the file merge package to obtain the first sub-file; each time the first preset byte is read, determining whether the read first sub-file is the target download file; if so, determining that the first sub-file is the first target file; if not, after reading the second preset byte, discarding the first sub-file, reading the next sub-file of the file merge package and determining the next first target file, and so on until all the sub-files in the file merge package are read and all the first target files in the file merge package are determined; or, The target file also includes an execution file, and the first sub-file in the file merge package is screened based on the first file description table and the main device file pre-stored in the main gateway to determine the first target file, including: using the execution file to mark the acquired main device file to obtain the configuration file to be updated; marking the first file description table based on the configuration file to be updated to determine the target download file; reading and decrypting the content of the file merge package to obtain the first sub-file; each time the first preset byte is read, it is determined whether the read first sub-file is the target download file; if so, it is determined that the first sub-file is the first target file; if not, after reading the second preset byte, the first sub-file is discarded, the next sub-file of the file merge package is read and the next first target file is determined, and so on until all the sub-files in the file merge package are read and all the first target files in the file merge package are determined.

4. The device according to claim 3, characterized in that The device also includes a sub-gateway communicatively connected to the main gateway; The main gateway is also used to read the first preset byte each time, identify the tag file contained in the target file, and obtain a sub-target file; send the sub-target file to the sub-gateway, so that the sub-gateway updates and / or configures the corresponding file based on the sub-target file to obtain an updated and / or configured file; The sub-gateway is used to obtain the sub-target file sent by the main gateway, and verify the digital signature header of the sub-target file; if the verification is successful, decrypt the file description table of the sub-target file to obtain a second file description table; read and decrypt the file merge package of the sub-target file to obtain sub-file header information; and verify the sub-file header information based on the second file description table; If the verification is successful, the second sub-file in the sub-target file is screened based on the sub-device file pre-stored in the sub-gateway and the second file description table to determine the second target file; Download the second target file to a directory corresponding to the download path of the second file description table; execute the second target file to update and / or configure the corresponding file to obtain an updated and / or configured file.

5. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 2.

6. A computing device, characterized in that The computing device comprises: at least one processor, memory, and input-output unit; The memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute the method as described in any one of claims 1 to 2.