Method and device for updating attribute information, storage medium and electronic device
By determining whether the M2M node successfully sends control commands and updating the attribute information of grouped devices in the IoT cloud, the problem of being unable to update device attributes under network abnormalities is solved and timely maintenance of device attributes is achieved.
Patent Information
- Application Number
- CN202210603443.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-05-30
AI Technical Summary
Under abnormal network conditions, the problem of being unable to receive attribute information reports from the device, resulting in the inability to update device attributes, has not yet been effectively resolved.
By determining whether the M2M node successfully sends the control command, the attribute information of the grouped device is updated according to the attribute information to be controlled in the control command, and the IoT cloud is used to uniformly maintain the attributes of the device. The last command is issued and does not depend on the attributes of the device. Report.
Even in abnormal network conditions, the attribute information on the device can be updated to ensure timely maintenance of device attributes.
Smart Images

Figure CN115174297B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular, to a method and device for updating attribute information, a storage medium, and an electronic device. Background Art
[0002] With the development of the Internet, home appliances have become an indispensable item in people's lives. In recent years, smart home appliances have also emerged. The operation of these smart home appliances often relies on the application and processing of modern technologies such as the Internet of Things, the Internet, and electronic chips.
[0003] In the prior art, the attribute information of smart home appliances is generally maintained in the Internet of Things. The existing attribute information maintenance strategy is generally based on the attribute information reporting of the device side. However, in the case of network abnormalities, the attribute information reporting of the device side cannot be received, which makes it impossible to update the attributes of the device.
[0004] In the related art, in the case of network anomalies, the attribute information report from the device cannot be received, which leads to the inability to update the attributes of the device. No effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method and device for updating attribute information, a storage medium and an electronic device, so as to at least solve the problem in the related art that, in the event of network anomalies, the attribute information report from the device side cannot be received, thereby resulting in the inability to update the attributes of the device.
[0006] According to an embodiment of the present application, a method for updating attribute information is provided, comprising: determining whether notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, and the control command is used to control grouped devices, and the grouped devices include: multiple home appliances; in a case where the notification information sent by the M2M node is received, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, updating the attribute information of the grouped devices according to attribute information to be controlled in the control command, wherein the attribute information to be controlled is information of attribute information for controlling the multiple home appliances according to the control instruction.
[0007] In an exemplary embodiment, before determining whether the notification information sent by the M2M node is received, the method also includes: dividing the multiple household appliances into a group device according to the first device identifiers of the multiple household appliances in the group device request; acquiring first attribute information corresponding to the multiple household appliances respectively through the first device identifier; and generating attribute information of the group device according to the first attribute information.
[0008] In an exemplary embodiment, generating attribute information of the grouped devices based on the first attribute information includes: obtaining device types of the multiple household appliances, wherein the device types of the multiple household appliances are consistent; obtaining second attribute information preset for the device type based on the device type; determining the intersection of the first attribute information and the second attribute information, and generating the attribute information of the grouped devices based on the intersection.
[0009] In an exemplary embodiment, after updating the attribute information of the grouped device according to the attribute information to be controlled in the control command, the method further includes: determining a first client that sends the control command; sending a first control result to the first client, wherein the first control result is used to indicate that the M2M node successfully sends the control command to the device access gateway, so that the first client updates the attribute information of the grouped device stored in the first client according to the first control result.
[0010] In an exemplary embodiment, after updating the attribute information of the grouped devices according to the attribute information to be controlled in the control command, the method further includes: receiving response information sent by the multiple household appliances; when the response information is used to indicate that the multiple household appliances have successfully responded to the control command, determining a second client that has a communication connection with the Internet of Things cloud, wherein the second client is a client that has not sent the control command; and sending a second control result to the second client, wherein the second control result is used to indicate that the multiple household appliances have successfully responded to the control command, so that the second client updates the attribute information of the grouped devices stored in the second client according to the second control result.
[0011] In an exemplary embodiment, after updating the attribute information of the grouped device according to the attribute information to be controlled in the control command, the method also includes one of the following: refusing to send the second control result to the second client when the response information is used to indicate that the multiple household appliances have not successfully responded to the control command; refusing to send the second control result to the second client when no response information sent by the multiple household appliances is received within a preset time period.
[0012] In an exemplary embodiment, after determining whether the notification information sent by the M2M node is received, the method further includes: upon receiving the notification information sent by the M2M node, and the notification information is used to indicate that the M2M node has not successfully sent the control command to the device access gateway, refusing to update the attribute information of the grouped device according to the to-be-controlled attribute information in the control command.
[0013] According to another embodiment of the embodiment of the present application, a device for updating attribute information is also provided, including: a determination module, used to determine whether notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, and the control command is used to control grouped devices, and the grouped devices include: multiple home appliances; an update module, used to update the attribute information of the grouped devices according to the attribute information to be controlled in the control command when the notification information sent by the M2M node is received and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, wherein the attribute information to be controlled is information of the attribute information of controlling the multiple home appliances according to the control instruction.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned attribute information updating method when running.
[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the attribute information updating method through the computer program.
[0016] In an embodiment of the present application, it is determined whether notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, and the control command is used to control the grouped device, and the grouped device includes: multiple home appliances; when the notification information sent by the M2M node is received, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, the attribute information of the grouped device is updated according to the attribute information to be controlled in the control command, wherein the attribute information to be controlled is information of the attribute information of the multiple home appliances controlled according to the control instruction; the above technical solution is adopted to solve the problem that the attribute information report of the device side cannot be received in the case of network abnormality, thereby resulting in the inability to update the attributes of the device. In this application, the attributes of the device are uniformly maintained by the Internet of Things cloud, based on the last command issued, and do not rely on the attribute report of the device side, so that even in the case of network abnormality, the attribute information of the device side can still be updated. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a hardware environment diagram of a method for updating attribute information in an embodiment of the present application;
[0020] Figure 2 is a flowchart of a method for updating attribute information according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a method for updating attribute information according to an embodiment of the present application;
[0022] Figure 4 is a structural block diagram of a device for updating attribute information according to an embodiment of the present application (I);
[0023] Figure 5 This is a structural block diagram (II) of a device for updating attribute information according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] According to one aspect of an embodiment of the present application, a method for updating attribute information is provided. The method for updating attribute information is widely used in smart home, smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for updating attribute information can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0027] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0028] In this embodiment, a method for updating attribute information is provided, which is applied to an Internet of Things terminal. Figure 2 : is a flowchart of a method for updating attribute information according to an embodiment of the present application, the process includes the following steps:
[0029] Step S202, determining whether notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, the control command is used to control a group device, and the group device includes: a plurality of home appliances;
[0030] It should be noted that the M2M node is located in the IoT cloud. The M2M node is used to simulate the device receiving a response (equivalent to notification information) and send the simulated device receiving response to the domain model.
[0031] Step S204, when notification information sent by the M2M node is received, and the notification information is used to indicate that the M2M node has successfully sent the control command to the device access gateway, the attribute information of the grouped device is updated according to the attribute information to be controlled in the control command, wherein the attribute information to be controlled is information on the attribute information of the multiple home appliances controlled according to the control instruction.
[0032] Through the above steps, it is determined whether the notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, and the control command is used to control the grouped devices, and the grouped devices include: multiple home appliances; when the notification information sent by the M2M node is received, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, the attribute information of the grouped devices is updated according to the attribute information to be controlled in the control command, wherein the attribute information to be controlled is information of the attribute information of the multiple home appliances controlled according to the control instruction; the problem in the related art that in the case of network abnormality, the attribute information report of the device side cannot be received, thereby resulting in the inability to update the attributes of the device and the like is solved. In the present application, the attributes of the devices are uniformly maintained by the Internet of Things cloud, based on the last command issued, and are not dependent on the attribute report of the device side, so that even in the case of network abnormality, the attribute information of the device side can still be updated.
[0033] In an exemplary embodiment, before determining whether the notification information sent by the M2M node is received, the method further includes:
[0034] Step 1: dividing the plurality of household electrical appliances into a group device according to the first device identifiers of the plurality of household electrical appliances in the group device request;
[0035] Step 2: Obtain first attribute information corresponding to each of the plurality of household electrical appliances through the first device identifier;
[0036] Step 3: Generate attribute information of the grouped devices according to the first attribute information.
[0037] That is, when the grouped devices are established, first attribute information of multiple household appliances is determined according to first device identifiers of multiple household appliances in the grouped device request; and attribute information of the grouped devices is determined according to the intersection of the first attribute information.
[0038] In an exemplary embodiment, generating attribute information of the grouped devices based on the first attribute information includes: obtaining device types of the multiple household appliances, wherein the device types of the multiple household appliances are consistent; obtaining second attribute information preset for the device type based on the device type; determining the intersection of the first attribute information and the second attribute information, and generating the attribute information of the grouped devices based on the intersection.
[0039] It should be noted that the devices added to the grouped devices have consistent device functions (for example, a grouped device contains only lighting devices with consistent device functions, a grouped device contains only air-conditioning devices with consistent device functions, etc.), and the Internet of Things terminal can obtain the second attribute information corresponding to the device type of the household appliance in the database, wherein the second attribute information is pre-set for the target object; determine the intersection of the first attribute information and the second attribute information, and use the intersection as the attribute information of the grouped device, that is, the attribute information of the grouped device can at least determine the attribute information of the household appliance.
[0040] For example, the attribute information of device 1 is "temperature" and "wind speed"; the attribute information of device 2 is "temperature" and "wind speed", then the attribute information of the grouped devices is "temperature" and "wind speed".
[0041] In an exemplary embodiment, after updating the attribute information of the grouped device according to the to-be-controlled attribute information in the control command, the method further includes:
[0042] Step 1: Determine the first client that sends the control command;
[0043] Step 2: Send a first control result to the first client, wherein the first control result is used to indicate that the M2M node successfully sends the control command to the device access gateway, so that the first client updates the attribute information of the grouped device stored in the first client according to the first control result.
[0044] It should be noted that, when the M2M node successfully sends the control command to the device access gateway, there is no need to wait for the response information returned by the home appliance, and the first control result is directly sent to the first client, so that the first client updates the attribute information of the grouped device according to the first control result and the control command.
[0045] For example, when a control command is used to control the temperature and wind speed of an air-conditioning device; when the first client receives a control result of the M2M node successfully sending the control command to the device access gateway, the first client updates the attribute information of the grouped device according to the specific information corresponding to the "temperature" and "wind speed" in the control command. Optionally, attribute information corresponding to multiple household appliances can be determined based on the updated attribute information of the grouped devices.
[0046] In an exemplary embodiment, after updating the attribute information of the grouped devices according to the attribute information to be controlled in the control command, it also includes: receiving response information sent by the multiple household appliances; when the response information is used to indicate that the multiple household appliances have successfully responded to the control command, determining a second client that has a communication connection with the Internet of Things cloud, wherein the second client is a client that has not sent the control command; sending a second control result to the second client, wherein the second control result is used to indicate that the multiple household appliances have successfully responded to the control command, so that the second client updates the attribute information of the grouped devices stored in the second client according to the second control result.
[0047] That is, when receiving response information sent by the multiple household appliances, an asynchronous thread is created to push the second control result to a second client that has a communication connection with the IoT cloud and is online, so that the second client updates the attribute information of the grouped devices stored in the second client according to the received second control result.
[0048] Optionally, determine whether response information sent by the multiple home appliances indicating that the multiple home appliances have successfully responded to the control command is received within a preset time period; if response information sent by the multiple home appliances indicating that the multiple home appliances have successfully responded to the control command is not received within the preset time period, send a second control result to the second client, wherein the second control result is used to indicate that the multiple home appliances have successfully responded to the control command, so that the second client updates the attribute information of the grouped devices stored in the second client according to the second control result.
[0049] Through the above embodiment, when the response information sent by the multiple home appliances for indicating that the multiple home appliances have successfully responded to the control command is not received within the preset time period, the control results for indicating that the multiple home appliances have successfully responded to the control command will also be sent to the second client; the problem in the related technology that in the event of network abnormalities, the attribute information report from the device side cannot be received, which leads to the inability of other clients to update the attributes of the device is solved.
[0050] In an exemplary embodiment, after updating the attribute information of the grouped device according to the attribute information to be controlled in the control command, the method also includes one of the following: refusing to send the second control result to the second client when the response information is used to indicate that the multiple household appliances have not successfully responded to the control command; refusing to send the second control result to the second client when no response information sent by the multiple household appliances is received within a preset time period.
[0051] That is, when receiving response information sent by the multiple home appliances that fail to respond to the control command, the second control result is no longer sent to the second client, so that the second client does not need to update the attribute information of the grouped devices stored in the second client.
[0052] Optionally, determine whether response information sent by the multiple home appliances indicating that the multiple home appliances have successfully responded to the control command is received within a preset time period; if response information sent by the multiple home appliances indicating that the multiple home appliances have successfully responded to the control command is not received within the preset time period, refuse to send a second control result to the second client, wherein the second control result is used to indicate that the multiple home appliances have successfully responded to the control command.
[0053] That is, when the target object does not receive response information sent by the multiple home appliances within the preset time period to indicate that the multiple home appliances have successfully responded to the control command, the target object can independently choose whether to send the second control result to the second client.
[0054] In an exemplary embodiment, after determining whether the notification information sent by the M2M node is received, it also includes: when the notification information sent by the M2M node is received, and the notification information is used to indicate that the M2M node has not successfully sent the control command to the device access gateway, refusing to update the attribute information of the grouped device according to the to-be-controlled attribute information in the control command.
[0055] In order to better understand the process of the above-mentioned attribute information updating method, the implementation method flow of the above-mentioned attribute information updating is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
[0056] In this embodiment, a method for updating attribute information is provided. Figure 3 is a schematic diagram of a method for updating attribute information according to an embodiment of the present application, such as Figure 3 As shown, the specific steps are as follows:
[0057] Step S301: Create attribute information of grouped devices according to a device group creation request;
[0058] It should be noted that when creating the attribute information of grouped devices, it is not necessary to automatically synchronize the actual status of the devices in the group. You can provide users with an entry to manually synchronize the actual status of the devices in the group.
[0059] Step S302: upon receiving a control instruction from the user, sending the control command to the device access gateway through the M2M node, so that the device access gateway sends the control command to the gateway device;
[0060] Step S303: receiving notification information sent by the M2M node;
[0061] Step S304: when receiving notification information sent by the M2M node, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, updating the attribute information of the grouped device according to the attribute information to be controlled in the control command;
[0062] Step S305: sending a first control result indicating that the M2M node successfully sends the control command to the device access gateway to the first client, so that the first client updates the attribute information of the grouped device stored in the first client according to the first control result;
[0063] Step S306: receiving response information sent by the plurality of household electrical appliances;
[0064] Step S307: when the response information indicates that the plurality of household appliances successfully respond to the control command, determining a second client having a communication connection with the IoT cloud;
[0065] Step S308: Sending a second control result indicating that the plurality of household appliances successfully respond to the control command to the second client, so that the second client updates the attribute information of the grouped devices stored in the second client according to the second control result.
[0066] This application maintains the device attributes uniformly by the IoT cloud, based on the last command issued, and does not rely on the attribute reporting of the device side. Therefore, even in the case of network abnormalities, the attribute information on the device side can still be updated.
[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0068] Figure 4 1 is a structural block diagram of a device for updating attribute information according to an embodiment of the present application (I); Figure 4 As shown, including:
[0069] A determination module 42 is used to determine whether the notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, and the control command is used to control the grouped device, and the grouped device includes: a plurality of home appliances;
[0070] The updating module 44 is used to update the attribute information of the grouped device according to the attribute information to be controlled in the control command, upon receiving the notification information sent by the M2M node, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, wherein the attribute information to be controlled is information on the attribute information of controlling the multiple home appliances according to the control instruction.
[0071] Through the above-mentioned device, it is determined whether the notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, and the control command is used to control the grouped device, and the grouped device includes: multiple home appliances; when the notification information sent by the M2M node is received, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, the attribute information of the grouped device is updated according to the attribute information to be controlled in the control command, wherein the attribute information to be controlled is information of the attribute information of the multiple home appliances controlled according to the control instruction, and the problem that the attribute information report of the device side cannot be received in the case of network abnormality in the related art, thereby resulting in the inability to update the attributes of the device and the like, and thus the present application uniformly maintains the attributes of the device by the Internet of Things cloud, based on the last command issued, and does not rely on the attribute report of the device side, and thus even in the case of network abnormality, the attribute information of the device side can still be updated.
[0072] In an exemplary embodiment, Figure 5 is a structural block diagram of a device for updating attribute information according to an embodiment of the present application (II); Figure 5 As shown, the above-mentioned device also includes: a generation module 52, which is used to divide the multiple household appliances into a group device according to the first device identifiers of the multiple household appliances in the group device request; obtain the first attribute information corresponding to the multiple household appliances respectively through the first device identifier; and generate the attribute information of the group device according to the first attribute information.
[0073] In an exemplary embodiment, a generation module 52 is used to obtain device types of the multiple household appliances, wherein the device types of the multiple household appliances are consistent; obtain second attribute information preset for the device type according to the device type; determine the intersection of the first attribute information and the second attribute information, and generate attribute information of the grouped devices according to the intersection.
[0074] In an exemplary embodiment, Figure 5 is a structural block diagram of a device for updating attribute information according to an embodiment of the present application (II); Figure 5 As shown, the above-mentioned apparatus also includes: a sending module 54, used to determine a first client that sends the control command; send a first control result to the first client, wherein the first control result is used to indicate that the M2M node successfully sends the control command to the device access gateway, so that the first client updates the attribute information of the grouped device stored in the first client according to the first control result.
[0075] In an exemplary embodiment, a sending module 54 is used to receive response information sent by the multiple household appliances; when the response information is used to indicate that the multiple household appliances have successfully responded to the control command, determine a second client that has a communication connection with the Internet of Things cloud, wherein the second client is a client that has not sent the control command; and send a second control result to the second client, wherein the second control result is used to indicate that the multiple household appliances have successfully responded to the control command, so that the second client updates the attribute information of the grouped devices stored in the second client according to the second control result.
[0076] In an exemplary embodiment, the sending module 54 is also used for one of the following: refusing to send the second control result to the second client when the response information is used to indicate that the multiple household appliances have not successfully responded to the control command; refusing to send the second control result to the second client when no response information sent by the multiple household appliances is received within a preset time period.
[0077] In an exemplary embodiment, the updating module 44 is further configured to, upon receiving notification information sent by the M2M node, and the notification information is used to indicate that the M2M node has failed to send the control command to the device access gateway, refuse to update the attribute information of the grouped device according to the attribute information to be controlled in the control command.
[0078] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0079] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0080] S1, determining whether notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, the control command is used to control a group device, and the group device includes: a plurality of home appliances;
[0081] S2, when receiving notification information sent by the M2M node, and the notification information is used to indicate that the M2M node has successfully sent the control command to the device access gateway, updating the attribute information of the grouped device according to the attribute information to be controlled in the control command, wherein the attribute information to be controlled is information on the attribute information of the multiple home appliances controlled according to the control instruction.
[0082] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0083] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0084] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0085] S1, determining whether notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends the control command to the device access gateway, the control command is used to control a group device, and the group device includes: a plurality of home appliances;
[0086] S2, when receiving notification information sent by the M2M node, and the notification information is used to indicate that the M2M node has successfully sent the control command to the device access gateway, updating the attribute information of the grouped device according to the attribute information to be controlled in the control command, wherein the attribute information to be controlled is information on the attribute information of the multiple home appliances controlled according to the control instruction.
[0087] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0088] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0089] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0090] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for updating attribute information, characterized in that: Applied to IoT terminals, including: Determining whether notification information sent by the M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends a control command to the device access gateway, the control command is used to control a group device, and the group device includes: a plurality of home appliances; Upon receiving notification information sent by the M2M node, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, updating the attribute information of the grouped device according to the attribute information to be controlled in the control command, wherein the attribute information to be controlled is information on the attribute information of the plurality of home appliances controlled according to the control command; After updating the attribute information of the grouped device according to the attribute information to be controlled in the control command, the method further includes: determining a first client that sends the control command; sending a first control result to the first client, wherein the first control result is used to indicate that the M2M node successfully sends the control command to the device access gateway, so that the first client updates the attribute information of the grouped device stored in the first client according to the first control result.
2. The method for updating attribute information according to claim 1, characterized in that: Before determining whether the notification information sent by the M2M node is received, the method further includes: Divide the plurality of household electrical appliances into a group of devices according to first device identifiers of the plurality of household electrical appliances in the group device request; The first attribute information respectively corresponding to the plurality of household electrical appliances is obtained through the first device identifier; and the attribute information of the grouped devices is generated according to the first attribute information.
3. The method for updating attribute information according to claim 2, characterized in that: Generating attribute information of the grouped device according to the first attribute information includes: Acquire device types of the plurality of household electrical appliances, wherein the device types of the plurality of household electrical appliances are consistent; Acquire second attribute information preset for the device type according to the device type; An intersection of the first attribute information and the second attribute information is determined, and attribute information of the grouped devices is generated according to the intersection.
4. The method for updating attribute information according to claim 1, characterized in that: After updating the attribute information of the grouped devices according to the to-be-controlled attribute information in the control command, the method further includes: receiving response information sent by the plurality of household electrical appliances; In a case where the response information is used to indicate that the plurality of household appliances successfully respond to the control command, determining a second client having a communication connection with the IoT cloud, wherein the second client is a client that has not sent the control command; A second control result is sent to the second client, wherein the second control result is used to indicate that the multiple household appliances have successfully responded to the control command, so that the second client updates the attribute information of the grouped devices stored in the second client according to the second control result.
5. The method for updating attribute information according to claim 4, characterized in that: After updating the attribute information of the grouped device according to the to-be-controlled attribute information in the control command, the method further includes one of the following: If the response information indicates that the plurality of household appliances have not successfully responded to the control command, refusing to send the second control result to the second client; If no response information is received from the multiple household appliances within a preset time period, the second control result is refused to be sent to the second client.
6. The method for updating attribute information according to claim 1, characterized in that: After determining whether the notification information sent by the M2M node is received, the method further includes: When receiving notification information sent by the M2M node, and the notification information is used to indicate that the M2M node fails to send the control command to the device access gateway, refusing to update the attribute information of the grouped device according to the to-be-controlled attribute information in the control command.
7. A device for updating attribute information, characterized in that: Applied to IoT terminals, including: A determination module, used to determine whether notification information sent by an M2M node is received, wherein the notification information is used to indicate whether the M2M node successfully sends a control command to a device access gateway, the control command is used to control a group device, and the group device includes: a plurality of home appliances; an updating module, configured to update the attribute information of the grouped device according to the attribute information to be controlled in the control command, upon receiving the notification information sent by the M2M node, and the notification information is used to indicate that the M2M node successfully sends the control command to the device access gateway, wherein the attribute information to be controlled is information on the attribute information of the plurality of home appliances controlled according to the control command; The device further includes: a sending device for determining a first client that sends the control command; sending a first control result to the first client, wherein the first control result is used to indicate that the M2M node successfully sends the control command to the device access gateway, so that the first client updates the attribute information of the grouped device stored in the first client according to the first control result.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
