CN114375025B - Networking management method for terminal and related product thereof - Google Patents

Networking management method for terminal and related product thereof Download PDF

Info

Publication number
CN114375025B
CN114375025B CN202111671453.3A CN202111671453A CN114375025B CN 114375025 B CN114375025 B CN 114375025B CN 202111671453 A CN202111671453 A CN 202111671453A CN 114375025 B CN114375025 B CN 114375025B
Authority
CN
China
Prior art keywords
network
terminal
networking
internet
wifi
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
CN202111671453.3A
Other languages
Chinese (zh)
Other versions
CN114375025A (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 Wanji Technology Co Ltd
Original Assignee
Beijing Wanji 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 Wanji Technology Co Ltd filed Critical Beijing Wanji Technology Co Ltd
Priority to CN202111671453.3A priority Critical patent/CN114375025B/en
Publication of CN114375025A publication Critical patent/CN114375025A/en
Application granted granted Critical
Publication of CN114375025B publication Critical patent/CN114375025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a networking management method for a terminal and a related product thereof. The networking management method comprises the following steps: responding to the fact that the terminal is successfully switched from a first network to a second network, and acquiring attribute information of the first network, wherein the second network is an Internet of things network; monitoring network utilization behavior of the terminal after the terminal is accessed to the second network; and selectively executing the network switching operation according to the network utilization behavior and the attribute information of the first network. According to the technical scheme, the networking mechanism of the terminal can be optimized, and the non-sensing network can be realized according to the user demands, so that the network utilization experience of the user is improved.

Description

Networking management method for terminal and related product thereof
Technical Field
The present invention relates generally to the field of terminal technology. More particularly, the present invention relates to a networking management method for a terminal, a terminal and a computer-readable storage medium for performing the aforementioned networking management method.
Background
This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein may include concepts that could be pursued, but are not necessarily ones that have been previously conceived or pursued. Accordingly, unless indicated otherwise, what is described in this section is not prior art to the description and claims of the present application and is not admitted to be prior art by inclusion in this section.
With the development of internet of things, many devices involved in daily work or life (such as a vehicle recorder or other vehicle-mounted devices arranged in a vehicle, and home devices such as a refrigerator and an air conditioner) can support the internet of things, so as to support sending out a WIFI hotspot through a WIFI module of the internet of things. WIFI hotspots of these internet of things devices are generally hotspots that are only interacted with by a local area network and cannot access the internet. In the actual application process, after the terminal (such as a device supporting an Android system) is connected with the hot spots, the terminal can only interact with the corresponding internet of things device and cannot access the external network. If other networks are needed, the user is relied on to manually repeat the network switching. It can be seen that the existing networking mechanism is imperfect, and complicated manual networking operation is required, so that the network utilization experience of the user is affected.
Disclosure of Invention
In order to solve at least the technical problems described in the background section above, the present invention proposes a solution for networking management of terminals. By utilizing the scheme of the invention, the networking mechanism of the terminal can be optimized, and the non-sensing network can be realized according to the user demand, thereby improving the network utilization experience of the user.
In view of this, the present invention provides a solution in a number of aspects as follows.
A first aspect of the present invention provides a networking management method for a terminal, the networking management method comprising: responding to the fact that the terminal is successfully switched from a first network to a second network, and acquiring attribute information of the first network, wherein the second network is an Internet of things network; monitoring network utilization behavior of the terminal after the terminal is accessed to the second network; and selectively executing the network switching operation according to the network utilization behavior and the attribute information of the first network.
In one embodiment, monitoring the network usage behavior of the terminal after accessing the second network includes: and jumping to a preset network direct connection function page, and calling a preset monitoring function to monitor the network utilization behavior.
In one embodiment, invoking a predetermined snoop function to snoop the networking behavior comprises: monitoring network interaction behaviors between a user and the terminal; and/or monitor the running state of the target application; and/or monitor network status information of the second network.
In one embodiment, selectively performing a network switching operation based on the network utilization behavior and attribute information of the first network includes: responding to the network utilization behavior meeting a preset condition, exiting the preset network direct connection function page, and determining the network type of the first network according to the attribute information; and executing corresponding network cutting operation according to the network type of the first network.
In one embodiment, wherein the network type of the first network comprises a non-wireless network, performing the respective network-cutting operation comprises: erasing networking information of the second network and disconnecting the connection with the second network; and in response to an unsuccessful disconnection, prompting to turn off the wireless communication function.
In one embodiment, wherein the network type of the first network includes a wireless network other than an internet of things network, performing the corresponding network-cutting operation includes: erasing networking information of the second network and disconnecting the connection with the second network; controlling the terminal to switch to the first network; and responsive to an unsuccessful handoff, prompting to turn off the wireless communication function.
In one embodiment, wherein the network type of the first network includes a target internet of things network, performing the corresponding network-cutting operation includes: erasing networking information of the second network and disconnecting the connection with the second network; erasing networking information of the first network; and prompting to shut down wireless communication functions in response to unsuccessful erasure of networking information of the first network.
In one embodiment, further comprising: and responding to abnormal exit of the target application program, and staying in an access state of the second network.
A second aspect of the present invention provides a terminal comprising: a processor; and a memory storing computer instructions for networking management of a terminal, which when executed by the processor, cause the terminal to perform the networking management method of the first aspect above and in embodiments below.
A third aspect of the invention provides a computer readable storage medium comprising computer instructions for networking management of a terminal, which when executed by the processor, cause the networking management method of the first aspect above and in embodiments below to be implemented.
By utilizing the scheme provided by the invention, the network utilization will of the user is accurately predicted through the network utilization behavior and the attribute information of the first network, and the corresponding network cutting operation is executed. The whole switching process does not need excessive intervention and complicated manual operation of a user, so that the networking mechanism of the terminal is optimized. And the non-sensing network can be realized according to the requirements of users, and the network utilization experience of the users is improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a diagram illustrating an exemplary scenario in which a terminal interacts with an Internet of things device according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a networking management method for a terminal according to one embodiment of the present invention;
fig. 3 is a flowchart illustrating a networking management method for a terminal according to another embodiment of the present invention;
fig. 4 is a flowchart illustrating a networking management method for a terminal according to still another embodiment of the present invention; and
Fig. 5 is a block diagram illustrating a structure of a networking management system for a terminal according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the present invention. All other embodiments, based on the embodiments of the invention, which a person skilled in the art would obtain without making any inventive effort, are within the scope of the invention.
It should be understood that the terms "first," "second," "third," and "fourth," etc. in the claims, specification and drawings of the present invention are used for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising" when used in the specification and claims of the present invention are taken to specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification and claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the term "and/or" as used in the present specification and claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a diagram illustrating an exemplary scenario 100 in which a terminal interacts with an internet of things device according to an embodiment of the present invention. It should be noted that, the terminal 101 in the solution of the present invention may include a tablet, a wearable smart device (e.g., a smart watch), a mobile phone, and other devices supporting a non-wireless network (e.g., a data network) and wireless networking. The internet of things device 102 may include internet of things devices having a WIFI module and supporting hotspot interaction, such as a vehicle-mounted device such as a vehicle recorder, a vehicle-mounted air conditioner, a vehicle-mounted refrigerator, and other internet of things devices involved in daily life or working process.
In scenario 100, terminal 101 may access a WIFI hotspot of internet of things device 102 to enable interaction between the two. Specifically, the terminal 101 may support a WIFI direct function. At terminal 101, its WIFI list is refreshed to obtain WIFI identification information (e.g., SSID or WIFI name). Then, it is determined whether the acquired WIFI identification information is a WIFI hotspot of the internet of things device 102 and whether the WIFI hotspot has a networking configuration file in the terminal 101. And when the network configuration file is stored and the WIFI hotspot of the internet of things device 102 is the WIFI hotspot of the internet of things device 102, the control terminal 101 accesses the WIFI hotspot of the internet of things device 102. Thereby, the terminal 101 automatically accesses to the WIFI hotspot of the internet of things device 102. Of course, the user may also manually connect as desired. After the terminal 101 accesses to the WIFI hotspot of the internet of things device 102, the network usage will of the user can be estimated according to the network usage behavior under the internet of things network, so as to perform automatic network switching operation. The specific implementation process can refer to fig. 2.
Fig. 2 is a flowchart illustrating a method 200 of networking management for a terminal according to one embodiment of the present invention. It should be noted that the terminal herein may have the general functions of the terminal described in fig. 1, and may be further optimized and enhanced by the method 200.
As shown in fig. 2, at step S201, in response to determining that the terminal is successfully handed over from the first network to the second network, attribute information of the aforementioned first network may be acquired. The second network is an internet of things network (i.e. a WIFI hotspot of the internet of things device described in fig. 1). Specifically, attribute information (e.g., network identification, network name, or other attribute information, etc.) of the first network may be recorded by accessing the network connection page. In some embodiments, the specific implementation of the terminal switching from the first network to the second network may be referred to the relevant description in fig. 1. For example, the WIFI list may be refreshed to obtain WIFI identification information, and upon determining that the WIFI identification information is about the second network and is related to a networking profile of the second network, the second network may be switched to based on the networking profile. Alternatively, the switching to the second network may also be performed manually by the user.
Next, at step S202, the network usage behavior of the terminal after accessing the second network may be monitored. The network usage behavior here is understood to include network usage behavior between man-machine with respect to the second network and network usage behavior inside the terminal with respect to the second network. The network utilization behavior can assist in predicting network utilization will of users, so that guarantee is provided for realizing non-inductive network switching subsequently.
Next, at step S203, a cut operation may be selectively performed according to the aforementioned network usage behavior and attribute information of the first network. Based on the network utilization behavior and the attribute information of the first network, the network utilization willingness of the user is accurately predicted, and corresponding network cutting operation is executed. The whole switching process does not need excessive intervention and complicated manual operation of a user, so that the networking mechanism of the terminal is optimized. And the non-sensing network can be realized according to the requirements of users, and the network utilization experience of the users is improved.
Further, in some embodiments, during the handover from the first network to the second network, if the handover fails, the automatic networking may be periodically initiated by a timer until the handover to the second network is successful. And if the switching to the second network is not successful finally, carrying out alarm prompt. For example, a "connection failure" may be output requesting a retry after the check-! Prompt information such as "etc. so that the user can know the situation in time.
Fig. 3 is a flowchart illustrating a method 300 of networking management for a terminal according to one embodiment of the present invention. It should be noted that the terminal herein may have the general functions of the terminal described in fig. 1, and may be further optimized and enhanced by the method 300. In addition, the method 300 may be understood as a further definition and supplement to the method 200. Thus, the detailed description hereinbefore with reference to fig. 2 applies equally as well to the following.
As shown in fig. 3, at step S301, attribute information of the first network may be acquired in response to determining that the terminal is successfully handed over from the first network to the second network. The acquiring process of the attribute information and the network cutting process of the terminal may refer to the description related to step 201 in fig. 2, which is not described herein.
Next, at step S302, a predetermined network direct function page may be skipped and a predetermined monitor function may be invoked to monitor the network behavior. In some embodiments, the aforementioned predetermined listening function may comprise startWifiMonitor () function in AWIFIMANAGER tools. Specifically, the network interaction behavior between the user and the terminal, the running state of the target application program, and/or the network state information of the second network, etc. can be monitored through the startWifiMonitor () function.
For example, in some embodiments, it may be monitored whether the user has an operation to close a specified web page (e.g., an internet of things web setup page), or other interactive behavior that embodies the user's intent to use the internet. In other embodiments, network status information such as whether an outage or other condition has occurred in the second network may be monitored. In still other embodiments, the running state of the target application (e.g., WIFI operating APP or operating APP of the internet of things device, etc.) may also be monitored. For example, it is monitored whether these APP's enter a background running state. It should be noted that, the monitoring of various network behaviors may be performed simultaneously, or may be performed only for a part of behaviors, and may be specifically adjusted according to design requirements. In addition, the description of the monitoring means of network behavior and the monitored network behavior is merely an exemplary illustration, and the solution of the present invention is not limited thereto.
Next, at step S303, the predetermined network direct function page may be exited in response to the aforementioned network usage behavior satisfying the predetermined condition. And may determine a network type of the first network according to the attribute information, and perform a corresponding network cutting operation according to the network type of the first network. In some embodiments, the network type of the first network may include a non-wireless network, an internet of things network, a wireless network other than an internet of things network. In some embodiments, the predetermined network direct connection function page may be exited when an operation of closing the designated page is monitored, or when a target application program enters a background operation, or when a second network to which the terminal is connected is monitored to change, or the like. And executing corresponding network switching operation according to the network types of the first network, in particular, a wireless network of a non-wireless network or a non-internet of things network or a target internet of things network.
Specifically, in some embodiments, when it is determined that the network usage behavior meets the preset condition, it is indicated that the user has a network switching requirement, and if the first network is a non-wireless network, it may be predicted that the user does not have a wish to continue to use the wireless network. At this point, the networking information (e.g., networking password, etc.) of the second network may be erased and the connection with the second network may be broken. And upon determining that the disconnection was unsuccessful, the user may be prompted to turn off the wireless communication function. Therefore, the trouble caused by the fact that the wireless function is in an on state to enable the terminal to be continuously connected with the second network or other wireless networks can be effectively avoided.
In other embodiments, when it is determined that the network usage behavior meets the preset condition, it is indicated that the user has a network switching requirement, and if the first network is a wireless network other than the internet of things network, the user may be predicted to have a willingness to use other wireless networks. At this point, the networking information of the second network may be erased and the connection with the second network may be broken. Thereby effectively avoiding continuous self-connection with the second network. And the terminal can be controlled to be switched to the first network, and the network requirement of a user can be met without manual intervention of the user. In addition, when the unsuccessful handover to the first network is determined, the first network may fail, and the user may be prompted to close the wireless communication function at this time, so as to avoid that the terminal continues to connect to the failed network.
In still other embodiments, when it is determined that the network usage behavior meets the preset condition, it is indicated that the user has a network cutting requirement, and if the first network is a target internet of things network, the target internet of things network may be related to the second network (for example, all the target internet of things networks are named by adopting a certain rule), and specifically may be set according to the design and the use requirement. When the user has no use requirement on the second network, the user can be predicted to have no intention of continuing to use the Internet of things network. At this time, the networking information of the second network can be erased, the connection with the second network can be disconnected, and the networking information of the first network can be erased, so that the terminal is effectively prevented from continuing to connect with the first network and the second network. In addition, in the process, when the networking information of the first network or the second network is not successfully erased, the user can be prompted to close the wireless communication function.
Based on the method, the scheme of the invention can wipe out networking information of the WIFI hotspot of the internet of things equipment when the internet of things is not used, and simultaneously solves the problem that the terminal cannot access the internet due to automatic connection of the WIFI hotspot of the surrounding internet of things equipment. Furthermore, the network state before the WIFI hotspot of the Internet of things equipment is connected can be recorded, so that the effect of dynamically switching the network of the terminal equipment when the WIFI hotspot of the Internet of things equipment is not used is achieved. The whole process does not need excessive intervention of users, so that the non-inductive network switching is realized.
Fig. 4 is a flowchart illustrating a method 400 of networking management for a terminal according to one embodiment of the present invention. It should be noted that the terminal herein may have the general functions of the terminal described in fig. 1, and may be further optimized and enhanced by the method 400. Additionally, method 400 may be understood as one possible implementation of method 200 and method 300. Accordingly, the detailed description hereinbefore described with reference to fig. 2 and 3 applies equally to the following.
In the actual implementation process, the networking function in the scheme of the invention can be compatible and interacted with the management APP related to the WIFI existing in the terminal. Therefore, in the project design process, the version targetSdkVersion in the build. Gradle of the project development can be adjusted to be below version 29. Positioning, network and WIFI related rights can be added in the project development configuration manifest file androidmanfest. The network and the WIFI authority are the preconditions of networking and acquiring network variation of the terminal (particularly the terminal of the Android system). The positioning authority is a precondition that the terminal acquires the name of the WIFI hotspot. Generally, the positioning authority needs to be dynamically acquired above the Android system 6.0, and the positioning authority needs to be started in the Android system 9.0.
In some embodiments, the required tools may be prepared. For example, the encapsulated local cache SHAREPREFERENCES tools MySPUtils, event communication tools EventBus, rights request tools PermissionXUtils, and network status tools NetworkUtils, WIFI operations management classes AWIFIMANAGER. Specifically, the encapsulated local cache SHAREPREFERENCES tools MySPUtils may be used to save the WIFI names of the networks that are connected. The event communication tool EventBus is a third party library, which can simplify the asynchronous distribution processing of the communication among the components, and is mainly used for transmitting the event with the changed WIFI name in the scheme of the invention.
For rights requesting tools PermissionXUtils, which relate to android9.0 and above to obtain WIFI names, the GPS switch needs to be turned on first, so the positioning rights are requested after the GPS switch is turned on. The specific implementation logic is to skip to the system page to operate the GPS switch, and judge whether the GPS positioning switch is turned on in onActivityResult () of the Activity when returning. If the GPS positioning switch is turned on, the positioning authority is requested, and if the GPS positioning switch is not turned on, the GPS positioning switch is continuously prompted to be turned on. Furthermore, the android6.0 to 9.0 only needs to request the positioning authority.
For the network state tool NetworkUtils, it has a method getActiveNetworkInfo () to obtain active network information, which can be used to obtain whether the current network state is WIFI.
For WIFI operation management class AWIFIMANAGER, it has the following functions:
1) Method STARTSCAN of refreshing wifi list ().
2) Method getSSID () or GETWIFINAME () to obtain the WIFI name.
3) And a method isWifiBelowDevice for judging whether the WIFI hotspot is the WIFI hotspot of the Internet of things device.
4) And a method isWifiBelowDevice for judging whether the WIFI has a configuration file in the Android device and returning the configuration file.
5) Create WIFI profiles and return createWifiConfig (including STRING SSID, string password, WIFICIPHERTYPE, etc.).
6) And accessing a certain wifi hotspot connectWIFI (WifiConfiguration config).
7) The system wlan is turned off through closeWlan ().
8) And judging whether the APP runs in the foreground or not through isAppForeground.
9) And integrating the method startWifiMonitor () of starting monitoring and transmitting the WIFI name change event, wherein the internal logic is to acquire the WIFI name of the currently connected Internet of things device by using the local caching tool MySPUtils. The Timer is then started, and the Timer is cycled every predetermined N seconds (e.g., 3 seconds). In the internal circulation, whether the APP is located in the background can be judged first. If the Android device is in the background, the WIFI change event is sent by using the event communication tool EventBus, and if the Android device is not in the background, whether the Android device starts the WLAN function is continuously judged. If the WLAN function is not turned on, a WIFI change event is sent, and if the WLAN function is turned on, the above network status tool class NetworkUtils is continuously used to acquire the current network status and determine whether to acquire a null. And if the current network WIFI name is empty, returning to wait for the next cycle, and if the current network WIFI name is not empty, continuing to acquire the current network WIFI name of the Android device by using the WIFI operation management class AWIFIMANAGER. And judging whether the network state is WIFI and whether the current WIFI name is "< unknown ssid >", and if so, returning to wait for the next cycle. If not, continuing to judge whether the current WIFI name is the stored WIFI name of the internet of things device, if not, sending a WIFI variation event, and if so, maintaining connection.
10 Executing an operation method stopWifiMonitorAndChange () for canceling WIFI name monitoring and intelligent connection after receiving the WIFI name change event. The method internal logic includes closing startWifiMonitor () Timer first, obtaining a WIFI name of a first network (for example, network a) and a connected second network (for example, WIFI hotspot "network B" of an internet of things device) from a cache. And judging whether the WIFI name of the network A is "< unknown ssid >" or belongs to the naming rule of the Internet of things equipment. If so, the method isExsits is used for trying to inquire whether the Android device has the configuration, if so, the network configuration of the Android device is tried to be erased so as not to be automatically connected, and if the erasing fails, the system WLAN is closed. And continuing to execute the operation of acquiring the current network WIFI name of the Android device no matter whether the Android device succeeds or fails. After the acquisition, judging whether the current network WIFI name is the connected internet of things device WIFI name or "< unknown ssid >", if not, only prompting the user of "WIFI variation-quit the WIFI direct connection function". If yes, whether the name of the network A is configured in the Android device is obtained through isExsits (), if not, the network configuration of the WIFI name of the connected internet of things device is skipped, and if yes, the network configuration of the WIFI name of the connected internet of things device is erased. And then, attempting to switch to the previous network A, if the switching is successful, prompting that the WIFI is switched to the network A, and if the switching is failed, closing the system WLAN.
In some embodiments, a main page (MAINACTIVITY pages), a WIFI connection page (ConnectActivity pages), and a local area network direct operation page (WifiOperationActivity pages) may be created and registered in android management. In MAINACTIVITY, a button for entering the WIFI direct page may be set, and before clicking the button to enter ConnectActivity, the tool PermissionXUtils may be used to determine the acquisition of the authority, and jump to ConnectActivity pages when the authority is available. The current network state is recorded in ConnectActivity page initialization method OnCreate (). The current WIFI name may be saved by MySPUtils using AWIFIMANAGER, for example. AWIFIMANAGER may be invoked in the form of entering a WIFI-SSID name and password to periodically loop through this WIFI hotspot. And when the connection is successful, the WIFI name of the Internet of things equipment can be recorded and the WifiOperationActivity pages can be jumped. When a connection fails, a "connection failure" may be prompted. When the local area network direct connection operation page (for example, wifiOperationActivity page) is initialized, AWIFIMANAGER may be used to start a timer to perform monitoring on WIFI name changes, and register event communication tool EventBus and receive events of WIFI changes.
In some embodiments, the main page in the project is MAINACTIVITY, on which the entry for the WIFI connection function is provided (i.e., page ConnectActivity for performing WIFI connection operations). Upon entering the page ConnectActivity, the network a upon entering the page may be recorded using the Android cache tool SHAREPREFERENCES in the initial OnCreate () method. And the operations of destroying ConnectActivity pages after the WIFI of the connected internet of things equipment is successful, recording the WIFI (such as a network B) of the current internet of things equipment, entering the local area network direct connection operation page WifiOperationActivity, and then starting monitoring, judging and the like of the current WIFI network can be executed.
Specifically, if the previous network is in a state in which the WIFI function is not turned on (e.g., a data network state, a flight mode state, or a no network state), the WIFI function is turned off when the WIFI is directly connected without using the internet of things device (e.g., the user may be required to click "allow" on the Android10 and higher versions of the mobile phone to turn off the system WIFI function). If the previous network is connected with a non-Internet of things device WIFI hotspot, switching to the previous WIFI when the Internet of things device WIFI is not used for direct connection, and closing a system WIFI function when switching fails; if the previous network is connected with other internet of things device WIFI hotspots (the internet of things device WIFI hotspots conform to a specific naming rule), the operation of closing the system WIFI function is executed when the internet of things device WIFI is not used for direct connection.
In a specific implementation process, as shown in fig. 4, in step S401, a WIFI connection page may be entered to record the current network a. Next, at step S402, it may be determined whether the WIFI hotspot of the internet of things device is successfully connected with the APP. Specifically, the WIFI list may be refreshed, and the WIFI name may be obtained, and then whether the WIFI hotspot of the internet of things device is the WIFI hotspot and whether the corresponding networking configuration file exists is determined. If the network is determined to be the WIFI hotspot of the internet of things device and the corresponding networking configuration file exists, the WIFI hotspot network B automatically connected to the internet of things device can be performed based on the information, and the step S404 is continuously performed. If the connection to the network B is unsuccessful, step S403 is performed.
At step S403, the connection may be automatic using a timer. For example, the timer automatically attempts a connection every interval of time N over a period of time. When a connection fails, the connection may be prompted for failure.
Next, at step S404, an internet of things device hotspot (network B) may be recorded, and the operation page is jumped into a local area network direct connection, and the network behavior is monitored. Specifically, startWifiMonitor () of AWIFIMANAGER may be invoked for listening to the network behavior.
Next, at step S405, user interaction behavior between the user and the terminal is monitored. For example, whether a closing operation is performed on a designated page (e.g., an internet of things (internet) setting page, etc.) is monitored. When the closing operation is monitored, step S408 is performed.
Next, at step S406, the network status information of the network B is monitored. For example, monitor whether a disruption, change, etc. occurs in network B. When it is monitored that an interrupt, change, or the like occurs, step S408 is performed.
Next, at step S407, the running state of the target application is monitored. For example, monitor whether the target application enters background operation. When the entry into the background operation is monitored, step S408 is performed.
Next, at step S408, the lan direct operation page may be exited, and stopWifiMonitorAndChange () of AWIFIMANAGER is called to determine the type of "network a". When it is determined that "network a" is a non-wireless network, step S409 is performed. When it is determined that "network a" is a wireless network other than the internet of things network, step S410 is performed. When it is determined that "network a" is the target internet of things network, step S411 is executed.
Then, at step S409, the network information such as the password of the network B may be erased. And successfully disconnects network B. If the network B is not successfully disconnected, the wireless communication function is prompted to be closed. At step S410, the networking information such as the password of network B may be erased. Whether network B is successfully disconnected or not, the handover will continue to network a to successfully access network a. If the switching fails, the wireless communication function is prompted to be closed. In step S411, the network information such as the password of the network B may be erased. And successfully disconnects network B. If the network B is not successfully disconnected, the wireless communication function is prompted to be closed. Then, the networking information such as the password of the network A is erased so as to ensure that the network A cannot be automatically connected. And may prompt to shut down the wireless communication function upon determining that network a's networking information was not successfully erased.
And at step S412, when the target application exits abnormally (for example, exits abnormally due to forced killing, flashing back, etc.), the access state to the network B is remained.
The hotspot connected with the WIFI through the Android development code mode can be used for wiping out configuration information of the WIFI hotspot of the Internet of things equipment when the Android development code is not used, the problem that the Android cannot access the Internet due to automatic connection of the WIFI hotspot of the Internet of things equipment when the Android development code is around is solved. Furthermore, the network state before the WIFI hotspot of the Internet of things device is connected is recorded through the codes, the effect of dynamically switching the Android device network when the WIFI hotspot of the Internet of things device is not used can be achieved, and intelligent connection of the network is achieved.
Fig. 5 is a block diagram illustrating a structure of a networking management system 500 for a terminal according to an embodiment of the present invention. It should be noted that one possible exemplary execution carrier of the method described in connection with fig. 2 to 4 may be the terminal 501. Specifically, fig. 5 shows not only a terminal 501 of an embodiment of the present invention, but also peripheral devices and external networks thereof. The terminal 501 may obtain attribute information of the first network, monitor network behavior, perform a network switching operation, and so on, so as to implement the foregoing schemes of the present invention described in connection with fig. 2 to fig. 4.
As shown in fig. 5, the terminal 501 may include a CPU5011, which may be a general-purpose CPU, a special-purpose CPU, or other execution unit for information processing and program execution. Further, the terminal 501 may further include a mass storage 5012 and a read only memory ROM 5013, wherein the mass storage 5012 may be configured to store various kinds of data and various programs required for devices, and the ROM 5013 may be configured to store power-on self test for the terminal 501, initialization of various functional blocks in the system, a driver for basic input/output of the system, and data required for booting the operating system.
Further, the terminal 501 also includes other hardware platforms or components, such as the illustrated TPU (Tensor Processing Unit ) 5014, GPU (Graphic Processing Unit, graphics processor) 5015, FPGAs (Field Programmable GATE ARRAY, field programmable gate arrays) 5016 and MLU (Memory Logic Unit), memory logic unit) 5017. It will be appreciated that while various hardware platforms or components are shown in terminal 501, this is by way of example only and not limitation, and that one of ordinary skill in the art may add or remove corresponding hardware as desired. For example, the terminal 501 may include only a CPU as a well-known hardware platform and another hardware platform as a test hardware platform of the present invention.
The terminal 501 of the present invention also includes a communication interface 5018. Through this communication interface 5018 may also be connected to a local area network/wireless local area network (LAN/WLAN) 505, which in turn may be connected to a local server 506 or to the Internet ("Internet") 507 through the LAN/WLAN. Alternatively or additionally, the terminal 501 of the present invention may also be directly connected to the Internet or cellular network via the communication interface 5018 based on wireless communication technologies, such as third generation ("3G"), fourth generation ("4G"), or 5 th generation ("5G") wireless communication technologies. In some application scenarios, the terminal 501 of the present invention may also access a server 508 and possibly a database 509 of an external network as needed.
Peripheral devices of the terminal 501 may include a display device 502, an input device 503, and a data transmission interface 504. In one embodiment, the display device 502 may include, for example, one or more speakers and/or one or more visual displays. The input device 503 may include, for example, a keyboard, mouse, microphone, gesture-capturing camera, or other input buttons or controls configured to receive input of data or user instructions. The data transfer interface 504 may include, for example, a serial interface, a parallel interface, or a universal serial bus interface ("USB"), a small computer system interface ("SCSI"), serial ATA, fireWire ("FireWire"), PCI Express, and high definition multimedia interface ("HDMI"), etc., configured for data transfer and interaction with other devices or systems.
The CPU 5011, the mass memory 5012, the read only memory ROM 5013, the TPU 5014, the GPU 5015, the FPGA 5016, the MLU 5017, and the communication interface 5018 of the terminal 501 of the present invention can be connected to each other through a bus 5019, and data exchange with peripheral devices can be achieved through the bus. In one embodiment, through the bus 5019, the cpu 5011 may control other hardware components in the terminal 501 and its peripherals.
In operation, the processor CPU 5011 of the terminal 501 of the present invention may obtain corresponding network usage behavior and attribute information through the input device 503 or the data transmission interface 504, and invoke computer program instructions or codes stored in the memory 5012 to perform analysis operations of the network usage behavior and attribute information, so as to complete the network switching operation.
From the above description of the modular design of the present invention, it can be seen that the system of the present invention can be flexibly arranged according to the application scenario or requirement and is not limited to the architecture shown in the drawings. Further, it should also be appreciated that any module, unit, component, server, computer, or device that performs the operations of the examples of the invention may include or otherwise access a computer-readable medium, such as a storage medium, a computer storage medium, or a data storage device (removable) and/or non-removable) such as, for example, a magnetic disk, optical disk, or magnetic tape. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Based on this, the present invention also discloses a computer-readable storage medium having stored thereon computer-readable instructions for networking management of a terminal, which when executed by one or more processors, implement the methods and operations described above in connection with the accompanying drawings.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, changes, and substitutions will occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention. The appended claims are intended to define the scope of the invention and to cover such modular compositions, equivalents, or alternatives falling within the scope of the claims.

