CN108156240B - Method and system for accessing industrial adapter to server - Google Patents

Method and system for accessing industrial adapter to server Download PDF

Info

Publication number
CN108156240B
CN108156240B CN201711423523.7A CN201711423523A CN108156240B CN 108156240 B CN108156240 B CN 108156240B CN 201711423523 A CN201711423523 A CN 201711423523A CN 108156240 B CN108156240 B CN 108156240B
Authority
CN
China
Prior art keywords
server
target
address
industrial
adapter
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
Application number
CN201711423523.7A
Other languages
Chinese (zh)
Other versions
CN108156240A (en
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.)
Shenzhen Mixliner Network Co ltd
Original Assignee
Shenzhen Mixliner Network 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 Shenzhen Mixliner Network Co ltd filed Critical Shenzhen Mixliner Network Co ltd
Priority to CN201711423523.7A priority Critical patent/CN108156240B/en
Publication of CN108156240A publication Critical patent/CN108156240A/en
Application granted granted Critical
Publication of CN108156240B publication Critical patent/CN108156240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The application provides a method and a system for accessing an industrial adapter to a server, which are used for realizing stable connection between the industrial adapter and the server and flexible configuration and efficient operation of the server. The method of the embodiment of the application can comprise the following steps: the target industrial adapter is connected with target gateway equipment according to a preset gateway IP address and sends a server IP address request, wherein the preset gateway address comprises IP addresses of at least two gateway equipment; the target gateway equipment acquires load information of each server in the server cluster, wherein the load information comprises the quantity information of the industrial adapters connected to the corresponding servers and the load stability information of the corresponding servers; the target gateway equipment determines a preferred server according to the load information of each server in the server cluster and sends the IP address of the preferred server to the target industrial adapter; the target industrial adapter accesses the preferred server according to the IP address of the preferred server.

Description

Method and system for accessing industrial adapter to server
Technical Field
The invention relates to the technical field of industrial Internet of things, in particular to a method and a system for accessing an industrial adapter to a server.
Background
The Internet of things (IoT) is an important component of new-generation information technology and is also an important development stage of the "information-oriented" era. The core and the foundation of the internet of things are still the internet, wherein an industrial adapter in the internet of things is accessed to a server through a gateway for data transmission, and the internet of things is a key link for realizing the internet of things.
At present, in the main internet of things structure at home and abroad, the industrial adapter usually accesses a specific server through a single gateway orientation. In the existing scheme, an industrial adapter is accessed to a server through a single gateway, when the gateway breaks down, the industrial adapter cannot acquire an available server address from the gateway, the industrial adapter cannot be connected with the server to upload acquired data of industrial equipment, and stable operation of the internet of things is influenced.
In summary, there is a need to provide a method and a system for accessing an industrial adapter to a server, which are stable, flexible and efficient in operation.
Disclosure of Invention
The application provides a method and a system for accessing an industrial adapter to a server, which are used for realizing stable connection between the industrial adapter and the server and flexible configuration and efficient operation of the server.
The application provides a method for accessing an industrial adapter to a server in a first aspect, and the method comprises the following steps:
the target industrial adapter is connected with target gateway equipment according to a preset gateway IP address and sends a server IP address request, wherein the preset gateway address comprises IP addresses of at least two gateway equipment;
the target gateway equipment acquires load information of each server in the server cluster, wherein the load information comprises the quantity information of the industrial adapters connected to the corresponding servers and the load stability information of the corresponding servers;
the target gateway equipment determines a preferred server according to the load information of each server in the server cluster and sends the IP address of the preferred server to the target industrial adapter;
the target industrial adapter accesses the preferred server according to the IP address of the preferred server.
With reference to the first aspect, in a first possible implementation manner of the first aspect,
the server IP address request at least comprises the equipment ID of the target industrial adapter;
before the target gateway device determines a preferred server according to the load information of each server in the server cluster, the method further includes:
the target gateway device judges whether the device ID of the target industrial adapter is matched with a preset private server list, wherein the private server list indicates the device ID of the industrial adapter which is allowed to be connected with the corresponding private server;
if the device ID of the target industrial adapter is matched with a preset private server list, the target gateway device sends the IP address of the corresponding private server to the target industrial adapter;
and if the equipment ID of the target industrial adapter is not matched with a preset private server list, the target gateway equipment determines a preferred server according to the load information of each server in the server cluster.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the determining, by the target gateway device, a preferred server according to load information of each server in the server cluster includes:
judging whether the load stability index of the target server is in a preset threshold range, and if the load stability of the target server is in the preset threshold range and the number of currently connected industrial adapters on the target server is the minimum, determining that the target server is the preferred server.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the obtaining, by the target gateway device, load information of each server in a server cluster includes:
the target gateway equipment calls a server port to inquire the quantity information of the industrial adapters currently connected with the corresponding server;
the target gateway equipment receives a fault IP address fed back by the industrial adapter, and when the industrial adapter is disconnected with the server due to faults, the corresponding industrial adapter reports the IP address of the corresponding server as the fault IP address to the target gateway equipment;
and the target gateway equipment calculates the stability index of the corresponding server according to the reported times of the server.
With reference to the first aspect, the first to third possible implementation manners of the first aspect, and in a fourth possible implementation manner of the first aspect, the accessing, by the target industrial adapter, the preferred server according to the IP address of the preferred server includes:
the target industrial adapter sends a login request to the preferred server according to the IP address of the preferred server, wherein the login request comprises login information of the target industrial adapter, and the login information at least comprises an ID, a user name and a user password;
the preferred server verifies whether the login information of the target industrial adapter is matched with the stored registration information;
and if the login information of the target industrial adapter is matched with the stored registration information, the preferred server allows the target industrial adapter to access.
A second aspect of the present application provides a system for controlling an industrial adapter to access a server, which may include:
at least two gateway devices, a target industrial adapter, a server cluster comprising at least two servers, wherein,
the target industrial adapter is used for connecting target gateway equipment according to a preset gateway IP address and sending a server IP address request, wherein the preset gateway address comprises IP addresses of at least two gateway equipment;
the target gateway equipment comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring load information of each server in a server cluster, and the load information comprises the quantity information of the industrial adapters connected to the corresponding servers and the load stability information of the corresponding servers;
the target gateway device further comprises a determining module, configured to determine a preferred server according to load information of each server in the server cluster, and send an IP address of the preferred server to the target industrial adapter, so that the target industrial adapter accesses the preferred server according to the IP address of the preferred server.
With reference to the second aspect, in a first possible implementation manner of the second aspect,
the server IP address request at least comprises the equipment ID of the target industrial adapter;
the target gateway device comprises a judging module, which is used for judging whether the device ID of the target industrial adapter is matched with a preset private server list before the target gateway device determines a preferred server according to the load information of each server in the server cluster, wherein the private server list indicates the device ID of the industrial adapter which is allowed to be connected with the corresponding private server, if the device ID of the target industrial adapter is not matched with the preset private server list, the determining module is triggered, and if the device ID of the target industrial adapter is matched with the preset private server list, a first sending module is triggered;
the first sending module is used for sending the IP address of the corresponding private server to the target industrial adapter.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the determining module includes:
the judging unit is used for judging whether the load stability index of the target server is in a preset threshold range or not;
and the determining unit is used for determining the target server as the preferred server if the load stability index of the target server is in a preset threshold range and the number of the currently connected industrial adapters on the target server is the minimum.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the obtaining module includes:
the first acquisition unit is used for calling a server port to inquire the quantity information of the industrial adapters which are currently connected with the corresponding server;
the second acquisition unit is used for receiving the fault IP address fed back by the industrial adapter, and when the industrial adapter is disconnected with the server due to faults, the corresponding industrial adapter reports the IP address of the corresponding server as the fault IP address to the target gateway equipment;
and the calculating unit is used for calculating the stability index of the corresponding server according to the reported times of the server.
With reference to the second aspect, the first to third possible implementation manners of the second aspect, and in a fourth possible implementation manner of the second aspect, the target industrial adapter includes a sending module, configured to send a login request to the preferred server according to an IP address of the preferred server, where the login request includes login information of the target industrial adapter, and the login information at least includes an ID, a user name, and a user password;
the server comprises a verification module used for verifying whether the login information of the target industrial adapter is matched with the stored login information, and if the login information of the target industrial adapter is matched with the stored login information, the preferred server allows the target industrial adapter to be accessed.
In summary, in the method for accessing the industrial adapter to the server in the embodiment of the present application, stable connection between the industrial adapter and the server and flexible configuration and efficient operation of the server are achieved, IP addresses of at least two gateway devices are preset in the industrial adapter, and the industrial adapter can select an available target gateway device to request an available server IP address, so that stability and reliability of connection are ensured.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for an industrial adapter to access a server provided in the present application;
FIG. 2 is a schematic diagram of another embodiment of a method for accessing a server by an industrial adapter provided in the present application;
FIG. 3 is a schematic diagram of one embodiment of a system for accessing a server by an industrial adapter provided herein;
FIG. 4 is a functional detailed module diagram of a target gateway device in a system of an industrial adapter access server provided in the present application;
FIG. 5 is a schematic diagram of a function refinement unit of a determination module in a system for accessing an industrial adapter to a server provided by the present application;
fig. 6 is a schematic diagram of a function refinement unit of an acquisition module in a system in which an industrial adapter accesses a server provided by the present application.
Detailed Description
The application provides a method and a system for accessing an industrial adapter to a server, which are used for realizing stable connection between the industrial adapter and the server and flexible configuration and efficient operation of the server.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
For ease of understanding, the following describes a method for accessing a server by an industrial adapter according to an embodiment.
Referring to fig. 1, a method for accessing an industrial adapter to a server according to an embodiment of the present application includes:
101. the target industrial adapter is connected with the target gateway equipment according to a preset gateway IP address and sends a server IP address request;
when the industrial adapter is used in a corresponding Internet of things, at least two or at least three default gateway IP addresses can be configured in the industrial adapter, when the industrial adapter needs to report data, the industrial adapter can be connected with one gateway according to the default gateway address, when the gateway connection is unsuccessful, the other gateways can be tried in sequence, until the connection is successful, the gateway which is successfully connected is a target gateway device, and a server IP address request can be sent after the industrial adapter is connected with the target gateway to obtain an available server IP address.
The plurality of gateway devices in the present application may be integrated into one physical device apparatus, or may be separate physical device apparatuses, which is not limited herein.
Optionally, in this application, the industrial adapter is a physical device that can be connected to the gateway device and the server in a wired manner or a wireless manner. The wired mode mainly includes: wired ethernet (RJ45 cable, optical fiber), industrial serial bus (RS485, RS232, CAN bus), wired ethernet has the main advantages of reliable data transmission and large network capacity. The industrial serial bus (RS485, RS232 and CAN bus) has the advantages of reliable data transmission and simple design. The wireless mode mainly adopts mobile data access service of mobile operators, such as: GRPS, EVDO, CDMA, etc.
102. The target gateway equipment acquires load information of each server in the server cluster;
after the target gateway device is powered on, load information of each server in the server cluster may be obtained, optionally, the load information may include information on the number of the industrial adapters connected to the corresponding server and load stability information of the corresponding server, and the specific details are not limited herein.
Specifically, the target gateway device may send a query message to the server cluster to obtain load information of each server in the server cluster, may also invoke a server port to query load information of a corresponding server, and may also obtain load information of the server in other indirect manners, for example, the target gateway device may receive a failure IP address fed back by the industrial adapter, when the industrial adapter and the server are disconnected due to a failure, the corresponding industrial adapter reports the IP address of the corresponding server as the failure IP address to the target gateway device, and the target gateway device determines the stability of the corresponding server according to the number of times that the server is reported, optionally, the more times that the server is reported, the lower the stability index of the corresponding server. The manner in which the target gateway device obtains the load information of the server is not limited herein.
103. The target gateway equipment determines a preferred server according to the load information of each server in the server cluster and sends the IP address of the preferred server to the target industrial adapter;
in practical applications, after receiving a server IP address request of an industrial adapter, a target gateway device may configure a preferred server for the corresponding industrial adapter according to a preset rule, for example, the target gateway device may configure a server with a highest stability index as the preferred server for the industrial adapter according to a rule with a priority on stability, and the target gateway device may also configure a server with a minimum load as the preferred server for the industrial adapter according to a load balancing principle, which is not limited herein.
Preferably, the target gateway device may determine whether the load stability index of the target server is within a preset threshold range, and determine that the target server is the preferred server if the load stability of the target server is within the preset threshold range and the number of currently connected industrial adapters on the target server is the minimum.
104. The target industrial adapter accesses the preferred server based on the IP address of the preferred server.
After the IP address of the preferred server is obtained, the target industrial adapter accesses the preferred server according to the IP address of the preferred server, and when the target industrial adapter is disconnected from or unsuccessfully connected to the preferred server, the target industrial adapter may report the IP address of the preferred server to the corresponding target gateway device and request a new IP address of the server again.
The method for accessing the industrial adapter to the server in the embodiment of the application realizes stable connection between the industrial adapter and the server and flexible configuration and efficient operation of the server, the IP addresses of at least two gateway devices are preset in the industrial adapter, the industrial adapter can select an available target gateway device to request the available IP address of the server, the connection stability and reliability are guaranteed, and then the target gateway device can determine a preferred server according to load information of each server in a server cluster, so that server resources of the server cluster can be flexibly configured and efficiently used.
On the basis of the embodiment shown in fig. 1, in order to further improve flexibility of server configuration and meet data security requirements of users, an industrial adapter is often required to be accessed to a private server of a user, please refer to fig. 2, in an embodiment of the present application, another embodiment of a method for accessing an industrial adapter to a server may include:
201. the target industrial adapter is connected with the target gateway equipment according to a preset gateway IP address and sends a server IP address request;
when the industrial adapter is used in a corresponding Internet of things, at least two or at least three default gateway IP addresses can be configured in the industrial adapter, when the industrial adapter needs to report data, the industrial adapter can be connected with one gateway according to the default gateway address, when the gateway connection is unsuccessful, the rest of gateway connections can be tried in sequence until the connection is successful, the gateway which is successfully connected is target gateway equipment, a server IP address request can be sent after the industrial adapter is connected with the target gateway to obtain an available server IP address, and the server IP address request at least comprises an equipment identity Identification (ID) of the target industrial adapter.
The plurality of gateway devices in the present application may be integrated into one physical device apparatus, or may be separate physical device apparatuses, which is not limited herein.
Optionally, in this application, the industrial adapter is a physical device that can be connected to the gateway device and the server in a wired manner or a wireless manner. The wired mode mainly includes: wired ethernet (RJ45 cable, optical fiber), industrial serial bus (RS485, RS232, CAN bus), wired ethernet has the main advantages of reliable data transmission and large network capacity. The industrial serial bus (RS485, RS232 and CAN bus) has the advantages of reliable data transmission and simple design. The wireless mode mainly adopts mobile data access service of mobile operators, such as: GRPS, EVDO, CDMA, etc.
202. The target gateway equipment acquires load information of each server in the server cluster;
after the target gateway device is powered on, load information of each server in the server cluster may be obtained, optionally, the load information may include information on the number of the industrial adapters connected to the corresponding server and load stability information of the corresponding server, and the specific details are not limited herein.
Specifically, the target gateway device may send a query message to the server cluster to obtain load information of each server in the server cluster, may also invoke a server port to query load information of a corresponding server, and may also obtain load information of the server in other indirect manners, for example, the target gateway device may receive a failure IP address fed back by the industrial adapter, when the industrial adapter and the server are disconnected due to a failure, the corresponding industrial adapter reports the IP address of the corresponding server as the failure IP address to the target gateway device, and the target gateway device determines the stability of the corresponding server according to the number of times that the server is reported, optionally, the more times that the server is reported, the lower the stability index of the corresponding server. The manner in which the target gateway device obtains the load information of the server is not limited herein.
203. The target gateway equipment judges whether the equipment ID of the target industrial adapter is matched with a preset private server list or not;
in order to meet the requirement of a user on data security, the data of the target industrial adapter may need to be transmitted to a private server or a private cloud of the user, and in order to flexibly configure the server, a private server list preset in the gateway device is needed, wherein the private server list indicates device IDs of industrial adapters which are allowed to be connected with the corresponding private server. After receiving the server IP address request sent by the industrial adapter, the target gateway device determines whether the device ID of the target industrial adapter matches the preset private server list, if yes, step 204 is executed, and if no, step 205 is executed.
204. If the equipment ID of the target industrial adapter is matched with a preset private server list, the target gateway equipment sends the IP address of the corresponding private server to the target industrial adapter;
and if the equipment ID of the target industrial adapter is matched with the preset private server list, the target gateway equipment sends the IP address of the corresponding private server to the target industrial adapter, so that the target industrial adapter is preferentially connected with the corresponding private server. Optionally, step 205 is performed when the target industrial adapter fails to connect with the corresponding private server.
205. The target gateway equipment determines a preferred server according to the load information of each server in the server cluster and sends the IP address of the preferred server to the target industrial adapter;
in practical applications, after receiving a server IP address request of an industrial adapter, a target gateway device may configure a preferred server for the corresponding industrial adapter according to a preset rule, for example, the target gateway device may configure a server with a highest stability index as the preferred server for the industrial adapter according to a rule with a priority on stability, and the target gateway device may also configure a server with a minimum load as the preferred server for the industrial adapter according to a load balancing principle, which is not limited herein.
Preferably, the target gateway device may determine whether the load stability index of the target server is within a preset threshold range, and determine that the target server is the preferred server if the load stability of the target server is within the preset threshold range and the number of currently connected industrial adapters on the target server is the minimum.
206. The target industrial adapter accesses the preferred server based on the IP address of the preferred server.
After the IP address of the preferred server is obtained, the target industrial adapter accesses the preferred server according to the IP address of the preferred server, and when the target industrial adapter is disconnected from or unsuccessfully connected to the preferred server, the target industrial adapter may report the IP address of the preferred server to the corresponding target gateway device and request a new IP address of the server again.
The specific target industrial adapter accesses the preferred server according to the IP address of the preferred server, and comprises the following steps:
the target industrial adapter sends a login request to the preferred server according to the IP address of the preferred server, wherein the login request comprises login information of the target industrial adapter, and the login information at least comprises an ID, a user name and a user password;
the preferred server verifies whether the login information of the target industrial adapter is matched with the stored login information;
if the login information of the target industrial adapter matches the stored login information, the preferred server allows the target industrial adapter to access.
The method for accessing the industrial adapter to the server in the embodiment of the application realizes stable connection between the industrial adapter and the server and flexible configuration and efficient operation of the server, the IP addresses of at least two gateway devices are preset in the industrial adapter, the industrial adapter can select an available target gateway device to request the available IP address of the server, the connection stability and reliability are guaranteed, and then the target gateway device can determine a preferred server according to load information of each server in a server cluster, so that server resources of the server cluster can be flexibly configured and efficiently used.
Secondly, the gateway device in the application can flexibly set a private server list according to the requirements of the user, the private server list indicates the device ID of the industrial adapter which is allowed to be connected with the corresponding private server, so that the data on the corresponding industrial adapter is transmitted to the corresponding private server, the personalized requirements of the user are met, and the safety of the data is guaranteed.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The above embodiment describes a method for accessing a server by an industrial adapter in the present application, and a system for accessing a server by an industrial adapter in the present application is described below with reference to fig. 3 and 4, where an embodiment of a system for accessing a server by an industrial adapter in the present application may include:
at least two gateway devices 301, a target industrial adapter 302, a server cluster 303, the server cluster comprising at least two servers 3031, wherein,
the target industrial adapter 302 is configured to connect the target gateway device 301 according to a preset gateway IP address, and send a server IP address request, where the preset gateway address includes IP addresses of at least two gateway devices 301;
the target gateway device 301 includes an obtaining module 3011, configured to obtain load information of each server 3031 in the server cluster 303, where the load information includes information about the number of industrial adapters connected to the corresponding server and load stability information of the corresponding server;
the target gateway device 301 further comprises a determining module 3012, configured to determine a preferred server according to the load information of each server 3031 in the server cluster 303, and send the IP address of the preferred server to the target industrial adapter, so that the target industrial adapter 302 accesses the preferred server according to the IP address of the preferred server.
It is understood that the number of servers and the number of gateway devices in the server cluster shown in fig. 3 are only exemplary, and in practical applications, the number of servers and the number of gateway devices may be reasonably set according to the needs of users, and a plurality of gateway devices may be integrated into one physical device, which is not limited herein.
Optionally, as a possible embodiment, please refer to fig. 4, in the present application, the IP address request of the server at least includes the device ID of the target industrial adapter;
the target gateway device 301 includes a determining module 3013, configured to determine, before the target gateway device 301 determines a preferred server according to load information of each server in the server cluster, whether the device ID of the target industrial adapter 302 matches a preset private server list, where the private server list indicates a device ID of an industrial adapter that is allowed to connect to a corresponding private server, if the device ID of the target industrial adapter 302 does not match the preset private server list, the determining module 3012 is triggered, and if the device ID of the target industrial adapter matches the preset private server list, the first sending module 3014 is triggered;
a first sending module 3014, configured to send the IP address of the corresponding private server to the target industrial adapter 302.
Alternatively, referring to fig. 5, in a possible embodiment, in the present application, the determining module 3012 includes:
a judging unit 30121, configured to judge whether the load stability index of the target server is within a preset threshold range;
the determining unit 30122 determines that the target server is the preferred server if the load stability index of the target server is within the preset threshold range and the number of currently connected industrial adapters on the target server is the minimum.
Optionally, referring to fig. 6 as a possible embodiment, in the present application, the obtaining module 3011 includes:
a first obtaining unit 30111, configured to invoke a server port to query information about the number of industrial adapters currently connected to a corresponding server;
a second obtaining unit 30112, configured to receive a failure IP address fed back by the industrial adapter, and when the industrial adapter and the server are disconnected due to a failure, the corresponding industrial adapter reports the IP address of the corresponding server as the failure IP address to the target gateway device;
the calculating unit 30113 is configured to calculate a stability index of the corresponding server according to the number of times that the server is reported.
Optionally, as a possible embodiment, in the present application, the target industrial adapter 302 further includes a sending module 3021, configured to send a login request to the preferred server according to the IP address of the preferred server, where the login request includes login information of the target industrial adapter, and the login information at least includes an ID, a user name, and a user password;
the server 3031 includes a verification module 30311 for verifying whether the login information of the target industrial adapter matches the stored login information, and if the login information of the target industrial adapter matches the stored login information, the server is preferably allowed to access the target industrial adapter.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. 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.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should 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 the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (6)

1. A method of controlling access of an industrial adapter to a server, comprising:
the target industrial adapter is connected with target gateway equipment according to a preset gateway IP address and sends a server IP address request, wherein the preset gateway IP address comprises IP addresses of at least two gateway equipment;
the target gateway device obtains load information of each server in the server cluster, where the load information includes information on the number of industrial adapters connected to the corresponding server and information on load stability of the corresponding server, and the target gateway device obtains the load information of each server in the server cluster, including: the target gateway device calls a server port to inquire the quantity information of the industrial adapters currently connected with the corresponding server, receives the fault IP address fed back by the industrial adapters, when the industrial adapters and the server are disconnected due to faults, the corresponding industrial adapters report the IP address of the corresponding server as the fault IP address to the target gateway device, and the target gateway device calculates the stability index of the corresponding server according to the reported times of the server;
judging whether the load stability index of a target server is in a preset threshold range or not, if the load stability of the target server is in the preset threshold range and the number of currently connected industrial adapters on the target server is the minimum, determining that the target server is a preferred server, and sending the IP address of the preferred server to the target industrial adapter;
the target industrial adapter accesses the preferred server according to the IP address of the preferred server.
2. The method of claim 1,
the server IP address request at least comprises the equipment ID of the target industrial adapter;
before the target gateway device determines a preferred server according to the load information of each server in the server cluster, the method further includes:
the target gateway device judges whether the device ID of the target industrial adapter is matched with a preset private server list, wherein the private server list indicates the device ID of the industrial adapter which is allowed to be connected with the corresponding private server;
if the device ID of the target industrial adapter is matched with a preset private server list, the target gateway device sends the IP address of the corresponding private server to the target industrial adapter;
and if the equipment ID of the target industrial adapter is not matched with a preset private server list, the target gateway equipment determines a preferred server according to the load information of each server in the server cluster.
3. The method of any one of claims 1 to 2, wherein the target industrial adapter accessing the preferred server according to the IP address of the preferred server comprises:
the target industrial adapter sends a login request to the preferred server according to the IP address of the preferred server, wherein the login request comprises login information of the target industrial adapter, and the login information at least comprises an ID, a user name and a user password;
the preferred server verifies whether the login information of the target industrial adapter is matched with the stored registration information;
and if the login information of the target industrial adapter is matched with the stored registration information, the preferred server allows the target industrial adapter to access.
4. A system for controlling access of an industrial adapter to a server, comprising:
at least two gateway devices, a target industrial adapter, a server cluster comprising at least two servers, wherein,
the target industrial adapter is used for connecting target gateway equipment according to a preset gateway IP address and sending a server IP address request, wherein the preset gateway address comprises IP addresses of at least two gateway equipment;
the target gateway device includes an obtaining module, configured to obtain load information of each server in a server cluster, where the load information includes information on the number of industrial adapters connected to the corresponding server and load stability information of the corresponding server, and the obtaining module includes: the first acquisition unit is used for calling a server port to inquire the quantity information of the industrial adapters which are currently connected with the corresponding server; the second acquisition unit is used for receiving the fault IP address fed back by the industrial adapter, and when the industrial adapter is disconnected with the server due to faults, the corresponding industrial adapter reports the IP address of the corresponding server as the fault IP address to the target gateway equipment; the computing unit is used for computing the stability index of the corresponding server according to the reported times of the server;
the target gateway device further comprises a determining module, configured to determine a preferred server according to load information of each server in the server cluster, and send an IP address of the preferred server to the target industrial adapter, so that the target industrial adapter accesses the preferred server according to the IP address of the preferred server;
the determining module comprises:
the judging unit is used for judging whether the load stability index of the target server is in a preset threshold range or not;
and the determining unit is used for determining the target server as the preferred server if the load stability index of the target server is in a preset threshold range and the number of the currently connected industrial adapters on the target server is the minimum.
5. The system of claim 4,
the server IP address request at least comprises the equipment ID of the target industrial adapter;
the target gateway device comprises a judging module, which is used for judging whether the device ID of the target industrial adapter is matched with a preset private server list before the target gateway device determines a preferred server according to the load information of each server in the server cluster, wherein the private server list indicates the device ID of the industrial adapter which is allowed to be connected with the corresponding private server, if the device ID of the target industrial adapter is not matched with the preset private server list, the determining module is triggered, and if the device ID of the target industrial adapter is matched with the preset private server list, a first sending module is triggered;
the first sending module is used for sending the IP address of the corresponding private server to the target industrial adapter.
6. The system of claim 5,
the target industrial adapter comprises a sending module, which is used for sending a login request to the preferred server according to the IP address of the preferred server, wherein the login request comprises login information of the target industrial adapter, and the login information at least comprises an ID, a user name and a user password;
the server comprises a verification module used for verifying whether the login information of the target industrial adapter is matched with the stored login information, and if the login information of the target industrial adapter is matched with the stored login information, the preferred server allows the target industrial adapter to be accessed.
CN201711423523.7A 2017-12-25 2017-12-25 Method and system for accessing industrial adapter to server Active CN108156240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711423523.7A CN108156240B (en) 2017-12-25 2017-12-25 Method and system for accessing industrial adapter to server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711423523.7A CN108156240B (en) 2017-12-25 2017-12-25 Method and system for accessing industrial adapter to server

Publications (2)

Publication Number Publication Date
CN108156240A CN108156240A (en) 2018-06-12
CN108156240B true CN108156240B (en) 2021-07-30

Family

ID=62462134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711423523.7A Active CN108156240B (en) 2017-12-25 2017-12-25 Method and system for accessing industrial adapter to server

Country Status (1)

Country Link
CN (1) CN108156240B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924879B (en) * 2018-06-22 2021-07-30 北京格瑞空间科技有限公司 Load balancing method for wireless Internet of things
CN109168188B (en) * 2018-11-09 2021-06-22 四川欧莱德精密电子有限公司 Wireless gateway allocation method, wireless gateway, wireless access module and Internet of things equipment
CN109257239A (en) * 2018-11-22 2019-01-22 福建福诺移动通信技术有限公司 One kind being based on TCP High Availabitity things-internet gateway data interaction system and method
CN112565334B (en) * 2020-11-04 2022-10-25 深圳市宏电技术股份有限公司 Access method and device of Internet of things equipment and MQTT gateway
CN112104756B (en) * 2020-11-20 2021-03-19 翱捷科技(深圳)有限公司 Internet of things data reporting method and system
CN112615909B (en) * 2020-12-10 2022-12-16 安徽鸿程光电有限公司 Method for storing data in cascade storage server cluster and related equipment
CN114244888A (en) * 2021-12-10 2022-03-25 珠海格力电器股份有限公司 Method and device for connecting equipment and server and connecting system
CN116055542B (en) * 2022-12-29 2024-03-15 南京先进计算产业发展有限公司 Network adapter and high-performance computing cluster server communication connection method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683252A (en) * 2013-11-26 2015-06-03 北京畅游天下网络技术有限公司 Gateway connection method and system applied to game network
CN105657009A (en) * 2015-12-30 2016-06-08 浪潮(北京)电子信息产业有限公司 Object gateway load balancing system and method, and cross-region object gateway storage system
CN105978950A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Server resource distribution method, apparatus and system thereof
CN106101171A (en) * 2016-05-24 2016-11-09 中国联合网络通信集团有限公司 Server method of attachment and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027463B (en) * 2016-01-21 2019-10-01 李明 A kind of method of data transmission
CN106027476B (en) * 2016-01-21 2019-06-28 李明 A kind of identity card cloud Verification System and card-reading system
CN106250256B (en) * 2016-07-27 2019-12-31 苏州浪潮智能科技有限公司 Server fault recovery method and device
CN106487936A (en) * 2016-12-29 2017-03-08 深圳市优必选科技有限公司 Data transmission method and equipment, distributed memory system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683252A (en) * 2013-11-26 2015-06-03 北京畅游天下网络技术有限公司 Gateway connection method and system applied to game network
CN105657009A (en) * 2015-12-30 2016-06-08 浪潮(北京)电子信息产业有限公司 Object gateway load balancing system and method, and cross-region object gateway storage system
CN105978950A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Server resource distribution method, apparatus and system thereof
CN106101171A (en) * 2016-05-24 2016-11-09 中国联合网络通信集团有限公司 Server method of attachment and device

