Network connection method and device
By responding to trigger events of network connection changes in the electronic device, the electronic device is controlled to be in the target network state, which solves the problem of users still connecting to the network after actively disconnecting from the wireless network, realizes the function of automatically managing network connections, and simplifies user operations. .
Patent Information
- Application Number
- CN202410792661.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-08-30
AI Technical Summary
In the existing technology, after the user actively disconnects the wireless network, the system cannot effectively disconnect the network that has been set to automatically connect, resulting in the problem of still connecting to the network after the network is disconnected.
By implementing a network connection method in an electronic device, in response to the electronic device disconnecting the currently connected network, the trigger event that causes the network connection to change is determined, and based on the event, the electronic device is controlled to be in a target network state, including a disconnected state, Maintain the currently connected second network or perform network reconnection.
There is no need for users to change the connection attributes of each network one by one, and network connections are automatically managed, avoiding the trouble of still being connected to the network after actively disconnecting, simplifying network connection management, and improving user experience.
Smart Images

Figure CN118574247A
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to the field of network technology, and in particular to a network connection method and device. Background Art
[0002] At present, with the development of network connections of electronic devices, an automatic connection function of wireless networks has emerged. In this way, after the current wireless network is disconnected, the system uses the automatic connection function to connect to the network set as the automatic connection function in the network configuration page. However, in the case where the user actively disconnects the network, there is a problem of still connecting to the network after the network is disconnected. Summary of the invention
[0003] In view of this, the embodiments of the present application at least provide a network connection method and device.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] On the one hand, an embodiment of the present application provides a network connection method, including: in response to an electronic device disconnecting from a currently connected first network, determining a triggering event that causes a change in the network connection of the electronic device; based on the triggering event, controlling the electronic device to be in a target network state, wherein the target network state includes any one of the following: being in an offline state; maintaining a currently connected second network; or, reconnecting the network.
[0006] On the other hand, an embodiment of the present application provides a network connection device, including: a determination module, used to determine a triggering event that causes a change in the network connection of the electronic device in response to the electronic device disconnecting from the currently connected first network; a control module, used to control the electronic device to be in a target network state based on the triggering event, wherein the target network state includes any one of the following: being in a disconnected state; maintaining the currently connected second network; or, reconnecting the network.
[0007] On the other hand, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.
[0008] On the other hand, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements part or all of the steps in the above method when executed by a processor.
[0009] On the other hand, an embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is executed in an electronic device, a processor in the electronic device executes some or all of the steps for implementing the above method.
[0010] On the other hand, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, it implements some or all of the steps in the above method.
[0011] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] 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 are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0013] Figure 1 A schematic diagram of a network connection method according to an embodiment of the present invention;
[0014] Figure 2 A schematic diagram of an automatic connection function of a computer provided in an embodiment of the present application;
[0015] Figure 3A A schematic diagram of the implementation process of a computer network connection method provided in an embodiment of the present application Figure 1 ;
[0016] Figure 3B A schematic diagram of the implementation process of a computer network connection method provided in an embodiment of the present application Figure 2 ;
[0017] Figure 3C A schematic diagram of a computer network recovery method according to an embodiment of the present application;
[0018] Figure 4 A schematic diagram of the structure of a network connection device provided in an embodiment of the present application;
[0019] Figure 5 A hardware entity schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0021] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0022] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are merely to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0023] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those skilled in the art in the field to which the embodiments of the present application belong. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0024] At present, with the development of network connections of electronic devices, an automatic connection function of wireless networks has emerged. In this way, after the current wireless network is disconnected, the system uses the automatic connection function to connect to the network set as the automatic connection function in the network configuration page. However, in the case where the user actively disconnects the network, there is a problem of still connecting to the network after the network is disconnected.
[0025] The present application provides a network connection method, which can be executed by a processor of an electronic device. The electronic device may refer to a server, a laptop, a tablet computer, a desktop computer, a smart TV, a set-top box, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, a portable gaming device), or other device with data processing capabilities. Figure 1 As shown, the method may include step S101 and step S102:
[0026] Step S101: in response to the electronic device disconnecting from the first network currently connected, determining a triggering event causing a change in the network connection of the electronic device;
[0027] Here, the first network may be a network type of a wired network and a wireless network, for example, the first network may be a WIFI, a Bluetooth, a WLAN or a mobile communication network.
[0028] Changes in network connection may include changes in network connection caused by a user manually disconnecting the network and changes in network connection caused by a device automatically disconnecting the network. Therefore, changes in network connection caused by two different operations correspond to two different types of trigger events, namely active disconnection event type and passive disconnection event type. The active disconnection event type may refer to an event in which the electronic device is disconnected from the network due to an active operation by the user or by the user modifying the network configuration parameters of the electronic device. The passive disconnection event type may refer to an event in which the electronic device is automatically disconnected from the network due to changes in the network environment, abnormalities or failures in the device network module, etc.
[0029] In some embodiments, the triggering event that causes the change in the network connection of the electronic device may be determined based on the network event information occurring on the electronic device; the triggering event that causes the change in the network connection of the electronic device may be determined based on the operation data of the electronic device; or the triggering event that causes the change in the network connection of the electronic device may be determined based on the behavior data of the target user.
[0030] Step S102: Controlling the electronic device to be in a target network state based on the trigger event, wherein the target network state includes any one of the following:
[0031] The network is disconnected;
[0032] Maintain the currently connected second network; or,
[0033] Reconnect to the network.
[0034] In some implementations, the electronic device may be controlled to be in the target network state based on the type and / or source of the triggering event. For example, the electronic device may be controlled to be in the target network state based on the type of the triggering event; the electronic device may be controlled to be in the target network state based on the source of the triggering event; or the electronic device may be controlled to be in the target network state based on the source and type of the triggering event.
[0035] In some embodiments, the electronic device may support dual network connections. For example, the electronic device may simultaneously support dual network connections of WiFi and WLAN, and may also simultaneously support dual network connections of WiFi1 and WiFi2, and may also simultaneously support dual network connections of WiFi and mobile communication networks such as 4G / 5G.
[0036] In some embodiments, when the electronic device is connected to the first network and the second network at the same time, if the first network is disconnected, the electronic device can perform an operation to continue to maintain the connection with the second network based on the trigger event type and / or source of disconnecting the first network.
[0037] For example, when the electronic device is simultaneously connected to WiFi and WLAN, when WiFi is disconnected, the electronic device may decide to maintain the connection to WLAN based on the type and / or source of the trigger event that disconnects WiFi; when the electronic device is simultaneously connected to WiFi1 and WiFi2, when WiFi1 is disconnected, the electronic device may decide to maintain the connection to WiFi2 based on the type and / or source of the trigger event that disconnects WiFi1; when the electronic device is simultaneously connected to WiFi and 4G / 5G, when 4G / 5G is disconnected, the electronic device may decide to maintain the connection to WiFi based on the type and / or source of the trigger event that disconnects 4G / 5G.
[0038] In some embodiments, when the electronic device is connected to a first network and a second network at the same time, when the first network is disconnected, the electronic device can further disconnect from the second network based on the type and / or source of the triggering event for disconnecting the first network, so that the electronic device is in an offline state.
[0039] In an embodiment of the present application, based on a trigger event caused by a change in the network connection of an electronic device, the type and / or source of the trigger event can be determined, and thus based on the types and / or sources of different trigger events, the target network state of the electronic device corresponding to each type and / or source can be determined. In this way, the electronic device can automatically match the corresponding target network state according to the type and / or source of the trigger event, without the user having to manually change the network state of the electronic device, and also avoiding the problem of the user still being connected to the network after actively disconnecting the wireless network.
[0040] In some embodiments, the above step S102, controlling the electronic device to be in a target network state based on the trigger event, includes steps S111 and S112:
[0041] Step S111: if the trigger event is generated by a target operation acting on the electronic device, controlling the electronic device to be disconnected from the network or to maintain the currently connected second network;
[0042] Here, the target operation can be one of the following operations: manual disconnection operation of the first network, configuration operation of the automatic connection option, configuration operation of the network switch, configuration operation of network modules such as a network card, configuration operation of the network interface, configuration operation of the network mode, etc.
[0043] In some embodiments, when the trigger event is generated by a target operation acting on the electronic device, the type of the trigger event can be determined to be an active disconnection event type. When the type of the trigger event is an active disconnection event type, the electronic device is controlled to be in a disconnected state or maintain the currently connected second network.
[0044] In some embodiments, when the electronic device supports dual network connections, the electronic device is connected to a first network and a second network at the same time. When the first network is disconnected, the electronic device can disconnect from the second network, so that the electronic device is in an offline state; it can also continue to maintain the connection to the second network, so that the electronic device is still in a connected state.
[0045] In some implementations, when the electronic device supports a single network connection, after the first network is disconnected, the electronic device is in an off-network state.
[0046] Step S112: If the triggering event is not related to the target operation, control the electronic device to switch from the first network to a third network or reconnect to the first network.
[0047] In some embodiments, the triggering event is unrelated to the target operation and may include: an abnormality or failure occurs in the first network communication module of the electronic device executing the first network connection; the first network is disconnected due to changes in the external network environment, such as an abnormality or failure occurs in the provider end of the first network; other devices are connected to the first network, causing the first network connection of the electronic device to be squeezed out by other devices; the network connection of the electronic device is affected by the network setting operation acting on other devices; the distance between the electronic device and the first network provider end changes or the radiation power of the first network provider end changes, etc.
[0048] In some embodiments, when the trigger event is irrelevant to the target operation, the type of the trigger event can be determined to be a passive disconnection event type. When the type of the trigger event is a passive disconnection event type, the electronic device is controlled to switch from the first network to the third network or reconnect to the first network.
[0049] In some embodiments, when the electronic device supports dual network connection, the electronic device is connected to the first network and the second network at the same time. When the first network is disconnected, the electronic device can be controlled to switch from the first network to the third network, and the electronic device can also be controlled to reconnect to the first network.
[0050] In some implementations, when the electronic device supports a single network connection, when the first network is disconnected, the electronic device can be controlled to switch from the first network to another network, and can also be controlled to reconnect to the first network.
[0051] For example, when the first network is WiFi1, the electronic device is controlled to switch from WiFi1 to WiFi2, from WiFi1 to a mobile communication network such as 4G / 5G, from WiFi1 to WLAN, or retry to connect to the first network.
[0052] The above embodiments respectively provide a target network state of the electronic device corresponding to when the type of triggering event for the network connection of the electronic device is an active disconnection event type, and a target network state of the electronic device corresponding to when the type of triggering event for the network connection of the electronic device is a passive disconnection event type. In this way, when the type of triggering event of the electronic device is determined, the network state of the electronic device can be switched to the target network state, thereby satisfying the user's demand for network connection of the electronic device.
[0053] In some embodiments, in the above step S101, determining the triggering event that causes the network connection of the electronic device to change includes at least one of steps S113 to S115:
[0054] Step S113: monitoring network event information occurring on the electronic device, and determining the type and / or source of the triggering event based on the network event information;
[0055] Here, the network event information may be information related to the current network status of the electronic device, and may include network disconnected event information, network disconnecting event information, wireless network card event information, wireless network switch status change event information, etc.
[0056] In some implementations, the type of triggering event can be determined based on the network event information, and the source of the triggering event can also be determined. The types of triggering events include active disconnection event types and passive disconnection event types, and the sources of triggering events include three types, namely, the user actively disconnects from the current network, the network module on which the current network of the device depends is abnormal or faulty, and the network abnormality of the first network, wherein the network abnormality of the first network can be an abnormality or fault of the provider end of the first network, or a change in the distance between the provider end of the first network and the first network, etc.
[0057] Step S114: monitoring operation data acting on the electronic device, and determining the type and / or source of the trigger event based on the operation data;
[0058] Here, the operation data of the electronic device may include operations for configuring the automatic connection main switch, operations for disconnecting the currently connected network, operations for configuring network connection parameters, operations for configuring the network mode, operations for controlling the running applications of the electronic device, operations for controlling the running mode of the electronic device, operations for controlling the usage form of the electronic device, etc.
[0059] In some implementations, the type of the triggering event may be determined based on the operation data of the electronic device, and the source of the triggering event may also be determined.
[0060] Step S115: Monitor the behavior data of the target user, and determine the type and / or source of the triggering event based on the behavior data.
[0061] In some embodiments, it is possible to determine whether the action object of the behavior data is related to the network of the electronic device based on the behavior data of the current user of the electronic device. If the action object of the behavior data is not related to the network of the electronic device, it is determined that the triggering event is caused by a change in the network environment or a failure of the network module of the device itself; if the action object of the behavior data is related to the network of the electronic device, for example, the action object of the behavior data is a network connection parameter, a network mode, etc., the target network state of the electronic device can be determined based on the action object of the behavior data.
[0062] In some implementations, the type of the triggering event may be determined based on the behavior data of the target user, and the source of the triggering event may also be determined.
[0063] In the above embodiments, the type and / or source of the triggering event of the electronic device can be determined based on the acquired network event information, the operation data of the electronic device and the behavior data of the target user, so that after the type and / or source of the triggering event is determined, the corresponding target network state can be matched based on the type and / or source of the triggering event.
[0064] In some embodiments, the above step S113, determining the type and / or source of the triggering event based on the network event information, may include at least one of the following steps S1131 to S1134:
[0065] Step S1131: if the network event information includes a disconnection process of the first network, determining that the trigger event is generated from a first target operation for disconnecting the first network acting on the electronic device;
[0066] Here, the first target operation may be a manual operation or other input operation to disconnect the first network. For example, the user may disconnect the first network by voice control of the electronic device, by gesture control of the electronic device, or by manually controlling the mouse.
[0067] In some implementations, the network disconnection process can be determined based on the network disconnection event information and the network disconnection event information.
[0068] In some implementations, it may be determined that the triggering event is generated from a first target operation for disconnecting the first network, which is performed on the electronic device, based on the network connecting event information of the first network and the network disconnected event information of the first network.
[0069] In some embodiments, when the network event information in the network event information is a network disconnected event, it is determined whether a network disconnecting event has occurred; when it is determined that a network disconnecting event has occurred, it is determined that the triggering event is generated from a first target operation acting on the electronic device for disconnecting the first network.
[0070] In some implementations, when it is determined that the trigger event is generated from a first target operation acting on the electronic device for disconnecting from the first network, the type of the trigger event can be determined to be an active disconnection event type, and the source of the trigger event is the user actively disconnecting from the current network.
[0071] Step S1132: if the network event information includes a change in the network mode of the electronic device or a change in a network interface configuration parameter, determining that the trigger event is generated from a second target operation acting on the electronic device;
[0072] Here, the second target operation may be a manual operation or other input operation to modify the network configuration of the electronic device. For example, the user may modify the network configuration of the electronic device through voice control, gesture control, or manually control the mouse to modify the network configuration of the electronic device. The network configuration may include modification of the network mode and modification of the network interface parameters. For example, modification of the network mode may include modification of the configuration of the network flight mode, modification of the configuration of the wireless network card, etc.; modification of the network interface parameter configuration may include modification of the configuration of the wireless network switch, modification of the configuration of enabling or disabling the wired network card, etc.
[0073] In some embodiments, when the wireless network card event information corresponding to the network mode of the electronic device is disabled, it is determined that the trigger event is generated from the second target operation for disconnecting the first network acting on the electronic device. When the wireless network switch state event information corresponding to the wireless network switch configuration of the electronic device is closed, it is determined that the trigger event is generated from the second target operation for disconnecting the first network acting on the electronic device.
[0074] In some embodiments, when it is determined that the trigger event is generated by a second target operation acting on an electronic device for disconnecting from a first network, the type of the trigger event can be determined to be an active disconnection event type, and the source of the trigger event is a network card being configured, a network switch being configured, a network mode being configured, and the like.
[0075] It should be noted that the above-mentioned network card configuration, network switch configuration, network mode configuration, etc. are all manual operations or other input operations by the user, so the sources of the above-mentioned triggering events can also be collectively referred to as the user actively disconnecting from the current network.
[0076] Step S1133: if the network event information does not include the disconnection process of the first network and does not include changes in the network mode or network interface configuration parameters of the electronic device, it is determined that the triggering event is irrelevant to the target operation acting on the electronic device;
[0077] Here, the trigger event is caused by a failure of a network module of the electronic device or an abnormality of a network provider of the electronic device, and has nothing to do with the target operation.
[0078] In some embodiments, when it is determined that the trigger event is unrelated to the target operation, the type of the trigger event can be determined to be a passive disconnect event type, and the source of the trigger event can be an abnormality or failure of a network module on which the current network of the device depends, or a network abnormality of the first network.
[0079] Alternatively, the above step S114, determining the type and / or source of the trigger event based on the operation data, may include at least one of the following steps S1141 and S1142:
[0080] Step S1141: if the operation data is related to the network parameters for configuring the electronic device, determining that the trigger event is generated from a target operation acting on the electronic device;
[0081] Here, the network parameters of the electronic device may be any configuration operation that changes the network parameters of the electronic device, such as disconnecting the first network connection, turning off a wireless switch, disabling a network, and the like.
[0082] In some implementations, when it is determined that the change in the network parameters is related to the operating data acting on the electronic device, the type of the triggering event can be determined to be an active disconnection event type, and the source of the triggering event is the user actively disconnecting from the current network.
[0083] Step S1142: If the operation data is irrelevant to the network parameters for configuring the electronic device, it is determined that the triggering event is irrelevant to the target operation acting on the electronic device.
[0084] Here, the trigger event may be caused by a failure of a network module of the electronic device or an abnormality of a network provider of the electronic device, and has nothing to do with the target operation.
[0085] In some embodiments, when it is determined that the trigger event is unrelated to the target operation, the type of the trigger event can be determined to be a passive disconnect event type, and the source of the trigger event can be an abnormality or failure of a network module on which the current network of the device depends, or a network abnormality of the first network.
[0086] In the above embodiments, methods for determining the type and / or source of a triggering event of an electronic device based on two data types, namely, network event information and operation data of the electronic device, are provided respectively. Thus, after a change occurs in the network connection of the electronic device, the corresponding method for determining the type and / or source of a triggering event of the electronic device can be matched based on the data type of the acquired data to obtain the type and / or source of the triggering event of the electronic device.
[0087] In some embodiments, the above step S102, controlling the electronic device to be in a target network state based on the trigger event, includes:
[0088] Step S116: Outputting corresponding prompt information based on the source of the trigger event, so as to control the electronic device to be disconnected from the network, maintain the currently connected second network, or reconnect to the network based on feedback information to the prompt information.
[0089] In some embodiments, based on the source of the triggering event, it can be divided into the user actively disconnecting the current network, the network module on which the current network of the device depends is abnormal or faulty, and the network abnormality of the first network, wherein the network abnormality of the first network can be an abnormality or fault of the provider of the first network, or a change in the distance between the provider of the first network and the first network, etc. The prompt information can be a recommendation prompt on whether to disconnect all networks connected to the electronic device, whether to maintain the current network connection state, whether to switch networks, and whether to reconnect to the first network.
[0090] In some embodiments, when the source of the trigger event is the user actively disconnecting the current network, the corresponding prompt information can be whether to disconnect all networks connected to the electronic device, whether to maintain the current network connection status, and can also be a recommendation prompt whether to switch networks.
[0091] In some embodiments, when the source of the trigger event is an abnormality or failure of a network module on which the current network of the device depends, the corresponding prompt information may be whether to disconnect all networks connected to the electronic device, or may be a recommendation prompt for network switching.
[0092] In some embodiments, when the source of the trigger event is a network anomaly of the first network, the corresponding prompt information can be whether to disconnect all networks connected to the electronic device, a recommendation prompt on whether to switch networks, or a prompt on whether to reconnect the network.
[0093] In some embodiments, the above step S116, based on the feedback information of the prompt information, controls the electronic device to be disconnected from the network, maintain the currently connected second network, or reconnect the network, includes at least one of the following steps S1161 to S1164:
[0094] Step S1161: if the trigger event belongs to the first type of trigger event, output a first prompt message, and control the electronic device to be disconnected from the network or maintain the currently connected second network based on first feedback information for the first prompt message;
[0095] Here, the first type of trigger event refers to an event in which the source of the trigger event is an event in which the user actively disconnects from the current network; the first prompt information may be whether to disconnect all networks connected to the electronic device and whether to maintain the current network connection status.
[0096] In some embodiments, when the prompt information is whether to disconnect all networks connected to the electronic device, and the user chooses to disconnect all networks connected to the electronic device, the electronic device is controlled to be in an offline state, including further disconnecting other networks connected to the electronic device, such as if the electronic device is connected to WiFi1 and WiFi2 at the same time, a prompt message is output after WiFi1 is disconnected, and WiFi2 is disconnected based on the user's choice to disconnect all networks connected to the electronic device; or if WiFi1 and WLAN are connected at the same time, a prompt message is output after WiFi1 is disconnected, and WLAN is disconnected based on the user's choice to disconnect all networks connected to the electronic device.
[0097] In some embodiments, when the prompt information is whether to maintain the current network connection state, the user chooses to maintain the current network connection state, and the electronic device is controlled to be in the current network connection state. For example, if the electronic device is connected to WiFi1 and WiFi2 at the same time, a prompt message is output after WiFi1 is disconnected, and based on the user's choice to maintain the current network connection state, the connection to WiFi2 is maintained; or if WiFi1 and WLAN are connected at the same time, a prompt message is output after WiFi1 is disconnected, and based on the user's choice to maintain the current network connection state, the connection to WLAN is maintained.
[0098] Step S1162: if the trigger event belongs to the first type of trigger event, output second prompt information, and control the electronic device to switch from the first network to a fourth network based on second feedback information for the second prompt information, where the fourth network is a network determined based on the second feedback information;
[0099] Here, the second prompt information may include a recommendation prompt for network switching.
[0100] In some embodiments, when the prompt information is a recommended prompt for network switching, the pop-up window displays network information that the first network can support switching to other networks, and the user can select the fourth network to be switched based on the network recommended in the prompt pop-up window. It should be noted that the fourth network can be the same as or different from the third network.
[0101] Step S1163: if the trigger event belongs to the second type of trigger event, output third prompt information, so as to control the electronic device to be in a disconnected state or control the electronic device to switch from the first network to a fifth network based on third feedback information for the third prompt information;
[0102] Here, the second type of trigger event refers to an event in which the source of the trigger event is an abnormality or failure of the network module on which the current network of the device depends. The third prompt information may include a prompt on whether to switch to another network module, and may also be a recommended prompt for network switching.
[0103] In some embodiments, when the prompt information is whether to switch to other network modules, when the user chooses to switch to other network modules, the current network module of the electronic device can be switched to an available network module acquired by the system; a pop-up window can also be displayed to display a list of network modules that can support switching, and the user can make a selection based on the list of switchable network modules displayed in the pop-up window, and based on the network module chosen by the user, the current network module of the electronic device is switched to the network module selected by the user; when the user chooses not to switch to other network modules, it is determined that the network of the electronic device is in a disconnected state.
[0104] In some embodiments, when the prompt information is a recommendation prompt for network switching, the pop-up window displays network information that the first network can support switching to other networks, and the user can select the fifth network to be switched according to the network recommended in the prompt pop-up window. It should be noted that the fifth network is a network that the network module currently available to the electronic device can connect to, such as a mobile network module or a Bluetooth module after an abnormality or failure of the WiFi network card. The fifth network may be the same as or different from the third network or the fourth network.
[0105] Step S1164: If the trigger event belongs to the third type of trigger event, output a fourth prompt message, and control the electronic device to switch from the first network to the sixth network, reconnect the network, or enter a disconnected state based on fourth feedback information for the fourth prompt message.
[0106] Here, the third type of trigger event refers to an event in which the source of the trigger event is a network anomaly of the first network. The fourth prompt information can be whether to disconnect all networks connected to the electronic device, a recommended prompt for network switching, or a prompt for whether to reconnect the network.
[0107] In some implementations, when the prompt information is whether to disconnect all networks connected to the electronic device, the user chooses to disconnect all networks connected to the electronic device, and determines that the electronic device is in an off-network state.
[0108] In some embodiments, when the prompt information is a recommendation prompt for network switching, the pop-up window displays network information that the first network can support switching to other networks, and the user can select the sixth network to be switched based on the network recommended in the prompt pop-up window. It should be noted that the sixth network is an available network determined based on the current location of the electronic device.
[0109] In some implementations, when the prompt information is whether to reconnect the network, if the user chooses to reconnect the network, the electronic device is controlled to reconnect to the first network.
[0110] In the above embodiments, prompt information corresponding to the sources of different trigger events is provided respectively, so that according to the pop-up prompt information of the electronic device, the user can control the electronic device to switch the network status according to the prompt information according to the network connection requirements, and control the electronic device to be in the target network status.
[0111] In some embodiments, the above step S102, controlling the electronic device to be in the target network state based on the trigger event, includes at least one of the following steps S117 and S118:
[0112] Step S117: determining a triggered target control based at least on the trigger event, and controlling the electronic device to be disconnected from the network, maintain the currently connected second network, or reconnect to the network based on the target control, wherein the target control is located in the same configuration interface or in different configuration interfaces;
[0113] Here, the target control may be an airplane mode switch, a wireless network master switch and a network master switch, an automatic connection master switch, a network switching switch, a network selection button, etc.
[0114] In some implementations, the target control may be a network configuration interface located on the electronic device, or a pop-up window interface of a prompt message triggered after the first network is disconnected.
[0115] In some implementations, when the target control includes at least one of an airplane mode switch, a wireless network master switch, and a network master switch, the target control may be a network configuration page located on the electronic device.
[0116] In some embodiments, when the target control includes an automatic connection main switch, the target control may be located on a network configuration interface of the electronic device, or may be a pop-up window interface of a prompt message triggered after the first network is disconnected.
[0117] In some implementations, when the target control includes a network switching switch or a network selection button, the target control may be located in a pop-up window interface of a prompt message triggered after the first network is disconnected.
[0118] Step S118: Obtain attribute information of the first network, and control the electronic device to be disconnected from the network, maintain the current second network, or reconnect to the network based on the attribute information and the trigger event.
[0119] Here, the attribute information may include the network type, network name and the configured number of network connections, where the network type may include a wired network and a wireless network, and the wireless network may also include WiFi and a mobile communication network, etc.; the network name may be the network name of a network that the electronic device can detect and connect to and the network name of a network that the electronic device has historically connected to, for example, WiFi1 and WiFi2 represent wireless networks with different names respectively; the configured number of network connections can be used to distinguish whether the first network is a single-connection network or a multiple-connection network.
[0120] In the above embodiment, the user's behavior data can be obtained based on the user's operation on the target control, and the type and / or source of the trigger event can be determined based on the user's behavior data, so as to control the electronic device to be in the target network state based on the type and / or source of the trigger event.
[0121] In some embodiments, in the above step S117, controlling the electronic device to be disconnected from the network, maintaining the currently connected second network, or reconnecting to the network based on the target control includes at least one of the following steps S1171 to S1173:
[0122] Step S1171: If the target control is the first switch control on the first configuration interface, control the electronic device to be disconnected from the network or maintain the currently connected second network;
[0123] Here, the first configuration interface may be a network configuration interface of the electronic device, for example, when the electronic device is a computer, the network configuration interface may be an interface provided by the Microsoft system. The first switch control may include a wireless network master switch, an airplane mode switch, and a network master switch, wherein the network master switch and the airplane mode switch may be used to control the electronic device to disconnect from or connect to the network; the wireless master switch may be used to determine whether the wireless network is supported.
[0124] In some embodiments, when the main network switch is in the on state, the electronic device is controlled to be in a state supporting networking; when the main network switch is in the off state, the electronic device is controlled to be in a state disconnected from the network.
[0125] In some embodiments, when the airplane mode switch is in the on state, the electronic device is controlled to be in an off-network state; when the airplane mode switch is in the off state, the electronic device is controlled to be in an on-network state.
[0126] In some embodiments, when the wireless master switch is in the on state, the control electronic device supports connection to a wireless network and / or a wired network; when the wireless master switch is in the off state, the control electronic device supports connection to a wired network.
[0127] Step S1172: If the target control includes a second switch control on the first configuration interface or the second configuration interface, control the electronic device to switch from the first network to the seventh network or to be in a disconnected state;
[0128] Here, the second switch control may include an automatic connection main switch.
[0129] In some embodiments, when the automatic connection main switch is in the first configuration interface, a control for implementing the automatic connection main switch function can be added based on the first configuration interface; when the automatic network connection main switch is in the second configuration interface, it can be a system pop-up window interface, and the pop-up window interface includes a control for implementing the automatic connection network main switch function.
[0130] Step S1173: If the target control includes a selection control on the first configuration interface or the third configuration interface, control the electronic device to switch from the first network to an eighth network pointed to by the selection control.
[0131] Here, the selection control may include a network switching control and a network selection control.
[0132] In some implementations, a network switching control or a network selection control may be added to a pop-up window whose content is a recommendation prompt for network switching.
[0133] In some embodiments, in the above step S118, controlling the electronic device to be disconnected from the network, maintain the current second network, or reconnect to the network based on the attribute information and the trigger event includes at least one of the following steps S1181 and S1182:
[0134] Step S1181: if the attribute information indicates that the first network is used for a single connection, controlling the electronic device to be in a disconnected state;
[0135] Here, the case of temporarily connecting to the network is described. In the case of a single connection to the first network, after the first network is disconnected, the first network is not reconnected.
[0136] In some implementations, for electronic devices supporting dual networks, the default setting can be to maintain the connection to the second network, and after the first network is disconnected, the electronic device is controlled to maintain the currently connected second network. Alternatively, whether to maintain the connection to the second network is determined based on the user's choice, for example, if the user chooses not to maintain the connection to the second network, the electronic device is controlled to disconnect the connection to the second network; if the user chooses to maintain the connection to the second network, the electronic device is controlled to maintain the currently connected second network.
[0137] Step S1182: If the attribute information indicates that the first network is used for multiple connections, based on the type of the first network and the source of the triggering event, the electronic device is controlled to be disconnected from the network, maintain the current second network, or perform network reconnection.
[0138] Here, the case of a non-temporary network connection is explained. In the case where the first network is connected multiple times, first, the type of the first network can be determined, wherein the type of the first network is distinguished based on whether the disconnection of the first network is manually disconnected by the user, and can be divided into a type in which the user manually disconnects the network and a type in which the device automatically disconnects the network. Therefore, based on the type of the first network, there are two different types of trigger events, namely, an active disconnection event type and a passive disconnection event type. Then, based on the type of trigger event corresponding to the type of the first network and the source of the trigger event, the electronic device is controlled to be in the target network state. Among them, if the type of the trigger event is an active disconnection event type, the electronic device can be controlled to be in a disconnected state or maintain the state of the currently connected second network. If the type of the trigger event is a passive disconnection event type, the electronic device can be controlled to be in a network reconnection state.
[0139] The network connection method is described below in conjunction with a specific embodiment. For ease of understanding, the electronic device is taken as an example of a computer. However, it is worth noting that this specific embodiment is only for better illustrating the present application and does not constitute an improper limitation on the present application.
[0140] At present, wireless network connection has gradually become the mainstream of computer network connection. In order to manage wireless networks and connections, operating systems will provide built-in tools or settings. Windows provides the function of "automatically connecting when in signal range" in the wireless management settings, such as Figure 2As shown, the wireless networks that can be detected on the WLAN 1 page include l1-internet 11, l2-5G 12, AuotTest 13 and TZVQWMU 14, wherein, by checking "Automatically connect 122 when in signal range" under l2-5G properties 121 in the l2-5G 12 network configuration interface, the l2-5G 12 network supports automatic connection. This function can automatically reconnect to the network with "Automatically connect" checked after the current network is disconnected. For example, after the l1-internet 11 network is disconnected, the computer can automatically connect to the l2-5G 12 network. However, there is the following problem: when the user manually disconnects from the network, if there is another network that has been set to "auto connect", the system will connect to the network set to "auto connect" in the wireless management page. If the user does not want the computer to connect to any network anymore, it is necessary to disconnect the "auto connect" networks one by one, which makes the operation more cumbersome. After manually disconnecting the network, the disconnected network will automatically uncheck the "auto connect" option. If the disconnected network is no longer configured for "auto connect", the user will not enjoy the convenience of the "auto connect" configuration.
[0141] The embodiment of the present application provides a network connection method, which controls the "automatic connection" of a wireless network through a main switch, such as Figure 3A As shown, the specific implementation includes steps S301 to S303:
[0142] Step S301: Obtaining network events of the computer;
[0143] Here, the network events that can be obtained include: disconnecting network connection event, network disconnected event, wireless network card event and wireless network switch status event.
[0144] It should be noted that only when the main switch of "automatic connection" that controls the wireless network is turned on, the computer's network events can be obtained and the triggering causes of the network events can be analyzed.
[0145] Step S302: Determine whether the network event is triggered by the computer automatically disconnecting from the network;
[0146] Here, whether the network event is triggered by the computer automatically disconnecting from the network is used as the basis for determining whether to restore the network. In the case where it is determined that the network event is triggered by the user manually disconnecting from the network, it is determined that the computer will not automatically reconnect to other networks; in the case where it is determined that the network event is triggered by the computer automatically disconnecting from the network, it is determined that the computer's network connection is restored.
[0147] In some embodiments, a method for determining whether each network event is triggered by a computer automatically disconnecting from the network is as follows: Figure 3BAs shown, it may include steps S3021 to S3027:
[0148] Step S3021: Determine that the network event is a network disconnection event;
[0149] Step S3022: when the network event is a network disconnection event, determining whether there is a network disconnection event of the network;
[0150] Here, if yes, proceed to step S3027 to determine whether the network event is triggered by the user manually disconnecting from the network; if no, proceed to step S3023 to determine whether the network event is triggered by the computer automatically disconnecting from the network.
[0151] It should be noted that when the user manually disconnects from the network or manually switches the network, the two events, the network disconnecting event and the network disconnected event, will occur in sequence. For abnormal network disconnection, such as network disconnection caused by a weak network signal or disappearance of the network signal, the network disconnecting event will not occur. Therefore, when a network disconnected event is obtained, it is also necessary to determine whether there is a network disconnecting event for the network.
[0152] Step S3023: Determine whether the network event is triggered by the computer automatically disconnecting from the network.
[0153] Step S3024: when the network event is a wireless network card event, determining that the network event is triggered by a manual operation of the user;
[0154] Step S3025: Determine that the network event is a wireless network switch state event;
[0155] Step S3026: when the network event is a wireless network switch state event, determining the state of the wireless network switch;
[0156] Here, when the state of the wireless network switch is off, it is determined that the network event is triggered by the user manually disconnecting the network.
[0157] Step S3027: Determine whether the network event is triggered by a manual operation of the user.
[0158] Step S303: If it is determined that the network event is triggered by the computer automatically disconnecting from the network, restore the network connection of the computer.
[0159] In some embodiments, restoring the computer's network connection, such as Figure 3C As shown, it may include step S3031 and step S3032:
[0160] Step S3031: Determine whether the computer's network environment is normal;
[0161] Step S3032: When it is determined that the network environment is normal, restore the network connection of the computer;
[0162] Here, you can automatically select a suitable network for connection based on the system's internal network connection rules. If the internal rule is the strength of the network signal, you can select the network with the strongest network signal for connection; if the internal rule is the network connection priority set by the user, you can select the network with the first priority for connection.
[0163] According to the above implementation process, a network connection method is proposed in the embodiment of the present application. First, by controlling the main switch of "automatic connection" of the wireless network, the user can choose whether the system manages the network connection or the user manages the network connection manually. Then, when the main switch is turned on, a method for the system to manage the network connection is proposed. Based on the embodiment of the present application, the following beneficial effects can be obtained:
[0164] 1) Users do not need to change the connection properties of each network one by one to meet the "automatic connection" requirements, and avoid the trouble of still connecting to the network after "active disconnection";
[0165] 2) A single switch replaces the "auto-connect" property of each network, which can be turned on or off with one click, which is convenient and intuitive.
[0166] Based on the foregoing embodiments, an embodiment of the present application provides a network connection device, which includes the modules included and the units included in the modules, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0167] Figure 4 A network connection device provided in an embodiment of the present application, such as Figure 4 As shown, the network connection device 400 includes:
[0168] A determination module 401 is used to determine a triggering event that causes a change in the network connection of the electronic device in response to the electronic device disconnecting from a first network to which it is currently connected;
[0169] The control module 402 is used to control the electronic device to be in a target network state based on the trigger event, wherein the target network state includes any one of the following:
[0170] The network is disconnected;
[0171] Maintain the currently connected second network; or,
[0172] Reconnect to the network.
[0173] In some embodiments, the control module includes:
[0174] A first control unit, configured to control the electronic device to be disconnected from the network or maintain a currently connected second network if the trigger event is generated from a target operation acting on the electronic device;
[0175] The second control unit is used to control the electronic device to switch from the first network to a third network or reconnect to the first network if the triggering event is not related to the target operation.
[0176] In some embodiments, the determining module includes at least one of the following:
[0177] A first determining unit, configured to monitor network event information occurring on the electronic device, and determine a type and / or source of the triggering event based on the network event information;
[0178] a second determining unit, configured to monitor operating data acting on the electronic device, and determine a type and / or source of the triggering event based on the operating data;
[0179] The third determination unit is used to monitor the behavior data of the target user and determine the type and / or source of the trigger event based on the behavior data.
[0180] In some embodiments, the first determining unit is used for at least one of the following:
[0181] If the network event information includes a disconnection process of the first network, determining that the trigger event is generated from a first target operation acting on the electronic device for disconnecting the first network;
[0182] If the network event information includes a change in the network mode of the electronic device or a change in a network interface configuration parameter, determining that the trigger event is generated from a second target operation acting on the electronic device;
[0183] If the network event information does not include the disconnection process of the first network and does not include changes in the network mode or network interface configuration parameters of the electronic device, it is determined that the trigger event is irrelevant to the target operation acting on the electronic device.
[0184] In some embodiments, the second determining unit is used for at least one of the following:
[0185] If the operation data is related to a network parameter for configuring the electronic device, determining that the trigger event is generated from a target operation acting on the electronic device;
[0186] If the operational data is not related to a network parameter configuring the electronic device, it is determined that the triggering event is not related to a target operation acting on the electronic device.
[0187] In some embodiments, the control module includes:
[0188] The third control unit is used to output corresponding prompt information based on the source of the trigger event, so as to control the electronic device to be in a disconnected state, maintain the currently connected second network, or reconnect to the network based on feedback information for the prompt information.
[0189] In some embodiments, the third control unit is used for at least one of the following:
[0190] If the trigger event belongs to the first type of trigger event, output a first prompt message, and control the electronic device to be disconnected from the network or maintain the currently connected second network based on first feedback information for the first prompt message;
[0191] If the trigger event belongs to the first type of trigger event, output second prompt information, and control the electronic device to switch from the first network to a fourth network based on second feedback information for the second prompt information, where the fourth network is a network determined based on the second feedback information;
[0192] If the trigger event belongs to the second type of trigger event, output third prompt information to control the electronic device to be in a disconnected state or control the electronic device to switch from the first network to a fifth network based on third feedback information for the third prompt information;
[0193] If the trigger event belongs to the third type of trigger event, a fourth prompt message is output, and based on fourth feedback information for the fourth prompt message, the electronic device is controlled to switch from the first network to the sixth network, reconnect the network, or enter a disconnected state.
[0194] In some embodiments, the control module includes at least one of the following:
[0195] a fourth control unit, configured to determine a triggered target control based at least on the trigger event, and control the electronic device to be disconnected from the network, maintain a currently connected second network, or reconnect to the network based on the target control, wherein the target control is located on the same configuration interface or on different configuration interfaces;
[0196] A fifth control unit is used to obtain attribute information of the first network, and based on the attribute information and the trigger event, control the electronic device to be in a disconnected state, maintain the current second network, or reconnect to the network.
[0197] In some embodiments, the fourth control unit is used for at least one of the following:
[0198] If the target control is a first switch control on the first configuration interface, controlling the electronic device to be disconnected from the network or to maintain the currently connected second network;
[0199] If the target control includes a second switch control on the first configuration interface or the second configuration interface, controlling the electronic device to switch from the first network to the seventh network or to be in a disconnected state;
[0200] If the target control includes a selection control on the first configuration interface or the third configuration interface, the electronic device is controlled to switch from the first network to an eighth network pointed to by the selection control.
[0201] In some embodiments, the fifth control unit is used for at least one of the following:
[0202] If the attribute information indicates that the first network is used for a single connection, controlling the electronic device to be in a disconnected state;
[0203] If the attribute information indicates that the first network is used for multiple connections, the electronic device is controlled to be disconnected from the network, maintain the current second network, or reconnect to the network based on the type of the first network and the source of the trigger event.
[0204] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0205] It should be noted that in the embodiment of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.
[0206] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.
[0207] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.
[0208] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in an electronic device, a processor in the electronic device executes some or all of the steps for implementing the above method.
[0209] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.
[0210] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.
[0211] It should be noted that Figure 5 is a hardware entity schematic diagram of an electronic device in an embodiment of the present application, such as Figure 5 As shown, the hardware entity of the electronic device 500 includes: a processor 501, a communication interface 502 and a memory 503, wherein:
[0212] The processor 501 generally controls the overall operation of the electronic device 500 .
[0213] The communication interface 502 enables the electronic device to communicate with other terminals or servers through a network.
[0214] The memory 503 is configured to store instructions and applications executable by the processor 501, and can also cache data to be processed or processed by the processor 501 and each module in the electronic device 500 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission between the processor 501, the communication interface 502 and the memory 503 can be carried out through the bus 504.
[0215] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.
[0216] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0217] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0218] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0219] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0220] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0221] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0222] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A network connection method, comprising: In response to the electronic device disconnecting from a first network to which it is currently connected, determining a triggering event that causes a change in the network connection of the electronic device; Based on the trigger event, the electronic device is controlled to be in a target network state, wherein the target network state includes any one of the following: The network is disconnected; Maintain the currently connected second network; or, Reconnect to the network.
2. The method according to claim 1, wherein: Controlling the electronic device to be in a target network state based on the trigger event includes: If the trigger event is generated by a target operation acting on the electronic device, controlling the electronic device to be disconnected from the network or to maintain the currently connected second network; If the trigger event is not related to the target operation, the electronic device is controlled to switch from the first network to a third network or reconnect to the first network.
3. The method according to claim 1 or 2, wherein: Determining a triggering event that causes a change in the network connection of the electronic device includes at least one of the following: Monitoring network event information occurring on the electronic device, and determining the type and / or source of the triggering event based on the network event information; Monitoring operating data acting on the electronic device, and determining the type and / or source of the triggering event based on the operating data; The behavior data of the target user is monitored, and the type and / or source of the trigger event is determined based on the behavior data.
4. The method according to claim 3, wherein: Determining the type and / or source of the triggering event based on the network event information includes at least one of the following: If the network event information includes a disconnection process of the first network, determining that the trigger event is generated from a first target operation acting on the electronic device for disconnecting the first network; If the network event information includes a change in the network mode of the electronic device or a change in a network interface configuration parameter, determining that the trigger event is generated from a second target operation acting on the electronic device; If the network event information does not include a disconnection process of the first network and does not include a change in a network mode or a network interface configuration parameter of the electronic device, determining that the trigger event is irrelevant to a target operation acting on the electronic device; or, Determining the type and / or source of the trigger event based on the operation data includes at least one of the following: If the operation data is related to a network parameter for configuring the electronic device, determining that the trigger event is generated from a target operation acting on the electronic device; If the operational data is not related to a network parameter configuring the electronic device, it is determined that the triggering event is not related to a target operation acting on the electronic device.
5. The method according to any one of claims 1 to 4, wherein: Controlling the electronic device to be in a target network state based on the trigger event includes: The corresponding prompt information is output based on the source of the trigger event, so as to control the electronic device to be disconnected from the network, maintain the currently connected second network, or reconnect to the network based on the feedback information of the prompt information.
6. The method according to claim 5, wherein: Controlling the electronic device to be disconnected from the network, maintain the currently connected second network, or reconnect to the network based on the feedback information of the prompt information includes at least one of the following: If the trigger event belongs to the first type of trigger event, output a first prompt message, and control the electronic device to be disconnected from the network or maintain the currently connected second network based on first feedback information for the first prompt message; If the trigger event belongs to the first type of trigger event, output second prompt information, and control the electronic device to switch from the first network to a fourth network based on second feedback information for the second prompt information, where the fourth network is a network determined based on the second feedback information; If the trigger event belongs to the second type of trigger event, output third prompt information to control the electronic device to be in a disconnected state or control the electronic device to switch from the first network to a fifth network based on third feedback information for the third prompt information; If the trigger event belongs to the third type of trigger event, a fourth prompt message is output, and based on fourth feedback information for the fourth prompt message, the electronic device is controlled to switch from the first network to the sixth network, reconnect the network, or enter a disconnected state.
7. The method according to any one of claims 1 to 4, wherein: Controlling the electronic device to be in a target network state based on the trigger event includes at least one of the following: Determine a triggered target control based at least on the trigger event, and control the electronic device to be disconnected from the network, maintain a currently connected second network, or reconnect to the network based on the target control, wherein the target control is located on the same configuration interface or on different configuration interfaces; Attribute information of the first network is obtained, and based on the attribute information and the trigger event, the electronic device is controlled to be in a disconnected state, maintain the current second network, or perform network reconnection.
8. The method according to claim 7, wherein: Controlling the electronic device to be disconnected from the network, maintaining the currently connected second network, or reconnecting to the network based on the target control includes at least one of the following: If the target control is a first switch control on the first configuration interface, controlling the electronic device to be disconnected from the network or to maintain the currently connected second network; If the target control includes a second switch control on the first configuration interface or the second configuration interface, controlling the electronic device to switch from the first network to the seventh network or to be in a disconnected state; If the target control includes a selection control on the first configuration interface or the third configuration interface, the electronic device is controlled to switch from the first network to an eighth network pointed to by the selection control.
9. The method according to claim 7, wherein: Controlling the electronic device to be disconnected from the network, maintain the current second network, or reconnect to the network based on the attribute information and the trigger event includes at least one of the following: If the attribute information indicates that the first network is used for a single connection, controlling the electronic device to be in a disconnected state; If the attribute information indicates that the first network is used for multiple connections, the electronic device is controlled to be disconnected from the network, maintain the current second network, or reconnect to the network based on the type and source of the first network.
10. A network connection device, comprising: a determination module, configured to determine, in response to the electronic device disconnecting from a currently connected first network, a triggering event causing a change in the network connection of the electronic device; A control module, configured to control the electronic device to be in a target network state based on the trigger event, wherein the target network state includes any one of the following: The network is disconnected; Maintain the currently connected second network; or, Reconnect to the network.
Citation Information
Cited By
Error-reporting popup window page guiding method and device based on weak network detection
CN119598051A
