CN108243471B - Network environment switching method and device - Google Patents

Network environment switching method and device Download PDF

Info

Publication number
CN108243471B
CN108243471B CN201611223921.XA CN201611223921A CN108243471B CN 108243471 B CN108243471 B CN 108243471B CN 201611223921 A CN201611223921 A CN 201611223921A CN 108243471 B CN108243471 B CN 108243471B
Authority
CN
China
Prior art keywords
target application
wireless network
operator
application program
mobile terminal
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201611223921.XA
Other languages
Chinese (zh)
Other versions
CN108243471A (en
Inventor
孙楠
侯婉瑾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201611223921.XA priority Critical patent/CN108243471B/en
Publication of CN108243471A publication Critical patent/CN108243471A/en
Application granted granted Critical
Publication of CN108243471B publication Critical patent/CN108243471B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/16Performing reselection for specific purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service

Abstract

The embodiment of the invention provides a network environment switching method and a device, when a target application program on mobile terminal equipment is operated, the target application program determines an operator of a mobile communication network where the mobile terminal equipment is located; the target application program monitors whether a wireless network provided by the operator exists in real time; when the wireless network provided by the operator exists, the target application program connects the mobile terminal equipment to the wireless network through a preset operator interface program so as to realize network environment switching from a mobile communication network to the wireless network; therefore, when the target application program is operated on the mobile terminal device, the flow charge is not generated through the mobile communication network any more, the user experience is improved, the stickiness of the target application program to the user is increased, meanwhile, the wireless network provided by an operator is fully utilized, the resource waste is avoided, and the resource utilization rate is improved.

Description

Network environment switching method and device
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to a method and an apparatus for switching network environments.
Background
In recent years, mobile communication networks have been developed rapidly, from the first 2G to the 3G, and from the 3G to the 4G, the data transmission speed of the networks is faster and faster, and the data transmission quality is higher and higher. Wireless network technology is also greatly developed while mobile communication networks are rapidly developed by major mainstream operators, some operators have already realized coverage of public wireless networks covering a large range in many places through communication base stations, and in some countries, even the coverage of wireless networks in the whole city is realized, and the wireless networks are also covered on vehicles such as subways and buses.
Meanwhile, various mobile terminal devices are continuously emerging, such as mobile phones, tablet computers, google glasses, and the like. These mobile terminal devices are increasingly powerful, and many devices can support both wireless networks and mobile data networks. People's daily life is becoming more and more constant without various mobile terminal devices, and applications with various functions are being developed every day, through which people connect to the mobile internet for entertainment, work, and learning.
In the prior art, applications on various mobile terminal devices can be connected to the mobile internet only through traffic of a mobile communication network or a wireless network generated by a common broadband or an optical fiber through a wireless route. Most of the time, the mobile terminal device is not fixed in the use place, so that the mobile terminal device can be connected to the mobile internet only through the traffic of the mobile communication network. The method and the device have the advantages that a user generates a large flow charge when using the application program, and the user experience of the user in entertainment, work and study using the application program is lowered. Meanwhile, the wireless network of the operator with the wide coverage provided by the communication base station is not fully utilized, which causes resource waste.
Disclosure of Invention
The embodiment of the invention aims to provide a network environment switching method and a network environment switching device, so that a user can be connected to a wireless network provided by an operator when using a target application program on a mobile terminal, thereby avoiding generating higher flow charge, improving user experience, fully utilizing the wireless network provided by the operator and reducing resource waste. The specific technical scheme is as follows:
the embodiment of the invention discloses a network environment switching method, which comprises the following steps:
when a target application program on mobile terminal equipment is operated, the target application program determines an operator of a mobile communication network where the mobile terminal equipment is located, and the target application program provides a flow-free service application program for the operator;
the target application program monitors whether a wireless network provided by the operator exists in real time;
when the wireless network provided by the operator exists, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program so as to realize network environment switching from a mobile communication network to the wireless network, wherein the operator interface program is used for enabling the mobile terminal device to establish connection with the wireless network.
Optionally, the determining, by the target application, an operator of a mobile communication network where the mobile terminal device is located includes:
when the mobile terminal equipment is in a plurality of mobile communication networks, the target application program determines a plurality of operators of the plurality of mobile communication networks in which the mobile terminal equipment is located;
correspondingly, the target application program monitors whether the wireless network provided by the operator exists in real time, and the monitoring comprises the following steps:
the target application program monitors whether wireless networks provided by the multiple operators exist in real time;
correspondingly, when the wireless network provided by the operator exists, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program to realize the network environment switching from the mobile communication network to the wireless network, and the method comprises the following steps:
when the wireless network provided by any one operator of the multiple operators exists, the target application program connects the mobile terminal device to the wireless network provided by any one operator through a preset operator interface program aiming at any one operator so as to realize the network environment switching from the mobile communication network to the wireless network.
Optionally, after the target application program determines an operator of a mobile communication network where the mobile terminal device is located, the method further includes:
and the target application program initializes an operator interface program aiming at the operator in the target application program according to the operator.
Optionally, the determining, by the target application, an operator of a mobile communication network where the mobile terminal device is located includes:
the target application program monitors the communication frequency of a mobile communication network where the mobile terminal device is located;
the target application program determines an operator of the mobile communication network through the communication frequency.
Optionally, before the target application monitors whether the wireless network provided by the operator exists in real time, the method further includes:
the target application program monitors the data transmission speed or the communication frequency of a mobile communication network where the mobile terminal device is located;
the target application program determines the type of the mobile communication network where the mobile terminal device is located according to the data transmission speed or the communication frequency, wherein the type of the mobile communication network comprises: 5G, 4G, 3G, 2G, and E nets;
and the target application program displays prompt information to a user using the mobile terminal equipment according to the type of the mobile communication network in which the mobile terminal equipment is positioned, wherein the prompt information is used for informing the user of the type of the mobile communication network in which the mobile terminal is positioned currently.
Optionally, the monitoring, by the target application program, whether there is a wireless network provided by the operator in real time includes:
the target application program detecting whether the mobile terminal device has connected to an existing wireless network, the existing wireless network being any wireless network including the operator provided wireless network;
and when the mobile terminal equipment is not connected to the existing wireless network, monitoring whether the wireless network provided by the operator exists in real time.
Optionally, the monitoring, by the target application program, whether there is a wireless network provided by the operator in real time includes:
the target application program acquires preset configuration, wherein the preset configuration comprises the real-time monitoring on or off of a wireless network provided by the operator;
and when the preset configuration is started for real-time monitoring of the wireless network provided by the operator, the target application program monitors whether the wireless network provided by the operator exists in real time.
Optionally, the preset operator interface program includes an application programming interface or a software development kit;
correspondingly, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program to realize network environment switching from a mobile communication network to the wireless network, and the method comprises the following steps:
and the target application program connects the mobile terminal equipment to the wireless network through the application programming interface or the software development kit so as to realize the network environment switching from the mobile communication network to the wireless network.
Optionally, when there exists a wireless network provided by the operator, the target application connects the mobile terminal device to the wireless network through a preset operator interface program to implement a network environment handover from a mobile communication network to the wireless network, including:
when a wireless network provided by the operator exists, the target application program sends a login request to a base station providing the wireless network, wherein the login request contains identification information of the target application program, so that the base station sends login information to the target application program according to the identification information of the target application program;
and the target application program connects the mobile terminal equipment to the wireless network through the preset operator interface program according to the login information so as to realize the switching of the network environment.
Optionally, after the target application connects the mobile terminal device to the wireless network through a preset operator interface program to implement a network environment handover from a mobile communication network to the wireless network when the wireless network provided by the operator exists, the method further includes:
and when the target application program stops running or is transferred to the background running on the mobile terminal equipment, disconnecting the target application program from the wireless network.
The embodiment of the invention discloses a network environment switching device, which comprises:
the mobile terminal equipment comprises an identification module, a flow-free service module and a flow-free service module, wherein the identification module is used for determining an operator of a mobile communication network where the mobile terminal equipment is located by a target application program when the target application program on the mobile terminal equipment is operated, and the target application program provides the flow-free service application program for the operator;
the monitoring module is used for monitoring whether a wireless network provided by the operator exists in real time by the target application program;
a switching module, configured to, when there is a wireless network provided by the operator, connect the mobile terminal device to the wireless network through a preset operator interface program by the target application program, so as to implement network environment switching from a mobile communication network to the wireless network, where the operator interface program is used to establish a connection between the mobile terminal device and the wireless network.
Optionally, the identification module is specifically configured to:
when the mobile terminal equipment is in a plurality of mobile communication networks, the target application program determines a plurality of operators of the plurality of mobile communication networks in which the mobile terminal equipment is located;
correspondingly, the monitoring module is specifically configured to:
monitoring whether wireless networks provided by the plurality of operators exist in real time;
correspondingly, the switching module is specifically configured to:
when the wireless network provided by any one operator of the multiple operators exists, the target application program connects the mobile terminal device to the wireless network provided by any one operator through a preset operator interface program aiming at any one operator so as to realize the network environment switching from the mobile communication network to the wireless network.
Optionally, the apparatus further comprises:
and the calling module is used for initializing an operator interface program aiming at the operator in the target application program according to the operator.
Optionally, the monitoring module is specifically configured to:
monitoring the communication frequency of a mobile communication network where the mobile terminal equipment is located;
determining an operator of the mobile communication network through the communication frequency.
Optionally, the apparatus further comprises:
the network type identification module is used for monitoring the data transmission speed or the communication frequency of a mobile communication network where the mobile terminal equipment is located;
the network type identification module is further configured to determine a type of a mobile communication network where the mobile terminal device is located according to the data transmission speed or the communication frequency, where the type of the mobile communication network includes: 5G, 4G, 3G, 2G, and E nets;
the network type identification module is further configured to display a prompt message to a user using the mobile terminal device according to the type of the mobile communication network in which the mobile terminal device is located, where the prompt message is used to inform the user of the type of the mobile communication network in which the mobile terminal is currently located.
Optionally, the monitoring module is specifically configured to:
detecting whether the mobile terminal device has connected to an existing wireless network, the existing wireless network being any wireless network including a wireless network provided by the operator;
and when the mobile terminal equipment is not connected to the existing wireless network, monitoring whether the wireless network provided by the operator exists in real time.
Optionally, the monitoring module includes:
a configuration unit, configured to obtain a preset configuration by the target application program, where the preset configuration includes real-time monitoring on or off of a wireless network provided by the operator;
the configuration unit is further configured to monitor whether the wireless network provided by the operator exists in real time by the target application program when the preset configuration is started for real-time monitoring of the wireless network provided by the operator.
Optionally, the operator interface program preset in the switching module includes an application programming interface or a software development kit;
correspondingly, the switching module is specifically configured to connect the mobile terminal device to the wireless network through the application programming interface or the software development kit, so as to implement network environment switching from a mobile communication network to a wireless network.
Optionally, the switching module includes:
a sending unit, configured to, when a wireless network provided by the operator exists, send, by the target application, a login request to a base station that provides the wireless network, where the login request includes the target application identification information, so that the base station sends login information to the target application according to the target application identification information;
and the switching unit is used for connecting the mobile terminal equipment to the wireless network through the preset operator interface program by the target application program according to the login information so as to realize the switching of the network environment.
Optionally, the apparatus further comprises:
and the interruption module is used for disconnecting the connection with the wireless network when the target application program stops running or shifts to the background running on the mobile terminal equipment.
According to the network environment switching method and device provided by the embodiment of the invention, when the user uses the target application program on the mobile terminal, the operator provides the traffic-free service for the target application program, so that the target application program can be connected to the wireless network provided by the operator, the target application program does not generate traffic charges when in use, the user experience is further improved, and the stickiness of the target application program to the user is increased. Meanwhile, a wireless network provided by an operator is fully utilized, resource waste is avoided, and the resource utilization rate is improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a network environment switching method according to an embodiment of the present invention;
fig. 2 is another flowchart of a network environment switching method according to an embodiment of the present invention;
fig. 3 is a block diagram of a network environment switching apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a network environment switching method according to an embodiment of the present invention, including:
step 101, when the target application program on the mobile terminal device is operated, the target application program determines the operator of the mobile communication network where the mobile terminal device is located, and the target application program provides the operator with the application program of the traffic-free service.
The mobile terminal device may be a variety of mobile terminals, such as a smartphone, a tablet computer, and the like. All mobile devices which can be connected with a mobile communication network and can also be connected with a wireless network can apply the method provided by the embodiment of the invention and belong to the protection scope of the embodiment of the invention.
The application program refers to a program that can run on various mobile terminal devices, such as various clients used for watching videos by mobile phones, mobile game clients, communication social clients, and the like. The application programs are installed on the mobile terminal equipment and connected to the mobile internet through the data traffic of a mobile communication network or a wireless network, so that various information or services are provided for users, and various requirements of the users are met.
An operator of a mobile communication network refers to an operator providing communication data transmission services, such as china mobile, china unicom, and chinese telecommunications. These operators each have a different communication band, providing a network for data transmission for users.
The operators in the mainstream at present can provide not only mobile communication networks, such as 3G communication networks and 4G communication networks, etc. that are currently in existence. It is also possible to provide a public wireless network covering a large area, through which the user can connect the mobile terminal device to the mobile internet, so that when the user uses the mobile terminal device, there is no need to reuse the data traffic in the mobile communication network.
Of course, such public wireless networks covering a wide area require payment by the user before the user can log in. However, since such public wireless networks currently require users to pay and log in actively, and have no large-area coverage and popularization, the utilization rate is not high at present, and resources are wasted.
With the diversification of business cooperation between the operator of the mobile communication network and the development or management organization of the application program, for some target application programs, the operator can sign a traffic-free agreement or other types of traffic-free cooperation modes with the development or management organization of the target application program, so that when the user uses the target application programs, the operator provides traffic-free services for the target application programs. For example, the target application may be a mobile game client or a mobile video viewing client, and when using the target application, the operator may provide traffic-free services to the target application through various technical means. When the target application program is operated on the mobile terminal equipment, the target application program is connected with the public wireless network which is provided by an operator and covers a larger range, the switching of the network environment is realized, and therefore the traffic-free service is provided for the target application program.
In order to achieve the above object, when the target application is run on the mobile terminal device, the target application first needs to determine an operator of a mobile communication network where the mobile terminal device is located, and the mobile communication network where the mobile terminal device is located may have different operators, for example, it may be china mobile, or china unicom, etc.
Generally, a mobile terminal device is in a mobile communication network of a certain operator, and cannot connect to a wireless network provided by another operator. The target application therefore first needs to determine the operator of the mobile communication network in which the mobile terminal device is located, thus laying the foundation for subsequent connections to the wireless network provided by this operator.
Of course, the development or administration entity of the target application program does not necessarily have traffic-free cooperation with all operators, so when the target application program determines that the operator of the mobile communication network where the mobile terminal device is located does not have traffic-free cooperation with the development or administration entity of the target application program, the following steps are not performed.
Specifically, there are various methods for determining the operator of the mobile communication network where the mobile terminal device is located by the target application, for example, determining by the frequency of the different operators, or reading from the network configuration information of the mobile terminal device, or for a mobile terminal device such as a mobile phone that can be inserted with an SIM card, reading the number segment of the SIM card of the mobile terminal device to determine the operator, for example, reading the mobile phone number of the mobile phone to determine the operator.
Step 102, the target application program monitors whether a wireless network provided by an operator exists in real time.
After the operator of the mobile communication network where the mobile terminal device is located is determined, the target application program can monitor the current location of the mobile terminal device in real time, and whether the wireless network provided by the operator is covered exists or not. The real-time monitoring can be realized by a target application program or a mobile terminal device, for example: when the mobile terminal equipment is a mobile phone and a function switch for wireless network connection of the mobile phone is turned on, the mobile phone can automatically search all nearby wireless networks and form a wireless network list with the searched results. The target application program only needs to read the list in real time, and can monitor whether the wireless network provided by the operator exists in real time.
Operator-provided wireless networks refer to public wireless networks covering a wide range, rather than the wireless networks established by ordinary broadband or fiber-optic wireless routes. The wireless network provided by the general operator is established by the communication base station of the operator, and can cover a larger range. For example: the coverage can range from several square kilometers to several tens of square kilometers, and wireless networks can be established in other areas, such as on buses, subways, and high-speed trains, among others.
Since the location of use of the mobile terminal device is not fixed, when the target application is run on the mobile terminal device, the target application monitors in real time to search for a wireless network provided by a connectable operator.
The real-time monitoring can ensure that when the mobile terminal equipment moves from one area to another area, whether a wireless network provided by an operator exists can be timely monitored, and when the wireless network provided by the operator exists, the mobile terminal equipment is timely connected to the wireless network, so that the service quality is improved, and further when a user uses the target application program, the user experience is improved.
And 103, when the wireless network provided by the operator exists, connecting the mobile terminal device to the wireless network by the target application program through a preset operator interface program so as to realize the network environment switching from the mobile communication network to the wireless network.
The network environment in the embodiment of the invention refers to the network environment in which the mobile terminal equipment is located when accessing the mobile internet. Generally, when accessing the mobile internet, the mobile terminal device is in two network environments, one is accessing the mobile internet by using data traffic of a mobile communication network, and the other is accessing the mobile internet through a wireless network.
When detecting that the mobile terminal device is located at a position or is covered with a wireless network provided by an operator, the target application program can be connected to the wireless network, so that the mobile terminal device is switched from the original network environment for accessing the mobile internet by using the data traffic of the mobile communication network to the network environment for accessing the mobile internet by using the wireless network.
Specifically, the target application and the wireless network may establish a connection through an operator interface program preset in the target application.
When a target Application Development or management mechanism and an operator establish a traffic-free service for the target Application, an operator Interface program may be preset in the target Application, where the preset operator Interface program may be an API (Application Programming Interface), or an SDK (Software Development Kit), or may be a target Application Development or management mechanism, or an Interface program developed by the operator, and is used for connecting the target Application to a wireless network provided by the operator.
In the operator interface program, a login account and a login password of the wireless network provided by the operator may be configured. When a wireless network provided by an operator exists, the operator interface program in the target application program can realize interaction with a wireless network base station through the login account and the login password, so that the wireless network provided by the operator is connected. The login account and the login password are preset in an operator interface program for an operator. And the login account and the login password can be saved through an encryption means, so that the login account and the login password are not leaked, and adverse effects are avoided.
The operator interface program can be implemented in various forms by various programming languages according to actual needs, and a specific programming method belongs to the prior art, and persons skilled in the art can program according to actual needs, and details are not described herein.
In the embodiment of the invention, the target application program monitors whether the wireless network provided by the operator exists in real time by identifying the operator, and when the wireless network provided by the operator exists, the wireless network is connected to the wireless network, so that the mobile terminal equipment is switched from the original network environment of accessing the mobile internet by using the data traffic of the mobile communication network to the network environment of accessing the mobile internet by using the wireless network, and thus, the traffic charge is not generated by the mobile communication network when the target application program is operated on the mobile terminal equipment. Meanwhile, a wireless network provided by an operator is fully utilized, resource waste is avoided, and the resource utilization rate is improved.
Optionally, in the network environment switching method provided in the embodiment of the present invention, determining, by the target application, an operator of the mobile communication network where the mobile terminal device is located includes:
when the mobile terminal device is in a plurality of mobile communication networks, the target application program determines a plurality of operators of the plurality of mobile communication networks in which the mobile terminal device is located.
Currently, some mobile terminal devices may be simultaneously located in one or more mobile communication networks, for example: many mobile phones can realize dual-card dual-standby, and when two SIM (Subscriber Identity Module) cards are SIM cards of different operators, the two SIM cards can be located in two mobile communication networks at the same time.
Therefore, when the mobile terminal device is located in a plurality of mobile communication networks, it is necessary to determine a plurality of operators of the plurality of mobile communication networks where the mobile terminal device is located, for example: when the mobile terminal device is a dual-card mobile phone, two operators need to be determined.
Correspondingly, the target application program monitors whether a wireless network provided by an operator exists in real time, and the monitoring comprises the following steps:
the target application monitors in real time whether there are wireless networks provided by multiple operators.
Since the mobile terminal device is simultaneously located in a plurality of mobile communication networks, the mobile terminal device can be connected to a wireless network provided by any one of a plurality of operators, and therefore, it is necessary to simultaneously monitor whether there are wireless networks provided by a plurality of operators.
Correspondingly, when the wireless network provided by the operator exists, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program so as to realize the network environment switching from the mobile communication network to the wireless network, and the method comprises the following steps:
when a wireless network provided by any one of a plurality of operators exists, the target application program connects the mobile terminal device to the wireless network provided by any one operator through a preset operator interface program aiming at the any one operator so as to realize the network environment switching from the mobile communication network to the wireless network.
In the mobile terminal device, a plurality of operator interface programs are preset, and are respectively used for connecting wireless networks provided by different operators. When any one of the wireless networks provided by the operator exists, and the wireless network is free from traffic cooperation with the development or management organization of the target application program, the target application program establishes connection with the wireless network through an operator interface program aiming at the operator so as to realize network environment switching from the mobile communication network to the wireless network.
In the embodiment of the invention, when the mobile terminal equipment is in a plurality of mobile communication networks, a plurality of operators can be determined at the same time, and then in the following steps, whether wireless networks provided by the plurality of operators exist or not can be monitored at the same time and connected, so that the application range of the embodiment of the invention is further expanded, and the user experience of a user when the user uses a target application program is further improved.
Optionally, in the network environment switching method provided in the embodiment of the present invention, after the target application program determines an operator of a mobile communication network where the mobile terminal device is located, the method further includes:
and the target application program initializes an operator interface program aiming at the operator in the target application program according to the operator, wherein the operator interface program is used for connecting the target application program to a wireless network provided by the operator.
When a development or management mechanism of a target application program has traffic-free cooperation with multiple operators, operator interface programs for the multiple operators need to be preset in the target application program, and for different operators, the operator interface programs may be different from each other due to differences in communication frequencies and the like. Therefore, after the operator is determined, an operator interface program for the operator needs to be initialized.
The initialization process corresponds to a process of calling a carrier interface program, that is, selecting a carrier interface program to be used from a plurality of carrier interface programs, and starting to run the carrier interface program.
It is readily understood that when the target application determines that there are multiple operators, multiple operator interface programs are initialized at the same time.
In the embodiment of the invention, when the target application program has a plurality of operator interface programs, the target application program aiming at the operator is initialized according to the operator determined by the target application program. The target application program only runs individual operator interface programs, and does not need to run all operator interface programs, so that system resources such as a memory used for running the target application program are saved, and the running efficiency is improved.
Optionally, in the network environment switching method provided in the embodiment of the present invention, determining, by the target application, an operator of a mobile communication network where the mobile terminal device is located includes:
the target application program monitors the communication frequency of the mobile communication network in which the mobile terminal device is located.
The target application determines the operator of the mobile communication network by the communication frequency.
When the target application program is operated on the mobile terminal equipment, the target application program can monitor the communication frequency of the mobile communication network where the mobile terminal equipment is located in real time. The communication frequency may include an uplink frequency, a downlink frequency, a bandwidth, and the like.
Different operators have different communication frequencies, see table 1, where table 1 is a communication frequency table for each large operator. The respective communication frequencies of the operators currently in the mainstream are recorded in table 1.
The monitored communication frequency can be compared by the target application program through the table 1, so that the operator of the mobile communication network where the mobile terminal device is located is judged.
The method for monitoring the communication frequency of the mobile terminal device by the specific target application program belongs to the prior art, and is not described herein again.
In the embodiment of the invention, the target application program determines the operator of the mobile communication network where the mobile terminal device is located by monitoring the communication frequency of the mobile terminal device. The communication frequency is monitored, and in the prior art, a plurality of methods can be realized, so that the reliability is high, and the identification is accurate. Compared with other methods for determining the operator, other information, such as a mobile phone number or network configuration information of the mobile terminal device, does not need to be acquired from the mobile terminal device. The privacy of the user using the mobile terminal device can be better protected.
TABLE 1
Figure BDA0001193208600000141
Optionally, in the network environment switching method provided in the embodiment of the present invention, before the target application program monitors whether there is a wireless network provided by an operator in real time, the method further includes:
the target application program monitors the data transmission speed or the communication frequency of the mobile communication network in which the mobile terminal device is located.
The target application program can monitor the communication frequency and the data transmission speed of the mobile terminal equipment and obtain the communication frequency and the data transmission speed of the mobile communication network where the mobile terminal equipment is located.
Determining the type of a mobile communication network in which the mobile terminal device is located according to the data transmission speed or the communication frequency, wherein the type of the mobile communication network comprises the following steps: 5G, 4G, 3G, 2G and E nets.
When the type of the mobile communication network is determined by using the communication frequency, the determination may be made based on table 1 described above, but there may be a case where the communication frequencies overlap between the two types of mobile communication networks. Therefore, the determination is also required according to the data transmission speed, so that the type of the mobile communication network where the mobile terminal device is located can be accurately determined.
And the target application program displays prompt information to a user using the mobile terminal equipment according to the type of the mobile communication network in which the mobile terminal equipment is positioned, wherein the prompt information is used for informing the user of the type of the mobile communication network in which the mobile terminal is positioned currently.
After the target application program determines the type of the mobile communication network where the mobile terminal device is located, the target application program sends a prompt message to the user according to the type of the mobile communication network where the mobile terminal device is located at present, where the prompt message may include information of the current network type, for example, to notify the user that the user is currently located in a 3G network.
Meanwhile, various information can be displayed in the prompt message according to the requirement, and operation suggestions can be provided for the user according to different types of mobile communication networks. For example, when the type of the current mobile communication network is 2G, the user may be prompted to: running the target application in a 2G environment is not recommended if it is not possible to connect to the wireless network. Or when the type of the current mobile communication network is 4G, the user may be prompted to: the target application may also be used if it is not capable of connecting to the wireless network, but may incur traffic tariffs, etc.
In the embodiment of the invention, the target application program sends the prompt message to the user according to the type of the mobile communication network in which the mobile terminal device is located, so that the user can perform different operations on the target application program according to different types of the mobile communication networks, and the user experience is improved.
Optionally, in the method for switching a network environment provided in the embodiment of the present invention, the step of monitoring whether a wireless network provided by an operator exists in real time by a target application includes:
the target application detects whether the mobile terminal device has connected to an existing wireless network, which is a wireless network other than the operator provided wireless network.
When the mobile terminal device is not connected to an existing wireless network, the target application program monitors in real time whether a wireless network provided by an operator exists.
In the embodiment of the present invention, the wireless network provided by the operator refers to a public wireless network covering a wide range. In practice, however, there are many other wireless networks in common use, such as a wireless network established by ordinary personal broadband or optical fiber through wireless routing, a free wireless network provided by a college or other place, and so on.
Therefore, when the target application is running on the mobile terminal device, the target application may first detect whether the mobile terminal device has already connected to an existing wireless network. If the mobile terminal device is already connected to a wireless network, no real-time monitoring is required to determine whether a wireless network provided by the operator exists. The destination application does not need to use the data traffic of the mobile communication network at this time, and does not need to connect with the wireless network provided by the operator to switch the network environment.
However, when the mobile terminal device is not connected to the existing wireless network, real-time monitoring is required to determine whether there is an operator-provided wireless network, and when there is an operator-provided wireless network, the mobile terminal device is connected to the operator-provided wireless network to implement switching of network environments.
A linkage mechanism may be established in the target application for no longer monitoring in real time whether there is a wireless network provided by an operator when it is detected that the mobile terminal device has connected to any existing wireless network; when it is detected that the mobile terminal device is not connected to any existing wireless network, real-time monitoring is performed to determine whether there is a wireless network provided by the operator. The interlocking mechanism may be implemented by programming, and those skilled in the art may implement the interlocking mechanism in various ways, which are not described in detail herein.
In the embodiment of the invention, before the target application program monitors whether the wireless network provided by the operator exists in real time, whether the mobile terminal equipment is connected to the wireless network is judged firstly. If the wireless network is connected, real-time monitoring is not needed, and therefore the running cost of the target application program is reduced.
Optionally, in the method for switching a network environment provided in the embodiment of the present invention, the step of monitoring whether a wireless network provided by an operator exists in real time by a target application includes:
the target application program obtains a preset configuration, wherein the preset configuration comprises the real-time monitoring on or off of a wireless network provided by an operator.
The target application may obtain a preset configuration, where the preset configuration may be a configuration of the target application performed by a user, and the preset configuration is used to turn on or off real-time monitoring on a wireless network provided by an operator.
Specifically, the target application can start or stop monitoring the connectable wireless network by setting the authority to the target application.
And when the preset configuration is started for real-time monitoring of the wireless network provided by the operator, the target application program monitors whether the wireless network provided by the operator exists in real time.
Only when the preset configuration of the user allows the target application program to monitor whether the wireless network provided by the operator exists in real time, the target application program can monitor the wireless network provided by the operator in real time.
In the embodiment of the invention, the authority of the target application program is limited through the preset configuration, so that the target application program monitors the wireless network provided by an operator in real time and is controlled by a user, different requirements of different users are met, and the user experience of the user when the user uses the target application program is improved from another aspect.
Optionally, in the network environment switching method provided in the embodiment of the present invention, the preset operator interface program includes an application programming interface or a software development kit.
An API (Application Programming Interface) is a predefined function that is intended to provide applications and developers the ability to access a set of routines based on certain software or hardware, without having to access source code or understand the details of the internal workings. The application programming interface itself is abstract, and it defines only one interface, and does not relate to the concrete operation of the application program in the actual implementation process.
SDK (Software Development Kit) is a collection of Development tools that can be used to create applications for Software packages, Software frameworks, hardware platforms, operating systems, and the like. It may simply provide some files of Application Programming Interfaces (APIs) for a certain programming language, but may also include complex hardware that can communicate with a certain embedded system.
In the target application program, one or more application programming interfaces or software development kits can be set in advance for one or more operators, and the mobile terminal device can be connected to the wireless network provided by the operator by calling the application programming interfaces or the software development kits.
Correspondingly, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program to realize the network environment switching from the mobile communication network to the wireless network, and the method comprises the following steps:
the target application program connects the mobile terminal device to the wireless network through the application programming interface or the software development kit to realize the network environment switching from the mobile communication network to the wireless network.
The application programming interface or the software development kit is a mature and reliable technology, and the application programming interface or the software development kit can realize the connection of the mobile terminal device to the wireless network through the application programming interface or the software development kit without adjusting some characteristics of a target application program. Therefore, the universality of the operator interface program is greatly improved, and the application programming interface or the software development kit can be used as the operator interface program and arranged in the target application program only by carrying out minor adjustment on different target application programs, so that when the target application program is operated, the mobile terminal equipment can be connected to the wireless network through the application programming interface or the software development kit, the network environment switching from the mobile communication network to the wireless network is realized, and the difficulty in the development of the operator interface program is reduced.
Optionally, in the method for switching a network environment provided in the embodiment of the present invention, when there is a wireless network provided by an operator, a target application connects a mobile terminal device to the wireless network through a preset operator interface program, so as to implement network environment switching from a mobile communication network to the wireless network, where the method includes:
first, when a wireless network provided by an operator exists, a target application program sends a login request to a base station providing the wireless network, wherein the login request contains identification information of the target application program, so that the base station sends the login information to the target application program according to the identification information of the target application program.
The operator generally provides a wireless network through a communication base station, which generates a wireless network that can cover a wide range. When the target application program monitors that a wireless network provided by an operator exists, the target application program can interact with a communication base station generating the wireless network, the interaction is mainly used for verifying whether the target application program is qualified or authorized, and the mobile terminal equipment is connected to the wireless network through an operator interface program.
The target application program may send a login request to the communication base station through the operator interface program, where the login request may include identification information of the target application program, and specifically, the identification information of the target application program may include a login account and a login password that are preset in the operator interface program by an operator, and an identification identifier of the target application program itself, where the identification identifier may be a name or a feature value of the target application program.
The communication base station of the carrier may store names or characteristic values of all target applications that have traffic exemption cooperation with the carrier.
After receiving a login request sent by a target application program, a communication base station can firstly verify whether a login account and a login password contained in the login request are correct, and if the login account and the login password are incorrect, the communication base station directly discards the login request or returns information of refusing login to the target application program.
If the login account and the login password are both correct login account and login password, the name or characteristic value of each target application program which has flow-free cooperation with the operator and is stored in the communication base station can be matched with the identification mark of the target application program in the login request, when the matching is successful, the target application program which sends the login request is qualified or authorized, and the mobile terminal device is connected to the wireless network through the operator interface program.
When the communication base station determines that the target application has a qualification or a right, and connects the mobile terminal device to the wireless network through the operator interface program, the communication base station transmits login information to the target application.
And secondly, the target application program connects the mobile terminal equipment to the wireless network through a preset operator interface program according to the login information so as to realize the switching of the network environment.
The login information is an instruction which is sent by the communication base station and allows login, and after the target application program receives the login information, the mobile terminal device can be connected to the wireless network through a preset operator interface program, so that network environment switching from the mobile communication network to the wireless network is realized.
Specifically, the data packet structure and content in the login request and the login information may be implemented by many methods in the prior art according to actual needs after development of the target application program or communication between a management mechanism and an operator, and are not described in detail.
In the embodiment of the invention, when the target application program monitors that the wireless network provided by the operator exists, the target application program interacts with the communication base station generating the wireless network to verify whether the target application program is qualified or authorized, and the mobile terminal equipment is connected to the wireless network through the operator interface program. Therefore, the safety of the wireless network provided by the operator is ensured through multiple verification, and other mobile terminal devices which do not run the target application program are prevented from being connected to the wireless network.
Optionally, in the network environment switching method provided in the embodiment of the present invention, when there is a wireless network provided by an operator, the target application connects the mobile terminal device to the wireless network through a preset operator interface program, so as to implement network environment switching from a mobile communication network to the wireless network, and the method further includes:
and when the target application program stops running or is transferred to the background running on the mobile terminal equipment, disconnecting the wireless network.
Generally, a plurality of applications may exist on a mobile terminal device running a target application. The embodiment of the invention aims at that when a target application program which has flow-free cooperation with an operator runs on a mobile terminal device and the mobile terminal device is in the range of a wireless network provided by the operator, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program, thereby realizing the flow-free service aiming at the target application program.
Therefore, when the target application program stops running on the mobile terminal device, the connection of the mobile terminal device and the wireless network can be immediately cut off.
At present, many mobile terminal devices can support the application to run in the background, that is, the application is in a running state in the mobile terminal device, but is not in an operable state. For example, various APPs running on the mobile phone can be transferred to the mobile phone background and run continuously without the user performing an operation.
Therefore, after the target application program is transferred to the background on the mobile terminal device to run, the mobile terminal device can be connected with the wireless network provided by the operator, so that individual users can use the target application program, and the mobile terminal device can run other application programs without using the mobile terminal device after being connected to the wireless network, thereby damaging the benefits of the operator providing the wireless network.
For the situation, when the target application program is transferred to the background operation on the mobile terminal device, the connection between the mobile terminal device and the wireless network can be cut off.
Specifically, when the target application program stops running or changes to background running on the mobile terminal device, the connection with the wireless network is disconnected, which can be realized through a preset operator interface program.
When the mobile terminal equipment is connected to the wireless network through the operator interface program, the operator interface program can monitor the running of the target application program in real time, and when the operator interface program monitors that the target application program stops running or changes to the background running on the mobile terminal equipment, the connection between the mobile terminal equipment and the wireless network is immediately disconnected.
In the embodiment of the invention, the operation of the target application program can be monitored in real time through the operator interface program, and when the operator interface program monitors that the target application program stops operating or shifts to background operation on the mobile terminal equipment, the connection between the mobile terminal equipment and the wireless network is immediately disconnected. Therefore, the loss of benefits of operators caused by that individual users do not use the target application program after connecting the mobile terminal equipment to the wireless network by using the target application program is avoided, and the traffic-free service can be carried out more smoothly.
Referring to fig. 2, fig. 2 is another flowchart of a network environment switching method according to an embodiment of the present invention, including:
in step 201, when running the target application program on the mobile terminal device, the target application program determines one or more operators of one or more mobile communication networks in which the mobile terminal device is located.
When the mobile terminal device may be simultaneously located in one or more mobile communication networks, the target application needs to determine one or more operators of the one or more mobile communication networks in which the mobile terminal device is located. The operator refers to an operator that has traffic-free cooperation with the target application program.
Specifically, the target application may determine the operator of the mobile communication network by monitoring the communication frequency of the mobile communication network where the mobile terminal device is located.
For example, when the mobile terminal device is a mobile phone and the target application program is a game client on the mobile phone, the game client establishes traffic-free cooperation with both china mobile and chinese communication. When the game client is operated on the mobile phone, the game client monitors the communication frequency of the mobile communication network where the mobile phone is located, and determines that the operator of the mobile communication network where the mobile phone is located is China mobile through the communication frequency.
In step 202, the target application initializes an operator interface program for one or more operators in the target application according to the one or more operators.
The initialization process is equivalent to a process of calling the operator interface program, that is, selecting one or more operator interface programs to be used from the one or more operator interface programs, and starting to run the one or more operator interface programs.
For example, two operator interface programs for two operators of china mobile and china communication are preset in the game client. The game client calls and runs the operator interface program for the China Mobile. The operator interface program is an application programming interface or a software development kit.
Step 203, the target application program determines the type of the mobile communication network where the mobile terminal device is located through the data transmission speed or the communication frequency, and displays prompt information to the user using the mobile terminal device according to the type of the mobile communication network where the mobile terminal device is located.
The target application program can monitor the communication frequency and the data transmission speed of the mobile terminal equipment and obtain the communication frequency and the data transmission speed of the mobile communication network where the mobile terminal equipment is located. The type of the mobile communication network in which the mobile terminal device is located is determined by the data transmission speed or the communication frequency. After the target application program judges the type of the mobile communication network where the mobile terminal device is located, the target application program sends prompt information to the user according to the type of the mobile communication network where the mobile terminal device is located at present, and the prompt information may include information of the current network type and operation prompt information of the user, for example, prompt the user: whether the target application is to be run in a 2G environment, and so on.
For example, the game client monitors that the current mobile phone is in the 4G network, and prompts the current network state of the mobile phone user to belong to the 4G network, so that the game can be smoothly run even if the mobile phone cannot be connected to the wireless network.
Step 204, the target application program detects whether the mobile terminal device is already connected to the existing wireless network, and when the mobile terminal device is not connected to the existing wireless network, whether one or more wireless networks provided by the operator exist is monitored in real time.
Through a linkage mechanism, when detecting that the mobile terminal device is connected to any existing wireless network, the target application program does not monitor whether the wireless network provided by an operator exists in real time; when it is detected that the mobile terminal device is not connected to any existing wireless network, real-time monitoring is performed to determine whether there is a wireless network provided by the operator.
For example, the game client monitors that the mobile phone is not connected to any wireless network at present, so the game client starts to monitor in real time to determine whether the wireless network provided by the china mobile exists.
Step 205, when there is a wireless network provided by an operator, the target application program sends a login request to a base station providing the wireless network, so that the base station sends login information to the target application program according to the login request, and the target application program connects the mobile terminal device to the wireless network through a preset operator interface program according to the login information, thereby realizing switching of network environments.
When the target application program monitors that a wireless network provided by an operator exists, the target application program interacts with a communication base station generating the wireless network by sending a login request and receiving login information, verifies whether the target application program is qualified or authorized, and connects the mobile terminal equipment to the wireless network through an operator interface program.
For example, when the game client monitors a wireless network provided by china mobile, a login request containing a preset login account and a login password and a game client identifier is sent to a communication base station of china mobile through a preset operator interface program for china mobile, such as an application programming interface or a software development kit. The communication base station sends out login information after verification, and the game client connects the mobile phone to a wireless network provided by China Mobile through an application programming interface or a software development kit after receiving the login information.
And step 206, when the target application program stops running or is switched to the background running on the mobile terminal equipment, disconnecting the wireless network.
The operation of the target application program can be monitored in real time through the operator interface program, and when the operator interface program monitors that the target application program stops operating or shifts to background operation on the mobile terminal equipment, the connection between the mobile terminal equipment and the wireless network is immediately disconnected.
For example, when a mobile phone user turns off or a game client is transferred to a background operation, an application programming interface or a software development kit monitors the change of the operation state of the mobile phone client, so as to interrupt the connection between the mobile phone and a wireless network provided by the china mobile.
Referring to fig. 3, fig. 3 is a structural diagram of a network environment switching apparatus according to an embodiment of the present invention, including:
an identification module 301, configured to determine, when a target application on a mobile terminal device is running, an operator of a mobile communication network where the mobile terminal device is located by the target application, where the target application provides an application of a traffic-free service for the operator;
a monitoring module 302, configured to monitor, in real time, whether a wireless network provided by the operator exists by the target application;
a switching module 303, configured to, when there exists a wireless network provided by the operator, connect the mobile terminal device to the wireless network through a preset operator interface program by the target application program, so as to implement network environment switching from a mobile communication network to the wireless network, where the operator interface program is used to enable the mobile terminal device to establish a connection with the wireless network.
In the embodiment of the invention, the target application program monitors whether the wireless network provided by the operator exists in real time by identifying the operator, and when the wireless network provided by the operator exists, the wireless network is connected to the wireless network, so that the mobile terminal equipment is switched from the original network environment of accessing the mobile internet by using the data traffic of the mobile communication network to the network environment of accessing the mobile internet by using the wireless network, and thus, the traffic charge is not generated by the mobile communication network when the target application program is operated on the mobile terminal equipment. Meanwhile, a wireless network provided by an operator is fully utilized, resource waste is avoided, and the resource utilization rate is improved.
The device of the embodiment of the invention is a device applying the network environment switching method, so that all the embodiments of the network environment switching method are suitable for the device and can achieve the same or similar beneficial effects.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the identification module 301 is specifically configured to:
when the mobile terminal equipment is in a plurality of mobile communication networks, the target application program determines a plurality of operators of the plurality of mobile communication networks in which the mobile terminal equipment is located;
correspondingly, the monitoring module 302 is specifically configured to:
monitoring whether wireless networks provided by the plurality of operators exist in real time;
correspondingly, the switching module 303 is specifically configured to:
when the wireless network provided by any one operator of the multiple operators exists, the target application program connects the mobile terminal device to the wireless network provided by any one operator through a preset operator interface program aiming at any one operator so as to realize the network environment switching from the mobile communication network to the wireless network.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the apparatus further includes:
and the calling module is used for initializing an operator interface program aiming at the operator in the target application program according to the operator.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the monitoring module 302 is specifically configured to:
monitoring the communication frequency of a mobile communication network where the mobile terminal equipment is located;
determining an operator of the mobile communication network through the communication frequency.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the apparatus further includes:
the network type identification module is used for monitoring the data transmission speed or the communication frequency of a mobile communication network where the mobile terminal equipment is located;
the network type identification module is further configured to determine a type of a mobile communication network where the mobile terminal device is located according to the data transmission speed or the communication frequency, where the type of the mobile communication network includes: 5G, 4G, 3G, 2G, and E nets;
the network type identification module is further configured to display a prompt message to a user using the mobile terminal device according to the type of the mobile communication network in which the mobile terminal device is located, where the prompt message is used to inform the user of the type of the mobile communication network in which the mobile terminal is currently located.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the monitoring module 302 is specifically configured to:
detecting whether the mobile terminal device has connected to an existing wireless network, the existing wireless network being any wireless network including a wireless network provided by the operator;
and when the mobile terminal equipment is not connected to the existing wireless network, monitoring whether the wireless network provided by the operator exists in real time.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the monitoring module 302 includes:
a configuration unit, configured to obtain a preset configuration by the target application program, where the preset configuration includes real-time monitoring on or off of a wireless network provided by the operator;
the configuration unit is further configured to monitor whether the wireless network provided by the operator exists in real time by the target application program when the preset configuration is started for real-time monitoring of the wireless network provided by the operator.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the operator interface program preset in the switching module 303 includes an application programming interface or a software development kit;
correspondingly, the switching module 303 is specifically configured to connect the mobile terminal device to the wireless network through the application programming interface or the software development kit, so as to implement network environment switching from a mobile communication network to a wireless network.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the switching module 303 includes:
a sending unit, configured to, when a wireless network provided by the operator exists, send, by the target application, a login request to a base station that provides the wireless network, where the login request includes the target application identification information, so that the base station sends login information to the target application according to the target application identification information;
and the switching unit is used for connecting the mobile terminal equipment to the wireless network through the preset operator interface program by the target application program according to the login information so as to realize the switching of the network environment.
Optionally, in the network environment switching apparatus provided in the embodiment of the present invention, the apparatus further includes:
and the interruption module is used for disconnecting the connection with the wireless network when the target application program stops running or shifts to the background running on the mobile terminal equipment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (20)

1. A network environment switching method is characterized by comprising the following steps:
when a target application program on mobile terminal equipment is operated, the target application program determines an operator of a mobile communication network where the mobile terminal equipment is located, and the target application program provides a flow-free service application program for the operator;
the target application program monitors whether a wireless network provided by the operator exists in real time;
when the wireless network provided by the operator exists, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program so as to realize network environment switching from a mobile communication network to the wireless network, wherein the operator interface program is used for enabling the mobile terminal device to establish connection with the wireless network.
2. The method according to claim 1, wherein the target application program determining an operator of a mobile communication network in which the mobile terminal device is located comprises:
when the mobile terminal equipment is in a plurality of mobile communication networks, the target application program determines a plurality of operators of the plurality of mobile communication networks in which the mobile terminal equipment is located;
correspondingly, the target application program monitors whether the wireless network provided by the operator exists in real time, and the monitoring comprises the following steps:
the target application program monitors whether wireless networks provided by the multiple operators exist in real time;
correspondingly, when the wireless network provided by the operator exists, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program to realize the network environment switching from the mobile communication network to the wireless network, and the method comprises the following steps:
when the wireless network provided by any one operator of the multiple operators exists, the target application program connects the mobile terminal device to the wireless network provided by any one operator through a preset operator interface program aiming at any one operator so as to realize the network environment switching from the mobile communication network to the wireless network.
3. Method according to claim 1 or 2, wherein after the target application has determined the operator of the mobile communication network in which the mobile terminal device is located, the method further comprises:
and the target application program initializes an operator interface program aiming at the operator in the target application program according to the operator.
4. The method according to claim 1, wherein the target application program determining an operator of a mobile communication network in which the mobile terminal device is located comprises:
the target application program monitors the communication frequency of a mobile communication network where the mobile terminal device is located;
the target application program determines an operator of the mobile communication network through the communication frequency.
5. The method of claim 1 or 4, wherein before the target application monitors in real-time whether the operator-provided wireless network is present, the method further comprises:
the target application program monitors the data transmission speed or the communication frequency of a mobile communication network where the mobile terminal device is located;
the target application program determines the type of the mobile communication network where the mobile terminal device is located according to the data transmission speed or the communication frequency, wherein the type of the mobile communication network comprises: 5G, 4G, 3G, 2G, and E nets;
and the target application program displays prompt information to a user using the mobile terminal equipment according to the type of the mobile communication network in which the mobile terminal equipment is positioned, wherein the prompt information is used for informing the user of the type of the mobile communication network in which the mobile terminal is positioned currently.
6. The method of claim 1, wherein the target application monitors the presence of the carrier-provided wireless network in real time, comprising:
the target application program detecting whether the mobile terminal device has connected to an existing wireless network, the existing wireless network being any wireless network including the operator provided wireless network;
and when the mobile terminal equipment is not connected to the existing wireless network, the target application program monitors whether the wireless network provided by the operator exists in real time.
7. The method of claim 1 or 6, wherein the target application monitors the presence of the carrier-provided wireless network in real time, comprising:
the target application program acquires preset configuration, wherein the preset configuration comprises the real-time monitoring on or off of a wireless network provided by the operator;
and when the preset configuration is started for real-time monitoring of the wireless network provided by the operator, the target application program monitors whether the wireless network provided by the operator exists in real time.
8. The method of claim 1, wherein the pre-defined operator interface program comprises an application programming interface or a software development kit;
correspondingly, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program to realize network environment switching from a mobile communication network to the wireless network, and the method comprises the following steps:
and the target application program connects the mobile terminal equipment to the wireless network through the application programming interface or the software development kit so as to realize the network environment switching from the mobile communication network to the wireless network.
9. The method according to claim 1 or 8, wherein when the wireless network provided by the operator exists, the target application program connects the mobile terminal device to the wireless network through a preset operator interface program to realize the network environment switching from the mobile communication network to the wireless network, and the method comprises the following steps:
when a wireless network provided by the operator exists, the target application program sends a login request to a base station providing the wireless network, wherein the login request contains identification information of the target application program, so that the base station sends login information to the target application program according to the identification information of the target application program;
and the target application program connects the mobile terminal equipment to the wireless network through the preset operator interface program according to the login information so as to realize the switching of the network environment.
10. The method according to claim 1, wherein after the target application connects the mobile terminal device to the wireless network through a preset operator interface program to implement a network environment handover from a mobile communication network to a wireless network when the operator-provided wireless network exists, the method further comprises:
and when the target application program stops running or is transferred to the background running on the mobile terminal equipment, disconnecting the target application program from the wireless network.
11. A network environment switching apparatus, comprising:
the mobile terminal equipment comprises an identification module, a flow-free service module and a flow-free service module, wherein the identification module is used for determining an operator of a mobile communication network where the mobile terminal equipment is located by a target application program when the target application program on the mobile terminal equipment is operated, and the target application program provides the flow-free service application program for the operator;
the monitoring module is used for monitoring whether a wireless network provided by the operator exists in real time by the target application program;
a switching module, configured to, when there is a wireless network provided by the operator, connect the mobile terminal device to the wireless network through a preset operator interface program by the target application program, so as to implement network environment switching from a mobile communication network to the wireless network, where the operator interface program is used to establish a connection between the mobile terminal device and the wireless network.
12. The apparatus according to claim 11, wherein the identification module is specifically configured to:
when the mobile terminal equipment is in a plurality of mobile communication networks, the target application program determines a plurality of operators of the plurality of mobile communication networks in which the mobile terminal equipment is located;
correspondingly, the monitoring module is specifically configured to:
monitoring whether wireless networks provided by the plurality of operators exist in real time;
correspondingly, the switching module is specifically configured to:
when the wireless network provided by any one operator of the multiple operators exists, the target application program connects the mobile terminal device to the wireless network provided by any one operator through a preset operator interface program aiming at any one operator so as to realize the network environment switching from the mobile communication network to the wireless network.
13. The apparatus of claim 11 or 12, further comprising:
and the calling module is used for initializing an operator interface program aiming at the operator in the target application program according to the operator.
14. The apparatus according to claim 11, wherein the monitoring module is specifically configured to:
monitoring the communication frequency of a mobile communication network where the mobile terminal equipment is located;
determining an operator of the mobile communication network through the communication frequency.
15. The apparatus of claim 11 or 14, further comprising:
the network type identification module is used for monitoring the data transmission speed or the communication frequency of a mobile communication network where the mobile terminal equipment is located;
the network type identification module is further configured to determine a type of a mobile communication network where the mobile terminal device is located according to the data transmission speed or the communication frequency, where the type of the mobile communication network includes: 5G, 4G, 3G, 2G, and E nets;
the network type identification module is further configured to display a prompt message to a user using the mobile terminal device according to the type of the mobile communication network in which the mobile terminal device is located, where the prompt message is used to inform the user of the type of the mobile communication network in which the mobile terminal is currently located.
16. The apparatus according to claim 11, wherein the monitoring module is specifically configured to:
detecting whether the mobile terminal device has connected to an existing wireless network, the existing wireless network being any wireless network including a wireless network provided by the operator;
and when the mobile terminal equipment is not connected to the existing wireless network, monitoring whether the wireless network provided by the operator exists in real time.
17. The apparatus of claim 11 or 16, wherein the monitoring module comprises:
a configuration unit, configured to obtain a preset configuration by the target application program, where the preset configuration includes real-time monitoring on or off of a wireless network provided by the operator;
the configuration unit is further configured to monitor whether the wireless network provided by the operator exists in real time by the target application program when the preset configuration is started for real-time monitoring of the wireless network provided by the operator.
18. The apparatus of claim 11, wherein the operator interface program preset in the switching module comprises an application programming interface or a software development kit;
correspondingly, the switching module is specifically configured to connect the mobile terminal device to the wireless network through the application programming interface or the software development kit, so as to implement network environment switching from a mobile communication network to a wireless network.
19. The apparatus of claim 11 or 18, wherein the switching module comprises:
a sending unit, configured to, when a wireless network provided by the operator exists, send, by the target application, a login request to a base station that provides the wireless network, where the login request includes the target application identification information, so that the base station sends login information to the target application according to the target application identification information;
and the switching unit is used for connecting the mobile terminal equipment to the wireless network through the preset operator interface program by the target application program according to the login information so as to realize the switching of the network environment.
20. The apparatus of claim 11, further comprising:
and the interruption module is used for disconnecting the connection with the wireless network when the target application program stops running or shifts to the background running on the mobile terminal equipment.
CN201611223921.XA 2016-12-27 2016-12-27 Network environment switching method and device Active CN108243471B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611223921.XA CN108243471B (en) 2016-12-27 2016-12-27 Network environment switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611223921.XA CN108243471B (en) 2016-12-27 2016-12-27 Network environment switching method and device

Publications (2)

Publication Number Publication Date
CN108243471A CN108243471A (en) 2018-07-03
CN108243471B true CN108243471B (en) 2020-12-18

Family

ID=62702246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611223921.XA Active CN108243471B (en) 2016-12-27 2016-12-27 Network environment switching method and device

Country Status (1)

Country Link
CN (1) CN108243471B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110751761B (en) * 2019-10-25 2022-04-29 联永智能科技(上海)有限公司 Unlocking method, device and equipment of Bluetooth lockset and storage medium
CN114079890A (en) * 2020-08-18 2022-02-22 深圳市万普拉斯科技有限公司 Method and device for accessing network by application program, computer equipment and storage medium
CN114650283A (en) * 2020-12-21 2022-06-21 京东科技控股股份有限公司 Method and device for dynamically switching cloud storage service, electronic equipment and storage medium
CN112770415B (en) * 2020-12-31 2023-07-14 上海连尚网络科技有限公司 Information processing method and device for wireless hotspots
CN112732356A (en) * 2021-01-11 2021-04-30 江西中瑞防雷技术有限公司 Data monitoring management system of intelligent platform system
CN112822742A (en) * 2021-02-01 2021-05-18 联想(北京)有限公司 Processing method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102057716A (en) * 2008-04-09 2011-05-11 Ubiquisys有限公司 Access point
CN104468813A (en) * 2014-12-18 2015-03-25 广州爱九游信息技术有限公司 Application program recommending method, device and system
CN104539686A (en) * 2014-12-23 2015-04-22 华为软件技术有限公司 Traffic-free application downloading method, terminals and server side
CN104902452A (en) * 2015-06-30 2015-09-09 北京奇虎科技有限公司 Mobile terminal and network access method thereof
CN104967624A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Flow-free platform based network accessing method, mobile terminal and system
CN104967976A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Communication method applied to mobile terminal, proxy server and system
CN104967688A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Method for accessing to network by using flow-free platform, mobile terminal and system
CN104994230A (en) * 2015-06-30 2015-10-21 北京奇虎科技有限公司 Communication method for mobile terminal, mobile terminal and system
CN105142123A (en) * 2015-06-30 2015-12-09 北京奇虎科技有限公司 Method for carrying out network access based on wireless network card, distribution server and system
CN105634849A (en) * 2014-11-05 2016-06-01 中国移动通信集团公司 Dial measuring method and apparatus for data traffic unified payment services

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7092999B2 (en) * 2002-06-10 2006-08-15 Gutman Levitan Data broadcast network for congestion-free internet access
WO2015115966A2 (en) * 2014-01-31 2015-08-06 Telefonaktiebolaget L M Ericsson (Publ) Interworking between networks operating according to different radio access technologies

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102057716A (en) * 2008-04-09 2011-05-11 Ubiquisys有限公司 Access point
CN105634849A (en) * 2014-11-05 2016-06-01 中国移动通信集团公司 Dial measuring method and apparatus for data traffic unified payment services
CN104468813A (en) * 2014-12-18 2015-03-25 广州爱九游信息技术有限公司 Application program recommending method, device and system
CN104539686A (en) * 2014-12-23 2015-04-22 华为软件技术有限公司 Traffic-free application downloading method, terminals and server side
CN104902452A (en) * 2015-06-30 2015-09-09 北京奇虎科技有限公司 Mobile terminal and network access method thereof
CN104967624A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Flow-free platform based network accessing method, mobile terminal and system
CN104967976A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Communication method applied to mobile terminal, proxy server and system
CN104967688A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Method for accessing to network by using flow-free platform, mobile terminal and system
CN104994230A (en) * 2015-06-30 2015-10-21 北京奇虎科技有限公司 Communication method for mobile terminal, mobile terminal and system
CN105142123A (en) * 2015-06-30 2015-12-09 北京奇虎科技有限公司 Method for carrying out network access based on wireless network card, distribution server and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
免流量又成行业热词 如何看懂哪些免流量APP;李文瑶;《https://tech.huanqiu.com/article/9CaKrnJFv6q》;20140901;第1-2页 *
免费流量:长期趋势还是昙花一现?;陈志刚;《中国电信业》;20140308;全文 *

Also Published As

Publication number Publication date
CN108243471A (en) 2018-07-03

Similar Documents

Publication Publication Date Title
CN108243471B (en) Network environment switching method and device
CN103874068B (en) A kind of method and apparatus for identifying pseudo-base station
KR100414926B1 (en) System and method for provisioning or updating a mobile station using over-the-air transfer of interpreted byte-code program
WO2019062384A1 (en) Method and device for public network user accessing private network
CN102833712A (en) Method, device, server and system for preventing information leakage and equipment
CN102457514B (en) Mobile terminal-oriented short message authentication method of wireless network
CN104202308A (en) Implementation method of safe batch configuration of Wi-Fi Internet of Things system
CN104168557A (en) Upgrading method for operating systems and upgrading device for operating systems
CN103874065A (en) Method and device for judging user position abnormity
CN104254069A (en) Network registration system and method for handset without SIM card
CN103916814A (en) System and method for implementing automatic navigation of mobile terminal through bluetooth headset
CN102685025A (en) Multi-terminal service switching method, terminal and system
CN105813072A (en) Terminal authentication method, system and cloud server
CN106878987B (en) Communication method, system and cloud server
CN105282820A (en) Terminal management and control method and device
CN102036239A (en) Method for accessing wireless business terminal, device and system
CN105790945B (en) A kind of authentication method, device and system realizing user's unique identities and authenticating
CN107548054B (en) Master-slave equipment switching method of eSIM card, slave equipment and eSIM card management server
CN105336013B (en) It is a kind of that the method and system called the roll is realized by beacon broadcast
KR101742691B1 (en) Mobile terminal and Method for providing two number service
CN103108316A (en) Authentication method, device and system for aerial card writing
CN112135253B (en) Network connection method and device
CN102946594A (en) Method for automatically obtaining equipment information in Telematics system during using navigation with one key
WO2016090578A1 (en) Authentication processing method, apparatus and terminal
US20170318412A1 (en) Method for transmitting data between two subscribers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant