CN115473753A - Control method and device of gateway equipment, storage medium and electronic device - Google Patents

Control method and device of gateway equipment, storage medium and electronic device Download PDF

Info

Publication number
CN115473753A
CN115473753A CN202210862224.8A CN202210862224A CN115473753A CN 115473753 A CN115473753 A CN 115473753A CN 202210862224 A CN202210862224 A CN 202210862224A CN 115473753 A CN115473753 A CN 115473753A
Authority
CN
China
Prior art keywords
target
gateway
gateway device
load distribution
equipment
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
CN202210862224.8A
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 CN202210862224.8A priority Critical patent/CN115473753A/en
Priority to PCT/CN2022/128029 priority patent/WO2024016506A1/en
Publication of CN115473753A publication Critical patent/CN115473753A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • H04L12/2814Exchanging control software or macros for controlling appliance services in a home automation network

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a control method and device of gateway equipment, a storage medium and an electronic device, and relates to the technical field of smart homes, wherein the control method of the gateway equipment comprises the following steps: acquiring a device control request, wherein the device control request is used for requesting control of target devices deployed in a target area, and a plurality of gateway devices are also deployed in the target area; responding to the equipment control request, and acquiring target gateway equipment from a plurality of gateway equipment according to the control range and the running load of each gateway equipment, wherein the control range is used for indicating intelligent equipment allowing each gateway equipment to control; the control target gateway device executes the device control request. The problem of among the correlation technique, the load distribution of gateway equipment is inefficient etc is solved, the technological effect of the load distribution's of promotion gateway equipment efficiency has been realized.

Description

Control method and device of gateway equipment, storage medium and electronic device
Technical Field
The application relates to the technical field of smart homes, in particular to a control method and device of gateway equipment, a storage medium and an electronic device.
Background
Along with daily life's house equipment is more and more intelligent, people expect more smooth and intelligent equipment control to experience, for example: the plurality of devices can be easily controlled to operate in a state expected by a user without the need of manual complicated operation of people. In the prior art, devices are often controlled through a fixed gateway, and if the number of devices controlled by the gateway device is large, such a manner may cause too high load of the gateway device, which may further cause a long time required for controlling the devices, and may even cause device control failure and the like, thereby reducing user experience.
In the related art, no effective solution has been proposed yet for the problems of low efficiency of load distribution of the gateway device and the like.
Disclosure of Invention
The embodiment of the application provides a control method and device of gateway equipment, a storage medium and an electronic device, so as to at least solve the problems of low load distribution efficiency of the gateway equipment and the like in the related art.
According to an embodiment of the present application, there is provided a control method of a gateway device, including: acquiring a device control request, wherein the device control request is used for requesting control of a target device deployed in a target area, and a plurality of gateway devices are also deployed in the target area;
responding to the device control request, and acquiring target gateway devices from a plurality of gateway devices according to the control range and the operation load of each gateway device, wherein the control range is used for indicating intelligent devices which are allowed to be controlled by each gateway device;
and controlling the target gateway equipment to execute the equipment control request.
Optionally, the obtaining a target gateway device from the multiple gateway devices according to the control range and the operating load of each gateway device includes:
acquiring candidate gateway equipment corresponding to the target equipment from gateway equipment and intelligent equipment which have a corresponding relation, wherein the candidate gateway equipment is gateway equipment allowing the target equipment to be controlled;
detecting the operational load of each of the candidate gateway devices;
and determining the candidate gateway equipment with the operating load meeting the target load distribution strategy as the target gateway equipment.
Optionally, the determining, as the target gateway device, the candidate gateway device whose operating load meets the target load distribution policy includes:
selecting the target load distribution strategy from a plurality of load distribution strategies;
and executing the target load distribution strategy on the candidate gateway equipment according to the running load to obtain the target gateway equipment.
Optionally, the executing the target load distribution policy on the candidate gateway device according to the operating load to obtain the target gateway device includes one of:
determining the candidate gateway device polling as the target gateway device under the condition that the target load distribution strategy is a first strategy, wherein the running load is used for indicating whether each candidate gateway device is distributed with a control request in the current polling;
determining the gateway device with the minimum corresponding control request quantity in the candidate gateway devices as the target gateway device under the condition that the target load distribution strategy is a second strategy, wherein the operation load comprises the control request quantity which is used for indicating the quantity of the control requests distributed to the gateway devices in the target time;
and under the condition that the target load distribution strategy is a third strategy, determining a gateway device of which the device type is matched with the request type of the device control request in the candidate gateway devices as the target gateway device, wherein the running load comprises the device type.
Optionally, the determining, as the target gateway device, a gateway device in the candidate gateway devices whose device type matches the request type of the device control request includes:
creating an initial hash ring, and mapping the candidate gateway device onto the initial hash ring to obtain a target hash ring;
calculating a hash value corresponding to the equipment control request, and determining a hash position where the hash value is located from the target hash ring;
and determining the candidate gateway device positioned clockwise from the hash position on the target hash ring as the target gateway device.
Optionally, the selecting the target load distribution policy from the multiple load distribution policies includes one of:
extracting a load distribution strategy identifier carried in the equipment control request; determining a load distribution strategy corresponding to the load distribution strategy identification in the plurality of load distribution strategies as the target load distribution strategy;
determining the current operation environment of the candidate gateway equipment according to the operation load; and selecting a load distribution strategy matched with the current operating environment from the plurality of load distribution strategies as the target load distribution strategy.
Optionally, after the controlling the target gateway device executes the device control request, the method further includes:
under the condition that the target gateway device is controlled to fail to execute the device control request, acquiring reference gateway devices from other gateway devices except the target gateway device in the candidate gateway devices;
controlling the reference gateway device to execute the device control request.
According to another embodiment of the present application, there is also provided a control apparatus of a gateway device, including:
a first obtaining module, configured to obtain an equipment control request, where the equipment control request is used to request control of target equipment deployed in a target area, and the target area is also deployed with multiple gateway devices;
a second obtaining module, configured to respond to the device control request, and obtain a target gateway device from the multiple gateway devices according to a control range and an operating load of each gateway device, where the control range is used to indicate an intelligent device that is allowed to be controlled by each gateway device;
a first processing module, configured to control the target gateway device to execute the device control request.
According to another aspect of the embodiments of the present application, 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 control method of the gateway device when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the control method of the gateway device through the computer program.
In the embodiment of the application, an equipment control request is obtained, wherein the equipment control request is used for requesting to control target equipment deployed in a target area, and a plurality of gateway equipment are also deployed in the target area; responding to the device control request, and acquiring target gateway devices from a plurality of gateway devices according to the control range and the operation load of each gateway device, wherein the control range is used for indicating intelligent devices allowing each gateway device to control; the control target gateway device executes the device control request, that is, in the case of acquiring the device control request, it may be indicated that it is desired to control the target device deployed in the target area, and in such a case, according to the control range and the operating load of each gateway device deployed in the target area, the target gateway device which can acquire the operating load from the plurality of gateway devices deployed in the target area and can also continue to allow the device control request to be executed may be acquired, so that the operating load of each gateway device is comprehensively considered, the device control requests executed by each gateway device are balanced, and excessive device control requests executed by the gateway devices are avoided. By adopting the technical scheme, the problems of low load distribution efficiency of the gateway equipment and the like in the related technology are solved, and the technical effect of improving the load distribution efficiency of the gateway equipment is realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the 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 that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a hardware environment of a control method of a gateway device according to an embodiment of the present application;
fig. 2 is a flowchart of a control method of a gateway device according to an embodiment of the present application;
FIG. 3 is a first schematic diagram illustrating a method for obtaining a target load distribution policy according to an embodiment of the present application;
FIG. 4 is a second schematic diagram illustrating a target load distribution policy according to an embodiment of the present application;
fig. 5 is a first schematic diagram illustrating obtaining a device control request carrying a load distribution policy identifier according to an embodiment of the present application;
fig. 6 is a second schematic diagram illustrating acquiring a device control request carrying a load distribution policy identifier according to an embodiment of the present application;
fig. 7 is a block diagram of a control device of a gateway apparatus according to an embodiment of the present application.
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, there is provided a control method of a gateway device. The control method of the gateway equipment is widely applied to full-House intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent House (Intelligent House) ecology and the like. Alternatively, in this embodiment, the control method of the gateway device 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 this embodiment, a control method for a gateway device is provided, which is applied to the terminal device, and fig. 2 is a flowchart of a control method for a gateway device according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, obtaining a device control request, wherein the device control request is used for requesting to control a target device deployed in a target area, and a plurality of gateway devices are also deployed in the target area;
step S204, responding to the device control request, and acquiring target gateway devices from a plurality of gateway devices according to the control range and the operation load of each gateway device, wherein the control range is used for indicating intelligent devices allowing each gateway device to control;
step S206, controlling the target gateway device to execute the device control request.
Through the steps, when the device control request is acquired, it can be shown that the target device deployed in the target area is desired to be controlled, and in such a case, the target gateway device which is capable of acquiring the operation load from the plurality of gateway devices deployed in the target area and also continuously allowing the device control request to be executed can be acquired according to the control range and the operation load of each gateway device deployed in the target area, so that the operation load of each gateway device is comprehensively considered, the device control requests executed by each gateway device are balanced, and the gateway device is prevented from executing too many device control requests. By adopting the technical scheme, the problems of low load distribution efficiency of the gateway equipment and the like in the related technology are solved, and the technical effect of improving the load distribution efficiency of the gateway equipment is realized.
In the technical solution provided in step S202, a Lot (of things, internet of things) cloud and each gateway device of a plurality of gateway devices deployed in a target area may obtain a device control request, may but not limited to obtain the device control request, indicate that it is desired to control one or more target devices deployed in the target area, and may but not limited to realize batch control over the plurality of target devices when the device control request is used to request control over the plurality of target devices deployed in the target area, thereby improving control efficiency of the device.
Alternatively, in the present embodiment, the target area may include, but is not limited to, an area in a house where the target device and a plurality of gateway devices are deployed, the target area may include, but is not limited to, a rest area (may include, but is not limited to, a bedroom, a balcony, a living room, and the like), an office area (may include, but is not limited to, a study room, an office, and the like), a cooking area (may include, but is not limited to, a kitchen, a dining room, and the like), and the like.
Optionally, in this embodiment, one or more intelligent devices may be but are not limited to be further deployed in the target area, the one or more intelligent devices may be but are not limited to include the target device, and the intelligent device may be but is not limited to a device that can be connected to the local area network and can be controlled by a gateway device deployed in the target area, and may include but is not limited to: 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, intelligent 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 window cleaning robot, intelligence mopping the robot, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligence kitchen precious, intelligent clarifier, intelligence water dispenser and intelligent lock and so on.
Optionally, in this embodiment, the target device and the gateway device deployed in the target area may be connected by, but not limited to, a WIFI (wireless fidelity), a bluetooth gateway, or a Zigbee (Zigbee protocol) protocol, so as to realize control of the device by the gateway device.
In the technical solution provided in step S204, it may be indicated that it is desired to control the target device deployed in the target area when the device control request is obtained, and in such a case, but not limited to, according to the control range and the operating load of each gateway device deployed in the target area, the current operating load may be allocated to the target device from the gateway devices that allow the control of the target device, and the target gateway device that allows the device control request to be continuously executed may also be allowed. The method and the device realize balancing the operation load among the gateway devices by comprehensively considering the operation load among the gateway devices, avoid the phenomenon that the control of the devices can be completed in a long time due to overlarge load of some gateways, and improve the efficiency of device control.
Optionally, in this embodiment, the control range of each gateway device may include, but is not limited to, the intelligent device that each gateway device allows to control, each gateway device may include, but is not limited to, one or more intelligent devices that each gateway device allows to control, the intelligent devices that each gateway device allows to control may include, but are not limited to, the same, or different, or partially the same, and so on, that is, the same intelligent device may be, but is not limited to, controlled by different gateway devices, or controlled by the same gateway device, and so on.
Optionally, in this embodiment, the operation load of each gateway device may be, but is not limited to, related to the operation load performance of the gateway device, such as the bandwidth, throughput, and response time of each gateway device, and the operation load may be, but is not limited to, data indicating a control request executed by each gateway device, or a smart device controlled by each gateway device, or time consumed by each gateway device in responding to the control request. The balance of the operation load among the gateway devices is realized by comprehensively considering the operation load of each gateway device. The method and the device avoid the overlarge operation load of the gateway equipment caused by the control request of the overlarge load of the fixed gateway equipment, and prolong the response time of the gateway equipment.
In one exemplary embodiment, the target gateway device may be obtained from a plurality of gateway devices by, but is not limited to: acquiring candidate gateway equipment corresponding to the target equipment from gateway equipment and intelligent equipment which have a corresponding relation, wherein the candidate gateway equipment is gateway equipment allowing the target equipment to be controlled; detecting the operational load of each of the candidate gateway devices; and determining the candidate gateway equipment with the operating load meeting the target load distribution strategy as the target gateway equipment.
Optionally, in this embodiment, each gateway device may, but is not limited to, allow to control one or more intelligent devices, and may, but is not limited to, obtain, according to a target device carried in the device control request, one or more gateway devices that allow to control the target device from the gateway device and the intelligent device having a corresponding relationship, as candidate gateway devices.
Optionally, in this embodiment, the operational load of each gateway device may be detected, but is not limited to, by detecting the response time data of each gateway device responding to the control request, the executed control request data, the controlled device data, and the like, where the operational load of each gateway device may be, but is not limited to, greater than the maximum operational load allowed by the gateway device, or the operational load of the gateway device is less than or equal to the maximum operational load allowed by the gateway device.
Optionally, in this embodiment, the target load distribution policy may be, but is not limited to be, carried in the device control request, or, in a case that the device control request is not carried in the device control request, a default load distribution policy may be, but is not limited to be, used as the target load distribution policy.
In one exemplary embodiment, the target gateway device may be obtained, but is not limited to, by: selecting the target load distribution strategy from a plurality of load distribution strategies; and executing the target load distribution strategy on the candidate gateway equipment according to the running load to obtain the target gateway equipment.
Optionally, in this embodiment, the user may select, but is not limited to, a corresponding load distribution policy for the gateway device on an application interface for editing the load distribution policy displayed on a terminal device such as a mobile phone, a computer, or a tablet. Fig. 3 is a schematic diagram first of acquiring a target load distribution policy according to an embodiment of the present application, as shown in fig. 3, an editing application interface of the load distribution policy may be displayed on a mobile phone, but not limited to, a plurality of load distribution policies (load distribution policy 1, load distribution policy 2, load distribution policy 3, … …, load distribution policy n) may be displayed on the editing application interface, and but not limited to, the load distribution policy 1 selected by a user may be used as the target load distribution policy. The load distribution strategy corresponding to the gateway equipment is flexibly selected according to the requirements of the user, and the flexibility of load balancing of the gateway equipment is improved while the requirements of the user are met.
Optionally, in this embodiment, if the user does not select a corresponding load distribution policy for the gateway device on the application interface for editing the load distribution policy displayed on the terminal device, such as a mobile phone, or a computer, or a tablet, in such a case, the default load distribution policy may be but is not limited to be the target load distribution policy, and the default load distribution policy may be but is not limited to be any one load distribution policy among the plurality of load distribution policies. Fig. 4 is a schematic diagram of obtaining a target load distribution policy according to an embodiment of the present application, as shown in fig. 4, an editing application interface of the load distribution policy may be, but is not limited to, displayed on a mobile phone, and a plurality of load distribution policies (load distribution policy 1, load distribution policy 2, load distribution policy 3, … …, load distribution policy n) may be, but is not limited to, displayed on the editing application interface, and on an application interface where it is not detected that a user clicks a load distribution policy displayed on a mobile phone, a default load distribution policy (which may be, but is not limited to, load distribution policy 3) may be determined as the target load distribution policy. In such a way, a user does not need to select a proper load distribution strategy, and the operation of the user is greatly simplified.
In an exemplary embodiment, the target gateway device is obtained by executing a target load distribution policy on the candidate gateway device according to the operating load, which may include, but is not limited to, one of the following situations:
in case that the target load distribution policy is a first policy, determining the candidate gateway device polling as the target gateway device, where the running load is used to indicate whether each candidate gateway device has been distributed with a control request in the current polling.
Optionally, in this embodiment, the first policy may, but is not limited to, adopt a Round Robin load (Round Robin LB) algorithm, and may, but is not limited to, determine that the candidate gateway device not allocated with the control request in the current Round Robin is a target gateway device by polling, where such a policy is a stateless scheduling policy, and it is not necessary to statistically record the transmission data of each gateway device, so as to save a storage resource required for storing the transmission data of each gateway device.
And under the condition that the target load distribution strategy is the second strategy, determining the gateway device with the minimum corresponding control request number in the candidate gateway devices as the target gateway device, wherein the operating load comprises the control request number, and the control request number is used for indicating the number of the control requests distributed to the gateway devices in the target time.
Optionally, in this embodiment, the second policy may, but is not limited to, adopt LRU (Least Recently Used algorithm), a counter may be disposed in each gateway device for counting the number of control requests allocated to the gateway device in a certain time period (which may, but is not limited to, last 1 hour, or last 1 day, or last week, etc.), and the gateway device with the Least number of allocated control requests in the candidate gateway devices may, but is not limited to, be determined as the target gateway device. Under the condition that the difference of the number of the distributed control requests among the gateway devices is large, the device control requests are distributed to the gateway device with the least number of the distributed control requests through the load distribution strategy, and load balance among the gateway devices is achieved.
And in a third case, when the target load distribution policy is a third policy, determining a gateway device, of the candidate gateway devices, whose device type matches the request type of the device control request, as the target gateway device, where the operating load includes the device type.
Optionally, in this embodiment, the device type of the candidate gateway device may be, but is not limited to, the type of the smart device controlled by the candidate gateway device, and may include, but is not limited to: office type (e.g., smart computer, smart display screen, smart keyboard, etc.), cleaning type (which may include, but is not limited to, smart washing machine, smart sweeping robot, smart window cleaning robot, smart mopping robot, etc.), entertainment type (which may include, but is not limited to, smart television, smart projector, smart stereo, smart speaker, etc.), and cooking type (which may include, but is not limited to, smart steamer, smart microwave, smart stove, etc.), etc.
Optionally, in this embodiment, the request type of the device control request may include, but is not limited to, a request for controlling a device switch, a request for controlling a parameter of adjusting the operation of the device, and a request for controlling a plurality of intelligent devices to perform coordinated control.
Optionally, in this embodiment, the third policy may, but is not limited to, employ a Consistent Hash (Consistent Hash LB) algorithm, and may, but is not limited to, determine, as the target gateway device, a gateway device in the candidate gateway device whose device type matches the request type of the device control request. The control request belonging to a certain request type is fixedly distributed to the corresponding gateway equipment, and the working order among all the gateway equipment is ensured.
Optionally, in this embodiment, the selecting, by but not limited to an algorithm of a Random LB, a target gateway device from the candidate gateway devices may further include, but not limited to, the following steps: generating a random number, and performing modulus extraction on the number of the candidate gateway devices by using the random number to obtain target data; and determining the gateway device at the target position where the target data falls in the arrangement sequence as the target gateway device. When the target gateway equipment is selected, only the gateway equipment is randomly selected from the candidate gateway equipment as the target gateway equipment, and the load distribution strategy can realize the balance of the quantity of the control requests loaded by each gateway equipment under the condition that the quantity of the distributed control requests is enough.
In one exemplary embodiment, the gateway device of the candidate gateway devices whose device type matches the request type of the device control request may be determined as the target gateway device by, but is not limited to: creating an initial hash ring, and mapping the candidate gateway device onto the initial hash ring to obtain a target hash ring; calculating a hash value corresponding to the equipment control request, and determining a hash position where the hash value is located from the target hash ring; and determining the candidate gateway device positioned clockwise from the hash position on the target hash ring as the target gateway device.
Optionally, in this embodiment, but not limited to, an initial hash ring may be created, and the candidate gateway device is mapped onto the initial hash ring to obtain an end-to-end target hash ring, but not limited to, calculating a hash value corresponding to the device control request, and determining a hash position where the hash value is located on the target hash ring, and but not limited to, determining the candidate gateway device with the hash position in the clockwise direction as the target gateway device. In this way, when a gateway device joins or exits on the hash ring, only the gateway device clockwise adjacent to the gateway device on the hash ring is affected, and no influence is exerted on other gateway devices.
In one exemplary embodiment, the selecting the target load distribution policy from the plurality of load distribution policies may include, but is not limited to, one of the following:
in case one, extracting a load distribution strategy identifier carried in the device control request; and determining a load distribution strategy corresponding to the load distribution strategy identification in the plurality of load distribution strategies as the target load distribution strategy.
Optionally, in this embodiment, the load distribution policy identifier carried in the device control request may be but is not limited to an identifier corresponding to any one load distribution policy in the multiple load distribution policies,
a user may but is not limited to select a load distribution policy executed by a desired candidate gateway device on a mobile phone, a computer, a tablet, and the like, and carry a load distribution policy identifier corresponding to the load distribution policy in a device control request, fig. 5 is a schematic diagram of obtaining a device control request carrying the load distribution policy identifier according to an embodiment of the present application, as shown in fig. 5, an editing application interface of the load distribution policy may be displayed on the mobile phone, but is not limited to displaying multiple load distribution policies (load distribution policy 1, load distribution policy 2, load distribution policy 3, … …, load distribution policy n) on the editing application interface, as shown in fig. 5, the user may but is not limited to selecting load distribution policy 1, then may but is not limited to displaying a control application interface of an intelligent air conditioner (or may but is not limited to an intelligent device such as an intelligent television, an intelligent sound box, or an intelligent sound box), and may but is not limited to displaying a functional plug-in that controls the functions of the intelligent air conditioner, such as power-on, power-off, temperature adjustment, … …, wind speed adjustment, and the like, and the user may but clicks the user of a control a plug-in a control request carrying a load distribution policy of the intelligent air conditioner, and control request, and the load distribution policy a control request carried in a device.
It should be noted that, in fig. 5, only the operation performed by selecting the candidate gateway device first and then selecting the device to be controlled is explained, and in actual application, the operation performed by the device to be controlled may be selected first and then the load distribution policy performed by the gateway device may be selected, which is not limited in this application.
Optionally, in this embodiment, if the user does not select the corresponding load distribution policy for the gateway device on the application interface for editing the load distribution policy displayed on the terminal device, such as a mobile phone, or a computer, or a tablet, in such a case, the load distribution policy identifier of the default load distribution policy may be, but is not limited to be, carried in the device control request. Fig. 6 is a schematic diagram of obtaining a device control request carrying a load distribution policy identifier according to an embodiment of the present application, and as shown in fig. 6, an editing application interface of a load distribution policy may be, but is not limited to, displayed on a mobile phone, a plurality of load distribution policies (load distribution policy 1, load distribution policy 2, load distribution policy 3, … …, load distribution policy n) may be, but is not limited to, displayed on the editing application interface, and in a case that it is not detected that a user clicks a load distribution policy displayed on an application interface of a load distribution policy displayed on a mobile phone, a default load distribution policy (which may be, but is not limited to, load distribution policy 3) may be determined as a load distribution policy that needs to be executed by a candidate gateway device. Then, but not limited to, a control application interface of the smart air conditioner (or, but not limited to, smart devices such as a smart television, a smart speaker, or a smart stereo) may be displayed on a mobile phone, but not limited to, a function plug-in that controls functions such as startup, shutdown, temperature adjustment, … …, wind speed adjustment, and the like of the smart air conditioner may be displayed on the control application interface, and but not limited to, when a user clicks the shutdown function plug-in, an equipment control request that requests to control shutdown of the smart air conditioner is generated, and the load distribution policy identifier B of the load distribution policy 3 is carried in the equipment control request.
It should be noted that, in fig. 6, only the operation performed by selecting the candidate gateway device first and then selecting the device to be controlled is explained, and in actual application, the operation performed by the device to be controlled may be selected first and then the load distribution policy performed by the gateway device may be selected, which is not limited in this application.
Determining the current operation environment of the candidate gateway equipment according to the operation load; and selecting a load distribution strategy matched with the current operating environment from the plurality of load distribution strategies as the target load distribution strategy.
Alternatively, in the present embodiment, the number of currently allocated control requests of each of the candidate gateway devices, the difference between the number of allocated control requests of each gateway device, and the like may be determined as the operation environment, but not limited to. The second policy may be executed on the candidate gateway devices, but not limited to, in a case that the number of the control requests allocated to each of the candidate gateway devices is different greatly, so that load balancing among the gateway devices is achieved by balancing the number of the control requests carried by each gateway device. The first policy may be, but is not limited to, being executed on the candidate gateway devices in a case where the difference in the number of control requests to which each of the candidate gateway devices is assigned is small, and so on.
In the technical solution provided in step S206, the controlling target gateway device may execute the device control request, but is not limited to include one of the following situations:
in case one, the target gateway device is a gateway device that receives the device control request, and may, but is not limited to, directly execute the device control request in the target gateway device;
in case that the target gateway device is not the gateway device that has received the device control request, but is deployed in a plurality of gateway devices in the target area except for the gateway device that has received the device control request, the target gateway device sends the device control request to the target gateway device and controls the target gateway device to execute the device control request.
In one exemplary embodiment, the reference gateway device may be controlled to execute the device control request by, but is not limited to: under the condition that the target gateway device is controlled to fail to execute the device control request, acquiring reference gateway devices from other gateway devices except the target gateway device in the candidate gateway devices; controlling the reference gateway device to execute the device control request.
Optionally, in this embodiment, but not limited to, after the control target gateway device executes the device control request, receiving a confirmation message returned by the target gateway device or the target device, where the confirmation message is used to indicate whether the device control request is successfully executed; under the condition that the confirmation message is used for indicating that the equipment control request is failed to execute, the equipment control request can be executed through other gateway equipment except the target gateway equipment in the candidate gateway equipment, so that the control failure of the target equipment is avoided, and the success rate of equipment control is improved.
Optionally, in this embodiment, but not limited to, in a case where the control target gateway device fails to execute the device control request, the control target gateway device may retry to execute the device control request for a certain number of times (but not limited to 2 times, or 3 times, or 5 times), or within a certain time period (but not limited to 1 minute, or 5 minutes, or 3 minutes, and the like), and may but not limited to, in a case where the retry control target gateway device fails to execute the device control request, obtain the reference gateway device from other gateway devices except the target gateway device in the candidate gateway device.
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 application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 7 is a block diagram of a control device of a gateway apparatus according to an embodiment of the present application, and as shown in fig. 7, the control device includes: a first obtaining module 72, configured to obtain an apparatus control request, where the apparatus control request is used to request to control a target apparatus deployed in a target area, and the target area is also deployed with a plurality of gateway apparatuses;
a second obtaining module 74, configured to, in response to the device control request, obtain a target gateway device from the multiple gateway devices according to a control range and an operating load of each gateway device, where the control range is used to indicate an intelligent device that is allowed to be controlled by each gateway device;
a first processing module 76, configured to control the target gateway device to execute the device control request.
Through the embodiment, when the device control request is acquired, it can be shown that it is desired to control the target device deployed in the target area, and in such a case, according to the control range and the operating load of each gateway device deployed in the target area, the target gateway device which can acquire the operating load from the plurality of gateway devices deployed in the target area and can also continue to allow the device control request to be executed can be acquired, so that the operating load of each gateway device is comprehensively considered, the device control requests executed by each gateway device are balanced, and the gateway device is prevented from executing too many device control requests. By adopting the technical scheme, the problems of low load distribution efficiency of the gateway equipment and the like in the related technology are solved, and the technical effect of improving the load distribution efficiency of the gateway equipment is realized.
Optionally, the second obtaining module includes:
an obtaining unit, configured to obtain a candidate gateway device corresponding to the target device from a gateway device and an intelligent device that have a corresponding relationship, where the candidate gateway device is a gateway device that allows control of the target device;
a detecting unit, configured to detect the operation load of each candidate gateway device;
a determining unit, configured to determine, as the target gateway device, a candidate gateway device whose operating load meets a target load distribution policy.
Optionally, the determining unit is configured to:
selecting the target load distribution strategy from a plurality of load distribution strategies;
and executing the target load distribution strategy on the candidate gateway equipment according to the running load to obtain the target gateway equipment.
Optionally, the determining unit is configured to:
determining the candidate gateway device polling as the target gateway device under the condition that the target load distribution strategy is a first strategy, wherein the running load is used for indicating whether each candidate gateway device is distributed with a control request in the current polling;
determining a gateway device with the minimum number of corresponding control requests in the candidate gateway devices as the target gateway device under the condition that the target load distribution strategy is a second strategy, wherein the operating load comprises the number of the control requests, and the number of the control requests is used for indicating the number of the control requests distributed to the gateway device in the target time;
and under the condition that the target load distribution strategy is a third strategy, determining a gateway device of which the device type is matched with the request type of the device control request in the candidate gateway devices as the target gateway device, wherein the running load comprises the device type.
Optionally, the determining unit is configured to:
creating an initial hash ring, and mapping the candidate gateway device onto the initial hash ring to obtain a target hash ring;
calculating a hash value corresponding to the equipment control request, and determining a hash position where the hash value is located from the target hash ring;
and determining the candidate gateway device positioned clockwise from the hash position on the target hash ring as the target gateway device.
Optionally, the determining unit is configured to:
extracting a load distribution strategy identifier carried in the equipment control request; determining a load distribution strategy corresponding to the load distribution strategy identification in the plurality of load distribution strategies as the target load distribution strategy;
determining the current operation environment of the candidate gateway equipment according to the operation load; and selecting a load distribution strategy matched with the current operating environment from the plurality of load distribution strategies as the target load distribution strategy.
Optionally, the apparatus further comprises:
a third obtaining module, configured to, after the controlling of the target gateway device executes the device control request, obtain, when the controlling of the target gateway device fails to execute the device control request, a reference gateway device from other gateway devices except the target gateway device in the candidate gateway devices;
a second processing module, configured to control the reference gateway device to execute the device control request.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, acquiring a device control request, wherein the device control request is used for requesting to control a target device deployed in a target area, and a plurality of gateway devices are also deployed in the target area;
s2, responding to the equipment control request, and acquiring target gateway equipment from the plurality of gateway equipment according to the control range and the operation load of each gateway equipment, wherein the control range is used for indicating intelligent equipment allowing each gateway equipment to control;
and S3, controlling the target gateway equipment to execute the equipment control request.
Embodiments of the present application further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the method embodiments described above.
Optionally, 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.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a device control request, wherein the device control request is used for requesting control of a target device deployed in a target area, and a plurality of gateway devices are also deployed in the target area;
s2, responding to the equipment control request, and acquiring target gateway equipment from the plurality of gateway equipment according to the control range and the operation load of each gateway equipment, wherein the control range is used for indicating intelligent equipment allowing each gateway equipment to control;
and S3, controlling the target gateway equipment to execute the equipment control request.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, 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.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a 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 individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application 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 method for controlling a gateway device, comprising:
acquiring a device control request, wherein the device control request is used for requesting control of a target device deployed in a target area, and a plurality of gateway devices are also deployed in the target area;
responding to the device control request, and acquiring target gateway devices from a plurality of gateway devices according to the control range and the operation load of each gateway device, wherein the control range is used for indicating intelligent devices which are allowed to be controlled by each gateway device;
and controlling the target gateway equipment to execute the equipment control request.
2. The method according to claim 1, wherein the obtaining a target gateway device from a plurality of gateway devices according to a control range and an operating load of each gateway device comprises:
acquiring candidate gateway equipment corresponding to the target equipment from gateway equipment and intelligent equipment which have a corresponding relation, wherein the candidate gateway equipment is gateway equipment allowing the target equipment to be controlled;
detecting the operational load of each of the candidate gateway devices;
and determining the candidate gateway equipment with the operating load meeting the target load distribution strategy as the target gateway equipment.
3. The method of claim 2, wherein determining the candidate gateway device whose operating load satisfies a target load distribution policy as the target gateway device comprises:
selecting the target load distribution strategy from a plurality of load distribution strategies;
and executing the target load distribution strategy on the candidate gateway equipment according to the running load to obtain the target gateway equipment.
4. The method of claim 3, wherein the performing the target load distribution policy on the candidate gateway device according to the operating load to obtain the target gateway device comprises one of:
determining the candidate gateway device polling as the target gateway device under the condition that the target load distribution strategy is a first strategy, wherein the running load is used for indicating whether each candidate gateway device is distributed with a control request in the current polling;
determining a gateway device with the minimum number of corresponding control requests in the candidate gateway devices as the target gateway device under the condition that the target load distribution strategy is a second strategy, wherein the operating load comprises the number of the control requests, and the number of the control requests is used for indicating the number of the control requests distributed to the gateway device in the target time;
and under the condition that the target load distribution strategy is a third strategy, determining a gateway device of which the device type is matched with the request type of the device control request in the candidate gateway devices as the target gateway device, wherein the running load comprises the device type.
5. The method according to claim 4, wherein the determining, as the target gateway device, a gateway device of the candidate gateway devices whose device type matches the request type of the device control request comprises:
creating an initial hash ring, and mapping the candidate gateway device onto the initial hash ring to obtain a target hash ring;
calculating a hash value corresponding to the equipment control request, and determining a hash position where the hash value is located from the target hash ring;
and determining the candidate gateway device positioned clockwise from the hash position on the target hash ring as the target gateway device.
6. The method of claim 3, wherein selecting the target load distribution policy from a plurality of load distribution policies comprises one of:
extracting a load distribution strategy identifier carried in the equipment control request; determining a load distribution strategy corresponding to the load distribution strategy identification in the plurality of load distribution strategies as the target load distribution strategy;
determining the current operating environment of the candidate gateway equipment according to the operating load; and selecting a load distribution strategy matched with the current operating environment from the plurality of load distribution strategies as the target load distribution strategy.
7. The method of claim 1, wherein after the controlling the target gateway device performs the device control request, the method further comprises:
under the condition that the target gateway device is controlled to fail to execute the device control request, acquiring reference gateway devices from other gateway devices except the target gateway device in the candidate gateway devices;
controlling the reference gateway device to execute the device control request.
8. A control apparatus of a gateway device, characterized by comprising:
a first obtaining module, configured to obtain an equipment control request, where the equipment control request is used to request control of target equipment deployed in a target area, and the target area is also deployed with multiple gateway devices;
a second obtaining module, configured to respond to the device control request, and obtain a target gateway device from the multiple gateway devices according to a control range and an operating load of each gateway device, where the control range is used to indicate an intelligent device that is allowed to be controlled by each gateway device;
a first processing module, configured to control the target gateway device to execute the device control request.
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.
CN202210862224.8A 2022-07-20 2022-07-20 Control method and device of gateway equipment, storage medium and electronic device Pending CN115473753A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210862224.8A CN115473753A (en) 2022-07-20 2022-07-20 Control method and device of gateway equipment, storage medium and electronic device
PCT/CN2022/128029 WO2024016506A1 (en) 2022-07-20 2022-10-27 Gateway device control method and apparatus, and storage medium and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210862224.8A CN115473753A (en) 2022-07-20 2022-07-20 Control method and device of gateway equipment, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115473753A true CN115473753A (en) 2022-12-13

Family

ID=84366854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210862224.8A Pending CN115473753A (en) 2022-07-20 2022-07-20 Control method and device of gateway equipment, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN115473753A (en)
WO (1) WO2024016506A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462652A (en) * 2018-11-21 2019-03-12 杭州电子科技大学 Terminating gateway load allocation method in smart home system based on hash algorithm
CN110868361A (en) * 2019-11-01 2020-03-06 云深互联(北京)科技有限公司 Gateway load balancing method, device and equipment
CN111459664A (en) * 2020-03-19 2020-07-28 北京美住美宿科技有限公司 Hotel management system capable of balancing load
CN112929424A (en) * 2021-01-26 2021-06-08 成都佳发安泰教育科技股份有限公司 Gateway load balancing method, device, equipment and storage medium
CN114143143A (en) * 2021-10-29 2022-03-04 青岛海尔科技有限公司 Method and device for determining gateway equipment, storage medium and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8341722B2 (en) * 2009-11-30 2012-12-25 Unisys Corporation Load balancing and failover of gateway devices
CN111225059A (en) * 2020-01-10 2020-06-02 中移(杭州)信息技术有限公司 Network request resource scheduling method and device, electronic equipment and storage medium
CN113535385A (en) * 2021-06-21 2021-10-22 广州杰赛科技股份有限公司 Virtual network function deployment method, device, equipment and storage medium
CN114666821A (en) * 2022-04-07 2022-06-24 中国联合网络通信集团有限公司 End-to-end network slice deployment method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462652A (en) * 2018-11-21 2019-03-12 杭州电子科技大学 Terminating gateway load allocation method in smart home system based on hash algorithm
CN110868361A (en) * 2019-11-01 2020-03-06 云深互联(北京)科技有限公司 Gateway load balancing method, device and equipment
CN111459664A (en) * 2020-03-19 2020-07-28 北京美住美宿科技有限公司 Hotel management system capable of balancing load
CN112929424A (en) * 2021-01-26 2021-06-08 成都佳发安泰教育科技股份有限公司 Gateway load balancing method, device, equipment and storage medium
CN114143143A (en) * 2021-10-29 2022-03-04 青岛海尔科技有限公司 Method and device for determining gateway equipment, storage medium and electronic device

Also Published As

Publication number Publication date
WO2024016506A1 (en) 2024-01-25

Similar Documents

Publication Publication Date Title
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN116107975A (en) Control method and device of equipment, storage medium and electronic device
CN115473753A (en) Control method and device of gateway equipment, storage medium and electronic device
CN115631832A (en) Cooking plan determination method and device, storage medium and electronic device
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN114691731A (en) Usage preference determination method and apparatus, storage medium, and electronic apparatus
CN115345225A (en) Method and device for determining recommended scene, storage medium and electronic device
CN115390466A (en) Behavior preference table generation method and device, storage medium and electronic device
CN115457955A (en) Distributed awakening decision method and device, storage medium and electronic device
CN115167160A (en) Device control method and apparatus, device control system, and storage medium
CN115296946B (en) Control request decomposition method and device, storage medium and electronic device
CN115277412B (en) Edge gateway upgrading method and device, storage medium and electronic device
US11251985B2 (en) Method for configuring and method for controlling a home automation apparatus
CN115296958B (en) Distribution method and device of equipment control tasks, storage medium and electronic device
CN115616930A (en) Control instruction sending method and device, storage medium and electronic device
CN115484116B (en) Processing method and device of equipment data, storage medium and electronic device
CN115930378A (en) Control instruction sending method and device and electronic device
CN116185794A (en) Method and device for determining equipment operation preference, storage medium and electronic device
CN117579410A (en) Control command distribution method and device, storage medium and electronic device
CN115047797A (en) Equipment operation method and device combined with behavior preference and storage medium
CN115314332A (en) Method and device for setting equipment theme, storage medium and electronic device
CN115987935A (en) Notification message pushing method and device, storage medium and electronic device
CN115473752A (en) Control command transmission method and device, storage medium and electronic device
CN116684374A (en) Gateway message processing 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