Batch activation method and system for off-line equipment and related products

Through the combination of UDP broadcast and TCP packets, the rapid address acquisition and batch activation of offline devices are achieved, and the cumbersome activation process in the prior art is solved, and the device activation efficiency is improved.

CN119561751AActive Publication Date: 2025-03-04HUNAN KAIHONG ZHIGU DIGITAL IND DEV CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411729486.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-04
Estimated Expiration
2044-11-29

Smart Images

  • Figure CN119561751A_ABST
    Figure CN119561751A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information, in particular to an off-line device batch activation method and system and a related product, and the method comprises the steps: rapidly obtaining the addresses of all target off-line devices in a target local area network through a UDP data communication mode, building TCP data communication connection according to the addresses, and obtaining the device information of the target off-line devices by sending a TCP data packet; and requesting the cloud to generate an activation voucher required by activation by using the acquired equipment information, and distributing the activation voucher to the target offline equipment, so that the target offline equipment completes batch activation by using the activation voucher. Compared with the prior art that one off-line device needs to be activated manually, and then the other remaining devices are activated by using the manually activated off-line device as a bridge, the method and the device are not limited; the purpose of efficient batch activation is achieved, one-time batch activation of the off-line equipment is truly achieved, the activation process is simplified, and the activation efficiency of the off-line equipment is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method and system for batch activation of offline devices and related products. Background Art

[0002] With the development of information technology, the activation of offline devices will be applied to all walks of life. When deploying a network environment within an enterprise, there will be a large number of offline devices such as industrial computers in production workshops and computers in conference rooms. These offline devices need to be uniformly deployed and activated to ensure that the devices can run various applications required by the enterprise normally and meet the security and management requirements of the enterprise; or, in some remote areas or network-restricted environments, the network infrastructure is not perfect and the devices cannot be connected to the Internet. For example, meteorological monitoring stations in remote mountainous areas and monitoring equipment in field scientific research bases need to be activated offline to ensure their normal operation so that data can be continuously collected and transmitted in a network-free environment. Or, in the military or security-sensitive fields, for security and confidentiality reasons, some military equipment or security-sensitive equipment is prohibited from connecting to external networks. In this case, offline activation becomes an important means to ensure the normal operation of equipment and data security, ensuring that the equipment can perform its specific functions under strict security control.

[0003] In the prior art, the method for activating offline devices is: first, configure any offline device in the local area network through manual activation to make it a non-offline device, then use the non-offline device as a medium to obtain the activation certificate required by other offline devices of the same type in the local area network from the cloud or other network terminals through network connection, and then use the non-offline device as a medium to distribute the activation certificate to other offline devices of the same type in the local area network; thereby realizing batch activation of other offline devices of the same type in the local area network. This reduces the workload of manually activating offline devices one by one and improves the activation efficiency of offline devices.

[0004] However, the existing offline device activation method is limited in that one device must be manually activated before other offline devices can be activated in batches. In actual application scenarios, especially when large-scale devices are deployed, this method cannot truly achieve one-time batch activation, resulting in a cumbersome and time-consuming activation process, which does not meet the needs of efficient batch activation. Summary of the invention

[0005] This application provides a method, system and related products for offline device batch activation, which can realize one-time batch activation of offline devices without the restriction of manual activation when deploying large-scale devices, simplify the activation process, realize efficient batch activation, and greatly improve the activation efficiency of offline devices. This is achieved through the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a method for batch activation of offline devices, comprising: sending a UDP broadcast data packet to a target router in a target local area network; wherein the target local area network is the local area network where the target offline device to be activated is located, and the target router is used to forward the UDP broadcast data packet to all target offline devices, and the UDP broadcast data packet includes a device address acquisition instruction, and the device address acquisition instruction is used to instruct the target offline device to feedback a first device address to the target router; receiving the first device address forwarded by the target router; sending TCP data packets to the first target offline device respectively through the target router, wherein the first target offline device is the target offline device corresponding to the first device address, and the TCP data packet includes a device information acquisition instruction, and the device information acquisition instruction Used to instruct the first target offline device to feed back the first device information to the target router; receive the first device information forwarded by the target router; when detecting a selection instruction input by the user, trigger a batch activation operation for the second target offline devices, wherein the selection instruction is used to determine the second device information to be activated from the first device information, and the second target offline device is the target offline device corresponding to the second device information; the activation operation includes: obtaining the activation certificate required for activating the second target offline device, and sending activation instructions to the second target offline devices respectively through the target router, wherein the activation certificate is generated by the cloud based on the second device information, the activation instruction includes the activation certificate, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

