Device key updating method, device, storage medium and electronic device

By using clock information to determine the key update interval in the intelligent distribution network system and encrypting the sending of key update requests, the problem of low efficiency of device key update is solved, and the device's active update request is realized, reducing the burden on the server, and improving the key Update efficiency.

CN113094734BActive Publication Date: 2025-01-03GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110458421.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-27
Publication Date
2025-01-03
Estimated Expiration
2041-04-27

AI Technical Summary

Technical Problem

The device key update efficiency in existing intelligent distribution network systems is low, especially when the group member equipment does not support multicast, which leads to excessive burden on the server.

Method used

By reading clock information, a key update interval is judged, a key update request is generated, and the device identification and request are encrypted and sent to the data collector, reducing the burden on the server and improving the efficiency of key update.

Benefits of technology

It realizes that the device actively initiates key update requests, reduces the burden on the server, improves the efficiency of key updates, and is suitable for the differences and stability of different devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113094734B_ABST
    Figure CN113094734B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a device key update method, apparatus, storage medium and electronic device. It includes: reading clock information used for timing, if the clock information meets the key update interval of the current device, then generating a key update request for the current device; encrypting the device identification and key update request of the current device, and sending them to a data aggregator, the data aggregator decrypts the received data and generates key update feedback information; receiving the encrypted key update feedback information sent by the data aggregator, decrypting the data to obtain the key update feedback information; if the key update feedback information includes a key update instruction, then updating the key of the current device. The embodiment of the present invention adopts a method of actively initiating a key update request when the current device meets the key update interval, thereby realizing targeted initiation of a key update request to the data aggregator, greatly reducing the burden on the server and improving the efficiency of key update.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of device interconnection, and in particular, to a device key updating method, apparatus, storage medium and electronic device. Background Art

[0002] As more and more electronic devices are connected to smart distribution network systems, power information security issues such as key updates are less considered.

[0003] At present, the key update of electronic devices connected to the smart distribution network system is generally achieved by dividing the security management policies and keys of different groups, and relying on the mutual transmission of information between group member devices and key servers. However, the above key update method sends information in a multicast manner. When one or more group member devices in the network do not support multicast, it will greatly increase the burden on the server, resulting in slow key update efficiency. Summary of the invention

[0004] The embodiment of the present invention provides a device key update method, apparatus, storage medium and electronic device, which adopt a key negotiation and clock information method to reduce the server burden and improve the key update efficiency.

[0005] In a first aspect, an embodiment of the present invention provides a device key update method, which is applied to an electronic device connected to a power distribution network system, and the method includes:

[0006] Reading clock information used for timing, and if the clock information satisfies the key update interval of the current device, generating a key update request for the current device;

[0007] Encrypting the device identification of the current device and the key update request, and sending the encrypted device identification and the key update request to a data aggregator, wherein the data aggregator is used to obtain the device identification of the current device and the key update request through decryption processing, and generate key update feedback information according to the device identification and the key update request, and perform encryption processing to obtain the encrypted key update feedback information;

[0008] receiving the encrypted key update feedback information sent by the data collector, and performing decryption processing to obtain the key update feedback information;

[0009] If the key update feedback information includes a key update instruction, the key update instruction is executed to update the key of the current device.

[0010] In a second aspect, an embodiment of the present invention further provides a device key updating apparatus, comprising:

[0011] A request generation module, used to read clock information used for timing, and if the clock information meets the key update interval of the current device, generate a key update request for the current device;

[0012] A feedback generation module, used to encrypt the device identification of the current device and the key update request, and send the encrypted device identification and the key update request to a data collector, wherein the data collector is used to obtain the device identification of the current device and the key update request through decryption processing, and generate key update feedback information according to the device identification and the key update request, and perform encryption processing to obtain the encrypted key update feedback information;

[0013] A feedback receiving module, used for receiving the encrypted key update feedback information sent by the data collector, and decrypting the encrypted key update feedback information to obtain the key update feedback information;

[0014] The key updating module is configured to execute the key updating instruction to update the key of the current device if the key updating feedback information includes the key updating instruction.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the device key update method as described in the embodiment of the present invention is implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute any of the device key update methods described in the embodiments of the present invention.

[0017] The technical solution of the embodiment of the present invention is to read the clock information used for timing, and if the clock information meets the key update interval of the current device, generate a key update request for the current device; encrypt the device identification and key update request of the current device, and send them to the data aggregator, the data aggregator decrypts the received data and generates key update feedback information; receive the encrypted key update feedback information sent by the data aggregator, decrypt it to obtain the key update feedback information; if the key update feedback information includes a key update instruction, update the key of the current device. The embodiment of the present invention adopts a method of actively initiating a key update request when the current device meets the key update interval, so as to realize the targeted initiation of a key update request to the data aggregator, greatly reduce the burden on the server, and improve the key update efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 The present invention provides a flowchart of a method for updating a device key according to a first embodiment of the present invention.

[0019] Figure 2 This is a flowchart of a device key updating method provided in Embodiment 2 of the present invention.

[0020] Figure 3 A schematic diagram of the structure of a device key updating apparatus provided in Embodiment 3 of the present invention.

[0021] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0023] Embodiment 1

[0024] Figure 1 This is a flowchart of a device key update method provided in the first embodiment of the present invention. This embodiment is applicable to electronic devices connected to the power distribution network system. The method can be executed by the device key update device provided in the embodiment of the present invention. The device can be implemented by software and / or hardware and can generally be integrated in the electronic device. For example, an intelligent electronic device of the power distribution network system. Figure 1 As shown, the method of the embodiment of the present invention specifically includes the following steps:

[0025] S110: Read clock information used for timing, and if the clock information satisfies the key update interval of the current device, generate a key update request for the current device.

[0026] Exemplarily, the current device connected to the distribution network system is an intelligent electronic device (Intelligent Electronic Device, IED), and the IED device is equipped with a calendar clock chip (Real-time clock, RTC), and the RTC can complete the timing function in the interaction process between the IED device and the data collector. In this embodiment, by setting the RTC on the IED device, it is convenient for the IED device to trigger the key update of the IED device itself through the clock information of the RTC timing. By each IED device independently and actively performing the key update, there is no need to form a multicast form, which reduces the burden on the server or data collector, and is suitable for the differences of different IED devices.

[0027] Among them, the clock information is read from the clock module of the current electronic device system connected to the distribution network system, and the clock information may include year, month, day, week, hour, minute, and second information. For each IED device, if the clock information read in real time meets the key update interval of the current device (i.e., the current IED device), the current electronic device actively generates a key update request. Specifically, the current device reads the clock information of the RTC, compares the read clock information with the current update time, and if the comparison is successful, the current IED device generates a key update request, wherein the current update time of the current IED device is determined according to the previous key update time of the current IED device and the key update interval of the current IED device.

[0028] In some optional embodiments, if the clock information satisfies the key update interval of the current device, a key update request for the current device is generated, including: determining the time interval from the last key update based on the clock information; if the time interval from the last key update satisfies the key update interval, determining whether the current moment is in the preset idle time period of the current device; if the current moment is in the preset idle time period of the current device, generating a key update request for the current device.

[0029] The key update interval may be a periodic time, such as 24 hours, a week, or a month, or a time that changes according to the operating status of the device, such as a key update interval corresponding to a power peak period is smaller than a key update interval corresponding to a power valley period, which is not limited here. The time interval from the last key update is determined by performing a difference calculation between the acquired clock information and the last key update timestamp, and the time interval is compared with the key update interval. If the time interval is greater than or equal to the key update interval, it is determined that a key update is required. If the time interval is less than the key update interval, the clock information is continuously acquired, and the judgment is repeated until it is determined that a key update is required.

[0030] In this embodiment, when it is determined that a key update is required, it is determined whether the current device is in a preset idle time period, and if so, a key for the current device is generated. Optionally, the preset idle time period can be a fixed setting, such as 1:00-2:00 in the morning; optionally, the preset idle time period can also be determined according to the operating status of the device, for example, if the user power consumption of the current device is less than a preset value, it can be determined that it is in a preset idle time period.

[0031] For example, the current device is configured with a fixed key update interval (such as one week or one month) and a distribution network information interaction idle time (such as 1 a.m.). The IED device will actively generate a key update request when it determines that the key update interval and idle time are met. Among them, the distribution network information interaction idle time is the user's low-peak electricity consumption period, usually in the early morning. At this time, a key update request is initiated, the distribution network equipment state is stable, and the execution efficiency is high. The idle time of different devices can be different, determined according to the operating status of the device, and there is no limitation on this.

[0032] S120. Encrypt the device identification and the key update request of the current device, and send the encrypted device identification and the key update request to a data aggregator, wherein the data aggregator is used to obtain the device identification and the key update request of the current device through decryption processing, generate key update feedback information according to the device identification and the key update request, and perform encryption processing to obtain the encrypted key update feedback information.

