Intranet and extranet switching method, system, device and storage medium
By installing a main program and a sub-program on a smart terminal, and using the sub-program to monitor the status of the main program to automatically switch between internal and external networks, the problem of users manually switching between internal and external networks on the same computer is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202510278166.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-03-10
AI Technical Summary
Users need to manually switch between internal and external networks when using the same computer, resulting in a poor user experience.
By installing a main program and a secondary program on a smart terminal, the secondary program monitors the running status of the main program and automatically switches between internal and external networks, achieving seamless switching using preset router information.
It simplifies the network switching process for users, improves the user experience, and avoids the tedious process of manual account verification.
Smart Images

Figure CN120200784B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer networks, in particular to an internal and external network switching method, system, device and storage medium. BACKGROUND
[0002] In the current internal and external network isolation management system, due to security reasons, the internal and external network environments cannot be interconnected. If a user needs to use the internal and external network on one computer, the user usually needs to manually perform account verification to enter the internal network (external network) and then manually perform account verification to switch to the external network (internal network), resulting in poor user experience. SUMMARY
[0003] The main purpose of the present application is to provide an internal and external network switching method, system, device and storage medium, which aims to solve the technical problem of poor user experience.
[0004] To achieve the above purpose, the present application provides an internal and external network switching method applied to a service end of a subprogram, which comprises:
[0005] obtaining the running state of a main program, wherein the main program interface is used to display internal network data;
[0006] determining whether network switching is needed based on the running state of the main program;
[0007] if network switching is needed, performing internal and external network switching based on preset router information.
[0008] In an embodiment, the preset router information includes internal network router information. When it is needed to switch the network from the external network to the internal network, the step of performing internal and external network switching based on the preset router information comprises:
[0009] sending a connection request to the internal network router based on the internal network router information read from the local terminal, so that the internal network router obtains the device information of the intelligent terminal through the main program, verifies the intelligent terminal based on the device information, and connects the intelligent terminal to the internal network after verification.
[0010] The internal network router information is sent to the main program after the external network router receives and verifies the account information for logging into the main program, and is stored in the intelligent terminal by the main program.
[0011] In an embodiment, the preset router information further includes external network router information. When it is needed to switch the network from the internal network to the external network, the step of performing internal and external network switching based on the preset router information comprises:
[0012] Based on the router information of the external network, a connection request is sent to the router of the external network, so that the router of the external network accesses the smart terminal to the external network based on the device information of the smart terminal, wherein the router information of the external network and the device information are determined when the smart terminal is connected to the external network with the router of the external network before the running state of the main program is acquired.
[0013] In an embodiment, the step of determining whether network switching is needed based on the running state of the main program comprises:
[0014] When the running state of the main program is detected as background running, it is determined that the network needs to be switched from the internal network to the external network;
[0015] When the running state of the main program is detected as foreground running, it is determined that the network needs to be switched from the external network to the internal network;
[0016] When the running state of the main program is detected as exiting, it is determined that the network needs to be switched from the internal network to the external network.
[0017] In an embodiment, the step of determining whether network switching is needed based on the running state of the main program comprises:
[0018] Based on the running state of the main program and the current network state of the smart terminal, it is determined whether network switching is needed;
[0019] In an embodiment, the step of determining whether network switching is needed based on the running state of the main program and the current network state of the smart terminal comprises:
[0020] When the running state of the main program is detected as background running and the smart terminal is not connected to the external network, it is determined that the network needs to be switched from the internal network to the external network;
[0021] When the running state of the main program is detected as foreground running and the smart terminal is not connected to the internal network, it is determined that the network needs to be switched from the external network to the internal network.
[0022] To achieve the above-mentioned purpose, an internal and external network switching method is provided, which is applied to a server of a main program, and the method comprises:
[0023] In response to an account login operation, account information is sent to the router of the external network, so that the router of the external network verifies the account information, and sends the router information of the internal network to the local when the verification is successful;
[0024] When the router information of the intranet is received, the router information of the intranet is stored locally on the smart terminal, and a program start request is sent to the smart terminal to make the smart terminal open the secondary program.
[0025] In an embodiment, after the step of sending the program start request to the smart terminal, the method further comprises:
[0026] When the intranet connection success information is received, the intranet data is displayed, wherein the intranet connection success information is sent by the secondary program to the local terminal after the smart terminal is successfully connected with the intranet router.
[0027] In addition, to achieve the above-mentioned purpose, the application further provides an intranet and extranet switching system, the server of the main program and the server of the secondary program;
[0028] The server of the main program is configured to send account information to the extranet router in response to an account login operation, to enable the extranet router to verify the account information, and to send the router information of the intranet to the local terminal when the verification is successful, to store the router information of the intranet locally on the smart terminal, and to send a control request to the smart terminal to make the smart terminal open the secondary program.
[0029] The server of the secondary program is configured to obtain the running state of the main program, and the main program interface is configured to display intranet data, to determine whether network switching is required based on the running state of the main program, and to perform intranet and extranet switching based on preset router information if network switching is required.
[0030] In addition, to achieve the above-mentioned purpose, the application further provides an intranet and extranet switching device, which comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the intranet and extranet switching method as described above.
[0031] In addition, to achieve the above-mentioned purpose, the application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the intranet and extranet switching method as described above.
[0032] The one or more technical solutions provided by the application have at least the following technical effects:
[0033] The application is provided with a main program and a subprogram in the intelligent terminal, the subprogram acquires the running state of the main program, determines whether network switching is needed based on the running state of the main program, if network switching is needed, performs internal and external network switching based on preset router information, since the main program interface is used to display internal network data, when switching to the internal network, the user can directly view the internal network data through the main program process, that is, when the user uses the internal and external network on a computer, the subprogram monitors whether the intelligent terminal needs to perform internal and external network switching, and automatically performs internal and external network switching based on preset router information, without the user manually performing account verification to enter the internal network (external network) and then manually performing account verification to switch to the external network (internal network), thereby improving the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0034] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced hereinafter. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
[0036] Figure 1 A flowchart provided for the internal and external network switching method embodiment one of the application;
[0037] Figure 2 A flowchart provided for the internal and external network switching method embodiment two of the application;
[0038] Figure 3 A flowchart provided for the internal and external network switching method embodiment three of the application;
[0039] Figure 4 An architecture diagram of the internal and external network switching system of the embodiment of the application;
[0040] Figure 5 A device structure diagram of the hardware running environment involved in the internal and external network switching method in the embodiment of the application.
[0041] The purpose implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the application, and are not used to limit the application.
[0043] For better understanding of the technical solutions of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments of the specification.
[0044] Based on this, the present application provides an internal and external network switching method, referring to Figure 1 , Figure 1 The flowchart of the first embodiment of the internal and external network switching method of the present application.
[0045] In this embodiment, the internal and external network switching method comprises steps S10-S30:
[0046] Step S10, obtain the running state of the main program, the main program interface is used to display internal network data;
[0047] It should be noted that the internal and external network switching method of the present application is applied to the service end of the secondary program, which can be pre-installed to the intelligent terminal, or can be temporarily called interface, etc., which is not limited here, and the intelligent terminal can also be simultaneously installed with the main program.
[0048] Among them, the main program interface is used to display internal network data, that is, when the intelligent terminal is connected to the internal network, the user can view the internal network data through the main program interface.
[0049] It should be noted that in most enterprise network layouts, including internal and external networks, the internal network usually refers to the computer network within a specific area, used for internal communication, and the external network refers to the network connected to the public Internet. In daily use, sometimes it is necessary to switch between two networks in the same intelligent terminal. And when using internal and external networks on a computer, it is usually necessary to manually verify the account to enter the internal network (external network) and then manually verify the account to switch to the external network (internal network), resulting in poor user experience.
[0050] Usually, if the user wants to use the internal network, the intelligent terminal has already been connected to the external network (i.e. network connection is required to further connect to the internal network). Therefore, the present application installs a main program for displaying internal network data in the intelligent terminal, and the user can view the internal network data through the main program when the internal network is connected, that is, the user opens the main program in the intelligent terminal to use the internal network. Therefore, the main program is used as a medium to display internal network data after connecting to the internal network. Specifically, the user can open the main program and log in to the main program if he wants to use the internal network when the intelligent terminal has already been connected to the external network.
[0051] Step S20, based on the running state of the main program, determine whether network switching is needed;
[0052] If the user does not want to use the intranet, the main program can not be opened, and the extranet is continuously used. It can be understood that whether the user wants to switch the intranet and the extranet can be realized by opening or closing the main program. Therefore, in order to reduce the cumbersome steps of network switching of the user, the running state of the main program is acquired by the service end of the subprogram, and the running of the main program is monitored in real time, so as to determine whether the user wants to switch the intranet and the extranet.
[0053] The running state can be exit, running, etc.
[0054] It can be understood that when the running state of the main program changes, it can be determined that the user needs to switch the network.
[0055] Specifically, the implementation manner of determining whether the network needs to be switched based on the running state of the main program can be:
[0056] When it is detected that the running state of the main program is background running, it is determined that the network needs to be switched from the intranet to the extranet; when it is detected that the running state of the main program is foreground running, it is determined that the network needs to be switched from the extranet to the intranet; and when it is detected that the running state of the main program is exit, it is determined that the network needs to be switched from the intranet to the extranet.
[0057] Specifically, the running state of the main program "running" can be further divided into foreground running and background running. If the user wants to exit the intranet, the main program can be switched to background running (for example, minimizing the main program, computer standby, etc.). When the user wants to use the intranet, the main program can be directly switched to foreground running without the need to log in the main program again, so as to realize network switching and improve the efficiency of network switching.
[0058] Further, when the user does not want to use the intranet for a short time, in order to avoid resource occupation, when it is detected that the running state of the main program is exit, it is determined that the network needs to be switched from the intranet to the extranet.
[0059] In order to more accurately detect the network switching demand of the user, the implementation manner of determining whether the network needs to be switched based on the running state of the main program and the current network state of the intelligent terminal can be further provided.
[0060] Specifically, the implementation manner of determining whether the network needs to be switched based on the running state of the main program and the current network state of the intelligent terminal can be:
[0061] When it is detected that the running state of the main program is background running, and the intelligent terminal is not connected with the extranet, it is determined that the network needs to be switched from the intranet to the extranet; when it is detected that the running state of the main program is foreground running, and the intelligent terminal is not connected with the intranet, it is determined that the network needs to be switched from the extranet to the intranet.
[0062] In order to avoid that the subprogram fails to switch the network for the first time after the running state changes, resulting in that the user cannot normally experience the network switching service, the subprogram can continuously monitor the running state of the main program and the current network state of the intelligent terminal, so as to determine that the network needs to be switched from the intranet to the extranet again for reattempting the network switching when it is detected that the running state of the main program is background running and the intelligent terminal is not connected to the extranet, and determine that the network needs to be switched from the extranet to the intranet again for reattempting the network switching when it is detected that the running state of the main program is foreground running and the intelligent terminal is not connected to the intranet, thereby improving the user experience.
[0063] In step S30, if the network switching is needed, the intranet-extranet switching is performed based on the preset router information.
[0064] Since the intranet and the extranet are two different networks, two routers, i.e., the intranet router and the extranet router, are usually configured. Therefore, the corresponding preset router information includes the router information of the intranet and the router information of the extranet. Specifically, the preset router information can include the device model, the network configuration (IP address, subnet mask, etc.), the wireless setting, etc.
[0065] When the subprogram determines that the network switching is needed, the intranet-extranet switching can be performed based on the preset router information. For example, when it is determined that the network needs to be switched from the intranet to the extranet, the network can be switched from the intranet to the extranet based on the router information of the extranet; and when it is determined that the network needs to be switched from the extranet to the intranet, the network can be switched from the extranet to the intranet based on the router information of the intranet.
[0066] In this embodiment, when the user uses the intranet-extranet network on a computer, the subprogram monitors whether the intelligent terminal needs to perform the intranet-extranet switching, and automatically performs the intranet-extranet switching based on the preset router information, without the need for the user to manually perform the account verification to enter the intranet (extranet) and then manually perform the account verification to switch to the extranet (intranet), thereby simplifying the network switching operation of the user and improving the user experience.
[0067] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can be referred to the above description, and will not be described hereinafter. On this basis, please refer to Figure 2 When the network needs to be switched from the extranet to the intranet, step S10 further includes step S01:
[0068] In step S01, a connection request is sent to the intranet router based on the router information of the intranet read from the local of the intelligent terminal, so that the intranet router acquires the device information of the intelligent terminal through the main program, verifies the intelligent terminal based on the device information, and connects the intelligent terminal to the intranet after the verification.
[0069] It should be noted that the preset router information includes the router information of the intranet, and the router information of the intranet is sent to the main program by the extranet router after the extranet router receives the account information of the login main program, verifies the account information, and is stored to the smart terminal by the main program.
[0070] Specifically, the user inputs the account information through the main program, the main program sends the account information to the extranet router, the extranet router verifies the account information, if the verification is successful, the router information of the intranet is sent to the main program, and the main program stores the router information of the intranet to the smart terminal.
[0071] The router information of the intranet known by the extranet router is pre-configured in the extranet router by the administrator, and the account information can be an account and a password; wherein the user can register the account and the password through the main program, and after registering the account information, the extranet router stores the account information in the corresponding database, and the administrator stores the account information in the corresponding database of the intranet router, so as to facilitate the subsequent verification of the login user information.
[0072] It can be understood that when the subprogram detects that the network needs to be switched from the extranet to the intranet, the router information of the intranet can be read from the local smart terminal, and based on the router information of the intranet, a connection request is sent to the intranet router. After receiving the connection request, in order to ensure network security, the intranet router obtains the device information of the smart terminal to be connected from the main program, verifies the smart terminal based on the device information, and connects the smart terminal to the intranet after the verification is passed. If the verification fails, delete the information of the login account in the database; wherein the device information includes hardware information, network information (MAC address, IP address, etc.).
[0073] That is, the extranet router and the intranet router do not directly interact, but the device information is verified through the main program, that is, the extranet and the intranet are still in an isolated state, thereby ensuring network security.
[0074] Further, the preset router information also includes the router information of the extranet, and when the network needs to be switched from the intranet to the extranet, the implementation of the extranet router based on the preset router information can be:
[0075] Based on the router information of the extranet, a connection request is sent to the extranet router, so that the extranet router connects the smart terminal to the extranet based on the device information of the smart terminal, wherein the router information of the extranet and the device information are determined when the smart terminal is connected to the extranet router before obtaining the running state of the main program.
[0076] It should be noted that before the user logs in the main program, the intelligent terminal has been connected to the external network, that is, the main program knows the router information of the external network and the device information of the intelligent terminal. After the user logs in the main program, the main program can send the router information of the external network and the device information of the intelligent terminal to the secondary program.
[0077] Further, when the secondary program detects that the network needs to be switched from the internal network to the external network, the secondary program can send a connection request to the external network router based on the router information of the external network. The external network router directly connects the intelligent terminal to the external network based on the device information of the intelligent terminal, without the need for device verification.
[0078] In this embodiment, through the preset router information and the automatic network switching mechanism, the user's demand is intelligently recognized, and the internal and external network switching operation can be completed without direct user intervention. With the cooperative work of the main program and the secondary program, the internal and external network switching is simplified, the internal and external network isolation is ensured, and the network security is improved.
[0079] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as the above embodiments can be referred to the above introduction, and will not be repeated hereinafter. On this basis, the present application provides another internal and external network switching method, which is described with reference to Figure 3 , Figure 3 The flowchart of the third embodiment of the internal and external network switching method of the present application is shown.
[0080] In this embodiment, the internal and external network switching method includes steps A10-A20:
[0081] Step A10, in response to an account login operation, sending account information to an external network router for the external network router to verify the account information, and sending router information of an internal network to the local when the verification is successful.
[0082] It should be noted that the internal and external network switching method of the present application is applied to the server of the main program. The user can log in the main program by inputting account information to the main program. The server of the main program sends the account information to the external network router in response to the account login operation. The external network router verifies the account information, and sends the router information of the internal network to the local when the verification is successful.
[0083] Step A20, when the router information of the internal network is received, storing the router information of the internal network to the local of the intelligent terminal, and sending a program start request to the intelligent terminal to make the intelligent terminal open the secondary program. The secondary program determines whether network switching is needed based on the running state of the local, and performs internal and external network switching based on the preset router information when the network switching is needed.
[0084] Further, when the router information of the intranet is received, the main program stores the router information of the intranet to the local smart terminal, so that the sub-program reads the router information of the intranet when needed; the main program also sends a program starting request to the smart terminal, the smart terminal opens the sub-program, the sub-program determines whether network switching is needed based on the local running state, and when network switching is needed, the intranet and the extranet are switched based on the preset router information.
[0085] It can be understood that the user only needs to input the account information and perform verification when logging in the main program for the first time, and the account input and verification are not needed for the intranet and extranet switching occurring in between until the main program is closed, thereby reducing the workload of the user.
[0086] Further, after the step of sending the program starting request to the smart terminal, the following step can also be performed: when the intranet connection success information is received, the intranet data is displayed, wherein the intranet connection success information is sent to the local smart terminal by the sub-program after the smart terminal is successfully connected with the intranet router.
[0087] Specifically, after the smart terminal is successfully connected with the intranet router, the sub-program sends the intranet connection success information to the main program, and the main program displays the intranet data in the interface after receiving the message; if the connection fails, the user can be prompted to seek help from the administrator.
[0088] In the embodiment, when the user uses the intranet and extranet on a computer, the sub-program monitors whether the smart terminal needs to perform intranet and extranet switching, and automatically performs intranet and extranet switching based on the preset router information, without the need for the user to manually perform account verification to enter the intranet (extranet) and then manually perform account verification to switch to the extranet (intranet), thereby simplifying the network switching operation of the user and improving the user experience.
[0089] It should be noted that the above examples are only used for understanding the present application and do not limit the intranet and extranet switching method of the present application, and more forms of simple transformation based on the technical concept are within the protection scope of the present application.
[0090] The present application also provides an intranet and extranet switching system, please refer to Figure 4 , the server of the main program and the server of the sub-program of the intranet and extranet switching program;
[0091] The server 10 of the main program is used for sending the account information to the extranet router in response to the account login operation, so that the extranet router verifies the account information, and sends the router information of the intranet to the local smart terminal when the verification is successful, and sends a control request to the smart terminal when the router information of the intranet is received, so that the smart terminal opens the sub-program.
[0092] The server 20 of the subprogram is configured to acquire a running state of the main program, the main program interface is configured to display intranet data, and based on the running state of the main program, it is determined whether network switching is needed, and if network switching is needed, based on preset router information, intranet and extranet switching is performed.
[0093] The internal and external network switching system provided in the present application adopts the internal and external network switching method in the above embodiments, and can solve the technical problem of poor user experience. Compared with the prior art, the internal and external network switching system provided in the present application has the same beneficial effects as the internal and external network switching method provided in the above embodiments, and other technical features in the internal and external network switching system are the same as the features disclosed in the above embodiments, which will not be repeated here.
[0094] The present application provides an internal and external network switching device, which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the internal and external network switching method in the above embodiment one.
[0095] Reference will be made to the following Figure 5 which shows a structural schematic diagram of an internal and external network switching device suitable for implementing the embodiments of the present application. The internal and external network switching device in the embodiments of the present application can include but is not limited to mobile terminals such as mobile phones, tablet computers, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The internal and external network switching device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0096] As Figure 5As shown, the intranet-extranet switching device can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. Various programs and data required for operation of the intranet-extranet switching device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the intranet-extranet switching device to communicate wirelessly or by wire with other devices to exchange data. Although the intranet-extranet switching device with various systems is shown in the figure, it should be understood that all of the systems shown are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.
[0097] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.
[0098] The intranet-extranet switching device provided by the present disclosure adopts the intranet-extranet switching method in the above embodiments, and can solve the technical problem of poor user experience. Compared with the prior art, the intranet-extranet switching device provided by the present disclosure has the same beneficial effects as the intranet-extranet switching method provided by the above embodiments, and other technical features in the intranet-extranet switching device are the same as the features disclosed in the above embodiments, which will not be repeated here.
[0099] It should be understood that portions of the application disclosed can be implemented in hardware, software, firmware, or combinations thereof. In the description of the embodiments above, specific features, structures, materials or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0100] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Any changes and modifications that can be made to the application in accordance with the principles of the application would be readily apparent to those skilled in the art and the present application is therefore not limited to the description and examples contained herein but is only limited by the claims.
[0101] The application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. a computer program) for performing the internal and external network switching method in the above embodiments.
[0102] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
[0103] The above computer readable storage medium can be contained in the internal and external network switching device; or can exist separately and not be assembled into the internal and external network switching device.
[0104] The above computer readable storage medium carries one or more programs, which, when executed by the internal and external network switching device, cause the internal and external network switching device to perform the above internal and external network switching method.
[0105] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0106] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0107] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0108] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the above-mentioned internal and external network switching method, and can solve the technical problem of poor user experience. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the internal and external network switching method provided by the above-mentioned embodiments, and will not be described here.
[0109] The above merely describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation, direct / indirect application in other related technical fields, or the like, which is made based on the technical concept of the present application and the content of the specification and drawings, is included in the patent protection scope of the present application.
Claims
1. An interworking method between an intranet and an extranet, characterized by, The application is applied to a server of a subprogram, and the method comprises the following steps: acquiring a running state of a main program, wherein the main program interface is used for displaying intranet data; determining whether network switching is needed based on the running state of the main program; if network switching is needed, performing intranet-extranet switching based on preset router information, wherein the preset router information comprises intranet router information; when network switching from the extranet to the intranet is needed, the step of performing intranet-extranet switching based on the preset router information comprises the following steps: sending a connection request to the intranet router based on the intranet router information read from the local of the intelligent terminal, so that the intranet router acquires the device information of the intelligent terminal through the main program, verifies the intelligent terminal based on the device information, and connects the intelligent terminal to the intranet after verification; the intranet router information is sent to the main program by the extranet router after the account information for logging into the main program is received and verified, and is stored in the intelligent terminal by the main program, wherein the account information is pre-stored in the databases corresponding to the extranet server and the intranet server respectively.
2. The method of claim 1, wherein, the preset router information further comprises extranet router information, and when network switching from the intranet to the extranet is needed, the step of performing intranet-extranet switching based on the preset router information comprises the following steps: sending a connection request to the extranet router based on the extranet router information, so that the extranet router connects the intelligent terminal to the extranet based on the device information of the intelligent terminal, wherein the extranet router information and the device information are determined when the intelligent terminal is connected to the extranet with the extranet router before the running state of the main program is acquired.
3. The method of any one of claims 1 to 2, wherein, the step of determining whether network switching is needed based on the running state of the main program comprises the following steps: when it is detected that the running state of the main program is background running, it is determined that network switching from the intranet to the extranet is needed; when it is detected that the running state of the main program is foreground running, it is determined that network switching from the extranet to the intranet is needed; when it is detected that the running state of the main program is exit, it is determined that network switching from the intranet to the extranet is needed.
4. The method of any one of claims 1 to 2, wherein, the step of determining whether network switching is needed based on the running state of the main program comprises the following steps: determining whether network switching is needed based on the running state of the main program and the current network state of the intelligent terminal; the step of determining whether network switching is needed based on the running state of the main program and the current network state of the intelligent terminal comprises the following steps: when it is detected that the running state of the main program is background running and the intelligent terminal is not connected to the extranet, it is determined that network switching from the intranet to the extranet is needed; when it is detected that the running state of the main program is foreground running and the intelligent terminal is not connected to the intranet, it is determined that network switching from the extranet to the intranet is needed.
5. An interworking method between an intranet and an extranet, characterized by, the application is applied to a server of a main program, and the method comprises the following steps: In response to the account login operation, the account information is sent to the external network router for verification by the external network router, and when the verification is successful, the router information of the internal network is sent to the local network, wherein the account information is pre-stored in the databases corresponding to the external network server and the internal network server respectively; When the router information of the internal network is received, the router information of the internal network is stored locally in the smart terminal, and a program start request is sent to the smart terminal to open the secondary program, and the secondary program determines whether network switching is required based on the running state of the local network, and when network switching is required, the internal and external network switching is performed based on the preset router information, and when the network needs to be switched from the external network to the internal network, the secondary program sends a connection request to the internal network router based on the router information of the internal network read from the local smart terminal, so that the internal network router obtains the device information of the smart terminal through the local network, verifies the smart terminal based on the device information, and after verification, the smart terminal is connected to the internal network.
6. The method of claim 5, wherein, After the step of sending the program start request to the smart terminal, the method further comprises: When the internal network connection success information is received, the internal network data is displayed, wherein the internal network connection success information is sent by the secondary program to the local network after the smart terminal and the internal network router are successfully connected.
7. An interworking system between an intranet and an extranet, characterized by comprising: The server of the internal and external network switching main program and the server of the secondary program; The server of the main program is configured to send account information to the external network router in response to an account login operation, so that the external network router verifies the account information, and when the verification is successful, the router information of the internal network is sent to the local network. When the router information of the internal network is received, the router information of the internal network is stored locally in the smart terminal, and a control request is sent to the smart terminal to open the secondary program; The server of the secondary program is configured to obtain the running state of the main program, and the main program interface is configured to display internal network data. Based on the running state of the main program, it is determined whether network switching is required. If network switching is required, the internal and external network switching is performed based on the preset router information. When the network needs to be switched from the external network to the internal network, a connection request is sent to the internal network router based on the router information of the internal network read from the local smart terminal, so that the internal network router obtains the device information of the smart terminal through the main program, verifies the smart terminal based on the device information, and after verification, the smart terminal is connected to the internal network. The router information of the internal network is sent by the external network router to the main program after receiving the login account information of the main program and verifying the account information, and is stored in the smart terminal by the main program. The account information is pre-stored in the databases corresponding to the external network server and the internal network server respectively.
8. A device for switching between internal and external networks, characterized in that, The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the internal and external network switching method according to any one of claims 1 to 6.
9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program. The computer program is executed by the processor to implement the steps of the internal and external network switching method in any one of claims 1 to 6.
Citation Information
Patent Citations
Router intranet access method, system and equipment and readable storage medium
CN112291279A
Network link switching method and device, electronic equipment and storage medium
CN112615860A