[0007] In a second aspect, an embodiment of the present application provides a system for batch activation of offline devices, including: a UDP broadcast module, used to send a UDP broadcast data packet to a target router in a target local area network, wherein the target local area network is the local area network where the target offline device to be activated is located, and the target router is used to forward the UDP broadcast data packet to all target offline devices, and the UDP broadcast data packet includes a device address acquisition instruction, and the device address acquisition instruction is used to instruct the target offline device to feedback a first device address to the target router; a receiving module, used to receive the first device address forwarded by the target router; a sending module, used to send TCP data packets to the first target offline device through the target router, wherein the first target offline device is the target offline device corresponding to the first device address, and the TCP data packet includes a device information acquisition instruction, and the device information acquisition instruction is used to instruct the target offline device to feedback a first device address to the target router. The fetch instruction is used to instruct the first target offline device to feed back the first device information to the target router; the receiving module is also used to receive the first device information forwarded by the target router; the batch activation module is used to trigger a batch activation operation on the second target offline devices when a selection instruction input by the user is detected, wherein the selection instruction is used to determine the second device information to be activated from the first device information, and the second target offline device is the target offline device corresponding to the second device information; the activation operation includes: obtaining the activation certificate required for activating the second target offline device, and sending activation instructions to the second target offline devices respectively through the target router, wherein the activation certificate is generated by the cloud based on the second device information, the activation instruction includes the activation certificate, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; a memory communicatively connected to the at least one processor; and a computer program stored in the memory and running on the at least one processor; wherein the at least one processor, when executing the computer program, is used to implement a method for batch activation of offline devices described in the first aspect above.

