CN113596088A - Communication channel determination method and device, storage medium and electronic device - Google Patents

Communication channel determination method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113596088A
CN113596088A CN202110714958.7A CN202110714958A CN113596088A CN 113596088 A CN113596088 A CN 113596088A CN 202110714958 A CN202110714958 A CN 202110714958A CN 113596088 A CN113596088 A CN 113596088A
Authority
CN
China
Prior art keywords
channel
communication
state
communication channel
determining
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
CN202110714958.7A
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
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 CN202110714958.7A priority Critical patent/CN113596088A/en
Publication of CN113596088A publication Critical patent/CN113596088A/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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The invention discloses a method and a device for determining a communication channel, a storage medium and an electronic device, wherein the method comprises the following steps: under the condition that the current time reaches a trigger time interval, acquiring a communication channel list corresponding to the intelligent household appliance, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel; determining a channel use coefficient corresponding to each communication channel; determining a target communication channel according to the maximum channel use coefficient in each channel use coefficient; and controlling the intelligent household appliance to perform data communication through the target communication channel. The invention effectively solves the technical problem of poor communication stability of the intelligent household electrical appliance in the prior art.

Description

Communication channel determination method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for determining a communication channel, a storage medium, and an electronic apparatus.
Background
In the communication service between the mobile terminal and the intelligent household appliance, a plurality of channels which can be connected to the intelligent household appliance often exist, such as a local area network channel, a cloud channel, a low-power-consumption bluetooth channel and the like, and the connection between the mobile terminal and the intelligent household appliance is realized by selecting one channel by a user. However, due to the mobile property of the mobile terminal and some external factors, the coverage of the local area network signal where the user is located may be insufficient, and when the user enters an area with insufficient signal coverage, the communication between the mobile terminal and the intelligent household appliance device fails or the real-time communication cannot be performed, so that the problem of poor communication stability of the intelligent household appliance device is caused.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining a communication channel, a storage medium and an electronic device, which are used for at least solving the technical problem of poor communication stability of intelligent household electrical appliances.
According to an aspect of the embodiments of the present invention, there is provided a method for determining a communication channel, the method including: under the condition that the current time reaches a trigger time interval, acquiring a communication channel list corresponding to the intelligent household appliance, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel; determining a channel use coefficient corresponding to each communication channel; determining a target communication channel according to the maximum channel use coefficient in each channel use coefficient; and controlling the intelligent household appliance to perform data communication through the target communication channel.
Optionally, the determining the target communication channel according to the maximum channel usage coefficient of the channel usage coefficients includes: sequencing the determined channel use coefficients to determine a maximum channel use coefficient; under the condition that a first channel identifier of a communication channel corresponding to the maximum channel use coefficient is inconsistent with a second channel identifier of a main channel used by the intelligent household appliance, determining the communication channel indicated by the first channel identifier as a target communication channel; and under the condition that the first channel identifier of the communication channel corresponding to the maximum channel use coefficient is consistent with the second channel identifier of the main channel used by the intelligent household appliance, determining the main channel as the target communication channel.
Optionally, after the sorting the determined channel usage coefficients to determine a maximum channel usage coefficient, the method further includes: and under the condition that the main channel is not configured currently, determining the communication channel indicated by the first channel identification as a target communication channel.
Optionally, the determining the channel usage coefficient corresponding to each communication channel includes: and taking each communication channel as a current communication channel in sequence, and executing the following operations: acquiring an initial weight and a state weight corresponding to a current communication channel, wherein the initial weight is a weight value initially configured for the current communication channel, the state weight is a weight value corresponding to a channel state of the current communication channel, and the state weights of different communication channels are different; and determining a current channel use coefficient corresponding to the current communication channel according to the initial weight and the state weight.
Optionally, the state weights of the different communication channels are configured differently according to a predetermined interval, and both a minimum value of the state weights and the predetermined interval are greater than a maximum value of the initial weights.
Optionally, the obtaining of the communication channel list corresponding to the intelligent household electrical appliance includes: determining each object communication channel which supports connection of the intelligent household appliance equipment, wherein the object communication channels comprise: a cloud channel, a local area network channel and a low-power-consumption Bluetooth channel; acquiring a channel state corresponding to each object communication channel, wherein the channel state comprises: a stable state, a network connection success state, a connection in-progress state, an unconnected state, and a connection disconnection state; and constructing a communication channel list by using the channel identification and the channel state of the object communication channel.
Optionally, the acquiring a channel status corresponding to each object communication channel includes: acquiring respective heartbeat detection state results and communication connection state information between the intelligent household appliance and each object communication channel; and determining the channel state corresponding to the object communication channel according to the heartbeat detection state result and the communication connection state information.
According to another aspect of the embodiments of the present invention, there is provided a device for determining a communication channel, including: the intelligent household appliance communication system comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring a communication channel list corresponding to the intelligent household appliance under the condition that the current time reaches a trigger time interval, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel; a first determination unit configured to determine a channel usage coefficient corresponding to each communication channel; the second determining unit is used for determining a target communication channel according to the maximum channel use coefficient in all the channel use coefficients; and the control unit is used for controlling the intelligent household appliance to carry out data communication through the target communication channel.
According to yet another aspect of the embodiments of the present invention, there is provided a storage medium having a computer program stored therein, wherein the computer program is configured to execute the method for determining a communication channel when running.
According to another aspect of the embodiments of the present invention, the present invention further provides an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the method for determining a communication channel.
In the embodiment of the invention, a communication channel list corresponding to the intelligent household appliance is obtained under the condition that the current time reaches a trigger time interval, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel; determining a channel use coefficient corresponding to each communication channel; determining a target communication channel according to the maximum channel use coefficient in each channel use coefficient; and controlling the intelligent household appliance to perform data communication through the target communication channel. In the above embodiment, the communication channels of the intelligent household electrical appliance are periodically trained according to the preset trigger time interval, and then the current channel is switched to the target communication channel with the optimal state according to the channel use coefficients of the communication channels, so as to control the intelligent household electrical appliance to perform data communication through the target communication channel, thereby improving the communication success rate between the intelligent household electrical appliance and the mobile terminal, and further solving the technical problem of poor communication stability of the intelligent household electrical appliance.
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 configuration of a computer terminal of a determination method of a communication channel according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of determining an alternative communication channel in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of a method for determining an alternative target communication channel in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative method for determining channel usage coefficients according to an embodiment of the invention;
fig. 5 is a schematic diagram of an optional communication channel list corresponding to an intelligent home device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating state switching of an alternative communication channel according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an alternative communication channel determination apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
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. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention 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.
The method embodiments provided in the embodiments of the present application may be executed in a computer terminal or a similar computing device. Taking the operation on a computer terminal as an example, fig. 1 is a hardware configuration block diagram of the computer terminal of the area cleaning method according to the embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more processors 102 (only one is shown in fig. 1), wherein the processors 102 may include, but are not limited to, a Microprocessor (MPU) or a Programmable Logic Device (PLD), and a memory 104 for storing data, and in an exemplary embodiment, the computer terminal may further include a transmission device 106 for communication function 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 is not intended to limit the structure of the computer terminal. For example, the computer terminal 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 with more functionality than that shown in FIG. 1.
The memory 104 can be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the area sweeping method 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 a computer terminal over 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 computer terminal. 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 order to solve the foregoing problem, an aspect of the embodiments of the present invention provides a method for determining a communication channel, as an optional implementation manner, as shown in fig. 2, the method for determining a communication channel includes:
s202, under the condition that the current time reaches a trigger time interval, acquiring a communication channel list corresponding to the intelligent household appliance, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel;
s204, determining a channel use coefficient corresponding to each communication channel;
s206, determining a target communication channel according to the maximum channel use coefficient in the channel use coefficients;
and S208, controlling the intelligent household appliance to perform data communication through the target communication channel.
Optionally, in the above embodiment, the trigger time interval is usually a parameter pre-configured by a developer when the device leaves a factory, and when the current time reaches the trigger time interval, the intelligent household appliance obtains the communication identifier and the communication state corresponding to each of all communication channels in the current state. Wherein, the communication identification may include, but is not limited to, a number, an alphabet number, a character mark, etc. used for distinguishing each channel, and the communication status may include, but is not limited to, stable, successful network connection, connected, disconnected, etc.
It should be noted that, for an intelligent household electrical appliance, the number and the type of channels in the communication channel list acquired each time are not limited, for example, the channel list acquired at a certain time may include channel identifiers and channel states corresponding to a cloud channel, a local area network channel, and a bluetooth low energy channel, and the channel list acquired at another time may only include the channel identifier and the channel state corresponding to the local area network channel.
Optionally, in the above embodiment, each time the trigger time interval is reached, the obtained channel identifier and the channel state further include a channel original weight and a channel state weight of each communication channel, and a corresponding channel usage coefficient may be obtained by summing the original weight and the state weight of each channel.
It can be understood that, in the process of selecting the target channel, it is also necessary to determine whether the current main channel is consistent with the calculated target channel, if so, the current main channel is taken as the target communication channel, and if not, the current main channel is switched to the calculated target communication channel, so as to ensure that an optimal communication channel is always selected to implement communication of the intelligent household electrical appliance.
By adopting the technical scheme, in the communication process of the intelligent household electrical appliance, all communication channels are trained periodically according to the triggering time interval, in the training process, the target channel with the best communication capacity is determined according to the channel use coefficient of each communication channel obtained through calculation, and finally whether the current main channel is consistent with the target channel obtained through calculation or not is judged. If the current main channel is inconsistent with the target channel, the current main channel is switched to the target channel, so that the channel with the optimal state is ensured to be selected as the main channel of the intelligent household equipment all the time, the communication success rate between the intelligent household equipment and the mobile terminal is further realized, the real-time performance of communication connection can be ensured through the periodic training of each channel, and the communication stability of the intelligent household equipment is improved.
In an optional embodiment, the determining the target communication channel according to the largest channel usage coefficient in the channel usage coefficients may be implemented by:
sequencing the determined channel use coefficients to determine a maximum channel use coefficient;
under the condition that a first channel identifier of a communication channel corresponding to the maximum channel use coefficient is inconsistent with a second channel identifier of a main channel used by the intelligent household appliance, determining the communication channel indicated by the first channel identifier as a target communication channel;
and under the condition that the first channel identifier of the communication channel corresponding to the maximum channel use coefficient is consistent with the second channel identifier of the main channel used by the intelligent household appliance, determining the main channel as the target communication channel.
It can be understood that, in this embodiment, after performing summation calculation according to the channel original weight and the channel state weight, the channel usage coefficients of each communication channel are obtained, and the maximum channel usage coefficient is determined by performing ascending order arrangement on the channel usage coefficients of each channel.
After the maximum channel usage coefficient is determined, a first communication identifier of a communication channel corresponding to the maximum channel usage coefficient and a second channel identifier of a main channel currently used by the intelligent household appliance are obtained, where the first channel identifier and the second channel identifier may include, but are not limited to, a number, an alphabet, a character mark, and the like used for distinguishing each channel. Comparing the first channel identifier with the second channel identifier, switching a main channel which is used by the intelligent household appliance at the current moment into a target communication channel corresponding to the first channel identifier under the condition that the comparison result is inconsistent, and enabling the intelligent household appliance to communicate by taking the target communication channel as the main channel at the next moment; and under the condition that the comparison results are consistent, selecting the main channel which is currently used at the moment as a target communication channel, and ensuring that the intelligent household appliance always selects the channel with the optimal strip state for data communication.
In a specific embodiment, as shown in fig. 3, a specific process of determining a main channel for a device to communicate with a mobile terminal is as follows:
s302, all channels of the equipment are acquired,
s304, calculating values of all channels according to the original weight and the state weight of each channel;
s306, sorting all channels according to the channel weights to obtain a channel P with the highest weight;
s308, judging whether the channel P is the current main channel or not, and if so, directly exiting the process; if not, go to step S310;
s310, the current main channel is switched to channel P.
It should be noted that, in the above embodiment, if any channel of the current device is not acquired (for example, the wifi, the mobile data, the bluetooth, and the like are closed by the user mobile terminal), the process is ended, and when a time interval TL is reached, the next round of process is started, where the time interval TL is built in by the developer.
It is understood that all channels of the current smart home device (each channel containing the state of the channel) are obtained and passed into the process before the process begins. For an intelligent household appliance, the channel types of the number of channels acquired each time are not limited, for example, only cloud channels may exist when a user mobile terminal closes bluetooth and wifi; under the condition that the user terminal only closes the Bluetooth, the operation channel and the local area network channel can be obtained; however, no matter how many channels are acquired, the execution of the remaining steps of the process is not affected.
Further, as an optional implementation, after sorting the determined channel usage coefficients to determine a maximum channel usage coefficient, the method further includes:
and under the condition that the main channel is not configured currently, determining the communication channel indicated by the first channel identification as a target communication channel.
For example, the device is performing an initialization process, and the main channel of the current device is not yet set, then the weight of the main channel of the current device is set to 0 by default, and at this time, the channel P is directly used as the main channel.
Through the steps, sorting the channels according to the channel weight to obtain a channel P with the optimal communication state, then judging whether the channel P is consistent with the current main channel of the equipment, and if not, switching the channel P to be used as the main channel of the equipment; if so, the current primary channel is maintained. By adopting the technical scheme in the embodiment, one channel with the optimal communication state can be always kept as the main channel of the equipment to carry out data communication with the mobile terminal, so that the communication success rate of the equipment is improved; furthermore, by setting the interval time TL and adopting a round training mechanism to evaluate all the obtained channels, the real-time performance of the equipment communication is ensured.
As an alternative embodiment, as shown in fig. 4, determining the channel usage factor corresponding to each communication channel includes:
and taking each communication channel as a current communication channel in sequence, and executing the following operations:
acquiring an initial weight and a state weight corresponding to a current communication channel, wherein the initial weight is a weight value initially configured for the current communication channel, the state weight is a weight value corresponding to a channel state of the current communication channel, and the state weights of different communication channels are different;
and determining a current channel use coefficient corresponding to the current communication channel according to the initial weight and the state weight.
Specifically, as shown in fig. 4, before each round is started, first all channels of the device are obtained, including states of the channels, and weights are calculated for all the channels one by one, and the specific process includes: respectively acquiring an original channel weight and a channel state weight; and summing the original channel weight and the channel state weight to obtain the weight of the channel.
It should be noted that both the channel original weight and the channel state weight are built in by a developer, which are not limited in the embodiment of the present invention, for example, the channel original weight may be bluetooth low energy 3 > lan 2 > cloud channel 1, or may be cloud channel 3 > lan 2 > bluetooth low energy 1; the channel state weight can be stable 50 > network connection success 40 > 30 in connection > disconnection 20 > no connection 10, or stable 80 > network connection success 65 > 50 in connection > disconnection 35 > no connection 20.
Taking the following example that the original weight of the channel is bluetooth low energy 3 > local area network 2 > cloud channel 1, the weight of the channel state is stable 50 > network connection success 40 > in connection 30 > disconnection 20 > no connection 10, and the weight calculation process of each channel is as follows:
when the selected channel is a cloud channel, assuming that the state of the cloud channel is stable, the obtained original weight of the channel is 1, and the weight of the channel state is 50, then the weight Q of the operation channel1=1+50=51;
When the selected channel is a local area network channel, assuming that the local area network state is successful in network connection, and the obtained original weight of the channel is 2, and the weight of the channel state is 40, the weight Q of the local area network channel is obtained2=2+40=42;
When the selected channel is a low-power channel, assuming that the low-power channel state is stable, the obtained original weight of the channel is 3, and the weight of the channel state is 50, then the weight Q of the operation channel3=3+50=53;
It can be understood that after the weight of each channel is calculated, the calculated value Q is compared with the value obtained by the previous calculation1、Q2And Q3Sorting to obtain Q3>Q1>Q2Therefore, the low-power-consumption channel is determined to be the channel with the optimal communication state in the training process.
It should be noted that, in the above embodiment, the relationship between the channel state weight and the channel original weight may be implemented by the following manner:
and performing difference configuration between the state weights of different communication channels according to a preset interval, wherein the minimum value and the preset interval of the state weights are both larger than the maximum value of the initial weight.
That is, the minimum value 10 of the channel state weights and the interval 10 or 15 between the channel state weights are both greater than the maximum value 3 of the original channel weights, and the purpose is to subsequently apply the weights Q to each channel1、Q2And Q3And when sequencing is carried out, the absolute priority of the channel state is ensured. That is, in the case that the channel states are the same, the channel types are sorted to ensure that the channel with the optimal state is selected as the main channel of the device.
Through the embodiment, the initial weight and the state weight of each channel are set by adopting the principle that the state weights of different communication channels are configured differently according to the preset intervals, and the minimum value and the preset interval of the state weights are both larger than the maximum value of the initial weight, so that the corresponding channel use coefficient of each channel is calculated, the reliability of the channel use coefficient is improved, and meanwhile, a reliable basis is provided for the determination of the target communication channel.
As an alternative implementation, as shown in fig. 5, the obtaining of the communication channel list corresponding to the intelligent home device includes:
determining each object communication channel which supports connection of the intelligent household appliance equipment, wherein the object communication channels comprise: a cloud channel, a local area network channel and a low-power-consumption Bluetooth channel;
acquiring a channel state corresponding to each object communication channel, wherein the channel state comprises: a stable state, a network connection success state, a connection in-progress state, an unconnected state, and a connection disconnection state;
and constructing a communication channel list by using the channel identification and the channel state of the object communication channel.
Specifically, as shown in fig. 5, the object communication channels that the smart home device supports connection include, but are not limited to, a cloud channel, a local area network channel, and a bluetooth low energy channel, where the cloud channel represents a channel connected to the device through the mobile terminal; the local area network channel represents a wired or wireless connection device through a local router; the bluetooth low energy channel means a channel connected to a device through a bluetooth low energy wireless transmission manner of the mobile terminal.
The channel state corresponding to each channel includes but is not limited to stable, network connection successful, connected, disconnected, and the like, and the meaning of each channel state is as follows:
channel state-stabilization: indicating that the channel and the device are successfully connected, successful communication with the device has occurred within a time T, and the heartbeat is not overtime on the channel, and the time T is built in by the developer;
channel status-network connection success: slightly different meanings are found on different channels, for example, a cloud channel indicates that the device and the cloud network handshake is successful, and the mobile terminal and the cloud connection network handshake is successful; the local area network channel indicates that the equipment and the mobile terminal successfully handshake; the Bluetooth low energy channel represents that the Bluetooth connection between the equipment and the mobile terminal is successful. It should be noted that the network handshake success here includes but is not limited to TCP handshake, and may also be other network protocols such as IPX/SPX, NetBEUI, etc.;
channel state-connected: representing the process of handshaking or establishing network connection between the channel and the equipment;
channel status-not connected: indicating that the user did not initiate a connection with the device;
channel status-disconnect: indicating that the channel heartbeat is timed out or the network layer returns a disconnected connection.
It is understood that, in the determined object communication channels supported by the intelligent home appliance, different object communication channels respectively correspond to different channel identifiers, and as described above, the communication identifiers may include, but are not limited to, a number, an alphabet, a character mark, and the like used for distinguishing the channels.
And acquiring a channel state corresponding to each object communication channel according to each determined communication channel, wherein the channel state may be any one of those described in the above embodiments, and based on a certain creation rule, the channel identifier and the channel state of each communication channel are configured into a communication channel list.
As an alternative implementation, the acquiring a channel status corresponding to each object communication channel includes:
acquiring respective heartbeat detection state results and communication connection state information between the intelligent household appliance and each object communication channel;
and determining the channel state corresponding to the object communication channel according to the heartbeat detection state result and the communication connection state information.
It is understood that in the present embodiment, the channel status is switched when different conditions are satisfied. Therefore, before determining the channel state, it is necessary to detect the heartbeat state and the communication connection state of each of the intelligent home appliance devices and each of the communication channels, and then the final channel state can be determined according to the detection result, for example:
when the channel is in a stable state, if the heartbeat packet loss does not reach the overtime TA but the heartbeat packet loss condition exists, the channel state is switched from the stable state to the network connection successfully; if the situation of communication failure is found, switching the stable state of the channel into a network connection success state, wherein the TA is built in by a developer;
when the channel is in a network connection success state, if the heartbeat packet transmission is normal when the TB is connected, the channel state is successfully switched into a stable state from the network connection, wherein the TB is built in by a developer;
when the channel is in a stable state and is connected with a local area network channel and wifi, if the wifi signal intensity is lower than Z, the state of the channel is stably switched into a network connection success state, wherein Z is built in by a developer; it can be understood that after entering the network connection success state, if the channel state is successfully switched to the stable state from the network connection, the above-mentioned switching condition needs to be followed, and details are not described here;
when the channel is in a stable state and is a low-power-consumption Bluetooth channel, if the Bluetooth signal intensity of the equipment is monitored to be lower than Y, the channel state is stably switched to a network connection success state, and the equipment is connected in a household wifi mode, wherein Y is built in a developer.
Further, in a specific embodiment, as shown in fig. 6, a method for switching states of a channel after a network connection is successful includes:
when the channel is in steady state, if at least one of the following occurs: if packet loss, communication abnormity or signal quality problem occurs, the channel state is switched from stable to network connection;
when the channel is in a network connection success state, if the heartbeat packet transmission is normal in continuous TB time, the channel state is switched from network connection success to stability;
when the channel is in a network connection success state, if the heartbeat packet is overtime within continuous TA time, the channel state is switched from network connection success to disconnection, wherein TA is greater than TB;
when the channel is in the disconnection state, if a heartbeat response event occurs, the channel state is switched from the disconnection state to the network connection state successfully.
Through the steps, under the condition that the current time reaches the trigger time interval, the channel state of the communication channel can be switched according to the channel state switching method by detecting the communication connection state and the heartbeat between the intelligent household appliance and each communication channel and meeting different conditions. That is to say, the state of the channel is not constant, but changes with the change of time and conditions, and the state of each channel can be monitored in real time by the state switching method in this embodiment, so that the real-time state information of the channel is determined, and the accuracy of the channel state is 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.
Optionally, in this embodiment, a device for determining a communication channel is further provided, and the device is used to implement the foregoing embodiment, and the description that has been already made is omitted. As used below, the term "unit" 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.
According to another aspect of the present application, there is also provided a device for determining a communication channel, as shown in fig. 7, an optional block diagram of the device for determining a communication channel in an embodiment of the present invention includes:
an obtaining unit 702, configured to obtain a communication channel list corresponding to the intelligent home appliance device when current time reaches a trigger time interval, where the communication channel list includes a channel identifier and a channel state of each communication channel;
a first determining unit 704 configured to determine a channel usage coefficient corresponding to each communication channel;
a second determining unit 706, configured to determine a target communication channel according to a maximum channel usage coefficient in the channel usage coefficients;
a control unit 708, configured to control the intelligent home appliance to perform data communication through the target communication channel.
Through the units, in the communication process of the intelligent household electrical appliance, all communication channels are trained periodically according to the triggering time interval, in the training process, a target channel with the best communication capacity is determined according to the channel use coefficient of each communication channel obtained through calculation, and finally whether the current main channel is consistent with the target channel obtained through calculation or not is judged. If the current main channel is inconsistent with the target channel, the current main channel is switched to the target channel, so that the channel with the optimal state is ensured to be selected as the main channel of the intelligent household equipment all the time, the communication success rate between the intelligent household equipment and the mobile terminal is further realized, the real-time performance of communication connection can be ensured through the periodic training of each channel, and the communication stability of the intelligent household equipment is improved.
In an optional embodiment, the determining unit further includes:
the first determining module is used for sequencing the determined channel use coefficients to determine a maximum channel use coefficient;
the second determining module is used for determining the communication channel indicated by the first channel identifier as a target communication channel under the condition that the first channel identifier of the communication channel corresponding to the maximum channel use coefficient is inconsistent with the second channel identifier of the main channel used by the intelligent household appliance; and under the condition that the first channel identifier of the communication channel corresponding to the maximum channel use coefficient is consistent with the second channel identifier of the main channel used by the intelligent household electrical appliance, determining the main channel as a target communication channel.
In an optional embodiment, after the first determining module, the method further includes:
and the third determining module is used for determining the communication channel indicated by the first channel identification as the target communication channel under the condition that the main channel is not configured currently.
In an optional embodiment, the first determining unit further includes:
and taking each communication channel as a current communication channel in turn, and executing the operations in the following modules:
the first obtaining module is used for obtaining an initial weight and a state weight corresponding to a current communication channel, wherein the initial weight is a weight value initially configured for the current communication channel, the state weight is a weight value corresponding to a channel state of the current communication channel, and the state weights of different communication channels are different;
and the fourth determining module is used for determining the current channel use coefficient corresponding to the current communication channel according to the initial weight and the state weight.
Optionally, in the above embodiment, the method further includes: and carrying out difference configuration between the state weights of different communication channels according to a preset interval, wherein the minimum value of the state weights and the preset interval are both larger than the maximum value of the initial weight.
Optionally, in each of the above embodiments, the obtaining unit further includes:
a fifth determining module, configured to determine object communication channels that the smart home device supports connection, where the object communication channels include: a cloud channel, a local area network channel and a low-power-consumption Bluetooth channel;
a second obtaining module, configured to obtain a channel state corresponding to each object communication channel, where the channel state includes: a stable state, a network connection success state, a connection in-progress state, an unconnected state, and a connection disconnection state;
and the building module is used for building a communication channel list by utilizing the channel identification and the channel state of the object communication channel.
Optionally, the second obtaining module further includes:
the acquisition submodule is used for acquiring respective heartbeat detection state results and communication connection state information between the intelligent household appliance and each object communication channel;
and the determining submodule determines a channel state corresponding to the object communication channel according to the heartbeat detection state result and the communication connection state information.
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, acquiring a communication channel list corresponding to the intelligent household appliance under the condition that the current time reaches a trigger time interval, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel;
s2, determining a channel use coefficient corresponding to each communication channel;
s3, determining a target communication channel according to the maximum channel use coefficient in each channel use coefficient;
and S4, controlling the intelligent household electrical appliance to carry out data communication through the target communication channel.
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.
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, acquiring a communication channel list corresponding to the intelligent household appliance under the condition that the current time reaches a trigger time interval, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel;
s2, determining a channel use coefficient corresponding to each communication channel;
s3, determining a target communication channel according to the maximum channel use coefficient in each channel use coefficient;
and S4, controlling the intelligent household electrical appliance to carry out data communication through the target communication channel.
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 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 (10)

1. A method for determining a communication channel, comprising:
under the condition that the current time reaches a trigger time interval, acquiring a communication channel list corresponding to the intelligent household appliance, wherein the communication channel list comprises a channel identifier and a channel state of each communication channel;
determining a channel use coefficient corresponding to each communication channel;
determining a target communication channel according to the maximum channel use coefficient in each channel use coefficient;
and controlling the intelligent household appliance to carry out data communication through the target communication channel.
2. The method according to claim 1, wherein the determining a target communication channel according to a maximum channel usage coefficient of the channel usage coefficients comprises:
sorting the determined channel use coefficients to determine the maximum channel use coefficient;
determining the communication channel indicated by the first channel identifier as the target communication channel under the condition that the first channel identifier of the communication channel corresponding to the maximum channel use coefficient is inconsistent with the second channel identifier of the main channel used by the intelligent household appliance;
and under the condition that the first channel identifier of the communication channel corresponding to the maximum channel use coefficient is consistent with the second channel identifier of the main channel used by the intelligent household electrical appliance, determining the main channel as the target communication channel.
3. The method of claim 2, further comprising, after said sorting the determined channel usage coefficients to determine the maximum channel usage coefficient:
and under the condition that the main channel is not configured currently, determining the communication channel indicated by the first channel identification as the target communication channel.
4. The method of claim 1, wherein determining a channel usage coefficient corresponding to each of the communication channels comprises:
and taking each communication channel as a current communication channel in sequence, and executing the following operations:
acquiring an initial weight and a state weight corresponding to the current communication channel, wherein the initial weight is a weight value initially configured for the current communication channel, the state weight is a weight value corresponding to a channel state of the current communication channel, and the state weights of different communication channels are different;
and determining a current channel use coefficient corresponding to the current communication channel according to the initial weight and the state weight.
5. The method according to claim 4, wherein the state weights of different communication channels are configured differently according to a predetermined interval, and the minimum value of the state weights and the predetermined interval are both greater than the maximum value of the initial weights.
6. The method according to any one of claims 1 to 5, wherein the obtaining of the communication channel list corresponding to the smart home device comprises:
determining each object communication channel which supports connection of the intelligent household appliance, wherein the object communication channels comprise: a cloud channel, a local area network channel and a low-power-consumption Bluetooth channel;
obtaining a channel state corresponding to each of the object communication channels, wherein the channel state includes: a stable state, a network connection success state, a connection in-progress state, an unconnected state, and a connection disconnection state;
and constructing the communication channel list by using the channel identification and the channel state of the object communication channel.
7. The method of claim 6, wherein said obtaining a channel state corresponding to each of said object communication channels comprises:
acquiring respective heartbeat detection state results and communication connection state information between the intelligent household appliance and each object communication channel;
and determining a channel state corresponding to the object communication channel according to the heartbeat detection state result and the communication connection state information.
8. An apparatus for determining a communication channel, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a communication channel list corresponding to the intelligent household appliance under the condition that the current time reaches a trigger time interval, and the communication channel list comprises a channel identifier and a channel state of each communication channel;
a first determining unit configured to determine a channel usage coefficient corresponding to each of the communication channels;
a second determining unit, configured to determine a target communication channel according to a maximum channel usage coefficient in the channel usage coefficients;
and the control unit is used for controlling the intelligent household appliance to carry out data communication through the target communication channel.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any one 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.
CN202110714958.7A 2021-06-25 2021-06-25 Communication channel determination method and device, storage medium and electronic device Pending CN113596088A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110714958.7A CN113596088A (en) 2021-06-25 2021-06-25 Communication channel determination method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110714958.7A CN113596088A (en) 2021-06-25 2021-06-25 Communication channel determination method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN113596088A true CN113596088A (en) 2021-11-02

Family

ID=78244760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110714958.7A Pending CN113596088A (en) 2021-06-25 2021-06-25 Communication channel determination method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113596088A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150327282A1 (en) * 2014-05-12 2015-11-12 Qualcomm Incorporated Methods and apparatus for channel selection in a wireless local area network
CN105119946A (en) * 2015-06-17 2015-12-02 深圳市美贝壳科技有限公司 Intelligent household electrical appliance control device and method capable of automatically switching network
CN105451296A (en) * 2014-08-25 2016-03-30 宇龙计算机通信科技(深圳)有限公司 Network channel selection method and mobile terminal
CN107450332A (en) * 2017-07-31 2017-12-08 广东美的制冷设备有限公司 Information transferring method, system, intelligent appliance, control terminal and storage medium
CN108696917A (en) * 2018-06-12 2018-10-23 Oppo广东移动通信有限公司 Communication connecting method, device, electronic device and computer-readable medium
WO2020094034A1 (en) * 2018-11-07 2020-05-14 上海连尚网络科技有限公司 Wireless network connection method for terminal
US20200162287A1 (en) * 2017-07-25 2020-05-21 Cloudminds (Shenzhen) Robotics Systems Co., Ltd. Method, apparatus and system for controlling smart device
CN112260895A (en) * 2020-10-16 2021-01-22 深圳卡路里科技有限公司 Data transmission method and device and processor

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150327282A1 (en) * 2014-05-12 2015-11-12 Qualcomm Incorporated Methods and apparatus for channel selection in a wireless local area network
CN105451296A (en) * 2014-08-25 2016-03-30 宇龙计算机通信科技(深圳)有限公司 Network channel selection method and mobile terminal
CN105119946A (en) * 2015-06-17 2015-12-02 深圳市美贝壳科技有限公司 Intelligent household electrical appliance control device and method capable of automatically switching network
US20200162287A1 (en) * 2017-07-25 2020-05-21 Cloudminds (Shenzhen) Robotics Systems Co., Ltd. Method, apparatus and system for controlling smart device
CN107450332A (en) * 2017-07-31 2017-12-08 广东美的制冷设备有限公司 Information transferring method, system, intelligent appliance, control terminal and storage medium
CN108696917A (en) * 2018-06-12 2018-10-23 Oppo广东移动通信有限公司 Communication connecting method, device, electronic device and computer-readable medium
WO2020094034A1 (en) * 2018-11-07 2020-05-14 上海连尚网络科技有限公司 Wireless network connection method for terminal
CN112260895A (en) * 2020-10-16 2021-01-22 深圳卡路里科技有限公司 Data transmission method and device and processor

Similar Documents

Publication Publication Date Title
CN104853373B (en) A kind of Working mode switching method and device of wireless module
CN104660618A (en) Binding method and binding equipment
CN111885115B (en) Device binding changing method and device
CN108075912B (en) Method and device for determining network center node and equipment node
CN109561002B (en) Voice control method and device for household electrical appliance
CN112564954B (en) Network quality prediction method and device
CN114143143B (en) Gateway equipment determining method and device, storage medium and electronic device
CN111314185A (en) Ad hoc network method, ad hoc network response method, controlled equipment and gateway
CN107870571A (en) Control the method, apparatus and smart machine of smart machine
CN111093182B (en) Network optimal resource selection system for CPE (customer premises equipment)
CN113285810B (en) Target equipment login method and device, storage medium and electronic device
CN111698736A (en) Intelligent household electrical appliance network switching method and device, computer equipment and server
CN105050123A (en) Load control method for wireless network and terminal
CN113596088A (en) Communication channel determination method and device, storage medium and electronic device
CN110519781A (en) RRC time limit method of adjustment and device, mobile terminal and readable storage medium storing program for executing
CN107204783B (en) A kind of wireless communication system, method and apparatus
CN110224861A (en) The implementation method of adaptive dynamic heterogeneous network selection policies based on study
CN115345225A (en) Method and device for determining recommended scene, storage medium and electronic device
CN114675551A (en) Method and device for determining operation behavior, storage medium and electronic device
CN108921229A (en) Data reconstruction method and device
CN108931923B (en) Device control method and apparatus, storage medium, and electronic apparatus
CN113934490A (en) Opening method and device of equipment control page, storage medium and electronic device
CN114125023A (en) Data connection determining method and device, storage medium and electronic device
CN113435642A (en) Edible strategy determination method and device, storage medium and electronic device
CN113596235A (en) Operation instruction issuing method and device, storage medium and electronic 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