Terminal network switching method and device, and electronic device
By receiving network switching instructions initiated by terminal devices and generating network configuration parameters, terminal network switching is automatically completed, and the problems of long terminal network switching time and network quality in the prior art are solved, and fast and stable network switching and multiple network switching are achieved. Security isolation of the network.
Patent Information
- Application Number
- CN202211041623.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-08-29
AI Technical Summary
In the prior art, when switching the terminal network, it is necessary to unplug the network cable, obtain dynamic passwords and click on the wireless network connection, resulting in a long switching time. When the office density is high, there are too many wireless access terminals, resulting in a decline in network quality, and when data packets are lost. Delayed increase affects user experience.
By receiving network switching instructions initiated by the terminal device, network configuration parameters are generated based on terminal identification, employee information and switch information, and automatically configure to the terminal network card to realize network switching, avoiding complex operations during wired and wireless switching, and in two Quick switch between networks.
It shortens network switching time, improves network connection speed and quality, improves user experience and data transmission speed, saves terminal resource investment, and realizes secure isolation of multiple networks.
Smart Images

Figure CN115695191B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology or intelligent operation and maintenance, and in particular to a terminal network switching method and device, and an electronic device. Background Art
[0002] As an input and output device, terminals can be divided into office terminals, test terminals, operation terminals, operation and maintenance terminals, etc. according to their different functions. At the same time, different terminals need to be isolated and controlled on the network. Different types of terminals have different access rights to control access risks.
[0003] In the financial industry, most users need to use two terminals: office and test. If different terminals are used for different functions, most employees will need to configure two terminals. Not only will the terminal resource investment be huge, but a special network isolation policy needs to be set up to achieve terminal isolation.
[0004] In the related art, the network segments in the access network are divided into office terminal access segments and test terminal access segments, and access control policies are implemented on the two types of network segments respectively. A physical terminal uses different network segments to distinguish whether the terminal is an office terminal or a test terminal. A terminal can be connected to two network segments by connecting two network cables to different ports of the switch, but the above solution requires double the switch resources and integrated wiring resources. Therefore, wireless and wired solutions are often used to connect the two network segments respectively, but there are the following problems: First, switching from wired to wireless requires unplugging the network cable, clicking on the wireless connection and entering the dynamic password. The switching actions are many and take a long time; second, due to the high density of office personnel, too many wireless access terminals will lead to a decline in network quality, packet loss and large network delay, which will affect user use.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a terminal network switching method and device, and an electronic device, so as to at least solve the technical problem in the related art that in order to realize the switching of different terminals, two network segments are connected respectively by wire and wireless, resulting in a long switching time.
[0007] According to one aspect of an embodiment of the present invention, a terminal network switching method is provided, which is applied to a server, and includes: receiving a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of a network to be connected and a terminal identifier, wherein the terminal identifier is used to query employee information, employee workstation information, and connection switch information associated with the terminal device; responding to the network switching instruction, generating terminal network configuration parameters of the network to be connected based on the terminal identifier, the employee information, the employee workstation information, and the connection switch information; outputting the terminal identifier and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to a terminal network card to replace the network parameters of a currently running default network, and completes the network switching.
[0008] Optionally, the switching method also includes: receiving a network management request initiated by a terminal device, wherein the network management request carries at least an operation identifier and management parameter information; when the operation instruction indicated by the operation identifier is to add a new department or room, writing the management parameter information into the department or room information table of the information base; when the operation instruction indicated by the operation identifier is to modify the department or room, replacing the original department or room name with the name of the department or room to be modified in the department or room information table based on the management parameter information; when the operation instruction indicated by the operation identifier is to add a network segment, adding a specified field to the network information table in the information base based on the management parameter information; or, when the operation instruction indicated by the operation identifier is to delete a network segment, deleting a specified field in the network information table in the information base based on the management parameter information; when the operation instruction indicated by the operation identifier is to add a domain name system DNS address, adding a specified address to the network information table in the information base based on the management parameter information; or, when the operation instruction indicated by the operation identifier is to delete a DNS address, deleting the specified address from the network information table in the information base based on the management parameter information.
[0009] Optionally, after receiving a network management request initiated by a terminal device, it also includes: when the operation instruction indicated by the operation identifier is a new network configuration, writing the management parameter information into the terminal information table of the information library; extracting the first type of key field information in the department information table to obtain a first extraction result; writing the first extraction result into the terminal information table; extracting a free address from the second network segment address pool, and writing the extracted free address into the terminal information table, wherein the second network segment address pool stores multiple second network segments, and the second network segment is a switching segment of the default network segment currently used by the user; extracting the second type of key field information in the switch information table of the information library to obtain a second extraction result, and writing the second extraction result into the terminal information table.
[0010] Optionally, after receiving a network management request initiated by a terminal device, it also includes: when the operation instruction indicated by the operation identifier is to modify the network configuration, writing the management parameter information into the terminal information table of the information library; based on the terminal identifier of the terminal whose network configuration is to be modified, querying the new department room associated with the terminal identifier in the terminal information table of the information library, and replacing the original department room identifier with the department room identifier of the new department room; releasing the network segment address of the second network segment, and updating the network information table of the information library; using the department room identifier of the new department room as a keyword, extracting the third type of key field information in the department room information table of the information library to obtain a third extraction result; writing the third extraction result into the terminal information table; extracting a free address from the second network segment address pool, and writing the extracted free address into the terminal information table; extracting the fourth type of key field information in the switch information table of the information library to obtain a fourth extraction result, and writing the fourth extraction result into the terminal information table.
[0011] Optionally, after receiving a network management request initiated by a terminal device, it also includes: when the operation instruction indicated by the operation identifier is to delete the network configuration, writing the management parameter information into the terminal information table of the information base; based on the terminal identifier of the terminal whose network configuration is to be deleted, querying the terminal information associated with the terminal identifier in the terminal information table of the information base, and deleting the terminal identifier and the terminal information; releasing the network segment address of the second network segment, and updating the network information table of the information base.
[0012] Optionally, all tables stored in the information base form a table set, and the tables included in the table set include: client information table: including terminal identification, department identification, default network segment, network name of the default network segment, default network segment mask, network name of the second network segment, second network segment address, second network segment mask, second network segment gateway, DNS address information, and workstation information point; department information table: including department identification, default network segment, network name of the default network segment, default network segment mask, second network segment network name, second network segment address pool, second network segment mask, second network segment gateway, and DNS address; network information table: including network segment, network segment mask, network segment gateway, and DNS address; switch information table: including switch management address, switch port, and workstation information point.
[0013] Optionally, before receiving the network management request initiated by the terminal device, it also includes: controlling the device screen interface of the terminal device to display a network menu, wherein the network menu displays the currently running default network and switchable networks in a vertical arrangement; detecting the user's network selection operation; and generating the network management request based on the network identifier of the switchable network when the network selection operation indicates that the switchable network needs to be used.
[0014] According to one aspect of an embodiment of the present invention, a terminal network switching device is provided, comprising: a first receiving unit, configured to receive a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of a network to be connected and a terminal identifier, wherein the terminal identifier is used to query employee information, employee workstation information and connection switch information associated with the terminal device; a first generating unit, configured to respond to the network switching instruction and generate terminal network configuration parameters of the network to be connected based on the terminal identifier, the employee information, the employee workstation information and the connection switch information; and an output unit, configured to output the terminal identifier and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to a terminal network card to replace the network parameters of a currently running default network, thereby completing the network switching.
[0015] Optionally, the switching device of the terminal network also includes: a second receiving unit, which is used to receive a network management request initiated by the terminal device, wherein the network management request carries at least an operation identifier and management parameter information; a first writing unit, which is used to write the management parameter information into the department information table of the information base when the operation instruction indicated by the operation identifier is to add a new department; a first replacement unit, which is used to replace the original department name with the name of the department to be modified in the department information table based on the management parameter information when the operation instruction indicated by the operation identifier is to modify the department; a first adding unit, which is used to add a specified field to the network information table in the information base based on the management parameter information when the operation instruction indicated by the operation identifier is to add a network segment; or, when the operation instruction indicated by the operation identifier is to delete a network segment, delete the specified field in the network information table in the information base based on the management parameter information; a second adding unit, which is used to add a specified address to the network information table in the information base based on the management parameter information when the operation instruction indicated by the operation identifier is to add a domain name system DNS address; or, when the operation instruction indicated by the operation identifier is to delete a DNS address, delete the specified address in the network information table in the information base based on the management parameter information.
[0016] Optionally, the switching device of the terminal network also includes: a second writing unit, which is used to write the management parameter information into the terminal information table of the information library when the operation instruction indicated by the operation identifier is a new network configuration; a first extraction unit, which is used to extract the first type of key field information in the department information table to obtain a first extraction result; a third writing unit, which is used to write the first extraction result into the terminal information table; a second extraction unit, which is used to extract a free address from the second network segment address pool, and write the extracted free address into the terminal information table, wherein the second network segment address pool stores multiple second network segments, and the second network segment is a switching segment of the default network segment currently used by the user; a third extraction unit, which is used to extract the second type of key field information in the switch information table of the information library, obtain a second extraction result, and write the second extraction result into the terminal information table.
[0017] Optionally, the switching device of the terminal network also includes: a fourth writing unit, which is used to write the management parameter information into the terminal information table of the information library when the operation instruction indicated by the operation identifier is to modify the network configuration; a first query unit, which is used to query the new department room associated with the terminal identifier in the terminal information table of the information library based on the terminal identifier of the terminal whose network configuration is to be modified, and replace the original department room identifier with the department room identifier of the new department room; a first release unit, which is used to release the network segment address of the second network segment and update the network information table of the information library; a fourth extraction unit, which is used to extract the third type of key field information in the department room information table of the information library using the department room identifier of the new department room as a keyword to obtain a third extraction result; a fifth writing unit, which is used to write the third extraction result into the terminal information table; a fifth extraction unit, which is used to extract a free address from the second network segment address pool and write the extracted free address into the terminal information table; a sixth extraction unit, which is used to extract the fourth type of key field information in the switch information table of the information library to obtain a fourth extraction result, and write the fourth extraction result into the terminal information table.
[0018] Optionally, the switching device of the terminal network also includes: a sixth writing unit, used to write the management parameter information into the terminal information table of the information base when the operation instruction indicated by the operation identifier is to delete the network configuration; a second query unit, used to query the terminal information associated with the terminal identifier in the terminal information table of the information base based on the terminal identifier of the terminal whose network configuration is to be deleted, and delete the terminal identifier and the terminal information; a second releasing unit, used to release the network segment address of the second network segment and update the network information table of the information base.
[0019] Optionally, all tables stored in the information base form a table set, and the tables included in the table set include: client information table: including terminal identification, department identification, default network segment, network name of the default network segment, default network segment mask, network name of the second network segment, second network segment address, second network segment mask, second network segment gateway, DNS address information, and workstation information point; department information table: including department identification, default network segment, network name of the default network segment, default network segment mask, second network segment network name, second network segment address pool, second network segment mask, second network segment gateway, and DNS address; network information table: including network segment, network segment mask, network segment gateway, and DNS address; switch information table: including switch management address, switch port, and workstation information point.
[0020] Optionally, the terminal network switching device also includes: a first control unit, used to control the device screen interface of the terminal device to display a network menu, wherein the network menu displays the currently running default network and switchable network in a vertical arrangement; a first detection unit, used to detect the user's network selection operation; and a second generation unit, used to generate the network management request based on the network identifier of the switchable network when the network selection operation indicates that the switchable network needs to be used.
[0021] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the terminal network switching methods described above by executing the executable instructions.
[0022] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned terminal network switching methods.
[0023] In the present application, the following steps are adopted to receive a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of the network to be connected and a terminal identifier, the terminal identifier being used to query the employee information, employee workstation information and connection switch information of the associated terminal device; in response to the network switching instruction, based on the terminal identifier, the employee information, the employee workstation information and the connection switch information, generate terminal network configuration parameters of the network to be connected; output the terminal identifier and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to the terminal network card, replacing the network parameters of the currently running default network, and completes the network switching.
[0024] In this application, the connection parameters of multiple planned networks (for example, terminal testing, terminal office) are pushed to the terminal, so that one terminal can simultaneously assume two terminal roles with different access rights. During the network switching process, the user only needs to perform corresponding operations in the operation interface, without the need to perform a series of operations such as plugging and unplugging the network cable, obtaining a dynamic password, clicking on the wireless network connection, and entering a dynamic password. The terminal can automatically switch between the two roles quickly, and both networks use wired connections. The network connection speed is fast and the quality is high, which improves the user experience and data transmission rate, and improves work efficiency. It not only solves the security isolation of office and test networks, but also saves terminal resource investment, and can provide users with a good user experience.
[0025] At the same time, the present application not only realizes the secure isolation of multiple networks (for example, terminal testing, terminal office), but also saves terminal resource investment, and can provide users with a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 is a schematic diagram of an optional terminal network switching method provided according to an embodiment of the present invention;
[0028] Figure 2 is a schematic diagram of an optional switching device of a terminal network according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of an optional terminal network switching system according to an embodiment of the present invention;
[0030] Figure 4 The present invention is a hardware structure block diagram of an electronic device (or mobile device) according to a terminal network switching method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:
[0034] A terminal is an input and output device connected to a computer system. It is a peripheral device relative to the computer host and does not provide any computing or processing functions itself.
[0035] A switch is a network device used for forwarding electrical (optical) signals. It can provide an exclusive electrical signal path for any two network nodes connected to the switch, and can provide more connection ports in the sub-network to connect more computers, such as Ethernet switches, fiber optic switches, etc.
[0036] A network segment refers to the part of a computer network that can communicate directly using the same physical layer devices (transmission media, repeaters, hubs, etc.). Addresses in the same network segment can directly communicate at the second layer. For example, IP address 192.168.1.1 / 24 and IP address 192.168.1.2 / 24 are both in the network segment of 192.168.1.0 / 24, so they can communicate with each other.
[0037] DNS, the abbreviation of Domain Name System, is a system that converts domain names into IP addresses.
[0038] It should be noted that the terminal network switching method and device in the present disclosure can be used in the field of financial technology. When the terminal network is switched, it can also be used in any field other than the field of financial technology. When the terminal network is switched, the application field of the terminal network switching method and device in the present disclosure is not limited.
[0039] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0040] The present invention can be applied to various terminal network systems / devices / products, and can enable one terminal to simultaneously assume two terminal roles with different access rights. The user only needs to perform corresponding operations on the operation interface (for example, single-click, double-click, long press, touch screen, etc.), and the terminal can automatically switch between the two roles quickly, which not only realizes the security isolation of multiple networks, but also saves terminal resource investment, and can provide users with a good user experience.
[0041] The present invention is described in detail below in conjunction with various embodiments.
[0042] Embodiment 1
[0043] According to an embodiment of the present invention, an embodiment of a switching method for a terminal network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0044] The terminal network switching method provided in the embodiment of the present invention is that the network maintenance personnel complete the network planning in the park in advance, allocate two network segments to each department room, and set one of them as the default network segment for the department room in combination with the working characteristics of the department room, and enter the information such as the name of each department room, the default network segment, and the second network segment into the user information database. This information database also includes fields such as the employee terminal name (types include but are not limited to: Chinese characters, letters, and digital numbers), employee name (types include but are not limited to: Chinese characters, letters, and digital numbers), workstation information points (including but not limited to: company floors, floor layouts, and relative coordinates of workstations), and connected switches (including but not limited to: numbers, port numbers, etc.).
[0045] In the embodiment of the present invention, for each terminal, the system generates the terminal network configuration according to the information of the department and workstation information point of the employee, pushes it to the terminal and saves it, and generates the network configuration at the same time, and completes the corresponding configuration on the switch. When the user needs to switch the network, after selecting the corresponding network connection name and applying it, the corresponding parameters will be configured on the network card, and the parameters will take effect by restarting the network card, realizing the corresponding network connection, and the existing configuration will be used until the next selection.
[0046] The terminal network switching method provided by the embodiment of the present invention reduces the need for a series of complex operations such as plugging and unplugging network cables, obtaining dynamic passwords, clicking on wireless network connections, and entering dynamic passwords during the switching process between wired networks and wireless networks, shortening the switching time by more than half, and both networks use wired connections, with fast network connection speed and high quality, improving user experience and data transmission rate, and improving work efficiency. The present invention is described below in conjunction with preferred implementation steps.
[0047] Figure 1 is a schematic diagram of an optional terminal network switching method proposed according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0048] Step S101, receiving a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of a network to be connected and a terminal identifier, the terminal identifier being used to query employee information, employee workstation information, and connection switch information of an associated terminal device;
[0049] Step S102, in response to the network switching instruction, generating terminal network configuration parameters of the network to be connected based on the terminal identification, the employee information, the employee workstation information and the connection switch information;
[0050] Step S103, outputting the terminal identification and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to the terminal network card to replace the network parameters of the currently running default network, thereby completing the network switching.
[0051] Through the above steps, a network switching instruction initiated by a terminal device is received, wherein the network switching instruction carries at least: the network name and terminal identification of the network to be connected, the terminal identification is used to query the employee information, employee workstation information and connection switch information of the associated terminal device; in response to the network switching instruction, based on the terminal identification, employee information, employee workstation information and connection switch information, the terminal network configuration parameters of the network to be connected are generated; the terminal identification and the terminal network configuration parameters are output to the terminal device, wherein the terminal device configures the terminal network configuration parameters to the terminal network card, replacing the network parameters of the currently running default network, and completes the network switching. In this embodiment, the planned two terminal network connection parameters are pushed to the terminal, so that one terminal can simultaneously assume two terminal roles with different access rights. After receiving the corresponding operation of the user terminal, the terminal can automatically switch between the two roles quickly, so that the office and test network security isolation is realized, and the terminal resource investment is saved, which can provide users with a good user experience, thereby solving the technical problem that in the related technology, two network segments are connected respectively by wire and wireless to realize the switching of different terminals, resulting in a long switching time.
[0052] The following is a detailed description of each of the above implementation steps.
[0053] Step S101, receiving a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of a network to be connected and a terminal identifier, and the terminal identifier is used to query employee information, employee workstation information, and connection switch information of an associated terminal device.
[0054] The terminal device provided in this embodiment may refer to a notebook, PC, panel, IPAD, etc. used by a user, and the user initiates a network switching instruction to a server or a network system through the terminal device. The network switching instruction can realize the fast switching of the terminal device under different terminal states (the present embodiment uses the office and test states for illustration), and can also realize the switching of other functions, including but not limited to the operation terminal and the operation and maintenance terminal.
[0055] The user terminal device contains operation buttons such as adding new network configuration, modifying network configuration, deleting network configuration, and submitting. The operation interface displays the name of the currently used network connection. Select the network connection name to be used through the drop-down menu and click the Apply button to issue a switching instruction on the terminal device operation interface.
[0056] The terminal identification includes but is not limited to the terminal name (types include but are not limited to: characters, letters, Chinese characters, digital labels, etc.), the terminal number, etc.
[0057] Step S102, in response to the network switching instruction, based on the terminal identification, the employee information, the employee workstation information and the connection switch information, generate the terminal network configuration parameters of the network to be connected.
[0058] It should be noted that employee information includes but is not limited to: employee name (types include but are not limited to: Chinese characters, letters, digital numbers), employee department, employee direct supervisor identification and company identification, employee workstation information (including but not limited to: company floor, floor layout, workstation relative coordinates), and connected switch information includes but is not limited to: connected switch configuration (including but not limited to: number, port number, etc.).
[0059] After obtaining the network switching instruction, based on the obtained switch management address information and switch configuration, log in to the corresponding switch, complete the switch configuration modification and save the switch position, thereby generating the terminal network configuration parameters of the network to be connected.
[0060] Step S103, outputting the terminal identification and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to the terminal network card to replace the network parameters of the currently running default network, thereby completing the network switching.
[0061] Among them, the terminal configuration parameters are generated through the terminal name, the default network name, the second network name, the second network address, the second network mask, the second network gateway, and the DNS address information. Based on the terminal name and the terminal network configuration parameters, and based on the information fed back by the system deployed on the terminal, the IP address of the corresponding terminal is found, and the terminal network parameters are pushed to the corresponding module on the terminal through the network.
[0062] The above-mentioned default network segment is the network segment currently being used by the user. The network maintenance personnel complete the network planning within the campus in advance, allocate two network segments with different functions to each department room, and set one of them as the default network segment for this department room based on the working characteristics of the department room. The above-mentioned second network segment is the network segment to be switched by the user.
[0063] After receiving the network configuration parameters, save them to the specified directory, call the network parameters corresponding to the default network name by running the batch program, configure them to the terminal network card and make them effective, use the network name corresponding to the default network segment by default, connect to the network corresponding to the default network segment, receive the network connection name information, call the network parameters corresponding to the default network name by running the batch program, configure them to the terminal network card and make them effective. The new terminal network configuration parameters are configured to the terminal network card to replace the network parameters of the currently running default network, completing the network switch.
[0064] In an embodiment of the present invention, the terminal network switching method also includes: receiving a network management request initiated by a terminal device, wherein the network management request carries at least an operation identifier and management parameter information; when the operation instruction indicated by the operation identifier is to add a new department room, writing the management parameter information into a department room information table in the information library, wherein the department room information table is used to store information about the department rooms and used network segments of all employees, and the used network segments include: a default network segment and a second network segment, the default network segment is a commonly used network segment of the employees, and the second network segment is a switching network segment of the default network segment; when the operation instruction indicated by the operation identifier is to modify the department room, using the network segment to be modified in the department room information table based on the management parameter information The new department name replaces the original department name; when the operation instruction indicated by the operation identifier is to add a network segment, a specified field is added to the network information table in the information base based on the management parameter information; or, when the operation instruction indicated by the operation identifier is to delete the network segment, the specified field is deleted from the network information table in the information base based on the management parameter information; when the operation instruction indicated by the operation identifier is to add a domain name system DNS address, a specified address is added to the network information table in the information base based on the management parameter information; or, when the operation instruction indicated by the operation identifier is to delete the DNS address, the specified address is deleted from the network information table in the information base based on the management parameter information.
[0065] It should be noted that the network maintenance personnel complete the network planning within the campus in advance, allocate two network segments to each department room, and set one of them as the default network segment for this department room based on the working characteristics of the department room, and enter the name of each department room, default network segment, second network segment and other information into the user information database. The information database includes but is not limited to: terminal information table, department room information table, network information table, switch information table, and the content includes but is not limited to: employee terminal name, employee name, workstation information point, connected switch and other fields.
[0066] Among them, the department information table includes but is not limited to: department identification, default network segment, network name of the default network segment, default network segment mask, second network segment network name, second network segment address pool, second network segment mask, second network segment gateway, and DNS address.
[0067] The network information table includes but is not limited to: network segment, network segment mask, network segment gateway, and DNS address;
[0068] In an embodiment of the present invention, after receiving a network management request initiated by a terminal device, it also includes: when the operation instruction indicated by the operation identifier is a new network configuration, writing the management parameter information into the terminal information table of the information library; extracting the first type of key field information in the department information table to obtain a first extraction result; writing the first extraction result into the terminal information table; extracting a free address from the second network segment address pool, and writing the extracted free address into the terminal information table; extracting the second type of key field information in the switch information table of the information library to obtain a second extraction result, and writing the second extraction result into the terminal information table.
[0069] The first type of key field information includes but is not limited to: the network name of the default network segment, the default network segment mask, the network name of the second network segment, the second network segment mask, the second network segment gateway, and the DNS address. The second type of key field information includes but is not limited to: the switch management address, the switch port, and the virtual LAN identifier, and the second extraction result is obtained.
[0070] A plurality of second network segments are stored in the second network segment address pool, and the second network segment is a switch network segment of a default network segment currently used by the user.
[0071] The user performs corresponding operations on the terminal interface. When the operation mark is a new network configuration, the parameter information is written into the terminal information table of the information base, and the default network segment network name, default network segment, default network segment mask, second network segment network name, second network segment mask, second network segment gateway, and DNS address information are extracted from the department information table and written into the relevant fields of the terminal information table. A free address is selected from the second network segment address pool and the second network segment address pool is updated. The second network segment address is written into the relevant fields of the terminal information table, and the switch management address, switch port, and VLAN_ID information are extracted from the switch information table and written into the relevant fields of the terminal information table. If there is no corresponding information in the switch information table, the switch port information parsing unit is called and then the relevant information is extracted from the switch information table. The operation mark and the terminal name, default network segment network name, second network segment network name, second network segment address, second network segment mask, second network segment gateway, and DNS address information are used as the parameter information generated by the configuration.
[0072] In an embodiment of the present invention, after receiving a network management request initiated by a terminal device, it also includes: when the operation instruction indicated by the operation identifier is to modify the network configuration, writing the management parameter information into the terminal information table of the information library; based on the terminal identifier of the terminal whose network configuration is to be modified, querying the new department room associated with the terminal identifier in the terminal information table of the information library, and replacing the original department room identifier with the department room identifier of the new department room; releasing the network segment address of the second network segment, and updating the network information table of the information library; using the department room identifier of the new department room as a keyword, extracting the third type of key field information in the department room information table of the information library to obtain a third extraction result; writing the third extraction result into the terminal information table; extracting a free address from the second network segment address pool, and writing the extracted free address into the terminal information table; extracting the fourth type of key field information in the switch information table of the information library to obtain a fourth extraction result, and writing the fourth extraction result into the terminal information table.
[0073] The third type of key field information includes but is not limited to: the network name of the default network segment, the default network segment mask, the network name of the second network segment, the second network segment mask, the second network segment gateway, and the DNS address. The fourth type of key field information includes but is not limited to: the switch management address, the switch port, and the virtual LAN identifier, and a fourth extraction result is obtained.
[0074] In an embodiment of the present invention, after receiving a network management request initiated by a terminal device, it also includes: when the operation instruction indicated by the operation identifier is to delete the network configuration, writing the management parameter information into the terminal information table of the information library; based on the terminal identifier of the terminal whose network configuration is to be deleted, querying the terminal information associated with the terminal identifier in the terminal information table of the information library, and deleting the terminal identifier and the terminal information; releasing the network segment address of the second network segment, and updating the network information table of the information library.
[0075] Among them, all tables stored in the information database form a table set, and the tables included in the table set include: client information table: including terminal identification, department identification, default network segment, network name of the default network segment, default network segment mask, network name of the second network segment, second network segment address, second network segment mask, second network segment gateway, DNS address information, and workstation information point; department information table: including department identification, default network segment, network name of the default network segment, default network segment mask, second network segment network name, second network segment address pool, second network segment mask, second network segment gateway, and DNS address; network information table: including network segment, network segment mask, network segment gateway, and DNS address; switch information table: including switch management address, switch port, and workstation information point.
[0076] In an embodiment of the present invention, before receiving a network management request initiated by a terminal device, it also includes: controlling the device screen interface of the terminal device to display a network menu, wherein the network menu displays the currently running default network and switchable networks in a vertical arrangement; detecting the user's network selection operation; and generating a network management request based on the network identifier of the switchable network when the network selection operation indicates that a switchable network needs to be used.
[0077] Users can use the user operation interface on the terminal to switch network connections. The interface displays the name of the currently used network connection. Users can select the network connection name to be used through the drop-down menu and click the Apply button to issue a network switching instruction to achieve network switching.
[0078] Through the above implementation, the connection parameters of multiple planned networks (for example, terminal testing, terminal office) are pushed to the terminal, so that one terminal can simultaneously assume two terminal roles with different access rights. During the network switching process, the user only needs to perform corresponding operations in the operation interface, without the need to perform a series of operations such as plugging and unplugging the network cable, obtaining a dynamic password, clicking on the wireless network connection, and entering a dynamic password. The terminal can automatically switch between the two roles quickly, and both networks use wired connections. The network connection speed is fast and the quality is high, which improves the user experience and data transmission rate, improves work efficiency, and solves the security isolation of multiple networks (for example, terminal testing, terminal office) and saves terminal resource investment, which can provide users with a good user experience. This solves the technical problem in the related technology that in order to achieve the switching of different terminals, two network segments are connected respectively by wire and wireless, resulting in a long switching time.
[0079] The present invention is described below in conjunction with another optional embodiment.
[0080] Embodiment 2
[0081] This embodiment provides a switching device for a terminal network. The switching device for the terminal network includes various implementation units corresponding to various implementation steps in the first embodiment.
[0082] Figure 2 is a schematic diagram of an optional switching device of a terminal network according to an embodiment of the present invention, such as Figure 2 As shown, it includes: a first receiving unit 21, a first generating unit 22, and an output unit 23, wherein:
[0083] The first receiving unit 21 is used to receive a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of a network to be connected and a terminal identifier, and the terminal identifier is used to query the employee information, employee workstation information and connection switch information of the associated terminal device;
[0084] The first generating unit 22 is used to respond to the network switching instruction and generate terminal network configuration parameters of the network to be connected based on the terminal identification, the employee information, the employee workstation information and the connection switch information;
[0085] The output unit 23 is used to output the terminal identification and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to the terminal network card to replace the network parameters of the currently running default network to complete the network switching.
[0086] The switching device of the above-mentioned terminal network can receive a network switching instruction initiated by a terminal device through a first receiving unit 21, wherein the network switching instruction carries at least: a network name of the network to be connected and a terminal identifier, and the terminal identifier is used to query the employee information, employee workstation information and connection switch information of the associated terminal device; respond to the network switching instruction through a first generating unit 22, and generate terminal network configuration parameters of the network to be connected based on the terminal identifier, the employee information, the employee workstation information and the connection switch information; output the terminal identifier and the terminal network configuration parameters to the terminal device through an output unit 23, wherein the terminal device configures the terminal network configuration parameters to the terminal network card, replacing the network parameters of the currently running default network, and completes the network switching.
[0087] In this embodiment, the connection parameters of multiple planned networks (for example, terminal testing, terminal office) are pushed to the terminal, so that one terminal can simultaneously assume two terminal roles with different access rights. After receiving the corresponding operation of the user terminal, the terminal can automatically switch between the two roles quickly. This not only achieves secure isolation of office and test networks, but also saves terminal resource investment, and can provide users with a good user experience, thereby solving the technical problem in related technologies that in order to achieve switching of different terminals, two network segments are connected separately by wired and wireless, resulting in long switching time.
[0088] Through the above implementation, during the network switching process, the user only needs to perform corresponding operations on the operation interface, without having to perform a series of operations such as plugging and unplugging the network cable, obtaining a dynamic password, clicking on the wireless network connection, and entering a dynamic password. The terminal can automatically switch between the two roles quickly, and both networks use wired connections. The network connection speed is fast and the quality is high, which improves the user experience and data transmission rate, and improves work efficiency.
[0089] Optionally, the switching device of the terminal network also includes: a second receiving unit, which is used to receive a network management request initiated by the terminal device, wherein the network management request carries at least an operation identifier and management parameter information; a first writing unit, which is used to write the management parameter information into the department information table of the information base when the operation instruction indicated by the operation identifier is to add a new department; a first replacement unit, which is used to replace the original department name with the name of the department to be modified in the department information table based on the management parameter information when the operation instruction indicated by the operation identifier is to modify the department; a first adding and deleting unit, which is used to add a specified field in the network information table in the information base based on the management parameter information when the operation instruction indicated by the operation identifier is to add a network segment; or, when the operation instruction indicated by the operation identifier is to delete a network segment, delete the specified field in the network information table in the information base based on the management parameter information; a second adding and deleting unit, which is used to add a specified address in the network information table in the information base based on the management parameter information when the operation instruction indicated by the operation identifier is to add a domain name system DNS address; or, when the operation instruction indicated by the operation identifier is to delete a DNS address, delete the specified address in the network information table in the information base based on the management parameter information.
[0090] Optionally, the switching device of the terminal network also includes: a second writing unit, which is used to write the management parameter information into the terminal information table of the information library when the operation instruction indicated by the operation identifier is a new network configuration; a first extraction unit, which is used to extract the first type of key field information in the department information table to obtain a first extraction result; a third writing unit, which is used to write the first extraction result into the terminal information table; a second extraction unit, which is used to extract a free address from the second network segment address pool, and write the extracted free address into the terminal information table, wherein the second network segment address pool stores multiple second network segments, and the second network segment is a switching segment of the default network segment currently used by the user; a third extraction unit, which is used to extract the second type of key field information in the switch information table of the information library, obtain a second extraction result, and write the second extraction result into the terminal information table.
[0091] Optionally, the switching device of the terminal network also includes: a fourth writing unit, which is used to write the management parameter information into the terminal information table of the information base when the operation instruction indicated by the operation identifier is to modify the network configuration; a first query unit, which is used to query the new department room associated with the terminal identifier in the terminal information table of the information base based on the terminal identifier of the terminal whose network configuration is to be modified, and replace the original department room identifier with the department room identifier of the new department room; a first release unit, which is used to release the network segment address of the second network segment and update the network information table of the information base; a fourth extraction unit, which is used to extract the third type of key field information in the department room information table of the information base with the department room identifier of the new department room as the keyword, and obtain a third extraction result; a fifth writing unit, which is used to write the third extraction result into the terminal information table; a fifth extraction unit, which is used to extract a free address from the second network segment address pool, and write the extracted free address into the terminal information table; a sixth extraction unit, which is used to extract the fourth type of key field information in the switch information table of the information base, obtain a fourth extraction result, and write the fourth extraction result into the terminal information table.
[0092] Optionally, the switching device of the terminal network also includes: a sixth writing unit, used to write the management parameter information into the terminal information table of the information base when the operation instruction indicated by the operation identifier is to delete the network configuration; a second query unit, used to query the terminal information associated with the terminal identifier in the terminal information table of the information base based on the terminal identifier of the terminal whose network configuration is to be deleted, and delete the terminal identifier and the terminal information; a second releasing unit, used to release the network segment address of the second network segment and update the network information table of the information base.
[0093] Optionally, all tables stored in the information base form a table set, and the tables included in the table set include: client information table: including terminal identification, department identification, default network segment, network name of the default network segment, default network segment mask, network name of the second network segment, second network segment address, second network segment mask, second network segment gateway, DNS address information, and workstation information point; department information table: including department identification, default network segment, network name of the default network segment, default network segment mask, second network segment network name, second network segment address pool, second network segment mask, second network segment gateway, and DNS address; network information table: including network segment, network segment mask, network segment gateway, and DNS address; switch information table: including switch management address, switch port, and workstation information point.
[0094] Optionally, the terminal network switching device also includes: a first control unit, used to control the device screen interface of the terminal device to display a network menu, wherein the network menu displays the currently running default network and switchable network in a vertical arrangement; a first detection unit, used to detect the user's network selection operation; and a second generation unit, used to generate a network management request based on the network identifier of the switchable network when the network selection operation indicates that a switchable network needs to be used.
[0095] The above-mentioned terminal network switching device may also include a processor and a memory. The above-mentioned first receiving unit 21, first generating unit 22, output unit 23, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0096] The above processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set to enable a terminal to simultaneously assume two terminal roles with different access rights. The user only needs to perform corresponding operations in the operation interface, and the terminal can automatically switch between the two roles quickly, which not only solves the security isolation of multiple networks (for example, terminal testing, terminal office), but also saves terminal resource investment, providing users with a good user experience.
[0097] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0098] The present invention is described below in conjunction with another optional embodiment.
[0099] Embodiment 3
[0100] The embodiment of the present invention provides a switching system for a terminal network. The switching system for the terminal network includes various implementation units corresponding to various implementation steps in the first embodiment.
[0101] Figure 3 is a schematic diagram of an optional terminal network switching system according to an embodiment of the present invention, such as Figure 3As shown, the switching system of the terminal network is composed of 301 user network management interface module, 302 user information processing module, 303 terminal configuration generation module, 304 terminal configuration push module, 305 terminal configuration storage module, 306 network configuration generation module, 307 network device configuration module, 308 user operation interface module, 309 terminal configuration selection module, and 310 terminal configuration validation module. Among them, the three modules of 305 terminal configuration storage module, 308 user operation interface module, and 309 terminal configuration selection module are deployed on the user terminal. The system installation is completed in the terminal application issuance link. The remaining modules are deployed on the server. When employees use the terminal or adjust the department to add or modify the network configuration, the network configuration application is completed through the system. The information database contains the terminal information table, department information table, network information table, and switch information table. The following will describe the role of each module in detail.
[0102] 301 User Network Management Interface Module: A module that provides an interface for users and network administrators, including a user application interface unit for ordinary users to apply for and modify network configurations, and a network management operation interface unit that provides management personnel with the function of managing the network rules of each department in the system of the present invention.
[0103] User application interface unit: The user application interface includes operation buttons such as adding network configuration, modifying network configuration, deleting network configuration, and submitting. This unit transmits the terminal name (types include but are not limited to: characters, letters, Chinese characters, digital numbers, etc.), employee name (types include but are not limited to: Chinese characters, letters, digital numbers), department name (types include but are not limited to: Chinese characters, letters, digital numbers), workstation information (including but not limited to: company floor, floor layout, workstation relative coordinates) and operation signs (including but not limited to: adding operation, modifying operation, deleting operation) input by the user to the 302 information processing module.
[0104] Network management operation interface unit: The network management operation interface unit includes operation marks such as adding a new department room, modifying a department room, deleting a department room, adding a network segment, deleting a network segment, adding a DNS address, deleting a DNS address, and submitting. This unit transmits the department room name, default network segment network name, default network segment, default network segment mask, second network segment network name, second network segment, second network segment mask, second network segment gateway, second network segment address pool, VLAN_ID, DNS address and other information entered by the network administrator, as well as the operation mark, to the 302 information processing module.
[0105] 302 Information processing module: This module receives parameter information transmitted by the 301 user application module (including but not limited to: employee information, department information, workstation information, switch information, operation flags), and processes it. The processed data is stored in the information database, including a network management processing information unit, a user application information processing unit, an information storage unit, and a switch port information parsing unit.
[0106] Network management information processing unit: This unit processes the network management operation information transmitted by the network management operation interface unit in the 301 user network management interface module according to the following rules:
[0107] Identify the operation flag. If the operation flag is to add a new department, after processing, the parameter information received from the 301 user application module (including but not limited to: employee information, department information, station information, switch information, operation flag) is written into the corresponding field in the department information table of the information base; if the operation flag is to modify the department, the modified department name is used to replace the original department name in the department information table; if the operation flag is to delete the department, the department name and related fields are deleted in the department information table. A network segment can only belong to one department, and cannot belong to two or more departments at the same time.
[0108] Identify the operation flag. If the operation flag is to add or delete a network segment, add or delete the corresponding entry or field in the network information table in the information base, and pass the operation flag and the network segment information, network segment mask, and network segment gateway information to the 306 network configuration generation module; identify the operation flag. If the operation flag is to add or delete a DNS address, perform corresponding addition or deletion operations on the parameter information received from the 301 user application module in the network information table.
[0109] User application information processing unit: This unit processes the user application operation information transmitted by the user application interface unit in the user network management interface module 301, and processes it according to the following rules:
[0110] Identify the operation flag. If the operation flag is a new network configuration, write the parameter information (including but not limited to: employee information, department information, workstation information, switch information, and operation flag) received from the 301 user application module into the terminal information table of the information base, and extract the default network segment network name, default network segment, default network segment mask, second network segment network name, second network segment mask, second network segment gateway, and DNS address information from the department information table and write them into the relevant fields of the terminal information table. Select a free address from the second network segment address pool and update the second network segment address pool. Write the second network segment address into the relevant fields of the terminal information table. Extract the switch management address, switch port, and VLAN_ID information from the switch information table and write them into the relevant fields of the terminal information table. Pass the operation flag and the switch management address, switch port, and VLAN_ID information to the 306 network configuration production module. If there is no corresponding information in the switch information table, call the switch port information parsing unit and then extract the relevant information from the switch information table. The operation flag and the terminal name, the default network segment network name, the second network segment network name, the second network segment address, the second network segment mask, the second network segment gateway, and the DNS address information are passed to the 303 terminal configuration generation module.
[0111] Identify the operation flag. If the operation flag is to modify the network configuration, query the parameter information (including but not limited to: employee information, department information, workstation information, switch information, operation flag) received from the 301 user application module in the terminal information table with the terminal name, replace the department name field, release the second network segment address and update the network information table, and extract the default network segment network name, default network segment, default network segment mask, second network segment network name, second network segment mask, second network segment gateway, and DNS address information from the department information table with the new department name as the keyword to update the relevant fields of the terminal information table, select a free address from the second network segment address pool and update the second network segment address pool, write the second network segment address into the relevant fields of the terminal information table, extract the switch management address, switch port, and VLAN_ID information from the switch information table and write them into the relevant fields of the terminal information table. Pass the operation flag and the switch management address, switch port, and VLAN_ID information to the 306 network configuration generation module. If there is no corresponding information in the switch information table, call the switch port information parsing unit and then extract the relevant information from the switch information table. The operation flag and the terminal name, the default network segment network name, the second network segment network name, the second network segment address, the second network segment mask, the second network segment gateway, and the DNS address information are passed to the 303 terminal configuration generation module.
[0112] Identify the operation flag. If the operation flag is to delete the network configuration, the parameter information received from the 301 user application module (including but not limited to: employee information, department information, workstation information, switch information, operation flag) will be queried in the terminal information table with the terminal name, the second network segment address will be released and the network information table will be updated, and the terminal name and its associated information will be deleted in the terminal information table.
[0113] Switch port information parsing unit: This unit implements the regular update of the correspondence between the switch port and the workstation information point. By parsing the switch configuration and utilizing the descriptive function of the switch port, it establishes the corresponding management of the switch port and the workstation information point, and writes the switch management address, switch port, workstation information point and other information into the switch information table in the information base.
[0114] The information base contains four tables, the details are as follows:
[0115] Client information table: includes fields such as terminal name, department name, default network segment name, default network segment, default network segment mask, second network segment network name, second network segment address, second network segment mask, second network segment gateway, DNS address information, workstation information point, etc.
[0116] Department information table: Department name, default network segment name, default network segment, default network segment mask, second network segment network name, second network segment address pool, second network segment mask, second network segment gateway, DNS address information and other fields.
[0117] Network information table: fields such as network segment, network segment mask, network segment gateway, DNS address information, etc.
[0118] Switch information table: switch management address, switch port, and workstation information point.
[0119] 303 terminal configuration generation module: This module receives the terminal name, default network name, second network name, second network address, second network mask, second network gateway, and DNS address information transmitted by the 302 user information storage module, and generates terminal network configuration parameters based on this information, and outputs the terminal name and terminal network configuration parameters to the 304 terminal configuration push module.
[0120] 304 Terminal Configuration Push Module: This module receives the terminal name and terminal network configuration parameters transmitted by the 303 Terminal Configuration Generation Module, finds the IP address of the corresponding terminal based on the information fed back by the system deployed on the terminal, and pushes the terminal network parameters to the 305 Terminal Configuration Saving Module on the corresponding terminal through the network.
[0121] 305 Terminal Configuration Saving Module: This module receives the network configuration parameters transmitted by the 304 Terminal Configuration Pushing Module, saves them to the specified directory, calls the network parameters corresponding to the default network name by running the batch program, configures them on the terminal network card and makes them effective, uses the network name corresponding to the default network segment by default, and connects to the network corresponding to the default network segment. This module also supports receiving the network connection name information transmitted by the 309 Terminal Configuration Selection Module, calls the network parameters corresponding to the default network name by running the batch program, configures them on the terminal network card and makes them effective.
[0122] 306 Network configuration generation module: receives information transmitted by 302 information processing module, and generates corresponding network configuration, the specific configuration is as follows:
[0123] If the operation flag is to add or delete a network segment, the switch configuration is generated by combining the operation flag and the received switch management address, network segment information, network segment mask, and network segment gateway information, and is passed to the 307 network device configuration module together with the switch management address information.
[0124] If the operation flag is to add or modify the network configuration, the switch configuration is generated by combining the operation flag and the received switch management address, switch port, and VLAN_ID information, and is passed to the network device configuration module 307 together with the switch management address information.
[0125] 307 Network device configuration module: receives the switch management address information and switch configuration transmitted by 306 network configuration generation module, logs into the corresponding switch, completes the switch configuration modification and saves the switch configuration.
[0126] 308 User Operation Interface Module: The user can use the user operation interface module on the terminal to switch the network connection. The interface displays the name of the currently used network connection. The user can select the network connection name to be used through the drop-down menu and click the Apply button to pass the network connection name to be used to the 309 terminal configuration selection module.
[0127] 309 Terminal configuration selection module: receives the network connection name transmitted by the user operation interface 308, and passes the name to the terminal configuration saving module 305, receives the network configuration parameters transmitted by the terminal configuration saving module 305, and passes the network configuration parameters to the terminal configuration effectiveness module 310.
[0128] Through the above-mentioned terminal network switching system, the connection parameters of multiple planned networks (for example, terminal testing, terminal office) are pushed to the terminal, so that one terminal can simultaneously assume two terminal roles with different access rights. During the network switching process, the user only needs to perform corresponding operations in the operation interface, without the need to perform a series of operations such as plugging and unplugging network cables, obtaining dynamic passwords, clicking on wireless network connections, and entering dynamic passwords. The terminal can automatically switch between the two roles quickly, and both networks use wired connections. The network connection speed is fast and the quality is high, which improves the user experience and data transmission rate, improves work efficiency, and solves the security isolation of multiple networks (for example, terminal testing, terminal office) and saves terminal resource investment, which can provide users with a good user experience. This solves the technical problem in the related technology that in order to achieve the switching of different terminals, two network segments are connected respectively by wire and wireless, resulting in a long switching time.
[0129] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned terminal network switching methods by executing the executable instructions.
[0130] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the terminal network switching methods described above.
[0131] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: receiving a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of the network to be connected and a terminal identifier, the terminal identifier being used to query the employee information, employee workstation information and connection switch information of the associated terminal device; responding to the network switching instruction, generating terminal network configuration parameters of the network to be connected based on the terminal identifier, the employee information, the employee workstation information and the connection switch information; outputting the terminal identifier and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to the terminal network card, replacing the network parameters of the currently running default network, and completing the network switching.
[0132] Figure 4 FIG. 1 is a hardware structure block diagram of an electronic device (or mobile device) according to a terminal network switching method according to an embodiment of the present invention. Figure 4As shown, the electronic device may include one or more (402a, 402b, ..., 402n are used to illustrate) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0133] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0134] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0137] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0139] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A terminal network switching method, characterized in that: Applied to the server, the network maintenance end completes the network planning in the park in advance, allocates two network segments to each department room, and sets one of the network segments as the default network segment of the department room in combination with the working characteristics of the department room, and enters the name of each department room, the default network segment, and the second network segment information into the information database, including: Receiving a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of a network to be connected and a terminal identifier, wherein the terminal identifier is used to query employee information, employee workstation information, and connection switch information associated with the terminal device; In response to the network switching instruction, generating terminal network configuration parameters of the network to be connected based on the terminal identification, the employee information, the employee workstation information and the connection switch information; Outputting the terminal identification and the terminal network configuration parameters to the terminal device, wherein after receiving the network configuration parameters, the terminal device saves them to a specified directory, calls the network parameters corresponding to the default network name by running a batch program, configures the terminal network configuration parameters to the terminal network card, replaces the network parameters of the currently running default network, and completes the network switching; All tables stored in the information base form a table set, and the tables included in the table set include: client information table: including terminal identification, department identification, default network segment, network name of the default network segment, default network segment mask, network name of the second network segment, the second network segment address, the second network segment mask, the second network segment gateway, DNS address information, and workstation information point; department information table: including department identification, default network segment, network name of the default network segment, default network segment mask, the second network segment network name, the second network segment address pool, the second network segment mask, the second network segment gateway, and the DNS address information; network information table: including network segment, network segment mask, network segment gateway, and the DNS address information; switch information table: including switch management address, switch port, and workstation information point.
2. The switching method according to claim 1, characterized in that: Also includes: Receiving a network management request initiated by the terminal device, wherein the network management request carries at least an operation identifier and management parameter information; When the operation instruction indicated by the operation identifier is to add a new department or room, writing the management parameter information into the department or room information table of the information base; In the case where the operation instruction indicated by the operation identifier is to modify the department room, replacing the original department room name with the department room name to be modified in the department room information table based on the management parameter information; In the case where the operation instruction indicated by the operation identifier is to add a network segment, adding a specified field to the network information table in the information base based on the management parameter information; or, in the case where the operation instruction indicated by the operation identifier is to delete a network segment, deleting a specified field from the network information table in the information base based on the management parameter information; When the operation instruction indicated by the operation identifier is to add a domain name system DNS address, the specified address is added to the network information table in the information base based on the management parameter information; or, when the operation instruction indicated by the operation identifier is to delete the DNS address, the specified address is deleted from the network information table in the information base based on the management parameter information.
3. The switching method according to claim 2, characterized in that: After receiving the network management request initiated by the terminal device, the method further includes: When the operation instruction indicated by the operation identifier is a newly added network configuration, writing the management parameter information into the terminal information table of the information base; Extract the first type of key field information in the department information table to obtain a first extraction result; Writing the first extraction result into the terminal information table; Extracting an idle address from a second network segment address pool, and writing the extracted idle address into the terminal information table, wherein the second network segment address pool stores a plurality of second network segments, and the second network segment is a switching network segment of a default network segment currently used by the user; Extract the second type of key field information in the switch information table of the information base to obtain a second extraction result, and write the second extraction result into the terminal information table.
4. The switching method according to claim 2, characterized in that: After receiving the network management request initiated by the terminal device, the method further includes: When the operation instruction indicated by the operation identifier is to modify the network configuration, writing the management parameter information into the terminal information table of the information base; Based on the terminal identifier of the terminal whose network configuration is to be modified, query the terminal information table of the information base for a new department room associated with the terminal identifier, and replace the original department room identifier with the department room identifier of the new department room; Release the network segment address of the second network segment, and update the network information table of the information base; Using the department identification of the new department as a keyword, extracting the third type of key field information in the department information table of the information base to obtain a third extraction result; Writing the third extraction result into the terminal information table; Extracting an idle address from the second network segment address pool, and writing the extracted idle address into the terminal information table; Extract the fourth type of key field information in the switch information table of the information base to obtain a fourth extraction result, and write the fourth extraction result into the terminal information table.
5. The switching method according to claim 2, characterized in that: After receiving the network management request initiated by the terminal device, the method further includes: When the operation instruction indicated by the operation identifier is to delete the network configuration, writing the management parameter information into the terminal information table of the information base; Based on the terminal identifier of the terminal whose network configuration is to be deleted, query the terminal information associated with the terminal identifier in the terminal information table of the information base, and delete the terminal identifier and the terminal information; The network segment address of the second network segment is released, and the network information table of the information base is updated.
6. The switching method according to claim 2, characterized in that: Before receiving the network management request initiated by the terminal device, the method further includes: Controlling the device screen interface of the terminal device to display a network menu, wherein the network menu displays the currently running default network and switchable networks in a vertical arrangement; Detecting the user's network selection operation; In a case where the network selection operation indicates that the switchable network needs to be used, the network management request is generated based on the network identifier of the switchable network.
7. A switching device for a terminal network, characterized in that: The network maintenance end completes the network planning in the park in advance, allocates two network segments to each department room, and sets one of the network segments as the default network segment of the department room in combination with the working characteristics of the department room, and enters the name of each department room, the default network segment, and the second network segment information into the information database, including: A first receiving unit is used to receive a network switching instruction initiated by a terminal device, wherein the network switching instruction carries at least: a network name of a network to be connected and a terminal identifier, wherein the terminal identifier is used to query employee information, employee workstation information, and connection switch information associated with the terminal device; A first generating unit, configured to respond to the network switching instruction and generate a terminal network configuration parameter of the network to be connected based on the terminal identification, the employee information, the employee workstation information and the connection switch information; An output unit, used to output the terminal identifier and the terminal network configuration parameters to the terminal device, wherein the terminal device configures the terminal network configuration parameters to the terminal network card to replace the network parameters of the currently running default network, thereby completing the network switching; All tables stored in the information base form a table set, and the tables included in the table set include: client information table: including terminal identification, department identification, default network segment, network name of the default network segment, default network segment mask, network name of the second network segment, the second network segment address, the second network segment mask, the second network segment gateway, DNS address information, and workstation information point; department information table: including department identification, default network segment, network name of the default network segment, default network segment mask, the second network segment network name, the second network segment address pool, the second network segment mask, the second network segment gateway, and the DNS address information; network information table: including network segment, network segment mask, network segment gateway, and the DNS address information; switch information table: including switch management address, switch port, and workstation information point.
8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the terminal network switching method according to any one of claims 1 to 6 by executing the executable instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the terminal network switching method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for automatically switching machine room network
CN107040480A