[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein a computer program contained in the computer-readable storage medium is used to implement a method for batch activation of offline devices described in the first aspect when executed by a computer device.

[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a computer device, it is used to implement the offline device batch activation method described in the first aspect above.

[0011] From the above, it can be seen that this application has the following beneficial effects:

[0012] The execution subject of the offline device batch activation method described in the present application includes but is not limited to the offline device batch activation system, electronic device, computer-readable storage medium and computer program product described above. The execution subject sends a UDP broadcast data packet to the target local area network. This UDP broadcast data communication does not need to establish a connection in advance, and can quickly send out the UDP broadcast data packet. The network interface of the receiving device (i.e., the above-mentioned target offline device) in the target local area network will receive all the UDP broadcast data packets that arrive, and pass them to the upper layer UDP protocol for processing. If the UDP port of the receiver matches the target port specified by the sender, the data in the data packet will be passed to the corresponding application for processing. Based on the device address acquisition instruction in the data packet, its device address is fed back to the execution subject. The execution subject then establishes a TCP connection with the target offline device one by one according to the device address, and obtains the device information of the target offline device by sending a TCP data packet and using the device information acquisition instruction contained therein. The user can freely select the offline device to be activated through the operation interface of the execution subject. When the execution subject detects the selection instruction input by the user, it triggers it to perform a batch activation operation on the offline device selected by the user. The batch activation operation is specifically carried out by establishing an HTTPS network connection between the execution entity and the cloud, using the acquired device information to request the cloud to generate the activation credentials required for device activation, and then sending the activation credentials fed back by the cloud to all offline devices that need to be activated through a TCP protocol connection to complete the batch offline activation.

[0013] In summary, when facing large-scale equipment deployment, the present application does not need to rely on manual activation of one of the offline devices first, and then use the manually activated offline device as a bridge to activate the remaining devices, as in the prior art. Without being restricted by this, the UDP data communication within the local area network can be used to quickly obtain the address of the target offline device to be activated, thereby achieving the purpose of batch activation; at the same time, UDP broadcast data communication does not need to establish a connection in advance, and can achieve rapid data transmission; based on these two advantages, the offline device batch activation method described in the present application can achieve the purpose of efficient batch activation, truly realize one-time batch activation of offline devices, simplify the activation process, and greatly improve the activation efficiency of offline devices. On the other hand, all target offline devices that need to be activated do not need to be connected to any external network, but only need to be connected to the above-mentioned execution subject through a special network channel (UDP, TCP) with the specified protocol to achieve information exchange, which is conducive to improving the completeness of the target offline device during the activation process.

[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A schematic diagram of a network architecture provided for an embodiment of the present application;

[0017] Figure 2 A flowchart of a method for batch activation of offline devices provided in an embodiment of the present application;

[0018] Figure 3 Another schematic diagram of a network architecture provided in an embodiment of the present application;

[0019] Figure 4 A schematic diagram of an activation selection interface provided in an embodiment of the present application;

[0020] Figure 5 A signaling interaction diagram of a method for batch activation of offline devices provided in an embodiment of the present application;

[0021] Figure 6 A flowchart of another offline device batch activation method provided in an embodiment of the present application;

[0022] Figure 7 A schematic diagram of a process for obtaining an activation certificate provided in an embodiment of the present application;

[0023] Figure 8 A schematic diagram of the structure of an offline device batch activation system provided in an embodiment of the present application;

[0024] Fig. 9 A schematic diagram of the structure of a computer electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] Embodiment 1

[0027] The present application provides a method for batch activation of offline devices. The execution subject of the method includes but is not limited to the above-mentioned offline device batch activation system, electronic device, computer-readable storage medium and computer program product. The specific manifestations can be computer devices, laptops, mobile terminals, smart phones, etc. The execution subject has the function of connecting to the cloud through the HTTPS network to achieve the HTTPS network connection with the cloud. In the specific implementation manner of the present application, the computer device is used as an example of the manifestation of the execution subject, which is named as the execution device. The execution device is installed with a program or system for implementing the method described in the present application, which will not be repeated in the following text. Figure 1 As shown, it is a schematic diagram of the network architecture provided in an embodiment of the present application, wherein the execution device is connected to the target router in the target local area network via UDP communication, and the target router serves as a network transit and is respectively connected to all target offline devices in the target local area network via UDP communication.

[0028] See also Figure 2 , the method comprises the following steps:

[0029] 101. Send a UDP broadcast packet to the target router in the target LAN.

[0030] The target local area network is the local area network where the target offline device to be activated is located, and the target router is used to forward the UDP broadcast data packet to all target offline devices.

[0031] UDP broadcast is a network communication method based on User Datagram Protocol (UDP), which allows a device to send data to multiple devices in the same network without establishing a connection in advance. Its working principle is: UDP is a connectionless transport layer protocol. When sending data, it does not need to establish a connection in advance like the Transmission Control Protocol (TCP), but directly sends the datagram to the network.

[0032] A specific implementation method may be as follows: the execution device sets the target address of the UDP broadcast data packet to a broadcast address. The commonly used broadcast address in IPV4 is 255.255.255.255, which represents all devices in the same network. That is, when the target router in the target LAN receives the UDP broadcast data packet with the target address of 255.255.255.255 sent by the execution device, the target router will forward it to all target offline devices in the network.

[0033] The UDP broadcast data packet includes a device address acquisition instruction, and the device address acquisition instruction is used to instruct the target offline device to feed back the first device address to the target router. That is, after receiving the UDP broadcast data packet, the target offline device passes it to the upper-layer UDP protocol of the device itself for processing. If the UDP port of the current device matches the target port specified by the sender (i.e., the specified target address 255.255.255.255 of the UDP broadcast data packet), the data in the UDP broadcast data packet will be passed to the corresponding application of the device itself for processing, and the device address acquisition instruction therein will be obtained. Based on the device address acquisition instruction, the device address of the current device itself (i.e., the first device address) will be fed back to the sender (i.e., the target router); the target router then forwards the first device address to the execution device.

[0034] To summarize, the execution device quickly obtains the first device addresses of all target offline devices to be activated in the target LAN by sending UDP broadcast data packets to the target LAN. UDP broadcast can quickly distribute data packets to all offline devices in the LAN of the same network segment without establishing a connection in advance. As long as the offline devices in the LAN have corresponding UDP ports for listening to UDP broadcast data packets from the network, they can receive the UDP broadcast data packets sent by the execution device. In this way, before the target offline device is activated, all target offline devices in the network are scanned by UDP broadcast to avoid omissions.

[0035] 102. Receive the first device address forwarded by the target router.

[0036] As described above, the target offline device feeds back the first device address of the current device itself to the target router based on the device address acquisition instruction. The target router, as a data transfer station of the target LAN, forwards the acquired first device addresses of all target offline devices to the execution device.

[0037] 103. Send TCP data packets to the first target offline device respectively through the target router.

[0038] The first target offline device is the target offline device corresponding to the first device address, and the TCP data packet includes a device information acquisition instruction, and the device information acquisition instruction is used to instruct the first target offline device to feed back first device information to the target router.

[0039] like Figure 3As shown, the execution device establishes a TCP (Transmission Control Protocol) connection with the first device address according to the first device address fed back by the target router, thereby realizing a one-to-one data communication connection between the execution device and the first target offline device, and the data transmission security is higher. TCP transmission can provide reliable data transmission services, and ensure the accurate transmission of data through sequence numbers, confirmation responses, and retransmission mechanisms. If the data is lost or damaged during the transmission process, the receiver will notify the sender to retransmit until the data is correctly received. Therefore, it also establishes a network connection foundation for the subsequent distribution of the activation certificate required for activation to the target offline device through the target router, avoiding the phenomenon that the target offline device fails to receive the activation certificate or the sender fails to send the activation certificate, which causes the target offline device to fail to activate.

[0040] The first target offline device receives the TCP data packet forwarded by the target router, parses the TCP data packet using a TCP protocol processor, obtains the device information acquisition instruction therein, and based on the device information acquisition instruction, feeds back the device information of the device itself (i.e., the first device information) to the target router, and then forwards it to the execution device through the target router. The first device information may include, but is not limited to, a device serial number, a device physical address, a version number, a device ID, etc.

[0041] 104. Receive the first device information forwarded by the target router.

[0042] As described above, the target offline device feeds back the first device address of the current device itself to the target router based on the device address acquisition instruction. The target router, as a data transfer station of the target LAN, forwards the acquired first device addresses of all target offline devices to the execution device.

[0043] 105. When a selection instruction input by the user is detected, a batch activation operation for the second target offline device is triggered.

[0044] The selection instruction is used to determine the second device information that needs to be activated from the first device information, and the second target offline device is the target offline device corresponding to the second device information; the activation operation includes: obtaining the activation certificate required for activating the second target offline device, and sending activation instructions to the second target offline device through the target router, wherein the activation certificate is generated by the cloud based on the second device information, the activation instruction includes the activation certificate, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

[0045] like Figure 4 As shown, it is a schematic diagram of the activation selection interface provided by an embodiment of the present application, the execution device has a display screen for displaying the received first device information to the user, and the user can input the corresponding human-computer interaction instruction to the execution device through the display screen. For example, the execution device generates a list according to the received first device information and the first device address, and the list includes the first device information and the first device address, wherein the first device information and its corresponding first device address have a one-to-one correspondence. The execution device displays the list to the user through the above-mentioned display screen, and sends a selection request to the user, the selection request is used to request the user to select the second device information to be activated from the first device information displayed in the list, the user can activate it by selecting part of the first device information, or can select all by one click through the "Select All" button, after the selection, the user can realize the one-click activation function by clicking the "Confirm" button. When the user clicks the "Confirm" button, the selection instruction is input to the execution device. At this time, when the execution device detects the selection instruction input by the user, it triggers the batch activation operation of the second target offline device corresponding to the second device information determined to be activated from the first device information. Therefore, for the user level, the one-key activation function is directly realized, which is convenient, simple and fast to operate.

[0046] The specific implementation method of the execution device executing the batch activation operation may be:

[0047] Using the HTTPS network connection method, an activation credential generation request is sent to the cloud, and the activation credential generation request is used to request the cloud to generate the activation credential required for activating the second target offline device, wherein the activation credential generation request contains the second device information, and the cloud generates the activation credential using the second device information, and feeds the generated activation credential back to the execution device. The execution device sends the activation credential to the target router, and the target router distributes the activation credential to the second target offline device. The second target offline device receives the activation credential and uses the activation credential to activate its own device.

[0048] In summary, when facing large-scale equipment deployment, the embodiments of the present application do not need to rely on manual activation of one of the offline devices first, and then use the manually activated offline device as a bridge to activate the remaining other devices, as in the prior art. Without being restricted by this, the UDP data communication within the local area network is used to quickly obtain the address of the target offline device to be activated, thereby achieving the purpose of batch activation; at the same time, UDP broadcast data communication does not need to establish a connection in advance, and can achieve rapid data transmission; based on these two advantages, the offline device batch activation method described in the present application can achieve the purpose of efficient batch activation, truly realize one-time batch activation of offline devices, simplify the activation process, and greatly improve the activation efficiency of offline devices. On the other hand, all target offline devices that need to be activated do not need to be connected to any external network, but only need to be connected to the above-mentioned execution subject through a special network channel (UDP, TCP) with a specified protocol to achieve information interaction, which is conducive to improving the completeness of the target offline device during the activation process.

[0049] like Figure 5 As shown, the signaling interaction process of a method for batch activation of offline devices described in an embodiment of the present application is described in detail:

[0050] 501. The execution device sends a UDP broadcast data packet to a target router in the target LAN.

[0051] 502. The target router forwards the UDP broadcast packet to the target offline device.

[0052] 503. The target offline device parses the UDP broadcast data packet and obtains the device address acquisition instruction.

[0053] 504. The target offline device feeds back the device address to the target router based on the device address acquisition instruction.

[0054] 505. The target router forwards the device address to the execution device.

[0055] 506. The execution device sends a TCP data packet to the target router.

[0056] 507. The target router forwards the TCP data packets to the target offline devices respectively.

[0057] 508. The target offline device parses the TCP data packet and obtains the device information acquisition instruction.

[0058] 509. The target offline device feeds back device information to the target router based on the device information acquisition instruction.

[0059] 510. The target router forwards the device information to the execution device.

[0060] 511. The execution device detects whether the user inputs a selection instruction.

[0061] 512. The execution device triggers sending an activation credential generation request to the cloud.

[0062] 513. The cloud uses device information to generate activation credentials.

[0063] 514. The cloud sends the activation credentials to the execution device.

[0064] 515. The execution device sends the activation certificate to the target router.

[0065] 516. The target router forwards the activation certificate to the target offline device.

[0066] 517. The target offline device activates the device using the activation credential.

[0067] Embodiment 2

[0068] like Figure 6 As shown, based on the above-mentioned embodiment 1, the embodiment of the present application also provides another offline device batch activation method, including the following steps:

[0069] 601. Send a UDP broadcast packet to the target router in the target LAN.

[0070] 602. Receive the first device address forwarded by the target router.

[0071] 603. Count the number M1 of first device addresses fed back by the target router.

[0072] 604. Determine whether the number M1 of the first device addresses is less than the total number M2 of target offline devices in the target local area network.

[0073] 605. If M1<M2, then send the UDP broadcast data packet to the target router in the target LAN again.

[0074] It should be noted that, due to the UDP broadcast data transmission method, if the data transmission fails or the receiving party fails to receive during the data transmission process, the receiving party will not notify the sender to retransmit, so there will be data transmission failures. Therefore, if the target offline device is searched through UDP broadcast, M1<M2, it means that some devices have not received the UDP broadcast data packet. Therefore, the execution device sends a UDP broadcast data packet to the target router in the target LAN again, and performs a second UDP broadcast to re-acquire the device address. When the second device address is the same as the first one, only one of them is retained, that is, a deduplication operation is performed. The advantage of this is that it can avoid the problem of failure to search for the target offline device and fail to activate due to UDP broadcast failure as much as possible.

[0075] 606. Send TCP data packets to the first target offline device respectively through the target router.

[0076] 607. Receive the first device information forwarded by the target router.

[0077] The specific implementation of steps 601, 602, 606, and 607 may refer to steps 101 to 104 in the above-mentioned embodiment 1, and will not be repeated here.

[0078] 608. Detect whether the user inputs a selection instruction.

[0079] If a selection instruction input by the user is detected, a batch activation operation for the second target offline device is triggered.

[0080] The selection instruction is used to determine the second device information that needs to be activated from the first device information, and the second target offline device is the target offline device corresponding to the second device information; the activation operation includes: obtaining the activation certificate required for activating the second target offline device, and sending activation instructions to the second target offline device through the target router, wherein the activation certificate is generated by the cloud based on the second device information, the activation instruction includes the activation certificate, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

[0081] In a feasible implementation manner, obtaining the activation credential required for activating the second target offline device specifically includes the following steps:

[0082] 609. Generate an asymmetric key pair.

[0083] The asymmetric key pair includes a public key and a private key. The RSA asymmetric key pair can be generated using OpenSSL, which is a powerful open source encryption library widely used in various encryption tasks and will not be described in detail here.

[0084] 610. Send a digital certificate generation request to the cloud.

[0085] Among them, the digital certificate generation request includes the asymmetric key pair and the second device serial number, and the digital certificate generation request is used to request the cloud to generate the digital certificate required for activating the second target offline device based on the public key and the second device serial number, and to digitally sign the generated digital certificate using the private key; the second device information includes the second device serial number, and the second device serial number is used to uniquely identify the second target offline device.

[0086] The specific implementation method of the cloud generating the digital certificate required for activating the second target offline device based on the public key and the second device serial number can be as follows: the cloud combines the generated public key with the device serial number of the device to be activated to generate the digital certificate required for activating the second target offline device, and the cloud then uses the generated private key to digitally sign the digital certificate. Finally, the cloud sends the generated digital certificate to the execution device via the HTTPS network connection.

[0087] 611. Receive the digital certificate fed back from the cloud.

[0088] The digital certificate is an activation credential required for activating the second target offline device.

[0089] 612. Send activation instructions to the second target offline devices respectively through the target router.

[0090] The activation instruction includes the activation certificate and the private key, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

[0091] The activation instruction is used to instruct: the second target offline device to decrypt the digital certificate using the private key and perform a first verification on the digital certificate, wherein the first verification includes verifying whether the format of the digital certificate is correct and whether the digital certificate is complete; if the first verification passes, then perform a second verification on the digital certificate, wherein the second verification includes verifying whether the second device serial number in the digital certificate is correct, verifying whether the issuer of the digital certificate is credible, and verifying whether the digital certificate is within the validity period; if the second verification passes, then activate the device using the activation code stored in the device itself. If the first verification or the second verification fails, then feedback an activation failure message to the target router, wherein the activation failure message includes the current device serial number.

[0092] The specific implementation method may be as follows: the second target offline device uses the private key to decrypt the digital certificate, and verifies whether the format of the digital certificate is correct and whether the digital certificate is complete by calculating the hash value of the digital certificate. If the format of the digital certificate is correct and the digital certificate is complete and has not been tampered with, it is further verified, including whether the device serial number contained in the digital certificate is the same as the device serial number of the current device. If they are the same, verify that the second device serial number in the digital certificate is correct, and verify whether the issuing authority of the digital certificate is credible and whether the digital certificate is within the validity period. If the issuing authority of the digital certificate is credible and the digital certificate is within the validity period, it means that the digital certificate verification is passed, and the device is allowed to be activated. Therefore, the device's own activation system then uses the activation code stored in the device activation system to activate the device itself. If the above digital certificate verification fails, for example, the format of the digital certificate is tampered with during transmission, or the issuing authority is not trustworthy, or the digital certificate has expired and is invalid, it means that the device is not allowed to be activated. Therefore, the device's own activation system does not allow the use of its existing activation code to activate the current device. Therefore, a message of activation failure is fed back to the target router to inform the execution device which device has failed to activate, so that the corresponding staff can perform manual activation or equipment maintenance later.

[0093] like Figure 7 As shown, in a feasible implementation manner, the activation certificate required for activating the second target offline device is obtained, and the specific implementation manner may be:

[0094] S1. Generate an asymmetric key pair.

[0095] The asymmetric key pair includes a public key and a private key.

[0096] S2. Send a digital certificate generation request to the cloud.

[0097] The license generation request includes the asymmetric key pair, the second device serial number and the second device ID, and the license generation request is used to request the cloud to generate the license required for activating the second target offline device based on the public key, the second device serial number and the device authorization rule, and to digitally sign the generated license using the private key, and the device authorization rule is pre-set according to the second device ID and stored in the cloud. The second device information includes the second device serial number and the second device ID, the second device serial number is used to uniquely identify the second target offline device, and the second device ID is used to identify the model or version of the second target offline device.

[0098] The cloud generates the license required for activating the second target offline device based on the public key, the second device serial number and the device authorization rule. The specific implementation method may be as follows: the cloud combines the generated public key with the device serial number of the device to be activated, and sets the corresponding identifier according to the device authorization rule. For example, if the device authorization rule corresponding to the device ID to which a certain device serial number belongs does not allow the issuance of a license for the device, then the last digit of the authorization rule code encoded by the combination of the public key and the device serial number is set to N. If the device authorization rule corresponding to the device ID to which a certain device serial number belongs allows the issuance of a license for the device, then the last digit of the authorization rule code encoded by the combination of the public key and the device serial number is set to Y. Thus, the license required for activating the second target offline device is generated, and the cloud uses the generated private key to digitally sign the license. Finally, the cloud sends the generated license to the execution device via the HTTPS network connection.

[0099] S3. Receive the license fed back by the cloud.

[0100] The license is an activation certificate required for activating the second target offline device.

[0101] S4. Send activation instructions to the second target offline devices respectively through the target router.

[0102] The activation instruction includes the activation certificate and the private key, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

[0103] The activation instruction is used to instruct: the second target offline device to decrypt the license using the private key and perform a third verification on the license, wherein the third verification includes verifying whether the format of the license is correct and verifying whether the license is complete; if the third verification passes, a fourth verification is performed on the license, wherein the fourth verification includes verifying whether the second device serial number in the license is correct, verifying whether the issuer of the license is trustworthy, verifying whether the license is within the validity period, and verifying whether the current device has activation authority according to device authorization rules; if the fourth verification passes, the device is activated using the activation code and device authorization rules stored in the device itself; if the third verification or the fourth verification fails, an activation failure message is fed back to the target router, wherein the activation failure message includes the current device serial number.

[0104] The specific implementation method may be: the second target offline device uses the private key to decrypt the license, and verifies whether the format of the license is correct and whether the license is complete by calculating the hash value of the license. If the format of the license is correct and the license is complete and has not been tampered with, it is further verified, including whether the device serial number contained in the license is the same as the device serial number of the current device. If they are the same, the second device serial number in the license is verified to be correct, and whether the issuing authority of the license is credible and whether the license is within the validity period. If the issuing authority of the license is credible and the license is within the validity period, it means that the license verification is passed, and the device is allowed to be activated. In addition, it is also necessary to verify whether the authorization rule code in the license is Y. If so, it means that the current device has the activation authority. Therefore, if the verification is passed, the device's own activation system then uses the activation code stored in the device activation system to activate the device itself. Otherwise, if the authorization rule code is N, it means that the current device does not have the activation authority. Even if all the previous verifications are passed, as long as the authorization rule code is N, the activation operation cannot be performed for the current device. Or if the above verification fails, for example, the format of the digital certificate is tampered with during transmission, or the issuing authority is not trustworthy, or the digital certificate has expired and is invalid, it means that the device is not allowed to be activated. Therefore, the device's own activation system does not allow the current device to be activated using its existing activation code. Therefore, a message of activation failure is fed back to the target router to inform the execution device which device has failed to activate, so that the corresponding staff can perform manual activation or equipment maintenance later.

[0105] The embodiment of the present application obtains the authorization rules of different types of devices through the device ID, and automatically batch activates different types of devices according to different authorization rules. There is no need for users to manually select according to the authorization rules of different types of devices, which saves selection time and further improves the efficiency of batch activation of offline devices. At the same time, it also avoids errors caused by manual selection, such as activating devices without activation authority, thereby causing unnecessary losses or device malfunction.

[0106] In addition, batch activation can be performed according to different types of devices, unlike the prior art, which can only perform batch activation on devices of the same type, because the activation of other devices must be based on the manual activation of the device, so only other devices of the same type as the manually activated device can be batch activated, which has great application limitations. However, the present application does not have this limitation, and batch activation operations can be performed on different types of devices.

[0107] Embodiment 3

[0108] Combination of the above Figures 1 to 7 A method for batch activation of offline devices provided by an embodiment of the present application is described in detail. Figure 8 An offline device batch activation system for executing an offline device batch activation method provided in an embodiment of the present application is described in detail. Figure 8 A schematic diagram of the structure of an offline device batch activation system provided by an embodiment of the present invention; Figure 8 The system comprises:

[0109] The UDP broadcast module 801 is used to send a UDP broadcast data packet to a target router in a target local area network, wherein the target local area network is the local area network where the target offline device to be activated is located, and the target router is used to forward the UDP broadcast data packet to all target offline devices. The UDP broadcast data packet includes a device address acquisition instruction, and the device address acquisition instruction is used to instruct the target offline device to feedback a first device address to the target router.

[0110] The receiving module 802 is configured to receive the first device address forwarded by the target router.

[0111] The sending module 803 is used to send TCP data packets to the first target offline device through the target router, wherein the first target offline device is the target offline device corresponding to the first device address, and the TCP data packet includes a device information acquisition instruction, and the device information acquisition instruction is used to instruct the first target offline device to feed back the first device information to the target router;

[0112] The receiving module 802 is further configured to receive the first device information forwarded by the target router.

[0113] The batch activation module 804 is used to trigger a batch activation operation on the second target offline device when a selection instruction input by the user is detected, wherein the selection instruction is used to determine the second device information to be activated from the first device information, and the second target offline device is the target offline device corresponding to the second device information; the activation operation includes: obtaining the activation certificate required for activating the second target offline device, and sending activation instructions to the second target offline device respectively through the target router, wherein the activation certificate is generated by the cloud based on the second device information, the activation instruction includes the activation certificate, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

[0114] In a feasible implementation manner, the batch activation module 804 is specifically used for:

[0115] Generate an asymmetric key pair, wherein the asymmetric key pair includes a public key and a private key; send a digital certificate generation request to the cloud; wherein the digital certificate generation request includes the asymmetric key pair and the second device serial number, and the digital certificate generation request is used to request the cloud to generate a digital certificate required for activating the second target offline device based on the public key and the second device serial number, and to digitally sign the digital certificate generated by the private key pair; the second device information includes the second device serial number, wherein the second device serial number is used to uniquely identify the second target offline device; receive the digital certificate fed back by the cloud; wherein the digital certificate is the activation certificate required for activating the second target offline device; send activation instructions to the second target offline devices respectively through the target router, and the activation instructions include the activation certificate and the private key;

[0116] The activation instruction is used to instruct the second target offline device to use the private key to decrypt the digital certificate and perform a first verification on the digital certificate, wherein the first verification includes verifying whether the format of the digital certificate is correct and verifying whether the digital certificate is complete; if the first verification passes, a second verification is performed on the digital certificate, wherein the second verification includes verifying whether the second device serial number in the digital certificate is correct, verifying whether the issuer of the digital certificate is credible, and verifying whether the digital certificate is within the validity period; if the second verification passes, the device is activated using the activation code stored in the device itself; if the first verification or the second verification fails, an activation failure message is fed back to the target router, wherein the activation failure message includes the current device serial number.

[0117] In a feasible implementation manner, the batch activation module 804 is specifically used for:

[0118] Generate an asymmetric key pair, wherein the asymmetric key pair includes a public key and a private key; send a license generation request to the cloud; wherein the license generation request includes the asymmetric key pair, the second device serial number and the second device ID, and the license generation request is used to request the cloud to generate a license required for activating the second target offline device based on the public key, the second device serial number and the device authorization rule, and digitally sign the generated license using the private key, wherein the device authorization rule is pre-set according to the second device ID and stored in the cloud; the second device information includes the second device serial number and the second device ID, wherein the second device serial number is used to uniquely identify the second target offline device, and the second device ID is used to identify the model or version of the second target offline device; receive the license fed back by the cloud; wherein the license is the activation certificate required for activating the second target offline device; send activation instructions to the second target offline devices through the target router, respectively, and the activation instructions include the activation certificate and the private key;

[0119] The activation instruction is used to instruct the second target offline device to decrypt the license using the private key and perform a third verification on the license, wherein the third verification includes verifying whether the format of the license is correct and verifying whether the license is complete; if the third verification passes, a fourth verification is performed on the license, wherein the fourth verification includes verifying whether the second device serial number in the license is correct, verifying whether the issuer of the license is trustworthy, verifying whether the license is within the validity period, and verifying whether the current device has activation authority according to device authorization rules; if the fourth verification passes, the device is activated using the activation code and device authorization rules stored in the device itself; if the third verification or the fourth verification fails, an activation failure message is fed back to the target router, wherein the activation failure message includes the current device serial number.

[0120] In a feasible embodiment, the system further includes:

[0121] A statistics module 805, configured to count the number M1 of first device addresses fed back by the target router;

[0122] A determination module 806 is used to determine whether the number M1 of the first device addresses is less than the total number M2 of target offline devices in the target local area network;

[0123] The UDP broadcast module 801 is further configured to send a UDP broadcast data packet to a target router in the target LAN again if M1<M2.

[0124] The specific implementation method and technical effects of the system refer to the aforementioned offline device batch activation method, which will not be repeated here.

[0125] Embodiment 4

[0126] An embodiment of the present invention further provides a computer electronic device, Fig. 9 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Fig. 9 As shown, the computer electronic device includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903. In the RAM 903, various programs and data required for system operation are also stored. CPU901, ROM 902 and RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904. The following components are connected to the I / O interface 905: an input part 906 including a keyboard, a mouse, etc.; an output part 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage part 908 including a hard disk, etc.; and a communication part 909 including a network interface card such as a LAN card, a modem, etc. The communication part 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.

[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0128] Embodiment 5

[0129] The embodiment of the present invention further provides a computer-readable storage medium, which may be a computer-readable storage medium included in an offline device batch activation system described in the above embodiment; or a computer-readable storage medium included separately and not installed in an electronic device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute an offline device batch activation method described in the present invention.

[0130] Embodiment 6

[0131] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a computer device, it is used to implement an offline device batch activation method of the present invention.

[0132] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.

Claims

1. A method for batch activation of offline devices, characterized in that: include: Sending a UDP broadcast data packet to a target router in a target local area network, wherein the target local area network is a local area network where the target offline device to be activated is located, and the target router is used to forward the UDP broadcast data packet to all target offline devices, and the UDP broadcast data packet includes a device address acquisition instruction, and the device address acquisition instruction is used to instruct the target offline device to feed back a first device address to the target router; Receiving the first device address forwarded by the target router; Sending TCP data packets to the first target offline device respectively through the target router, wherein the first target offline device is the target offline device corresponding to the first device address, and the TCP data packet includes a device information acquisition instruction, and the device information acquisition instruction is used to instruct the first target offline device to feed back the first device information to the target router; Receiving the first device information forwarded by the target router; When a selection instruction input by the user is detected, a batch activation operation for the second target offline device is triggered, wherein the selection instruction is used to determine the second device information that needs to be activated from the first device information, and the second target offline device is the target offline device corresponding to the second device information; the activation operation includes: obtaining the activation certificate required for activating the second target offline device, and sending activation instructions to the second target offline device respectively through the target router, wherein the activation certificate is generated by the cloud based on the second device information, the activation instruction includes the activation certificate, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

2. The offline device batch activation method according to claim 1, characterized in that: The second device information includes a second device serial number, wherein the second device serial number is used to uniquely identify the second target offline device, and obtaining an activation credential required for activating the second target offline device includes: Generate an asymmetric key pair, wherein the asymmetric key pair includes a public key and a private key; Sending a digital certificate generation request to the cloud; wherein the digital certificate generation request includes the asymmetric key pair and the second device serial number, and the digital certificate generation request is used to request the cloud to generate a digital certificate required for activating the second target offline device based on the public key and the second device serial number, and to digitally sign the generated digital certificate using the private key; Receive the digital certificate fed back by the cloud; wherein the digital certificate is the activation credential required for activating the second target offline device.

3. The offline device batch activation method according to claim 2, characterized in that: The activation instruction is used to indicate: The second target offline device decrypts the digital certificate using the private key and performs a first verification on the digital certificate, wherein the first verification includes verifying whether the format of the digital certificate is correct and whether the digital certificate is complete; if the first verification passes, a second verification is performed on the digital certificate, wherein the second verification includes verifying whether the second device serial number in the digital certificate is correct, verifying whether the issuer of the digital certificate is credible, and verifying whether the digital certificate is within the validity period; if the second verification passes, the device is activated using the activation code stored in the device itself; If the first verification or the second verification fails, an activation failure message is fed back to the target router, wherein the activation failure message includes the current device serial number.

4. The offline device batch activation method according to claim 1, characterized in that: The second device information includes a second device serial number and a second device ID, wherein the second device serial number is used to uniquely identify the second target offline device, and the second device ID is used to identify the model or version of the second target offline device. Acquiring the activation credential required for activating the second target offline device includes: Generate an asymmetric key pair, wherein the asymmetric key pair includes a public key and a private key; Sending a license generation request to the cloud; wherein the license generation request includes the asymmetric key pair, the second device serial number and the second device ID, and the license generation request is used to request the cloud to generate a license required for activating the second target offline device based on the public key, the second device serial number and the device authorization rule, and to digitally sign the generated license using the private key, and the device authorization rule is pre-set according to the second device ID and stored in the cloud; Receive the license fed back by the cloud; wherein the license is the activation credential required for activating the second target offline device.

5. The offline device batch activation method according to claim 4, characterized in that: The activation instruction is used to indicate: The second target offline device decrypts the license using the private key and performs a third verification on the license, wherein the third verification includes verifying whether the format of the license is correct and whether the license is complete; if the third verification passes, a fourth verification is performed on the license, wherein the fourth verification includes verifying whether the second device serial number in the license is correct, verifying whether the issuer of the license is trustworthy, verifying whether the license is within the validity period, and verifying whether the current device has activation authority according to device authorization rules; if the fourth verification passes, the device is activated using the activation code and device authorization rules stored in the device itself; If the third verification or the fourth verification fails, an activation failure message is fed back to the target router, wherein the activation failure message includes the current device serial number.

6. The offline device batch activation method according to any one of claims 1 to 5, characterized in that: Also includes: Counting the number M1 of first device addresses fed back by the target router; Determine whether the number M1 of the first device addresses is less than the total number M2 of target offline devices in the target local area network; If M1<M2, then the UDP broadcast data packet is sent again to the target router in the target LAN.

7. An offline device batch activation system, characterized in that: include: A UDP broadcast module is used to send a UDP broadcast data packet to a target router in a target local area network, wherein the target local area network is the local area network where the target offline device to be activated is located, and the target router is used to forward the UDP broadcast data packet to all target offline devices, and the UDP broadcast data packet includes a device address acquisition instruction, and the device address acquisition instruction is used to instruct the target offline device to feed back a first device address to the target router; A receiving module, configured to receive the first device address forwarded by the target router; a sending module, configured to send TCP data packets to first target offline devices respectively through the target router, wherein the first target offline device is a target offline device corresponding to the first device address, and the TCP data packet includes a device information acquisition instruction, and the device information acquisition instruction is used to instruct the first target offline device to feed back first device information to the target router; The receiving module is further used to receive the first device information forwarded by the target router; A batch activation module is used to trigger a batch activation operation on the second target offline device when a selection instruction input by a user is detected, wherein the selection instruction is used to determine the second device information to be activated from the first device information, and the second target offline device is the target offline device corresponding to the second device information; the activation operation includes: obtaining the activation certificate required for activating the second target offline device, and sending activation instructions to the second target offline device respectively through the target router, wherein the activation certificate is generated by the cloud based on the second device information, the activation instruction includes the activation certificate, and the activation instruction is used to instruct the second target offline device to complete device activation using the activation certificate.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; a memory communicatively coupled to the at least one processor; and a computer program stored on said memory and executed on said at least one processor; Wherein, when executing the computer program, the at least one processor is used to implement the offline device batch activation method described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer program in the computer-readable storage medium is used to implement the offline device batch activation method described in any one of claims 1 to 6 when executed by a computer device.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a computer device, the computer program is used to implement the offline device batch activation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Terminal equipment interaction method and device and terminal equipment

    CN110600023A

  • Task processing system, method and device

    CN115760114A

  • Light equipment firmware verification method and device, equipment, medium and product

    CN118551389A

  • Verification code display method and device, equipment, storage medium and product

    CN118643485A

  • Network distribution method and device of equipment, equipment and storage medium

    CN118740536A