CN105376309B - Access gateway allocation method and device - Google Patents
Access gateway allocation method and device Download PDFInfo
- Publication number
- CN105376309B CN105376309B CN201510727432.7A CN201510727432A CN105376309B CN 105376309 B CN105376309 B CN 105376309B CN 201510727432 A CN201510727432 A CN 201510727432A CN 105376309 B CN105376309 B CN 105376309B
- Authority
- CN
- China
- Prior art keywords
- strategy
- group
- access gateway
- policy
- family
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/101—Server selection for load balancing based on network conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1012—Server selection for load balancing based on compliance of requirements or conditions with available server resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses an access gateway allocation method and device. The method comprises the following steps: the access gateway management system GMS sets the corresponding relation between the access gateway group and the strategy group and maintains the online state and the load information of each access gateway in each access gateway group; the GMS acquires an access gateway address acquisition request carrying equipment information sent by equipment, matches the equipment information with a policy group, and determines the policy group matched with the equipment information; and the GMS searches an access gateway group corresponding to the determined strategy group according to the corresponding relation, and allocates the access gateway which is online and has the lowest load in the access gateway group to the equipment according to the online state and the load information of each access gateway in the access gateway group. By means of the technical scheme of the invention, specific equipment can be appointed to be connected to a specific group of access gateways with the same function according to the strategy and the related configuration of the access gateways, and the equipment is appointed to be connected with the access gateway with the lowest load according to the load of the actual access gateway.
Description
Technical Field
The invention relates to the technical field of Internet of things, in particular to an access gateway allocation method and device.
Background
The Internet of things (Internet of things, abbreviated as IoT) is an important component of new-generation information technology and is also an important development stage of the "information" era. As the name implies, the Internet of things is the Internet with connected objects. This has two layers: firstly, the core and the foundation of the internet of things are still the internet, and the internet is an extended and expanded network on the basis of the internet; and secondly, the user side extends and expands to any article to perform information exchange and communication, namely, the article information.
In the internet of things industry, devices are generally required to be directly (through WIFI modules and the like) or indirectly (through home gateways) connected to an internet of things server in a long-term connection manner through a Transmission Control Protocol (TCP), and when the home appliances are connected to the server through the TCP, because resources of a single server are limited and a risk exists in single-point operation, in general, the purpose of balancing TCP connection loads of the devices is achieved by using software connection agents (e.g., Nginx, Haproxy) or hardware port forwarding (e.g., a10 load balancing server) and the like.
Most load balancing systems or hardware supporting the TCP connection only support the random allocation of the TCP connection of the device to the configured server, and cannot identify the load condition of the server or perform packet management on the server to which the device is to be connected.
Disclosure of Invention
In view of the problems in the prior art that the load condition of the server cannot be identified when accessing the server of the internet of things, and the server to which the device is connected cannot be grouped and managed, the present invention is proposed to provide an access gateway allocation method and apparatus that overcome the above problems or at least partially solve the above problems.
The invention provides an access gateway allocation method, which comprises the following steps:
the access gateway management system GMS sets the corresponding relation between the access gateway group and the strategy group and maintains the online state and the load information of each access gateway in each access gateway group;
the GMS acquires an access gateway address acquisition request carrying equipment information sent by equipment, matches the equipment information with a policy group, and determines the policy group matched with the equipment information;
and the GMS searches an access gateway group corresponding to the determined strategy group according to the corresponding relation, and allocates the access gateway which is online and has the lowest load in the access gateway group to the equipment according to the online state and the load information of each access gateway in the access gateway group.
The invention also provides an access gateway allocation device, which is arranged in a gateway management system GMS and comprises:
the setting module is used for setting the corresponding relation between the access gateway group and the strategy group and maintaining the online state and the load information of each access gateway in each access gateway group;
the matching module is used for acquiring an access gateway address acquisition request carrying equipment information sent by equipment, matching the equipment information with the strategy group and determining the strategy group matched with the equipment information;
and the distribution module is used for searching the access gateway group corresponding to the determined strategy group according to the corresponding relation and distributing the access gateway which is online and has the lowest load in the access gateway group to the equipment according to the online state and the load information of each access gateway in the access gateway group.
The invention has the following beneficial effects:
by means of the technical scheme of the embodiment of the invention, the problems that the load condition of the server cannot be identified and the server to which the equipment is connected cannot be grouped and managed when the server of the Internet of things is accessed in the prior art are solved, the specific equipment can be appointed to be connected to a specific group of access gateways with the same function according to the strategy and the relevant configuration of the access gateways, the equipment is appointed to be connected with the access gateway with the lowest load according to the load of the actual access gateway, and the load of the system is more balanced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flow chart of an access gateway allocation method of an embodiment of the present invention;
fig. 2 is a signaling flow diagram of an access gateway allocation method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a database table structure of an embodiment of the present invention;
FIG. 4 is a diagram illustrating a relational data table after database initialization is completed according to an embodiment of the invention;
fig. 5 is a schematic diagram of a GMS configuration policy group and an access network pipe group of an embodiment of the present invention;
fig. 6 is a schematic diagram of a data table for newly creating an access gateway group and adding an access gateway according to an embodiment of the present invention;
FIG. 7 is a diagram of creating a policy group and creating a table of policy families, according to an embodiment of the invention;
FIG. 8 is a schematic diagram of a data table added to a policy group and added with a policy according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a data table with additional policies added to a policy group according to an embodiment of the invention;
FIG. 10 is a schematic diagram of a data table of all policies configured by policy group PG1 according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a data table configuring a policy group and an access gateway group according to an embodiment of the present invention;
fig. 12 is a schematic diagram of a GMS access gateway of an embodiment of the present invention;
FIG. 13 is a diagram of a table of relational data after policy matching according to an embodiment of the invention;
FIG. 14 is a schematic diagram of policy family matching data for an embodiment of the present invention;
FIG. 15 is a schematic diagram of a query policy family according to an embodiment of the present invention;
FIG. 16 is a first diagram of a policy family matching data table according to an embodiment of the present invention;
FIG. 17 is a second schematic diagram of a policy family matching data table of an embodiment of the present invention;
FIG. 18 is a schematic diagram of a matching policy group according to an embodiment of the present invention;
FIG. 19 is a schematic diagram of a policy group matched data table of an embodiment of the present invention;
FIG. 20 is a schematic diagram of selecting a policy group according to an embodiment of the present invention;
FIG. 21 is a schematic diagram of a policy group PG1 configuration according to an embodiment of the present invention;
FIG. 22 is a schematic illustration of various matching scenarios for policy group PG1 according to an embodiment of the present invention;
fig. 23 is a schematic diagram of finding access gateway groups according to an embodiment of the present invention;
fig. 24 is a schematic diagram of an access gateway group matched data table of an embodiment of the present invention;
fig. 25 is a schematic diagram of a lookup access gateway of an embodiment of the present invention;
fig. 26 is a schematic diagram of an access gateway matched data table of an embodiment of the present invention;
fig. 27 is a schematic structural diagram of an access gateway allocation apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the problems that the load condition of a server cannot be identified and the server to be connected with equipment cannot be grouped and managed when the server of the internet of things is accessed in the prior art, the invention provides an access gateway allocation method and an access gateway allocation device, and the invention is further described in detail with reference to the attached drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Method embodiment
According to an embodiment of the present invention, an access gateway allocation method is provided, fig. 1 is a flowchart of an access gateway allocation method according to an embodiment of the present invention, and before describing a specific flowchart of fig. 1, first, terms that may be involved are described.
GMS: an access gateway management system, i.e. a system for performing access gateway allocation by using the invention;
an access gateway: i.e. the servers that ultimately need to be allocated to the device;
access gateway group: any number of combinations of access gateways of the same category. All access gateways in the same access gateway group are required to have the same function, and during distribution, one access gateway with the lowest load is selected from the access gateway group to be distributed to equipment;
strategy: the method and the device are used for matching the rule of a certain information field of the equipment, the matching rule usually has the modes of character string matching, integer range judgment and the like, and the embodiment of the invention does not limit the mode of the matching rule of the field and can be established in specific implementation; matching rules between similar strategies can also be overlapped, for example, it is possible to configure two strategies (3< a <10) and (7< a <15), if the value of field a is 8, both strategies can be matched;
policy group: any number of combinations of policies. Only one policy group is finally matched according to the equipment information, and then one access gateway group is uniquely searched according to the policy group. The following rules are followed for policy matching in the policy group: the same type of strategies are related to one or more (namely, only one strategy is matched); the relationships between the heterogeneous policies are matches (i.e., the heterogeneous policies that must be configured all match).
The strategy family: the unique identification of a certain policy type in a certain policy group, the transfer between the policy group and the policy, and the actual allocation of the policy is mapped to the policy family according to the different policy types.
As shown in fig. 1, the access gateway allocation method according to the embodiment of the present invention includes the following processes:
step 101, an access gateway management system GMS sets a corresponding relation between an access gateway group and a strategy group, and maintains the online state and load information of each access gateway in each access gateway group;
102, a GMS acquires an access gateway address acquisition request carrying equipment information sent by equipment, matches the equipment information with a policy group, and determines the policy group matched with the equipment information;
step 103, the GMS searches for an access gateway group corresponding to the determined policy group according to the correspondence, and allocates an access gateway with the lowest load that is online in the access gateway group to the device according to the online status and load information of each access gateway in the access gateway group.
Specifically, in step 101, the setting, by the access gateway management system GMS, of the correspondence between the access gateway group and the policy group includes the following steps:
In step 101, the step of the GMS maintaining the online status and the load information of each access gateway in each access gateway group specifically includes: the GMS receives the load information reported by the access gateway at regular time, and judges the online state of the access gateway according to whether the access gateway reports the load information at regular time; and the GMS stores the acquired load information and online state.
Step 102 includes the following processes: the GMS acquires the equipment information carried in the request according to the access gateway address sent by the equipment, carries out strategy matching on fields in the equipment information respectively, carries out strategy family matching according to the matched strategies respectively, carries out strategy group matching after summarizing according to the matched strategy families, and selects one strategy group with the highest priority from all the matched strategy groups as a strategy group finally matched with the equipment information. The method specifically comprises the following steps:
and 6, the GMS searches one or more strategy groups which exist simultaneously in the strategy groups matched with each strategy family, selects the strategy group with the highest priority from the one or more strategy groups according to the priority as the strategy group which is finally matched with the equipment information, and if one or more strategy groups which exist simultaneously are not found in the strategy group matched with each strategy family, the equipment information is determined not to be matched with the corresponding strategy group.
In order to enable the allocation of access gateways even when a policy group cannot be matched, the following processing needs to be performed:
and 5, the GMS allocates the access gateway which is online and has the lowest load in the default access gateway group to the equipment according to the online state and the load information of each access gateway in the default access gateway group.
The above technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 2 is a signaling flow chart of an access gateway allocation method according to an embodiment of the present invention, and as shown in fig. 2, the method specifically includes the following processing:
step 201, the access gateway reports the load condition of the access gateway to the GMS at regular time;
step 202, the GMS determines that the report is not overtime, and sets the state of the access gateway to be online;
step 203, the GMS regularly detects the state of the access gateway and sets the access gateway which does not report the load after overtime as offline;
step 204, the equipment sends a request for obtaining the access gateway address to the GMS, wherein the request carries equipment information;
step 205, the GMS performs policy matching according to the device information to obtain a matched policy group, obtains an access gateway group corresponding to the policy group, determines an access gateway with the minimum load in the group, and sends an access gateway address obtaining response to the device, where the response message carries address information of the access gateway with the minimum load
And step 206, the equipment connects the allocated access gateway through the TCP according to the access gateway address sent by the GMS.
The above-described process flow will be described below by way of example.
First, data table structure and initialization
In the embodiment of the present invention, the GMS needs to persistently store access gateway and policy related data, and needs to use a database, a structure of the database table is shown in fig. 3, where the database table in the database specifically includes: a relationship table (policy group-policy), a policy table, a policy group table, a policy type table (data is not modifiable), a relationship table (policy group-policy group), a policy group table, a relationship table (policy group-access gateway table), an access gateway group table, a relationship table (access network group-access gateway), and an access gateway table, where specific parameters in each table are as shown in fig. 3.
After the database is created, the data tables need to be initialized, and some default data are created:
1. creating a default Access Gateway Group (AGGD) for distributing access gateways when not matched with any configured policy;
2. establishing an access gateway AGD1 and an AGD2, setting the initial state as off-line and the load as 0, and configuring an access gateway address (after the access gateway reports the load, the state can be updated to be on-line);
3. adding the access gateways AGD1, AGD2 to the access gateway group AGGD;
4. configuring a default Policy Group (PGD) to a default Access Gateway Group (AGGD); the default strategy group PGD does not contain any strategy or allows any strategy, and is only used when the strategy is not matched with any strategy group;
the relevant data table after the database initialization is completed is shown in fig. 4.
Second, configuration process
GMSs typically require the configuration of three parts:
1. configuring an access gateway group and an access gateway;
2. strategy group and strategy configuration;
3. and configuring the strategy group to the access gateway group.
Fig. 5 is a schematic diagram of a GMS configuration policy group and an access network group according to an embodiment of the present invention, and each configuration process is described below.
1. Newly establishing access gateway group and adding access gateway
The specific process is as follows:
(1) establishing an access gateway group AGG 1;
(2) newly building access gateways AG1, AG2 and AG3, setting the initial state as off-line, the load as 0, and configuring the access gateway address (after the access gateway reports the load, the state can be updated as on-line);
(3) the access gateways AG1, AG2, AG3 are added to the access gateway group AGG 1.
The relevant data table after configuration is shown in fig. 6.
2-1, creating new strategy group and creating strategy family
The specific process is as follows:
(1) newly building a policy group PG 1;
(2) according to all policy types in the "policy type table", creating policy families PF1_1, PF1_2, PF1_3, PF1_4 and PF1_5 corresponding to each policy type for the policy group PG 1;
(3) adding the several newly created policy families to policy group PG 1;
(4) creating a default policy (policy ID fixed to PD) for the several newly created policy families in the relation table (policy family-policy);
the relevant data table after configuration is shown in fig. 7.
2-2, newly creating a strategy and adding the strategy into the strategy group
Adding a new strategy and adding the strategy into the strategy group, wherein the flow is as follows:
(1) creating strategies P3 and P5 in a strategy table B corresponding to the strategy type PT 2;
(2) finding out a strategy family (PF1_2) of the strategy group PG1 corresponding to the strategy type PT2 according to the conditions of the right graph;
(3) the policies P3, P5 are added to the policy family PF1_2, respectively, according to the following rules:
(4) if the policy family has a default policy PD, then the default policy PD is modified to the policy ID to be added (e.g., P3);
(5) if the policy family has no default policy PD, adding a policy (such as P5) to the policy family;
the relevant data table after configuration is shown in fig. 8.
Adding other strategies and adding the strategies into the strategy group, wherein the flow is as follows:
(1) creating strategies P1, P3 and P4 in a strategy table C corresponding to the strategy type PT3 and adding the strategies P1, P3 and P4 into a strategy group PG1 in the same PT2 strategy flow;
(2) creating strategies P1, P3 and P4 in a strategy table E corresponding to the strategy type PT5 and adding the strategies P1, P3 and P4 into a strategy group PG1 in the same PT2 strategy flow;
the relevant data table after configuration is shown in fig. 9.
3. Configuring policy groups onto access gateway groups
After the above policy related configuration, all policies configured by policy group PG1 are shown in fig. 10. Configuring a policy group PG1 onto an access gateway group AGG 1; it should be noted that, in the embodiment of the present invention, one policy group may be configured to only one access gateway group, and one access gateway group may configure multiple policy groups at the same time; the relevant data table after configuration is shown in fig. 11.
Third, distribution process
Fig. 12 is a schematic diagram of a GMS access gateway according to an embodiment of the present invention, and as shown in fig. 12, when an access gateway is allocated, the method specifically includes the following processing:
step 6, dividing the access gateways from the access gateway group according to information such as server load and the like;
the access gateway assignment procedure is explained in detail below.
The processing flow of the step 1 is as follows:
it is assumed that the device information carried in a device request includes: field B, field C, field E;
1. according to the policy type table, the field B needs to be matched with the rule from the policy table B, and the policy P5 is assumed to be matched;
2. according to the policy type table, the field C needs to be matched with the rule from the policy table C, assuming that the policy P1 is matched;
3. according to the strategy type table, the field E needs to be subjected to rule matching from the strategy table E, and the strategies P4 and P9 are supposed to be matched;
it should be noted that, if there is a field that is not matched with any policy in the device request field, the field may be skipped directly; a field may match multiple policies simultaneously;
the relevant data table after completion of matching is shown in fig. 13.
The processing flow of the step 2 is as follows:
1. as shown in fig. 14, a piece of "policy family matching data" is generated for matching all the matched policies with all the policy types, and is used for policy family matching. Supplementing a default policy PD for policy types not present in the data;
2. as shown in fig. 15, the first piece of data is taken from the "policy family matching data", and the policy family is queried according to the query conditions in fig. 15 (taking PT5 as an example, the policy families PF1_5 and PF2_5 are queried);
the relevant data table after completion of matching is shown in fig. 16.
3. And matching the strategy families corresponding to all other data in the strategy family matching data according to the same query logic.
It should be noted that, if any piece of data in the "policy family matching data" is not matched to the policy family, the access gateway is directly allocated by using the default policy group PGD; a policy family matching data may match multiple policy families simultaneously.
The relevant data table after completion of matching is shown in fig. 17.
The processing flow of the step 3 is as follows:
1. as shown in fig. 18, one policy family data is taken from the "policy family matching result", and a plurality of policy groups may be found at the same time (exemplified by PF1_5, PF2_5) according to the query condition in the following figure;
2. inquiring the strategy groups corresponding to all other strategy family data according to the same logic;
it should be noted that, if any piece of policy family data does not query a policy group, the access gateway is directly allocated by using the default policy group PGD.
The relevant data table after completion of matching is shown in fig. 19.
The processing flow of the step 4 is as follows:
1. searching for a policy group (PG1) for which each policy group data exists simultaneously;
2. there may be more than one policy group existing at the same time, and the highest priority (lower value and higher priority) is selected from the policy groups for access gateway allocation.
It should be noted that, if there is no policy group existing in each policy group data at the same time, the access gateway is directly allocated by using the default policy group PGD.
The relevant data table after completion of matching is shown in fig. 20.
From this point on, the policy-related matching is over, and there is one and only one policy group (configuration test policy group or default policy group PGD).
As shown in fig. 21 and fig. 22, a policy group configures a policy of a certain type, but the device request information may or may not carry a field corresponding to the policy type, and if the policy group is matched, the following conditions need to be satisfied:
the first condition is as follows: once a certain type of policy is configured in the policy group, the device requests a corresponding field of information, and the information is matched with at least one of the type of policy possibly;
and a second condition: policy group if the policy type corresponding to a field in the device request information does not configure any policy, the field may be considered a default match for the policy group.
The processing flow of the step 5 is as follows:
as shown in fig. 23, according to the query condition in fig. 23, the access gateway group AGG1 configured by the policy group PG1 is queried (since one policy group can only be configured to one access gateway group, only one access gateway group is queried). The relevant data table after completion of matching is shown in fig. 24.
The processing flow of step 6 is as follows:
as shown in fig. 25, according to the query condition in fig. 25, the access gateway AG3 that is online and lowest in load in the access gateway group AGG 1; the relevant data table after completion of matching is shown in fig. 26.
From now on, the whole procedure of assigning an access gateway to the device is completed, and the GMS may return the address of the assigned access gateway AG3 to the device.
In summary, with the aid of the technical solutions of the embodiments of the present invention, the problems that the load condition of the server cannot be identified and the server to which the device is to be connected cannot be grouped and managed when accessing the server of the internet of things in the prior art are solved, a specific device can be designated and connected to a specific group of access gateways with the same function according to the policy and the relevant configuration of the access gateways, and the device is designated and connected to the access gateway with the lowest load according to the load of the actual access gateway, so that the load of the system is more balanced.
Device embodiment
According to an embodiment of the present invention, there is provided an access gateway allocation apparatus, which is installed in a gateway management system GMS, fig. 27 is a schematic structural diagram of the access gateway allocation apparatus according to the embodiment of the present invention, and as shown in fig. 27, the access gateway allocation apparatus according to the embodiment of the present invention includes: a setup module 270, a matching module 272, and an assignment module 274, each of which is described in detail below.
A setting module 270, configured to set a correspondence between access gateway groups and policy groups, and maintain online states and load information of access gateways in the access gateway groups;
a matching module 272, configured to obtain an access gateway address obtaining request carrying device information sent by a device, match the device information with a policy group, and determine the policy group matching the device information;
the allocating module 274 is configured to search, according to the correspondence, an access gateway group corresponding to the determined policy group, and allocate, according to the online status and load information of each access gateway in the access gateway group, an access gateway that is online in the access gateway group and has the lowest load to the device.
The specific operation of each module is described in detail below.
The setting module 270 is specifically configured to:
configuring an access gateway group and an access gateway, specifically comprising the following steps: newly building an access gateway group and an access gateway, setting the initial state of the access gateway to be offline and the load to be 0, and configuring an access gateway address; adding the access gateway into the newly-built access gateway group;
configuring a policy group and a policy, specifically comprising the following steps: creating a strategy group, creating a corresponding strategy family according to the strategy type, adding the strategy family into the created strategy group, and creating a default strategy for each strategy family; creating a strategy corresponding to a certain strategy type, searching a strategy family corresponding to the strategy type, and adding the created strategy into the searched strategy family, wherein if the strategy family has a default strategy, the default strategy is modified into the strategy needing to be added, and if the strategy family does not have the default strategy, a strategy is newly added into the strategy family;
setting the corresponding relation between the access gateway group and the strategy group, specifically comprising the following steps: and configuring the policy groups to the access gateway groups, wherein one policy group can only be configured to one gateway group, and one access gateway group can be configured with a plurality of policy groups.
Receiving load information reported by an access gateway at regular time, and judging the online state of the access gateway according to whether the access gateway reports the load information at regular time or not;
and storing the acquired load information and online state.
The matching module 272 is specifically configured to:
the method comprises the steps of obtaining equipment information carried in a request according to an access gateway address sent by equipment, respectively performing strategy matching on fields in the equipment information, respectively performing strategy family matching according to matched strategies, summarizing and then performing strategy group matching according to matched strategy families, and selecting one strategy group with the highest priority from all the matched strategy groups as a strategy group finally matched with the equipment information.
Acquiring a field in the equipment information, and searching a policy table corresponding to the field according to the policy type table, wherein the policy type table comprises: the policy type, the policy table and the one-to-one correspondence between the fields;
one or more matching strategies matched with the fields are searched according to the strategy table, if any field which is not matched with any strategy exists in the fields, the field is directly ignored, wherein the strategy table comprises the following steps: strategies and corresponding relations between the self-defined strategy rules;
generating a strategy family matching data table, wherein the strategy family matching data table comprises the following steps: the strategy type and the corresponding relation between the strategy type and the matching strategy of each field, and the strategy type without the matching strategy is corresponding to the supplemented default strategy;
according to the strategy type of each piece of data in the strategy family matching data table and the matching strategy/default strategy corresponding to the strategy type, one or more strategy families matched with the strategy type of the piece of data and the matching strategy/default strategy corresponding to the strategy type are searched from the strategy family table and the strategy family and strategy relation table, if any piece of data in the strategy family matching data table is not matched with the strategy family, the fact that the equipment information cannot be matched with the corresponding strategy group is determined, wherein the strategy family table comprises: the corresponding relation between the strategy family and the strategy type, the strategy family and strategy relation table comprises: the corresponding relation between the strategy family and the strategy;
according to the matched one or more strategy families, one or more strategy groups matched with the strategy families are found out from the strategy group and the strategy family relation table, if a certain strategy family is not matched with the strategy group, the fact that the equipment information cannot be matched with the corresponding strategy group is determined, wherein the strategy group and the strategy family relation table comprise: a one-to-one correspondence between policy groups and policy families;
and if one or more strategy groups which exist simultaneously are not found in the strategy group matched with each strategy family, determining that the equipment information cannot be matched with the corresponding strategy group.
Preferably, the setting module 270 is further configured to: creating a default access gateway group and one or more access gateways, setting the initial state of the created one or more access gateways to be offline and the load to be 0, configuring the address of the access gateway, and adding the created one or more access gateways into the default access gateway group; configuring a default policy group to a default access gateway group, wherein the default policy group does not contain any policy; receiving load information reported by one or more access gateways, and updating the online state and the load information of the corresponding access gateway in the default access gateway group according to the reported load information;
the assignment module 274 is further operable to: when the equipment information can not be matched with the corresponding strategy group, matching the equipment information with a default strategy group, and determining a default access gateway group corresponding to the default strategy group; and allocating the access gateway which is online and has the lowest load in the default access gateway group to the equipment according to the online state and the load information of each access gateway in the default access gateway group.
The specific operations of the modules in the embodiments of the present invention can be understood by referring to the description and the drawings in the above method embodiments, and are not described herein again.
In summary, with the aid of the technical solutions of the embodiments of the present invention, the problems that the load condition of the server cannot be identified and the server to which the device is to be connected cannot be grouped and managed when accessing the server of the internet of things in the prior art are solved, a specific device can be designated and connected to a specific group of access gateways with the same function according to the policy and the relevant configuration of the access gateways, and the device is designated and connected to the access gateway with the lowest load according to the load of the actual access gateway, so that the load of the system is more balanced.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the client in an embodiment may be adaptively changed and provided in one or more clients different from the embodiment. The modules of the embodiments may be combined into one module and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or client so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a client loaded with a ranking website according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Claims (10)
1. An access gateway allocation method, comprising:
the access gateway management system GMS sets the corresponding relation between the access gateway group and the strategy group and maintains the online state and the load information of each access gateway in each access gateway group;
the method includes that an access gateway address acquisition request carrying equipment information sent by the GMS acquisition equipment matches the equipment information with the policy group, and a policy group matched with the equipment information is determined, and the method includes:
the GMS acquires a field in the equipment information, and searches a policy table corresponding to the field according to a policy type table;
the GMS searches one or more matching strategies matched with the fields according to the strategy table;
the GMS generates a strategy family matching data table, wherein the strategy family matching data table comprises: the strategy type and the corresponding relation between the strategy type and the matching strategy of each field, and the strategy type without the matching strategy is corresponding to the supplemented default strategy;
the GMS searches one or more strategy families matched with the strategy type of the data and the matching strategy/default strategy corresponding to the strategy type from a strategy family table and a strategy family and strategy relation table according to the strategy type of each piece of data in the strategy family matching data table and the matching strategy/default strategy corresponding to the strategy type, wherein the strategy family table comprises: the corresponding relation between the strategy family and the strategy type, the strategy family and strategy relation table comprises: the corresponding relation between the strategy family and the strategy;
the GMS finds one or more policy groups matched with each policy family from a policy group and a policy family relation table according to the matched one or more policy families, wherein the policy group and policy family relation table comprises: a one-to-one correspondence between policy groups and policy families;
the GMS searches one or more strategy groups which exist simultaneously in the strategy groups matched with each strategy family, and selects the strategy group with the highest priority from the one or more strategy groups according to the priority as the strategy group finally matched with the equipment information;
and the GMS searches an access gateway group corresponding to the determined strategy group according to the corresponding relation, and allocates an access gateway which is online and has the lowest load in the access gateway group to the equipment according to the online state and the load information of each access gateway in the access gateway group.
2. The method of claim 1, wherein the access gateway management system GMS setting a correspondence between an access gateway group and a policy group includes:
the GMS configures an access gateway group and an access gateway, and specifically comprises the following processing: newly building an access gateway group and an access gateway, setting the initial state of the access gateway to be offline and the load to be 0, and configuring an access gateway address; adding the access gateway into a newly-built access gateway group;
the GMS configures a strategy group and a strategy, and specifically comprises the following steps: creating a strategy group, creating a corresponding strategy family according to the strategy type, adding the strategy family into the created strategy group, and creating a default strategy for each strategy family; creating a strategy corresponding to a certain strategy type, searching a strategy family corresponding to the strategy type, and adding the created strategy into the searched strategy family, wherein if the strategy family has a default strategy, the default strategy is modified into the strategy needing to be added, and if the strategy family does not have the default strategy, a strategy is newly added into the strategy family;
the GMS setting a correspondence between an access gateway group and a policy group, specifically including the following processing: and configuring the policy groups to the access gateway groups, wherein one policy group can only be configured to one gateway group, and one access gateway group can be configured with a plurality of policy groups.
3. The method of claim 1, wherein the GMS maintaining presence and load information for each access gateway in each access gateway group specifically includes:
the GMS receives the load information reported by the access gateway at regular time and judges the online state of the access gateway according to whether the access gateway reports the load information at regular time or not;
and the GMS stores the acquired load information and the online state.
4. The method of claim 2, wherein the GMS obtaining an access gateway address obtaining request carrying device information sent by the GMS obtaining device, matching the device information with the policy group, and determining the policy group that matches the device information specifically includes:
the GMS acquires the equipment information carried in the request according to the access gateway address sent by the equipment, respectively matches the strategies of the fields in the equipment information, respectively matches the strategy families according to the matched strategies, matches the strategy groups after summarizing according to the matched strategy families, and selects one strategy group with the highest priority from all the matched strategy groups as the strategy group finally matched with the equipment information.
5. The method of claim 1, wherein the method further comprises:
the GMS creates a default access gateway group and one or more access gateways, sets the initial state of the created one or more access gateways to be offline and the load to be 0, configures the address of the access gateway, and adds the created one or more access gateways to the default access gateway group;
the GMS configures a default policy group to a default access gateway group, wherein the default policy group does not contain any policy;
the GMS receives the load information reported by the one or more access gateways and updates the online state and the load information of the corresponding access gateway in the default access gateway group according to the reported load information;
when the equipment information cannot be matched with a corresponding policy group, the GMS matches the equipment information with the default policy group and determines a default access gateway group corresponding to the default policy group;
and the GMS allocates the access gateway which is online and has the lowest load in the default access gateway group to the equipment according to the online state and the load information of each access gateway in the default access gateway group.
6. An access gateway allocation apparatus provided in a Gateway Management System (GMS), the apparatus comprising:
the setting module is used for setting the corresponding relation between the access gateway group and the strategy group and maintaining the online state and the load information of each access gateway in each access gateway group;
a matching module, configured to obtain an access gateway address obtaining request carrying device information sent by a device, match the device information with the policy group, and determine the policy group matching the device information, where the matching module is specifically configured to:
the GMS acquires a field in the equipment information, and searches a policy table corresponding to the field according to a policy type table;
the GMS searches one or more matching strategies matched with the fields according to the strategy table;
the GMS generates a strategy family matching data table, wherein the strategy family matching data table comprises: the strategy type and the corresponding relation between the strategy type and the matching strategy of each field, and the strategy type without the matching strategy is corresponding to the supplemented default strategy;
the GMS searches one or more strategy families matched with the strategy type of the data and the matching strategy/default strategy corresponding to the strategy type from a strategy family table and a strategy family and strategy relation table according to the strategy type of each piece of data in the strategy family matching data table and the matching strategy/default strategy corresponding to the strategy type, wherein the strategy family table comprises: the corresponding relation between the strategy family and the strategy type, the strategy family and strategy relation table comprises: the corresponding relation between the strategy family and the strategy;
the GMS finds one or more policy groups matched with each policy family from a policy group and a policy family relation table according to the matched one or more policy families, wherein the policy group and policy family relation table comprises: a one-to-one correspondence between policy groups and policy families;
the GMS searches one or more strategy groups which exist simultaneously in the strategy groups matched with each strategy family, and selects the strategy group with the highest priority from the one or more strategy groups according to the priority as the strategy group finally matched with the equipment information;
and the distribution module is used for searching an access gateway group corresponding to the determined strategy group according to the corresponding relation and distributing an access gateway which is online and has the lowest load in the access gateway group to the equipment according to the online state and the load information of each access gateway in the access gateway group.
7. The apparatus of claim 6, wherein the setup module is specifically configured to:
configuring an access gateway group and an access gateway, specifically comprising the following steps: newly building an access gateway group and an access gateway, setting the initial state of the access gateway to be offline and the load to be 0, and configuring an access gateway address; adding the access gateway into a newly-built access gateway group;
configuring a policy group and a policy, specifically comprising the following steps: creating a strategy group, creating a corresponding strategy family according to the strategy type, adding the strategy family into the created strategy group, and creating a default strategy for each strategy family; creating a strategy corresponding to a certain strategy type, searching a strategy family corresponding to the strategy type, and adding the created strategy into the searched strategy family, wherein if the strategy family has a default strategy, the default strategy is modified into the strategy needing to be added, and if the strategy family does not have the default strategy, a strategy is newly added into the strategy family;
setting the corresponding relation between the access gateway group and the strategy group, specifically comprising the following steps: and configuring the policy groups to the access gateway groups, wherein one policy group can only be configured to one gateway group, and one access gateway group can be configured with a plurality of policy groups.
8. The apparatus of claim 6, wherein the setup module is specifically configured to:
receiving load information reported by an access gateway at regular time, and judging the online state of the access gateway according to whether the access gateway reports the load information at regular time or not;
and storing the acquired load information and the online state.
9. The apparatus of claim 7, wherein the matching module is specifically configured to:
the method comprises the steps of obtaining equipment information carried in a request according to an access gateway address sent by equipment, respectively performing strategy matching on fields in the equipment information, respectively performing strategy family matching according to matched strategies, summarizing and then performing strategy group matching according to matched strategy families, and selecting one strategy group with the highest priority from all matched strategy groups as a strategy group finally matched with the equipment information.
10. The apparatus of claim 6, wherein the apparatus further comprises:
the setup module is further to: creating a default access gateway group and one or more access gateways, setting the initial state of the created one or more access gateways to be offline and the load to be 0, configuring the address of the access gateway, and adding the created one or more access gateways into the default access gateway group; configuring a default policy group to a default access gateway group, wherein the default policy group does not contain any policy; receiving load information reported by the one or more access gateways, and updating the online state and the load information of the corresponding access gateway in the default access gateway group according to the reported load information;
the allocation module is further to: when the equipment information cannot be matched with the corresponding strategy group, matching the equipment information with the default strategy group, and determining a default access gateway group corresponding to the default strategy group; and allocating the access gateway which is online and has the lowest load in the default access gateway group to the equipment according to the online state and the load information of each access gateway in the default access gateway group.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510727432.7A CN105376309B (en) | 2015-10-30 | 2015-10-30 | Access gateway allocation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510727432.7A CN105376309B (en) | 2015-10-30 | 2015-10-30 | Access gateway allocation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105376309A CN105376309A (en) | 2016-03-02 |
CN105376309B true CN105376309B (en) | 2021-08-13 |
Family
ID=55378104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510727432.7A Active CN105376309B (en) | 2015-10-30 | 2015-10-30 | Access gateway allocation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105376309B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107547424B (en) * | 2017-07-18 | 2020-09-25 | 深圳市盛路物联通讯技术有限公司 | Internet of things equipment mounting control method and equipment |
CN108712508A (en) * | 2018-06-06 | 2018-10-26 | 亚信科技(中国)有限公司 | A kind of load-balancing method and device |
CN108924879B (en) * | 2018-06-22 | 2021-07-30 | 北京格瑞空间科技有限公司 | Load balancing method for wireless Internet of things |
CN111327668B (en) * | 2019-09-25 | 2022-10-21 | 杭州海康威视系统技术有限公司 | Network management method, device, equipment and storage medium |
CN114629947B (en) * | 2022-01-26 | 2024-04-12 | 浙江大华技术股份有限公司 | Method for accessing equipment to platform and related equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848977A (en) * | 2006-02-24 | 2006-10-18 | 华为技术有限公司 | Method for insertion point obtaining insertion gateway address in mobile communication network |
CN101483657A (en) * | 2009-03-06 | 2009-07-15 | 中兴通讯股份有限公司 | Implementation method and system for same side private network device access by private user |
CN102223365A (en) * | 2011-06-03 | 2011-10-19 | 杭州华三通信技术有限公司 | User access method and device based on SSL (Secure Socket Layer) VPN (Virtual Private Network) gateway cluster |
CN103312760A (en) * | 2012-11-12 | 2013-09-18 | 中兴通讯股份有限公司 | Capability open platform, method and gateway for realizing plug and play management of terminal equipment |
CN104202365A (en) * | 2014-08-15 | 2014-12-10 | 深圳市蜂联科技有限公司 | Clustered intelligent gateway platform and method thereby for deploying expanded business application |
CN104601682A (en) * | 2014-12-31 | 2015-05-06 | 北京海尔广科数字技术有限公司 | Method for switching gateway of internet of things as well as associated device and system |
CN104798355A (en) * | 2012-09-18 | 2015-07-22 | 思杰系统有限公司 | Mobile device management and security |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102957752A (en) * | 2011-08-19 | 2013-03-06 | 中兴通讯股份有限公司 | System and method for identification and gateway address distribution |
CN103188144B (en) * | 2011-12-29 | 2018-02-16 | 中兴通讯股份有限公司 | A kind of system and method for realizing distributed network gate intercommunication |
US9008085B2 (en) * | 2012-08-15 | 2015-04-14 | International Business Machines Corporation | Network interface card having overlay gateway functionality |
WO2014038820A1 (en) * | 2012-09-07 | 2014-03-13 | 엘지전자 주식회사 | Method for managing access right of terminal to resource by server in wireless communication system, and device for same |
-
2015
- 2015-10-30 CN CN201510727432.7A patent/CN105376309B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848977A (en) * | 2006-02-24 | 2006-10-18 | 华为技术有限公司 | Method for insertion point obtaining insertion gateway address in mobile communication network |
CN101483657A (en) * | 2009-03-06 | 2009-07-15 | 中兴通讯股份有限公司 | Implementation method and system for same side private network device access by private user |
CN102223365A (en) * | 2011-06-03 | 2011-10-19 | 杭州华三通信技术有限公司 | User access method and device based on SSL (Secure Socket Layer) VPN (Virtual Private Network) gateway cluster |
CN104798355A (en) * | 2012-09-18 | 2015-07-22 | 思杰系统有限公司 | Mobile device management and security |
CN103312760A (en) * | 2012-11-12 | 2013-09-18 | 中兴通讯股份有限公司 | Capability open platform, method and gateway for realizing plug and play management of terminal equipment |
CN104202365A (en) * | 2014-08-15 | 2014-12-10 | 深圳市蜂联科技有限公司 | Clustered intelligent gateway platform and method thereby for deploying expanded business application |
CN104601682A (en) * | 2014-12-31 | 2015-05-06 | 北京海尔广科数字技术有限公司 | Method for switching gateway of internet of things as well as associated device and system |
Non-Patent Citations (3)
Title |
---|
"一种无线Mesh网络几何K中心网关部署求解方法";黄书强;《计算机学报》;20130731;全文 * |
"基于物联网网关选择优化算法的研究";张慧;《中国优秀硕士学位论文全文数据库-信息科技辑》;20150215;正文1-3章 * |
"车载自组织网络分簇及网关选择算法研究";陈柯蕾;《中国优秀硕士学位论文全文数据库-信息科技辑》;20150315;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN105376309A (en) | 2016-03-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105376309B (en) | Access gateway allocation method and device | |
CN104583955B (en) | The method and apparatus that IP for allocating in computing environment authorizes de-authorization | |
CN107092437B (en) | Data write-in, read method and device, cloud storage system | |
US7065526B2 (en) | Scalable database management system | |
CN102647482B (en) | Method and system for accessing website | |
CN108965007A (en) | API gateway interface configures update method and device | |
CN109451088A (en) | A kind of data access method and device | |
US8620926B2 (en) | Using a hashing mechanism to select data entries in a directory for use with requested operations | |
CN101741907A (en) | Method and system for balancing server load and main server | |
CN106850759A (en) | MySQL database clustering methods and its processing system | |
CN110300130B (en) | Resource scheduling method and device, electronic equipment and storage medium | |
CN106357738A (en) | Automatic arrangement method for server cluster and device as well as system thereof | |
CN109995842B (en) | Grouping method and device for distributed server cluster | |
CN107545338A (en) | Business data processing method and business data processing system | |
CN102868550B (en) | Total network flow scheduler and method for querying domain name resolution record by using total network flow scheduler | |
CN111324435A (en) | Distributed task scheduling and registering method, device and distributed task scheduling system | |
US8868756B1 (en) | Sticky routing | |
CN103596066A (en) | Method and device for data processing | |
CN105208090A (en) | Zookeeper-based Leader selection method | |
CN108873827A (en) | Production line computer system and its network setting method | |
CN113014611B (en) | Load balancing method and related equipment | |
CN106933891A (en) | Access the method for distributed data base and the device of Distributed database service | |
CN109831507A (en) | Internet of Things system, load balancing method and storage medium | |
CN106899621B (en) | A kind of scheduling system and method | |
CN112019577B (en) | Exclusive cloud storage implementation method and device, computing equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |