Method and device for controlling GPD device based on GreenPower protocol
By adding device registration information fields to the Green Power protocol, cloud registration and legality verification of GPD devices are achieved, registration and control problems that cannot be clearly defined and explained in the existing technology are solved, and the intelligence and Internet of Things functions of GPD devices are improved.
Patent Information
- Application Number
- CN202411744957.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art has failed to clearly define and explain how to register GPD devices in the cloud and display registered GPD devices on the App side, support legality and security verification of GPD devices, and control other devices across protocols.
By adding the device registration information field in the networking request of the Green Power protocol and establishing a Green Power protocol agreement with the GPD device to add the device registration information field at the end, cloud registration of GPD devices is realized. The specific steps include receiving the networking request of the GPD device, analyzing the MAC address, comparing the MAC address recorded in the cloud, and using product information to register the device with the cloud, and receiving the terminal's control instructions for device control.
It realizes the registration and legality verification of GPD devices in the cloud, supports cross-protocol control of other devices, and improves the intelligence and Internet of Things functions of GPD devices.
Smart Images

Figure CN119652938A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communications, and more specifically, to a method and apparatus for controlling a GPD device based on the GreenPower protocol, an electronic device, and a non-transitory computer-readable storage medium. Background Art
[0002] The wireless communication protocol Zigbee Green Power is a sub-protocol in the Zigbee standard, specifically designed to support communication between low-power or battery-free devices in the Zigbee network. Green Power allows devices such as sensors and switches to operate under extremely low power or energy harvesting conditions by optimizing energy usage and reducing device power consumption. The Zigbee Green Power protocol enables devices to operate under extremely low power conditions, even without battery power, by reducing data packet size, optimizing the protocol stack, and supporting energy harvesting technology.
[0003] Green Power Device is a device that uses the Green Power protocol. Based on the hardware of the self-generating device, the Green Power Device (GPD) implements the networking and data reporting functions of the coordinator (the gateway is often used as the coordinator). The Zigbee Green Power protocol clearly defines the commands that the GPD device supports to send in the network. It supports data interaction in the Zigbee network that supports the Green Power protocol.
[0004] In summary, GPD devices have low power consumption. The commands and protocol specifications they support are currently clearly defined, and they support data interaction in the Zigbee network that supports the Green Power protocol. However, at present, there are no clear definitions and descriptions of the functions and specific applications of registering GPD devices in the cloud and displaying registered GPD devices on the App side, supporting the legality and security verification of GPD devices, and supporting cross-protocol control of other devices.
[0005] The inventors of this application have discovered that how to make the GPD device an intelligent device that can access the Internet and become an important control node in the Internet of Things (for example, using the GPD device to control Zigbee devices and Bluetooth devices) is a problem that urgently needs to be solved. Summary of the invention
[0006] The present application aims to propose a method and apparatus, an electronic device and a non-transitory computer-readable storage medium for controlling a GPD device based on the GreenPower protocol, so as to solve the problem of how the current GPD device can access the Internet.
[0007] According to one aspect of the present application, a method for controlling a GPD device based on the GreenPower protocol is proposed, and the method is applied to a gateway, comprising: receiving a networking request sent by the GPD device based on the GreenPower protocol, the networking request including product information and a MAC address of the GPD device; parsing the MAC address of the GPD device from the networking request; comparing whether the parsed MAC address is consistent with the MAC address of the GPD device recorded in the cloud; when the parsed MAC address is consistent with the MAC address of the GPD device recorded in the cloud, registering the GPD device to the cloud using the product information of the GPD device.
[0008] According to some embodiments, before receiving the networking request sent by the GPD device based on the GreenPower protocol, it also includes: adding a device registration information field at the end of the GreenPower protocol, and establishing a GreenPower protocol agreement with the GPD device in which the device registration information field is added at the end, wherein the networking request includes the device registration information field, and the device registration information field includes the product information and MAC address of the GPD device.
[0009] According to some embodiments, the device registration information field also includes verification information, and before parsing the MAC address of the GPD device from the networking request, it also includes: performing a legitimacy verification on the networking request based on the verification information.
[0010] According to some embodiments, the product information of the GPD device includes PID information, product type and / or version number of the GPD device.
[0011] According to some embodiments, after registering the GPD device with the cloud using the product information of the GPD device, the product information of the GPD device registered in the cloud can be obtained by the terminal from the cloud, and the method also includes: receiving a control instruction sent by the terminal through the cloud; and controlling the GPD device based on the control instruction.
[0012] According to some embodiments, the MAC address of the GPD device recorded in the cloud is sent by the GPD device to the cloud via a host computer and saved in the cloud.
[0013] According to some embodiments, the host computer is used to burn firmware to the GPD device, and the firmware includes product information and MAC address of the GPD device.
[0014] According to one aspect of the present application, a gateway device for controlling a GPD device based on the GreenPower protocol is proposed, including: a networking request unit, receiving a networking request sent by the GPD device based on the GreenPower protocol, the networking request including product information and a MAC address of the GPD device; a MAC address parsing unit, for parsing the MAC address of the GPD device from the networking request; a MAC address comparison unit, for comparing whether the parsed MAC address is consistent with the MAC address of the GPD device recorded in the cloud; and a device registration unit, for registering the GPD device to the cloud using the product information of the GPD device when the parsed MAC address is consistent with the MAC address of the GPD device recorded in the cloud.
[0015] According to one aspect of the present application, an electronic device is provided, comprising: a processor; and a memory storing a computer program, wherein when the computer program is executed by the processor, the processor executes the method described in any of the preceding embodiments.
[0016] According to one aspect of the present application, a non-transitory computer-readable storage medium is provided, on which computer-readable instructions are stored. When the instructions are executed by a processor, the processor executes the method described in any of the previous embodiments.
[0017] According to the embodiment of the present application, based on the GreenPower protocol, the networking of the device and the uploading of the GPD registration information are completed through one networking command, thereby realizing the registration of the GPD device in the cloud.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. By describing the exemplary embodiments in detail with reference to the drawings, the above and other objectives, features and advantages of the present application will become more apparent.
[0020] Figure 1 A flow chart of a method for controlling a GPD device based on the GreenPower protocol according to an exemplary embodiment of the present application is shown.
[0021] Figure 2 A schematic diagram of the burning process of a GPD device according to an exemplary embodiment of the present application is shown.
[0022] Figure 3A flow chart of a method for controlling a GPD device based on the GreenPower protocol according to an exemplary embodiment of the present application is shown.
[0023] Figure 4a A schematic diagram of the meaning of data fields defined in a GreenPower protocol according to an exemplary embodiment of the present application is shown.
[0024] Figure 4b The figure shows the parsing data of the frame format according to the Payload format diagram obtained from the Commission command of the Green Power networking request according to the exemplary embodiment of the present application.
[0025] Figure 4c A schematic diagram of a data format defined in a GreenPower protocol according to an exemplary embodiment of the present application is shown.
[0026] Figure 5 A device block diagram of a gateway device for controlling a GPD device based on the GreenPower protocol according to an exemplary embodiment of the present application is shown.
[0027] Figure 6 An electronic device according to an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. In the figures, the same figures show the same or similar parts, and thus their repeated description will be omitted.
[0029] The described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other modes, components, materials, devices or operations may be adopted. In these cases, known structures, methods, devices, implementations, materials or operations will not be shown or described in detail.
[0030] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0031] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0032] Before describing the embodiments of the present application, the terms appearing in the present application are first explained.
[0033] The specific embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0034] Figure 1 A flow chart of a method for controlling a GPD device based on the GreenPower protocol according to an exemplary embodiment of the present application is shown, wherein: Figure 1 The method shown includes steps S101, S103, S105 and S107. According to an embodiment of the present application, Figure 1 The method shown applies to a gateway.
[0035] like Figure 1 As shown, in step S101, a networking request sent by a GPD device based on the GreenPower protocol is received, wherein the networking request includes product information and a MAC address of the GPD device.
[0036] According to an embodiment of the present application, before step S101, a device registration information field is added to the end of the GreenPower protocol, and a GreenPower protocol agreement with a device registration information field added to the end is established with the GPD device, wherein the networking request includes a device registration information field, and the device registration information field includes product information and MAC address of the GPD device. In practice, the MAC address is used to match the corresponding GPD device in the cloud, and the product information is used by the GPD device to register the GPD device in the cloud.
[0037] The standard Green Power protocol only clarifies the process of GPD devices networking through networking packets, but networking packets cannot carry the necessary information for GPD devices to register in the cloud. In this embodiment, by appending and expanding the custom data format at the end of the Green Power networking data packet, the necessary information for device cloud registration is reported together with the networking packet, thus building a reporting channel for the necessary information for device cloud registration. The cloud completes the device registration process based on this necessary information.
[0038] In other embodiments, custom data is appended to the end of the networking data packet so that the device can add necessary information and verification mechanism for cloud registration of the device when sending the networking data packet. After receiving the networking data packet, the gateway intercepts the custom data, parses the custom data and obtains the device's PID (also known as product information), Version (also known as product or firmware version number), Mode id (also known as product type), MAC (device MAC address), and sends the necessary information for GPD device registration in the cloud to the cloud, which completes the device registration process based on the necessary information. This embodiment not only realizes the seamless expansion of the protocol, but also does not affect the existing functions and compatibility of the protocol.
[0039] In step S103, the MAC address of the GPD device is parsed from the networking request.
[0040] According to an embodiment of the present application, the device registration information field also includes verification information. Before step S103, Figure 1 The method shown also includes performing a validity check on the networking request according to the verification information, and after the check passes, executing step S103 to ensure communication security.
[0041] According to an embodiment of the present application, the MAC address is used to match the corresponding GPD device in the cloud to achieve accurate matching of the GPD device.
[0042] In step S105, the resolved MAC address is compared with the MAC address of the GPD device recorded in the cloud to see if they are consistent.
[0043] According to an embodiment of the present application, the MAC address of the GPD device recorded in the cloud is sent by the GPD device to the cloud through the host computer and saved in the cloud. In practice, before step S101, it is necessary to use the host computer to burn firmware to the GPD device. Among them, the burned firmware contains the product information and MAC address of the GPD device. After the burning is completed, the host computer also needs to read the MAC address information from the GPD device and send it to the cloud so that the cloud stores the MAC address of the GPD device.
[0044] In step S105, when the resolved MAC address is consistent with the MAC address of the GPD device recorded in the cloud, step S107 is executed.
[0045] In step S107, when the resolved MAC address is consistent with the MAC address of the GPD device recorded in the cloud, the GPD device is registered to the cloud using the product information of the GPD device.
[0046] In a specific embodiment, when the resolved MAC address is consistent with the MAC address of the GPD device recorded in the cloud, the gateway obtains the GPD device product information PID and product type Mode id to register the device with the cloud.
[0047] After registering the GPD device with the cloud using the product information of the GPD device, the product information of the GPD device registered in the cloud can be obtained by the terminal from the cloud. According to an embodiment of the present application, after step S107, it also includes receiving a control instruction sent by the terminal through the cloud, and controlling the GPD device based on the control instruction.
[0048] According to an embodiment of the present application, based on the GreenPower protocol, by adding the necessary information for GPD device cloud registration at the end of the networking package, it is achieved that one networking package completes the networking of the device and the uploading of GPD registration information, thereby completing the registration of the GPD device in the cloud.
[0049] According to the embodiment of the present application, the process of data from the GPD device end to the gateway end, the cloud, and then to the terminal application is completely constructed. After the data link is fully constructed, you can use the rich upper-level cloud resources to create various rules and execute various device actions. Create a scene on the terminal application (for example, control the brightness of the Zigbee light and the Bluetooth light), and associate the created scene with the command reported by the GPD device.
[0050] For example, when a command reported by a GPD device is received, the scenario associated with the command is executed, that is, the specific action of the GPD device in the scenario is executed. For example: controlling the brightness of a Zigbee light and a Bluetooth light.
[0051] In the early production stage of the GPD device, during the burning authorization process, the host computer will pull the firmware from the cloud and burn it into the GPD device. After that, the host computer will perform production testing on the GPD device after the firmware is burned, read the MAC address of the GPD device, and report the read MAC address of the GPD to the cloud. The cloud will record the MAC address of the GPD device to facilitate the subsequent verification of the legality of the GPD device's cloud registration.
[0052] Figure 2 A schematic diagram of a programming process of a GPD device according to an exemplary embodiment of the present application is shown. Figure 2 As shown, after the GPD device firmware burning authorization starts, the host computer pulls the burning firmware from the cloud and burns the pulled burning firmware into the GPD device; after that, the host computer starts authorization and writes the product information PID to the GPD device; after the burning is successful, the host computer reads the MAC address of the GPD device from the GPD device and reports the read MAC address to the cloud for storage.
[0053] Figure 3 A flow chart of a method for controlling a GPD device based on the GreenPower protocol according to an exemplary embodiment of the present application is shown. Figure 3 As shown, when the GPD device networking starts, the gateway opens the networking channel and starts to receive the networking request of the GPD device, that is, the Commissioning networking request. After that, the gateway parses the networking request according to the predetermined GreenPower protocol agreement and obtains data in the data format defined according to the embodiment of the present application. Among them, the parsed data includes the device registration information field, and the device registration information field includes the product information, MAC address and verification information of the GPD device.
[0054] The gateway first uses the verification information to perform a legitimacy check. If the verification CRC fails, no processing is performed. If the verification CRC passes, the MAC address of the GPD device in the data packet is obtained and compared with the MAC address stored in the cloud. If the MAC address of the GPD device matches the MAC address recorded in the cloud, the gateway will obtain the GPD device product information PID and product type Modeid and report it to the cloud to realize the registration of the GPD device in the cloud.
[0055] Figure 4a A schematic diagram of a data format defined in a GreenPower protocol according to an exemplary embodiment of the present application is shown. Figure 4a The data format shown includes product information PID, version number Version, product type Mode id, device Mac address and verification CRC, and its corresponding byte size is as follows Figure 4a shown.
[0056] Figure 4b A schematic diagram of GPD networking wireless data packet capture and analysis according to an exemplary embodiment of the present application is shown. Figure 4b As shown, the newly added field part of the embodiment of the present application is part of the Payload in the MAC layer of the GreenPower protocol, and is not part of the Application Payload in the GreenPower protocol, so it will not destroy the frame format of the GreenPower protocol.
[0057] When the gateway receives the Commission command of the networking request from the GPD device, it parses the data according to the Green Power standard data protocol format, and after parsing the GP Application Payload, it obtains the command as the networking command. Figure 4b The frame format is parsed according to the Payload format diagram obtained from the Commission command requested by the Green Power network, such as Figure 4b The parsed data shown includes 1-byte GPD DeviceID: 0x02, 1-byte Options: 0x89, 1-byte Extended Options: 0xF3, 16-byte GPD Key: 0xD3 0x35 0x68 0xBB 0x77 0x40 0x37 0x480xE8 0x4D 0x4A0xA9 0x85 0xE4 0xE8 0xA8, 4-byte GPD Key MIC: 0x62538D75 and 4-byte GPD out going counter: 0x00000009. At this point, there are 24 bytes of unused bits left at the end of the Mac Payload that have not been parsed. This data is the custom data added in this solution. The gateway follows Figure 4c The custom data format shown in the figure obtains the parsed data, including: PID (8Bytes): product information, Version (1Byte): version number, Mode id (6Bytes): product type, MAC (8Bytes): device MAC address and CRC (1Byte): checksum.
[0058] After that, the gateway completes the network access process of the Zigbee Green Power device based on the parsed data. For example, at the Zigbee level, the GPD device is successfully networked, and the gateway extracts the necessary information for the GPD device to register in the cloud from the custom data, and registers the GPD device to the cloud; the cloud verifies the registration information of the GPD device, and if the verification passes, it returns a successful registration and completes the cloud registration of the device; otherwise, the verification fails and returns a registration failure. For example, the reason for the failure returned is that the device Mac address is illegal, the device is unauthorized, etc.
[0059] The above mainly introduces the embodiments of the present application from the perspective of the method. Those skilled in the art should easily appreciate that, in combination with the operations or steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Those skilled in the art can use different ways to implement the described functions for each specific operation or method, and such implementation should not be considered to be beyond the scope of the present application.
[0060] The following describes the device embodiments of the present application. For details not described in the device embodiments of the present application, reference can be made to the method embodiments of the present application.
[0061] Figure 5 A device block diagram of a gateway device for controlling a GPD device based on the GreenPower protocol according to an exemplary embodiment of the present application is shown. Figure 5The apparatus shown includes a networking request unit 501, a MAC address parsing unit 503, a MAC address comparison unit 505, and a device registration unit 507. The networking request unit 501 receives a networking request sent by the GPD device based on the GreenPower protocol, wherein the networking request includes product information and a MAC address of the GPD device; the MAC address parsing unit 503 is used to parse the MAC address of the GPD device from the networking request; the MAC address comparison unit 505 is used to compare whether the parsed MAC address is consistent with the MAC address of the GPD device recorded in the cloud; and the device registration unit 507 is used to register the GPD device to the cloud using the product information of the GPD device when the parsed MAC address is consistent with the MAC address of the GPD device recorded in the cloud.
[0062] Figure 6 An electronic device according to an exemplary embodiment of the present application is shown. Figure 6 The electronic device 200 according to this embodiment of the present application is described. Figure 6 The electronic device 200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0063] like Figure 6 As shown, the electronic device 200 is in the form of a general computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one storage unit 220, a bus 230 connecting different system components (including the storage unit 220 and the processing unit 210), a display unit 240, etc.
[0064] The storage unit stores program codes, which can be executed by the processing unit 210, so that the processing unit 210 executes the methods described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 210 can execute the following: Figure 1 The method shown in .
[0065] The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 2201 and / or a cache memory unit 2202 , and may further include a read-only memory unit (ROM) 2203 .
[0066] The storage unit 220 may also include a program / utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 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 may include an implementation of a network environment.
[0067] Bus 230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0068] The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 200, and / or communicate with any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 250. Furthermore, the electronic device 200 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. 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 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0069] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. The technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation method of the present application.
[0070] The software product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 thereof.
[0071] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0072] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0073] The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the aforementioned functions.
[0074] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0075] According to an embodiment of the present application, a computer program is provided, including a computer program or an instruction. When the computer program or the instruction is executed by a processor, the method described above can be executed.
[0076] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, changes or deformations made by those skilled in the art based on the ideas of the present application, the specific implementation methods and the scope of application of the present application, all belong to the scope of protection of the present application. In summary, the content of this specification should not be construed as a limitation on the present application.
Claims
1. A method for controlling a GPD device based on the GreenPower protocol, the method being applied to a gateway, characterized in that: include: Receiving a networking request sent by the GPD device based on the GreenPower protocol, wherein the networking request includes product information and a MAC address of the GPD device; Parsing the MAC address of the GPD device from the networking request; Compare the resolved MAC address with the MAC address of the GPD device recorded in the cloud to see if they are consistent; When the resolved MAC address is consistent with the MAC address of the GPD device recorded in the cloud, the GPD device is registered with the cloud using the product information of the GPD device.
2. The method according to claim 1, characterized in that Before receiving the networking request sent by the GPD device based on the GreenPower protocol, the method further includes: Adding a device registration information field at the end of the GreenPower protocol, and establishing a GreenPower protocol agreement with the GPD device, in which the device registration information field is added at the end, The networking request includes the device registration information field, and the device registration information field includes the product information and MAC address of the GPD device.
3. The method according to claim 1, characterized in that The device registration information field also includes verification information, Before parsing the MAC address of the GPD device from the networking request, the method further includes: The network request is verified for legitimacy based on the verification information.
4. The method according to claim 1, characterized in that: The product information of the GPD device includes PID information, product type and / or version number of the GPD device.
5. The method according to claim 1, characterized in that: After registering the GPD device with the cloud using the product information of the GPD device, the product information of the GPD device registered in the cloud can be acquired by the terminal from the cloud, and the method further includes: Receiving a control instruction sent by the terminal through the cloud; Based on the control instruction, the GPD device is controlled.
6. The method according to claim 1, characterized in that The MAC address of the GPD device recorded in the cloud is sent by the GPD device to the cloud through the host computer and saved in the cloud.
7. The method according to claim 6, characterized in that The host computer is used to burn firmware to the GPD device, and the firmware includes product information and MAC address of the GPD device.
8. A gateway device for controlling a GPD device based on the GreenPower protocol, characterized in that: include: A networking request unit, receiving a networking request sent by the GPD device based on the GreenPower protocol, wherein the networking request includes product information and a MAC address of the GPD device; A MAC address parsing unit, configured to parse the MAC address of the GPD device from the networking request; A MAC address comparison unit, used to compare whether the resolved MAC address is consistent with the MAC address of the GPD device recorded in the cloud; A device registration unit is used to register the GPD device with the cloud using the product information of the GPD device when the resolved MAC address is consistent with the MAC address of the GPD device recorded in the cloud.
9. An electronic device, comprising: processor; as well as A memory storing a computer program, which, when executed by the processor, enables the processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 7.