[0033] The device identification of the current device may include but is not limited to the name, specification model, number, etc. of the device, and the device identification of the current device is unique. The current device encrypts the unique device identification and the key update request generated by the current device, and sends them to the data aggregator. The data aggregator decrypts the received encrypted data and generates key update feedback information. Among them, the data aggregator is a data processing unit in the distribution network system server, which is used to process the key update request sent by the current device. This process is actively initiated by the current device, and the data aggregator responds accordingly, making the key update more targeted. There is no need to uniformly process the key update for all devices, which reduces the burden on the server.

[0034] Exemplarily, this embodiment encrypts the device identification and key update request of the current device by using the public key of the data aggregator and a preset encryption algorithm (for example, including but not limited to the national secret SM2 encryption algorithm and the national secret SM4 encryption algorithm, etc.), and packages the encrypted device identification and key update request into a data packet, which is passed to the data aggregator. Through the encrypted processing method, the problem of data loss or theft during data transmission is avoided, thereby improving data security; the data aggregator receives the data packet of the device identification and key update request sent by the current device, and decrypts it using the preset private key and the corresponding preset decryption algorithm (for example, including but not limited to the national secret SM2 decryption algorithm and the national secret SM4 decryption algorithm, etc.) to obtain the original device identification and the original key update request.

[0035] The data aggregator responds to the key update request based on the device identification and obtains the key update feedback information. In some embodiments, the key update feedback information may be a new key. In some embodiments, the key update feedback information may be a key update method corresponding to the device identification. Different devices may correspond to different key update methods. Exemplarily, the data aggregator may be configured with a correspondence between each device identification and the key update method, and the corresponding key update method is obtained by matching the device identification. In some embodiments, the key update feedback information may be a key start update instruction, or a key update rejection instruction. Accordingly, each IED device is pre-configured with a key update method, and the key update may be triggered based on the above-mentioned start update instruction.

[0036] It should be noted that the data aggregator encrypts the generated key update feedback information and sends the encrypted information to the current device, thereby improving the security of the key update feedback information.

[0037] S130: Receive the encrypted key update feedback information sent by the data collector, and perform decryption processing to obtain the key update feedback information.

[0038] Specifically, the data collector forms key update feedback information from the processed data, and encrypts and sends it back to the corresponding current device, and the current device decrypts the received key update feedback information. Exemplarily, the key update feedback information can be symmetrically encrypted using the SM4 algorithm and then sent to the corresponding IED device, and the key update feedback information can be decrypted using the SM4 decryption algorithm.

[0039] S140: If the key update feedback information includes a key update instruction, execute the key update instruction to update the key of the current device.

[0040] Among them, when the data aggregator detects that the current moment is within the preset idle time period, the generated key update feedback information includes a key update instruction. When the current device receives the key update instruction, it calls a preset key update method and executes the key update method to update the key of the current device, or replaces the original key of the current device with the new key carried in the key update instruction.

[0041] Optionally, if the key update feedback information includes a non-update command, the key update service of the current device is terminated.

[0042] Specifically, the data collector detects that the current time is not within the preset idle time period, and the key update feedback information includes a non-update command. When the current device receives the non-update command, the key update service of the current device is terminated.

[0043] Exemplarily, the data concentrator detects whether the current time of sending the key update request is within the preset idle time period. If the current time is detected to be within the preset idle time period, the key update command is symmetrically encrypted using the SM4 algorithm using the current device key, and the encrypted key update command is sent to the current device via a message. If the current time is not detected to be within the preset idle time period, the non-key update command is symmetrically encrypted using the SM4 algorithm using the current device key, and the encrypted non-key update command is sent to the current device in the form of a message, that is, the current device is controlled to terminate the key update service to prevent DOS attacks.

[0044] In some optional embodiments, the key update feedback information also includes an update timing command. Accordingly, executing the key update instruction to update the key of the current device includes: executing the key update instruction and starting timing based on the update timing command; determining whether the execution time of the key update instruction is completed within a preset time interval based on the timing time.

[0045] Among them, the update timing command is a command that triggers timing at the same time as the key update, which is used to detect the key update duration to ensure that the key update is completed within the specified time. The current device executes the key update instruction, and the current device starts timing at the same time to determine whether the key update instruction is completed within the preset time interval. If it is not completed within the preset time interval, the current round of key update is terminated. Exemplarily, if the timing duration when the key update is completed is less than the preset update duration, it is determined that the key update is successful. If the timing duration of the key update meets the preset update duration and the key update is not completed, the current round of key update is terminated. This embodiment increases the update time of the key update instruction in order to prevent similar DOS attacks, where a device continuously initiates links to consume the other party's resources, thereby ensuring that the key update is completed within the specified time.

[0046] For example, the data collector can confirm the update information, and return the instruction of agreeing to start the timing module to the IED device and start the timing (for example, the entire key update is allowed to be completed within 5 minutes), requiring the entire update process to be completed within the timing time. It should be noted that this process still requires encryption and decryption of SM2 to ensure that the information is not stolen.

[0047] An embodiment of the present invention provides a device key update method, which is applied to an electronic device connected to a power distribution network system. The method reads clock information used for timing. If the clock information meets the key update interval of the current device, a key update request for the current device is generated; the device identification and key update request of the current device are encrypted, and the encrypted device identification and key update request are sent to a data aggregator. The data aggregator obtains the device identification and key update request of the current device through decryption processing, and generates key update feedback information according to the device identification and key update request, and encrypts the information to obtain the encrypted key update feedback information; the encrypted key update feedback information sent by the data aggregator is received, and the key update feedback information is obtained through decryption processing; if the key update feedback information includes a key update instruction, the key update instruction is executed to update the key of the current device. The current device can actively initiate a key update request, thereby initiating a targeted key update request to the data aggregator, reducing the burden on the server and improving the key update efficiency.

[0048] Embodiment 2

[0049] Figure 2 This is a flowchart of a device key update method provided in the first embodiment of the present invention. This embodiment is applicable to electronic devices connected to the power distribution network system. The method can be executed by the device key update device provided in the embodiment of the present invention. The device can be implemented by software and / or hardware and can generally be integrated in the electronic device. For example, an intelligent electronic device of the power distribution network system. Figure 2 As shown, the method of the embodiment of the present invention specifically includes the following steps:

[0050] S210. The current device reads the clock information used for timing. If the clock information meets the key update interval of the current device, a key update request for the current device is generated, the device identification of the current device and the key update request are encrypted, and the encrypted device identification and the key update request are sent to the data aggregator.

[0051] S220. The data aggregator decrypts the received encrypted information of the device identification and the key update request to obtain the device identification of the current device and the key update request, generates key update feedback information based on the device identification and the key update request, encrypts the information to obtain the encrypted key update feedback information, and feeds back the encrypted key update feedback information to the current device.

[0052] S230: The current device receives the encrypted key update feedback information sent by the data aggregator, decrypts the information to obtain the key update feedback information, and if the key update feedback information includes a key update instruction, executes the key update instruction to perform a key update on the current device.

[0053] An embodiment of the present invention provides a device key update method, which reads clock information used for timing through the current device. If the clock information meets the key update interval of the current device, a key update request for the current device is generated, the device identification and key update request of the current device are encrypted, and the encrypted device identification and key update request are sent to a data aggregator. The data aggregator decrypts the received encrypted information of the device identification and key update request to obtain the device identification and key update request of the current device, and generates key update feedback information according to the device identification and key update request, encrypts the information to obtain the encrypted key update feedback information, and feeds back the encrypted key update feedback information to the current device. The current device receives the encrypted key update feedback information sent by the data aggregator, decrypts the information to obtain the key update feedback information, and if the key update feedback information includes a key update instruction, the key update instruction is executed to update the key of the current device, thereby realizing targeted initiation of a key update request to the data aggregator, reducing the burden on the server, and improving the key update efficiency.

[0054] Optionally, before generating key update feedback information according to the device identifier and the key update request, it also includes: based on the update request frequency of the current device, or the time interval from the last key update; if the update request frequency is within a preset frequency range, and the time interval from the last key update is within a preset time interval range, then determining that the key update request is valid; if the update request frequency is not within the preset frequency range, or the time interval from the last key update is not within the preset time interval range, then determining that the key update request is invalid, and closing the key update channel of the current device.

[0055] Among them, the update request frequency of the current device is the number of update requests sent by the current device per unit time. The preset range of the update request frequency is a reasonable number of update requests sent per unit time. If the update request frequency is too large or too small, it exceeds the preset range of the update request frequency.

[0056] Exemplarily, if the data aggregator detects that the update request frequency of the current device is not within the preset frequency range (for example, more than 10 key update requests are received within 20 seconds or no key update requests are received for a long time, such as three months or more), the key update request is determined to be invalid, and the data aggregator immediately closes the key update channel of the current device, effectively preventing criminals from exploiting the key update time loophole to attack the device.

