[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113542106A - Gateway selection method and device in multi-gateway environment and storage medium - Google Patents

Gateway selection method and device in multi-gateway environment and storage medium Download PDF

Info

Publication number
CN113542106A
CN113542106A CN202010296914.2A CN202010296914A CN113542106A CN 113542106 A CN113542106 A CN 113542106A CN 202010296914 A CN202010296914 A CN 202010296914A CN 113542106 A CN113542106 A CN 113542106A
Authority
CN
China
Prior art keywords
gateway
target
contact strength
upstream server
main
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
CN202010296914.2A
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.)
Midea Group Co Ltd
Original Assignee
Midea Group 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 Midea Group Co Ltd filed Critical Midea Group Co Ltd
Priority to CN202010296914.2A priority Critical patent/CN113542106A/en
Publication of CN113542106A publication Critical patent/CN113542106A/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/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • H04L12/5691Access to open networks; Ingress point selection, e.g. ISP selection
    • H04L12/5692Selection among different networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the technical field of communication, and provides a gateway selection method and a device under a multi-gateway environment, wherein the method comprises the following steps: the method comprises the steps that a target gateway determines the contact strength between the target gateway and an upstream server, and obtains the contact strength between a first gateway and the upstream server, wherein the first gateway is at least one gateway which is in the same network environment with the target gateway; and the target gateway determines the main gateway according to the contact strength. According to the gateway selection method in the multi-gateway environment provided by the embodiment of the invention, the main gateway can be selected from all gateways according to the contact strength among the gateways in the multi-gateway environment, so that the main gateway can undertake the transmission work of the uplink and downlink data of the downstream equipment and the upstream server, and the situation that the upstream server receives the repeated data at the same time due to the fact that a plurality of gateways receive the downstream equipment and uplink the upstream server can be avoided.

Description

Gateway selection method and device in multi-gateway environment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for selecting a gateway in a multi-gateway environment, and a storage medium.
Background
The multi-gateway network environment refers to that a plurality of gateways which can be externally connected are arranged in the same communication space. The existing multi-gateway does not carry out duplication checking processing after acquiring data sent upstream by downstream equipment, and then the data are respectively and directly sent to an upstream server, so that the upstream server receives a large amount of messages with the same content, and the data processing pressure of the upstream server is increased.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a gateway selection method in a multi-gateway environment, which can select a main gateway from gateways according to the strength of contact between the gateways in the multi-gateway environment, so that the main gateway undertakes the transmission work of uplink and downlink data of downstream equipment and an upstream server, and can avoid the situation that the upstream server receives repeated data at the same time as a plurality of gateways receive the downstream equipment and uplink the downstream equipment to the upstream server.
The invention also provides a gateway selection device under the multi-gateway environment.
The gateway selection method in the multi-gateway environment in the embodiment of the first aspect of the invention includes:
the method comprises the steps that a target gateway determines the contact strength between the target gateway and an upstream server, and obtains the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway which is in the same network environment with the target gateway;
and the target gateway determines a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting the uplink and downlink data of the downstream equipment.
According to the gateway selection method in the multi-gateway environment provided by the embodiment of the invention, the main gateway can be selected from all gateways according to the contact strength among the gateways in the multi-gateway environment, so that the main gateway can undertake the transmission work of the uplink and downlink data of the downstream equipment and the upstream server, and the situation that the upstream server receives the repeated data at the same time due to the fact that a plurality of gateways receive the downstream equipment and uplink the upstream server can be avoided.
The gateway selection method in the multi-gateway environment provided by the embodiment of the invention also has the following additional technical characteristics:
further, the determining, by the target gateway, the primary gateway according to the contact strength includes:
the target gateway compares the contact strength between the target gateway and the upstream server with the contact strength between the first gateway and the upstream server to obtain a comparison result;
and the target gateway determines that the target gateway is the main gateway or determines that one gateway in the first gateways is the main gateway according to the comparison result.
Further, still include:
after determining that the target gateway is the main gateway, the target gateway receives the contact strength between the new gateway and the upstream server;
the target gateway compares the contact strength between the target gateway and the upstream server with the contact strength between the new gateway and the upstream server to obtain a comparison result;
and the target gateway determines the target gateway as the main gateway or determines a new gateway as the main gateway according to the comparison result.
Further, still include:
the target gateway determines that the contact strength between the main gateway and the upstream server is not received, compares the contact strength between the target gateway and the upstream server with the contact strength between the second gateway and the upstream server to obtain a comparison result, wherein the main gateway is one of the first gateways, and the second gateway is the other gateway except the main gateway in the first gateway;
and the target gateway determines that the target gateway is the main gateway or determines that one gateway in the second gateways is the main gateway according to the comparison result.
Further, the contact strength is shared among gateways in a heartbeat packet broadcasting mode.
Further, the link strength includes one or more of signal strength and spatial distance.
The gateway selection apparatus in a multi-gateway environment according to the second aspect of the present invention includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for determining the contact strength between a target gateway and an upstream server and acquiring the contact strength between a first gateway and the upstream server, the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway which is in the same network environment with the target gateway;
the selection module is used for determining a main gateway according to the contact strength, wherein the main gateway is an execution gateway used for transmitting uplink and downlink data of downstream equipment;
the acquisition module and the selection module belong to the target gateway.
The gateway selection device in the multi-gateway environment provided by the embodiment of the invention can select the main gateway from the gateways according to the contact strength between the gateways in the multi-gateway environment, so that the main gateway can undertake the transmission work of the uplink and downlink data of the downstream equipment and the upstream server, and the situation that the upstream server receives the repeated data at the same time due to the fact that a plurality of gateways receive the downstream equipment and uplink the upstream server can be avoided.
The gateway selection device in the multi-gateway environment provided by the embodiment of the invention also has the following additional technical characteristics:
further, the selection module is specifically configured to:
comparing the contact strength between the target gateway and the upstream server with the contact strength between the first gateway and the upstream server to obtain a comparison result;
and determining the target gateway as the main gateway or determining one gateway in the first gateways as the main gateway according to the comparison result.
Further, the system comprises an updating module for:
after determining that the target gateway is the main gateway, receiving the contact strength between the new gateway and the upstream server;
comparing the contact strength between the target gateway and the upstream server with the contact strength between the new gateway and the upstream server to obtain a comparison result;
determining that the target gateway is the main gateway or determining that the new gateway is the main gateway according to the comparison result;
wherein the update module belongs to the target gateway.
Further, the method further comprises a reselection module configured to:
determining that the contact strength between a main gateway and an upstream server is not received, and comparing the contact strength between a target gateway and the upstream server with the contact strength between a second gateway and the upstream server to obtain a comparison result, wherein the main gateway is one of the first gateways, and the second gateway is the other gateway except the main gateway in the first gateway;
determining that the target gateway is a main gateway or determining that one gateway in the second gateways is the main gateway according to the comparison result;
wherein the reselection module belongs to the target gateway.
Further, the contact strength is shared among gateways in a heartbeat packet broadcasting mode.
Further, the link strength includes one or more of signal strength and spatial distance.
An electronic device according to an embodiment of the third aspect of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the gateway selection method in the multi-gateway environment.
A non-transitory computer-readable storage medium according to a fourth aspect of the present invention stores thereon a computer program that, when executed by a processor, implements the steps of the gateway selection method in the multi-gateway environment as described above.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a gateway selection method in a multi-gateway environment according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a primary gateway selection process provided in an embodiment of the present invention;
fig. 3 is a flowchart illustrating a gateway selection method in a multi-gateway environment according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a primary gateway selection process provided by an embodiment of the present invention;
fig. 5 is a flowchart illustrating a gateway selection method in a multi-gateway environment according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a primary gateway selection process provided in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a gateway selection apparatus in a multi-gateway environment according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Fig. 1 is a schematic flowchart illustrating a gateway selection method in a multi-gateway environment according to an embodiment of the present invention, and referring to fig. 1, the method includes:
s11, the target gateway determines the contact strength between the target gateway and an upstream server, and obtains the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway in the same network environment with the target gateway;
and S12, the target gateway determines a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting the uplink and downlink data of the downstream equipment.
With reference to step S11, it should be noted that, in the embodiment of the present invention, the multi-gateway network environment refers to that there are multiple gateways that can be externally connected in the same communication space. Each gateway can determine the contact strength between the gateway and the upstream server, and the contact strength is an associated parameter index between the gateway and the upstream server. Such as signal strength and spatial distance. The greater the signal strength, the more closely the association between the corresponding gateway and the upstream server. The smaller the spatial distance, the more closely the association between the corresponding gateway and the upstream server is. Here, the related parameter index is not limited to the above-mentioned contents.
In embodiments of the present invention, the link strength is one or more of signal strength and spatial distance. But usually, one of the parameters is selected as the parameter index according to the method.
In an embodiment of the present invention, each gateway in a multi-gateway network environment may perform the method of the present embodiment to determine a primary gateway from the multi-gateways. The primary gateway is an executive gateway for transmitting downstream and upstream data of downstream devices.
The implementation of the method is explained below with respect to any gateway in the same network environment, and in the explanation, the gateway is regarded as a target gateway for convenience of content description. And at least one gateway in the same network environment with the target gateway is a first gateway.
In the embodiment of the invention, after determining the respective contact strength with the upstream server among the gateways, the respective contact strength can be shared among the gateways in a heartbeat packet broadcasting manner.
For this purpose, the target gateway may obtain the strength of contact between itself and the upstream server, and obtain the strength of contact between the first gateway and the upstream server.
And then, the target gateway determines a main gateway from the gateways according to the acquired contact strength between the target gateway and the upstream server and the contact strength between the first gateway and the upstream server.
In a further embodiment of the foregoing embodiment method, an explanation is made for a process in which the target gateway determines the primary gateway according to the contact strength, specifically as follows:
and the target gateway compares the contact strength between the target gateway and the upstream server with the contact strength between the first gateway and the upstream server to obtain a comparison result, and determines that the target gateway is the main gateway or determines that one gateway in the first gateway is the main gateway according to the comparison result.
For example, the link strength is a signal strength, and if the comparison result shows that the signal strength between the target gateway and the upstream server is stronger than the signal strength between each gateway in the first gateway and the upstream server, the target gateway is determined to be the master gateway. And if the comparison result shows that the signal strength between the target gateway and the upstream server is not completely stronger than the signal strength between each gateway in the first gateway and the upstream server, selecting the gateway with the strongest signal strength between each gateway in the first gateway and the upstream server as the main gateway.
For example, the strength of the connection is a spatial distance, and if the comparison result shows that the spatial distance between the target gateway and the upstream server is shorter than the spatial distance between each gateway in the first gateway and the upstream server, the target gateway is determined to be the master gateway. And if the comparison result shows that the space distance between the target gateway and the upstream server is not shorter than the space distance between each gateway in the first gateway and the upstream server, selecting the gateway with the shortest space distance between each gateway in the first gateway and the upstream server as the main gateway.
Here, when the target gateway determines itself to be the master gateway, since the other gateways also perform the above method, the other gateways can know that the target gateway is the master gateway. At this time, other gateways may be concerned whether the primary gateway shares the strength of contact when periodically sharing the strength of contact. The target gateway determines that one of the other gateways is a main gateway, that is, the target gateway is not a non-gateway, and at this time, the target gateway does not forward the uplink and downlink data of the downstream device to the upstream server after receiving the uplink and downlink data.
It should be further noted that when there are more than two gateways with the same contact strength, other conditions may be used to perform the auxiliary determination, such as selecting the gateway with a larger MAC address as the primary gateway, or selecting the gateway with a larger memory as the primary gateway.
The selection process of the primary gateway is explained in the following by using specific examples, and fig. 2 is a schematic diagram of the selection process of the primary gateway. Referring to fig. 2, there are A, B, C three gateways in a multi-gateway network environment, each of which remains connected to an upstream server and each of which can determine the strength of contact with the upstream server.
A. B, C the three gateways are kept in contact by heartbeat packets and communicate their respective strengths of contact with the upstream server.
At this time, the gateway a compares the contact strengths of the three gateways, finds that the contact strength between itself and the upstream server is optimal, and then itself becomes a master gateway, and the gateway B and the gateway C are non-master gateways.
At this time, the upstream and downstream data interacted between the downstream device and the upstream server are relayed by the main gateway a, and the gateways B and C are not relayed even if received.
According to the gateway selection method in the multi-gateway environment provided by the embodiment of the invention, the main gateway can be selected from all gateways according to the contact strength among the gateways in the multi-gateway environment, so that the main gateway can undertake the transmission work of the uplink and downlink data of the downstream equipment and the upstream server, and the situation that the upstream server receives the repeated data at the same time due to the fact that a plurality of gateways receive the downstream equipment and uplink the upstream server can be avoided.
Fig. 3 is a flowchart illustrating a gateway selection method in a multi-gateway environment according to an embodiment of the present invention, and referring to fig. 3, the method includes:
s21, the target gateway determines the contact strength between the target gateway and an upstream server, and obtains the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway in the same network environment with the target gateway;
s22, the target gateway determines a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting uplink and downlink data of downstream equipment;
s23, after the target gateway determines that the target gateway is the main gateway, the target gateway receives the contact strength between the new gateway and the upstream server, compares the contact strength between the target gateway and the upstream server with the contact strength between the new gateway and the upstream server to obtain a comparison result, and determines that the target gateway is the main gateway or determines that the new gateway is the main gateway according to the comparison result.
Regarding the step S21 and the step S22, these steps are basically the same as the step S11 and the step S12 of the above-described embodiment, and are not described again here.
With reference to step S23, it should be noted that, in the embodiment of the present invention, in a network environment with an existing gateway scale, if a new gateway joins, the determined primary gateway needs to compete with the new gateway to determine a new primary gateway. For this reason, the new gateway and the determined main gateway mutually share the contact strength between the new gateway and the upstream server.
And then, the target gateway compares the contact strength between the target gateway and the upstream server with the contact strength between the new gateway and the upstream server to obtain a comparison result, and determines that the target gateway is the main gateway or determines that the new gateway is the main gateway according to the comparison result.
If the target gateway is better in the comparison result, the target gateway continues to be used as the main gateway. And if the new gateway is better in the comparison result, the new gateway is used as a new main gateway.
The selection process of the primary gateway is explained in the following by using specific examples, and fig. 4 is a schematic diagram of the selection process of the primary gateway. Referring to fig. 4, there are B, C two gateways in a multi-gateway network environment, each of which is connected to an upstream server and each of which is capable of determining the strength of contact with the upstream server.
And B and C, the gateways keep contact through heartbeat packets and transfer respective contact strength with the upstream server.
At this time, the gateway B compares the contact strengths of the two gateways, finds that the contact strength between itself and the upstream server is optimal, and then becomes a master gateway, and the gateway C is a non-master gateway.
At this time, the uplink and downlink data interacted between the downstream device and the upstream server are relayed by the main gateway B, and the gateway C is not relayed even if received.
When gateway a comes online newly (i.e. newly joins or rejoins the network environment), and the contact strength with the upstream service is better than that of the current main gateway B.
At this time, a becomes the master gateway and B automatically cancels the master gateway.
According to the gateway selection method in the multi-gateway environment provided by the embodiment of the invention, the main gateway can be selected from all gateways according to the contact strength among the gateways in the multi-gateway environment, so that the main gateway can undertake the transmission work of the uplink and downlink data of the downstream equipment and the upstream server, and the situation that the upstream server receives the repeated data at the same time due to the fact that a plurality of gateways receive the downstream equipment and uplink the upstream server can be avoided.
Fig. 5 is a flowchart illustrating a gateway selection method in a multi-gateway environment according to an embodiment of the present invention, and referring to fig. 5, the method includes:
s31, the target gateway determines the contact strength between the target gateway and an upstream server, and obtains the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway in the same network environment with the target gateway;
s32, the target gateway determines a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting uplink and downlink data of downstream equipment;
s33, the target gateway determines that the contact strength between the main gateway and the upstream server is not received, and compares the contact strength between the target gateway and the upstream server with the contact strength between the second gateway and the upstream server to obtain a comparison result, wherein the main gateway is one of the first gateways, and the second gateway is the other gateway except the main gateway in the first gateway;
and S34, the target gateway determines that the target gateway is the main gateway or determines that one gateway in the second gateways is the main gateway according to the comparison result.
Regarding the step S31 and the step S32, these steps are basically the same as the step S11 and the step S12 of the above-described embodiment, and are not described again here.
With respect to step S33 and step S34, it should be noted that, in the embodiment of the present invention, in the current multi-gateway network environment, the target gateway is a non-primary gateway, and the primary gateway is one of the first gateways. When the current main gateway is switched off or is powered off, and the like, the main gateway contacts with the upstream service port, and at the moment, the main gateway does not share the contact strength any more. Therefore, the target gateway determines that the contact strength between the main gateway and the upstream server is not received, and compares the contact strength between the target gateway and the upstream server with the contact strength between the second gateway and the upstream server to obtain a comparison result. Here, the second gateway is the other gateway excluding the main gateway from the first gateway.
And then, the target gateway determines that the target gateway is the main gateway or determines that one gateway in the second gateways is the main gateway according to the comparison result.
Here, the primary gateway re-determination process is the same as the process described in the above embodiment, and is not described again here.
The selection process of the primary gateway is explained in the following by using specific examples, and fig. 6 is a schematic diagram of the selection process of the primary gateway. Referring to fig. 6, there are A, B, C three gateways in a multi-gateway network environment, each of which remains connected to an upstream server and each of which can determine the strength of contact with the upstream server.
A. B, C the three gateways are kept in contact by heartbeat packets and communicate their respective strengths of contact with the upstream server.
At this time, the gateway a compares the contact strengths of the three gateways, finds that the contact strength between itself and the upstream server is optimal, and then itself becomes a master gateway, and the gateway B and the gateway C are non-master gateways.
At this time, the upstream and downstream data interacted between the downstream device and the upstream server are relayed by the main gateway a, and the gateways B and C are not relayed even if received.
If the A gateway is disconnected or powered off, the connection with the upstream server is disconnected. The a gateway stops issuing heartbeat packets. The gateway B, C automatically compares the strength of contact after finding that a stops heartbeat packets, and selects a new primary gateway.
According to the gateway selection method in the multi-gateway environment provided by the embodiment of the invention, the main gateway can be selected from all gateways according to the contact strength among the gateways in the multi-gateway environment, so that the main gateway can undertake the transmission work of the uplink and downlink data of the downstream equipment and the upstream server, and the situation that the upstream server receives the repeated data at the same time due to the fact that a plurality of gateways receive the downstream equipment and uplink the upstream server can be avoided.
Fig. 7 is a schematic structural diagram of a gateway selection apparatus in a multi-gateway environment according to an embodiment of the present invention, and referring to fig. 7, the apparatus includes an obtaining module 71 and a selecting module 72, where:
an obtaining module 71, configured to determine a strength of contact between a target gateway and an upstream server, and obtain a strength of contact between a first gateway and the upstream server, where the strength of contact is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway in the same network environment as the target gateway;
a selecting module 72, configured to determine a primary gateway according to the contact strength, where the primary gateway is an execution gateway used for transmitting uplink and downlink data of a downstream device;
the acquisition module and the selection module belong to the target gateway.
In a further embodiment of the apparatus of the above embodiment, the selection module is specifically configured to:
comparing the contact strength between the target gateway and the upstream server with the contact strength between the first gateway and the upstream server to obtain a comparison result;
and determining the target gateway as the main gateway or determining one gateway in the first gateways as the main gateway according to the comparison result.
In a further embodiment of the apparatus of the above embodiment, the apparatus further includes an update module, configured to:
after determining that the target gateway is the main gateway, receiving the contact strength between the new gateway and the upstream server;
comparing the contact strength between the target gateway and the upstream server with the contact strength between the new gateway and the upstream server to obtain a comparison result;
determining that the target gateway is the main gateway or determining that the new gateway is the main gateway according to the comparison result;
wherein the update module belongs to the target gateway.
In a further embodiment of the apparatus of the above embodiment, the apparatus further includes a reselection module configured to:
determining that the contact strength between a main gateway and an upstream server is not received, and comparing the contact strength between a target gateway and the upstream server with the contact strength between a second gateway and the upstream server to obtain a comparison result, wherein the main gateway is one of the first gateways, and the second gateway is the other gateway except the main gateway in the first gateway;
determining that the target gateway is a main gateway or determining that one gateway in the second gateways is the main gateway according to the comparison result;
wherein the reselection module belongs to the target gateway.
In a further embodiment of the apparatus as described in the previous embodiment, the strength of contact is shared between gateways in the form of a heartbeat packet broadcast.
In a further embodiment of the above embodiment apparatus, the link strengths comprise one or more of signal strength and spatial distance.
Since the principle of the apparatus according to the embodiment of the present invention is the same as that of the method according to the above embodiment, further details are not described herein for further explanation.
It should be noted that, in the embodiment of the present invention, the relevant functional module may be implemented by a hardware processor (hardware processor).
The gateway selection device in the multi-gateway environment provided by the embodiment of the invention can select the main gateway from the gateways according to the contact strength between the gateways in the multi-gateway environment, so that the main gateway can undertake the transmission work of the uplink and downlink data of the downstream equipment and the upstream server, and the situation that the upstream server receives the repeated data at the same time due to the fact that a plurality of gateways receive the downstream equipment and uplink the upstream server can be avoided.
Fig. 8 illustrates a physical structure diagram of an electronic device, and as shown in fig. 8, the electronic device may include: a processor (processor)81, a communication Interface (Communications Interface)82, a memory (memory)83 and a communication bus 84, wherein the processor 81, the communication Interface 82 and the memory 83 complete communication with each other through the communication bus 84. Processor 81 may call logic instructions in memory 83 to perform the following method: determining the contact strength between a target gateway and an upstream server, and acquiring the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway which is in the same network environment with the target gateway; and determining a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting the uplink and downlink data of the downstream equipment.
In addition, the logic instructions in the memory 83 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Further, embodiments of the present invention disclose a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, the computer is capable of performing the methods provided by the above-mentioned method embodiments, for example, comprising: determining the contact strength between a target gateway and an upstream server, and acquiring the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway which is in the same network environment with the target gateway; and determining a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting the uplink and downlink data of the downstream equipment.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to perform the method provided by the foregoing embodiments, for example, including: determining the contact strength between a target gateway and an upstream server, and acquiring the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway which is in the same network environment with the target gateway; and determining a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting the uplink and downlink data of the downstream equipment.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
The above embodiments are merely illustrative of the present invention and are not to be construed as limiting the invention. Although the present invention has been described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications or equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention, and the technical solution of the present invention is covered by the claims of the present invention.