Also Published As

Publication number Publication date
CN108156240A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN108156240B (en) Method and system for accessing industrial adapter to server
CN107995215B (en) Control method and device of intelligent household equipment and cloud platform server
US8826402B2 (en) Management of an instant message session
US9369401B2 (en) Method, server and computer storage medium for logging in
US10171997B2 (en) Method and apparatus for interconnection between terminal device and gateway device
US20180041893A1 (en) Method and system of multi-terminal mapping to a virtual sim card
CN104144098A (en) Information pushing method and system and pushing server equipment
CN113015165A (en) Internet of things platform device access method, device and system
CN106656985B (en) Backup account login method, device and system
CN103327051A (en) Long-distance desktop management system and method
JP2023165679A (en) Device for remotely managing apparatuses, method, and program therefor
CN105392137A (en) Household WIFI embezzlement preventing method, wireless router and terminal equipment
CN105681258A (en) Session method and session device based on third-party server
CN103581040A (en) Server distributing device and server distributing method
CN114707976A (en) Payment method, user terminal, device, equipment, system and medium
CN112272169B (en) User identity determining method and device
CN111182536A (en) SIM card state detection method, device, network equipment and storage medium
KR101506223B1 (en) Automatic Reconnection System For Virtualization Service
CN112039882B (en) Message transmission processing method, system, device and storage medium
CN112019358A (en) Network configuration method, device, equipment and system
CN113746909A (en) Network connection method, device, electronic equipment and computer readable storage medium
CN110022310B (en) Authorization method and device based on cloud computing open network operating system
CN110401952B (en) Authentication method and related equipment
CN110891053A (en) Method for establishing communication connection between android APP and operating system based on local area network
CN112689284B (en) Wireless network password modification method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant