A dynamic access access method and system without fixed IP
Patent Information
- Application Number
- CN202611208387.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-16
AI Technical Summary
[0009]本发明的目的是提出了一种解决客户端与服务器通讯的方法,通过该方法解决在公网环境下,服务器因网络地址转换或动态主机配置协议导致IP地址频繁变化时,客户端无需人工干预即可自动发现并建立与服务器的安全通信连接的问题
在服务器端和客户端新增轻量化的服务中台,通过服务中台的桥接作用实现无固定IP下的动态接入访问,无需通过购买云服务器或者配置内外网双网卡计算机的方式实现无固定IP下的动态接入访问,显著降低硬件、运维成本等投入,降低故障排查难度,有效提升资源利用率。
Smart Images

Figure CN122933183A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of communication technology, and in particular relates to a dynamic access method and system without a fixed IP address. Background Technology
[0002] For B / S architecture applications, servers typically have fixed IP addresses, allowing clients to access them smoothly. However, in public network scenarios, if a B / S architecture application's client needs to access the server, communication problems can arise due to the server lacking a fixed IP address, or network congestion preventing communication. Addressing this issue often requires applying for a dedicated external IP address, which is difficult given the scarcity of such resources. Alternatively, one could purchase a cloud server and migrate the data there to circumvent the lack of an external IP address. Another approach is to configure a computer with an external IP address within the local area network using dual network cards and employ complex port mapping and routing settings to circumvent the lack of an external IP address. Current technology presents the following problems:
[0003] Question 1: Both implementation methods are quite complex.
[0004] Both purchasing a cloud server and configuring a computer with dual network cards (internal and external) are relatively complex. Purchasing a cloud server requires server setup and data migration, which is time-consuming and labor-intensive. After deployment, testing of the data and services on the cloud server is also necessary. Accessing a server without an external IP address via a computer with dual network cards is also cumbersome. It involves configuring dual network cards, port settings, and routing, involving many steps. If any step is incorrectly configured, troubleshooting can be difficult. Both methods require specialized personnel.
[0005] Question 2: Both implementation methods are costly.
[0006] Both implementation methods are costly. Cloud servers need to be purchased or rented, and subsequent maintenance also requires a significant investment of manpower. Configuring computers on both internal and external networks requires a separate computer and professional maintenance, resulting in relatively high maintenance costs.
[0007] Question 3: Using a computer with both internal and external network cards to implement this function is a waste of resources in reality.
[0008] Because external network IP resources are limited, access to the internal network server is achieved by configuring a computer with internal and external network cards. However, when this computer is used as a jump server, if access problems occur, various troubleshooting processes will be involved, which will affect the use of this computer and, to some extent, waste external network IP resources. Summary of the Invention
[0009] The purpose of this invention is to propose a method for client-server communication. This method addresses the problem that, in a public network environment, when the server's IP address changes frequently due to Network Address Translation (NAT) or Dynamic Host Configuration Protocol (DHCP), the client can automatically discover and establish a secure communication connection with the server without manual intervention.
[0010] To achieve the above objectives, the present invention adopts the following technical solution: A dynamic access system without a fixed IP address includes a service platform, at least one application server, at least one client, and a communication module. The service middle platform communicates with the application server and the client through communication modules. The service middle platform stores the application server's identity information and dynamically updated IP address information, and performs authentication on the client. After obtaining the updated IP address of the application server through the service middle platform, the client directly establishes a communication connection with the application server.
[0011] Furthermore, the communication module includes any one of the following protocols: HTTP, HTTPS, WebSocket, or Socket UDP.
[0012] A dynamic access method without a fixed IP address based on the system of claim 1 includes the following steps: The service platform monitors application server IP address updates and client application requests via heartbeats. When the IP address of the application server changes, the application server sends an IP address update request to the service platform. The service platform receives and updates the stored IP address information and then confirms with the application server. The client initiates an access request to the application server to obtain the updated IP address and user information of the application server; If the application server's IP address remains unchanged, the client establishes a connection directly with the application server; if the application server's IP address has changed, the client establishes a connection with the service platform, and the service platform authenticates the client based on the application server's updated IP address and user information. For legitimate clients, the service platform sends the updated IP address information of the application server back to the client. After client confirmation, access is directly established with the application server via the communication module; If the login times out and there is no response, the updated IP address will be obtained again and a reconnection attempt will be made; if the login is successful, the client and the application server will be successfully connected and peer-to-peer communication will proceed normally.
[0013] Furthermore, the heartbeat pattern is a bidirectional heartbeat mechanism.
[0014] Furthermore, the service platform uses symmetric or asymmetric encryption algorithms to authenticate clients, distinguishing between legitimate and illegitimate clients.
[0015] Furthermore, after authenticating the client, the service platform refuses to provide the application server's IP address information for unauthorized clients.
[0016] Furthermore, after the service platform provides updated IP address information, the client and the service platform communicate point-to-point via a communication module.
[0017] The beneficial effects of this invention are as follows: A lightweight service platform is added to both the server and client sides. Through the bridging function of the service platform, dynamic access without a fixed IP address is enabled. This eliminates the need to purchase cloud servers or configure computers with dual network cards for internal and external networks, significantly reducing hardware and maintenance costs, simplifying troubleshooting, and effectively improving resource utilization.
[0018] Many application servers lack fixed IP addresses, and existing technologies either involve high costs (purchasing cloud servers / configuring jump servers) or rely on complex network configurations (port mapping / routing settings). This application introduces a lightweight service platform that enables clients to automatically discover and securely access servers without fixed IP addresses in a manner that requires no manual intervention, no modification to the existing network topology, and no additional hardware. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the structure of the dynamic access system without a fixed IP provided by the present invention; Figure 2 This is a flowchart of a client accessing an application server provided by the present invention; Figure 3 This is a flowchart of the dynamic access method without a fixed IP provided by the present invention; Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0021] The application principle of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0022] Example 1: Please refer to Figure 1 and Figure 2 A dynamic access system without a fixed IP address includes: a service platform, an application server, a client, and a communication module.
[0023] The service platform stores the identity information of application servers and clients corresponding to multiple applications. It establishes authentication and authorization between clients and application servers for specific applications, acting as a bridge to effectively solve the problem of client access when a specific application server lacks a fixed IP address. A specific application mainly includes the application server and multiple client users within that application. Application servers and client users communicate with the service platform through their respective communication modules, handling access control, connection establishment, and other processes.
[0024] The communication module is mainly for visualization, generally referring to the client-server (C / S) model, such as HTTP / HTTPS, WebSocket, Socket UDP, etc.
[0025] By leveraging a service platform, communication is established between application servers and clients without fixed IP addresses, enabling client access to the application server. The client's communication module and the server's communication module run on their respective PCs, establishing dynamic link libraries through corresponding interfaces for easy access by other programs. On both the server and client sides, programs call the module interface dynamic link libraries, sending information and files through these communication module interfaces. The receiving end receives the information or files and performs subsequent authentication. When the application server's IP address changes, the application server proactively connects to the service platform, encrypting and sending the updated IP address and user information via the communication module. The service platform receives the information, decrypts it, and provides confirmation. If the client fails to log in to the application server, it establishes a connection with the service platform, using its personal account information and signature information to perform authentication with the application server. The service platform provides accurate application server status and access information, thus enabling the client to access the application server.
[0026] Please refer to Figure 3 A dynamic access method without a fixed IP address, the specific steps of which are as follows: Step 1: The service platform configures a fixed number of ports for various application servers. These ports monitor application server IP address updates and user information requests, as well as application requests initiated by client users, using a heartbeat mechanism (similar to a keepalive mechanism). When an application server (application server X in the flowchart) changes its IP address for various reasons, it sends an IP and other information update request to the service platform. This application establishes an initial connection channel and proactive reporting mechanism between the service platform and the application server, thereby solving the fundamental problem that the server address cannot be predicted by the client in an environment without a fixed IP address. Simultaneously, the heartbeat mechanism uses a bidirectional design, allowing the service platform to monitor the reachability of the application server while the application server also monitors the status of the service platform, effectively preventing the entire communication link from being interrupted due to a single point of failure.
[0027] Step 2: Upon receiving a request for an application server's IP address change, the service platform quickly queries the data stored in the service platform for that application server. Based on the requested update information, it promptly updates the existing data and confirms with the requesting application server. This step addresses the critical issues of data consistency and state synchronization between the service platform and application servers. The confirmation mechanism ensures that application servers are fully aware that the latest IP information has been correctly stored by the service platform, preventing information mismatches caused by network packet loss or service platform processing errors. This lays a data foundation for accurate client access in the future.
[0028] Step 3: A client user m under the X application server initiates an access request to the X application server and obtains the updated IP address and user information of the X application server.
[0029] Step 4: There are two scenarios for client user m initiating an access request: 1) If the IP address and related information of application server X have not changed, proceed directly to Step 7. Client user m directly initiates access to application server X, performs authentication through the communication modules between them, and finally achieves access; 2) If the IP address and related information of application server X have changed, client user m establishes a connection with the service platform. Combining the updated IP address and user information received by the service platform in Steps 2 and 3, the service platform authenticates client user m (authentication can use existing main methods: symmetric encryption algorithm or asymmetric encryption algorithm), distinguishing between legitimate and illegitimate client users. By checking whether the application server's IP address and related information have changed, the system avoids clients blindly accessing the service platform every time, optimizing overall access efficiency. Furthermore, the service platform's authentication of the server's IP address effectively prevents unauthorized users from maliciously obtaining the address information of all application servers through the service platform, ensuring the security and controllability of system access from the source.
[0030] Step 5: For legitimate client user m, the service platform queries and locates the relevant information of the X application server, sends the updated IP address and other information of the X application server back to client user m, and achieves point-to-point information transmission through the communication module. For illegitimate clients, the service platform refuses to send back the application server's IP address information.
[0031] Step 6: After receiving the updated IP address and other information of the X application server from the service platform, client user m sends a confirmation message to the service platform to complete the information exchange with the service platform.
[0032] Step 7: After obtaining the updated IP address and other information of the X application server from Step 6, the client user m directly accesses the X application server through the communication module.
[0033] Step 8: When accessing the X application server, if client user m logs in with the corresponding account and password information, the timeout judgment algorithm deployed on the application server will determine the timeout type. If it is a connection timeout, the first step is to check whether the route is reachable; if the service platform is unresponsive, the process will jump to Step 4 to re-establish a connection with the service platform and obtain the corresponding X application server access IP address and other information; if the login is successful, client user m will have successfully accessed the X application server and will be able to conduct normal point-to-point communication.
[0034] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A dynamic access system without a fixed IP address, characterized in that, It includes a service middleware platform, at least one application server, at least one client, and a communication module; The service middle platform communicates with the application server and the client through communication modules. The service middle platform stores the application server's identity information and dynamically updated IP address information, and performs authentication on the client. After obtaining the updated IP address of the application server through the service middle platform, the client directly establishes a communication connection with the application server.
2. The dynamic access system without a fixed IP address according to claim 1, characterized in that, The communication module includes any one of the following protocols: HTTP, HTTPS, WebSocket, or Socket UDP.
3. A dynamic access method without a fixed IP address based on the system described in claim 1, characterized in that, Includes the following steps: The service platform monitors application server IP address updates and client application requests via heartbeats. When the IP address of the application server changes, the application server sends an IP address update request to the service platform. The service platform receives and updates the stored IP address information and then confirms with the application server. The client initiates an access request to the application server to obtain the updated IP address and user information of the application server; If the application server's IP address remains unchanged, the client establishes a connection directly with the application server; if the application server's IP address has changed, the client establishes a connection with the service platform, and the service platform authenticates the client based on the application server's updated IP address and user information. For legitimate clients, the service platform sends the updated IP address information of the application server back to the client. After client confirmation, access is directly established with the application server via the communication module; If the login times out and there is no response, the updated IP address will be obtained again and a reconnection attempt will be made; if the login is successful, the client and the application server will be successfully connected and peer-to-peer communication will proceed normally.
4. The dynamic access method without a fixed IP address according to claim 3, characterized in that, The heartbeat mechanism is bidirectional.
5. The dynamic access method without a fixed IP address according to claim 3, characterized in that, The service platform uses either symmetric or asymmetric encryption algorithms to authenticate clients, distinguishing between legitimate and illegitimate clients.
6. The dynamic access method without a fixed IP address according to claim 4, characterized in that, After authenticating the client, the service platform refuses to provide the application server's IP address information for unauthorized clients.
7. The dynamic access method without a fixed IP address according to claim 4, characterized in that, After the service platform provides updated IP address information, the client and the service platform communicate point-to-point via a communication module.