Claims (8)

1. A networking management method for a terminal, the networking management method comprising:
responding to the fact that the terminal is successfully switched from a first network to a second network, and acquiring attribute information of the first network, wherein the second network is an Internet of things network;
monitoring network utilization behavior of the terminal after the terminal is accessed to the second network; and
Selectively performing a network switching operation according to the network using behavior and attribute information of the first network,
The monitoring of the network utilization behavior of the terminal after the terminal is accessed to the second network comprises the following steps: jump to a preset network direct connection function page, call a preset monitoring function to monitor the network utilization behavior, and
Wherein invoking a predetermined listening function to listen for the network behavior comprises:
Monitoring network interaction behaviors between a user and the terminal; and/or
Monitoring the running state of a target application program; and/or
And monitoring network state information of the second network.
2. The networking management method of claim 1, wherein selectively performing a network-cutting operation based on the network-usage behavior and the attribute information of the first network comprises:
Responding to the network utilization behavior meeting a preset condition, exiting the preset network direct connection function page, and determining the network type of the first network according to the attribute information; and
And executing corresponding network cutting operation according to the network type of the first network.
3. The networking management method of claim 2, wherein the network type of the first network comprises a non-wireless network, and performing the corresponding cut-network operation comprises:
erasing networking information of the second network and disconnecting the connection with the second network; and
In response to an unsuccessful disconnection, the wireless communication function is prompted to be turned off.
4. The networking management method of claim 2, wherein the network type of the first network comprises a wireless network other than an internet of things network, and performing the corresponding cut-network operation comprises:
Erasing networking information of the second network and disconnecting the connection with the second network;
controlling the terminal to switch to the first network; and
In response to an unsuccessful handoff, the wireless communication function is prompted to be turned off.
5. The networking management method of claim 2, wherein the network type of the first network comprises a target internet of things network, and performing the corresponding cut-network operation comprises:
Erasing networking information of the second network and disconnecting the connection with the second network;
Erasing networking information of the first network; and
And prompting to close the wireless communication function in response to unsuccessful erasing of the networking information of the first network.
6. The networking management method of claim 1, further comprising:
And responding to abnormal exit of the target application program, and staying in an access state of the second network.
7. A terminal, comprising:
A processor; and
A memory storing computer instructions for networking management of a terminal, which when executed by the processor, cause the terminal to perform the networking management method of any of claims 1-6.
8. A computer readable storage medium containing program instructions for networking management of a terminal, which when executed by a processor, cause the networking management method according to any of claims 1-6 to be implemented.
CN202111671453.3A 2021-12-31 2021-12-31 Networking management method for terminal and related product thereof Active CN114375025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111671453.3A CN114375025B (en) 2021-12-31 2021-12-31 Networking management method for terminal and related product thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111671453.3A CN114375025B (en) 2021-12-31 2021-12-31 Networking management method for terminal and related product thereof

Publications (2)

Publication Number Publication Date
CN114375025A CN114375025A (en) 2022-04-19
CN114375025B true CN114375025B (en) 2024-05-03

Family

ID=81142425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111671453.3A Active CN114375025B (en) 2021-12-31 2021-12-31 Networking management method for terminal and related product thereof

Country Status (1)

Country Link
CN (1) CN114375025B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898804A (en) * 2015-10-29 2016-08-24 乐卡汽车智能科技(北京)有限公司 Network co-existing method, device and mobile terminal
CN107466077A (en) * 2017-07-24 2017-12-12 维沃移动通信有限公司 A kind of method for switching network and mobile terminal
CN107484219A (en) * 2017-08-24 2017-12-15 深圳双创科技发展有限公司 Terminal is switched to the method and terminal of cellular network from WiFi network
CN108259696A (en) * 2018-04-12 2018-07-06 珠海奔图电子有限公司 The electric terminal of imaging apparatus control method, device and application this method
CN108495348A (en) * 2018-01-31 2018-09-04 上海连尚网络科技有限公司 It is a kind of for the method for switching network of user equipment, equipment and medium
CN109041270A (en) * 2018-09-14 2018-12-18 珠海奔图电子有限公司 A kind of method and apparatus of the network connection of controlling terminal
WO2019015607A1 (en) * 2017-07-18 2019-01-24 惠州Tcl移动通信有限公司 Network switching method, intelligent terminal, and device having storage function
CN112272393A (en) * 2020-08-28 2021-01-26 广西东信易联科技有限公司 Method for intelligently switching networks of mobile Internet of things platform
CN113490255A (en) * 2013-12-03 2021-10-08 华为终端有限公司 Network switching method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019097071A (en) * 2017-11-24 2019-06-20 キヤノン株式会社 Communication device, control method of the same, and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113490255A (en) * 2013-12-03 2021-10-08 华为终端有限公司 Network switching method and terminal
CN105898804A (en) * 2015-10-29 2016-08-24 乐卡汽车智能科技(北京)有限公司 Network co-existing method, device and mobile terminal
WO2019015607A1 (en) * 2017-07-18 2019-01-24 惠州Tcl移动通信有限公司 Network switching method, intelligent terminal, and device having storage function
CN107466077A (en) * 2017-07-24 2017-12-12 维沃移动通信有限公司 A kind of method for switching network and mobile terminal
CN107484219A (en) * 2017-08-24 2017-12-15 深圳双创科技发展有限公司 Terminal is switched to the method and terminal of cellular network from WiFi network
CN108495348A (en) * 2018-01-31 2018-09-04 上海连尚网络科技有限公司 It is a kind of for the method for switching network of user equipment, equipment and medium
CN108259696A (en) * 2018-04-12 2018-07-06 珠海奔图电子有限公司 The electric terminal of imaging apparatus control method, device and application this method
CN109041270A (en) * 2018-09-14 2018-12-18 珠海奔图电子有限公司 A kind of method and apparatus of the network connection of controlling terminal
CN112272393A (en) * 2020-08-28 2021-01-26 广西东信易联科技有限公司 Method for intelligently switching networks of mobile Internet of things platform

Also Published As

Publication number Publication date
CN114375025A (en) 2022-04-19

Similar Documents

Publication Publication Date Title
US20200364957A1 (en) Automobile diagnosis instrument, method for running system of automobile diagnosis instrument and automobile diagnosis system
US9003431B2 (en) Method and system for implementing function extension of open platform
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
CN109559583B (en) Fault simulation method and device
US10779178B1 (en) Systems and methods of using network slicing for test platform
KR20120030559A (en) System and method for switching between environments in a multi-environment operating system
CN111045901A (en) Container monitoring method and device, storage medium and electronic equipment
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
CN111132382A (en) Connection mode control method, terminal and storage medium
CN111757305A (en) Switching method, device and system of service execution terminal and storage medium
CN110781080A (en) Program debugging method and device and storage medium
US11816200B2 (en) Terminal and method for managing launch of an application of a terminal
US8745681B2 (en) Set top box resource allocation for executing a widget
CN114375025B (en) Networking management method for terminal and related product thereof
CN112888026B (en) Redirection failure processing method and device, electronic equipment and readable storage medium
CN106686627B (en) WiFi/hotspot starting method and device
EP3962180A1 (en) Network-based control method for power consumption of applications, terminal and storage medium
US20230273801A1 (en) Method for configuring compute mode, apparatus, and computing device
CN113840313B (en) Network mode control method and device of mobile terminal and computer equipment
CN111045789A (en) Virtual machine starting method and device, electronic equipment and storage medium
CN114449030A (en) Internet service system, method, electronic equipment and storage medium
CN115080158A (en) Interface display method and device, terminal equipment and computer readable storage medium
CN112035133A (en) Homepage upgrading method and terminal
US20200229247A1 (en) Network management method, wireless access device, terminal, system and storage medium
CN110019535B (en) Database management method, database management device, storage medium and computer equipment

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