Intranet and extranet connection method and terminal
By automatically loading intranet resource addresses on web pages and monitoring the results, the complexity and instability of traditional VPN connections are resolved, enabling seamless intranet and extranet connections, improving user experience and simplifying operation.
Patent Information
- Application Number
- CN202310420172.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-04-19
Smart Images

Figure CN116436728B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of network data processing, in particular to an internal and external network connection method and terminal. BACKGROUND
[0002] Traditional VPN (Virtual Private Network) applications are generally used in the case that users are in an Internet environment and need to connect with internal related networks. A common and feasible method is to use VPN network applications to establish a private network (internal related network) on a public network (Internet), and the VPN network channel between the public network and the private network also uses an encrypted communication method, which ensures network accessibility and data security.
[0003] Generally, enterprise application systems are deployed in internal related networks, and the Internet accesses and connects through a VPN network channel to realize access to the internal network and access of the internal application system in the Internet regional network. However, in the Internet environment, the user client environment needs to install a VPN related client in advance, and after installation, the user needs to manually open the VPN client in advance. After the VPN connection is connected, the internal related network is connected, and then the internal application system is opened for access. For these series of operation steps, most of them need to be manually implemented by the user, and the user operation experience is extremely poor, and the steps are numerous. Sometimes, after the VPN is connected, the internal related network is not ready for connection. At the user level, the network may be connected because the VPN is connected, but in actual operation, the internal application system cannot be accessed. Not only does the user experience complain a lot, but also the system increases the additional operation and maintenance workload. The connection process between the application system in the public network and the VPN network channel is complex, and seamless connection cannot be achieved. SUMMARY
[0004] The technical problem to be solved by the present application is to provide an internal and external network connection method and terminal to realize user-side non-inductive internal and external network connection.
[0005] To solve the above technical problems, a technical solution adopted by the present application is:
[0006] An internal and external network connection method, comprising the steps of:
[0007] loading resources on a webpage according to a pre-configured internal network resource address to obtain a resource loading result;
[0008] if the resource loading result is successful, sending an internal network connection prompt;
[0009] if the resource loading result is unsuccessful, waking up a VPN client to perform a connection operation, and then returning to perform the step of loading internal network resources on a webpage according to a pre-configured internal network resource address.
[0010] To solve the above technical problems, another technical solution adopted by the present application is:
[0011] An internal and external network connection terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0012] According to the pre-configured internal network resource address, the resource is loaded on the webpage to obtain a resource loading result;
[0013] If the resource loading result is successful, an internal network connection prompt is sent;
[0014] If the resource loading result is unsuccessful, the VPN client is woken up to perform a connection operation, and then the step of loading the resource on the webpage according to the pre-configured internal network resource address is returned.
[0015] The present application has the beneficial effect that: the resource is loaded on the webpage through the pre-configured internal network resource address, the loading result of the resource is obtained, if the resource can be successfully loaded, it indicates that the actual network access of the internal and external networks has been established under the condition of the VPN dial-up connection, that is, the external network can access the internal network through the VPN network channel at this time, then the internal network connection prompt is sent, the user can know that the internal network has been successfully connected, and then the subsequent related operation is performed; if the resource loading result is unsuccessful, the VPN client is automatically woken up to perform the connection operation again, and the step of loading the resource through the internal network resource address is returned, since the whole process is automatically executed to reconnect, the user side can realize no feeling, the user only needs to directly perform the subsequent operation after obtaining the internal network connection signal, the manual operation of the user is released, and the process of the internal and external network connection is simplified. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 The step flow chart of an internal and external network connection method of the embodiment of the present application;
[0017] Figure 2 The structural schematic diagram of an internal and external network connection terminal of the embodiment of the present application;
[0018] Label explanation:
[0019] 1. An internal and external network connection terminal; 2. A processor; 3. A memory. DETAILED DESCRIPTION
[0020] To explain the technical content, the achieved purposes and effects of the present application in detail, the following is explained in combination with the embodiments and the drawings.
[0021] Please refer to Figure 1A method for connecting an internal network and an external network, comprising the steps of:
[0022] loading resources on a webpage according to a preconfigured internal network resource address to obtain a resource loading result;
[0023] if the resource loading result is successful, sending a prompt that the internal network is connected;
[0024] if the resource loading result is unsuccessful, waking up a VPN client to perform a connection operation, and then returning to the step of loading resources on the webpage according to the preconfigured internal network resource address.
[0025] From the above description, the beneficial effects of the present application are that resources are loaded on a webpage according to a preconfigured internal network resource address to obtain a resource loading result, if the resources can be successfully loaded, it indicates that the actual network access between the internal network and the external network has been established in the case of VPN dial-up connection, that is, the external network can access the internal network through the VPN network channel, and then a prompt that the internal network is connected is sent, so that the user can know that the internal network has been successfully connected, and then perform subsequent operations; if the resource loading result is unsuccessful, the VPN client is automatically woken up to perform a connection operation again, and then the step of loading resources on the webpage according to the internal network resource address is performed, and the whole process is automatically performed to reconnect, so that the user side can be realized without feeling, and the user only needs to directly perform subsequent operations after receiving the prompt that the internal network is connected, thereby liberating the user from manual operation and simplifying the process of connecting the internal network and the external network.
[0026] Further, the step of loading resources on the webpage according to the preconfigured internal network resource address comprises the steps of:
[0027] deploying a preset webpage on the external network;
[0028] obtaining at least one resource tag on the webpage, and setting the resource address of the resource corresponding to the resource tag as an internal network resource address.
[0029] From the above description, the webpage is deployed on the external network, so that the webpage can be accessed first in the case that the internal network and the external network have not been connected, and the user experience is not affected by directly jumping out of the access failure when accessing the webpage and being unable to continue subsequent operations, and by setting the resource address of the resource corresponding to the at least one resource tag as the internal network resource address, the unsuccessful loading of part of the resources does not affect the overall display of the webpage, and the loading result can be easily obtained, and the system cross-domain problem caused by accessing the internal network webpage is avoided.
[0030] Further, the step of loading resources on the webpage according to the preconfigured internal network resource address to obtain a resource loading result comprises the steps of:
[0031] obtaining a resource tag, loading a resource through a resource address corresponding to the resource tag;
[0032] setting a listener, listening to a loading event corresponding to the resource tag through the listener, and obtaining a resource loading result.
[0033] As can be seen from the above description, the resource loading result is obtained by loading the resource through the resource address corresponding to the resource tag and setting the listener to listen to the loading event corresponding to the resource tag with the resource address being an intranet resource address. The resource loading result can be automatically obtained by constructing the listener without the user needing to pay extra attention.
[0034] Further, if the resource loading result is successful, the method further comprises:
[0035] obtaining a system address corresponding to a target intranet application system;
[0036] opening the target intranet application system according to the system address.
[0037] As can be seen from the above description, if the resource loading result is successful, the target intranet system is automatically accessed according to the system address, and the target intranet application system to be accessed is directly opened for the user, further simplifying the operation steps of the user. From the perspective of the user experience, the user does not need to know the connection result of the intranet and the extranet, and only needs to be able to successfully access the target intranet application system in the intranet in the extranet. Therefore, when the loading result is successful, the corresponding target intranet application system is directly opened, which can provide a better user experience.
[0038] Further, the method further comprises:
[0039] waking up the VPN client to perform a connection operation through an AppLink protocol.
[0040] As can be seen from the above description, both opening the webpage and loading the resource are performed on the webpage side. At this time, the AppLink protocol is used to directly wake up the VPN client from the webpage side, so that the user does not need to manually operate, the connection operation can be automatically performed through the VPN client, the connection channel between the intranet and the extranet is re-established, and the verification of whether the channel can be accessed is performed in a loop. The entire retry process is non-intrusive to the user side, thereby improving the user experience.
[0041] An intranet-extranet connection terminal comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0042] loading a resource on a webpage according to a pre-configured intranet resource address, and obtaining a resource loading result;
[0043] If the resource loading result is successful, an intranet connection prompt is sent.
[0044] If the resource loading result is unsuccessful, the VPN client is woken up to perform a connection operation, and then the step of loading resources on the webpage according to the preconfigured intranet resource address is returned to.
[0045] The present application has the beneficial effect that resources are loaded on the webpage through a preconfigured intranet resource address, and the loading result of the resources is obtained. If the resources can be successfully loaded, it indicates that the actual network access between the intranet and the extranet has been established in the case of VPN dial-up connection, that is, the extranet can access the intranet through the VPN network channel at this time, and an intranet connection prompt is sent. The user can know that the intranet has been successfully connected, so as to perform subsequent related operations. If the resource loading result is unsuccessful, the VPN client is automatically woken up to perform a connection operation, and the step of loading resources through the intranet resource address is returned to. Since the entire process is automatically executed to reconnect, the user side can be implemented without feeling, and the user only needs to directly perform subsequent operations after obtaining the intranet connection prompt, thereby liberating the user from manual operation and simplifying the process of intranet and extranet connection.
[0046] Further, the step of loading resources on the webpage according to the preconfigured intranet resource address comprises:
[0047] A preset webpage is deployed on the extranet.
[0048] At least one resource tag on the webpage is obtained, and the resource address of the resource corresponding to the resource tag is set as an intranet resource address.
[0049] As described above, the webpage is deployed on the extranet, so that the webpage can be accessed first in the case that the intranet and the extranet have not been connected, avoiding the situation that the user experience is affected by the prompt of access failure and the inability to continue subsequent operations when the webpage is accessed. Moreover, by setting the resource address corresponding to at least one resource tag as an intranet resource address, the unsuccessful loading of part of the resources will not affect the overall display of the webpage, and the loading result can be easily obtained, thereby avoiding the system cross-domain problem caused by accessing the intranet webpage.
[0050] Further, the step of loading resources on the webpage according to the preconfigured intranet resource address comprises:
[0051] A resource tag is obtained, and resources are loaded through the resource address corresponding to the resource tag.
[0052] A listening program is set, and a loading event corresponding to the resource tag with the intranet resource address is listened to through the listening program to obtain the resource loading result.
[0053] From the above description, the resource is loaded through the resource address corresponding to the resource tag, and the loading event corresponding to the resource tag whose resource address is the intranet resource address is listened to by setting the listener, so as to realize the acquisition of the resource loading result. The resource loading result can be automatically acquired by constructing the listener without the user's additional attention.
[0054] Further, if the resource loading result is successful, the method further comprises:
[0055] Acquiring a system address corresponding to the target intranet application system;
[0056] Opening the target intranet application system according to the system address.
[0057] From the above description, if the resource loading result is successful, the target intranet system is automatically accessed according to the system address, and the target intranet application system to be accessed is directly opened for the user, thereby further simplifying the operation steps of the user. From the user's experience, it is not necessary to know the connection result of the intranet and the extranet, and it is only necessary to be able to successfully access the target intranet application system in the intranet in the extranet. Therefore, when the loading result is successful, the corresponding target intranet application system is directly opened, thereby providing the user with better use experience.
[0058] Further, the method further comprises:
[0059] The VPN client is woken up to perform the connection operation through the AppLink protocol.
[0060] From the above description, the opening of the webpage and the loading of the resource are both performed on the webpage side. At this time, the AppLink protocol is used to directly wake up the VPN client from the webpage side, so that the user does not need to manually operate, the connection operation can be automatically performed through the VPN client, the connection channel between the intranet and the extranet is re-established, and the verification of whether the channel can be accessed is circularly performed. The entire retry process is non-intrusive on the user side, thereby improving the use experience of the user.
[0061] The above-mentioned intranet and extranet connection method and terminal can be applied to a scenario in which the intranet needs to be accessed in the extranet, for example, a scenario in which an application system or a webpage in the intranet needs to be accessed. The following will be described through a specific embodiment.
[0062] Please refer to Figure 1 The embodiment one of the present application is:
[0063] An intranet and extranet connection method, comprising the steps of:
[0064] S01, a preset webpage is deployed on the extranet;
[0065] S02. Obtain at least one resource tag on the webpage, and set the resource address of the resource corresponding to the resource tag as the intranet resource address;
[0066] In one optional implementation, the preset webpage can be a preset webpage system configured with relevant information to guide and remind users, such as reminders like "Network is currently being tested, please wait." This allows users to know the current connection status, giving them a psychological expectation and further improving the user experience. Initially, the user's network environment is the external network. After opening the webpage system, the system automatically loads a resource with an internal network resource address to determine whether the internal and external networks are connected. If the webpage is directly set up on the internal network, the user cannot access the entire webpage or obtain configuration guidance or prompts if there is no connection to the internal network, resulting in a poor user experience. However, by setting up the webpage / preset webpage system on the external network, since it is a B / S system, the system loads the internal network address through the resource address in the webpage / preset webpage system for judgment, which is simple and convenient. It can directly identify the current connection status of the internal and external networks. Compared to loading an internal network address through AJAX in the webpage / preset webpage system, there is no cross-domain issue.
[0067] For example, if you set the src attribute of the HTML resource tag img to an internal network resource address, the resource corresponding to the img will be retrieved based on the internal network resource address when the corresponding webpage is loaded; other resource tags in HTML can achieve the same effect.
[0068] S1. Load resources onto the webpage according to the pre-configured intranet resource address, and obtain the resource loading result, including:
[0069] S11. Obtain resource tags and load resources through the resource addresses corresponding to the resource tags;
[0070] S12. Set up a listening program to monitor the loading events corresponding to resource tags whose resource addresses are internal network resource addresses, and obtain the resource loading results. If the resource loading result is successful, execute step S2; if the resource loading result is unsuccessful, execute step S3. If there are inconsistent resource loading results corresponding to resource tags, execute step S4. Inconsistent resource loading results mean that when the resource tag is greater than 1, there are resource tags with both successful and unsuccessful resource loading results.
[0071] S2. Send a notification that the intranet is now connected;
[0072] In an alternative embodiment, if the resource loading result is successful, the system address corresponding to the target intranet application system is obtained; the target intranet application system is opened according to the system address; it can be performed simultaneously with the sending of the intranet connection prompt, or it can replace the step of sending the intranet connection prompt;
[0073] S3, increase the number of cycles by 1, and determine whether the number of cycles reaches a preset value, if yes, output a fault prompt alarm, otherwise, wake up the VPN client to perform a connection operation, and return to execute step S1;
[0074] The wake-up VPN client to perform a connection operation includes: waking up the VPN client to perform a connection operation through an AppLink protocol (a protocol in a URL), which can directly open a local VPN client in a web environment, improve the continuity of operation, and avoid manual operation of the user; the VPN client is a client capable of establishing a connection channel between the intranet and the extranet in the prior art;
[0075] Step S4 includes the following steps:
[0076] S41, obtain all resource loading results and time information corresponding to the resource loading results;
[0077] S42, sort the resource loading results according to the time information, and obtain the latest target resource loading result, if the target resource loading result is successful, execute S43; if the target resource loading result is failed, execute S44;
[0078] S43, randomly select a resource label to execute S1 again to obtain the resource loading result, if it is still successful, execute S2; if it is failed, output a connection unstable prompt;
[0079] S44, randomly select a resource label to execute S1 for a preset number of times or randomly select multiple resource labels to execute S1 simultaneously, obtain the resource loading results for a preset number of times, if all are successful, execute S2; if there are both successful and failed, output a connection unstable prompt; if all are failed, output a fault prompt alarm;
[0080] If one resource label is configured, the quality of network connection cannot be obtained through one resource loading result, if multiple resource labels are configured but the resource loading results are different, whether the last connection is successful can be known through the appearance time of resource loading result, if the last connection is successful, it can be that the previous connection is unstable or the successful connection is just established, therefore, a resource label is randomly selected again to obtain resources, if it is also successful, it indicates that the connection is successful, if it fails, it indicates that the established connection is unstable, if the last resource loading result is failure, it indicates that the connection is successfully established before, if the results obtained by loading a resource label for a preset number of times or loading a preset number of resource labels are all successful, it indicates that the connection is stable, if there are both success and failure, it indicates that the connection is unstable, if all are failure, it indicates that a fault can occur, on the basis of realizing the judgment of whether the connection is successful, the judgment of connection stability, i.e., quality, is further realized.
[0081] Please refer to Figure 2 Embodiment two of the present application is:
[0082] An internal and external network connection terminal 1, comprising a processor 2, a memory 3 and a computer program stored in the memory 3 and capable of running on the processor 2, the processor 2 implements each step in embodiment one when the computer program is executed.
[0083] In summary, the present application provides an internal and external network connection method and terminal, from network discrimination, opening the overall processing of the internal application system, two-step connection, automatic processing, greatly improving the user experience in the use of VPN network environment, i.e., improving the user experience of access between internal and external networks, and the process from opening the preset web page in the external network to opening the target internal network application system can be automatically realized, without manual operation of the user, realizing the user side non-sense of the process.
[0084] The above is only an embodiment of the present application, and does not limit the patent range of the present application, any equivalent transformation or direct or indirect application in related technical fields using the content of the present application specification and drawings are also included in the patent protection range of the present application.
Claims
1. A method of connecting an intranet and an extranet, characterized by, The method comprises the steps of: loading a resource on a webpage according to a preconfigured intranet resource address, obtaining a resource loading result; if the resource loading result is successful, sending an intranet connection prompt; if the resource loading result is unsuccessful, waking up a VPN client to perform a connection operation, and then returning to the step of loading the resource on the webpage according to the preconfigured intranet resource address; before the step of loading the resource on the webpage according to the preconfigured intranet resource address, the method further comprises the steps of: providing a preset webpage, which is deployed on an extranet; and obtaining at least one resource tag on the webpage, and setting an intranet resource address as a resource address of a resource corresponding to the resource tag.
2. The method of claim 1, wherein, The step of loading the resource on the webpage according to the preconfigured intranet resource address, obtaining the resource loading result, comprises the steps of: obtaining a resource tag, and loading a resource through a resource address corresponding to the resource tag; setting a listener, and listening to a loading event corresponding to the resource tag through the listener, to obtain the resource loading result.
3. The method of claim 1, wherein, If the resource loading result is successful, the method further comprises the steps of: obtaining a system address corresponding to a target intranet application system; and opening the target intranet application system according to the system address.
4. The method of claim 1, wherein, The step of waking up the VPN client to perform the connection operation comprises the step of: waking up the VPN client to perform the connection operation through an AppLink protocol.
5. An intranet-extranet connection terminal, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: loading a resource on a webpage according to a preconfigured intranet resource address, obtaining a resource loading result; if the resource loading result is successful, sending an intranet connection prompt; if the resource loading result is unsuccessful, waking up a VPN client to perform a connection operation, and then returning to the step of loading the resource on the webpage according to the preconfigured intranet resource address; before the step of loading the resource on the webpage according to the preconfigured intranet resource address, the method further comprises the steps of: providing a preset webpage, which is deployed on an extranet; and obtaining at least one resource tag on the webpage, and setting an intranet resource address as a resource address of a resource corresponding to the resource tag.
6. The inner-outer network connection terminal according to claim 5, wherein The step of loading the resource on the webpage according to the preconfigured intranet resource address, obtaining the resource loading result, comprises the steps of: obtaining a resource tag, and loading a resource through a resource address corresponding to the resource tag; setting a listener, and listening to a loading event corresponding to the resource tag through the listener, to obtain the resource loading result.
7. The inner-outer network connection terminal according to claim 5, wherein If the resource loading result is successful, the method further comprises the steps of: obtaining a system address corresponding to a target intranet application system; and opening the target intranet application system according to the system address.
8. The inner-outer network connection terminal according to claim 5, wherein The step of waking up the VPN client to perform the connection operation comprises the step of: waking up the VPN client to perform the connection operation through an AppLink protocol.
Citation Information
Patent Citations
Network connection processing method and device and terminal equipment
CN105429800A