WO2019205133A1 - Vpn line handover method, apparatus and electronic device - Google Patents

Vpn line handover method, apparatus and electronic device Download PDF

Info

Publication number
WO2019205133A1
WO2019205133A1 PCT/CN2018/085081 CN2018085081W WO2019205133A1 WO 2019205133 A1 WO2019205133 A1 WO 2019205133A1 CN 2018085081 W CN2018085081 W CN 2018085081W WO 2019205133 A1 WO2019205133 A1 WO 2019205133A1
Authority
WO
WIPO (PCT)
Prior art keywords
line
mobile terminal
vpn
vpn line
parameter
Prior art date
Application number
PCT/CN2018/085081
Other languages
French (fr)
Chinese (zh)
Inventor
袁国勇
Original Assignee
深圳前海达闼云端智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Priority to PCT/CN2018/085081 priority Critical patent/WO2019205133A1/en
Priority to CN201880001462.1A priority patent/CN109076005B/en
Publication of WO2019205133A1 publication Critical patent/WO2019205133A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/32Reselection being triggered by specific parameters by location or mobility data, e.g. speed data

Definitions

  • the present invention relates to the field of virtual private network (VPN) switching technologies, and in particular, to a VPN line switching method, device, and electronic device.
  • VPN virtual private network
  • the embodiment of the present invention provides a method, a device, and an electronic device for switching a VPN line, which are mainly used to solve the problem that the user is not convenient to operate by manually switching the VPN.
  • a technical solution adopted by the embodiment of the present application is to provide a VPN line switching method, which is applied to a mobile terminal, and the method includes:
  • the line parameter of the mobile terminal includes at least one of the following:
  • the system time of the mobile terminal
  • the NFC punching information of the mobile terminal is the NFC punching information of the mobile terminal.
  • determining, according to the line parameter, the VPN line of the mobile terminal includes:
  • the method before the acquiring the line parameter of the mobile terminal, the method further includes: after detecting that the user account is logged in to the mobile terminal, controlling the user account to connect to a default VPN line;
  • the method further includes: determining whether the default VPN line is the same as the determined VPN line, and if not, performing the control The step of the mobile terminal switching to the determined VPN line.
  • the default VPN line is:
  • the VPN line with the highest connection frequency in the preset time of the user account is the VPN line with the highest connection frequency in the preset time of the user account.
  • the user account has the longest connection time of the VPN line in the preset time.
  • a VPN line switching device which is applied to a mobile terminal, and the device includes:
  • An acquiring module configured to acquire a line parameter of the mobile terminal
  • a determining module configured to determine, according to the line parameter, a VPN line of the mobile terminal
  • a switching module configured to control the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
  • the acquiring module is specifically configured to obtain at least one of the following:
  • the system time of the mobile terminal
  • the NFC punching information of the mobile terminal is the NFC punching information of the mobile terminal.
  • the determining module includes:
  • An obtaining unit configured to obtain a line parameter with the highest priority according to a priority corresponding to the at least two line parameters
  • a determining unit configured to determine, according to the highest priority line parameter, the VPN line of the mobile terminal.
  • the device before the obtaining the line parameter of the mobile terminal, the device further includes a control module, where the control module is configured to control the user account connection default after detecting that the user account logs in to the mobile terminal.
  • VPN line ;
  • the device After determining the VPN line of the mobile terminal according to the line parameter, the device further includes a determining module, where the determining module is configured to determine whether the default VPN line is the same as the determined VPN line, if If not, the step of controlling the mobile terminal to switch to the determined VPN line is performed.
  • the default VPN line is:
  • the VPN line with the highest connection frequency in the preset time of the user account is the VPN line with the highest connection frequency in the preset time of the user account.
  • the user account has the longest connection time of the VPN line in the preset time.
  • an electronic device including: at least one processor; and a memory communicably connected to the at least one processor; wherein the memory An instruction program executable by the at least one processor is stored, the instruction program being executed by the at least one processor to cause the at least one processor to perform a VPN line switching method as described above.
  • another technical solution adopted by the embodiment of the present application is to provide a computer program product, the computer program product comprising: a non-volatile computer readable storage medium, and embedded in the non-easy Computer program instructions for a computer readable storage medium, the computer program instructions comprising instructions for causing a processor to perform a VPN line switching method as described above.
  • another technical solution adopted by the embodiment of the present application is to provide a non-transitory computer readable storage medium storing computer executable instructions, the computer executable The instructions are for causing a computer to perform the VPN line switching method as described above.
  • the VPN line of the mobile terminal is obtained by acquiring the line parameter of the mobile terminal, and then determining the VPN line of the mobile terminal according to the line parameter.
  • This embodiment enables the mobile terminal to automatically connect and switch the VPN line according to its line parameters, without requiring the user to manually select a VPN, which brings convenience for the user to connect to the VPN and improves the user experience.
  • FIG. 1 is a schematic diagram of an operating environment of an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a VPN line switching method according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for switching a VPN line according to another embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a VPN line switching apparatus according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of hardware of an electronic device according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram of an operating environment of an embodiment of the present application, where the operating environment includes EMM server 10, EMM terminal 20, and VPN network 30.
  • the EMM server 10 and the EMM terminal 20 are servers and terminals deployed based on an Enterprise Mobile Management (EMM) platform.
  • EMM is a set of technology platform and management method for realizing the mobile use of mobile phones, tablet computers, desktop computers and other mobile terminals for enterprise employees.
  • EMM is related to the process of enterprise mobile information construction through mobile information technology and management means. Enterprise mobile devices, applications, information and other content provide information management solutions and services.
  • the EMM server 10 can provide corresponding service or logical computing capabilities, such as configuring a VPN policy, and configuring trigger conditions corresponding to each VPN policy.
  • the EMM server 10 can also be connected to one or more databases, invoking relevant data (such as obtaining the currently connected VPN line information from the EMM terminal 20 and storing it) or program instructions.
  • the EMM server 10 may specifically be a server, or a server cluster composed of several servers, or a cloud computing service center.
  • the EMM terminal 20 is connected to the EMM server 10 through a wireless network or a wired network.
  • the EMM terminal 20 may be a mobile terminal device such as a mobile phone, a tablet computer, a notebook computer, or a desktop computer.
  • the EMM terminal 20 is mainly used to perform a VPN line switching method, for example, acquiring its own line parameters; determining its VPN line according to the line parameters; and controlling to switch to the determined VPN line, where
  • the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN lines.
  • the VPN network 30 includes at least two, which are respectively connected to the EMM terminal 20, so that the EMM terminal 20 accesses the relevant intranet through the connected VPN network 30.
  • the VPN network 30 can be deployed in an end-to-end mode, either a vendor-enterprise mode or an internal vendor mode.
  • the line parameters acquired by the EMM terminal 20 have a one-to-one correspondence with the VPN network.
  • the operating environment provided by the embodiment of the present application is not limited to the operating environment shown in FIG. 1 .
  • the correspondence between one EMM terminal 20 and a plurality of VPN networks 30, those skilled in the art can understand that in practical applications, the operating environment More EMM server 10 and EMM terminal 20, as well as a corresponding relationship of multiple EMM terminals 20 with VPN network 30, may also be included.
  • FIG. 2 is a schematic flowchart of a VPN line switching method according to an embodiment of the present disclosure, where the method includes:
  • Step 101 Obtain a line parameter of the mobile terminal.
  • Step 102 Determine, according to the line parameter, a VPN line of the mobile terminal.
  • Step 103 Control the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
  • the VPN line switching method is performed by the EMM terminal 20 described above, where the EMM terminal is the mobile terminal.
  • Obtaining the line parameter of the mobile terminal that is, the mobile terminal acquires its own line parameter.
  • the mobile terminal can periodically acquire its own line parameters, and automatically obtain its line parameters every preset period value.
  • the setting of the period value can be determined according to the frequency of the VPN terminal switching the VPN line, if the handover is performed. If the frequency of the VPN line is high, the period value can be relatively small.
  • the line parameter refers to a parameter associated with the mobile terminal and satisfies a VPN line connection condition, wherein the VPN line connection condition may be preset in the EMM server 10 and delivered by the EMM server 10 to the mobile terminal. .
  • the line parameter includes at least one of the following: a WIFI name to which the mobile terminal is connected, a location where the mobile terminal is located, a system time of the mobile terminal, and an NFC of the mobile terminal. Punch information.
  • the name of the WIFI to which the mobile terminal is connected refers to the name of the WIFI to which the mobile terminal is currently connected. All the WIFI names on the mobile terminal connection may be set as line parameters, and part of the WIFI name on the mobile terminal connection may also be set as a line parameter.
  • a WIFI whitelist may be preset, and only the WIFI name on the mobile terminal connection is on the WIFI whitelist, and the WIFI names can be used as line parameters.
  • the WIFI whitelist refers to a WIFI list that enables the mobile terminal to meet the VPN line switching conditions and can be connected according to the specific application scenario of the current VPN line handover.
  • Filtering the line parameters through the WIFI white list can help the mobile terminal to quickly obtain suitable line parameters, thereby shortening the time for determining the VPN line of the mobile terminal.
  • the discovered VPN line is the VPN line of the mobile terminal.
  • Each WIFI name corresponds to a VPN line.
  • WIFI networks will set the same WIFI name.
  • multiple identical WIFI names correspond to the same VPN line.
  • the MAC address of the gateway device selects a VPN line, and each MAC address corresponds to a VPN line. Therefore, even if the name of the WIFI connected to the mobile terminal is the same, the MAC address of the access is different, so that the corresponding VPN line can be correctly determined.
  • the location where the mobile terminal is located may be detected by the mobile terminal by using a positioning module (such as a GPS positioning module) carried by the mobile terminal, and the current location of the mobile terminal is obtained.
  • determining the VPN line of the mobile terminal according to the line parameter includes: searching in a preset geofence information table. Determining, by the location of the mobile terminal, whether the location of the mobile terminal is currently included in the geo-fence information table, and if so, acquiring a VPN code corresponding to the location, thereby determining a VPN of the mobile terminal line.
  • the VPN code is used to identify the VPN line, and each VPN line corresponds to a VPN code.
  • the geo-fence information table is pre-established and may be stored in the EMM server 10, where the geo-fence information table includes a plurality of different geographic regions, and VPN lines corresponding to the plurality of different geographic regions.
  • the plurality of different geographical areas are determined according to specific application scenarios involved in the current VPN line switching. For example, a specialist is employed in three hospitals A, B, and C respectively, and the doctor needs to separately access the work.
  • the intranet of the three hospitals where the geofence information table can be pre-determined based on the geographic location of the three hospitals A, B, and C, and the hospital A is divided into area 1, and corresponding to VPN1, B The hospital is divided into area 2, and corresponding to VPN2, the C hospital is divided into area 3, and corresponding to VPN3, if it is detected that the current location of the doctor is located in area 2, it is determined that the VPN line of the mobile terminal is VPN2.
  • the system time of the mobile terminal refers to the current system time of the mobile terminal, which is specifically a certain time.
  • determining the VPN line of the mobile terminal according to the line parameter comprises: searching for a system time of the mobile terminal in a preset time fence information table, Determining whether the system time of the mobile terminal is included in the time fence information table, and if yes, acquiring a VPN code corresponding to the system time, thereby determining a VPN line of the mobile terminal.
  • the time fence information table is pre-established and may be stored in the EMM server 10, where the time fence information table includes a plurality of different time segments, and the VPN lines corresponding to the plurality of different time segments respectively.
  • the time fence information table can be specifically as shown in Table 1 below:
  • the VPN code determined in different time periods may be determined according to the user's historical time to connect to the VPN coding habit, or may be determined by other means.
  • the time fence information table may be dynamically updated, and each mobile terminal user may be allocated a management time fence information table in the EMM server, and the time fence information table is dynamically updated according to the time when the mobile terminal connects to the VPN line.
  • the NFC punching information of the mobile terminal includes a time when the mobile terminal performs NFC punching, and a geographic location when the mobile terminal performs NFC punching.
  • the mobile terminal includes an NFC punching function, and when it performs NFC punching, the mobile terminal automatically acquires its current system time and the current geographic location of the mobile terminal.
  • the VPN line of the mobile terminal is determined according to the line parameter, that is, the VPN line is determined according to the system time when the mobile terminal performs NFC punching or its current geographic location; or, according to the mobile terminal The system time and its current geographic location when the NFC is punched determines its VPN line.
  • the VPN line is determined by two limiting factors, time and geographical location, so that the determined VPN line can better meet the actual needs of the user, and the determined VPN line has higher accuracy.
  • the line parameter may further include other parameters.
  • the line parameter may also be a MAC address of a gateway device of the mobile terminal accessing the network, different.
  • the MAC address corresponds to a unique VPN line.
  • the foregoing process is to determine a VPN line of the mobile terminal according to a line parameter.
  • the determining, according to the line parameter, the VPN line of the mobile terminal includes: Obtaining, according to the priority corresponding to the at least two line parameters, obtaining a line parameter with the highest priority; determining a VPN line of the mobile terminal according to the line parameter with the highest priority.
  • the currently obtained line parameters of the mobile terminal include: a WIFI name to which the mobile terminal is connected, a current location of the mobile terminal, and a current system time of the mobile terminal, and the three line parameters correspond to The priority from high to low is the current location of the mobile terminal, the WIFI name to which the mobile terminal is connected, and the current system time of the mobile terminal. Then, according to the current location of the mobile terminal, Determining the VPN line of the mobile terminal.
  • the priority of the above line parameters may be dynamically updated based on big data. For example, a doctor works at A hospital every day at 10 am and connects to the VPN line corresponding to hospital A. At this time, the position priority is the highest. But from a certain day, the doctor started to connect to the VPN line of Hospital B at A hospital every day at 10:00 am. With the accumulation of the number of times, when the number of times reaches the threshold, the priority of time is higher than the priority of the position. Update the priority corresponding to the line parameter.
  • a line parameter is determined from the plurality of line parameters according to the priority corresponding to the line parameter, and then the VPN line of the mobile terminal is determined according to the determined line parameter.
  • the VPN line of the mobile terminal may be determined by other means. For example, the VPN line of the mobile terminal is directly determined based on a preset algorithm and a current multiple line parameter.
  • the embodiment of the present application provides a method for switching a VPN line, which determines a VPN line of the mobile terminal according to the line parameter of the mobile terminal, and then controls the VPN line determined by the mobile terminal to connect.
  • This embodiment enables the mobile terminal to automatically connect and switch the VPN line according to its line parameters, without requiring the user to manually select a VPN, which brings convenience for the user to connect to the VPN and improves the user experience.
  • FIG. 3 is a schematic flowchart of a VPN line switching method according to another embodiment of the present disclosure, where the method includes:
  • Step 201 After detecting that the user account logs in to the mobile terminal, control the user account to connect to a default VPN line.
  • Step 202 Obtain a line parameter of the mobile terminal.
  • Step 203 Determine, according to the line parameter, a VPN line of the mobile terminal.
  • Step 204 Determine whether the default VPN line is the same as the determined VPN line.
  • Step 205 If not, control the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line. .
  • the user involved in the VPN handover may register in the EMM server 10, and the registered user account may log in to the EMM server 10 through the EMM terminal 20 (that is, the mobile terminal).
  • the mobile terminal itself detects whether the user account is logged in, or the mobile terminal obtains related information of the user account login from the EMM server 10.
  • the user account After the user account is logged in to the mobile terminal, the user account is controlled to connect to the default VPN line, and the default VPN line is a VPN line sent by the EMM server 10 to the mobile terminal according to a preset VPN configuration policy, for example,
  • the default VPN line is: the VPN line that the user account is connected last time, or the VPN line with the highest connection frequency in the preset time of the user account, or the longest connection time in the preset time of the user account. VPN lines, etc.
  • the VPN line is automatically allocated to the user, which simplifies the operation of connecting the VPN to the user, and brings convenience to the user operation. .
  • the line parameters of the mobile terminal may be obtained periodically, and the VPN line of the mobile terminal may be determined according to the obtained line parameter, and the process may refer to the foregoing embodiment. The narrative will not be repeated here.
  • the default connected VPN line is compared with the determined VPN line, and when the two are different, the VPN line is switched. Otherwise, the default VPN line is still connected. Thereby, the repeated VPN line duplication is avoided.
  • the process of controlling the VPN line switching is mainly performed by the mobile terminal.
  • the switching of the VPN line may also be controlled by the EMM server 10, for example, according to the foregoing.
  • the determined VPN line is sent to the EMM server 10, and the EMM server 10 controls the user account to switch to the determined VPN line.
  • the embodiment of the present application provides a VPN line switching method, which automatically allocates a default VPN line for the user account by detecting the logged user account, and the mobile terminal connects to the default VPN line, and further, according to the mobile
  • the line parameters of the terminal determine the VPN line that the mobile terminal can switch, thereby implementing the switching of the VPN line.
  • This embodiment implements two ways of automatically connecting the VPN line, and does not require manual operation by the user.
  • the embodiment can automatically connect the corresponding VPN line according to the user account and the specific application scenario, thereby ensuring the connected VPN line. Reliability.
  • FIG. 4 is a schematic structural diagram of a VPN line switching apparatus according to an embodiment of the present disclosure.
  • the apparatus 40 includes an obtaining module 41, a determining module 42, and a switching module 43.
  • the obtaining module 41 is configured to acquire a line parameter of the mobile terminal, and the determining module 42 is configured to determine a VPN line of the mobile terminal according to the line parameter, and the switching module 43 is configured to control the mobile terminal to switch to The determined VPN line, wherein the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
  • the acquiring module 41 is specifically configured to acquire at least one of the following: a name of the WIFI to which the mobile terminal is connected; a location where the mobile terminal is located; a system time of the mobile terminal; and a location of the mobile terminal NFC punch card information.
  • the determining module 42 when the acquired line parameters include at least two items, includes: an obtaining unit 421 and a determining unit 422.
  • the obtaining unit 421 is configured to obtain a line parameter with the highest priority according to the priority corresponding to the at least two line parameters.
  • the determining unit 422 is configured to determine a VPN line of the mobile terminal according to the line parameter with the highest priority.
  • the device 40 before the acquiring the line parameter of the mobile terminal, the device 40 further includes a control module 44, where the control module 44 is configured to detect the user account login. After the mobile terminal is described, the user account is controlled to connect to a default VPN line. After determining the VPN line of the mobile terminal according to the line parameter, the device 40 further includes a determining module 45, where the determining module 45 is configured to determine whether the default VPN line and the determined VPN line are If not, the related operations of the switching module 43 are performed, specifically, the mobile terminal is controlled to switch to the determined VPN line.
  • the default VPN line is: the VPN line that is connected to the user account last time, or the VPN line with the highest connection frequency in the preset time of the user account, or the connection time of the user account is the longest in the preset time. VPN lines, etc.
  • the embodiment of the present application provides a VPN line switching device, which determines a VPN line determined by the mobile terminal by acquiring a line parameter of the mobile terminal, and then determining a VPN line of the mobile terminal according to the line parameter.
  • This embodiment enables the mobile terminal to automatically connect and switch the VPN line according to its line parameters, without requiring the user to manually select a VPN, which brings convenience for the user to connect to the VPN and improves the user experience.
  • FIG. 5 is a schematic diagram showing the hardware structure of an electronic device according to an embodiment of the present application.
  • the electronic device 50 can perform the VPN line switching method as described above.
  • the electronic device 50 includes:
  • One or more processors 51 and a memory 52 are exemplified by a processor 51 in FIG.
  • the processor 51 and the memory 52 can be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 52 is a non-volatile computer readable storage medium and can be used for storing a non-volatile software program, a non-volatile computer executable program, and a module, such as a program corresponding to the VPN line switching method in the embodiment of the present application. Instructions/modules (eg, the modules shown in Figure 4).
  • the processor 51 executes various functional applications and data processing of the server by executing non-volatile software programs, instructions, and modules stored in the memory 52, that is, implementing the VPN line switching method of the above method embodiment.
  • the memory 52 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the VPN line switching device, and the like.
  • memory 52 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • memory 52 may optionally include memory remotely located relative to processor 51, which may be connected to the VPN line switching device over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the one or more modules are stored in the memory 52, and when executed by the one or more processors 51, perform a VPN line switching method in any of the above method embodiments, for example, performing the above described FIG.
  • the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones, multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices.
  • Server A device that provides computing services.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
  • the embodiment of the present application provides a non-transitory computer readable storage medium storing computer-executable instructions that are executed by an electronic device to perform any of the above method embodiments.
  • the VPN line switching method for example, performing the method steps 101 to 103 in FIG. 2 described above, the method steps 201 to 205 in FIG. 3, implementing the modules 41-45 in FIG. 4, the units 421-422 Features.
  • An embodiment of the present application provides a computer program product, including a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer,
  • the computer performs the VPN line switching method in any of the foregoing method embodiments, for example, performing the method steps 101 to 103 in FIG. 2 described above, and the method steps 201 to 205 in FIG. 3, implementing the module 41 in FIG. 45. Functions of units 421-422.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A VPN line handover method, apparatus and electronic device, the method comprising: acquiring line parameters of a mobile terminal (101); determining a VPN line for the mobile terminal according to the line parameters (102); and controlling the mobile terminal to switch over to the determined VPN line, wherein there are at least two VPN lines, and there is a one-to-one correspondence between the line parameters and the VPN lines (103). The described method may allow a mobile terminal to automatically connect to and switch VPN lines according to the line parameters thereof without requiring a user to manually select a VPN, thus making the operation of the user connecting to a VPN more convenient and improving the user experience.

Description

一种VPN线路切换方法、装置及电子设备VPN line switching method, device and electronic device 技术领域Technical field
本申请涉及虚拟专用网络(Virtual Private Network,VPN)切换技术领域,特别是涉及一种VPN线路切换方法、装置及电子设备。The present invention relates to the field of virtual private network (VPN) switching technologies, and in particular, to a VPN line switching method, device, and electronic device.
背景技术Background technique
目前,各企业单位越来越重视网络安全,一些涉及敏感或者安全的业务通常都会部署在企业内网中。在移动办公的大趋势下,当一个用户同时涉及到多个不同的内网业务时,需要通过多个不同的VPN来完成对该多个不同内网业务的处理,一般情况是用户根据自己当前的需要手动选择某个VPN,从而进入对应的内网。At present, enterprises and organizations are paying more and more attention to network security. Some sensitive or security-related services are usually deployed in intranets. Under the general trend of mobile office, when a user involves multiple different intranet services at the same time, multiple different intranet services need to be processed through multiple different VPNs. Generally, users are based on their current You need to manually select a VPN to enter the corresponding intranet.
然而,每次手动选择对应的VPN会给用户的操作带来不便,不利于用户体验。However, manually selecting the corresponding VPN each time may cause inconvenience to the user's operation, which is not conducive to the user experience.
发明内容Summary of the invention
本申请实施例提供一种VPN线路切换方法、装置及电子设备,主要用于解决手动切换VPN造成用户操作不便捷的问题。The embodiment of the present invention provides a method, a device, and an electronic device for switching a VPN line, which are mainly used to solve the problem that the user is not convenient to operate by manually switching the VPN.
为解决上述技术问题,本申请实施例采用的一个技术方案是:提供一种VPN线路切换方法,应用于移动终端,所述方法包括:To solve the above technical problem, a technical solution adopted by the embodiment of the present application is to provide a VPN line switching method, which is applied to a mobile terminal, and the method includes:
获取所述移动终端的线路参数;Obtaining line parameters of the mobile terminal;
根据所述线路参数确定所述移动终端的VPN线路;Determining, according to the line parameter, a VPN line of the mobile terminal;
控制所述移动终端切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。And controlling the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
可选地,所述移动终端的线路参数包括以下至少任意一项:Optionally, the line parameter of the mobile terminal includes at least one of the following:
所述移动终端所连接的WIFI名称;The name of the WIFI to which the mobile terminal is connected;
所述移动终端所处的位置;The location where the mobile terminal is located;
所述移动终端的系统时间;以及The system time of the mobile terminal;
所述移动终端的NFC打卡信息。The NFC punching information of the mobile terminal.
可选地,当获取到的所述线路参数包括至少两项时,所述根据所述线路参 数确定所述移动终端的VPN线路包括:Optionally, when the obtained line parameter includes at least two items, determining, according to the line parameter, the VPN line of the mobile terminal includes:
根据所述至少两项线路参数对应的优先级,获取优先级最高的线路参数;Obtaining a line parameter with the highest priority according to a priority corresponding to the at least two line parameters;
根据所述优先级最高的线路参数确定所述移动终端的VPN线路。Determining a VPN line of the mobile terminal according to the highest priority line parameter.
可选地,在所述获取所述移动终端的线路参数之前,所述方法还包括:在检测到用户账号登录所述移动终端后,控制所述用户账号连接默认的VPN线路;Optionally, before the acquiring the line parameter of the mobile terminal, the method further includes: after detecting that the user account is logged in to the mobile terminal, controlling the user account to connect to a default VPN line;
在所述根据所述线路参数确定所述移动终端的VPN线路之后,所述方法还包括:判断所述默认的VPN线路与所述确定的VPN线路是否相同,若不相同,则执行所述控制所述移动终端切换至所述确定的VPN线路的步骤。After determining the VPN line of the mobile terminal according to the line parameter, the method further includes: determining whether the default VPN line is the same as the determined VPN line, and if not, performing the control The step of the mobile terminal switching to the determined VPN line.
可选地,所述默认的VPN线路为:Optionally, the default VPN line is:
所述用户账号最近一次连接的VPN线路;或者The VPN line to which the user account was last connected; or
所述用户账号预设时间内连接频率最高的VPN线路;或者The VPN line with the highest connection frequency in the preset time of the user account; or
所述用户账号预设时间内连接时间最长的VPN线路。The user account has the longest connection time of the VPN line in the preset time.
为解决上述技术问题,本申请实施例采用的另一个技术方案是:提供一种VPN线路切换装置,应用于移动终端,所述装置包括:In order to solve the above technical problem, another technical solution adopted by the embodiment of the present application is to provide a VPN line switching device, which is applied to a mobile terminal, and the device includes:
获取模块,用于获取所述移动终端的线路参数;An acquiring module, configured to acquire a line parameter of the mobile terminal;
确定模块,用于根据所述线路参数确定所述移动终端的VPN线路;a determining module, configured to determine, according to the line parameter, a VPN line of the mobile terminal;
切换模块,用于控制所述移动终端切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。And a switching module, configured to control the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
可选地,所述获取模块具体用于获取以下至少任意一项:Optionally, the acquiring module is specifically configured to obtain at least one of the following:
所述移动终端所连接的WIFI名称;The name of the WIFI to which the mobile terminal is connected;
所述移动终端所处的位置;The location where the mobile terminal is located;
所述移动终端的系统时间;以及The system time of the mobile terminal;
所述移动终端的NFC打卡信息。The NFC punching information of the mobile terminal.
可选地,当获取到的所述线路参数包括至少两项时,所述确定模块包括:Optionally, when the obtained line parameter includes at least two items, the determining module includes:
获取单元,用于根据所述至少两项线路参数对应的优先级,获取优先级最高的线路参数;An obtaining unit, configured to obtain a line parameter with the highest priority according to a priority corresponding to the at least two line parameters;
确定单元,用于根据所述优先级最高的线路参数确定所述移动终端的VPN线路。And a determining unit, configured to determine, according to the highest priority line parameter, the VPN line of the mobile terminal.
可选地,在所述获取所述移动终端的线路参数之前,所述装置还包括控制 模块,所述控制模块用于在检测到用户账号登录所述移动终端后,控制所述用户账号连接默认的VPN线路;Optionally, before the obtaining the line parameter of the mobile terminal, the device further includes a control module, where the control module is configured to control the user account connection default after detecting that the user account logs in to the mobile terminal. VPN line;
在所述根据所述线路参数确定所述移动终端的VPN线路之后,所述装置还包括判断模块,所述判断模块用于判断所述默认的VPN线路与所述确定的VPN线路是否相同,若不相同,则执行所述控制所述移动终端切换至所述确定的VPN线路的步骤。After determining the VPN line of the mobile terminal according to the line parameter, the device further includes a determining module, where the determining module is configured to determine whether the default VPN line is the same as the determined VPN line, if If not, the step of controlling the mobile terminal to switch to the determined VPN line is performed.
可选地,所述默认的VPN线路为:Optionally, the default VPN line is:
所述用户账号最近一次连接的VPN线路;或者The VPN line to which the user account was last connected; or
所述用户账号预设时间内连接频率最高的VPN线路;或者The VPN line with the highest connection frequency in the preset time of the user account; or
所述用户账号预设时间内连接时间最长的VPN线路。The user account has the longest connection time of the VPN line in the preset time.
为解决上述技术问题,本申请实施例采用的又一个技术方案是:提供一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令程序,所述指令程序被所述至少一个处理器执行,以使所述至少一个处理器执行如上所述的VPN线路切换方法。In order to solve the above technical problem, another technical solution adopted by the embodiment of the present application is to provide an electronic device, including: at least one processor; and a memory communicably connected to the at least one processor; wherein the memory An instruction program executable by the at least one processor is stored, the instruction program being executed by the at least one processor to cause the at least one processor to perform a VPN line switching method as described above.
为解决上述技术问题,本申请实施例采用的再一个技术方案是:提供一种计算机程序产品,所述计算机程序产品包括:非易失性计算机可读存储介质,以及内嵌于所述非易失性计算机可读存储介质的计算机程序指令,所述计算机程序指令包括用以使处理器执行如上所述VPN线路切换方法的指令。In order to solve the above technical problem, another technical solution adopted by the embodiment of the present application is to provide a computer program product, the computer program product comprising: a non-volatile computer readable storage medium, and embedded in the non-easy Computer program instructions for a computer readable storage medium, the computer program instructions comprising instructions for causing a processor to perform a VPN line switching method as described above.
为解决上述技术问题,本申请实施例采用的还一个技术方案是:提供一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如上所述的VPN线路切换方法。In order to solve the above technical problem, another technical solution adopted by the embodiment of the present application is to provide a non-transitory computer readable storage medium storing computer executable instructions, the computer executable The instructions are for causing a computer to perform the VPN line switching method as described above.
在本申请实施例中,通过获取移动终端的线路参数,然后根据所述线路参数确定该移动终端的VPN线路,从而控制该移动终端连接所确定的VPN线路。该实施方式能够使移动终端根据其线路参数自动连接、切换VPN线路,而不需要用户手动选择VPN,给用户连接VPN的操作带来了方便,提升了用户体验。In the embodiment of the present application, the VPN line of the mobile terminal is obtained by acquiring the line parameter of the mobile terminal, and then determining the VPN line of the mobile terminal according to the line parameter. This embodiment enables the mobile terminal to automatically connect and switch the VPN line according to its line parameters, without requiring the user to manually select a VPN, which brings convenience for the user to connect to the VPN and improves the user experience.
附图说明DRAWINGS
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示 为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1是本申请实施例的运行环境示意图;1 is a schematic diagram of an operating environment of an embodiment of the present application;
图2是本申请实施例提供的一种VPN线路切换方法的流程示意图;2 is a schematic flowchart of a VPN line switching method according to an embodiment of the present application;
图3是本申请另一实施例提供的一种VPN线路切换方法的流程示意图;3 is a schematic flowchart of a method for switching a VPN line according to another embodiment of the present application;
图4是本申请实施例提供的一种VPN线路切换装置的结构示意图;4 is a schematic structural diagram of a VPN line switching apparatus according to an embodiment of the present application;
图5是本申请实施例提供的电子设备的硬件结构示意图。FIG. 5 is a schematic structural diagram of hardware of an electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
需要说明的是,如果不冲突,本申请实施例中的各个特征可以相互结合,均在本申请的保护范围之内。另外,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置示意图中的模块划分,或流程图中的顺序执行所示出或描述的步骤。It should be noted that, if there is no conflict, the various features in the embodiments of the present application may be combined with each other, and are all within the protection scope of the present application. In addition, although the functional module division is performed in the device schematic, the logical sequence is shown in the flowchart, but in some cases, it may be performed in a different manner from the module in the device schematic, or in the order in the flowchart. The steps that are described or described.
为了方便读者更好地理解本申请,在对本申请的发明思想进行描述之前,先对本申请的运行环境进行描述,请参阅图1,图1是本申请实施例的运行环境示意图,该运行环境包括EMM服务器10、EMM终端20以及VPN网络30。其中,EMM服务器10和EMM终端20是基于企业移动管理(Enterprise Mobile Management,EMM)平台部署的服务器和终端。EMM是一套实现企业员工安全使用手机、平板电脑、台式计算机等移动终端进行移动化工作的技术平台和管理方法,EMM通过移动信息化技术和管理手段,针对企业移动信息化建设过程中涉及到的企业移动设备、应用、信息等内容提供信息化管理的解决方案和服务。In order to facilitate the reader's understanding of the present application, the operating environment of the present application is described before the description of the inventive concept of the present application. Referring to FIG. 1 , FIG. 1 is a schematic diagram of an operating environment of an embodiment of the present application, where the operating environment includes EMM server 10, EMM terminal 20, and VPN network 30. The EMM server 10 and the EMM terminal 20 are servers and terminals deployed based on an Enterprise Mobile Management (EMM) platform. EMM is a set of technology platform and management method for realizing the mobile use of mobile phones, tablet computers, desktop computers and other mobile terminals for enterprise employees. EMM is related to the process of enterprise mobile information construction through mobile information technology and management means. Enterprise mobile devices, applications, information and other content provide information management solutions and services.
在本实施例中,EMM服务器10可以提供相应的服务或逻辑运算能力,比如,配置VPN策略,以及配置各个VPN策略对应的触发条件,等。EMM服务器10还可以连接至一个或者多个数据库,调用相关的数据(比如从EMM终端20获取当前所连接的VPN线路信息,并进行存储)或者程序指令。EMM服务器10具体可以是一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务中心。EMM终端20通过无线网络或者有线网络通信连接所述 EMM服务器10,EMM终端20具体可以是手机、平板电脑、笔记本电脑、台式计算机等移动终端设备。在本实施例中,所述EMM终端20主要用于执行VPN线路切换方法,例如,获取其自身的线路参数;根据所述线路参数确定其VPN线路;控制切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。VPN网络30包括至少两条,其分别与EMM终端20连接,以使EMM终端20通过连接的VPN网络30访问相关的内网。VPN网络30在部署时可以采用端到端模式,或者供应商-企业模式,或者内部供应商模式。In this embodiment, the EMM server 10 can provide corresponding service or logical computing capabilities, such as configuring a VPN policy, and configuring trigger conditions corresponding to each VPN policy. The EMM server 10 can also be connected to one or more databases, invoking relevant data (such as obtaining the currently connected VPN line information from the EMM terminal 20 and storing it) or program instructions. The EMM server 10 may specifically be a server, or a server cluster composed of several servers, or a cloud computing service center. The EMM terminal 20 is connected to the EMM server 10 through a wireless network or a wired network. The EMM terminal 20 may be a mobile terminal device such as a mobile phone, a tablet computer, a notebook computer, or a desktop computer. In this embodiment, the EMM terminal 20 is mainly used to perform a VPN line switching method, for example, acquiring its own line parameters; determining its VPN line according to the line parameters; and controlling to switch to the determined VPN line, where The number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN lines. The VPN network 30 includes at least two, which are respectively connected to the EMM terminal 20, so that the EMM terminal 20 accesses the relevant intranet through the connected VPN network 30. The VPN network 30 can be deployed in an end-to-end mode, either a vendor-enterprise mode or an internal vendor mode.
在本实施例中,所述EMM终端20获取到的线路参数与所述VPN网络具有一一对应关系。In this embodiment, the line parameters acquired by the EMM terminal 20 have a one-to-one correspondence with the VPN network.
需要说明的是,本申请实施例提供的运行环境不限于图1中所示的运行环境。虽然图1中仅显示了一个EMM服务器10和一个EMM终端20,以及一个EMM终端20与多个VPN网络30的对应关系,但本领域技术人员可以理解的是,在实际应用中,该运行环境还可以包括更多的EMM服务器10和EMM终端20,以及多个EMM终端20与VPN网络30的对应关系。It should be noted that the operating environment provided by the embodiment of the present application is not limited to the operating environment shown in FIG. 1 . Although only one EMM server 10 and one EMM terminal 20 are shown in FIG. 1, and the correspondence between one EMM terminal 20 and a plurality of VPN networks 30, those skilled in the art can understand that in practical applications, the operating environment More EMM server 10 and EMM terminal 20, as well as a corresponding relationship of multiple EMM terminals 20 with VPN network 30, may also be included.
下面提供一种应用于上述运行环境的VPN线路切换方法,请参阅图2,图2是本申请实施例提供的一种VPN线路切换方法的流程示意图,该方法包括:The following is a schematic diagram of a VPN line switching method applied to the foregoing operating environment. Referring to FIG. 2, FIG. 2 is a schematic flowchart of a VPN line switching method according to an embodiment of the present disclosure, where the method includes:
步骤101、获取所述移动终端的线路参数;Step 101: Obtain a line parameter of the mobile terminal.
步骤102、根据所述线路参数确定所述移动终端的VPN线路;Step 102: Determine, according to the line parameter, a VPN line of the mobile terminal.
步骤103、控制所述移动终端切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。Step 103: Control the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
在本实施例中,由上述EMM终端20执行所述VPN线路切换方法,在这里,该EMM终端即所述移动终端。获取所述移动终端的线路参数也即所述移动终端获取自身的线路参数。所述移动终端可以周期性的获取其自身的线路参数,每间隔预设的周期值就自动获取其线路参数,该周期值的设置可以根据所述移动终端切换VPN线路的频率来确定,如果切换VPN线路的频率高,则周期值可以相对偏小。该线路参数指的是与所述移动终端相关联的并且满足VPN线路连接条件的参数,其中,VPN线路连接条件可以预先设置于上述EMM服务器10中,由EMM服务器10下发至所述移动终端。In the present embodiment, the VPN line switching method is performed by the EMM terminal 20 described above, where the EMM terminal is the mobile terminal. Obtaining the line parameter of the mobile terminal, that is, the mobile terminal acquires its own line parameter. The mobile terminal can periodically acquire its own line parameters, and automatically obtain its line parameters every preset period value. The setting of the period value can be determined according to the frequency of the VPN terminal switching the VPN line, if the handover is performed. If the frequency of the VPN line is high, the period value can be relatively small. The line parameter refers to a parameter associated with the mobile terminal and satisfies a VPN line connection condition, wherein the VPN line connection condition may be preset in the EMM server 10 and delivered by the EMM server 10 to the mobile terminal. .
在本实施例中,所述线路参数包括以下至少任意一项:所述移动终端所连 接的WIFI名称、所述移动终端所处的位置、所述移动终端的系统时间以及所述移动终端的NFC打卡信息。In this embodiment, the line parameter includes at least one of the following: a WIFI name to which the mobile terminal is connected, a location where the mobile terminal is located, a system time of the mobile terminal, and an NFC of the mobile terminal. Punch information.
其中,所述移动终端所连接的WIFI名称指的是所述移动终端当前所连接的WIFI的名称。可以将所述移动终端连接上的全部WIFI名称都设置为线路参数,也可以将所述移动终端连接上的部分WIFI名称设置为线路参数。比如,可以预先设置一WIFI白名单,只有所述移动终端连接上的WIFI名称在所述WIFI白名单上,这些WIFI名称才可以作为线路参数。该WIFI白名单指的是根据当前VPN线路切换的具体应用场景,使所述移动终端满足VPN线路切换条件并且能够连接的WIFI名单。通过WIFI白名单筛选线路参数,能够帮助所述移动终端快速获取合适的线路参数,从而缩短确定所述移动终端的VPN线路的时间。当所述线路参数是所述移动终端所连接的WIFI名称时,所述根据所述线路参数确定所述移动终端的VPN线路具体包括:根据所述WIFI名称查找所述WIFI名称对应的VPN线路,该查找到的VPN线路即所述移动终端的VPN线路。其中,每一WIFI名称对应一VPN线路。The name of the WIFI to which the mobile terminal is connected refers to the name of the WIFI to which the mobile terminal is currently connected. All the WIFI names on the mobile terminal connection may be set as line parameters, and part of the WIFI name on the mobile terminal connection may also be set as a line parameter. For example, a WIFI whitelist may be preset, and only the WIFI name on the mobile terminal connection is on the WIFI whitelist, and the WIFI names can be used as line parameters. The WIFI whitelist refers to a WIFI list that enables the mobile terminal to meet the VPN line switching conditions and can be connected according to the specific application scenario of the current VPN line handover. Filtering the line parameters through the WIFI white list can help the mobile terminal to quickly obtain suitable line parameters, thereby shortening the time for determining the VPN line of the mobile terminal. Determining, according to the line parameter, the VPN line of the mobile terminal, according to the line parameter, searching for a VPN line corresponding to the WIFI name, where the line parameter is a WIFI name to which the mobile terminal is connected, The discovered VPN line is the VPN line of the mobile terminal. Each WIFI name corresponds to a VPN line.
可以理解的是,一些情况下不同的WIFI网络会设置相同的WIFI名称,此时出现多个相同的WIFI名称对应同一VPN线路的情况,为了避免VPN线路接入错误,可以进一步基于接入网络的网关设备的MAC地址来选择VPN线路,每一MAC地址对应一VPN线路,因此,即便移动终端连接的WIFI的名称相同,但接入的MAC地址不同,从而能正确的确定其对应的VPN线路。It can be understood that in some cases, different WIFI networks will set the same WIFI name. In this case, multiple identical WIFI names correspond to the same VPN line. In order to avoid VPN line access errors, it may be further based on the access network. The MAC address of the gateway device selects a VPN line, and each MAC address corresponds to a VPN line. Therefore, even if the name of the WIFI connected to the mobile terminal is the same, the MAC address of the access is different, so that the corresponding VPN line can be correctly determined.
其中,所述移动终端所处的位置可以由所述移动终端通过自身携带的定位模块(比如GPS定位模块)进行检测,获取所述移动终端当前所处的位置。在本实施例中,当所述线路参数是所述移动终端当前所处的位置时,所述根据所述线路参数确定所述移动终端的VPN线路包括:在预设的地理围栏信息表中查找所述移动终端当前所处的位置,判断所述地理围栏信息表中是否包括所述移动终端当前所处的位置,若包括,获取所述位置对应的VPN编码,从而确定所述移动终端的VPN线路。所述VPN编码用于标识所述VPN线路,每一VPN线路对应一VPN编码。其中,所述地理围栏信息表是预先建立的,可以存储在上述EMM服务器10中,所述地理围栏信息表中包括多个不同的地理区域,以及该多个不同地理区域分别对应的VPN线路。该多个不同的地理区域是根据当前的VPN线路切换所涉及到的具体应用场景来确定的,比如,某专科医生分别 受聘于A、B、C三个医院,该医生工作时需要分别访问这三个医院的内网,在这里,可以基于A、B、C这三个医院所处的地理位置来预先确定所述地理围栏信息表,将A医院划分为区域1,并且对应VPN1,将B医院划分为区域2,并且对应VPN2,将C医院划分为区域3,并且对应VPN3,如果检测到该医生当前所处的位置位于区域2内,则确定所述移动终端的VPN线路为VPN2。The location where the mobile terminal is located may be detected by the mobile terminal by using a positioning module (such as a GPS positioning module) carried by the mobile terminal, and the current location of the mobile terminal is obtained. In this embodiment, when the line parameter is the current location of the mobile terminal, determining the VPN line of the mobile terminal according to the line parameter includes: searching in a preset geofence information table. Determining, by the location of the mobile terminal, whether the location of the mobile terminal is currently included in the geo-fence information table, and if so, acquiring a VPN code corresponding to the location, thereby determining a VPN of the mobile terminal line. The VPN code is used to identify the VPN line, and each VPN line corresponds to a VPN code. The geo-fence information table is pre-established and may be stored in the EMM server 10, where the geo-fence information table includes a plurality of different geographic regions, and VPN lines corresponding to the plurality of different geographic regions. The plurality of different geographical areas are determined according to specific application scenarios involved in the current VPN line switching. For example, a specialist is employed in three hospitals A, B, and C respectively, and the doctor needs to separately access the work. The intranet of the three hospitals, where the geofence information table can be pre-determined based on the geographic location of the three hospitals A, B, and C, and the hospital A is divided into area 1, and corresponding to VPN1, B The hospital is divided into area 2, and corresponding to VPN2, the C hospital is divided into area 3, and corresponding to VPN3, if it is detected that the current location of the doctor is located in area 2, it is determined that the VPN line of the mobile terminal is VPN2.
其中,所述移动终端的系统时间指的是所述移动终端当前的系统时间,其具体为某一时刻。当所述线路参数是所述移动终端的系统时间时,所述根据所述线路参数确定所述移动终端的VPN线路包括:在预设的时间围栏信息表中查找所述移动终端的系统时间,判断所述时间围栏信息表中是否包括所述移动终端的系统时间,若包括,获取所述系统时间对应的VPN编码,从而确定所述移动终端的VPN线路。其中,所述时间围栏信息表是预先建立的,可以存储在上述EMM服务器10中,所述时间围栏信息表中包括多个不同的时间段,以及该多个不同时间段分别对应的VPN线路。比如,该时间围栏信息表具体可以如下述表1所示:The system time of the mobile terminal refers to the current system time of the mobile terminal, which is specifically a certain time. When the line parameter is the system time of the mobile terminal, determining the VPN line of the mobile terminal according to the line parameter comprises: searching for a system time of the mobile terminal in a preset time fence information table, Determining whether the system time of the mobile terminal is included in the time fence information table, and if yes, acquiring a VPN code corresponding to the system time, thereby determining a VPN line of the mobile terminal. The time fence information table is pre-established and may be stored in the EMM server 10, where the time fence information table includes a plurality of different time segments, and the VPN lines corresponding to the plurality of different time segments respectively. For example, the time fence information table can be specifically as shown in Table 1 below:
表1Table 1
时间段period VPN编码VPN coding VPN线路VPN line
周一8:30am-12:00amMonday 8:30am-12:00am VPN-AVPN-A A医院对应的VPN线路A hospital's corresponding VPN line
周一2:00pm-5:30pmMonday 2:00pm-5:30pm VPN-BVPN-B B医院对应的VPN线路VPN line corresponding to hospital B
周三2:00pm-5:30pmWednesday 2:00pm-5:30pm VPN-AVPN-A A医院对应的VPN线路A hospital's corresponding VPN line
周五8:30am-5:30pmFriday 8:30am-5:30pm VPN-CVPN-C C医院对应的VPN线路C hospital corresponding VPN line
若所述移动终端当前的系统时间为“周一3:00pm”,则确定所述移动终端的VPN线路为B医院对应的VPN线路。上述时间围栏信息表中,不同时间段所确定的VPN编码可以根据用户的历史时间连接VPN编码的习惯来确定,也可以通过其他方式来确定。此外,该时间围栏信息表可以动态更新,可以在上述EMM服务器中为每一移动终端用户分配管理一时间围栏信息表,根据移动终端连接VPN线路时的时间动态更新该时间围栏信息表。If the current system time of the mobile terminal is “Monday 3:00 pm”, it is determined that the VPN line of the mobile terminal is a VPN line corresponding to the B hospital. In the time fence information table, the VPN code determined in different time periods may be determined according to the user's historical time to connect to the VPN coding habit, or may be determined by other means. In addition, the time fence information table may be dynamically updated, and each mobile terminal user may be allocated a management time fence information table in the EMM server, and the time fence information table is dynamically updated according to the time when the mobile terminal connects to the VPN line.
其中,所述移动终端的NFC打卡信息包括所述移动终端进行NFC打卡时的时间,以及所述移动终端进行NFC打卡时的地理位置。所述移动终端包含NFC打卡功能,在其进行NFC打卡时,所述移动终端自动获取其当前的系统时间和所述移动终端当前的地理位置。在本实施例中,根据线路参数确定所述移动终 端的VPN线路,即根据所述移动终端进行NFC打卡时的系统时间或者其当前的地理位置确定其VPN线路;或者,根据所述移动终端进行NFC打卡时的系统时间和其当前的地理位置确定其VPN线路。其中,根据所述移动终端进行NFC打卡时的系统时间或者其当前的地理位置确定其VPN线路具体可以参考上述实施例部分。根据所述移动终端进行NFC打卡时的系统时间和其当前的地理位置确定其VPN线路,即同时考虑时间和地理位置两个限定因素,只有在这两个限定因素均满足预设的时间和预设的地理位置时,才会选择该预设的时间和预设的地理位置对应的VPN线路。在本实施例中,同时通过时间和地理位置两个限定因素来确定VPN线路,使得所确定的VPN线路更能满足用户的实际需求,所确定的VPN线路的准确性更高。The NFC punching information of the mobile terminal includes a time when the mobile terminal performs NFC punching, and a geographic location when the mobile terminal performs NFC punching. The mobile terminal includes an NFC punching function, and when it performs NFC punching, the mobile terminal automatically acquires its current system time and the current geographic location of the mobile terminal. In this embodiment, the VPN line of the mobile terminal is determined according to the line parameter, that is, the VPN line is determined according to the system time when the mobile terminal performs NFC punching or its current geographic location; or, according to the mobile terminal The system time and its current geographic location when the NFC is punched determines its VPN line. For the specific determination of the VPN line according to the system time when the mobile terminal performs NFC punching or its current geographical location, reference may be made to the foregoing embodiment. Determining the VPN line according to the system time when the mobile terminal performs NFC punching and its current geographic location, that is, considering both the time and the geographical location, only the two limiting factors satisfy the preset time and pre-determination. When the geographical location is set, the preset time and the VPN line corresponding to the preset geographical location are selected. In this embodiment, the VPN line is determined by two limiting factors, time and geographical location, so that the determined VPN line can better meet the actual needs of the user, and the determined VPN line has higher accuracy.
需要说明的是,除了上述所列举的线路参数之外,所述线路参数还可以包括其他参数,比如,所述线路参数还可以是所述移动终端接入网络的网关设备的MAC地址,不同的MAC地址对应唯一一条VPN线路。It should be noted that, in addition to the line parameters listed above, the line parameter may further include other parameters. For example, the line parameter may also be a MAC address of a gateway device of the mobile terminal accessing the network, different. The MAC address corresponds to a unique VPN line.
上述过程是根据一个线路参数来确定所述移动终端的VPN线路,当所述移动终端同时获取到的线路参数包括至少两项时,所述根据所述线路参数确定所述移动终端的VPN线路包括:根据所述至少两项线路参数对应的优先级,获取优先级最高的线路参数;根据所述优先级最高的线路参数确定所述移动终端的VPN线路。The foregoing process is to determine a VPN line of the mobile terminal according to a line parameter. When the line parameter acquired by the mobile terminal includes at least two items, the determining, according to the line parameter, the VPN line of the mobile terminal includes: Obtaining, according to the priority corresponding to the at least two line parameters, obtaining a line parameter with the highest priority; determining a VPN line of the mobile terminal according to the line parameter with the highest priority.
例如,当前获取到的移动终端的线路参数包括:所述移动终端所连接的WIFI名称、所述移动终端当前所处的位置以及所述移动终端当前的系统时间,并且这三项线路参数对应的优先级从高到低分别是所述移动终端当前所处的位置、所述移动终端所连接的WIFI名称、所述移动终端当前的系统时间,那么,此时根据移动终端当前所处的位置来确定所述移动终端的VPN线路。For example, the currently obtained line parameters of the mobile terminal include: a WIFI name to which the mobile terminal is connected, a current location of the mobile terminal, and a current system time of the mobile terminal, and the three line parameters correspond to The priority from high to low is the current location of the mobile terminal, the WIFI name to which the mobile terminal is connected, and the current system time of the mobile terminal. Then, according to the current location of the mobile terminal, Determining the VPN line of the mobile terminal.
其中,可以基于大数据对上述线路参数的优先级进行动态更新。比如,某医生每天上午10点均在A医院办公,并且连接A医院对应的VPN线路,此时位置优先级最高。但是从某天起,该医生开始每天上午10点,在A医院连接B医院的VPN线路,随着次数的累积,当次数到达阈值后,时间的优先级高于位置的优先级,此时,更新所述线路参数对应的优先级。The priority of the above line parameters may be dynamically updated based on big data. For example, a doctor works at A hospital every day at 10 am and connects to the VPN line corresponding to hospital A. At this time, the position priority is the highest. But from a certain day, the doctor started to connect to the VPN line of Hospital B at A hospital every day at 10:00 am. With the accumulation of the number of times, when the number of times reaches the threshold, the priority of time is higher than the priority of the position. Update the priority corresponding to the line parameter.
上述过程在同时获取到的线路参数包括多项时,根据线路参数对应的优先级从多项线路参数中确定一项线路参数,然后根据该确定的线路参数确定所述 移动终端的VPN线路。需要说明的是,除了该实施方式,还可以通过其他方式确定所述移动终端的VPN线路。比如,基于预设的算法和当前的多项线路参数直接确定所述移动终端的VPN线路。In the above process, when the acquired line parameters include multiple items, a line parameter is determined from the plurality of line parameters according to the priority corresponding to the line parameter, and then the VPN line of the mobile terminal is determined according to the determined line parameter. It should be noted that, besides this embodiment, the VPN line of the mobile terminal may be determined by other means. For example, the VPN line of the mobile terminal is directly determined based on a preset algorithm and a current multiple line parameter.
本申请实施例提供了一种VPN线路切换方法,该方法通过获取移动终端的线路参数,然后根据所述线路参数确定该移动终端的VPN线路,从而控制该移动终端连接所确定的VPN线路。该实施方式能够使移动终端根据其线路参数自动连接、切换VPN线路,而不需要用户手动选择VPN,给用户连接VPN的操作带来了方便,提升了用户体验。The embodiment of the present application provides a method for switching a VPN line, which determines a VPN line of the mobile terminal according to the line parameter of the mobile terminal, and then controls the VPN line determined by the mobile terminal to connect. This embodiment enables the mobile terminal to automatically connect and switch the VPN line according to its line parameters, without requiring the user to manually select a VPN, which brings convenience for the user to connect to the VPN and improves the user experience.
请参阅图3,图3是本申请另一实施例提供的一种VPN线路切换方法的流程示意图,该方法包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart of a VPN line switching method according to another embodiment of the present disclosure, where the method includes:
步骤201、在检测到用户账号登录所述移动终端后,控制所述用户账号连接默认的VPN线路;Step 201: After detecting that the user account logs in to the mobile terminal, control the user account to connect to a default VPN line.
步骤202、获取所述移动终端的线路参数;Step 202: Obtain a line parameter of the mobile terminal.
步骤203、根据所述线路参数确定所述移动终端的VPN线路;Step 203: Determine, according to the line parameter, a VPN line of the mobile terminal.
步骤204、判断所述默认的VPN线路与所述确定的VPN线路是否相同;Step 204: Determine whether the default VPN line is the same as the determined VPN line.
步骤205、若不相同,则控制所述移动终端切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。Step 205: If not, control the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line. .
在本实施例中,涉及到VPN切换的用户可以在上述EMM服务器10中进行注册,注册的用户账号可以通过上述EMM终端20(也即所述移动终端)登录所述EMM服务器10。上述可以是移动终端自身检测所述用户账号是否登录,也可以是移动终端从EMM服务器10获取用户账号登录的相关信息。在所述用户账号登录移动终端后,控制所述用户账号连接默认的VPN线路,所述默认的VPN线路是EMM服务器10根据预设的VPN配置策略向所述移动终端下发的VPN线路,比如,所述默认的VPN线路为:所述用户账号最近一次连接的VPN线路,或者所述用户账号预设时间内连接频率最高的VPN线路,或者所述用户账号预设时间内连接时间最长的VPN线路,等。在本实施例中,用户开始连接VPN时也不需要用户手动选择,结合用户历史连接VPN线路的习惯,自动的为用户分配VPN线路,简化了用户连接VPN的操作,为用户操作带来了方便。In this embodiment, the user involved in the VPN handover may register in the EMM server 10, and the registered user account may log in to the EMM server 10 through the EMM terminal 20 (that is, the mobile terminal). The above may be that the mobile terminal itself detects whether the user account is logged in, or the mobile terminal obtains related information of the user account login from the EMM server 10. After the user account is logged in to the mobile terminal, the user account is controlled to connect to the default VPN line, and the default VPN line is a VPN line sent by the EMM server 10 to the mobile terminal according to a preset VPN configuration policy, for example, The default VPN line is: the VPN line that the user account is connected last time, or the VPN line with the highest connection frequency in the preset time of the user account, or the longest connection time in the preset time of the user account. VPN lines, etc. In this embodiment, when the user starts to connect to the VPN, the user does not need to manually select, and the user's history is used to connect the VPN line, and the VPN line is automatically allocated to the user, which simplifies the operation of connecting the VPN to the user, and brings convenience to the user operation. .
所述移动终端连接上默认的VPN线路后,可以周期性的获取所述移动终端的线路参数,并且根据获取到的线路参数确定所述移动终端的VPN线路,该过程具体可以参考上述实施例的叙述,在此不再赘述。After the mobile terminal is connected to the default VPN line, the line parameters of the mobile terminal may be obtained periodically, and the VPN line of the mobile terminal may be determined according to the obtained line parameter, and the process may refer to the foregoing embodiment. The narrative will not be repeated here.
本实施例在切换VPN线路之前,先将所述默认连接的VPN线路与所述确定的VPN线路进行比较,在二者不同时,才进行VPN线路的切换,否则,依然连接默认的VPN线路。由此,避免了所切换的VPN线路重复。In this embodiment, before switching the VPN line, the default connected VPN line is compared with the determined VPN line, and when the two are different, the VPN line is switched. Otherwise, the default VPN line is still connected. Thereby, the repeated VPN line duplication is avoided.
需要说明的是,上述实施例中控制VPN线路切换的过程主要有所述移动终端执行,在其他一些实施例中,也可以由上述EMM服务器10来控制VPN线路的切换,比如,在根据所述线路参数确定所述移动终端的VPN线路后,将确定的所述VPN线路发送至EMM服务器10,EMM服务器10控制所述用户账号切换至所述确定的VPN线路。It should be noted that, in the foregoing embodiment, the process of controlling the VPN line switching is mainly performed by the mobile terminal. In other embodiments, the switching of the VPN line may also be controlled by the EMM server 10, for example, according to the foregoing. After the line parameter determines the VPN line of the mobile terminal, the determined VPN line is sent to the EMM server 10, and the EMM server 10 controls the user account to switch to the determined VPN line.
本申请实施例提供了一种VPN线路切换方法,该方法通过检测登录的用户账号,从而为该用户账号自动分配默认的VPN线路,移动终端连接该默认的VPN线路,进一步地,还可以根据移动终端的线路参数确定移动终端能够切换的VPN线路,从而实现VPN线路的切换。该实施例实现了两种自动连接VPN线路的方式,并且均不需要用户手动操作,此外,该实施方式能够根据用户账号和具体的应用场景自动连接对应的VPN线路,保证了所连接的VPN线路的可靠性。The embodiment of the present application provides a VPN line switching method, which automatically allocates a default VPN line for the user account by detecting the logged user account, and the mobile terminal connects to the default VPN line, and further, according to the mobile The line parameters of the terminal determine the VPN line that the mobile terminal can switch, thereby implementing the switching of the VPN line. This embodiment implements two ways of automatically connecting the VPN line, and does not require manual operation by the user. In addition, the embodiment can automatically connect the corresponding VPN line according to the user account and the specific application scenario, thereby ensuring the connected VPN line. Reliability.
请参阅图4,图4是本申请实施例提供的一种VPN线路切换装置的结构示意图,如图4所示,该装置40包括:获取模块41、确定模块42以及切换模块43。Referring to FIG. 4, FIG. 4 is a schematic structural diagram of a VPN line switching apparatus according to an embodiment of the present disclosure. As shown in FIG. 4, the apparatus 40 includes an obtaining module 41, a determining module 42, and a switching module 43.
其中,获取模块41,用于获取所述移动终端的线路参数;确定模块42,用于根据所述线路参数确定所述移动终端的VPN线路;切换模块43,用于控制所述移动终端切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。The obtaining module 41 is configured to acquire a line parameter of the mobile terminal, and the determining module 42 is configured to determine a VPN line of the mobile terminal according to the line parameter, and the switching module 43 is configured to control the mobile terminal to switch to The determined VPN line, wherein the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
其中,所述获取模块41具体用于获取以下至少任意一项:所述移动终端所连接的WIFI名称;所述移动终端所处的位置;所述移动终端的系统时间;以及所述移动终端的NFC打卡信息。The acquiring module 41 is specifically configured to acquire at least one of the following: a name of the WIFI to which the mobile terminal is connected; a location where the mobile terminal is located; a system time of the mobile terminal; and a location of the mobile terminal NFC punch card information.
在其他一些实施例中,同样请参阅图4,当获取到的所述线路参数包括至少 两项时,所述确定模块42包括:获取单元421和确定单元422。所述获取单元421,用于根据所述至少两项线路参数对应的优先级,获取优先级最高的线路参数。所述确定单元422,用于根据所述优先级最高的线路参数确定所述移动终端的VPN线路。In other embodiments, referring also to FIG. 4, when the acquired line parameters include at least two items, the determining module 42 includes: an obtaining unit 421 and a determining unit 422. The obtaining unit 421 is configured to obtain a line parameter with the highest priority according to the priority corresponding to the at least two line parameters. The determining unit 422 is configured to determine a VPN line of the mobile terminal according to the line parameter with the highest priority.
在其他一些实施例中,同样请参阅图4,在所述获取所述移动终端的线路参数之前,所述装置40还包括控制模块44,所述控制模块44用于在检测到用户账号登录所述移动终端后,控制所述用户账号连接默认的VPN线路。在所述根据所述线路参数确定所述移动终端的VPN线路之后,所述装置40还包括判断模块45,所述判断模块45用于判断所述默认的VPN线路与所述确定的VPN线路是否相同,若不相同,则执行所述切换模块43的相关操作,具体是控制所述移动终端切换至所述确定的VPN线路。In other embodiments, referring to FIG. 4, before the acquiring the line parameter of the mobile terminal, the device 40 further includes a control module 44, where the control module 44 is configured to detect the user account login. After the mobile terminal is described, the user account is controlled to connect to a default VPN line. After determining the VPN line of the mobile terminal according to the line parameter, the device 40 further includes a determining module 45, where the determining module 45 is configured to determine whether the default VPN line and the determined VPN line are If not, the related operations of the switching module 43 are performed, specifically, the mobile terminal is controlled to switch to the determined VPN line.
其中,所述默认的VPN线路为:所述用户账号最近一次连接的VPN线路,或者所述用户账号预设时间内连接频率最高的VPN线路,或者所述用户账号预设时间内连接时间最长的VPN线路,等。The default VPN line is: the VPN line that is connected to the user account last time, or the VPN line with the highest connection frequency in the preset time of the user account, or the connection time of the user account is the longest in the preset time. VPN lines, etc.
值得说明的是,上述装置内的模块、单元之间的信息交互、执行过程等内容,由于与本申请的方法实施例基于同一构思,具体内容可参见本申请方法实施例中的叙述,此处不再赘述。It should be noted that the content of the module, the information exchange between the units, the execution process, and the like are based on the same concept as the method embodiment of the present application. For details, refer to the description in the method embodiment of the present application. No longer.
本申请实施例提供了一种VPN线路切换装置,该装置通过获取移动终端的线路参数,然后根据所述线路参数确定该移动终端的VPN线路,从而控制该移动终端连接所确定的VPN线路。该实施方式能够使移动终端根据其线路参数自动连接、切换VPN线路,而不需要用户手动选择VPN,给用户连接VPN的操作带来了方便,提升了用户体验。The embodiment of the present application provides a VPN line switching device, which determines a VPN line determined by the mobile terminal by acquiring a line parameter of the mobile terminal, and then determining a VPN line of the mobile terminal according to the line parameter. This embodiment enables the mobile terminal to automatically connect and switch the VPN line according to its line parameters, without requiring the user to manually select a VPN, which brings convenience for the user to connect to the VPN and improves the user experience.
请参阅图5,图5是本申请实施例提供的电子设备的硬件结构示意图,该电子设备50能够执行如上所述的VPN线路切换方法。该电子设备50包括:Please refer to FIG. 5. FIG. 5 is a schematic diagram showing the hardware structure of an electronic device according to an embodiment of the present application. The electronic device 50 can perform the VPN line switching method as described above. The electronic device 50 includes:
一个或多个处理器51以及存储器52,图5中以一个处理器51为例。One or more processors 51 and a memory 52 are exemplified by a processor 51 in FIG.
处理器51和存储器52可以通过总线或者其他方式连接,图5中以通过总线连接为例。The processor 51 and the memory 52 can be connected by a bus or other means, as exemplified by a bus connection in FIG.
存储器52作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的VPN线路 切换方法对应的程序指令/模块(例如,附图4所示的模块)。处理器51通过运行存储在存储器52中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例VPN线路切换方法。The memory 52 is a non-volatile computer readable storage medium and can be used for storing a non-volatile software program, a non-volatile computer executable program, and a module, such as a program corresponding to the VPN line switching method in the embodiment of the present application. Instructions/modules (eg, the modules shown in Figure 4). The processor 51 executes various functional applications and data processing of the server by executing non-volatile software programs, instructions, and modules stored in the memory 52, that is, implementing the VPN line switching method of the above method embodiment.
存储器52可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据VPN线路切换装置的使用所创建的数据等。此外,存储器52可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器52可选包括相对于处理器51远程设置的存储器,这些远程存储器可以通过网络连接至VPN线路切换装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 52 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the VPN line switching device, and the like. Moreover, memory 52 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 52 may optionally include memory remotely located relative to processor 51, which may be connected to the VPN line switching device over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
所述一个或者多个模块存储在所述存储器52中,当被所述一个或者多个处理器51执行时,执行上述任意方法实施例中的VPN线路切换方法,例如,执行以上描述的图2中的方法步骤101至步骤103,图3中的方法步骤201至步骤205,实现图4中的模块41-45,单元421-422的功能。The one or more modules are stored in the memory 52, and when executed by the one or more processors 51, perform a VPN line switching method in any of the above method embodiments, for example, performing the above described FIG. The method steps 101 to 103 in the method, the steps 201 to 205 in FIG. 3, implement the functions of the modules 41-45 and the units 421-422 in FIG.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。The above products can perform the methods provided by the embodiments of the present application, and have the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiments of the present application.
本申请实施例的电子设备以多种形式存在,包括但不限于:The electronic device of the embodiment of the present application exists in various forms, including but not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication devices: These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication. Such terminals include: smart phones, multimedia phones, functional phones, and low-end phones.
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices.
(3)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。(3) Server: A device that provides computing services. The server consists of a processor, a hard disk, a memory, a system bus, etc. The server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
(4)其他具有数据交互功能的电子装置。(4) Other electronic devices with data interaction functions.
本申请实施例提供了一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被电子设备执行上述任意方法实施例中的VPN线路切换方法,例如,执行以上描述的图2中的方法步骤101至步骤103,图3中的方法步骤201至步骤205,实现图4中的模块41-45,单元421-422的功能。The embodiment of the present application provides a non-transitory computer readable storage medium storing computer-executable instructions that are executed by an electronic device to perform any of the above method embodiments. In the VPN line switching method, for example, performing the method steps 101 to 103 in FIG. 2 described above, the method steps 201 to 205 in FIG. 3, implementing the modules 41-45 in FIG. 4, the units 421-422 Features.
本申请实施例提供了一种计算机程序产品,包括存储在非易失性计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时时,使所述计算机执行上述任意方法实施例中的VPN线路切换方法,例如,执行以上描述的图2中的方法步骤101至步骤103,图3中的方法步骤201至步骤205,实现图4中的模块41-45,单元421-422的功能。An embodiment of the present application provides a computer program product, including a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer performs the VPN line switching method in any of the foregoing method embodiments, for example, performing the method steps 101 to 103 in FIG. 2 described above, and the method steps 201 to 205 in FIG. 3, implementing the module 41 in FIG. 45. Functions of units 421-422.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
通过以上的实施方式的描述,本领域普通技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a general hardware platform, and of course, by hardware. A person skilled in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本申请的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换; 而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not limited thereto; in the idea of the present application, the technical features in the above embodiments or different embodiments may also be combined. The steps may be carried out in any order, and there are many other variations of the various aspects of the present application as described above, which are not provided in the details for the sake of brevity; although the present application has been described in detail with reference to the foregoing embodiments, It should be understood by those skilled in the art that the technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the embodiments of the present application. The scope of the technical solution.

Claims (13)

  1. 一种VPN线路切换方法,应用于移动终端,其特征在于,所述方法包括:A VPN line switching method is applied to a mobile terminal, where the method includes:
    获取所述移动终端的线路参数;Obtaining line parameters of the mobile terminal;
    根据所述线路参数确定所述移动终端的VPN线路;Determining, according to the line parameter, a VPN line of the mobile terminal;
    控制所述移动终端切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。And controlling the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
  2. 根据权利要求1所述的方法,其特征在于,所述移动终端的线路参数包括以下至少任意一项:The method according to claim 1, wherein the line parameter of the mobile terminal comprises at least one of the following:
    所述移动终端所连接的WIFI名称;The name of the WIFI to which the mobile terminal is connected;
    所述移动终端所处的位置;The location where the mobile terminal is located;
    所述移动终端的系统时间;以及The system time of the mobile terminal;
    所述移动终端的NFC打卡信息。The NFC punching information of the mobile terminal.
  3. 根据权利要求1所述的方法,其特征在于,当获取到的所述线路参数包括至少两项时,所述根据所述线路参数确定所述移动终端的VPN线路包括:The method according to claim 1, wherein when the acquired line parameters include at least two items, the determining, according to the line parameters, the VPN line of the mobile terminal comprises:
    根据所述至少两项线路参数对应的优先级,获取优先级最高的线路参数;Obtaining a line parameter with the highest priority according to a priority corresponding to the at least two line parameters;
    根据所述优先级最高的线路参数确定所述移动终端的VPN线路。Determining a VPN line of the mobile terminal according to the highest priority line parameter.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,A method according to any one of claims 1 to 3, characterized in that
    在所述获取所述移动终端的线路参数之前,所述方法还包括:在检测到用户账号登录所述移动终端后,控制所述用户账号连接默认的VPN线路;Before the obtaining the line parameter of the mobile terminal, the method further includes: after detecting that the user account is logged into the mobile terminal, controlling the user account to connect to a default VPN line;
    在所述根据所述线路参数确定所述移动终端的VPN线路之后,所述方法还包括:判断所述默认的VPN线路与所述确定的VPN线路是否相同,若不相同,则执行所述控制所述移动终端切换至所述确定的VPN线路的步骤。After determining the VPN line of the mobile terminal according to the line parameter, the method further includes: determining whether the default VPN line is the same as the determined VPN line, and if not, performing the control The step of the mobile terminal switching to the determined VPN line.
  5. 根据权利要求4所述的方法,其特征在于,所述默认的VPN线路为:The method of claim 4 wherein said default VPN line is:
    所述用户账号最近一次连接的VPN线路;或者The VPN line to which the user account was last connected; or
    所述用户账号预设时间内连接频率最高的VPN线路;或者The VPN line with the highest connection frequency in the preset time of the user account; or
    所述用户账号预设时间内连接时间最长的VPN线路。The user account has the longest connection time of the VPN line in the preset time.
  6. 一种VPN线路切换装置,应用于移动终端,其特征在于,所述装置包括:A VPN line switching device is applied to a mobile terminal, and the device includes:
    获取模块,用于获取所述移动终端的线路参数;An acquiring module, configured to acquire a line parameter of the mobile terminal;
    确定模块,用于根据所述线路参数确定所述移动终端的VPN线路;a determining module, configured to determine, according to the line parameter, a VPN line of the mobile terminal;
    切换模块,用于控制所述移动终端切换至所述确定的VPN线路,其中,所述VPN线路的数量至少为两条,并且所述线路参数与所述VPN线路具有一一对应关系。And a switching module, configured to control the mobile terminal to switch to the determined VPN line, where the number of the VPN lines is at least two, and the line parameters have a one-to-one correspondence with the VPN line.
  7. 根据权利要求6所述的装置,其特征在于,所述获取模块具体用于获取以下至少任意一项:The device according to claim 6, wherein the obtaining module is specifically configured to obtain at least one of the following:
    所述移动终端所连接的WIFI名称;The name of the WIFI to which the mobile terminal is connected;
    所述移动终端所处的位置;The location where the mobile terminal is located;
    所述移动终端的系统时间;以及The system time of the mobile terminal;
    所述移动终端的NFC打卡信息。The NFC punching information of the mobile terminal.
  8. 根据权利要求6所述的装置,其特征在于,当获取到的所述线路参数包括至少两项时,所述确定模块包括:The apparatus according to claim 6, wherein when the acquired line parameters include at least two items, the determining module comprises:
    获取单元,用于根据所述至少两项线路参数对应的优先级,获取优先级最高的线路参数;An obtaining unit, configured to obtain a line parameter with the highest priority according to a priority corresponding to the at least two line parameters;
    确定单元,用于根据所述优先级最高的线路参数确定所述移动终端的VPN线路。And a determining unit, configured to determine, according to the highest priority line parameter, the VPN line of the mobile terminal.
  9. 根据权利要求6至8任一项所述的装置,其特征在于,在所述获取所述移动终端的线路参数之前,所述装置还包括控制模块,所述控制模块用于在检测到用户账号登录所述移动终端后,控制所述用户账号连接默认的VPN线路;The device according to any one of claims 6 to 8, wherein before the acquiring the line parameter of the mobile terminal, the device further comprises a control module, wherein the control module is configured to detect a user account After logging in to the mobile terminal, controlling the user account to connect to a default VPN line;
    在所述根据所述线路参数确定所述移动终端的VPN线路之后,所述装置还包括判断模块,所述判断模块用于判断所述默认的VPN线路与所述确定的VPN线路是否相同,若不相同,则执行所述控制所述移动终端切换至所述确定的VPN线路的步骤。After determining the VPN line of the mobile terminal according to the line parameter, the device further includes a determining module, where the determining module is configured to determine whether the default VPN line is the same as the determined VPN line, if If not, the step of controlling the mobile terminal to switch to the determined VPN line is performed.
  10. 根据权利要求9所述的装置,其特征在于,所述默认的VPN线路为:The apparatus of claim 9 wherein said default VPN line is:
    所述用户账号最近一次连接的VPN线路;或者The VPN line to which the user account was last connected; or
    所述用户账号预设时间内连接频率最高的VPN线路;或者The VPN line with the highest connection frequency in the preset time of the user account; or
    所述用户账号预设时间内连接时间最长的VPN线路。The user account has the longest connection time of the VPN line in the preset time.
  11. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
    所述存储器存储有可被所述至少一个处理器执行的指令程序,所述指令程序被所述至少一个处理器执行,以使所述至少一个处理器执行权利要求1至5任一项所述的方法。The memory stores an instruction program executable by the at least one processor, the instruction program being executed by the at least one processor to cause the at least one processor to perform the method of any one of claims 1 to 5. Methods.
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包括:非易失性计算机可读存储介质,以及内嵌于所述非易失性计算机可读存储介质的计算机程序指令,所述计算机程序指令包括用以使处理器执行权利要求1至5任一项所述的方法的指令。A computer program product, comprising: a non-transitory computer readable storage medium, and computer program instructions embedded in the non-transitory computer readable storage medium, the computer The program instructions include instructions for causing a processor to perform the method of any of claims 1 to 5.
  13. 一种非易失性计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行权力要求1至5任一项所述的方法。A non-transitory computer readable storage medium, characterized in that the computer readable storage medium stores computer executable instructions for causing a computer to perform any of claims 1 to 5 The method described.
PCT/CN2018/085081 2018-04-28 2018-04-28 Vpn line handover method, apparatus and electronic device WO2019205133A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/085081 WO2019205133A1 (en) 2018-04-28 2018-04-28 Vpn line handover method, apparatus and electronic device
CN201880001462.1A CN109076005B (en) 2018-04-28 2018-04-28 VPN line switching method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/085081 WO2019205133A1 (en) 2018-04-28 2018-04-28 Vpn line handover method, apparatus and electronic device

Publications (1)

Publication Number Publication Date
WO2019205133A1 true WO2019205133A1 (en) 2019-10-31

Family

ID=64789283

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/085081 WO2019205133A1 (en) 2018-04-28 2018-04-28 Vpn line handover method, apparatus and electronic device

Country Status (2)

Country Link
CN (1) CN109076005B (en)
WO (1) WO2019205133A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336794B (en) * 2019-06-10 2022-08-30 平安科技(深圳)有限公司 Intranet access method, system and related device
CN110213769B (en) * 2019-06-10 2022-11-25 平安科技(深圳)有限公司 Intranet access method and related device
CN110324826B (en) * 2019-06-10 2022-08-16 平安科技(深圳)有限公司 Intranet access method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150282058A1 (en) * 2012-10-12 2015-10-01 Nokia Solutions And Networks Oy Method and Apparatus for Access Network Selection
CN106559304A (en) * 2016-11-15 2017-04-05 乐视控股(北京)有限公司 A kind of connection configuration method and device of VPN
CN107181624A (en) * 2017-06-30 2017-09-19 联想(北京)有限公司 A kind of method for connecting network, electronic equipment and computer-readable storage medium
CN107517492A (en) * 2016-06-17 2017-12-26 中兴通讯股份有限公司 A kind of mobile terminal and its method for network insertion

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255920A (en) * 2011-08-24 2011-11-23 杭州华三通信技术有限公司 Method and device for sending VPN (Virtual Private Network) configuration information
CN106789530B (en) * 2016-12-16 2019-07-16 Oppo广东移动通信有限公司 A kind of method for connecting network, device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150282058A1 (en) * 2012-10-12 2015-10-01 Nokia Solutions And Networks Oy Method and Apparatus for Access Network Selection
CN107517492A (en) * 2016-06-17 2017-12-26 中兴通讯股份有限公司 A kind of mobile terminal and its method for network insertion
CN106559304A (en) * 2016-11-15 2017-04-05 乐视控股(北京)有限公司 A kind of connection configuration method and device of VPN
CN107181624A (en) * 2017-06-30 2017-09-19 联想(北京)有限公司 A kind of method for connecting network, electronic equipment and computer-readable storage medium

Also Published As

Publication number Publication date
CN109076005B (en) 2021-02-09
CN109076005A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
US9820153B2 (en) Centralized access point provisioning system and methods of operation thereof
US9942839B2 (en) Reducing wireless reconnection time of a computing device
US20220368642A1 (en) Data traffic management method and apparatus
EP2901739B1 (en) Mixed off-site / on-site prediction computation for reducing wireless reconnection time of a computing device
US10609118B2 (en) Adaptive communication control device
WO2019205133A1 (en) Vpn line handover method, apparatus and electronic device
EP3113419B1 (en) Network accessing method and router
US10664933B2 (en) Automated patron identification and communication management
US10963321B2 (en) Discovery and chaining of virtual functions
WO2017165897A1 (en) Automated patron identification and communication management
CN110808857A (en) Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
US10694555B2 (en) Wireless mesh network formation
US10719858B2 (en) Proximity-based patron relationship management
WO2015184094A1 (en) Data uniqueness control and information storage
US20160197785A1 (en) Virtual controller group management system
US11005875B2 (en) Systems and methods related to configurations for mobile communication device security
US11947638B2 (en) Methods and apparatus for automatic permission assignment
US20170118333A1 (en) Intelligent subscriber profile control and management
US20200053630A1 (en) Application access based on network
US20180115460A1 (en) Automatic provisioning of a network access point
US11695625B2 (en) Location-based dynamic grouping of IoT devices
US10498885B2 (en) Systems and methods for use in providing location services
CN116846746A (en) Host name modification method, modification device and electronic equipment
US9880891B2 (en) Assignment and failover of resources
WO2016090997A1 (en) Method, device, and system for managing terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18916693

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.03.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18916693

Country of ref document: EP

Kind code of ref document: A1