[0057] Optionally, the current device receives an update timing command sent by the data collector, and starts timing based on the update timing command; and determines whether the execution time of the key update instruction is completed within a preset time interval based on the timing time.

[0058] Specifically, the current device receives the update timing command sent by the data aggregator, the current device starts the timing function to time the update time, and determines whether the key update instruction is completed within the preset time interval based on the update timing time. If it is not completed within the preset time interval, the current round of key update is terminated. By receiving the update timing command by the current device, it can effectively prevent external attacks and reduce the behavior of the device continuously initiating key update requests to consume resources, thereby ensuring that the key update is completed within the specified time.

[0059] Embodiment 3

[0060] A device key updating apparatus provided in an embodiment of the present invention can execute a device key updating method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0061] Figure 3 A schematic diagram of the structure of a device key update apparatus provided in Embodiment 3 of the present invention is shown in FIG. Figure 3 As shown, the apparatus includes: a request generating module 310 , a feedback generating module 320 , a feedback receiving module 330 and a key updating module 340 .

[0062] The request generation module 310 is used to read the clock information used for timing, and if the clock information meets the key update interval of the current device, generate a key update request for the current device;

[0063] A feedback generation module 320 is used to encrypt the device identification of the current device and the key update request, and send the encrypted device identification and the key update request to a data collector, wherein the data collector is used to obtain the device identification of the current device and the key update request through decryption processing, and generate key update feedback information according to the device identification and the key update request, and perform encryption processing to obtain the encrypted key update feedback information, wherein the key update feedback information also includes an update timing command;

[0064] A feedback receiving module 330 is used to receive the encrypted key update feedback information sent by the data collector, and obtain the key update feedback information through decryption processing;

[0065] The key updating module 340 is configured to execute the key updating instruction to update the key of the current device if the key updating feedback information includes the key updating instruction.

[0066] An embodiment of the present invention provides a device key update device, which reads clock information used for timing, and generates a key update request for the current device if the clock information meets the key update interval of the current device; encrypts the device identification and key update request of the current device, and sends the encrypted device identification and key update request to a data aggregator, which obtains the device identification and key update request of the current device through decryption processing, and generates key update feedback information based on the device identification and key update request, and encrypts the information to obtain the encrypted key update feedback information; receives the encrypted key update feedback information sent by the data aggregator, and decrypts the information to obtain the key update feedback information; if the key update feedback information includes a key update instruction, executes the key update instruction, and updates the key of the current device. The current device can actively initiate a key update request, thereby initiating a targeted key update request to the data aggregator, reducing the burden on the server and improving the key update efficiency.

[0067] In an optional implementation of the embodiment of the present invention, optionally, the request generation module 310 is specifically used to:

[0068] Determine the time interval from the last key update based on the clock information, and if the time interval from the last key update meets the key update interval, determine whether the current moment is in a preset idle time period of the current device;

[0069] If the current time is in a preset idle time period of the current device, a key update request for the current device is generated.

[0070] In an optional implementation manner of the embodiment of the present invention, optionally, the feedback generation module 320 is specifically used to:

[0071] Execute the key update instruction and start timing based on the update timing command;

[0072] Determine whether the execution time of the key update instruction is completed within a preset time interval based on the timing time.

[0073] In an optional implementation manner of the embodiment of the present invention, optionally, the device key update apparatus further includes: an update termination module, configured to terminate the key update service of the current device if the key update feedback information includes a non-update command.

[0074] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0075] The above-mentioned product can execute the method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0076] Embodiment 4

[0077] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0078] like Figure 4 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors 16, a storage device 28, a bus 18 connecting different system components (including the storage device 28 and the processor 16), and a calendar clock chip.

[0079] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

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

[0081] The storage device 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The storage device 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0082] A program 42 having a set (at least one) of program modules 40 may be stored, for example, in a storage device 28, such program modules 40 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a gateway environment. The program modules 40 generally perform the functions and / or methods of the embodiments described herein.

[0083] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, cameras, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the electronic device 12 may also communicate with one or more gateways (e.g., a local area network (LAN), a wide area network (WAN), and / or a public gateway, such as the Internet) via a gateway adapter 20. As shown, the gateway adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.

[0084] The processor 16 executes various functional applications and data processing by running programs stored in the storage device 28 .

[0085] Embodiment 5

[0086] Embodiment 5 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the device key update method provided in the embodiment of the present invention is implemented.

[0087] Of course, the computer program stored in a computer-readable storage medium provided by an embodiment of the present invention is not limited to the method operation described above, but can also execute the device key update method provided by any embodiment of the present invention.

[0088] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0089] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable source code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0090] Source code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0091] Computer source code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The source code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of gateway, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0092] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A device key update method, characterized in that: An electronic device applied to access a power distribution network system, the method comprising: Reading clock information used for timing, and if the clock information satisfies the key update interval of the current device, generating a key update request for the current device; Encrypting the device identification of the current device and the key update request, and sending the encrypted device identification and the key update request to a data aggregator, wherein the data aggregator is used to obtain the device identification of the current device and the key update request through decryption processing, and generate key update feedback information according to the device identification and the key update request, and perform encryption processing to obtain the encrypted key update feedback information; receiving the encrypted key update feedback information sent by the data collector, and performing decryption processing to obtain the key update feedback information; If the key update feedback information includes a key update instruction, executing the key update instruction to update the key of the current device; The key update feedback information also includes an update timing command; The executing the key update instruction to update the key of the current device includes: Execute the key update instruction and start timing based on the update timing command; Based on the timing time, it is determined whether the execution time of the key update instruction is completed within a preset time interval; wherein the update timing command is a command that triggers timing while the key is updated, and is used to detect the key update duration.

2. The method according to claim 1, characterized in that If the clock information satisfies the key update interval of the current device, a key update request of the current device is generated, including: Determine the time interval from the last key update based on the clock information, and if the time interval from the last key update meets the key update interval, determine whether the current moment is in a preset idle time period of the current device; If the current time is in a preset idle time period of the current device, a key update request for the current device is generated.

3. The method according to claim 1, characterized in that The method further comprises: If the key update feedback information includes a non-update command, the key update service of the current device is terminated.

4. A device key update method, characterized in that: include: The current device reads clock information used for timing, and if the clock information satisfies the key update interval of the current device, generates a key update request for the current device, encrypts the device identification of the current device and the key update request, and sends the encrypted device identification and the key update request to the data aggregator; The data aggregator decrypts the received encrypted information of the device identification and the key update request to obtain the device identification of the current device and the key update request, generates key update feedback information according to the device identification and the key update request, performs encryption processing to obtain encrypted key update feedback information, and feeds back the encrypted key update feedback information to the current device; The current device receives the encrypted key update feedback information sent by the data collector, decrypts the information to obtain the key update feedback information, and if the key update feedback information includes a key update instruction, executes the key update instruction to update the key of the current device; The current device receives the update timing command sent by the data collector, and starts timing based on the update timing command; Based on the timing time, it is determined whether the execution time of the key update instruction is completed within a preset time interval; wherein the update timing command is a command that triggers timing while the key is updated, and is used to detect the key update duration.

5. The method according to claim 4, characterized in that Before generating the key update feedback information according to the device identifier and the key update request, the method further includes: Based on the update request frequency of the current device, or the time interval from the last key update; If the update request frequency is within a preset frequency range, and the time interval from the last key update is within a preset time interval range, then it is determined that the key update request is valid; If the update request frequency is not within the preset frequency range, or the time interval from the last key update is not within the preset time interval range, the key update request is determined to be invalid, and the key update channel of the current device is closed.

6. A device key updating apparatus, characterized in that: include: A request generation module, used to read clock information used for timing, and if the clock information meets the key update interval of the current device, generate a key update request for the current device; A feedback generation module, used to encrypt the device identification of the current device and the key update request, and send the encrypted device identification and the key update request to a data collector, wherein the data collector is used to obtain the device identification of the current device and the key update request through decryption processing, and generate key update feedback information according to the device identification and the key update request, and perform encryption processing to obtain the encrypted key update feedback information; A feedback receiving module, used for receiving the encrypted key update feedback information sent by the data collector, and decrypting the encrypted key update feedback information to obtain the key update feedback information; A key updating module, configured to execute the key updating instruction to update the key of the current device if the key updating feedback information includes the key updating instruction; The key update feedback information also includes an update timing command; The feedback generation module is specifically used to execute the key update instruction and start timing based on the update timing command; determine whether the execution time of the key update instruction is completed within a preset time interval based on the timing time; wherein the update timing command is a command that triggers timing at the same time as the key is updated, and is used to detect the key update duration.

7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the device key updating method as described in any one of claims 1 to 5 is implemented.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the device key updating method as described in any one of claims 1 to 5 is implemented.