CN115314503A - Data transmission method and device, storage medium and electronic device - Google Patents

Data transmission method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115314503A
CN115314503A CN202210761670.XA CN202210761670A CN115314503A CN 115314503 A CN115314503 A CN 115314503A CN 202210761670 A CN202210761670 A CN 202210761670A CN 115314503 A CN115314503 A CN 115314503A
Authority
CN
China
Prior art keywords
target
devices
equipment
data
cloud server
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.)
Pending
Application number
CN202210761670.XA
Other languages
Chinese (zh)
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
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Qingdao Haier Intelligent Home Appliance 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, Qingdao Haier Intelligent Home Appliance Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210761670.XA priority Critical patent/CN115314503A/en
Publication of CN115314503A publication Critical patent/CN115314503A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1051Group master selection mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1091Interfacing with client-server systems or between P2P systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The application discloses a data sending method and device, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the data sending method comprises the following steps: determining target equipment from the plurality of equipment under the condition that the local area network has the plurality of equipment, wherein the target equipment is selected from the plurality of equipment according to a preset rule; sending a first data request to a cloud server through the target device, and acquiring target meteorological data sent by the cloud server in response to the first data request; transmitting, by the target device, the target weather data to each device in a set of devices, wherein the set of devices includes other devices in the plurality of devices other than the target device. By adopting the technical scheme, the problem that a plurality of devices in the local area network respectively acquire meteorological data from the cloud server to occupy more resources of the external network bandwidth and the cloud server is solved.

Description