Claims (10)

1. A gateway selection method in a multi-gateway environment is characterized by comprising the following steps:
the method comprises the steps that a target gateway determines the contact strength between the target gateway and an upstream server, and obtains the contact strength between a first gateway and the upstream server, wherein the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway which is in the same network environment with the target gateway;
and the target gateway determines a main gateway according to the contact strength, wherein the main gateway is an execution gateway for transmitting the uplink and downlink data of the downstream equipment.
2. The method for selecting in a multi-gateway environment according to claim 1, wherein said determining a primary gateway by said target gateway according to said contact strength comprises:
the target gateway compares the contact strength between the target gateway and the upstream server with the contact strength between the first gateway and the upstream server to obtain a comparison result;
and the target gateway determines that the target gateway is the main gateway or determines that one gateway in the first gateways is the main gateway according to the comparison result.
3. The method for selecting a gateway in a multi-gateway environment according to claim 2, further comprising:
after determining that the target gateway is the main gateway, the target gateway receives the contact strength between the new gateway and the upstream server;
the target gateway compares the contact strength between the target gateway and the upstream server with the contact strength between the new gateway and the upstream server to obtain a comparison result;
and the target gateway determines the target gateway as the main gateway or determines a new gateway as the main gateway according to the comparison result.
4. The method for selecting a gateway in a multi-gateway environment according to claim 2, further comprising:
the target gateway determines that the contact strength between the main gateway and the upstream server is not received, compares the contact strength between the target gateway and the upstream server with the contact strength between the second gateway and the upstream server to obtain a comparison result, wherein the main gateway is one of the first gateways, and the second gateway is the other gateway except the main gateway in the first gateway;
and the target gateway determines that the target gateway is the main gateway or determines that one gateway in the second gateways is the main gateway according to the comparison result.
5. The method for selecting a gateway in a multi-gateway environment according to any of claims 1-4, wherein the contact strength is shared among gateways in a way of broadcasting heartbeat packets.
6. The method of claim 5, wherein the contact strength comprises one or more of signal strength and spatial distance.
7. A gateway selection apparatus in a multi-gateway environment, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for determining the contact strength between a target gateway and an upstream server and acquiring the contact strength between a first gateway and the upstream server, the contact strength is an associated parameter index between the gateway and the upstream server, and the first gateway is at least one gateway which is in the same network environment with the target gateway;
the selection module is used for determining a main gateway according to the contact strength, wherein the main gateway is an execution gateway used for transmitting uplink and downlink data of downstream equipment;
the acquisition module and the selection module belong to the target gateway.
8. The selection apparatus in a multi-gateway environment according to claim 7, wherein the selection module is specifically configured to:
comparing the contact strength between the target gateway and the upstream server with the contact strength between the first gateway and the upstream server to obtain a comparison result;
and determining the target gateway as the main gateway or determining one gateway in the first gateways as the main gateway according to the comparison result.
9. The gateway selection apparatus in a multi-gateway environment according to claim 8, further comprising an update module, configured to:
after determining that the target gateway is the main gateway, receiving the contact strength between the new gateway and the upstream server;
comparing the contact strength between the target gateway and the upstream server with the contact strength between the new gateway and the upstream server to obtain a comparison result;
determining that the target gateway is the main gateway or determining that the new gateway is the main gateway according to the comparison result;
wherein the update module belongs to the target gateway;
further comprising a reselection module to:
determining that the contact strength between a main gateway and an upstream server is not received, and comparing the contact strength between a target gateway and the upstream server with the contact strength between a second gateway and the upstream server to obtain a comparison result, wherein the main gateway is one of the first gateways, and the second gateway is the other gateway except the main gateway in the first gateway;
determining that the target gateway is a main gateway or determining that one gateway in the second gateways is the main gateway according to the comparison result;
wherein the reselection module belongs to the target gateway;
wherein, the contact strength is shared among gateways in a heartbeat packet broadcasting mode;
wherein the link strength comprises one or more of signal strength and spatial distance.
10. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the gateway selection method in a multi-gateway environment according to any one of claims 1 to 6.
CN202010296914.2A 2020-04-15 2020-04-15 Gateway selection method and device in multi-gateway environment and storage medium Pending CN113542106A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010296914.2A CN113542106A (en) 2020-04-15 2020-04-15 Gateway selection method and device in multi-gateway environment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010296914.2A CN113542106A (en) 2020-04-15 2020-04-15 Gateway selection method and device in multi-gateway environment and storage medium

Publications (1)

Publication Number Publication Date
CN113542106A true CN113542106A (en) 2021-10-22

Family

ID=78088282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010296914.2A Pending CN113542106A (en) 2020-04-15 2020-04-15 Gateway selection method and device in multi-gateway environment and storage medium

Country Status (1)

Country Link
CN (1) CN113542106A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114902620A (en) * 2022-04-06 2022-08-12 北京小米移动软件有限公司 Gateway system, gateway equipment identity determination method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026424A (en) * 2009-09-15 2011-04-20 施耐德电器工业公司 Wireless communication device and method, and system comprising such a device
CN109617731A (en) * 2018-12-21 2019-04-12 青岛海信智慧家居系统股份有限公司 Adaptive gateway role configuration method and device under a kind of multi-gateway environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026424A (en) * 2009-09-15 2011-04-20 施耐德电器工业公司 Wireless communication device and method, and system comprising such a device
CN109617731A (en) * 2018-12-21 2019-04-12 青岛海信智慧家居系统股份有限公司 Adaptive gateway role configuration method and device under a kind of multi-gateway environment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114902620A (en) * 2022-04-06 2022-08-12 北京小米移动软件有限公司 Gateway system, gateway equipment identity determination method, device and storage medium
CN114902620B (en) * 2022-04-06 2024-04-30 北京小米移动软件有限公司 Gateway system, gateway equipment identity determining method, device and storage medium

Similar Documents

Publication Publication Date Title
US11039451B2 (en) Resource pool determining method and related device
KR101370355B1 (en) Automatic partner selection in the cooperative mac protocol
JP6189954B2 (en) Synchronization method and base station
CN113630272B (en) Communication method and device
US11638193B2 (en) Load balancing method and device, storage medium, and electronic device
CN113037530B (en) Multi-gateway scene implementation method and system, electronic device and storage medium
CN105451165B (en) near field communication method and device based on multiple protocols
US10362549B2 (en) Method and apparatus for setting up interface between access points
JP2022508852A (en) Load balancing method and equipment
US10154513B2 (en) Terminal scheduling method, station, and terminal
CN110381603B (en) Random access method and terminal
CN104969513B (en) Wireless controller upgrade method and equipment
CN113542106A (en) Gateway selection method and device in multi-gateway environment and storage medium
US20230422108A1 (en) Inter Secondary Node Conditional PSCell Change
CN113037798B (en) Multi-gateway communication method, system, electronic device and storage medium
CN113746725B (en) Gateway selection method and device in multi-gateway environment and storage medium
CN105471909A (en) Method for quickly establishing local area network connection and initiating device and routing device
CN110149659B (en) Data uplink and downlink transmission method, device and system
CN112788672B (en) Secondary base station changing method, main base station, secondary base station and terminal
CN110933729B (en) Method and device for determining survival time value of multi-hop network node
CN112866013B (en) Network configuration method, device and system
US20180026837A1 (en) Data transmission method and apparatus
CN110933730B (en) Method and device for determining survival time value of multi-hop network node
CN111132095B (en) Synchronization source determination method, device, terminal and medium based on D2D communication technology
CN114666286B (en) Data transmission method, first base station, second base station and system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211022

RJ01 Rejection of invention patent application after publication