Method for client side to access server side, and computer device and storage medium
Through the broadcast and registration mechanism, the client automatically discovers and accesses the server, solving the problems of high client access costs and difficult dynamic management in the existing technology, and achieving the effect of dynamic adaptation and reducing maintenance costs.
Patent Information
- Application Number
- PCT/CN2024/073916
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-26
- Filing Date
- 2024-01-24
- Publication Date
- 2025-01-02
AI Technical Summary
In the prior art, the client access server method has the problem of high maintenance costs and inability to dynamically manage and automatically adapt. Especially when the number of clients is large, the server needs to pre-install client information, resulting in maintenance costs and management. Increased complexity.
Through broadcast and registration, the client automatically discovers and accesses to the server, and sends broadcast information using preset cycles, including authentication information. After the client receives and authenticates, the registration information is generated. The target server parses and accesses the client. , realize dynamic migration and automatic connection.
It reduces the maintenance costs of clients and servers, realizes automatic adaptation and dynamic management when the number of clients changes, simplifies the access process, and improves data transmission security and efficiency.
Smart Images

Figure CN2024073916_02012025_PF_FP_ABST
Abstract
Description
Method for client accessing server, computer device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure is based on Chinese patent application CN 2023107620729, filed on June 26, 2023, entitled “Method, computer device and storage medium for client access to server”, and claims the priority of the patent application, and all the contents disclosed therein are incorporated into this disclosure by reference. Technical Field
[0003] The present disclosure relates to the field of communication technology, and in particular to a method for a client to access a server, a computer device, and a storage medium. Background Art
[0004] In actual business applications, it is usually necessary to connect the client to the server to meet the corresponding business needs. There are several methods for connecting the client to the server in the prior art: one is that the client actively connects to the server, that is, the client maintains the server address and actively initiates a link establishment request to the server address. However, the above method has the following disadvantages: the client must preset the server address and cannot be used "out of the box", that is, if there is a change on the server, the client must make corresponding modifications, so the maintenance cost of the client is relatively high. The second is that the server actively connects to the client, that is, the server maintains the client address and actively initiates a connection to the client to obtain data. However, the above method has the following disadvantages: the server needs to preset the client information. When the number of clients is large, the cost of maintaining client information is very high, and the clients cannot be managed dynamically. If the number of clients increases or decreases, it cannot be automatically adapted.
[0005] Furthermore, there is also a method of manually connecting the server to the client to achieve the connection between the two. However, this method has a high cost for client access and requires manual maintenance, so it is not suitable for large-scale client access management.
[0006] Summary of the Invention
[0007] The main purpose of the embodiments of the present disclosure is to provide a method, computer device and storage medium for client access to a server, aiming to enable the client to automatically discover and access the server through broadcasting and registration. Since the step of manually configuring the link is eliminated, the two can automatically adjust and connect to each other in the case of dynamic migration, thereby reducing the cost of maintenance of both.
[0008] In a first aspect, an embodiment of the present disclosure provides a method for a client to access a server, which is applied to a target server, and the method includes: sending broadcast information according to a preset period so that the client receives the broadcast information, wherein the broadcast information includes first authentication information; receiving registration information sent by the client, and verifying the validity of the registration information, wherein the registration information is generated after the client authenticates the first authentication information, and the registration information includes client information; when the registration information is valid, parsing the client information, and accessing the client based on the parsed client information.
[0009] In a second aspect, an embodiment of the present disclosure provides a method for a client to access a server, which is applied to a client, and the method includes: receiving broadcast information; wherein the broadcast information includes first authentication information of a server on the server side; authenticating the first authentication information, and generating registration information after the authentication is passed; wherein the registration information includes client information; sending the registration information to the target server so that the target server parses the client information and uses the parsed client information to access the client.
[0010] In a third aspect, the present disclosure provides a computer device, comprising: a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the method for client accessing the server as described in any one of the embodiments of the present disclosure are implemented.
[0011] In a fourth aspect, the present disclosure provides a storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for client accessing the server as described in any one of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] FIG1 is a flow chart of a method for a client to access a server provided by an embodiment of the present disclosure;
[0014] FIG2 is a schematic diagram of a scenario for parsing client information provided by an embodiment of the present disclosure;
[0015] FIG3 is a schematic diagram of a process for sending broadcast information according to an embodiment of the present disclosure;
[0016] FIG4 is a schematic diagram of a scenario for sending broadcast information provided by an embodiment of the present disclosure;
[0017] FIG5 is a flow chart of another method for a client to access a server provided by an embodiment of the present disclosure;
[0018] FIG6 is a schematic diagram of a process for generating registration information provided by an embodiment of the present disclosure;
[0019] FIG7 is a schematic diagram of a scenario for generating registration information provided by an embodiment of the present disclosure;
[0020] FIG8 is a schematic diagram of a scenario of a first method for a client to access a server provided by an embodiment of the present disclosure;
[0021] FIG9 is a schematic diagram of a scenario of a second method for a client to access a server provided by an embodiment of the present disclosure;
[0022] FIG10 is a schematic diagram of a scenario of a third method for a client to access a server provided by an embodiment of the present disclosure;
[0023] FIG11 is a schematic diagram of a scenario of a fourth method of client accessing a server provided by an embodiment of the present disclosure;
[0024] FIG12 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0026] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0027] It should be understood that the terms used in this disclosure are only for the purpose of describing particular embodiments and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0028] Please refer to Figure 1, which is a flow chart of a method for client accessing a server provided by an embodiment of the present disclosure. The method for client accessing a server can be applied in a target server, thereby enabling the client to access the target server.
[0029] As shown in FIG1 , the method for a client to access a server includes steps S11 to S13 .
[0030] Step S11: sending broadcast information according to a preset period, so that the client can receive the broadcast information.
[0031] The broadcast information includes first authentication information, which may include one or more of token information, key information, and identity information, which is not limited in this disclosure.
[0032] Furthermore, the present disclosure does not limit the preset period, for example, the preset period is every ten minutes, every twenty minutes, etc. The preset period can be flexibly adjusted according to needs to meet the implementation requirements in different scenarios.
[0033] In addition, the broadcast duration of the broadcast information can also be limited, for example, the broadcast duration is 1 hour, 2 hours, etc. The present disclosure does not limit this, and takes the preset period of every ten minutes and the broadcast duration of 2 hours as an example for explanation.
[0034] Specifically, the target server can send a broadcast message every ten minutes for two hours, which means it will send 60*2 / 10=12 broadcast messages. It is understandable that if the broadcast duration is not limited, the target server will continue to send a broadcast message every ten minutes, so that the client can receive the broadcast message in a timely manner, ensuring the real-time nature of the broadcast information and thus achieving a real-time connection between the two.
[0035] In addition, the target server sends information in the form of broadcast, and can also deliver the broadcast information to multiple clients, thereby improving the efficiency and coverage of information delivery.
[0036] In an embodiment of the present disclosure, the target server may send broadcast information to the client according to a preset period, so that the client receives the broadcast information, thereby achieving a real-time connection between the two.
[0037] Step S12: Receive the registration information sent by the client and verify the validity of the registration information.
[0038] The registration information is generated after the client authenticates the first authentication information, and the registration information includes the client information.
[0039] Specifically, the client can authenticate the first authentication information to determine whether the target server's identity is legitimate. Furthermore, after successful authentication, the client can send registration information to the target server. The target server can then receive the registration information sent by the client and verify its validity to verify the client's identity, thereby enhancing the security of data transmission between the two.
[0040] Optionally, the registration information includes token information, key information, and identity information. The above-mentioned receiving the registration information sent by the client and verifying the validity of the registration information includes: receiving at least one of the token information, key information and identity information sent by the client, and verifying the validity of at least one of the information.
[0041] Specifically, the target server may receive at least one of the token information, key information, and identity information sent by the client, and then verify it to confirm the identity of the client, thereby achieving secure transmission of data between the two.
[0042] For the token information sent by the client, the target server can use a preset static token or dynamic token for authentication to confirm the identity of the client; for the key information sent by the client, the client can encrypt it in advance using a preset private key, and then the target server can decrypt it with a public key after receiving it to authenticate and confirm the identity of the client; for the identity information sent by the client, the target server can directly perform authentication operations on it to confirm the identity of the client.
[0043] Optionally, the above authentication methods may be combined to determine the identity of the client, which is not limited in this disclosure.
[0044] In the embodiment of the present disclosure, the target server may receive the registration information sent by the client, and verify the validity of the registration information, thereby implementing subsequent management or business processing of the client.
[0045] Step S13: When the registration information is valid, the client information is parsed and the client is accessed according to the parsed client information.
[0046] Specifically, if the registration information is valid, it indicates that the client's identity is legitimate. The target server can then parse the client information to obtain the parsed client information. This allows the target server to better understand the client's characteristics, needs, or other relevant information, thereby better facilitating client access and service provision. The server can also access the client based on the parsed client information.
[0047] Please refer to Figure 2, which illustrates a scenario for parsing client information according to an embodiment of the present disclosure. As shown in Figure 2, the target server can initiate a registration monitoring mechanism to receive registration information sent by the client. The target server then authenticates the registration information to confirm its validity. If the registration information is valid, it indicates that the client's identity is invalid, meaning that a connection cannot be established. In this case, the target server can discard the registration information.
[0048] If the registration information is valid, the target server can further analyze the client information and connect to the client based on the analyzed client information. In addition, the client information maintained in the server system can be updated, which can directly enable subsequent client access, thereby improving the efficiency of subsequent connections between the two.
[0049] In the embodiment of the present disclosure, when the registration information is valid, the target server may parse the client information and then access the client according to the parsed client information, thereby achieving connection between the target server and the client.
[0050] The embodiment of the present disclosure provides a method for a client to access a server, which can be applied to a target server. Specifically, broadcast information can be sent according to a preset period so that the client receives the broadcast information including the first authentication information. Then, after the client authenticates the first authentication information, registration information including the client information is sent to the target server, so that the target server can verify the validity of the registration information. Furthermore, when the registration information is valid, the target server can also parse the client information, so that the client can be accessed based on the parsed client information. The embodiment of the present disclosure realizes the connection between the client and the target server by sending broadcast information in a preset period and providing an authentication and registration mechanism, thereby simplifying the process of the client accessing the server. That is, the client only needs to send and process information according to the specified method without the need for complicated manual operations or additional steps.
[0051] Please refer to FIG. 3 , which is a schematic diagram of a process of sending broadcast information provided by an embodiment of the present disclosure. As shown in FIG. 3 , sending broadcast information can also be achieved through steps S111 to S114 .
[0052] Step S111: Acquire network configuration information, and determine whether there is a configuration management range in the network configuration information.
[0053] Step S112: When the configuration management scope exists in the network configuration information, a broadcast scope is generated based on the configuration management scope.
[0054] The network configuration information at least includes an IP address, a configuration management range, a subnet mask, etc., which is not limited in the present disclosure.
[0055] Specifically, the target server can obtain network configuration information and determine whether the network configuration information contains a configuration management scope, that is, whether the network management IP address range exists. Furthermore, if the network configuration information contains a configuration management scope, the target server can generate a broadcast scope based on the configuration management scope. Thus, the target server can send broadcast information to any client within the broadcast scope.
[0056] In an embodiment of the present disclosure, the target server may generate a broadcast range based on the configuration management range to send broadcast information to the clients within the broadcast range, thereby achieving a connection between the two.
[0057] Step S113: When the network configuration information does not have a configuration management scope, determine a target server from a plurality of servers, obtain the internetworking protocol and mask information of the target server, and generate a broadcast scope based on the internetworking protocol and mask information of the target server.
[0058] Specifically, when the network configuration information does not contain a configuration management scope, a target server can be determined from multiple servers. The target server is a server that can access the client. Furthermore, the target server's internet protocol and mask information can be obtained, and then the broadcast scope can be generated by performing logical AND and logical NOT operations on the target server's internet protocol and mask information.
[0059] Optionally, determining the target server from a plurality of servers includes: judging whether there is a target internet interconnection protocol designated for monitoring among the plurality of servers; if there is a target internet interconnection protocol designated for monitoring, using the server corresponding to the target internet interconnection protocol as the target server; if there is no target internet interconnection protocol designated for monitoring, using all of the plurality of servers as the target servers.
[0060] In the embodiment of the present disclosure, a target server that can access the client can be determined, and then a broadcast range is generated based on the internetwork protocol and mask information of the target server to implement the sending of broadcast information.
[0061] Step S114: Send broadcast information within the broadcast range according to a preset period.
[0062] Specifically, the target server may start a timer, and then send the broadcast information to each client within the broadcast range based on a preset period, so that each client within the broadcast range can receive the broadcast information.
[0063] The preset period may be every five minutes, every ten minutes, etc., which is not limited in the present disclosure.
[0064] In the disclosed embodiments, the target server can obtain network configuration information and determine the corresponding configuration management scope. Based on the configuration management scope, a broadcast scope is generated. This allows broadcast information to be sent to clients within the broadcast scope at a preset period, ensuring that every client within the broadcast scope receives the broadcast information. This enables data exchange with clients via a broadcast-based mechanism, simplifying the process of client access to the server.
[0065] Please refer to Figure 4, which is a schematic diagram of a broadcast information transmission scenario according to an embodiment of the present disclosure. As shown in Figure 4, specifically, the target server may obtain network configuration information and determine whether a configuration management scope exists in the network configuration information. If a configuration management scope exists in the network configuration information, the target server may directly generate a broadcast scope based on the configuration management scope and start a timer to send broadcast information to any client within the broadcast scope at a preset interval.
[0066] If the configuration management scope is not present in the network configuration information, the system can determine whether a designated target internet protocol exists among the servers. If so, the server corresponding to the designated target internet protocol is used as the target server. If not, all servers are used as the target servers. A broadcast scope is generated based on the target server's internet protocol and mask information, and a timer is started to send broadcast information to any client within the broadcast scope at a preset interval.
[0067] Please refer to Figure 5, which is a flowchart of another method for client accessing a server provided by an embodiment of the present disclosure. As shown in Figure 5, the method is applied to the client and can implement client access to the server through steps S21 to S23.
[0068] S21: Receive broadcast information; wherein the broadcast information includes first authentication information of a target server of the service end.
[0069] Specifically, the client can receive the broadcast information sent by the target server, thereby ensuring the real-time nature of the broadcast information while also being able to achieve a real-time connection between the two.
[0070] S22: Authenticate the first authentication information and generate registration information after the authentication is passed; wherein the registration information includes client information.
[0071] Specifically, the client can authenticate the first authentication information to determine whether the identity of the target server is legitimate. Further, after the authentication is passed, the client can send registration information to the target server so that the target server receives the registration information sent by the client.
[0072] Optionally, the first authentication information includes token information, key information, and identity information. The first authentication information is authenticated, and registration information is generated after the authentication is passed, including: authenticating at least one of the token information, key information, and identity information sent by the target server, and generating registration information after the authentication is passed.
[0073] Specifically, the client can receive at least one of the token information, key information and identity information sent by the target server, and then verify it to confirm the identity of the target server, thereby achieving secure transmission of data between the two.
[0074] For the token information sent by the target server, the client can use a preset static token or dynamic token for authentication to confirm the identity of the target server; for the key information sent by the target server, the target server can encrypt it in advance using a preset private key, and then the client can decrypt it with a public key after receiving it to authenticate and confirm the identity of the target server; for the identity information sent by the target server, the client can directly perform authentication on it to confirm the identity of the target server.
[0075] Optionally, authentication methods may be combined to determine the identity of the target server, which is not limited in the present disclosure.
[0076] In the embodiment of the present disclosure, the client can authenticate the first authentication information sent by the target server, thereby verifying the identity of the target server, and generate registration information after the authentication is passed.
[0077] S23: Send the registration information to the target server, so that the target server can parse the client information and access the client using the parsed client information.
[0078] Specifically, the client can send the registration information to the target server, so that the target server can receive the registration information and parse the client information included in the registration information, such as parsing the JSON data, user name and password corresponding to the client, and access the client based on this information.
[0079] In the disclosed embodiment, the client may send registration information to the target server so that the target server can parse the client information and then access the client according to the parsed client information, thereby realizing the connection between the target server and the client.
[0080] Please refer to Figure 6, which is a schematic diagram of a process for generating registration information provided by an embodiment of the present disclosure. As shown in Figure 6, the registration information can be generated after authentication is passed through steps S221 and S225.
[0081] Step S221: Determine the amount of first authentication information in the broadcast information.
[0082] Step S222: When the number is 1, the first authentication information is authenticated, and registration information is generated after the authentication is passed.
[0083] Specifically, the client can determine the number of first authentication information in the broadcast information. If the number of first authentication information is 1, it means that there is a corresponding target server. Therefore, the client can directly authenticate the first authentication information of the target server and generate registration information after the authentication is successful.
[0084] It should be noted that for a detailed description of the authentication, please refer to the specific implementation steps of the above step S22. In order to avoid repetition, it will not be described here.
[0085] Optionally, the first authentication information also includes server information; after authenticating the first authentication information, the method further includes: determining whether the server information already exists; if the server information already exists, discarding the server information; if the server information does not exist, recording the server information.
[0086] Specifically, the client can authenticate the broadcast information to obtain an authentication result. If the authentication result is authentication failure, the client directly discards the broadcast information; if the authentication result is authentication success, the client can further determine whether the server information exists for further processing.
[0087] If the server information already exists, it means that the client has already performed corresponding processing on it. At this time, the client can discard the server information; if the server information does not exist, the client can record the server information for subsequent processing.
[0088] In the embodiment of the present disclosure, the client can determine the number of first authentication information in the broadcast information, and then directly perform authentication based on the first authentication information when the number of first authentication information is 1, and generate registration information after the authentication is successful.
[0089] Step S223: When the number is greater than 1, determine whether it is a single server mode.
[0090] Step S224: If yes, determine the target first authentication information from the multiple first authentication information, authenticate the target first authentication information, and generate registration information after the authentication passes.
[0091] Step S225: If not, authenticate each first authentication information and generate corresponding registration information after the authentication is passed.
[0092] Specifically, if the number of first authentication information is greater than one, it indicates that multiple target servers are sending broadcast information to the client. Therefore, the client can determine whether the server is in single-server mode and perform authentication based on the server's mode, and then generate registration information after authentication is successful.
[0093] It's important to note that the single-server model involves deploying the entire application or system on a single server. This deployment method is suitable for small applications or low-traffic websites, as a single server typically has limited computing resources and bandwidth. While this approach offers advantages such as simplicity, low cost, and ease of management, it can also easily become a performance bottleneck and lack high availability and scalability.
[0094] Multi-server deployment involves distributing an application or system across multiple servers. This deployment approach uses load balancing to distribute requests across different servers, improving performance and reliability. Multi-server deployment allows applications to scale dynamically as needed, provides better fault tolerance, and can handle large numbers of concurrent requests.
[0095] Therefore, when determining that the server mode is single-server mode, the target first authentication information can be directly determined from the first authentication information corresponding to multiple target servers, and the target first authentication information can be authenticated, and registration information can be generated after the authentication is passed.
[0096] When it is determined that the mode of the server is not a single-server mode, that is, when the mode of the server is a multi-server mode, the first authentication information corresponding to each target server can be authenticated, and corresponding registration information can be generated after the authentication is passed.
[0097] It should be noted that for a detailed description of the authentication operation, please refer to the specific implementation steps of step S22 above. In order to avoid repetition, it will not be described here.
[0098] In the embodiment of the present disclosure, when the client can determine that the number of first authentication information in the broadcast information is greater than 1, it can further determine whether the server mode is a single-server mode, and authenticate the first authentication information of the server based on different server modes, and generate registration information after the authentication is passed, thereby improving the security of the client accessing the server.
[0099] Please refer to Figure 7, which illustrates a scenario for generating registration information according to an embodiment of the present disclosure. As shown in Figure 7, the client can start a timer and read server information based on a preset period to determine the number of first authentication information items in the broadcast information. When the number of first authentication information items is 1, the client directly authenticates the first authentication information items and, after successful authentication, generates registration information items, which are then sent to the target server corresponding to the first authentication information items.
[0100] When the number of first authentication information is greater than 1, the client can determine whether the mode of the server is a single-server mode. When it is determined that the mode of the server is a single-server mode, the client can directly determine the target first authentication information from the first authentication information corresponding to multiple target servers, authenticate the target first authentication information, and generate registration information after the authentication is passed, thereby sending the registration information to the target server corresponding to the first authentication information. When it is determined that the mode of the server is not a single-server mode, that is, when the mode of the server is a multi-server mode, the client can authenticate the first authentication information corresponding to each target server, and generate corresponding registration information after the authentication is passed, thereby sending the registration information to the target server corresponding to the first authentication information.
[0101] Please continue to refer to Figures 8 to 11. Figure 8 is a schematic diagram of a scenario of the first method of client accessing a server provided by an embodiment of the present disclosure; Figure 9 is a schematic diagram of a scenario of the second method of client accessing a server provided by an embodiment of the present disclosure; Figure 10 is a schematic diagram of a scenario of the third method of client accessing a server provided by an embodiment of the present disclosure; and Figure 11 is a schematic diagram of a scenario of the fourth method of client accessing a server provided by an embodiment of the present disclosure. The above methods can be applied to a server node or a client node for management, and are specifically applied to the scenarios shown in Figures 8 to 11.
[0102] As shown in Figure 8, a server node can be planned in the internal network, and the server node and the fixed client node are in the same internal network. The server node can realize message communication with the client node through the internal network based on the client access server method proposed in this disclosure.
[0103] As shown in Figure 9, client nodes can be planned in a scalable network. The client nodes can be expanded or reduced based on traffic demand, while the server nodes remain unchanged. The server nodes can communicate messages with the client nodes over the scalable network based on the client access server method proposed in this disclosure.
[0104] As shown in Figure 10, when a server node is unavailable for some reason, a new server node can be planned. Through the client access server method proposed in the present disclosure, client nodes in the same network can automatically access the new server node.
[0105] As shown in Figure 11, when the internal network expands and exceeds the maximum load of the server node, another server node can be added to the internal network. The client node can perform specific operations based on its own IP and match one of the server nodes to send a registration message based on the client access server method proposed in this disclosure, thereby achieving the effect of load sharing.
[0106] The disclosed methods can be used in a wide variety of general-purpose or specialized computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer computing devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above.
[0107] Please refer to FIG12 , which is a schematic block diagram of the structure of a computer device provided in an embodiment of the present disclosure.
[0108] As shown in FIG12 , a computer device 400 may include a processor 401 and a memory 402 . The processor 401 and the memory 402 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.
[0109] In an exemplary embodiment, the processor 401 can be configured to provide computing and control capabilities to support the operation of the entire computer device. The processor 401 can be a central processing unit (CPU), and the processor 401 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0110] Specifically, the memory 402 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0111] Those skilled in the art will understand that the structure shown in FIG12 is merely a block diagram of a portion of the structure related to the embodiment of the present disclosure, and does not constitute a limitation on the computer device to which the embodiment of the present disclosure is applied. A specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0112] The processor 401 is configured to run a computer program stored in the memory, and implement any one of the methods for client accessing a server provided in the embodiments of the present disclosure when executing the computer program.
[0113] In one embodiment, the processor 401 is configured to run a computer program stored in a memory, and implement the following steps when executing the computer program: sending broadcast information according to a preset period so that the client receives the broadcast information, wherein the broadcast information includes first authentication information; receiving registration information sent by the client and verifying the validity of the registration information, wherein the registration information is generated after the client authenticates the first authentication information, and the registration information includes client information; when the registration information is valid, parsing the client information, and accessing the client based on the parsed client information.
[0114] In one embodiment, before implementing sending broadcast information according to a preset period, the processor 401 is configured to implement: obtaining network configuration information and determining whether a configuration management scope exists in the network configuration information; when the configuration management scope exists in the network configuration information, generating a broadcast scope based on the configuration management scope; when the configuration management scope does not exist in the network configuration information, determining the target server from a number of servers, and obtaining the internet interconnection protocol and mask information of the target server, and generating the broadcast range based on the internet interconnection protocol and mask information of the target server; sending the broadcast information according to the preset period includes: sending the broadcast information within the broadcast range according to the preset period.
[0115] In one embodiment, when determining the target server from a plurality of servers, the processor 401 is configured to: determine whether there is a target internet protocol designated for monitoring among the plurality of servers; if there is a target internet protocol designated for monitoring, use the server corresponding to the target internet protocol as the target server; if there is no target internet protocol designated for monitoring, use all of the plurality of servers as the target servers.
[0116] In one embodiment, when the processor 401 receives the registration information sent by the client and verifies the validity of the registration information, it is configured to implement: receiving at least one of the token information, key information and identity information sent by the client, and verifying the validity of the at least one information.
[0117] In one embodiment, the processor 401 is configured to run a computer program stored in a memory, and further implements the following steps when executing the computer program: receiving broadcast information; wherein the broadcast information includes first authentication information of a target server of the server end; authenticating the first authentication information, and generating registration information after the authentication is passed; wherein the registration information includes client information; sending the registration information to the target server so that the target server parses the client information and uses the parsed client information to access the client.
[0118] In one embodiment, when the processor 401 authenticates the first authentication information and generates registration information after the authentication is passed, it is configured to implement: determining the number of first authentication information in the broadcast information; when the number is 1, authenticating the first authentication information and generating registration information after the authentication is passed; when the number is greater than 1, determining whether it is a single-server mode; if so, determining the target first authentication information from multiple first authentication information, authenticating the target first authentication information, and generating registration information after the authentication is passed; if not, authenticating each first authentication information and obtaining the corresponding registration information after the authentication is passed.
[0119] In one embodiment, when the processor 401 authenticates the first authentication information and generates registration information after the authentication is passed, it is configured to: authenticate at least one of the token information, key information and identity information sent by the target server, and obtain the registration information after the authentication is passed.
[0120] In one embodiment, after authenticating the first authentication information, the processor 401 is configured to: determine whether the server information already exists; if the server information already exists, discard the server information; if the server information does not exist, record the server information.
[0121] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the computer device described above can refer to the corresponding process in the aforementioned terminal capability reporting method embodiment, and will not be repeated here.
[0122] The embodiments of the present disclosure also provide a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any method of client accessing a server provided in the description of the embodiments of the present disclosure.
[0123] The storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device.
[0124] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0125] It should be understood that the term "and / or" as used in this disclosure and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system that includes the element.
[0126] The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A method for a client to access a server, applied to a target server, the method comprising: Sending broadcast information according to a preset period so that the client receives the broadcast information, wherein the broadcast information includes the first authentication information; receiving registration information sent by the client and verifying the validity of the registration information, wherein the registration information is generated after the client authenticates the first authentication information, and the registration information includes client information; When the registration information is valid, the client information is parsed, and the client is accessed according to the parsed client information.
2. The method according to claim 1, wherein: Before sending the broadcast information according to the preset period, the method further includes: Obtaining network configuration information, and determining whether there is a configuration management scope in the network configuration information; When the configuration management scope exists in the network configuration information, generating a broadcast scope based on the configuration management scope; When the network configuration information does not exist in the configuration management scope, determining the target server from a plurality of servers, acquiring the internet interconnection protocol and mask information of the target server, and generating the broadcast scope based on the internet interconnection protocol and mask information of the target server; The sending of the broadcast information according to a preset period includes: sending the broadcast information within the broadcast range according to a preset period.
3. The method according to claim 2, wherein: Determining the target server from a plurality of servers includes: Determine whether a target Internet protocol for designated monitoring exists in the plurality of servers; If there is a target Internet protocol for monitoring, taking a server corresponding to the target Internet protocol as the target server; If there is no designated listening target Internet protocol, all of the servers are used as the target servers.
4. The method according to claim 1, wherein: The registration information includes token information, key information, and identity information. The receiving the registration information sent by the client and verifying the validity of the registration information includes: Receive at least one of the token information, key information and identity information sent by the client, and verify the validity of the at least one information.
5. A method for a client to access a server, applied to a client, the method comprising: Receiving broadcast information; wherein the broadcast information includes first authentication information of a target server of the service end; Authenticating the first authentication information, and generating registration information after the authentication is passed; wherein the registration information includes client information; The registration information is sent to the target server, so that the target server parses the client information and accesses the client using the parsed client information.
6. The method according to claim 5, wherein: The authenticating the first authentication information and generating registration information after the authentication is passed includes: Determining the amount of first authentication information in the broadcast information; When the number is 1, the first authentication information is authenticated, and registration information is generated after the authentication passes; When the number is greater than 1, determine whether it is a single server mode; If yes, determine the target first authentication information from the plurality of first authentication information, authenticate the target first authentication information, and generate registration information after the authentication passes; If not, each of the first authentication information is authenticated, and corresponding registration information is generated after the authentication is passed.
7. The method according to claim 5, wherein: The first authentication information includes token information, key information, and identity information. The step of authenticating the first authentication information and generating registration information after the authentication is passed includes: Authenticate at least one of the token information, key information and identity information sent by the target server, and generate the registration information after the authentication is passed.
8. The method according to claim 5, wherein: The first authentication information also includes server information; after authenticating the first authentication information, the method further includes: Determine whether the server information already exists; If the server information already exists, discard the server information; If the server information does not exist, record the server information.
9. A computer device, comprising: A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the method for client accessing a server as described in any one of claims 1 to 8 are realized.
10. A storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for client accessing a server as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for transmitting information
CN101547091A
Wireless media access layer authentication and key agreement method for filling variable sequence length
CN102413463A
Automatic discovery and automatic deployment method of cloud host
CN106790467A
Transmission data protection system, method and device
CN114826673A
Thin / zero client provisioning and management using centralized management software
US20150188992A1