Terminal device, network control method and storage medium
Automatically detect and switch to the network with the highest priority in the target area through the terminal device, the problem of users needing to manually switch the network when moving between different active areas is solved, realizing time saving and operation simplification.
Patent Information
- Application Number
- CN202210950939.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-08-09
AI Technical Summary
When a user moves from one active area to another, it is necessary to manually switch between different networks, wasting a lot of time for the user.
The terminal device detects the network priority information of the target area and automatically selects the network with the highest priority for communication to realize automatic network switching.
It simplifies user operations, saves users' time, realizes automatic network switching, and avoids the steps of manually switching networks.
Smart Images

Figure CN115334604B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a terminal device, a network control method and a storage medium. Background Art
[0002] With the development and popularization of communication networks, network coverage is getting larger and larger. However, in different activity areas, different types of networks will present different network speeds. For example, in living areas, wireless networks are faster, while in mining areas, cellular networks are faster.
[0003] Currently, when a user moves from one activity area to another, the user needs to manually operate to switch between different networks, thus wasting a lot of the user's time. Summary of the invention
[0004] In order to solve the above-mentioned problems in the prior art, the embodiments of the present application provide a terminal device, a network control method and a storage medium, which can automatically switch networks, simplify user operations and save user time.
[0005] In a first aspect, an embodiment of the present application provides a terminal device, including: a display, a memory, and a processor;
[0006] The display is configured to: display an interface of the terminal device when it is running;
[0007] The memory is configured to: store programs or data used by the terminal device;
[0008] The processor is configured to:
[0009] When it is detected that the terminal device is located in the target area, obtaining network priority information of the target area; the network priority information includes usage priorities of multiple different types of networks in the target area;
[0010] A target network is selected from a plurality of different types of networks according to the network priority information of the target area, and the target network is used for communication.
[0011] In a possible implementation, the processor is specifically configured to:
[0012] According to the network priority information of the target area, the network with the highest priority is used as the target network.
[0013] In a possible implementation, the processor is further configured to:
[0014] In response to the user's setting operation on the area center and the area radius in the area setting interface, generating a target area;
[0015] In response to a user's setting operation on usage priorities of a plurality of different types of networks in the target area, network priority information of the target area is generated.
[0016] In a possible implementation, the processor is further configured to:
[0017] Generate a target area according to the location information of the terminal device;
[0018] According to the network information of a plurality of different types of networks in the target area, the use priority of each network is determined, and the network priority information of the target area is generated.
[0019] In a possible implementation, the processor is further configured to:
[0020] Before generating the target area according to the location information of the terminal device, the location information and network information of the terminal device are acquired in response to a trigger operation of the user on the information generation control.
[0021] In a possible implementation, the processor is specifically configured to:
[0022] Determine a first area according to the first location of the terminal device and a preset area radius;
[0023] If the duration for which the terminal device is located in the first area reaches a set duration threshold, the first area is used as a target area.
[0024] In a possible implementation, the network information of the first network includes network speed information and network usage time information when the terminal device uses the first network for communication within a set time period; the first network is any one type of network among the multiple different types.
[0025] In a possible implementation, the processor is specifically configured to:
[0026] The use priority of the first network is determined according to the network speed information and speed weight of the first network, and the network use time information and time weight of the first network.
[0027] In a second aspect, an embodiment of the present application provides a network control method, which is applied to a terminal device, and the method includes:
[0028] When it is detected that the terminal device is located in the target area, obtaining network priority information of the target area; the network priority information includes usage priorities of multiple different types of networks in the target area;
[0029] selecting a target network from a plurality of different types of networks according to the network priority information of the target area;
[0030] The target network is used for communication.
[0031] In a third aspect, an embodiment of the present application provides a network control device, including:
[0032] An acquiring unit, when detecting that the terminal device is located in a target area, acquires network priority information of the target area; the network priority information includes usage priorities of multiple different types of networks in the target area;
[0033] A selection unit, selecting a target network from a plurality of different types of networks according to the network priority information of the target area;
[0034] A communication unit communicates using the target network.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the second aspect is implemented.
[0036] The terminal device, network control method and storage medium provided by the embodiment of the present application can obtain the network priority information of the target area when the terminal device is detected to be located in the target area, and then select the target network from a plurality of different types of networks according to the network priority information of the target area, and use the target network for communication, wherein the network priority information includes the use priority of the plurality of different types of networks in the target area. Through this method, the terminal device can realize automatic network switching without the user manually switching the network, thereby simplifying the user operation and saving the user time. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 A hardware configuration block diagram of a terminal device provided in an embodiment of the present application;
[0039] Figure 2 A software structure block diagram of a terminal device provided in an embodiment of the present application;
[0040] Figure 3 A flowchart of a network control method provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of a mobile phone desktop provided in an embodiment of the present application;
[0042] Figure 5 A schematic diagram of a function selection interface provided in an embodiment of the present application;
[0043] Figure 6 A schematic diagram of a function setting interface provided in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of a region setting interface provided in an embodiment of the present application;
[0045] Figure 8 A schematic diagram of a center location selection interface provided in an embodiment of the present application;
[0046] Fig. 9 A schematic diagram of a radius selection interface provided in an embodiment of the present application;
[0047] Fig.10 A schematic diagram of a location selection interface provided in an embodiment of the present application;
[0048] Fig.11 A schematic diagram of a network priority setting interface provided in an embodiment of the present application;
[0049] Fig.12 A schematic diagram of a priority input interface provided in an embodiment of the present application;
[0050] Fig.13 A schematic diagram of a network setting interface provided in an embodiment of the present application;
[0051] Fig.14 A flowchart for generating network priority information provided by an embodiment of the present application;
[0052] Fig.15 A schematic diagram of a function setting interface provided in an embodiment of the present application;
[0053] Fig.16 A schematic diagram of location information and network information provided in an embodiment of the present application;
[0054] Fig.17A schematic diagram of network priority information of a target area provided in an embodiment of the present application;
[0055] Fig.18 A flowchart of a network control method provided in an embodiment of the present application;
[0056] Fig.19 A structural block diagram of a network control device provided in an embodiment of the present application;
[0057] Fig. 20 A structural block diagram of a network control device provided in an embodiment of the present application;
[0058] Fig.21 A structural block diagram of a network control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] It should be noted that the application scenarios described in the following embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. A person of ordinary skill in the art can know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0061] In different activity areas, different types of networks will present different network speeds. Currently, when a user moves from one activity area to another, the user needs to manually switch between different networks, which wastes a lot of the user's time.
[0062] Based on this, the embodiment of the present application provides a terminal device, a network control method and a storage medium. When the terminal device is detected to be located in a target area, the terminal device can obtain the network priority information of the target area, and then select the target network from a plurality of different types of networks according to the network priority information of the target area, and use the target network for communication, wherein the network priority information includes the use priority of a plurality of different types of networks in the target area. Through this method, the terminal device can realize automatic network switching without the user manually switching the network, thereby simplifying the user operation and saving the user time.
[0063] Figure 1exemplarily shows a hardware configuration block diagram of a terminal device provided in an embodiment of the present application. It should be understood that Figure 1 The terminal device 100 shown is only an example, and the terminal device 100 may have more Figure 1 The more or less components shown in the figure can be combined with two or more components, or can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0064] like Figure 1 As shown, the terminal device 100 includes: a communication component 110, a processor 120, a memory 130, a display 140, an input component 150, an audio circuit 160, a SIM card interface 170, a sensor 180 and other components.
[0065] The communication component 110 is used to receive or send a call request, receive and send signals during a call, and connect to a server to upload or download data. The communication component 110 may include an RF (radio frequency) circuit 111 and a Wi-Fi (Wireless Fidelity) module 112.
[0066] The RF circuit 111 can be used to receive and send signals during the process of sending and receiving information or making calls. It can receive downlink data from the base station and hand it over to the processor 120 for processing; it can send uplink data to the base station. Generally, the RF circuit 111 includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer and other devices. The RF circuit 111 can receive electromagnetic waves from the antenna, filter, amplify and other processes on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The RF circuit 111 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves and radiate it through the antenna. In some embodiments, at least some functional modules of the RF circuit 111 can be set in the processor 120. In some embodiments, at least some functional modules of the RF circuit 111 can be set in the same device as at least some modules of the processor 120. The RF circuit 111 of the terminal device 100 is coupled to the antenna, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
[0067] Wi-Fi is a short-range wireless transmission technology. The terminal device 100 can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 112, which provides users with wireless broadband Internet access. The Wi-Fi module 112 can be connected to a router and connected to an external network through the router. The Wi-Fi module 112 can also be connected to a server to upload or download data.
[0068] The memory 130 may be used to store data or program codes used when the terminal device is running. The processor 120 executes various functions and data processing of the terminal device 100 by running the data or program codes stored in the memory 130. The memory 130 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 130 stores an operating system that enables the terminal device 100 to run.
[0069] The display 140 is used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the terminal device 100. Specifically, the display 140 may include a display arranged on the front of the terminal device 100. The display may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display 140 may be used to display an interface when the terminal device is running.
[0070] The input component 150 may be used to receive digital or character information input by a user, as well as various operations input by a user, and generate signal inputs related to user settings and function control of the terminal device 100. Specifically, the input component 150 may include buttons and a touch screen, and the touch screen may be provided on the front of the terminal device 100 to collect touch operations of the user on or near the touch screen, such as clicking a button, dragging a scroll box, etc.
[0071] The touch screen may be covered on the display. In some embodiments, the touch screen and the display may be integrated to realize the input and output functions of the terminal device 100. After integration, the touch screen may be referred to as a touch display.
[0072] The terminal device 100 may further include a positioning module, such as a satellite positioning module or a mobile communication network positioning module, which may determine the geographical location of the terminal device 100 in real time.
[0073] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 100. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output. The terminal device 100 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the RF circuit 111 to be sent to, for example, another terminal, or the audio data is output to the memory 130 for further processing.
[0074] The SIM card interface 170 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting it into the SIM card interface 170 or pulling it out from the SIM card interface 170. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 170 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface at the same time. The types of the multiple cards can be the same or different. The SIM card interface can also be compatible with different types of SIM cards. The SIM card interface can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100. The SIM card is used to identify the user's mobile phone number.
[0075] In addition to the SIM card interface 170, the terminal device 100 may also include a USB (universal serial bus) interface, etc. The USB interface is used to connect a charging cable or other peripherals. For example, the terminal device 100 can be connected to a charging cable via a USB interface. The components or modules in the terminal device 100 are connected via a bus.
[0076] The terminal device 100 may also include at least one sensor 180, such as an acceleration sensor 181, a distance sensor 182, a fingerprint sensor 183, and a temperature sensor 184. The terminal device 100 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor. For example, the fingerprint sensor 183 may be used to sense that a user clicks on an icon on the operation interface of the terminal device 100.
[0077] The terminal device 100 may also include a camera for capturing still images or videos. The camera may be one or more. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the processor 120 for conversion into a digital image signal.
[0078] The processor 120 is the control center of the terminal device 100. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions and processes data of the terminal device 100 by running or executing software programs stored in the memory 130 and calling data stored in the memory 130. In some embodiments, the processor 120 may include one or more processing units. In this application, the processor 120 can run an operating system, an application program, a user interface display and touch response, and the network control method described in the embodiment of the application. The specific process of the processor 120 executing the acquisition of the network control method will be described in detail below.
[0079] Figure 2 It is a software structure block diagram of the terminal device 100 according to an embodiment of the present application.
[0080] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0081] The application layer can include a series of application packages. Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, clock, Bluetooth, music, video, short message, etc. Users can set alarms in the clock application. The application layer may also include third-party applications installed on the terminal device.
[0082] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0083] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0084] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0085] Content providers are used to store and retrieve data and make it accessible to applications. The data may include alarm data, videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0086] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0087] The phone manager is used to provide communication functions for terminal devices, such as the management of call status (including connected, hung up, etc.). The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0088] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal vibrates, the indicator light flashes, etc.
[0089] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0090] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0091] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0092] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc. Among them, the 3D graphics processing library and 2D graphics engine are both public camera resources.
[0093] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0094] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0095] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0096] A 2D graphics engine is a drawing engine for 2D drawings.
[0097] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0098] To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiment of the present application. The method may be executed or executed in parallel in the actual processing process or when the device is executed in accordance with the method sequence shown in the embodiment or drawings.
[0099] Figure 3 A flowchart of a network control method provided by an embodiment of the present application is shown. The method can be applied to Figure 1 The terminal device shown in the figure may include but is not limited to a mobile phone. Figure 3 As shown, the method may include the following steps:
[0100] Step S301, when it is detected that the terminal device is located in the target area, the network priority information of the target area is obtained.
[0101] In some embodiments, before detecting the location of the terminal device, the user can pre-set the target area and the usage priority of each network in the target area. The terminal device can generate the target area and the network priority information of the target area in response to the user's setting operation for the target area and the usage priority of each network in the target area. The network priority information includes the usage priorities of multiple different types of networks in the target area.
[0102] Specifically, the terminal device can generate a target area in response to the user's setting operations on the area center and area radius in the area setting interface, and generate network priority information for the target area in response to the user's setting operations on the usage priority of multiple different types of networks in the target area.
[0103] For example, in one embodiment, the user can Figure 4 In the mobile phone desktop shown in FIG. 1 , a user clicks on the icon of the settings application. In response to the user clicking on the icon of the settings application, the mobile phone starts the settings application and displays a function selection interface of the settings application. Figure 5 As shown, the function selection interface may include a network setting control, and the user may click the network setting control. In response to the user clicking the network setting control, the mobile phone displays a function setting interface for network setting, such as Figure 6 As shown, in this interface, a target area control 601 and a network priority control 602 may be included. The user may click on the target area control 601, and the mobile phone responds to the user's operation of clicking on the target area control 601, that is, the target area setting operation, and displays the area setting interface, such as Figure 7 As shown, in the area setting interface, a center position input box 701 , a set center control 702 , a map display box 703 and a completion control 704 may be included.
[0104] The user can enter the central location keyword in the central location input box 701, for example, XX community; the mobile phone responds to the user's input of the central location keyword and displays the following Figure 8 The center location selection interface shown in the figure may include multiple candidate locations related to the center location keyword. The user may select one of the multiple candidate locations as the center location. For example, the user may select Building 15 of XX Community as the center location and click it. In response to the user's click operation on the center location, the mobile phone returns to the location selection interface and marks the center location in the map display frame 703. The user may click on the Set as Center control 702. In response to the user's click on the Set as Center control 702, the mobile phone sets the target location as the center location; and displays the following figure: Fig. 9 The radius selection interface shown in the figure may include a radius selection box 901. The user can select a target radius, such as 500 meters, in the radius selection box 901. After the input is completed, the user clicks the confirmation control. In response to the user clicking the confirmation control, the mobile phone returns to the location selection interface and displays the information input by the user in the location selection interface, such as Fig.10 As shown, the user can check the information. If it is correct, the user can click the completion control. The mobile phone responds to the user clicking the completion control, saves the area center and area radius input by the user, and generates a target area based on the area center and area radius input by the user, that is, Building 15 of XX Community is the area center and the area radius is 500 meters as the target area.
[0105] After setting the target area in the above way, the user can Figure 6In the function setting interface shown in FIG. 1 , the network priority control 602 is clicked. In response to the user clicking the network priority control 602, the mobile phone displays a network priority setting interface, such as Fig.11 As shown, in this interface, a variety of different types of networks may be included, such as cellular data network, WIFI, Ethernet, and Bluetooth, etc. The user may select a network as the target network to be set, and click on it. In response to the user clicking on the target network to be set, the mobile phone displays a priority input interface. For example, assuming that the cellular data network is the target network to be set, the user may click on the cellular data network, and the mobile phone displays, in response to the user clicking on the cellular data network, the following Fig.12 In the priority input interface shown, the user can enter the usage priority of the cellular data network in the priority input box, for example, level 1. The user can set the usage priority of each network as described above. After the setting is completed, the user can click Fig.11 The completion control below the network priority setting interface shown, in response to the user clicking the completion control, the mobile phone generates network priority information for the target area, and stores the target area and the network priority information of the target area in correspondence.
[0106] In the embodiment of the present application, the smaller the value, the greater the priority, that is, when the priority value is 1, it means that the use priority of the network is the highest.
[0107] In the embodiment of the present application, the user can set one target area or multiple target areas, which is not limited in the present application.
[0108] For example, in another embodiment, after the user clicks the network setting control, the mobile phone may display the following in response to the user's operation of clicking the network setting control: Fig.13 The network setting interface shown in the figure may include a target area 1 control and a target area 2 control. The user may first click on the target area 1 control. The mobile phone responds to the user's operation of clicking on the target area 1 control by displaying the following Figure 6 The network setting interface of the target area 1 is shown, and the above-mentioned setting operation for the target area and the usage priority of each network in the target area is performed to complete the setting of the usage priority of the target area 1 and the various types of networks in the target area 1; after the setting is completed, the user can click the target area 2 control and refer to the above process to complete the setting of the usage priority of the target area 2 and the various types of networks in the target area 2.
[0109] In other embodiments, before detecting the location of the terminal device, the terminal device may also generate a target area based on the location information of the terminal device, and determine the use priority of each network based on the network information of multiple different types of networks in the target area, and generate network priority information for the target area. The network information of the first network includes network speed information and network use time information when the terminal device uses the first network for communication within a set time period, and the first network is any type of network among multiple different types.
[0110] Specifically, in the process of generating the target area and the network priority information of the target area, the terminal device can refer to Fig.14 The method shown, such as Fig.14 As shown, the method comprises the following steps:
[0111] Step S1401, obtaining location information and network information of the terminal device;
[0112] Specifically, the terminal device can respond to the user's triggering operation on the information generation control, turn on the automatic generation function, and obtain the location information and network information of the terminal device.
[0113] For example, the user can Figure 5 In the function selection interface shown, click the network setting control, and the mobile phone responds to the user's operation of clicking the network setting control and displays the function setting interface of the network setting, such as Fig.15 As shown, in this interface, an automatic generation function control 1501, a target area control and a network priority control may be included, wherein the automatic generation function control 1501 is an optional information generation control. The user may click on the automatic generation function control 1501, and the mobile phone responds to the user's operation of clicking on the automatic generation function control 1501, turns on the automatic generation function, and obtains the location information and network information of the terminal device at a set time interval, wherein the network information may include network type information, network identification information and network speed information.
[0114] In the embodiment of the present application, the set time interval can be 1 second or 5 seconds, and the present application does not limit this.
[0115] Step S1402: determining a first area according to the first location information included in the location information within a set time period and a preset area radius.
[0116] The first location information is any location information included in the location information within a set time period.
[0117] For example, assuming that the set time interval is 5 seconds and the set duration is 1 minute, after the terminal device obtains the location information and network information of the terminal device, it can select the location information and network information obtained within 1 minute, such as Fig.16 As shown, the terminal device can Fig.16 Each piece of location information shown is used as the first location information in turn, and then the first area is generated according to the first location information and the preset area radius. For example, assuming that the preset area radius is 500 meters, and the location information with the serial number 1 is the first location information, the terminal device can use the location identified by the location information with the serial number 1 as the area center and 500 meters as the area radius to generate the first area.
[0118] In the embodiment of the present application, the preset area radius can be 500 meters or 1000 meters, and the present application does not limit this.
[0119] Step S1403, determining whether the duration of the terminal device being in the first area reaches a set duration threshold; if so, executing step S1404; if not, executing step S1401;
[0120] Step S1404, taking the first area as the target area;
[0121] Step S1405: Determine the network priority information of the target area according to the network information of the terminal device in the first area.
[0122] After the first area is determined through step S1402, the duration of the terminal device in the first area can be determined based on the location information of the terminal device. If the duration of the terminal device in the first area is greater than or equal to the set duration threshold, the first area is used as the target area, and the usage priority of each network contained in the first area is determined based on the network speed information and network duration information of the terminal device in the first area, thereby determining the network priority information of the target area.
[0123] Exemplarily, in one embodiment, assuming that the set duration threshold is 30 seconds, and the duration of the terminal device in the first area is 60 seconds, which is greater than the set duration threshold, the first area can be used as the target area, and the usage priority of each network contained in the target area can be determined according to Formula 1.
[0124] p=w1*v+w2*t(Formula 1)
[0125] Among them, p represents the priority score, w1 is the pre-set speed weight, w2 is the pre-set time weight, v represents the network speed, and t represents the network usage time.
[0126] After determining the priority scores of each network through formula 1, the use priority of each network can be determined according to the priority scores of each network. For example, assuming that the target area contains four networks, namely cellular data network, WIFI, Ethernet and Bluetooth, the location information and network information of the terminal device obtained are as follows: Fig.16 As shown, w1=0.7, w2=0.3, and v represents the maximum network speed. Therefore, according to formula 1, it can be determined that the priority score of the cellular data network is p=0.7*4+0.3*40, that is, the priority score of the cellular data network is 14.8; the priority score of WIFI is p=0.7*5+0.3*20, that is, the priority score of WIFI is 9.5; the priority score of Ethernet is p=0.7*0+0.3*0, that is, the priority score of Ethernet is 0; the priority score of Bluetooth is p=0.7*0+0.3*0, that is, the priority score of Bluetooth is 0; therefore, the use priority of the cellular data network can be determined as 1, the use priority of WIFI can be determined as 2, the use priority of Ethernet can be determined as 3, and the use priority of Bluetooth can be determined as 4; or, the use priority of the cellular data network can be determined as 1, the use priority of WIFI can be determined as 2, the use priority of Bluetooth can be determined as 3, and the use priority of Ethernet can be determined as 4.
[0127] In the embodiment of the present application, the network speed may be a maximum speed or an average speed, and the present application does not limit this.
[0128] After determining the target area and the usage priorities of each network contained in the target area in the above manner, the network priority information of the target area can be generated according to the usage priorities of each network contained in the target area, and the identification information of the target area and the network priority information of the target area can be stored correspondingly.
[0129] For example, Fig.17 As shown, Fig.17 The target area identification information and the target area network priority information are stored in the terminal device. The center of the target area is the location marked by 100° east longitude and 100° north latitude, the area radius is 500 meters, and the network priority information includes the use priority of cellular data network as 1, the use priority of WIFI as 2, the use priority of Ethernet as 3, and the use priority of Bluetooth as 4.
[0130] The target area and the network priority information of the target area are generated by the user's setting operation for the usage priority of the target area and each network in the target area, or the target area and the network priority information of the target area are generated by analyzing the location information and network information of the terminal device within a set time period. The location information of the terminal device can be obtained at set time intervals, and it can be determined whether the terminal device is located in the target area based on the location information of the terminal device. If it is determined that the location information of the terminal device is within the target area, the network priority information of the target area is obtained.
[0131] Step S302: selecting a target network from a plurality of different types of networks according to network priority information of the target area.
[0132] Step S303: communicate using the target network.
[0133] After obtaining the network priority information of the target area in step S301, the terminal device can select a target network from a plurality of different types of networks for connection according to the network priority information of the target area, and use the target network for communication.
[0134] Specifically, the terminal device may use the network with the highest priority as the target network according to the network priority information of the target area, and use the target network for communication.
[0135] For example, assume that the target area contains three types of networks, the first is a cellular data network, the second is Bluetooth, and the third is WIFI, among which the cellular data network has a usage priority of 1, Bluetooth has a usage priority of 2, and WIFI has a usage priority of 3, that is, the cellular data network has the highest usage priority. Therefore, the cellular data network can be used as the target network and the cellular data network can be used for communication.
[0136] In an embodiment of the present application, when the target area contains only one type of network, that type of network can be directly used as the target network, that is, when it is determined that the location information of the terminal device is located in the target area, that type of network can be directly used as the target network and communication is performed through the target network.
[0137] Through the above method, the terminal device can select a target network from a variety of different types of networks and communicate based on the network priority information of the target area, thereby realizing automatic network switching and helping users save time.
[0138] Based on the same inventive concept, the present application also provides a network control method, such as Fig.18 As shown, the method comprises the following steps:
[0139] Step S1801, obtaining location information of the terminal device;
[0140] Step S1802, judging whether the terminal device is located in the target area according to the location information of the terminal device; if so, executing step S1803; if not, executing step S1801;
[0141] Step S1803, obtaining network priority information of the target area;
[0142] Step S1804, updating the usage priority of the network stored in each network factory module according to the network priority information of the target area;
[0143] Each type of network corresponds to a network factory module, and each network factory module is used to store the usage priority of the corresponding type of network.
[0144] For example, it is assumed that the network priority information within the target area includes a cellular data network usage priority of 1, a WIFI usage priority of 2, an Ethernet usage priority of 3, and a Bluetooth usage priority of 4; the network priority information outside the target area includes a WIFI usage priority of 1, a Bluetooth usage priority of 2, a cellular data network usage priority of 3, and an Ethernet usage priority of 4.
[0145] When the terminal device is outside the target area, the usage priority stored in the network factory module of the cellular data network is 3, the usage priority stored in the WIFI network factory module is 1, the usage priority stored in the Bluetooth network factory module is 2, and the usage priority stored in the Ethernet network factory module is 4. When the terminal device is located in the target area and the network priority information of the target area is obtained, the usage priority of the networks stored in each network factory module can be updated according to the network priority information of the target area, that is, the usage priority stored in the network factory module of the cellular data network is updated to 1, the usage priority stored in the WIFI network factory module is updated to 2, the usage priority stored in the Bluetooth network factory module is updated to 4, and the usage priority stored in the Ethernet network factory module is updated to 3.
[0146] Step S1805, sending the usage priority of each network in the target area to the connection management module through the network factory module;
[0147] Step S1806, sending the usage priority of the currently connected network to each network factory module through the connection management module;
[0148] Exemplarily, assuming that the network currently connected to the terminal device is WIFI, and the usage priority of WIFI in the target area is 2, the terminal device can send the usage priority of the currently connected network to each network factory module through the connection management module.
[0149] Step S1807, determining whether the usage priority of the network stored in each network factory module is greater than the usage priority of the currently connected network; if so, executing step S1808; if not, executing step S1809;
[0150] Step S1808, sending a network establishment request to the terminal device through the connection management module;
[0151] Step S1809: communicate using the currently connected network.
[0152] Step S1810, establishing a network connection according to the received network establishment request, and performing communication.
[0153] For example, in one embodiment, it is assumed that the usage priority stored in the network factory module of the cellular data network is 1, the usage priority stored in the WIFI network factory module is 2, the usage priority stored in the Ethernet network factory module is 3, and the usage priority stored in the Bluetooth network factory module is 4. Assuming that the usage priority of the currently connected network sent by the connection management module received by each network factory module is 2, the usage priority stored in itself can be compared with the usage priority of the currently connected network. If it is greater than the usage priority of the currently connected network, the network factory module can send a network establishment request to the terminal device through the connection management module, that is, the network factory module of the cellular data network can send a network establishment request to the terminal device through the connection management module. After receiving the network establishment request sent by the network factory module of the cellular data network, the terminal device can communicate through the cellular data network.
[0154] In another embodiment, assuming that the usage priority of the currently connected network sent by the connection management module and received by each network factory module is 3, the network factory module of the cellular data network and the WIFI network factory module can send a network establishment request to the terminal device through the connection management module. After receiving the network establishment request sent by the network factory module of the cellular data network and the WIFI network factory module, the terminal device can use a network with a higher usage priority as the target network and establish a connection, that is, use the cellular data network as the target network and establish a connection, and communicate through the cellular data network.
[0155] In an embodiment of the present application, after determining the usage priority of each network in the target area, the usage priority of each network can also be converted into a corresponding priority score. For example, when the usage priority is 1, the priority score can be set to 90, when the usage priority is 2, the priority score can be set to 80, when the usage priority is 3, the priority score can be set to 70, and when the usage priority is 4, the priority score can be set to 30. Then, the priority score of the currently connected network is compared with the priority scores of each network in the target area to determine the target network, and the target network is used for communication.
[0156] Based on the same inventive concept, the present application also provides a network control device, such as Fig.19 As shown, the network control device includes:
[0157] An acquiring unit 1901 acquires network priority information of the target area when it is detected that the terminal device is located in the target area; the network priority information includes usage priorities of multiple different types of networks in the target area;
[0158] A selection unit 1902 selects a target network from a plurality of different types of networks according to the network priority information of the target area;
[0159] The communication unit 1903 uses the target network to communicate.
[0160] In a possible implementation manner, the selection unit 1901 is specifically configured to:
[0161] According to the network priority information of the target area, the network with the highest priority is used as the target network.
[0162] In a possible implementation manner, before the acquiring unit 1901, the device further includes a first processing unit 2001, such as Fig. 20 As shown, the first processing unit 2001 is specifically used for:
[0163] In response to the user's setting operation on the area center and the area radius in the area setting interface, generating a target area;
[0164] In response to a user's setting operation on usage priorities of a plurality of different types of networks in the target area, network priority information of the target area is generated.
[0165] In a possible implementation manner, before the acquiring unit 1901, the device further includes a second processing unit 2101, such as Fig.21 As shown, the second processing sheet 2101 is specifically used for:
[0166] Generate a target area according to the location information of the terminal device;
[0167] According to the network information of a plurality of different types of networks in the target area, the use priority of each network is determined, and the network priority information of the target area is generated.
[0168] In a possible implementation manner, the second processing unit 2101 is further configured to:
[0169] Before generating the target area according to the location information of the terminal device, the location information and network information of the terminal device are acquired in response to a trigger operation of the user on the information generation control.
[0170] In a possible implementation manner, the second processing unit 2101 is specifically configured to:
[0171] Determine a first area according to the first location of the terminal device and a preset area radius;
[0172] If the duration for which the terminal device is located in the first area reaches a set duration threshold, the first area is used as a target area.
[0173] In a possible implementation, the network information of the first network includes network speed information and network usage time information when the terminal device uses the first network for communication within a set time period, and the first network is any type of network among the multiple different types.
[0174] In a possible implementation manner, the second processing unit 2101 is specifically configured to:
[0175] The use priority of the first network is determined according to the network speed information and speed weight of the first network, and the network use time information and time weight of the first network.
[0176] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0177] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0178] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0180] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A terminal device, It is characterized in that include: Display, memory and processor; The display is configured to: display an interface of the terminal device when it is running; The memory is configured to: store programs or data used by the terminal device; The processor is configured to: When it is detected that the terminal device is located in the target area, the network priority information of the target area is obtained; the network priority information includes the use priority of multiple different types of networks in the target area; wherein the multiple different types of networks include cellular data networks, WIFI, Ethernet and Bluetooth; the processor is further configured to: generate the target area in response to the user's setting operation for the area center and the area radius in the area setting interface; generate the network priority information of the target area in response to the user's setting operation for the use priority of multiple different types of networks in the target area; wherein the processor is further configured to: display the center position selection interface in response to the user's input of the center position keyword in the area setting interface; the center position selection interface includes multiple candidate positions related to the center position keyword; in response to the user's click operation on the center position selection interface, determine the center position of the multiple candidate positions, and display the radius selection interface; the radius selection interface includes a radius selection box; in response to the user's click operation on the radius selection box, determine the target radius; generate the target area according to the center position and the target radius; or generating a target area according to the location information of the terminal device; determining the use priority of each network according to the network information of multiple different types of networks in the target area, and generating the network priority information of the target area; wherein the processor is further configured to: before generating the target area according to the location information of the terminal device, in response to a trigger operation of a user on an information generation control, obtain the location information and network information of the terminal device; the processor is specifically configured to: determine the first area according to the first location of the terminal device and a preset area radius; if the duration of the terminal device being in the first area reaches a set duration threshold, taking the first area as the target area; A target network is selected from a plurality of different types of networks according to the network priority information of the target area, and the target network is used for communication.
2. The terminal device according to claim 1, It is characterized in that The processor is specifically configured to: According to the network priority information of the target area, the network with the highest priority is used as the target network.
3. The terminal device according to claim 1, It is characterized in that The network information of the first network includes network speed information and network usage time information when the terminal device uses the first network for communication within a set time period; the first network is any one type of network among the multiple different types.
4. The terminal device according to claim 3, It is characterized in that The processor is specifically configured to: The use priority of the first network is determined according to the network speed information and speed weight of the first network, and the network use time information and time weight of the first network.
5. A network control method, It is characterized in that Applied to a terminal device, the method comprises: When it is detected that the terminal device is located in the target area, the network priority information of the target area is obtained; the network priority information includes the use priority of multiple different types of networks in the target area; wherein the multiple different types of networks include cellular data network, WIFI, Ethernet and Bluetooth; the target area and the network priority information of the target area are configured according to the following manner: in response to the user's setting operation for the area center and the area radius in the area setting interface, the target area is generated; in response to the user's setting operation for the use priority of multiple different types of networks in the target area, the network priority information of the target area is generated; wherein, in response to the user's setting operation for the area center and the area radius in the area setting interface, the generation of the target area includes: in response to the user's input of the center position keyword in the area setting interface, the center position selection interface is displayed; the center position selection interface includes multiple candidate positions related to the center position keyword; in response to the user's click operation on the center position selection interface, the center position of the multiple candidate positions is determined, and a radius selection interface is displayed; the radius selection interface includes a radius selection box; in response to the user's click operation on the radius selection box, the target radius is determined; the target area is generated according to the center position and the target radius; Or, a target area is generated according to the location information of the terminal device; based on the network information of multiple different types of networks in the target area, the use priority of each network is determined, and the network priority information of the target area is generated; wherein, before the target area is generated according to the location information of the terminal device, the location information and network information of the terminal device are obtained in response to a trigger operation of a user on an information generation control; the target area is generated according to the location information of the terminal device, including: determining a first area according to a first location of the terminal device and a preset area radius; if the duration of the terminal device being located in the first area reaches a set duration threshold, the first area is used as the target area; According to the network priority information of the target area, a target network is selected from a plurality of different types of networks; and the target network is used for communication.
6. A computer-readable storage medium having a computer program stored therein, Features: When the computer program is executed by a processor, the method according to claim 5 is implemented.
