CN112671904B - Method and device for transmitting equipment state information, storage medium and electronic device - Google Patents

Method and device for transmitting equipment state information, storage medium and electronic device Download PDF

Info

Publication number
CN112671904B
CN112671904B CN202011541702.2A CN202011541702A CN112671904B CN 112671904 B CN112671904 B CN 112671904B CN 202011541702 A CN202011541702 A CN 202011541702A CN 112671904 B CN112671904 B CN 112671904B
Authority
CN
China
Prior art keywords
state information
devices
target
equipment
negotiation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011541702.2A
Other languages
Chinese (zh)
Other versions
CN112671904A (en
Inventor
杨磊
胡鼎譞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202011541702.2A priority Critical patent/CN112671904B/en
Publication of CN112671904A publication Critical patent/CN112671904A/en
Application granted granted Critical
Publication of CN112671904B publication Critical patent/CN112671904B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a device for transmitting equipment state information, a storage medium and an electronic device, wherein the method comprises the following steps: carrying out negotiation networking on a plurality of devices in a target area to obtain a negotiation networking result, wherein the communication modes of the plurality of devices are the same, and the negotiation networking result is used for indicating the plurality of devices to be interconnected according to the communication modes; synchronizing state information of other equipment to the target equipment according to the negotiation networking result, wherein the other equipment is other equipment except the target equipment in the multiple equipment; by adopting the technical scheme, the problems that server resources are repeatedly occupied due to single-user multiple devices in the related technology are solved, the receiving pressure of the remote server on the state information of the devices is reduced, and the maintenance cost of the remote server resources is saved.

Description

Method and device for transmitting equipment state information, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for transmitting device status information, a storage medium, and an electronic apparatus.
Background
The intelligent modules are increasingly popularized, the intelligent WIFI module is also one of the current mainstream intelligent modules, but the information synchronization of a single WIFI device and a cloud server is more and more frequent, but a large amount of WIFI intelligent devices generate a large amount of information data by adopting a traditional reporting strategy, so that an operator continuously increases the cost of the server to ensure the stability of the data; in addition, after a user purchases the intelligent device to access the network, the intelligent device and the cloud server can continuously synchronize state information, and if a plurality of devices exist in a same local area network in a family or an enterprise, each device and the cloud server can synchronize. The problem that server resources are repeatedly occupied due to the fact that a single user is provided with multiple devices easily occurs; for example: air conditioner, refrigerator, oven, television, sweeper, water purifier, smoke machine, water heater, washing machine, etc. which need to be in conventional state synchronization, such as heartbeat, etc.; at present, each user home often has more than 10 similar intelligent devices, and each device reports heartbeat to the cloud server continuously, so that the pressure on the server is gradually increased, even a bottleneck is brought, and a large amount of cloud server resources are consumed.
Aiming at the problems that in the related technology, a single user and multiple devices repeatedly occupy server resources and the like, an effective solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a method and a device for transmitting equipment state information, a storage medium and an electronic device, which are used for at least solving the problems that in the related technology, a single user and multiple devices cause repeated occupation of server resources and the like.
According to an embodiment of the present invention, a method for transmitting device status information is provided, including: carrying out negotiation networking on a plurality of devices in a target area to obtain a negotiation networking result, wherein the communication modes of the devices are the same, and the negotiation networking result is used for indicating the devices to be interconnected according to the communication modes; synchronizing state information of other devices to a target device according to the negotiation networking result, wherein the other devices are the devices except the target device; and uploading the state information to a remote server through the target equipment.
In an exemplary embodiment, negotiating networking is performed on a plurality of devices in a target area to obtain a result of negotiating networking, including: determining that the target device is a master device from the plurality of devices; and indicating the main equipment to interact with other equipment so as to realize negotiation networking of a plurality of equipment in the target area and obtain a negotiation networking result.
In an exemplary embodiment, determining that the target device is a master device from the plurality of devices includes: determining whether the plurality of devices receive a discovery message sent by a router; and the target equipment which does not receive the discovery message is taken as the master equipment.
In an exemplary embodiment, after synchronizing the state information of the other device to the target device according to the negotiation networking result, the method further includes: acquiring a sending rule of the state information; performing state processing on the state information according to the sending rule, wherein the state processing comprises one of the following steps: and performing synchronous packet transmission on the state information needing synchronous transmission, and performing interval transmission on the state information of the target time period.
In an exemplary embodiment, uploading the status information to a remote server by the target device includes: acquiring a communication channel between the target equipment and a remote server; determining a sending period of the state information according to the transmission stability of the communication channel; and uploading the state information to a remote server according to the sending period.
In an exemplary embodiment, synchronizing the state information of the other device to the target device according to the negotiation networking result includes: acquiring equipment identification of equipment corresponding to the state information; and the equipment identification and the state information are in one-to-one correspondence, and the equipment identification and the state information which are in one-to-one correspondence are synchronously stored in a data buffer area of the target equipment.
According to another embodiment of the present invention, there is also provided an apparatus for transmitting device status information, including: the network configuration module is used for carrying out negotiation network configuration on a plurality of devices in a target area to obtain a negotiation network configuration result, wherein the communication modes of the devices are the same, and the negotiation network configuration result is used for indicating the devices to be interconnected according to the communication modes; a synchronization module, configured to synchronize state information of other devices to a target device according to the negotiation networking result, where the other devices are other devices except the target device in the multiple devices; and the uploading module is used for uploading the state information to a remote server through the target equipment.
In an exemplary embodiment, the networking module is further configured to determine that the target device is a master device from the multiple devices; and indicating the main equipment to interact with other equipment so as to realize the negotiation networking of a plurality of pieces of equipment in the target area and obtain a negotiation networking result.
In an exemplary embodiment, the networking module is further configured to determine whether the multiple devices receive a discovery packet sent by the router; and the target equipment which does not receive the discovery message is taken as the master equipment.
In an exemplary embodiment, the apparatus further comprises: the acquisition module is used for acquiring the sending rule of the state information; performing state processing on the state information according to the sending rule, wherein the state processing comprises one of the following steps: and performing synchronous packet transmission on the state information needing synchronous transmission, and performing interval transmission on the state information of the target time period.
In an exemplary embodiment, the upload module is further configured to acquire a communication channel between the target device and a remote server; determining a sending period of the state information according to the transmission stability of the communication channel; and uploading the state information to a remote server according to the sending period.
In an exemplary embodiment, the synchronization module is further configured to acquire a device identifier of a device corresponding to the state information; and the equipment identification and the state information are in one-to-one correspondence, and the equipment identification and the state information which are in one-to-one correspondence are synchronously stored in a data buffer area of the target equipment.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to carry out the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, a plurality of devices in a target area are subjected to negotiation networking to obtain a negotiation networking result, wherein the communication modes of the devices are the same, and the negotiation networking result is used for indicating the devices to be interconnected according to the communication modes; synchronizing state information of other devices to a target device according to the negotiation networking result, wherein the other devices are the devices except the target device; by adopting the technical scheme, the problems that in the related technology, a single user and multiple devices cause repeated occupation of server resources and the like are solved, the receiving pressure of the remote server on the state information of the devices is reduced, and the maintenance cost of the remote server resources is saved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of an intelligent device of a method for transmitting device status information according to an embodiment of the present invention;
fig. 2 is a flowchart of a transmission method of device status information according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a plurality of devices interacting with a cloud server service in accordance with an alternative embodiment of the present invention;
FIG. 4 is a schematic diagram of an ad hoc network system architecture of an intelligent device of an alternative embodiment of the present invention;
fig. 5 is a block diagram of a device for transmitting device status information according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the embodiment of the application can be executed in a computer terminal, intelligent equipment or a similar arithmetic device. Taking an example of an operation on an intelligent device, fig. 1 is a hardware structure block diagram of an intelligent device of a method for transmitting device state information according to an embodiment of the present invention. As shown in fig. 1, the smart device may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the smart device. For example, a smart device may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or more functionality than that shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the transmission method of the device state information in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the smart device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the smart device. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for transmitting device status information is provided, which is applied to the above-mentioned intelligent device, and fig. 2 is a flowchart of a method for transmitting device status information according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, carrying out negotiation networking on a plurality of devices in a target area to obtain a negotiation networking result, wherein the communication modes of the devices are the same, and the negotiation networking result is used for indicating the devices to be interconnected according to the communication modes;
step S204, synchronizing state information of other devices to a target device according to the negotiation networking result, wherein the other devices are the devices except the target device;
step S206, uploading the status information to a remote server through the target device.
Through the technical scheme, multiple devices in the target area are subjected to negotiation networking to obtain a negotiation networking result, wherein the communication modes of the multiple devices are the same, and the negotiation networking result is used for indicating the multiple devices to be interconnected according to the communication modes; synchronizing state information of other equipment to the target equipment according to the negotiation networking result, wherein the other equipment is other equipment except the target equipment in the multiple equipment; by adopting the technical scheme, the problems that server resources are repeatedly occupied due to single-user multiple devices in the related technology are solved, the receiving pressure of the remote server on the state information of the devices is reduced, and the maintenance cost of the remote server resources is saved.
It should be noted that, in the optional embodiment of the present invention, multiple devices may automatically initiate negotiation networking only in the same communication mode, and the communication mode may be bluetooth, WIFI, or the like, but is not limited thereto, and the present invention does not limit this.
In an exemplary embodiment, negotiating networking is performed on a plurality of devices in a target area to obtain a result of negotiating networking, including: determining that the target device is a master device from the plurality of devices; and indicating the main equipment to interact with other equipment so as to realize negotiation networking of a plurality of equipment in the target area and obtain a negotiation networking result.
In short, when a negotiation networking is performed, a target device is determined as a main device from a plurality of devices according to a priority level preset by a user, and then a plurality of devices capable of performing negotiation networking in a target area are determined according to an interaction confirmation result through interaction between the main device and other devices, so that a negotiation networking result is obtained.
In an exemplary embodiment, determining that the target device is a master device from the plurality of devices includes: determining whether the plurality of devices receive a discovery message sent by a router; and the target equipment which does not receive the discovery message is taken as the master equipment.
That is, in order to quickly determine the master device from the multiple devices, when the router sends the discovery packet to all devices in the target area, the target device that does not receive the discovery packet is taken as the master device.
In an exemplary embodiment, after synchronizing the state information of the other device to the target device according to the negotiation networking result, the method further includes: acquiring a sending rule of the state information; performing state processing on the state information according to the sending rule, wherein the state processing comprises one of the following steps: and performing synchronous packet transmission on the state information needing synchronous transmission, and performing interval transmission on the state information of the target time period.
For example, if the device a and the device B need to send data information to a cloud server (corresponding to a remote server in the embodiment of the present invention) at the same time, the data information of the device a and the data information of the device B may be sent to a manager device (corresponding to a master device in the embodiment of the present invention), and then the manager device synchronizes and packages the data information and sends the data information to the cloud server; if the data information of the device a and the device B needs to be transmitted asynchronously, for example, the device a and the device B transmit the data information at intervals. The manager device may send the data information of the device a after receiving the data information, wait for several hundred milliseconds, and send the data information of the device B to the cloud server. If the device data information comes in the time period, the received data information which cannot be sent is packaged together with the data information of the device A or the data information of the device B and sent to the cloud server.
In an exemplary embodiment, uploading the status information to a remote server by the target device includes: acquiring a communication channel between the target equipment and a remote server; determining a sending period of the state information according to the transmission stability of the communication channel; and uploading the state information to a remote server according to the sending period.
Because the communication channel between the target device and the remote server can perform rapid data transmission within a certain period of time, that is, no other device occupies the communication resources between the target device and the remote server, the sending period of the state information can be set, and when the communication resources are not occupied or are less occupied, the state information on the target device is sent to the remote server through the communication channel.
In an exemplary embodiment, synchronizing the state information of the other device to the target device according to the negotiation networking result includes: acquiring equipment identification of equipment corresponding to the state information; and the equipment identification and the state information are in one-to-one correspondence, and the equipment identification and the state information which are in one-to-one correspondence are synchronously stored in a data buffer area of the target equipment.
It can be understood that, in order to facilitate determination of status information of different devices to know when a device that needs to upload the status information is abnormal or has been removed from service, the status information of the device and the device identifier of the device are synchronously stored in the data buffer of the target device in a one-to-one correspondence manner, and after the status information is uploaded to the remote server, a device that does not send the status information can be accurately determined.
In order to better understand the process of the transmission method of the device status information, the following describes a flow of the transmission method of the device status information with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
In an optional implementation mode, a method for transmitting equipment state information of intelligent equipment is provided, a set of unified data synchronization method is established by protocol intercommunication between wifi local intelligent equipment and adopting a local area network self-discovery and self-networking mode to uniformly report states and turn into a whole, and the local area network intelligent equipment self-networking mode uniformly reports states and heartbeats, so that the pressure of a server is reduced, and a large amount of cost for server resource maintenance every year is saved.
Optionally, fig. 3 is a schematic diagram of data interaction between multiple devices and a cloud server service according to an optional embodiment of the present invention, which specifically includes the following steps:
step S302: the intelligent equipment discovers that if the intelligent equipment is powered on for the first time (default 30 seconds) and the equipment discovery message is not received, the intelligent equipment sets the intelligent equipment as manager equipment;
step S304: the manager device sends a management request;
step S306: receiving a management request device, and responding to the management request according to the device attribute of the management request device;
step S308: after receiving the information, the manager equipment pushes the subscribeable service to the managed equipment;
step S310: the managed device subscribes data information and services to be pushed, such as heartbeats and the like;
step S312: the managed device directly synchronizes data information (such as heartbeats) with the manager device and does not separately synchronize with the cloud server;
and S314, packaging and reporting the synchronous data information of all the subscription devices in the local area network to the cloud server service terminal.
For example, the above steps can be achieved by utilizing protocol intercommunication among wifi local intelligent devices to perform intelligent negotiation networking among the intelligent devices, a set of unified data synchronization method is established, the local area network intelligent devices perform self-networking and report states and heartbeats in a unified manner, the server pressure is reduced, and a large amount of cost for server resource maintenance every year is saved.
For convenience of understanding, the edge computing policy of the ad hoc network, the interaction between the smart devices, and the cloud server in the alternative embodiment of the present invention will now be described.
Fig. 4 is a schematic diagram of an ad hoc network system architecture of an intelligent device according to an alternative embodiment of the present invention, where the system architecture at least includes: intelligent device and wireless routing device. After the intelligent device is powered on, role positioning and data subscription of a wifi device ad hoc network (which is equivalent to networking negotiation in the embodiment of the present invention) method need to be performed by using the method provided in the optional embodiment of the present invention, and then state synchronization with a cloud server needs to be performed.
Optionally, the network negotiation process at the intelligent device side of the present invention is as follows: 1) The intelligent equipment 1 is powered on and connected with the router; 2) The intelligent device 1 confirms the identity according to the discovery protocol, and if no message is found, the intelligent device is confirmed to be manager equipment; 3) The intelligent device 1 sends a management request to the intelligent device 2 and the intelligent device 3, and the intelligent devices 2 and 3 respond to the management data information (which is equivalent to the state information in the embodiment of the invention) according to the states of the intelligent devices; 4) After receiving the reply, the intelligent device 1 starts to perform service push capable of subscribing to the managed device; 5) The intelligent devices 2 and 3 subscribe data information and services, such as heartbeats and the like, which need to be pushed; 6) If heartbeat or state report exists in the intelligent devices 2 and 3, the data information is sent to the intelligent device 1, and after the intelligent device 1 receives the data information, the data information of the intelligent devices 2 and 3 is assembled and pushed to the cloud server through the channel 2 and the router. The link connection interaction with the cloud server under the condition of multiple devices can be reduced, and the operation pressure and resources are reduced for the cloud server.
Optionally, the method for managing data information by the administrator device includes: if the device 2 and the device 3 need to send data information to the cloud server at the same time, the data information can be sent to the manager device, and then the manager device synchronously packages and sends the data information to the cloud server; if the devices 2 and 3 transmit asynchronously, for example, there is an interval between the devices 2 and 3 transmitting data information. The manager device 1 may send the first data information after receiving the data information, wait for several hundred milliseconds, and send the second data information to the cloud server. If the device data information comes in the time period, the data information can be received and packaged together to be sent to the cloud server.
Optionally, the complex case analysis created by the administrator device: if a plurality of devices confirm that the device role is the manager device, the manager devices can communicate with each other, and whether to switch to the device with a more stable signal by judging the connection stability with the cloud server and the signal strength with the router is judged, so that the manager devices can exercise the capability of the manager devices; if a plurality of manager devices exist at the same time, the manager devices can also select high connection stability and signal strength with the cloud server to confirm the capability of a certain device to drive the manager device.
According to the optional embodiment of the invention, when the equipment state information is transmitted, the manager equipment is calculated through self-networking among the intelligent local area network equipment, the manager equipment uniformly manages other equipment heartbeat and control commands on the premise of not influencing the real-time property of the data information and sends the same data information to the cloud server, so that when dozens of intelligent wifi equipment exist in a family, if the same heartbeat or control command needs to interact with the cloud server, the condition that the cloud server simultaneously establishes connection and interaction with dozens of equipment is avoided, the pressure of the cloud server is reduced, in addition, a set of uniform data synchronization method is established through protocol intercommunication among wifi local intelligent equipment, one or more manager equipment is selected in the local area network through the self-networking of the intelligent local area network equipment, the state and heartbeat are uniformly reported, the pressure of the server is reduced, and a large amount of cost for maintaining server resources every year is saved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for transmitting device status information is further provided, where the device is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a device for transmitting device status information according to an embodiment of the present invention; as shown in fig. 5, includes:
a networking module 52, configured to perform negotiation networking on multiple devices in a target area to obtain a negotiation networking result, where communication modes of the multiple devices are the same, and the negotiation networking result is used to instruct the multiple devices to perform interconnection according to the communication modes;
a synchronization module 54, configured to synchronize state information of other devices to a target device according to the negotiation networking result, where the other devices are other devices except the target device in the multiple devices;
an uploading module 56, configured to upload the status information to a remote server through the target device.
Through the technical scheme, multiple devices in the target area are subjected to negotiation networking to obtain a negotiation networking result, wherein the communication modes of the multiple devices are the same, and the negotiation networking result is used for indicating the multiple devices to be interconnected according to the communication modes; synchronizing state information of other equipment to the target equipment according to the negotiation networking result, wherein the other equipment is other equipment except the target equipment in the multiple equipment; by adopting the technical scheme, the problems that server resources are repeatedly occupied due to single-user multiple devices in the related technology are solved, the receiving pressure of the remote server on the state information of the devices is reduced, and the maintenance cost of the remote server resources is saved.
It should be noted that, in the optional embodiment of the present invention, a plurality of devices may automatically initiate negotiation networking only in the same communication mode, and the communication mode may be bluetooth, WIFI, or the like, but is not limited thereto, and the present invention does not limit this.
In an exemplary embodiment, the networking module is further configured to determine that the target device is a master device from the multiple devices; and indicating the main equipment to interact with other equipment so as to realize the negotiation networking of a plurality of pieces of equipment in the target area and obtain a negotiation networking result.
In short, when a negotiation networking is performed, a target device is determined as a main device from a plurality of devices according to a priority level preset by a user, and then a plurality of devices capable of performing negotiation networking in a target area are determined according to an interaction confirmation result through interaction between the main device and other devices, so that a negotiation networking result is obtained.
In an exemplary embodiment, the networking module is further configured to determine whether the multiple devices receive a discovery packet sent by the router; and the target equipment which does not receive the discovery message is taken as the master equipment.
That is, in order to quickly determine the master device from the multiple devices, when the router sends the discovery packet to all devices in the target area, the target device that does not receive the discovery packet is taken as the master device.
In an exemplary embodiment, the apparatus further includes: the acquisition module is used for acquiring the sending rule of the state information; performing state processing on the state information according to the sending rule, wherein the state processing comprises one of the following steps: and performing synchronous packet transmission on the state information needing synchronous transmission, and performing interval transmission on the state information of the target time period.
For example, if the device a and the device B need to send data information to a cloud server (corresponding to a remote server in the embodiment of the present invention) at the same time, the data information of the device a and the data information of the device B may be sent to a manager device (corresponding to a master device in the embodiment of the present invention), and then the manager device synchronizes and packages the data information and sends the data information to the cloud server; if the data information of the device a and the device B needs to be transmitted asynchronously, for example, the device a and the device B transmit the data information at intervals. The manager device may send the data information of the device a after receiving the data information, wait for several hundred milliseconds, and send the data information of the device B to the cloud server. If the device data information comes in the time period, the received data information which cannot be sent is packaged together with the data information of the device A or the data information of the device B and sent to the cloud server.
In an exemplary embodiment, the upload module is further configured to acquire a communication channel between the target device and a remote server; determining a sending period of the state information according to the transmission stability of the communication channel; and uploading the state information to a remote server according to the sending period.
Because the communication channel between the target device and the remote server can perform rapid data transmission within a certain period of time, that is, no other device occupies the communication resources between the target device and the remote server, the sending period of the state information can be set, and when the communication resources are not occupied or are less occupied, the state information on the target device is sent to the remote server through the communication channel.
In an exemplary embodiment, the synchronization module is further configured to acquire an equipment identifier of an equipment corresponding to the state information; and the equipment identification and the state information are in one-to-one correspondence, and the equipment identification and the state information which are in one-to-one correspondence are synchronously stored in a data buffer area of the target equipment.
It can be understood that, in order to facilitate determination of status information of different devices to know when a device that needs to upload the status information is abnormal or has been removed from service, the status information of the device and the device identifier of the device are synchronously stored in the data buffer of the target device in a one-to-one correspondence manner, and after the status information is uploaded to a remote server, a device that does not send the status information can be accurately determined.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
In an exemplary embodiment, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
the method comprises the following steps that S1, multiple devices in a target area are subjected to negotiation networking to obtain a negotiation networking result, wherein the multiple devices are identical in communication mode, and the negotiation networking result is used for indicating the multiple devices to be interconnected according to the communication mode;
s2, synchronizing state information of other equipment to target equipment according to the negotiation networking result, wherein the other equipment is other equipment except the target equipment in the multiple equipment;
and S3, uploading the state information to a remote server through the target equipment.
In an exemplary embodiment, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus 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.
In an exemplary embodiment, in the present embodiment, the processor may be configured to execute the following steps by a computer program:
the method comprises the following steps that S1, multiple devices in a target area are subjected to negotiation networking to obtain a negotiation networking result, wherein the multiple devices are identical in communication mode, and the negotiation networking result is used for indicating the multiple devices to be interconnected according to the communication mode;
s2, synchronizing state information of other equipment to target equipment according to the negotiation networking result, wherein the other equipment is other equipment except the target equipment in the multiple equipment;
and S3, uploading the state information to a remote server through the target equipment.
In an exemplary embodiment, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details of this embodiment are not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented in a general purpose computing device, they may be centralized in a single computing device or distributed across a network of multiple computing devices, and in one exemplary embodiment, they may be implemented in program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed in an order different from that described, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps therein may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method for transmitting device status information, comprising:
carrying out negotiation networking on a plurality of devices in a target area to obtain a negotiation networking result, wherein the communication modes of the devices are the same, and the negotiation networking result is used for indicating the devices to be interconnected according to the communication modes;
synchronizing state information of other devices to a target device according to the negotiation networking result, wherein the other devices are devices other than the target device in the multiple devices, and the target device is a device which does not receive a discovery message sent by a router within a preset time period after power-on;
uploading the state information to a remote server through the target device;
wherein before uploading the state information to a remote server by the target device, the method further comprises:
determining the connection stability of each target device and the far-end service and the signal strength of a router under the condition that a plurality of target devices exist;
determining a stable signal stronger device in a plurality of target devices based on the connection stability and the signal strength, and taking the stable signal stronger device as an uploading device of the state information;
after synchronizing the state information of other devices to the target device according to the negotiation networking result, the method further includes: acquiring a sending rule of the state information; performing state processing on the state information according to the sending rule, wherein the state processing comprises one of the following steps: performing synchronous packet transmission on the state information needing synchronous transmission, and performing interval transmission on the state information of a target time period;
wherein, the sending the state information needing synchronous sending by synchronous package includes: synchronously packaging the state information of the other devices received by the main device, and sending a packaging result to a remote server;
the sending the state information of the target time period at intervals includes: sending the state information received firstly to a remote server according to the time intervals of different state information sent by other equipment in a target time period; or carrying the state information without the transmission requirement in different state information sent by other equipment for packaging and sending under the condition that the state information without the transmission requirement is received in the target time period.
2. The method of claim 1, wherein negotiating networking with a plurality of devices in a target area to obtain a negotiation networking result comprises:
determining that the target device is a master device from the plurality of devices;
and indicating the main equipment to interact with other equipment so as to realize negotiation networking of a plurality of equipment in the target area and obtain a negotiation networking result.
3. The method of claim 2, wherein determining that the target device is a master device from the plurality of devices comprises:
determining whether the plurality of devices receive a discovery message sent by a router;
and the target equipment which does not receive the discovery message is taken as the master equipment.
4. The method of claim 1, wherein uploading the status information to a remote server by the target device comprises:
acquiring a communication channel between the target equipment and a remote server;
determining a sending period of the state information according to the transmission stability of the communication channel;
and uploading the state information to a remote server according to the sending period.
5. The method of claim 1, wherein synchronizing the state information of the other devices to the target device according to the result of negotiating networking comprises:
acquiring equipment identification of equipment corresponding to the state information;
and the equipment identification and the state information are in one-to-one correspondence, and the equipment identification and the state information which are in one-to-one correspondence are synchronously stored in a data buffer area of the target equipment.
6. An apparatus for transmitting device status information, comprising:
the network configuration module is used for carrying out negotiation network configuration on a plurality of devices in a target area to obtain a negotiation network configuration result, wherein the communication modes of the devices are the same, and the negotiation network configuration result is used for indicating the devices to be interconnected according to the communication modes;
a synchronization module, configured to synchronize state information of other devices to a target device according to the negotiation networking result, where the other devices are devices other than the target device in the multiple devices, and the target device is a device that does not receive a discovery packet sent by the router within a preset time period after power-on;
the uploading module is used for uploading the state information to a remote server through the target equipment;
the uploading module further comprises a determining unit, configured to determine, if there are multiple target devices, connection stability of each target device with the remote service and signal strength with a router; determining a stable signal stronger device in a plurality of target devices based on the connection stability and the signal strength, and taking the stable signal stronger device as an uploading device of the state information;
the device further comprises: the acquisition module is used for acquiring the sending rule of the state information; performing state processing on the state information according to the sending rule, wherein the state processing comprises one of the following steps: carrying out synchronous packet transmission on the state information needing to be synchronously transmitted and carrying out interval transmission on the state information of a target time period;
wherein, the sending the state information needing synchronous sending by synchronous package includes: synchronously packaging the state information of the other devices received by the main device, and sending the packaging result to a remote server;
the sending the state information of the target time period at intervals includes: sending the state information received firstly to a remote server according to the time intervals of different state information sent by other equipment in a target time period; or carrying the state information without the transmission requirement in different state information sent by other equipment for packaging and sending under the condition that the state information without the transmission requirement is received in the target time period.
7. The apparatus of claim 6, wherein the networking module is further configured to determine that the target device is a master device from the plurality of devices; and indicating the main equipment to interact with other equipment so as to realize the negotiation networking of a plurality of pieces of equipment in the target area and obtain a negotiation networking result.
8. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 5.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN202011541702.2A 2020-12-23 2020-12-23 Method and device for transmitting equipment state information, storage medium and electronic device Active CN112671904B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011541702.2A CN112671904B (en) 2020-12-23 2020-12-23 Method and device for transmitting equipment state information, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011541702.2A CN112671904B (en) 2020-12-23 2020-12-23 Method and device for transmitting equipment state information, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112671904A CN112671904A (en) 2021-04-16
CN112671904B true CN112671904B (en) 2023-03-28

Family

ID=75409245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011541702.2A Active CN112671904B (en) 2020-12-23 2020-12-23 Method and device for transmitting equipment state information, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112671904B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115884201A (en) * 2021-09-27 2023-03-31 中兴通讯股份有限公司 Networking method, device, equipment and storage medium
CN114697359B (en) * 2022-03-04 2024-03-22 青岛海尔科技有限公司 Data collection method and device, storage medium and electronic device
CN114650299A (en) * 2022-03-09 2022-06-21 博思数采科技发展有限公司 Networking method for rapidly configuring station of bidding evaluation site
CN115314503A (en) * 2022-06-30 2022-11-08 青岛海尔科技有限公司 Data transmission method and device, storage medium and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429883A (en) * 2015-10-22 2016-03-23 上海斐讯数据通信技术有限公司 Long connection method of multiple intelligent devices and server equipment and intelligent device
CN106953767A (en) * 2017-04-06 2017-07-14 腾讯科技(深圳)有限公司 A kind of network-building method of equipment room, apparatus and system
CN108092862A (en) * 2017-12-15 2018-05-29 四川爱联科技有限公司 WiFi ad hoc network control systems based on Internet of Things
CN108880952A (en) * 2018-03-28 2018-11-23 青岛海信智慧家居系统股份有限公司 A kind of household appliance reports the method, device and equipment of information
CN108881437A (en) * 2018-05-22 2018-11-23 四川斐讯信息技术有限公司 A kind of intelligent terminal acts on behalf of decision-making technique
CN110392373A (en) * 2019-08-05 2019-10-29 深圳市久通物联科技股份有限公司 A kind of wireless self-networking method and system applied to intelligent electronic lock
CN110932759A (en) * 2019-12-05 2020-03-27 成都长虹网络科技有限责任公司 Master-slave equipment self-adapting method of power line modem

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429883A (en) * 2015-10-22 2016-03-23 上海斐讯数据通信技术有限公司 Long connection method of multiple intelligent devices and server equipment and intelligent device
CN106953767A (en) * 2017-04-06 2017-07-14 腾讯科技(深圳)有限公司 A kind of network-building method of equipment room, apparatus and system
CN108092862A (en) * 2017-12-15 2018-05-29 四川爱联科技有限公司 WiFi ad hoc network control systems based on Internet of Things
CN108880952A (en) * 2018-03-28 2018-11-23 青岛海信智慧家居系统股份有限公司 A kind of household appliance reports the method, device and equipment of information
CN108881437A (en) * 2018-05-22 2018-11-23 四川斐讯信息技术有限公司 A kind of intelligent terminal acts on behalf of decision-making technique
CN110392373A (en) * 2019-08-05 2019-10-29 深圳市久通物联科技股份有限公司 A kind of wireless self-networking method and system applied to intelligent electronic lock
CN110932759A (en) * 2019-12-05 2020-03-27 成都长虹网络科技有限责任公司 Master-slave equipment self-adapting method of power line modem

Also Published As

Publication number Publication date
CN112671904A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN112671904B (en) Method and device for transmitting equipment state information, storage medium and electronic device
CN110831075A (en) Data transmission method and device and service switching method and device
CN111865736B (en) Equipment control method and device
CN110233746B (en) Home networking method and home networking AP
CN108023687B (en) Information sending and receiving method and device, base station and terminal
CN105208583A (en) Intelligent household electrical appliance networking method and apparatus, and intelligent equipment
CN111405492A (en) Method, device, storage medium, and electronic device for connecting to target network
CN114501469A (en) Method, device and system for configuring network slice
CN112469055A (en) Equipment network distribution method, related equipment and storage medium
CN103634657A (en) Television and mobile terminal synchronous WIFI connection setup method and device
CN113423105A (en) Network connection method and device
CN113518125A (en) Offline data uploading method and system, storage medium and electronic device
CN113747478A (en) Communication method and device
CN112437454A (en) Data transmission method and device, storage medium and electronic device
CN112637931A (en) Method and device for establishing network connection
CN104168629A (en) Proximity-based service relay node discovering method, terminal and proximity-based service communication system
WO2023005410A1 (en) Information synchronization method and system, storage medium, and electronic device
CN112202877A (en) Gateway linkage method, gateway, cloud server and user terminal
CN112202652A (en) Method and device for displaying information of equipment to be networked, storage medium and electronic device
CN111884938A (en) Router information acquisition method and device
CN114125052B (en) Target operation execution method and device, storage medium and electronic device
CN113596089B (en) Distribution network binding method and device of equipment, storage medium and electronic device
CN112533304B (en) Ad hoc network management method, device, system, electronic equipment and storage medium
CN111757275B (en) Device connection method and device, storage medium and electronic device
CN109495918B (en) Data transmission method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant