Internal and external network switching method, system and equipment and storage medium
By installing the main program and the secondary program on the smart terminal, the internal and external network switching is automatically solved, and the user experience is improved.
Patent Information
- Application Number
- CN202510278166.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-10
AI Technical Summary
In the internal and external network isolation management system, users need to manually verify the account to enter the intranet or external network, and manually verify it again during the switch, resulting in poor user experience.
By installing the main program and the secondary program on the smart terminal, the secondary program obtains the running status of the main program, determines whether network switching is required, and automatically switches internal and external networks based on preset router information.
There is no need for users to manually verify and switch accounts, which simplifies the network switching process and improves user experience.
Smart Images

Figure CN120200784A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer network technologies, and particularly to an internal and external network switching method, system, device, and storage medium. Background Art
[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 networks on a computer, usually after manually verifying the account to enter the internal network (external network), the user then needs to manually verify the account again to switch to the external network (internal network), resulting in a poor user experience. Summary of the Invention
[0003] The main purpose of this application is to provide an internal and external network switching method, system, device, and storage medium, aiming to solve the technical problem of poor user experience.
[0004] To achieve the above purpose, this application proposes an internal and external network switching method, which is applied to the server of a sub-program. The method includes:
[0005] Obtain the running status of the main program, where the main program interface is used to display internal network data;
[0006] Based on the running status of the main program, determine whether network switching is required;
[0007] If network switching is required, perform internal and external network switching based on preset router information.
[0008] In one embodiment, the preset router information includes the router information of the internal network. When it is necessary 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 includes:
[0009] Based on the router information of the internal network read locally from the intelligent terminal, send a connection request to the internal network router, so that the internal network router can obtain the device information of the intelligent terminal through the main program, verify the intelligent terminal based on the device information, and connect the intelligent terminal to the internal network after the verification passes;
[0010] Among them, the router information of the internal network is sent by the external network router to the main program after verifying the account information for logging in to the main program, and is stored by the main program in the intelligent terminal.
[0011] In one embodiment, the preset router information further includes the router information of the external network. When it is necessary 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 includes:
[0012] Based on the router information of the external network, send a connection request to the external network router, so that the external network router can connect the smart terminal to the external network based on the device information of the smart terminal. Among them, both the router information of the external network and the device information are determined when the smart terminal makes an external network connection with the external network router before obtaining the running state of the main program.
[0013] In one embodiment, the step of determining whether network switching is required based on the running state of the main program includes:
[0014] 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 internal network to the external network;
[0015] 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 external network to the internal network;
[0016] When it is detected that the running state of the main program is exited, it is determined that the network needs to be switched from the internal network to the external network.
[0017] In one embodiment, the step of determining whether network switching is required based on the running state of the main program includes:
[0018] Based on the running state of the main program and the current network state of the smart terminal, determine whether network switching is required;
[0019] Among them, the step of determining whether network switching is required based on the running state of the main program and the current network state of the smart terminal includes:
[0020] When it is detected that the running state of the main program is 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 it is detected that the running state of the main program is 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 object, the present application proposes an internal and external network switching method, which is applied to the server of the main program. The method includes:
[0023] In response to an account login operation, send the account information to the external network router, so that the external network router can verify the account information and send the router information of the internal network to the local when the verification is successful;
[0024] When receiving the router information of the intranet, store the router information of the intranet locally in the intelligent terminal, and send a program startup request to the intelligent terminal to enable the intelligent terminal to open a sub-program. The sub-program determines whether network switching is required based on the local operating status, and when network switching is required, performs internal and external network switching based on the preset router information.
[0025] In one embodiment, after the step of sending a program startup request to the intelligent terminal, the method further includes:
[0026] When receiving the information that the intranet connection is successful, display the intranet data, where the information that the intranet connection is successful is sent to the local by the sub-program after successfully connecting the intelligent terminal to the intranet router.
[0027] In addition, to achieve the above object, the present application also proposes an internal and external network switching system, including a server of the internal and external network switching main program and a server of the sub-program;
[0028] The server of the main program is configured to, in response to an account login operation, send the account information to the external network router for the external network router to verify the account information, and when the verification is successful, send the router information of the internal network to the local. When receiving the router information of the internal network, store the router information of the internal network locally in the intelligent terminal, and send a control request to the intelligent terminal to enable the intelligent terminal to open the sub-program;
[0029] The server of the sub-program is configured to obtain the operating status of the main program. The main program interface is used to display the internal network data. Based on the operating status of the main program, determine whether network switching is required. If network switching is required, perform internal and external network switching based on the preset router information.
[0030] In addition, to achieve the above object, the present application also proposes an internal and external network switching device, where the device includes: 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 as described above.
[0031] In addition, to achieve the above object, the present application also proposes a storage medium, where the storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the internal and external network switching method as described above are implemented.
[0032] One or more technical solutions proposed by the present application have at least the following technical effects:
[0033] This application installs a main program and a sub-program on the intelligent terminal. The sub-program determines whether a network switch is required by obtaining the running status of the main program. If a network switch is required, it performs an internal and external network switch based on the 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 of this application uses the internal and external networks on a computer, the sub-program monitors whether the intelligent terminal needs to perform an internal and external network switch and automatically performs an internal and external network switch based on the preset router information, without the user having 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), improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application and, together with the specification, are used to explain the principles of the present application.
[0035] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0036] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the internal and external network switching method of this application;
[0037] Figure 2 It is a schematic flowchart provided for Embodiment 2 of the internal and external network switching method of this application;
[0038] Figure 3 It is a schematic flowchart provided for Embodiment 3 of the internal and external network switching method of this application;
[0039] Figure 4 It is a schematic architecture diagram of the internal and external network switching system for the embodiments of this application;
[0040] Figure 5 It is a schematic device structure diagram of the hardware operating environment involved in the internal and external network switching method for the embodiments of this application.
[0041] The realization of the purpose, functional features, and advantages of this application will be further described in conjunction with the embodiments with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0043] To better understand the technical solution of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific embodiments.
[0044] Based on this, an embodiment of the present application provides a method for switching between an internal network and an external network. Refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the method for switching between an internal network and an external network of the present application.
[0045] In this embodiment, the method for switching between an internal network and an external network includes steps S10 to S30:
[0046] Step S10, obtain the running state of the main program, and the main program interface is used to display internal network data;
[0047] It should be noted that the method for switching between an internal network and an external network in this embodiment is applied to the server of the sub-program. The sub-program can be pre-installed on the intelligent terminal, or can be an interface called temporarily, etc., which is not limited herein. The intelligent terminal can also be installed with the main program at the same time.
[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 an internal network and an external network, the internal network usually refers to a computer network within a specific area for internal communication, and the external network refers to a network connected to the public Internet. In the daily use process, sometimes it is necessary to switch between the two networks on the same intelligent terminal. Moreover, when using the internal network and the external network 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 a poor user experience.
[0050] Generally, if the user wants to use the internal network, it is usually when the intelligent terminal is already connected to the external network (that is, it is only possible to connect to the internal network when there is a network connection). Therefore, in this embodiment, by installing a main program for displaying internal network data on the intelligent terminal, the user can view the internal network data through the main program when the internal network is connected. That is, the user can only use the internal network when the main program is opened on the intelligent terminal. Thus, it is thought to use the main program as a medium to display the internal network data after connecting to the internal network; specifically, if the user wants to use the internal network, they can open the main program and log in to the main program when the intelligent terminal is already connected to the external network.
[0051] Step S20, based on the running state of the main program, determine whether network switching is required;
[0052] If the user does not want to use the internal network, they can choose not to open the main program and continue to use the external network. It is understandable that whether the user wants to switch between the internal and external networks can be achieved by opening or closing the main program. Therefore, to reduce the cumbersome steps of network switching for the user, in this embodiment, the running state of the main program is obtained through the server of the sub-program, and the running of the main program is monitored in real time, so as to determine whether the user wants to switch between the internal and external networks.
[0053] Among them, the running state can be exited, running, etc.
[0054] It is understandable that when the running state of the main program changes, it can be determined that the user needs to perform network switching.
[0055] Specifically, the implementation method of determining whether network switching is required 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 running in the background, it is determined that the network needs to be switched from the internal network to the external network; when it is detected that the running state of the main program is running in the foreground, it is determined that the network needs to be switched from the external network to the internal network; when it is detected that the running state of the main program is exited, it is determined that the network needs to be switched from the internal network to the external network.
[0057] Specifically, the running state of the main program "running" can be further divided into running in the foreground and running in the background. If the user wants to exit the internal network, they can switch the main program to running in the background (for example, minimize the main program, put the computer on standby, etc.). When they want to use the internal network, they can directly switch the main program to running in the foreground without having to log in to the main program again, thus achieving network switching and improving the efficiency of network switching.
[0058] Further, when the user does not want to use the internal network for a short period of time, to avoid resource occupation, when it is detected that the running state of the main program is exited, it is determined that the network needs to be switched from the internal network to the external network.
[0059] To more accurately detect the user's network switching requirements, it can be further determined whether network switching is required based on the running state of the main program and the current network state of the intelligent terminal.
[0060] Specifically, the implementation method of determining whether network switching is required 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 running in the background and the intelligent 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; when it is detected that the running state of the main program is running in the foreground and the intelligent 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.
[0062] To avoid the failure of the sub-program's first attempt to switch the network after the running state changes, resulting in the user being unable to experience the network switching service normally, the sub-program can continuously monitor the running state of the main program and the current network state of the intelligent terminal. Thus, when it detects that the running state of the main program is in the background and the intelligent terminal is not connected to the external network, it determines that it is still necessary to switch the network from the internal network to the external network to facilitate another attempt at network switching. Similarly, when it detects that the running state of the main program is in the foreground and the intelligent terminal is not connected to the internal network, it determines that it is necessary to switch the network from the external network to the internal network to facilitate another attempt at network switching, improving the user experience.
[0063] Step S30, if network switching is required, perform internal and external network switching based on the preset router information.
[0064] Since the internal network and the external network are two different networks, usually two routers are configured: an internal network router and an external network router. Therefore, the corresponding preset router information includes the router information of the internal network and the router information of the external network. Specifically, the preset router information can include device model, network configuration (IP address, subnet mask, etc.), wireless settings, etc.
[0065] When the sub-program determines that network switching is required, it can perform internal and external network switching based on the preset router information. For example, when determining that it is necessary to switch from the internal network to the external network, it can switch the network from the internal network to the external network based on the router information of the external network; when determining that it is necessary to switch from the external network to the internal network, it can switch the network from the external network to the internal network based on the router information of the internal network.
[0066] In this embodiment, when the user uses the internal and external networks on a computer, the sub-program monitors whether the intelligent terminal needs to perform internal and external network switching and automatically performs internal and external network switching based on the preset router information, without the user having 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), simplifying the user's network switching operation 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 content as in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 2 When it is necessary to switch the network from the external network to the internal network, step S10 further includes step S01:
[0068] Step S01, send a connection request to the internal network router based on the router information of the internal network read from the local of the intelligent terminal, so that the internal network router can obtain the device information of the intelligent terminal through the main program, verify the intelligent terminal based on the device information, and connect the intelligent terminal to the internal network after the verification passes.
[0069] It should be noted that the preset router information includes the router information of the internal network. The router information of the internal network is sent by the external network router to the main program after receiving the account information for logging in to the main program, verifying the account information, and then stored by the main program in the intelligent terminal.
[0070] Specifically, the user inputs the account information through the main program. The main program sends the account information to the external network router. The external network router verifies the account information. If the verification is successful, it sends the router information of the internal network to the main program, and the main program stores the router information of the internal network in the intelligent terminal.
[0071] Among them, the router information of the internal network known to the external network router is pre-configured in the external network router by the administrator. The account information can be an account and password, etc. The user can register an account and password through the main program. After registering the account information, the external network router stores the account information in the corresponding database, and the administrator stores the account information in the corresponding database of the internal network router to facilitate the subsequent verification of the logged-in user information.
[0072] It can be understood that when the sub-program detects that it is necessary to switch the network from the external network to the internal network, it can read the router information of the internal network from the local of the intelligent terminal, and based on the router information of the internal network, send a connection request to the internal network router. After receiving the connection request, the internal network router, in order to ensure network security, will obtain the device information of the intelligent terminal to be connected from the main program, verify the intelligent terminal based on the device information, and connect the intelligent terminal to the internal network after the verification is passed. If the verification fails, it will delete the information of the logged-in account in the database. Among them, the device information includes hardware information, network information (MAC address, IP address, etc.).
[0073] That is, there is no direct interaction between the external network router and the internal network router. Instead, the device information verification is carried out through the main program. That is, the external network and the internal network are still in an isolated state, thus ensuring network security.
[0074] Furthermore, the preset router information also includes the router information of the external network. When it is necessary to switch the network from the internal network to the external network, the implementation method of switching between the internal and external networks based on the preset router information can be:
[0075] Based on the router information of the external network, send a connection request to the external network router for the external network router to connect the intelligent terminal to the external network based on the device information of the intelligent terminal. Among them, both the router information of the external network and the device information are determined when the intelligent terminal is connected to the external network before obtaining the running state of the main program.
[0076] It should be noted that before the user logs in to the main program, the smart terminal is already connected to the external network. That is, the main program knows the router information of the external network and the device information of the smart terminal. After the user logs in to the main program, the main program can send the router information of the external network and the device information of the smart terminal to the sub-program.
[0077] Furthermore, when the sub-program detects that it is necessary to switch the network from the internal network to the external network, it can send a connection request to the external network router based on the router information of the external network; the external network router directly accesses the smart terminal to the external network based on the device information of the smart terminal without device verification.
[0078] In this embodiment, through the preset router information and the network automatic switching mechanism, the user's needs are intelligently identified, and the internal and external network switching operations can be completed without direct user intervention; with the collaborative work of the main program and the sub-program, while simplifying the internal and external network switching, 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 content as the above embodiments can be referred to the above introduction and will not be repeated hereinafter. On this basis, the embodiment of the present application provides another internal and external network switching method, referring to Figure 3 , Figure 3 is the flowchart of the third embodiment of the internal and external network switching method of the present application.
[0080] In this embodiment, the internal and external network switching method includes steps A10 to A20:
[0081] Step A10, in response to the account login operation, send the account information to the external network router for the external network router to verify the account information, and when the verification is successful, send the router information of the internal network to the local;
[0082] It should be noted that the internal and external network switching method of this embodiment is applied to the server of the main program; the user can log in to the main program by inputting the account information to the main program. The server of the main program, in response to the account login operation, sends the account information to the external network router, and 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 receiving the router information of the internal network, store the router information of the internal network in the local of the smart terminal, and send a program start request to the smart terminal to make the smart terminal open the sub-program. The sub-program determines whether network switching is required based on the local running state and, when network switching is required, performs internal and external network switching based on the preset router information.
[0084] Further, when receiving the router information of the internal network, the main program stores the router information of the internal network locally in the intelligent terminal for the sub-program to read when needed; the main program also sends a program startup request to the intelligent terminal, the intelligent terminal opens the sub-program, and the sub-program determines whether network switching is required based on the local running status and, when network switching is required, performs internal and external network switching 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 to the main program for the first time. Until the main program is closed, no account input and verification are required for the internal and external network switching that occurs in the middle, reducing the user's workload.
[0086] Further, after the step of sending a program startup request to the intelligent terminal, it is also possible to: when receiving the information of successful internal network connection, display the internal network data, where the information of successful internal network connection is sent to the local by the sub-program after successfully connecting the intelligent terminal to the internal network router.
[0087] Specifically, after the sub-program successfully connects the intelligent terminal to the internal network router, the sub-program sends the information of successful internal network connection to the main program, and the main program displays the internal network data in the interface after receiving this message; if the connection fails, it can prompt to seek the help of the administrator.
[0088] In this embodiment, when the user uses the internal and external networks on a computer, the sub-program monitors whether the intelligent terminal needs to perform internal and external network switching and automatically performs internal and external network switching based on the preset router information. There is no need for the user 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), simplifying the user's network switching operation and improving the user experience.
[0089] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the internal and external network switching method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.
[0090] This application also provides an internal and external network switching system. Please refer to Figure 4 , the server of the internal and external network switching main program and the server of the sub-program;
[0091] The server 10 of the main program is used to respond to the account login operation, send the account information to the external network router for the external network router to verify the account information, and when the verification is successful, send the router information of the internal network to the local, and when receiving the router information of the internal network, send a control request to the intelligent terminal to make the intelligent terminal open the sub-program.
[0092] The server 20 of the sub-program is used to obtain the running status of the main program. The main program interface is used to display intranet data. Based on the running status of the main program, it is determined whether network switching is required. If network switching is required, internal and external network switching is performed based on the preset router information.
[0093] The internal and external network switching system provided by this application adopts the internal and external network switching method in the above embodiment, and can solve the technical problem of poor user experience. Compared with the prior art, the beneficial effects of the internal and external network switching system provided by this application are the same as those of the internal and external network switching method provided by the above embodiment, and other technical features in the internal and external network switching system are the same as the features disclosed in the method of the above embodiment, which will not be elaborated here.
[0094] This application provides an internal and external network switching device, which includes: at least one processor; and a memory communicatively connected to 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 execute the internal and external network switching method in the first embodiment above.
[0095] Next, refer to Figure 5 , which shows a schematic structural diagram of an internal and external network switching device suitable for implementing the embodiments of this application. The internal and external network switching device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, tablet computers, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PMPs (Portable Media Player), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The internal and external network switching device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.
[0096] Such as Figure 5As shown, the internal and external network switching device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the internal and external network switching device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The 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: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a 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 internal and external network switching device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an internal and external network switching device with various systems, it should be understood that it is not required to implement or have all the systems shown. Instead, more or fewer systems can be implemented or had.
[0097] Specifically, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the 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 functions defined in the method of the embodiments disclosed in the present application are executed.
[0098] The internal and external network switching device provided by 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 beneficial effects of the internal and external network switching device provided by the present application are the same as those of the internal and external network switching method provided by the above embodiments, and the other technical features in the internal and external network switching device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0099] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0100] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0101] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the internal and external network switching method in the above embodiments.
[0102] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0103] The above computer-readable storage medium can be included in the internal and external network switching device; it can also 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, and when the above one or more programs are executed by the internal and external network switching device, the internal and external network switching device is caused to: execute the above internal and external network switching method.
[0105] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0107] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0108] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing 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 beneficial effects of the computer-readable storage medium provided by this application are the same as those of the internal and external network switching method provided by the above embodiments, and will not be elaborated here.
[0109] The above are only some embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A method for switching between internal and external networks, characterized in that: Applied to the server side of the sub-program, the method includes: Obtaining the running status of the main program, wherein the main program interface is used to display intranet data; Based on the running status of the main program, determining whether network switching is required; If network switching is required, the internal and external networks will be switched based on the preset router information.
2. The method according to claim 1, characterized in that The preset router information includes the router information of the intranet. When the network needs to be switched from the external network to the intranet, the step of switching the internal and external networks based on the preset router information includes: Based on the router information of the intranet read locally from the smart terminal, a connection request is sent to the intranet router, so that the intranet router obtains the device information of the smart terminal through 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; The router information of the intranet is the account information of the external network router received by the main program, which is sent to the main program after verification, and is stored in the smart terminal by the main program.
3. The method according to claim 1, characterized in that The preset router information also includes router information of the external network. When the network needs to be switched from the internal network to the external network, the step of switching the internal network to the external network based on the preset router information includes: Based on the router information of the external network, a connection request is sent to the external network router, so that the external network router can connect the smart terminal to the external network based on the device information of the smart terminal, wherein the router information and device information of the external network are determined when the smart terminal connects to the external network with the external network router before obtaining the running status of the main program.
4. The method according to any one of claims 1 to 3, characterized in that The step of determining whether network switching is required based on the running state of the main program includes: 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 in the foreground, it is determined that the network needs to be switched from the external network to the internal network; 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.
5. The method according to any one of claims 1 to 3, characterized in that The step of determining whether network switching is required based on the running state of the main program includes: Based on the running status of the main program and the current network status of the intelligent terminal, determine whether network switching is required; The step of determining whether network switching is required based on the running state of the main program and the current network state of the intelligent terminal includes: When it is detected that the running state of the main program is background running and the intelligent 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; 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 the network needs to be switched from the external network to the intranet.
6. A method for switching between internal and external networks, characterized in that: Applied to the server side of the main program, the method includes: In response to the account login operation, the account information is sent to the external network router for the external network router to verify the account information, and the router information of the internal network is sent to the local when the verification is successful; When the router information of the intranet is received, the router information of the intranet is stored locally in the smart terminal, and a program startup request is sent to the smart terminal to enable the smart terminal to open the sub-program. The sub-program determines whether network switching is required based on the local operating status and, when network switching is required, switches between the intranet and the intranet based on the preset router information.
7. The method according to claim 6, characterized in that After the step of sending a program start request to the smart terminal, the method further includes: When the information of successful intranet connection is received, the intranet data is displayed, wherein the information of successful intranet connection is sent to the local by the sub-program after the intelligent terminal is successfully connected to the intranet router.
8. An internal and external network switching system, characterized in that: The internal and external networks switch between the server end of the main program and the server end of the sub-program; The server of the main program is used to respond to the account login operation, send the account information to the external network router, so that the external network router verifies the account information, and send the router information of the internal network to the local when the verification is successful, and when the router information of the internal network is received, store the router information of the internal network in the local smart terminal, and send a control request to the smart terminal so that the smart terminal opens the sub-program; The server end of the sub-program is used to obtain the running status of the main program. The main program interface is used to display intranet data. Based on the running status of the main program, it is determined whether network switching is required. If network switching is required, internal and external networks are switched based on preset router information.
9. An internal and external network switching device, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein 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 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the internal and external network switching method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Network switching method and device, storage medium and terminal
CN112135325A
Router intranet access method, system and equipment and readable storage medium
CN112291279A
Network link switching method and device, electronic equipment and storage medium
CN112615860A
Network switching method, device and equipment, readable storage medium and program product
CN118764928A
Satellite network and mobile communication network switching method and device and electronic equipment
CN118804180A