CN115086422B - Server access method, device, storage medium and electronic equipment - Google Patents

Server access method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115086422B
CN115086422B CN202210784973.3A CN202210784973A CN115086422B CN 115086422 B CN115086422 B CN 115086422B CN 202210784973 A CN202210784973 A CN 202210784973A CN 115086422 B CN115086422 B CN 115086422B
Authority
CN
China
Prior art keywords
server
target
areas
network address
client
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
CN202210784973.3A
Other languages
Chinese (zh)
Other versions
CN115086422A (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210784973.3A priority Critical patent/CN115086422B/en
Publication of CN115086422A publication Critical patent/CN115086422A/en
Application granted granted Critical
Publication of CN115086422B publication Critical patent/CN115086422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a server access method, a server access device, a storage medium and electronic equipment. The method comprises the following steps: acquiring network addresses and port numbers of the intermediate transfer machines in target areas in a plurality of areas, wherein the target areas are areas of the plurality of areas, and the server is an area of an intranet server; registering the network address and port number locally at the central server; and returning the target network address segment to the first server under the condition that the first server in the first area in the plurality of areas requests to access the target server in the target area, so that the first server accesses the target server according to the target network address segment, wherein the first area is any one area in the plurality of areas, and the target network address segment is an address segment determined according to the network address and the port number. The invention solves the technical problem of inconvenient operation and maintenance management of servers in different areas.

Description

Server access method, device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to a server access method, a server access device, a storage medium, and an electronic device.
Background
In the prior art, a plurality of servers are deployed nationwide, and the network environments are not communicated, so that the IP addresses of the servers are different.
At present, most schemes carry out remote maintenance by recording the IP addresses and the user name passwords of servers in all places, however, the method increases the workload of maintenance work of the servers of operation and maintenance managers, and further causes inconvenience in management of the servers.
Disclosure of Invention
The embodiment of the invention provides a server access method, a device, a storage medium and electronic equipment, which are used for at least solving the technical problem of inconvenient operation and maintenance management of servers in different areas.
According to an aspect of an embodiment of the present invention, there is provided a server access method including: acquiring network addresses and port numbers of the intermediate transfer machines in target areas in a plurality of areas, wherein the target areas are areas of the plurality of areas, and the server is an intranet server; registering the network address and the port number locally in a central server; and returning a target network address field to the first server when a first server in a first area of the plurality of areas requests access to the target server in the target area, so that the first server accesses the target server according to the target network address field, wherein the first area is any area of the plurality of areas, and the target network address field is an address field determined according to the network address and the port number.
According to another aspect of an embodiment of the present invention, there is provided a server access apparatus including: the first acquisition module is used for acquiring network addresses and port numbers of the transverters in target areas in a plurality of areas, wherein the target areas are areas of the plurality of areas, and the server is an intranet server; the registration module is used for registering the network address and the port number in the local of the central server; and a first sending module, configured to return a target network address segment to a first server in the target area when the first server in the first area requests access to the target server in the first area, so that the first server accesses the target server according to the target network address segment, where the first area is any one of the areas, and the target network address segment is an address segment determined according to the network address and the port number.
As an alternative example, the above apparatus further includes: a second obtaining module, configured to obtain, when receiving a login request from a client to first login to any one of the second servers in any one of the plurality of areas, the login request from the central server; the verification module is used for verifying the client information in the login request; and the second sending module is used for returning a login instruction to the client to enable the client to log in the second server when the client information verification is passed.
As an alternative example, the above apparatus further includes: and a third sending module configured to return the login instruction to the client to cause the client to login to a third server, when receiving a login request that the client login again to any third server in any one of the plurality of areas, when the client information passes the verification, wherein the third server is a server different from the second server.
As an alternative example, the above apparatus further includes: the device comprises an adjustment module, a storage module and a control module, wherein the adjustment module is used for keeping the first three sections of character strings of the network address unchanged after acquiring the network address and the port number of a transshipment machine in a target area in a plurality of areas, and adjusting the fourth section of character string of the network address according to the port number, wherein the network address consists of four sections of character strings; the recording module is used for adjusting the fourth-segment character string once each time, and taking the adjusted four-segment character string as a first address; and the determining module is used for taking the obtained plurality of first addresses as addresses in the target network address field after adjusting the fourth segment character string for a plurality of times.
As an alternative example, the above apparatus further includes: the first detection module is used for detecting the connectivity between the central server and each transit machine after registering the network address and the port number in the local of the central server; and the first alarm module is used for sending alarm information to the target account number under the condition that the central server is not communicated with the target transfer machine in the transfer machines.
As an alternative example, the above apparatus further includes: the second detection module is used for detecting the communication rate between the central server and the first transfer machine when the central server is communicated with the first transfer machine in the transfer machines; and the second alarm module is used for sending alarm information to the target account under the condition that the communication rate is lower than a first threshold value.
As an alternative example, the above apparatus further includes: the configuration module is used for configuring a transfer machine for the target area; the control module is used for controlling the transfer machine to call the unoccupied port of the transfer machine to construct a connection service; and the connection module is used for establishing a connection relation between the connection service and the transfer machine.
According to still another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program when executed by a processor performs the above-described server access method.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to execute the server access method described above by the computer program.
In the embodiment of the invention, the network address and the port number of the transverter in the target area in a plurality of areas are acquired, wherein the target area is an area of an intranet server in the plurality of areas; registering the network address and the port number locally in a central server; and returning a target network address segment to the first server when the first server in the first area requests to access the target server in the target area, so that the first server accesses the target server according to the target network address segment, wherein the first area is any one area in the areas, the target network address segment is an address segment determined according to the network address and the port number, and the method solves the technical problem that the operation and maintenance management of the servers in different areas is inconvenient because the server in each area is an intranet server, the central server acquires and registers the network address and the port number of the relay, and the server in different areas can access each other through the relay server and the relay, thereby realizing the intercommunication of the servers in different areas, further realizing the effect of the operation and maintenance management of the servers in all areas through logging in the central server.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of an alternative server access method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an alternative server access method deployment relay in accordance with an embodiment of the present invention;
FIG. 3 is a regional server schematic diagram of an alternative server access method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a central node connecting servers of various areas of an alternative server access method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative server access device according to an embodiment of the invention;
fig. 6 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of an embodiment of the present invention, there is provided a server access method, optionally, as shown in fig. 1, the method includes:
s102, acquiring network addresses and port numbers of the intermediate transfer machines in target areas in a plurality of areas, wherein the target areas are areas of the plurality of areas, and the server is an area of an intranet server;
s104, registering the network address and the port number in the local of the central server;
And S106, returning the target network address segment to the first server under the condition that the first server in the first area in the plurality of areas requests to access the target server in the target area, so that the first server accesses the target server according to the target network address segment, wherein the first area is any one area in the plurality of areas, and the target network address segment is an address segment determined according to the network address and the port number.
Alternatively, in this embodiment, the plurality of areas may be physically divided areas or may be network segment divided areas. The network segment is different for each of the plurality of regions. The servers in each zone are in the same network segment.
In this embodiment, there may be a target area in the plurality of areas, and a server of the target area is an intranet server. For example, there are a total of 3 zones, each with 3 servers, where 3 servers in zones 1 and 2 are extranet servers and 3 servers in zone 3 are intranet servers. If the server in the 1 st area or the 2 nd area is to access the server in the 3 rd area, the 3 rd area may be configured with a transit machine first, and then the network address and the port number of the transit machine are sent to the central server. The central server receives the network address and port number of the transit machine and registers the network address and port number of the transit machine. Then, the server in the 1 st area or the 2 nd area accesses the server in the 3 rd area, and can access the server through the center server. The central server may return a target network address segment to the server in the 1 st or 2 nd zone according to the network address and port number provided by the relay in the 3 rd zone, and the server in the 1 st or 2 nd zone uses the target network address segment to access the intranet server in the 3 rd zone.
According to the embodiment, for the server of each of the plurality of areas, if the server is an intranet server, the central server is configured to transfer the servers, and the central server acquires and registers the network address and the port number of the transfer server, so that the access of the servers among the different areas can be realized through the transfer server and the transfer server, and the purpose of improving the access efficiency among the servers in the different areas is realized.
As an alternative example, the method further includes:
Under the condition that a login request of a client side for logging in any one of a plurality of areas for the first time is received, acquiring the login request by a central server;
verifying the client information in the login request;
And returning a login instruction to the client under the condition that the client information passes the verification, so that the client logs in the second server.
Optionally, in this embodiment, for a second server in any one of the multiple areas, when the client accesses the second server, a login request may be sent to the second server, where the login request may carry a login account number and a password of the client. The second server may send the login request to the central server, or the central server may actively intercept the login request of the client for logging in the second server, and then the central server may verify the login account and the password in the login request of the client, and if the verification is passed, may return a login instruction to the client, where the client may log in the second server. In addition, if the verification is passed, the client may log into the central server, and communicate with the second server through the central server.
As an alternative example, the method further includes:
when the client information passes the verification, a login instruction is returned to the client to enable the client to login to a third server when a login request that the client login to any third server in any one of a plurality of areas again is received, wherein the third server is a server different from the second server.
Optionally, in this embodiment, for any one of the second servers in any one of the areas, a login request of the client may be received. For example, the client requests to log onto the second server to modify the configuration on the second server. Then, in this embodiment, the second server or the client may send a login request to the central server, and the central server performs login verification on the client. If the authentication is passed, the client is allowed to log on to the second server, or the client logs on to a central server, through which the client communicates with the second server, without logging on to the second server by the client.
After the verification of the client is passed, if the client also accesses a third server other than the second server, a login request may be sent to the third server, the third server may send the login request to the center server, or the center server may actively intercept the login request of the client to login to the third server, and since the center server has verified the login account number and the password of the client and passed the verification, a login instruction may be returned from the center server to the client, logged into the third server by the client, communicated with the third server, or the client logs into the center server, communicated with the third server through the center server.
In this embodiment, if the client logs into the central server, the client may communicate with the servers in each area through the central server, without logging into each server. Or the client can log in any one of the second servers in each area, and the center server performs verification during log-in. And after verification, when the client logs in any one third server in each area again, repeated verification is not needed.
For example, in the case of 3 areas, 3 servers for each area, when the client 1 requests to log in to the server 1 of the area 1, a log-in request is transmitted to the center server, and authentication is performed by the center server. After passing the verification, the client 1 logs in to the central server. After the client 1 logs in the central server, any one of the servers in the area 1-3 can be accessed without repeated verification.
Therefore, in this embodiment, the verification module may be configured in a central server, and after the central server completes verification, the client may access all servers.
As an optional example, after acquiring the network address and the port number of the transit machine in the target area in the plurality of areas, the method further includes:
Keeping the first three character strings of the network address unchanged, and adjusting the fourth character string of the network address according to the port number, wherein the network address consists of the four character strings;
The fourth character string is adjusted once, and the adjusted fourth character string is used as a first address;
and after the fourth segment character string is adjusted for a plurality of times, taking the obtained plurality of first addresses as addresses in the target network address segment.
Optionally, in this embodiment, when the central server returns the target network address segment to the first server, the network segment of the target server to be accessed by the first server may be determined, and the network segment of the target server is returned to the first server as the target network address segment. The network address segments may be in a four-segment format, each segment being split by "". For example, 192.168.1.1. When determining the target network address field, the address field of the area where the target server to be accessed by the first server is located may be determined, for example, 192.167.1.A-192.168.1.B, where a and b are positive integers, b > a, and 192.167.1.A-192.168.1.B is determined as the target network address field. Or in this embodiment, the first three segments of the target address may be kept unchanged, and the digits of the fourth segment may be configured to obtain the target network address segment. For example, the target address is 192.168.1.1, the first three character strings 192.168.1 remain unchanged, and the fourth character string is adjusted, for example, when the fourth character string is adjusted from 1 to 2, the fourth character string can be adjusted between 0 and 255. Each time an adjustment is made, a first address is obtained. In the adjustment, the port number may be adjusted. According to the port number, the fourth segment string is adjusted to an address between 0 and 255, which is adapted to the port number. For example, when the target address 192.168.1.1 is adjusted to 192.168.1.125, 192.168.1.125 is a first address, and when the target address is adjusted again, 192.168.1.125 is adjusted to 192.168.1.2, and 192.168.1.2 is also a first address. And obtaining a plurality of first addresses through multiple times of adjustment. The plurality of first addresses are taken as addresses in a target network address segment.
As an alternative example, after acquiring and registering the network address and the port number of the transit machine, the method further includes:
Detecting connectivity of the central server and each transit machine;
And sending alarm information to the target account number under the condition that the central server is not communicated with the target transit in the transit.
Alternatively, in this embodiment, for each of the plurality of areas of servers, the connectivity of the central server to the relay may be determined. If the area is an area of an extranet server and does not contain a transit, connectivity of the central server to each of the servers of the area may be determined. If the central server is a connected transfer machine, the alarm information is sent to the target account.
As an alternative example, the method further includes:
Detecting the communication rate between the central server and the first transfer machine under the condition that the central server is communicated with the first transfer machine in the transfer machines;
and sending alarm information to the target account under the condition that the communication rate is lower than a first threshold value.
Optionally, in this embodiment, if the central server is connected to the relay machine, for example, the central server is connected to the first relay machine, the connection rate between the central server and the first relay machine may be detected, and if the connection rate is lower, the target account is alerted if the connection rate is lower than the first threshold. In this embodiment, when calculating the connection rate, the connection rate from the central server to the relay may be directly detected for the area including the relay. For areas that do not include a transit, such as areas where the servers are outside network servers, the connection rate of each connected server may be calculated and then averaged. For example, one area has 3 servers, two servers are connected, one server is not connected, the connection rates of the two servers are summed, and then the average connection rate of the area is obtained by comparing the sum with 3. If the tie-down communication rate is less than the first threshold, the target account number is alerted.
As an alternative example, the method further includes:
Configuring a transfer machine for a target area;
The control transfer machine calls the unoccupied port of the transfer machine to construct a connection service;
And establishing a connection relation between the connection service and the transfer machine.
Optionally, in this embodiment, for each target area configured with the relay, the relay invokes its own port to construct a connection service, so as to establish a connection relationship with the central server. If the area is the area containing the external network server, the connection relation can be directly established between the server and the central server.
In this embodiment, the central server may be a cloud fort machine, which is responsible for communicating with the servers in each area to establish a connection between the servers in each area. The intranet server may be a virtual private network (Virtual Private Network, VPN) server. Multiple intranet servers in one area may configure one repeater. The relay may be a relay server. In this embodiment, the process solidification and the interface pre-embedding encapsulation can be performed in the cloud fort machine, the transfer interfaces in each cloud environment are standardized, and the cloud fort machine is flexibly managed under the condition of not changing through flexible configuration.
Fig. 2 is a schematic diagram of the deployment relay of the present embodiment. The servers in each area are intranet servers. Transferring machines in the server deployment of each place, automatically distributing unoccupied ports according to the use condition of the local ports to construct an HTTP network service based on the local, and connecting the local address and the ports to a server for registration. As in fig. 2, each zone is configured with a repeater that is registered with the central node. After the central service receives the network address and port number sent by the transfer machine, the service configuration is carried out, and then the point-to-point network is opened.
Fig. 3 is a schematic view of the area server of the present embodiment. The area a includes a plurality of servers. The plurality of servers are intranet servers or extranet servers.
In this embodiment, after the central server and the transfer machine are connected, the central server detects connectivity and access rate with each transfer machine. After the central server is communicated with the network of each transfer machine, the central server can uniformly manage the servers in each place, and upgrade and maintenance of the service on the servers are performed through a uniform authentication mode, so that the current situation of independent connection is changed. Fig. 4 is a schematic diagram of a server of the present embodiment connected to each area through a central node.
Through the embodiment, the unified transfer machine is arranged, so that multiple server request authentications are reduced, and the maintenance cost of the server is reduced; the method and the system effectively solve the problem of independent login management of all servers. And the management efficiency of the server is improved, and the authentication is reduced.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to another aspect of the embodiment of the present application, there is also provided a server access device, as shown in fig. 5, including:
A first obtaining module 502, configured to obtain a network address and a port number of a transit machine in a target area in a plurality of areas, where the target area is an area of an intranet server;
A registration module 504, configured to register the network address and the port number locally on the central server;
the first sending module 506 is configured to return, when a first server in a first area of the plurality of areas requests to access a target server in a target area, a target network address segment to the first server, so that the first server accesses the target server according to the target network address segment, where the first area is any one area of the plurality of areas, and the target network address segment is an address segment determined according to a network address and a port number.
Alternatively, in this embodiment, the plurality of areas may be physically divided areas or may be network segment divided areas. The network segment is different for each of the plurality of regions. The servers in each zone are in the same network segment.
In this embodiment, there may be a target area in the plurality of areas, and a server of the target area is an intranet server. For example, there are a total of 3 zones, each with 3 servers, where 3 servers in zones 1 and 2 are extranet servers and 3 servers in zone 3 are intranet servers. If the server in the 1 st area or the 2 nd area is to access the server in the 3 rd area, the 3 rd area may be configured with a transit machine first, and then the network address and the port number of the transit machine are sent to the central server. The central server receives the network address and port number of the transit machine and registers the network address and port number of the transit machine. Then, the server in the 1 st area or the 2 nd area accesses the server in the 3 rd area, and can access the server through the center server. The central server may return a target network address segment to the server in the 1 st or 2 nd zone according to the network address and port number provided by the relay in the 3 rd zone, and the server in the 1 st or 2 nd zone uses the target network address segment to access the intranet server in the 3 rd zone.
According to the embodiment, for the server of each of the plurality of areas, if the server is an intranet server, the central server is configured to transfer the servers, and the central server acquires and registers the network address and the port number of the transfer server, so that the access of the servers among the different areas can be realized through the transfer server and the transfer server, and the purpose of improving the access efficiency among the servers in the different areas is realized.
As an alternative example, the above apparatus further includes:
the second acquisition module is used for acquiring a login request by the central server under the condition that the login request of any second server in any one of a plurality of areas is received by the client for the first time;
the verification module is used for verifying the client information in the login request;
and the second sending module is used for returning a login instruction to the client under the condition that the information of the client passes the verification so as to enable the client to log in the second server.
Optionally, in this embodiment, for a second server in any one of the multiple areas, when the client accesses the second server, a login request may be sent to the second server, where the login request may carry a login account number and a password of the client. The second server may send the login request to the central server, or the central server may actively intercept the login request of the client for logging in the second server, and then the central server may verify the login account and the password in the login request of the client, and if the verification is passed, may return a login instruction to the client, where the client may log in the second server. In addition, if the verification is passed, the client may log into the central server, and communicate with the second server through the central server.
As an alternative example, the above apparatus further includes:
And the third sending module is used for returning a login instruction to the client to enable the client to login to a third server when receiving a login request that the client login to any third server in any one of the plurality of areas again when the client information verification passes, wherein the third server is a server different from the second server.
Optionally, in this embodiment, for any one of the second servers in any one of the areas, a login request of the client may be received. For example, the client requests to log onto the second server to modify the configuration on the second server. Then, in this embodiment, the second server or the client may send a login request to the central server, and the central server performs login verification on the client. If the authentication is passed, the client is allowed to log on to the second server, or the client logs on to a central server, through which the client communicates with the second server, without logging on to the second server by the client.
After the verification of the client is passed, if the client also accesses a third server other than the second server, a login request may be sent to the third server, the third server may send the login request to the center server, or the center server may actively intercept the login request of the client to login to the third server, and since the center server has verified the login account number and the password of the client and passed the verification, a login instruction may be returned from the center server to the client, logged into the third server by the client, communicated with the third server, or the client logs into the center server, communicated with the third server through the center server.
In this embodiment, if the client logs into the central server, the client may communicate with the servers in each area through the central server, without logging into each server. Or the client can log in any one of the second servers in each area, and the center server performs verification during log-in. And after verification, when the client logs in any one third server in each area again, repeated verification is not needed.
For example, in the case of 3 areas, 3 servers for each area, when the client 1 requests to log in to the server 1 of the area 1, a log-in request is transmitted to the center server, and authentication is performed by the center server. After passing the verification, the client 1 logs in to the central server. After the client 1 logs in the central server, any one of the servers in the area 1-3 can be accessed without repeated verification.
Therefore, in this embodiment, the verification module may be configured in a central server, and after the central server completes verification, the client may access all servers.
As an alternative example, the above apparatus further includes:
The adjusting module is used for keeping the first three sections of character strings of the network address unchanged after the network address and the port number of the intermediate translator in the target area in the plurality of areas are acquired, and adjusting the fourth section of character string of the network address according to the port number, wherein the network address is composed of four sections of character strings;
The recording module is used for adjusting the fourth-segment character string once, and taking the adjusted fourth-segment character string as a first address;
And the determining module is used for taking the obtained multiple first addresses as addresses in the target network address field after adjusting the multiple fourth segment character strings.
Optionally, in this embodiment, when the central server returns the target network address segment to the first server, the network segment of the target server to be accessed by the first server may be determined, and the network segment of the target server is returned to the first server as the target network address segment. The network address segments may be in a four-segment format, each segment being split by "". For example, 192.168.1.1. When determining the target network address field, the address field of the area where the target server to be accessed by the first server is located may be determined, for example, 192.167.1.A-192.168.1.B, where a and b are positive integers, b > a, and 192.167.1.A-192.168.1.B is determined as the target network address field. Or in this embodiment, the first three segments of the target address may be kept unchanged, and the digits of the fourth segment may be configured to obtain the target network address segment. For example, the target address is 192.168.1.1, the first three character strings 192.168.1 remain unchanged, and the fourth character string is adjusted, for example, when the fourth character string is adjusted from 1 to 2, the fourth character string can be adjusted between 0 and 255. Each time an adjustment is made, a first address is obtained. In the adjustment, the port number may be adjusted. According to the port number, the fourth segment string is adjusted to an address between 0 and 255, which is adapted to the port number. For example, when the target address 192.168.1.1 is adjusted to 192.168.1.125, 192.168.1.125 is a first address, and when the target address is adjusted again, 192.168.1.125 is adjusted to 192.168.1.2, and 192.168.1.2 is also a first address. And obtaining a plurality of first addresses through multiple times of adjustment. The plurality of first addresses are taken as addresses in a target network address segment.
As an alternative example, the above apparatus further includes:
the first detection module is used for detecting the connectivity between the central server and each transit machine after registering the network address and the port number in the central server;
and the first alarm module is used for sending alarm information to the target account number under the condition that the central server is not communicated with the target transit in the transit.
Alternatively, in this embodiment, for each of the plurality of areas of servers, the connectivity of the central server to the relay may be determined. If the area is an area of an extranet server and does not contain a transit, connectivity of the central server to each of the servers of the area may be determined. If the central server is a connected transfer machine, the alarm information is sent to the target account.
As an alternative example, the above apparatus further includes:
the second detection module is used for detecting the communication rate between the central server and the first transfer machine under the condition that the central server is communicated with the first transfer machine in the transfer machines;
And the second alarm module is used for sending alarm information to the target account under the condition that the communication rate is lower than the first threshold value.
Optionally, in this embodiment, if the central server is connected to the relay machine, for example, the central server is connected to the first relay machine, the connection rate between the central server and the first relay machine may be detected, and if the connection rate is lower, the target account is alerted if the connection rate is lower than the first threshold. In this embodiment, when calculating the connection rate, the connection rate from the central server to the relay may be directly detected for the area including the relay. For areas that do not include a transit, such as areas where the servers are outside network servers, the connection rate of each connected server may be calculated and then averaged. For example, one area has 3 servers, two servers are connected, one server is not connected, the connection rates of the two servers are summed, and then the average connection rate of the area is obtained by comparing the sum with 3. If the tie-down communication rate is less than the first threshold, the target account number is alerted.
As an alternative example, the above apparatus further includes:
The configuration module is used for configuring a transfer machine for the target area;
the control module is used for controlling the transfer machine to call the unoccupied port of the transfer machine to construct a connection service;
and the connection module is used for establishing a connection relation between the connection service and the transfer machine.
Optionally, in this embodiment, for each target area configured with the relay, the relay invokes its own port to construct a connection service, so as to establish a connection relationship with the central server. If the area is the area containing the external network server, the connection relation can be directly established between the server and the central server.
For other examples of this embodiment, please refer to the above examples, and are not described herein.
Fig. 6 is a block diagram of an alternative electronic device, according to an embodiment of the application, as shown in fig. 6, including a processor 602, a communication interface 604, a memory 606, and a communication bus 608, wherein the processor 602, the communication interface 604, and the memory 606 communicate with each other via the communication bus 608, wherein,
A memory 606 for storing a computer program;
The processor 602, when executing the computer program stored on the memory 606, performs the following steps:
Acquiring network addresses and port numbers of the intermediate transfer machines in target areas in a plurality of areas, wherein the target areas are areas of the plurality of areas, and the server is an area of an intranet server;
Registering the network address and port number locally at the central server;
and returning the target network address segment to the first server under the condition that the first server in the first area in the plurality of areas requests to access the target server in the target area, so that the first server accesses the target server according to the target network address segment, wherein the first area is any one area in the plurality of areas, and the target network address segment is an address segment determined according to the network address and the port number.
Alternatively, in the present embodiment, the above-described communication bus may be a PCI (PERIPHERAL COMPONENT INTERCONNECT, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus. The communication interface is used for communication between the electronic device and other devices.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, the memory 606 may include, but is not limited to, the first obtaining module 502, the registering module 504, and the first sending module 506 in the server access device. In addition, other module units in the server access device may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but may also be a DSP (DIGITAL SIGNAL Processing), ASIC (Application SPECIFIC INTEGRATED Circuit), FPGA (Field-Programmable gate array) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is only illustrative, and the device implementing the server access method may be a terminal device, and the terminal device may be a smart phone (such as an Android Mobile phone, an iOS Mobile phone, etc.), a tablet computer, a palm computer, a Mobile internet device (Mobile INTERNET DEVICES, MID), a PAD, etc. Fig. 6 is not limited to the structure of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
According to yet another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program when executed by a processor performs the steps in the server access method described above.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (8)

1. A server access method, comprising:
Acquiring network addresses and port numbers of the intermediate transfer machines in target areas in a plurality of areas, wherein the target areas are areas of the plurality of areas, and the server is an intranet server;
Registering the network address and port number locally at a central server;
Returning a target network address segment to a first server in a first area in the plurality of areas to enable the first server to access the target server according to the target network address segment under the condition that the first server in the first area requests to access the target server in the target area, wherein the first area is any one area in the plurality of areas, and the target network address segment is an address segment determined according to the network address and the port number;
Wherein the method further comprises: under the condition that a login request of a client side for logging in any one of the second servers in any one of the areas for the first time is received, acquiring the login request by the central server; verifying the client information in the login request; returning a login instruction to the client under the condition that the client information passes verification, so that the client logs in the second server;
And when the client information verification is passed, returning the login instruction to the client to enable the client to login to a third server when a login request of the client to login to the third server in any one of the areas is received, wherein the third server is a server different from the second server.
2. The method of claim 1, wherein after obtaining the network address and port number of the transit machine in the target zone of the plurality of zones, the method further comprises:
keeping the first three sections of character strings of the network address unchanged, and adjusting the fourth section of character strings of the network address according to the port number, wherein the network address consists of four sections of character strings;
each time the fourth segment character string is adjusted, the adjusted fourth segment character string is used as a first address;
and after the fourth segment character string is adjusted for a plurality of times, taking the obtained plurality of first addresses as addresses in the target network address segment.
3. The method of claim 1, wherein after registering the network address and port number locally at a central server, the method further comprises:
detecting connectivity of the central server and each transit machine;
And sending alarm information to a target account number under the condition that the central server is not communicated with the target transfer machine in the transfer machines.
4. A method according to claim 3, characterized in that the method further comprises:
Detecting a communication rate between the center server and a first one of the transfer machines in a case where the center server is in communication with the first transfer machine;
and sending alarm information to the target account under the condition that the communication rate is lower than a first threshold value.
5. The method according to any one of claims 1 to 4, further comprising:
configuring a transfer machine for the target area;
controlling the transfer machine to call an unoccupied port of the transfer machine to construct a connection service;
and establishing a connection relation between the connection service and the transfer machine.
6. A server access device, comprising:
The first acquisition module is used for acquiring network addresses and port numbers of the transverters in target areas in a plurality of areas, wherein the target areas are areas of an intranet server, and the servers are areas of the intranet server;
the registration module is used for registering the network address and the port number in the local of the central server;
A first sending module, configured to return, when a first server in a first area of the plurality of areas requests to access a target server in the target area, a target network address segment to the first server, so that the first server accesses the target server according to the target network address segment, where the first area is any one area of the plurality of areas, and the target network address segment is an address segment determined according to the network address and the port number;
Wherein the device is further for: under the condition that a login request of a client side for logging in any one of the second servers in any one of the areas for the first time is received, acquiring the login request by the central server; verifying the client information in the login request; returning a login instruction to the client under the condition that the client information passes verification, so that the client logs in the second server; and when the client information verification is passed, returning the login instruction to the client to enable the client to login to a third server when a login request of the client to login to the third server in any one of the areas is received, wherein the third server is a server different from the second server.
7. A computer-readable storage medium, having stored thereon a computer program, characterized in that the computer program, when executed by a processor, performs the method of any of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 5 by means of the computer program.
CN202210784973.3A 2022-06-29 2022-06-29 Server access method, device, storage medium and electronic equipment Active CN115086422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210784973.3A CN115086422B (en) 2022-06-29 2022-06-29 Server access method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210784973.3A CN115086422B (en) 2022-06-29 2022-06-29 Server access method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115086422A CN115086422A (en) 2022-09-20
CN115086422B true CN115086422B (en) 2024-04-26

Family

ID=83256976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210784973.3A Active CN115086422B (en) 2022-06-29 2022-06-29 Server access method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115086422B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441877A (en) * 2013-08-26 2013-12-11 北京百度网讯科技有限公司 Server network cluster management system and method
WO2015027931A1 (en) * 2013-08-28 2015-03-05 Tencent Technology (Shenzhen) Company Limited Method and system for realizing cross-domain remote command
CN107896249A (en) * 2017-11-16 2018-04-10 中国平安人寿保险股份有限公司 Across a network area data access method, device, equipment and storage medium
CN109104309A (en) * 2018-08-01 2018-12-28 网宿科技股份有限公司 The Edge Server management system and method for CDN network
CN110266674A (en) * 2019-06-10 2019-09-20 平安科技(深圳)有限公司 A kind of Intranet access method and relevant apparatus
CN110336753A (en) * 2019-06-19 2019-10-15 腾讯科技(深圳)有限公司 A kind of service calling method, device, equipment and the storage medium in across a network region
CN111327668A (en) * 2019-09-25 2020-06-23 杭州海康威视系统技术有限公司 Network management method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441877A (en) * 2013-08-26 2013-12-11 北京百度网讯科技有限公司 Server network cluster management system and method
WO2015027931A1 (en) * 2013-08-28 2015-03-05 Tencent Technology (Shenzhen) Company Limited Method and system for realizing cross-domain remote command
CN107896249A (en) * 2017-11-16 2018-04-10 中国平安人寿保险股份有限公司 Across a network area data access method, device, equipment and storage medium
CN109104309A (en) * 2018-08-01 2018-12-28 网宿科技股份有限公司 The Edge Server management system and method for CDN network
CN110266674A (en) * 2019-06-10 2019-09-20 平安科技(深圳)有限公司 A kind of Intranet access method and relevant apparatus
CN110336753A (en) * 2019-06-19 2019-10-15 腾讯科技(深圳)有限公司 A kind of service calling method, device, equipment and the storage medium in across a network region
CN111327668A (en) * 2019-09-25 2020-06-23 杭州海康威视系统技术有限公司 Network management method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苏虞磊 ; .公用网络机房计算机的管理系统.科技信息.(15),全文. *

Also Published As

Publication number Publication date
CN115086422A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
US11457373B2 (en) Gateway device for machine-to-machine communication with dual cellular interfaces
CN105393256B (en) Calculating device and method for the security web guidance based on strategy
CN106686129A (en) Load balancing method and load balancing system
CN114025021B (en) Communication method, system, medium and electronic equipment crossing Kubernetes cluster
CN112104754B (en) Network proxy method, system, device, equipment and storage medium
US8555366B2 (en) Method of managing communication between an electronic token and a remote web server
US9912730B2 (en) Secured communication channel between client device and device management service
CN111176794B (en) Container management method, device and readable storage medium
CN104333548B (en) The method and system of local service are accessed in https webpages
CN107959701A (en) Data sharing method, cloud terminal, cloud desktop virtual machine and pass-through proxy server
CN104468487A (en) Communication authentication method and device and terminal device
CN108322366A (en) Access the methods, devices and systems of network
CN111353136B (en) Method and device for processing operation request
US20220141666A1 (en) Gateway device for secure machine-to-machine communication
CN115086422B (en) Server access method, device, storage medium and electronic equipment
CN114143251A (en) Intelligent routing method and device, electronic equipment and computer readable storage medium
CN111726328A (en) Method, system and related device for remotely accessing a first device
CN110072235B (en) Networking method and device for intelligent equipment, electronic device and storage medium
CN111917810A (en) Cloud communication method and device, user equipment and network equipment
CN106534113A (en) Method and device for establishing SSH connection
CN112346888A (en) Data communication method and device based on software application and server equipment
CN109743237A (en) A kind of method for authenticating and gateway of APP
CN115529144B (en) Communication system, method, apparatus, first device, second device, and storage medium
CN107819584A (en) Digital certificate acquisition methods and device
US11153877B2 (en) Method for bonding a plurality of radio connections in a wireless network

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