Data transmission method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of smart homes, in particular to a data sending method and device, a storage medium and an electronic device.
Background
Under general conditions, the equipment needs to refer to meteorological data when providing services related to weather, and then the equipment needs to obtain meteorological data from the cloud server, and under general conditions, all have a plurality of equipment in the family, and then each independent thing allies oneself with electrical equipment in the family all needs to obtain meteorological data from the cloud server respectively. However, each device frequently acquires the meteorological data from the cloud server, and occupies more external network bandwidth and server resources, so that the problem of failure or insufficient response in acquiring the meteorological data is easily caused under the condition of insufficient bandwidth or poor external network environment.
In the related art, an effective solution is not provided at present for the problem that a plurality of devices in a local area network respectively acquire meteorological data from a cloud server, which results in occupation of more external network bandwidth and resources of the cloud server.
Accordingly, there is a need for improvement in the related art to overcome the disadvantages of the related art.
Disclosure of Invention
The embodiment of the invention provides a data sending method and device, a storage medium and an electronic device, and at least solves the problem that a plurality of devices in a local area network respectively obtain meteorological data from a cloud server, so that more external network bandwidth and resources of the cloud server are occupied.
According to an aspect of the embodiments of the present invention, there is provided a data transmission method, including: determining target equipment from the plurality of equipment under the condition that the local area network has the plurality of equipment, wherein the target equipment is selected from the plurality of equipment according to a preset rule; sending a first data request to a cloud server through the target device, and acquiring target meteorological data sent by the cloud server in response to the first data request; transmitting, by the target device, the target weather data to each device in a group of devices, wherein the group of devices includes other devices in the plurality of devices other than the target device.
In one exemplary embodiment, determining the target device from the plurality of devices includes: instructing each of the plurality of devices to send corresponding first device information to the cloud server, wherein the first device information at least includes: the system comprises a processor model, memory capacity, a wireless fidelity (WIFI) module model, WIFI module signal strength, WIFI module power and a system version; and acquiring target equipment determined by the cloud server according to the first equipment information corresponding to each of the plurality of equipment.
In an exemplary embodiment, before obtaining the target device determined by the cloud server according to the first device information corresponding to each device in the multiple devices, the method further includes: determining a target election strategy and sending the target election strategy to the cloud server; and instructing the cloud server to select the target equipment from the plurality of equipment according to the target election strategy and the first equipment information corresponding to each of the plurality of equipment.
In one exemplary embodiment, determining the target device from the plurality of devices includes: randomly determining a first device from the plurality of devices, and instructing each device except the first device in the plurality of devices to send corresponding first device information to the first device, wherein the first device information at least includes: the system comprises a processor model, memory capacity, a wireless fidelity (WIFI) module model, WIFI module signal strength, WIFI module power and a system version; and instructing the first equipment to determine target equipment from the plurality of equipment according to the first equipment information corresponding to each of the plurality of equipment.
In an exemplary embodiment, before sending, by the target device, the first data request to the cloud server, the method further includes: instructing each device in the group of devices to send a corresponding second data request to the target device, wherein the second data request is used for indicating the type of weather data required by each device; instructing the target device to construct a target data table according to the second data request corresponding to each device in the group of devices, wherein the target data table has the type of meteorological data required by each device in the plurality of devices; sending a first data request to a cloud server through the target device, including: sending a first data request to a cloud server through the target device, wherein the first data request is used for requesting the cloud server to acquire target meteorological data, and the target meteorological data comprises all types of meteorological data recorded in the target data table.
In an exemplary embodiment, transmitting, by the target device, the target meteorological data to each device of a set of devices includes: determining, from the target data table, a type of meteorological data required for each device in the set of devices; transmitting, by the target device, weather data of the type required by each device of the set of devices in the target weather data to each device of the set of devices.
In an exemplary embodiment, transmitting, by the target device, the target meteorological data to each device of a set of devices includes: determining, by the target device, second device information for each device in the set of devices, wherein the second device information includes at least one of: a media intervention control layer address MAC using an identification of an application of the target meteorological data; and instructing the target equipment to encrypt the target meteorological data according to the second equipment information of each equipment in the group of equipment and the secret key of the local area network, and compressing the encrypted data and sending the compressed data to each equipment in the group of equipment.
According to another aspect of the embodiments of the present invention, there is also provided a data transmission apparatus, including: the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining target equipment from a plurality of equipment under the condition that the local area network has the plurality of equipment, and the target equipment is selected from the plurality of equipment according to a preset rule; the acquisition module is used for sending a first data request to a cloud server through the target equipment and acquiring target meteorological data sent by the cloud server in response to the first data request; a sending module, configured to send the target weather data to each device in a group of devices through the target device, where the group of devices includes other devices in the plurality of devices except the target device.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above data transmission method when running.
According to another aspect of the embodiments of the present invention, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data transmission method through the computer program.
According to the invention, under the condition that a plurality of devices are arranged in the local area network, one target device is selected from the plurality of devices, the target device is used for acquiring the target meteorological data from the cloud server, and the target meteorological data is sent to the other devices in the plurality of devices. Because a device in the local area network uniformly acquires meteorological data from the cloud server, the occupied extranet broadband is less, and the occupied resources of the cloud server are less, so that the problem that a plurality of devices in the local area network respectively acquire meteorological data from the cloud server to occupy more extranet bandwidth and resources of the cloud server is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
Fig. 1 is a schematic diagram of a hardware environment of a data transmission method according to an embodiment of the present application;
fig. 2 is a flowchart (one) of a data transmission method according to an embodiment of the present invention;
fig. 3 is a flowchart of a data transmission method according to an embodiment of the present invention (ii);
fig. 4 is a flowchart (iii) of a data transmission method according to an embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus according to an embodiment of the invention;
fig. 6 is a block diagram of a data transmission apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, a data transmission method is provided. The data transmission method is widely applied to full-house intelligent digital control application scenes such as Smart Home, intelligent household equipment ecology, intelligent house (intelligence house) ecology and the like. Alternatively, in the present embodiment, the data transmission method may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In order to solve the above problem, in the present embodiment, a data transmission method is provided, including but not limited to being applied in a home control system, and fig. 2 is a flow chart (one) of the data transmission method according to the embodiment of the present invention, where the flow chart includes the following steps:
step S202: determining target equipment from the plurality of equipment under the condition that the local area network has the plurality of equipment, wherein the target equipment is selected from the plurality of equipment according to a preset rule;
it should be noted that the target device has the best overall performance among the plurality of devices, and the specific performance is represented by: the ability to process data, the ability to receive data, the ability to store data.
In an exemplary embodiment, the plurality of devices may be located in one home, i.e., the local area network may be a home network.
In an exemplary embodiment, determining the target device from the plurality of devices may be accomplished by:
step S11: instructing each of the plurality of devices to send corresponding first device information to the cloud server, wherein the first device information at least includes: the system comprises a processor model, a memory capacity, a Wireless Fidelity (WIFI) module model, a WIFI module signal strength, a WIFI module power and a system version;
it should be noted that after each device is connected to the local area network, a short connection may be established with the cloud server, and then the first device information of itself is sent to the cloud server in a short connection manner.
Step S12: and acquiring target equipment determined by the cloud server according to the first equipment information corresponding to each of the plurality of equipment.
In an exemplary embodiment, before performing step S12, a target election policy needs to be determined, and the target election policy is sent to the cloud server; and instructing the cloud server to select the target equipment from the plurality of equipment according to the target election strategy and the first equipment information corresponding to each of the plurality of equipment.
It should be noted that, the cloud server may score each device according to the first device information of each device, a plurality of parameters included in the first device information of different devices are different, and the cloud server may score the device according to different weights occupied by different parameters in the final device score. Namely, the target election strategy comprises the weight occupied by a plurality of parameters in the first device information of the device in the device scoring process. In one exemplary embodiment, the target election policy includes: the system comprises a first weight corresponding to the processor model, a second weight corresponding to the memory capacity, a third weight corresponding to the WIFI module model, a fourth weight corresponding to the signal intensity of the WIFI module, a fifth weight corresponding to the power of the WIFI module and a sixth weight corresponding to the system version. The cloud server determines each device score according to the following formula I, and further determines the device with the largest device score as the target device.
The formula I is as follows: the device score = score of the processor model, first weight + score corresponding to memory capacity, second weight + score corresponding to WIFI module model, third weight + score corresponding to WIFI module signal strength, fourth weight + score corresponding to WIFI module power, fifth weight + score corresponding to system version, and sixth weight;
in an exemplary embodiment, determining the target device from the plurality of devices may be further implemented by:
step S21: randomly determining a first device from the plurality of devices, and instructing each device except the first device in the plurality of devices to send corresponding first device information to the first device, wherein the first device information at least includes: the system comprises a processor model, a memory capacity, a WIFI module model, WIFI module signal strength, WIFI module power and a system version;
step S22: and instructing the first equipment to determine target equipment from the plurality of equipment according to the first equipment information corresponding to each of the plurality of equipment.
It should be noted that before the step S22 is executed, the target election policy needs to be sent to the first device, and then the first device may determine the score of each of the multiple devices according to the first formula, and determine the device with the highest score as the target device.
In an exemplary embodiment, a device which is successfully connected with the cloud server first in the plurality of devices may be determined as a target device, and then the target device directly obtains weather data from the cloud server, and sends the obtained weather data to other devices in the group of devices.
In an exemplary embodiment, when the elected target device is suddenly powered off or disconnected from the network, a target device may be reselected from the group of devices according to the electing method.
In one illustrative example, the plurality of devices may be ordered, a priority of each device may be determined, a device with a high priority may be determined as a target device, and a device with a next priority among the plurality of devices may be determined as the target device in case of sudden power failure or network outage of the target device. It should be noted that the higher the overall performance of the device with the higher priority.
Step S204: sending a first data request to a cloud server through the target device, and acquiring target meteorological data sent by the cloud server in response to the first data request;
in an exemplary embodiment, before sending the first data request to the cloud server through the target device, the following steps are further performed:
step S31: instructing each device in the group of devices to send a corresponding second data request to the target device, wherein the second data request is used for indicating the type of weather data required by each device;
it should be noted that the types of meteorological data include, but are not limited to, weather forecast, life meteorological index, air quality index, and the like.
Step S32: instructing the target device to construct a target data table according to the second data request corresponding to each device in the group of devices, wherein the target data table has the type of meteorological data required by each device in the plurality of devices;
in one exemplary embodiment, the target data table may be: device a needs weather forecast, device B needs a life weather index, and device C needs an air quality index. The plurality of devices includes: device a, device B, device C.
In an exemplary embodiment, the sending, by the target device, the first data request to the cloud server may be further implemented by: sending a first data request to a cloud server through the target device, wherein the first data request is used for requesting the cloud server to acquire target meteorological data, and the target meteorological data comprises all types of meteorological data recorded in the target data table.
It will be appreciated that the services provided by different devices will be different and thus the types of weather data required will be different, for example, some devices will only require the most basic weather forecast, some devices will only require the life weather index, etc. And then each device in a set of devices can send the type of weather data required by the device to the target device, so that the target device can obtain the data of the corresponding type from the cloud server in a targeted manner and send the data to the corresponding device.
Step S206: transmitting, by the target device, the target weather data to each device in a group of devices, wherein the group of devices includes other devices in the plurality of devices other than the target device.
In an exemplary embodiment, the step S206 may be implemented as follows:
step S41: determining, from the target data table, a type of meteorological data required for each device in the set of devices;
step S42: transmitting, by the target device, weather data of the type required by each device of the set of devices in the target weather data to each device of the set of devices.
That is, after acquiring the target meteorological data, the target device sends the meteorological data of the type required by each device in a set of devices in the target meteorological data to each device in the set of devices according to the target data table. For example: the second request sent by the device A to the target device indicates that the device A needs weather forecast, and then the target device sends data corresponding to a weather forecast part in the target weather data to the device A after acquiring the target weather data.
It should be noted that each of the multiple devices may communicate with each other by using a fixed communication protocol, specifically, a MESH network may be established, and the MESH network protocol is used for communication, or bluetooth may be used for communication.
In an exemplary embodiment, the step S206 may be implemented as follows:
step S51: determining, by the target device, second device information for each device in the set of devices, wherein the second device information includes at least one of: a media intervention control layer address MAC using an identification of an application of the target meteorological data;
step S52: and instructing the target equipment to encrypt the target meteorological data according to the second equipment information of each equipment in the group of equipment and the secret key of the local area network, and compressing and sending the encrypted data to each equipment in the group of equipment.
That is, the target device may encrypt and compress data to be sent to each device in a group of devices, and may further ensure the security of the data and the transmission efficiency of the data.
Through the steps, under the condition that the local area network is provided with the multiple devices, one target device is selected from the multiple devices, the target device is used for acquiring the target meteorological data from the cloud server, and the target meteorological data are sent to the other devices in the multiple devices. Because a device in the local area network uniformly acquires meteorological data from the cloud server, the occupied extranet broadband is less, and the occupied resources of the cloud server are less, so that the problem that a plurality of devices in the local area network respectively acquire meteorological data from the cloud server to occupy more extranet bandwidth and the resources of the cloud server is solved.
It is to be understood that the above-described embodiments are only a few, but not all, embodiments of the present invention. For better understanding of the above method, the following describes the above process with reference to an embodiment, but the method is not limited to the technical solution of the embodiment of the present invention, and specifically:
in an optional embodiment, after a new household appliance starts a distribution network and is successfully accessed to a home local area network small loop, an interconnection broadcast protocol is tried to be initiated with other household appliances in the local area network, a Lord household appliance (equivalent to a target appliance in the embodiment) is selected through a target election strategy, the target election strategy comprises that the household appliance with the best performance and WIFI signal is selected as the Lord household appliance through software and hardware indexes such as a CPU (central processing unit) model, a memory capacity, WIFI module signal strength, a WIFI module model, a firmware version (equivalent to a system version in the embodiment) and power of a WIFI module, the household appliance with the best performance and the best WIFI signal is initiated to a cloud server by the Lord household appliance, a weather cloud server can return data (equivalent to target weather data in the embodiment) such as real-time weather meteorological data, historical meteorological data, a life meteorological index and surrounding life guide and the like to the Lord household appliance after receiving the data, the Lord household appliance is classified, analyzed and processed, and then the household appliance with the relevant capacity registered to itself after being compressed is provided, if the A household appliance supports the real-time data processing capacity of the household appliance, then the A sends the real-time weather data to the household appliance to be compressed; if the B household appliance provides the capacity of supporting the data processing of the daily weather index when registering to the Lord household appliance, the B household appliance receives the daily weather index compressed data packet sent to the Lord household appliance. It should be noted that, by compressing the data packet, the size and flow of the data packet on the network can be reduced, and excessive occupation of intranet bandwidth is avoided.
For a better understanding, the following is specifically illustrated:
(1) The device with the highest device can be determined as a Lord household appliance by calculating the score of each device in the local area network, specifically, MAX (CPU model, first weight, memory capacity, second weight, signal strength of a WIFI module, third weight, model of the WIFI module, fourth weight, firmware version, fifth weight, and power of the WIFI module, sixth weight);
it should be noted that, the temporary lor household appliance terminal which initiates the broadcast and is accessed to the local area network firstly among all the household appliances of the local area network is responsible for the final lor household appliance election; after the Lord household appliance election is successful finally, other household appliances register with the Lord household appliance.
(2) The Lord household appliance may use a compression algorithm when sending a data packet to another household appliance, for example, using MD5, and the Lord household appliance may also verify the identities of the other household appliances through the Mac address, the application ID, and the local area network Key when the other household appliances send a data request, and then sends the compressed data packet after confirmation.
Specifically, fig. 3 is a flowchart (ii) of a data transmission method according to an embodiment of the present invention, which specifically includes:
s302: the household appliance equipment starts a distribution network and establishes an interconnection broadcast protocol with the household appliance equipment in the local area network;
s304: selecting Lord household appliances according to software and hardware indexes such as the CPU model, the memory capacity, the signal intensity of a WIFI module, the WIFI module model, the firmware version and the power of the WIFI module of the household appliance;
s306: lord household appliances acquire current position information;
s308: the Lord household appliance is coded according to the area where the current position information is located;
s310: the Lord household appliance receives meteorological data to the cloud server regularly and actively or passively through the region code;
s312: and the Lord household appliance analyzes the received meteorological data, compresses the meteorological data and broadcasts the compressed meteorological data to other household appliances in the local area network.
Fig. 4 is a flowchart (iii) of a data transmission method according to an embodiment of the present invention, which specifically includes:
s402: the new device accesses a local area network;
s404: judging whether the local area network has equipment with the same protocol; if yes, executing S406, otherwise executing S410;
s406: judging whether the equipment belongs to meteorological service Lord equipment or not; if yes, executing S410, otherwise executing S408;
s408: reporting to a weather service Lord device;
s410: the new access device becomes a meteorological service Lord device.
That is, the new device accesses the local area network, and after the network distribution is successful, whether other household appliances with the same protocol exist in the current local area network is searched, and if not, the new device automatically becomes the Lord household appliance; if yes, after the Lord household appliance is selected through the strategy, the Lord household appliance initiates a meteorological data request, and other household appliances receive meteorological data broadcasted by the Lord interface.
Fig. 5 is a structural diagram of an apparatus according to an embodiment of the present invention, which specifically includes:
a data receiving module: the system is responsible for processing the work of analyzing the communication protocol, establishing long connection, receiving and pasting packets of data packets and the like;
a data analysis module: the data processing system is responsible for the functions of decompression, data structure analysis, classified storage and the like of received data;
a heartbeat detection module: the system is responsible for acquiring the online condition of other household appliances at regular time and eliminating the registration information of the non-online household appliance terminal when the household appliance terminal is Lord;
a data synchronization module: the method is used for analyzing and preparing various capability household appliance data packets in a household appliance online registry and preparing data and other logics distributed to other terminals;
a policy configuration module: the method comprises the steps of being responsible for obtaining and applying APP side configuration and cloud server configuration parameters;
a data compression module: the data packet compression processing module is responsible for compression processing work of the data packets to be sent;
a data sending module: a function for sending a data packet to a specified household appliance terminal through a specified protocol;
in addition, in the embodiment, since the terminal devices in the same family generally share the same meteorological data, the misjudgment of the user caused by the inconsistency of the meteorological data reflected by the household appliances due to abnormal positioning of some devices is avoided; and then through the meteorological data that obtain the server and provide by Lord household electrical appliances initiative or passively, reduce server pressure. And as more household appliances are available for the same user, the more prominent the weather sharing function is; by adopting the technical scheme of the embodiment, efficient meteorological data acquisition, analysis and sharing can be realized, and efficient acquisition and display of weather data and relevant indexes are improved.
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 (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as 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 data sending device is further provided, and the data sending device is used to implement the foregoing embodiments and preferred embodiments, and the description of the data sending device is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware or a combination of software and hardware are also possible and contemplated.
Fig. 6 is a block diagram of a data transmission apparatus according to an embodiment of the present invention, the apparatus including:
a determining module 62, configured to determine a target device from a plurality of devices when the local area network has the plurality of devices, where the target device is a device selected from the plurality of devices according to a preset rule;
an obtaining module 64, configured to send a first data request to a cloud server through the target device, and obtain target meteorological data sent by the cloud server in response to the first data request;
a sending module 66, configured to send the target weather data to each device in a group of devices, where the group of devices includes other devices in the plurality of devices except the target device.
By the device, under the condition that the local area network is provided with the multiple devices, one target device is selected from the multiple devices, the target meteorological data are acquired from the cloud server through the target device, and the target meteorological data are sent to the other devices in the multiple devices through the target device. Because a device in the local area network acquires meteorological data from the cloud server in a unified manner, the occupied extranet broadband is less, and the occupied resources of the cloud server are less, so that the problem that a plurality of devices in the local area network acquire meteorological data from the cloud server respectively to occupy more extranet bandwidth and the resources of the cloud server is solved.
In an exemplary embodiment, the determining module 62 is further configured to instruct each of the plurality of devices to send corresponding first device information to the cloud server, where the first device information at least includes: the system comprises a processor model, memory capacity, a wireless fidelity (WIFI) module model, WIFI module signal strength, WIFI module power and a system version; and acquiring target equipment determined by the cloud server according to the first equipment information corresponding to each of the plurality of equipment.
In an exemplary embodiment, the determination module 62 includes: the first sending unit is used for determining a target election strategy before acquiring a target device determined by the cloud server according to first device information corresponding to each device in the multiple devices, and sending the target election strategy to the cloud server; and instructing the cloud server to select the target equipment from the plurality of equipment according to the target election strategy and the first equipment information corresponding to each of the plurality of equipment.
In an exemplary embodiment, the determining module 62 is further configured to randomly determine a first device from the multiple devices, instruct each device of the multiple devices except the first device to send corresponding first device information to the first device, where the first device information at least includes: the system comprises a processor model, memory capacity, a wireless fidelity (WIFI) module model, WIFI module signal strength, WIFI module power and a system version; and instructing the first equipment to determine target equipment from the plurality of equipment according to the first equipment information corresponding to each of the plurality of equipment.
In an exemplary embodiment, the apparatus further includes a processing module, configured to instruct, before sending the first data request to the cloud server through the target device, each device in the set of devices to send a corresponding second data request to the target device, where the second data request is used to indicate a type of weather data required by each device; instructing the target device to construct a target data table according to the second data request corresponding to each device in the group of devices, wherein the target data table has the type of meteorological data required by each device in the plurality of devices; an acquisition module 64, comprising: a second sending unit, configured to send a first data request to a cloud server through the target device, where the first data request is used to request the cloud server to obtain target meteorological data, and the target meteorological data includes all types of meteorological data recorded in the target data table.
In an exemplary embodiment, the sending module 66 is further configured to determine the type of weather data required by each device in the set of devices through the target data table; transmitting, by the target device, weather data of the type required by each device of the set of devices in the target weather data to each device of the set of devices.
In an exemplary embodiment, the sending module 66 is further configured to determine, by the target device, second device information of each device in the group of devices, where the second device information includes at least one of: a media intervention control layer address, MAC, using an identification of an application of the target meteorological data; and instructing the target equipment to encrypt the target meteorological data according to the second equipment information of each equipment in the group of equipment and the secret key of the local area network, and compressing the encrypted data and sending the compressed data to each equipment in the group of equipment.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that a plurality of devices are arranged in a local area network, determining target devices from the plurality of devices, wherein the target devices are selected from the plurality of devices according to a preset rule;
s2, sending a first data request to a cloud server through the target device, and acquiring target meteorological data sent by the cloud server in response to the first data request;
and S3, sending the target meteorological data to each device in a group of devices through the target device, wherein the group of devices comprises other devices except the target device in the plurality of devices.
In an exemplary embodiment, the computer readable 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.
For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and exemplary implementations, and details of this embodiment are not repeated herein.
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.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, under the condition that a plurality of devices are arranged in a local area network, determining target devices from the plurality of devices, wherein the target devices are selected from the plurality of devices according to a preset rule;
s2, sending a first data request to a cloud server through the target device, and acquiring target meteorological data sent by the cloud server in response to the first data request;
and S3, sending the target meteorological data to each device in a group of devices through the target device, wherein the group of devices comprises other devices except the target device in the plurality of devices.
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.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A data transmission method, comprising:
under the condition that a plurality of devices exist in a local area network, determining target devices from the plurality of devices, wherein the target devices are selected from the plurality of devices according to a preset rule;
sending a first data request to a cloud server through the target device, and acquiring target meteorological data sent by the cloud server in response to the first data request;
transmitting, by the target device, the target weather data to each device in a set of devices, wherein the set of devices includes other devices in the plurality of devices other than the target device.
2. The method of claim 1, wherein determining a target device from the plurality of devices comprises:
instructing each of the plurality of devices to send corresponding first device information to the cloud server, wherein the first device information at least includes: the system comprises a processor model, memory capacity, a wireless fidelity (WIFI) module model, WIFI module signal strength, WIFI module power and a system version;
and acquiring target equipment determined by the cloud server according to the first equipment information corresponding to each piece of equipment in the plurality of pieces of equipment.
3. The method of claim 2, wherein before obtaining the target device determined by the cloud server according to the first device information corresponding to each of the plurality of devices, the method further comprises:
determining a target election strategy and sending the target election strategy to the cloud server;
and instructing the cloud server to select the target equipment from the plurality of equipment according to the target election strategy and the first equipment information corresponding to each piece of equipment in the plurality of equipment.
4. The method of claim 1, wherein determining a target device from the plurality of devices comprises:
randomly determining a first device from the plurality of devices, and instructing each device except the first device from the plurality of devices to send corresponding first device information to the first device, wherein the first device information at least comprises: the system comprises a processor model, memory capacity, a wireless fidelity (WIFI) module model, WIFI module signal strength, WIFI module power and a system version;
and instructing the first equipment to determine target equipment from the plurality of equipment according to the first equipment information corresponding to each of the plurality of equipment.
5. The method of claim 1,
before sending the first data request to the cloud server through the target device, the method further includes:
instructing each device in the group of devices to send a corresponding second data request to the target device, wherein the second data request is used for indicating the type of weather data required by each device;
instructing the target device to construct a target data table according to the second data request corresponding to each device in the group of devices, wherein the target data table has the type of meteorological data required by each device in the plurality of devices;
sending a first data request to a cloud server through the target device, including:
sending a first data request to a cloud server through the target device, wherein the first data request is used for requesting the cloud server to acquire target meteorological data, and the target meteorological data comprises all types of meteorological data recorded in the target data table.
6. The method of claim 5, wherein sending the target meteorological data to each device in a set of devices via the target device, comprises:
determining, from the target data table, a type of meteorological data required for each device in the set of devices;
transmitting, by the target device, weather data of the type required by each device of the set of devices in the target weather data to each device of the set of devices.
7. The method of any of claims 1-6, wherein transmitting, by the target device, the target meteorological data to each device in a set of devices comprises:
determining, by the target device, second device information for each device in the set of devices, wherein the second device information includes at least one of: a media intervention control layer address, MAC, using an identification of an application of the target meteorological data;
and instructing the target equipment to encrypt the target meteorological data according to the second equipment information of each equipment in the group of equipment and the secret key of the local area network, and compressing and sending the encrypted data to each equipment in the group of equipment.
8. A data transmission apparatus, comprising:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining target equipment from a plurality of pieces of equipment under the condition that the local area network has the plurality of pieces of equipment, and the target equipment is selected from the plurality of pieces of equipment according to a preset rule;
the acquisition module is used for sending a first data request to a cloud server through the target equipment and acquiring target meteorological data sent by the cloud server in response to the first data request;
a sending module, configured to send the target weather data to each device in a group of devices through the target device, where the group of devices includes other devices in the plurality of devices except the target device.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. 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 7 by means of the computer program.
CN202210761670.XA 2022-06-30 2022-06-30 Data transmission method and device, storage medium and electronic device Pending CN115314503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210761670.XA CN115314503A (en) 2022-06-30 2022-06-30 Data transmission method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210761670.XA CN115314503A (en) 2022-06-30 2022-06-30 Data transmission method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115314503A true CN115314503A (en) 2022-11-08

Family

ID=83854563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210761670.XA Pending CN115314503A (en) 2022-06-30 2022-06-30 Data transmission method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115314503A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108551679A (en) * 2018-04-18 2018-09-18 深圳市银河风云网络系统股份有限公司 Wireless device communication means based on LAN Mesh technologies and system
CN112437454A (en) * 2020-11-23 2021-03-02 青岛海尔科技有限公司 Data transmission method and device, storage medium and electronic device
CN112600879A (en) * 2020-11-30 2021-04-02 青岛海尔科技有限公司 Weather data acquisition method and device, storage medium and electronic device
CN112671904A (en) * 2020-12-23 2021-04-16 青岛海尔科技有限公司 Method and device for transmitting equipment state information, storage medium and electronic device
CN112671830A (en) * 2020-12-02 2021-04-16 武汉联影医疗科技有限公司 Resource scheduling method, system, device, computer equipment and storage medium
CN114090689A (en) * 2021-11-23 2022-02-25 润联软件系统(深圳)有限公司 Intelligent contract data processing method based on alliance chain and related equipment thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108551679A (en) * 2018-04-18 2018-09-18 深圳市银河风云网络系统股份有限公司 Wireless device communication means based on LAN Mesh technologies and system
CN112437454A (en) * 2020-11-23 2021-03-02 青岛海尔科技有限公司 Data transmission method and device, storage medium and electronic device
CN112600879A (en) * 2020-11-30 2021-04-02 青岛海尔科技有限公司 Weather data acquisition method and device, storage medium and electronic device
CN112671830A (en) * 2020-12-02 2021-04-16 武汉联影医疗科技有限公司 Resource scheduling method, system, device, computer equipment and storage medium
CN112671904A (en) * 2020-12-23 2021-04-16 青岛海尔科技有限公司 Method and device for transmitting equipment state information, storage medium and electronic device
CN114090689A (en) * 2021-11-23 2022-02-25 润联软件系统(深圳)有限公司 Intelligent contract data processing method based on alliance chain and related equipment thereof

Similar Documents

Publication Publication Date Title
CN108173727B (en) Intelligent household appliance network access method and equipment
CN112152853A (en) Equipment network distribution method and device, computer-readable storage medium and electronic device
CN111741509A (en) Network distribution method and device, storage medium and processor
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN114697150A (en) Command issuing method and device, storage medium and electronic device
CN113596089B (en) Distribution network binding method and device of equipment, storage medium and electronic device
CN115314503A (en) Data transmission method and device, storage medium and electronic device
CN115345225A (en) Method and device for determining recommended scene, storage medium and electronic device
CN116016002A (en) Intelligent household appliance network distribution method and device and electronic device
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN115174512A (en) Message pushing method and device, storage medium and electronic device
CN115687806A (en) Method and device for determining target equipment list, storage medium and electronic device
CN114691731A (en) Usage preference determination method and apparatus, storage medium, and electronic apparatus
CN111726267A (en) Connection method of household appliance, household appliance and computer storage medium
CN115314549B (en) Offline equipment management method, storage medium and electronic device
CN115002206B (en) Control method and device of intelligent equipment, storage medium and electronic device
CN117879984A (en) Message receiving disturbance-free processing method and device applied to intelligent household equipment
CN115473752A (en) Control command transmission method and device, storage medium and electronic device
CN114697359A (en) Data collection method and device, storage medium and electronic device
CN115312048A (en) Equipment awakening method and device, storage medium and electronic device
CN115174296A (en) Equipment function access method, device, storage medium and electronic device
CN115694913A (en) Method and apparatus for transmitting device information, storage medium, and electronic apparatus
CN117707488A (en) Function response method and device, storage medium and electronic device
CN117896848A (en) Binding method and device of intelligent equipment, storage medium and electronic device
CN116634464A (en) Network distribution method and device of equipment, storage medium and electronic equipment

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