CN113709665A - Network connection method, device, storage medium and electronic equipment - Google Patents

Network connection method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113709665A
CN113709665A CN202111003381.5A CN202111003381A CN113709665A CN 113709665 A CN113709665 A CN 113709665A CN 202111003381 A CN202111003381 A CN 202111003381A CN 113709665 A CN113709665 A CN 113709665A
Authority
CN
China
Prior art keywords
network
identification information
location
information
network identification
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.)
Pending
Application number
CN202111003381.5A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111003381.5A priority Critical patent/CN113709665A/en
Publication of CN113709665A publication Critical patent/CN113709665A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/32Reselection being triggered by specific parameters by location or mobility data, e.g. speed data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a network connection method, a device, a storage medium and electronic equipment, wherein the method comprises the steps of obtaining current position information of the electronic equipment, matching the current position information with a position network database to obtain a matching result, wherein the position network database comprises a plurality of position information and network identification information corresponding to the position information; and performing network connection on the electronic equipment according to the matching result. According to the method and the device, when the user uses the electronic equipment, the current position information of the electronic equipment is matched with the position network database comprising a plurality of position information and corresponding network identification information, the current network identification type of the electronic equipment is determined and network connection is carried out, so that the cost consumption of the user due to connection of a mobile data network can be avoided, the continuous communication requirement of the electronic equipment under different network signal environments can be met, and the normal network experience of the user is further guaranteed.

Description

Network connection method, device, storage medium and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network connection method, an apparatus, a storage medium, and an electronic device.
Background
The existing smart phone automatically switches between a wireless data network (WIFI) and a mobile data network, and one mode is based on a full network convergence acceleration technology (Link Turbo), and the wireless data network and the mobile data network are used on electronic equipment concurrently, so that the extremely-caused communication experience of high network speed convergence, stability and low time delay is brought to users; the other scheme is based on an intelligent switching scheme (RF/WIFI intelligent switching) of a wireless data network and a mobile data network, when the electronic equipment is poorly connected with the wireless data network, the mobile data network is automatically switched, and the data connection is guaranteed to be uninterrupted.
However, in the process of network switching, the two methods still use the mobile data network to consume the flow under the condition that the quality of the wireless data network is good, thereby bringing the consumption of user cost; the latter can not automatically switch to the mobile data network when the quality of the wireless data network is poor but the communication can be continued, thereby causing a stuck phenomenon, and both of them affect the network experience of the user.
Disclosure of Invention
The embodiment of the application provides a network connection method, a network connection device, a storage medium and electronic equipment, which can determine the type of a connected network connection signal according to the position information of the electronic equipment so as to avoid influencing the network experience of a user.
In a first aspect, an embodiment of the present application provides a network connection method, including:
acquiring current position information of the electronic equipment;
matching the current position information with a position network database to obtain a matching result, wherein the position network database comprises a plurality of position information and network identification information corresponding to the position information; and
and performing network connection on the electronic equipment according to the matching result.
In a second aspect, an embodiment of the present application provides a network connection apparatus, including:
the first acquisition module is used for acquiring the current position information of the electronic equipment;
the first processing module is used for matching the current position information with a position network database to obtain a matching result, wherein the position network database comprises a plurality of position information and network identification information corresponding to the position information;
and the connection module is used for carrying out network connection on the electronic equipment according to the matching result.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
the processor is connected with the memory;
a memory for storing executable program code;
the processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to execute the network connection method provided by the first aspect of the embodiments of the present application or any implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer storage medium, where a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a processor, the network connection method provided in the first aspect of the embodiment or any implementation manner of the first aspect of the present application may be implemented.
In the embodiment of the application, the current position information of the electronic equipment is obtained, the current position information is matched with the position network database to obtain a matching result, and the electronic equipment is connected with a network according to the matching result. According to the method and the device, when a user uses the electronic equipment, the current position information of the electronic equipment is matched with the position network database comprising a plurality of position information and corresponding network identification information, the current network identification type is determined according to the matching result, and network connection or network switching is carried out, so that the cost consumption of the user due to connection of a mobile data network can be avoided, the continuous communication requirement of the electronic equipment under different network signal environments can be met, and the normal network experience of the user can be further guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic architecture diagram of a network connection system according to an embodiment of the present application;
fig. 2 is a schematic path illustration of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating a marking effect of position information according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a network connection method according to an embodiment of the present application;
fig. 5 is a schematic view of a process for constructing a location network database according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a location network database according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another location network database provided in an embodiment of the present application;
fig. 8 is a flowchart illustrating another network connection method according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a further network connection method according to an embodiment of the present application;
fig. 10 is a diagram for showing a network connection effect of an electronic device according to an embodiment of the present application
Fig. 11 is a schematic structural diagram of a network connection device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an architecture of a network connection system according to an embodiment of the present disclosure.
As shown in fig. 1, the network connection system may include at least an electronic device 101, a backend server 102, and a network access site 103, where:
the electronic device 101 may include an electronic device 101 of the same device type having an Android system or electronic devices 101 of a plurality of different device types, and an application program for acquiring current location information is installed on the electronic device 101. It is possible that the electronic device 101 may obtain the current location information in real time through the positioning software of its own system, for example, the current location information of the electronic device may be obtained by the positioning software at a preset time interval by using the global navigation satellite system, and the current location information may be, but is not limited to, represented as "xx district xx street xx city xx in xx province", etc. Possibly, the electronic device 101 may also obtain the current location information in real time through a downloaded third party application, for example, the user may download and install a third party application with a positioning and navigation function (which may be, but is not limited to, a hundred degree map, an update map, etc.) in an application mall of the electronic device in advance, and obtain the current location information of the electronic device through the third party application, and the same current location information may be, but is not limited to, represented as "xx district xx street of xx city xx", and the like.
It can be understood that the application installed on the electronic device 101 for obtaining the location information may further record all path information of the user during using the electronic device, and integrate all path information to obtain the location information commonly used by the user. For example, referring to the path display diagram of the electronic device shown in fig. 2 provided by the present application, as shown in fig. 2, the path display diagram may include three paths, which may be respectively represented as a first path including a position a to a position B to a position C to a position D, a second path including a position a to a position C to a position E to a position F to a position G, and a third path including a position B to a position E to a position H to a position I to a position G, where the position information commonly used by the electronic device may be obtained by combining the first path and the second path and includes a position a and a position C, the position information commonly used by the electronic device may be obtained by combining the second path and the third path and includes a position E and a position G, and the position information commonly used by the electronic device may be obtained by combining the first path and the third path includes a position B, and the position information commonly used by the electronic device may further include a position a, a position B, a position C, and a position C, and a position B, a, B, a, Position B, position C, position E and position G. It is easy to understand that, the method for determining the frequently-used location information of the electronic device herein may be to determine the historical access times of different location information, and use the location information with the historical access times being greater than or equal to two times as the frequently-used location information, and the application is not limited to this method.
After obtaining the current location information according to the application program for obtaining the location information, the electronic device 101 may match the current location information with the location network database, determine the network identification information according to a matching result of the current location information and the location network database, and perform network connection with a network corresponding to the network identification information in the network access station 103. Wherein the location network database may include a plurality of location information and network identification information corresponding to each of the plurality of location information. The location network database may be obtained by the electronic device 101 to the background server 102, the background server 102 may obtain a plurality of location information and network identification information corresponding to the plurality of location information within a preset range, write the plurality of location information and all of the obtained partial network identification information corresponding to the plurality of location information into the location network database according to the network quality of the network identification information corresponding to the plurality of location information, and send a request for downloading the location network database to the background server 102 by the electronic device 101, so that the background server 102 sends the location network database to the electronic device 101 in response to the download request. It is understood that the preset range in the present embodiment may be a range including a plurality of location information commonly used by the user of the electronic device 101.
Here, the network identification information in the location network database includes a media access control address (MAC address) of a network that can establish a connection with the corresponding location information, wherein the type of the network may include a first network and a second network, such as but not limited to the first network being a wireless local area network and the second network being a cellular network, i.e., it is understood that the network identification information includes the MAC address of the wireless local area network that can establish a connection with the corresponding location information and the MAC address of the cellular network. After the electronic device 101 matches the current location information with the location network database to obtain a matching result, the electronic device may perform fast network connection according to the MAC address of the wireless local area network or the MAC address of the cellular network provided in the matching result.
It should be noted that the network quality corresponding to the MAC address of the wlan and the network quality corresponding to the MAC address of the cellular network, which are included in the network identification information and to which the corresponding location information can establish a connection, both satisfy preset conditions, for example, but not limited to, the network quality corresponding to the MAC address of the wlan needs to satisfy a first preset condition, the network quality corresponding to the MAC address of the cellular network needs to satisfy a second preset condition, and the first preset condition and the second preset condition may be the same preset condition.
It is to be understood that, the present application may be, but is not limited to, the location network database being obtained by the electronic device 101 to the background server 102, for example, the electronic device 102 may also generate the location network database according to a plurality of pieces of location information commonly used by the user and network identification information respectively corresponding to the plurality of pieces of location information commonly used by the user, so that the electronic device 101 may directly match with the current location information according to the generated location network database.
In addition, the electronic device 101 in the embodiment of the present application may be, but is not limited to, an electronic device with an Android system, and may also be an electronic device with another operating system.
The electronic device 101 according to the embodiment of the present application may be a smart phone, a tablet Computer, a desktop Computer, a laptop Computer, a notebook Computer, an Ultra-mobile Personal Computer (UMPC), a handheld Computer, a netbook, a Personal Digital Assistant (PDA), a virtual reality device, and the like, in which an android system is installed.
The background server 102 may be configured to obtain a plurality of pieces of location information and network identification information corresponding to the plurality of pieces of location information within a preset range, and generate a location network database according to the plurality of pieces of location information and the network identification information corresponding to the plurality of pieces of location information, so that after the electronic device 101 obtains current location information, the location network database is sent to the electronic device 101 according to a request for downloading the location network database sent by the electronic device 101. The background server 102 may determine a plurality of pieces of location information within a preset range in the process of generating the location network database, and here, refer to a schematic diagram of a marking effect of location information provided in the embodiment of the present application shown in fig. 3. As shown in fig. 3, the backend server 102 may first divide the preset range into 2 × 2 grids, which may be represented by an area a, an area B, an area C, and an area D, and mark landmark position information included in each area, for example, the area a may be marked with a position a1, a position a2, and a position A3, the area B may be marked with a position B1, a position B2, a position B3, and a position B4, the area C may be marked with a position C1, a position C2, and a position C3, and the area D may be marked with a position D1, a position D2, and a position D3. It is to be understood that the landmark locations are representative buildings, such as but not limited to large buildings like schools, hospitals, hotels, business offices, etc., and small buildings like xx museums, xx grocery stores, etc. It should be noted that the network identification information covered by each area divided by the preset range is different, for example, the network identification information corresponding to the area a may include a MAC address a of the wireless local area network and a MAC address a of the cellular network, the network identification information corresponding to the area B may include a MAC address B of the wireless local area network and a MAC address B of the cellular network, the network identification information corresponding to the area C may include a MAC address C of the wireless local area network and a MAC address C of the cellular network, and the number of the MAC addresses of the same network type corresponding to different areas may be one or more.
The background server 102 may obtain network identification information corresponding to each of the plurality of location information after determining the plurality of location information within the preset range, correspond all or part of the network identification information whose network quality meets the preset condition with the corresponding location information, and generate the location database by combining all or part of the network identification information whose network quality meets the preset condition with the plurality of location information and the plurality of location information. The manner of obtaining the network identification information corresponding to each of the plurality of pieces of location information by the background server 102 may be sending a request for obtaining the network identification information to other electronic devices in the location information, so as to determine the network identification information corresponding to the location information according to the network identification information connected to the other electronic devices. Specifically, taking the location information as the area a mentioned above as an example, when the network identification information sent by a certain electronic device in the area a is received by the backend server 102 as the MAC address Aa of the wireless local area network, the MAC address Aa of the wireless local area network can be used as the network identification information corresponding to the area a. It is understood that the network identification information obtained by the background server 102 may further include signal strength and signal network speed corresponding to the MAC address of the wireless local area network to which the corresponding location information can be connected, and signal strength and signal network speed corresponding to the MAC address of the cellular network.
The background server 102 in the embodiment of the present application is not limited to a hardware server, a virtual server, a cloud server, and the like, and may also be a terminal, and specifically but not limited to a desktop, a laptop, a notebook, an Ultra-mobile Personal Computer (UMPC), a handheld Computer, a netbook, a Personal Digital Assistant (PDA), a routing device, and the like.
The network access station 103 may be a station for providing network identification information to the electronic device 103, for example, the station may be one or more routing devices corresponding to MAC addresses of wireless local area networks to which corresponding location information may establish a connection, and may be one or more base stations corresponding to MAC addresses of cellular networks to which corresponding location information may establish a connection. The base station type corresponding to the station may include, but is not limited to, at least one of a 5G base station, a 4G base station, and a 3G base station.
It should be noted that the network access station 103 includes stations corresponding to all network identification information that can establish a connection with the location information, so that the electronic device 101 determines the network identification information according to the matching result and then performs a network connection through the determined network identification information provided by the network access station 103.
It should be further noted that the network connection system architecture of the present application may not be limited to the above-mentioned electronic device 101 as the execution subject of the network connection, and for example, the background server 102 may also be used as the execution subject of the network connection. Specifically, the background server 102 may obtain current location information from the electronic device 101, match the current location information with the generated location network database to determine network identification information connected to the electronic device 101, and send the network identification information to the electronic device 101, so that the electronic device 101 performs network connection according to the network identification information.
The following further explains the present application with the execution subject of network connection as an electronic device.
Referring to fig. 4, fig. 4 is a flowchart illustrating a network connection method according to an embodiment of the present disclosure.
As shown in fig. 4, the network connection method includes the steps of:
step 401, obtaining current position information of the electronic device.
Specifically, the electronic device may obtain the current location information in real time according to an application program for obtaining the location information. It is possible that the electronic device may obtain the location information in real time through the positioning software of the electronic device itself, for example, the current location information of the electronic device may be obtained through the positioning software by using the global navigation satellite system at a preset time interval, and the current location information may be, but is not limited to, represented as "xx district xx street xx city xx in xx province", and the like. Possibly, the electronic device may also obtain the location information in real time through a downloaded third party application, for example, a user may download and install a third party application with a positioning and navigation function (which may be, but is not limited to, a hundred degree map, a Tencent map, etc.) in an application mall of the electronic device in advance, and obtain the current location information of the electronic device through the third party application, and this current location information may also be, but is not limited to, expressed as "xx district xx street of xx City, xx City", etc.
It is understood that the electronic device may not be limited to the above-mentioned obtaining the current location information by using the application of the positioning and navigation function, and for example, the current location information may also be obtained by using a network location providing positioning technology (NLP), a cloud server and bluetooth communication, which are not described in detail herein.
And step 402, matching the current position information with a position network database to obtain a matching result.
Specifically, after acquiring the current location information, the electronic device may match with a location network database, where the location network database includes a plurality of location information and network identification information corresponding to each of the plurality of location information. The position network database can be automatically generated by the electronic equipment, and can also be downloaded and acquired from the background server by the electronic equipment. Possibly, if the location network database is automatically generated by the electronic device, the electronic device may generate the location network database according to the location information commonly used by the user and the network identification information established in the network connection of each piece of commonly used location information. It should be noted that the electronic device may further obtain, from the location information, other types of network identification information of network connections established by other electronic devices in the same location information to the backend server, so as to generate a more complete location network database.
Possibly, if the location network database is obtained by downloading from the electronic device to the background server, the background server may obtain a plurality of location information including the location information commonly used by the electronic device within a preset range according to the location information commonly used by the electronic device, and generate the location network database according to the plurality of location information and the network identification information established in the plurality of location information and having network connection. It should be noted that the background server may obtain, from different electronic devices, network identification information of a network connection established in the same location information according to the location information, so as to generate a more complete location network database.
Here, the step of the electronic device determining the location network database may be, but is not limited to, being set before acquiring the current location information of the electronic device or being set after acquiring the current location information of the electronic device or being performed in synchronization with acquiring the current location information of the electronic device.
And step 403, performing network connection on the electronic equipment according to the matching result.
Specifically, after obtaining the matching result between the current location information and the location network database, the electronic device may determine the network identification information applicable to the current location according to the matching result, and perform network connection with the network identification information.
Of course, the embodiments related to the present application may not be limited to network connection for the electronic device, and for example, may also be network switching for the electronic device, so as to ensure smooth network communication requirement for the electronic device.
In the embodiment of the application, the network identification information suitable for the current position of the electronic equipment is determined and network connection is carried out according to the matching of the current position information of the electronic equipment and the position network database comprising a plurality of position information and the network identification information corresponding to the position information and the network identification information, so that the continuous communication requirements of the electronic equipment in different network signal environments can be met, and the normal network experience of a user is further guaranteed.
The network identification information included in the location network database mentioned in step 402 may include first network identification information and second network identification information, where the network type of the first network identification information is different from that of the second network identification information, for example, but not limited to, the network type corresponding to the first network identification information is a wireless local area network, and the network type corresponding to the second network identification information is a cellular network. It is understood that the first network identification information may include one or more first network identifications, the first network identifications may correspond to MAC addresses of different wireless local area networks, and the network quality of each first network identification in the location network database satisfies a first preset condition. The first preset condition may be, but is not limited to, that the network strength of the wireless lan is greater than or equal to a first preset network strength threshold, or that the network speed of the wireless lan is greater than or equal to a first preset network speed threshold.
Likewise, the second network identifier may include one or more second network identifiers, the second network identifiers may correspond to MAC addresses of different cellular networks, and the network quality of each second network identifier in the location network database satisfies a second predetermined condition. The second preset condition may be, but is not limited to, the network strength of the cellular network being greater than or equal to a second preset network strength threshold or the network speed of the cellular network being greater than or equal to a second preset network speed threshold.
It should be noted that the first preset threshold may also be equal to a second preset threshold, for example, the first preset network strength threshold is equal to the second preset network strength threshold, and the first preset network speed threshold is equal to the second preset network speed threshold.
As an embodiment of the present application, a schematic flow chart of constructing a location network database provided in the embodiment of the present application shown in fig. 5 may be referred to.
As shown in fig. 5, the process of constructing the location network database specifically includes the following steps:
step 501, obtaining first network identification information and second network identification information corresponding to the position information.
Specifically, in the process of constructing the location network database, the electronic device may first obtain location information commonly used by the user according to all path information of the user in the process of using the electronic device, which is recorded by an application program for obtaining the location information, and integrate all the path information to obtain the location information commonly used by the user, where the obtained location information commonly used by the user may refer to the above-mentioned historical access times for determining different location information, and use the location information with the historical access times being greater than or equal to two times as the manner of using the location information commonly used, which is not limited in this manner, of course.
After the electronic device determines a plurality of pieces of common location information, first network identification information and second network identification information corresponding to each piece of common location information can be acquired respectively. Taking the example that the first network identification information includes one or more wireless local area network identifications, the electronic device may obtain one or more wireless local area network identifications that the electronic device has established connection at each piece of common location information, and preferably, the electronic device may further obtain, to the background server, other wireless local area network identifications that other electronic devices have established connection at the same location information.
Similarly, taking the example that the second network identification information includes one or more cellular network identifications, the electronic device may obtain one or more cellular network identifications to which the electronic device has established a connection at each common location information, and preferably, the electronic device may further obtain other cellular network identifications to which other electronic devices have established a connection at the same location information, to the background server.
It can be understood that the electronic device may further send a plurality of commonly used location information to the backend server, and the backend server statistically obtains the first network identification information and the second network identification information corresponding to each commonly used location information, and sends the first network identification information and the second network identification information corresponding to each commonly used location information back to the electronic device.
Step 502, if the network quality of the network corresponding to the first network identification information meets a third preset condition, writing the first network identification information corresponding to the network whose network quality meets the third preset condition and the corresponding location information into a location network database.
Specifically, if the electronic device detects that the network quality of all networks corresponding to the first network identifier corresponding to the location information meets the third preset condition, the first network identifiers corresponding to all networks and the location information may be written into the location network database. Here, taking the example that the first network identification information includes one or more wlan identifications, the location network database may include location information and corresponding wlan identifications, where the network quality of all wlans satisfies a third predetermined condition, where the third predetermined condition may be that the network strength of the wlan is greater than or equal to a third predetermined network strength threshold or the network speed of the wlan is greater than or equal to a third predetermined network speed threshold.
It can be understood that the location network database may be used as a "white list" for performing wireless network connection on the electronic device, that is, when the current location of the electronic device is successfully matched with the location in the location network database, it indicates that the network quality of all the wireless local area networks that can establish connection with the current location of the electronic device is high, and then the electronic device may perform network connection according to any one of the wireless local area network identifiers corresponding to the current location in the location network database, so as to ensure normal communication of the connection network.
A schematic diagram of a location network database structure is shown in fig. 6.
As shown in fig. 6, the location network database may include three location information, i.e., a location a, a location B, and a location C, and a wireless lan a1 and a wireless lan a2 corresponding to the location a, a wireless lan B corresponding to the location B, and a wireless lan C1 and a wireless lan C2 corresponding to the location C. All the wireless local area network identifiers corresponding to the position a include a wireless local area network a1 and a wireless local area network a2, and the network qualities corresponding to the wireless local area network a1 and the wireless local area network a2 respectively all satisfy a third preset condition. All the wireless local area network identifications corresponding to the position B comprise a wireless local area network B, and the network quality corresponding to the wireless local area network B meets a third preset condition. All the wireless local area network identifiers corresponding to the position C include a wireless local area network C1 and a wireless local area network C2, and the network qualities corresponding to the wireless local area network C1 and the wireless local area network C2 respectively all satisfy a third preset condition.
When the matching between the current position of the electronic equipment and the position in the position network database fails, the wireless local area network with poor network quality exists in all the wireless local area networks which can be connected with the current position of the electronic equipment, and the electronic equipment can be connected with the cellular network in a network manner in order to avoid the condition that the electronic equipment is connected with the wireless local area network with poor network quality.
Step 503, if the first network identification information corresponds to a network whose network quality does not satisfy a third preset condition, determining all or part of the second network identification information according to a preset rule.
Specifically, if the electronic device detects that a network with network quality not meeting a third preset condition exists in the network corresponding to the first network identifier corresponding to the location information, all or part of the second network identifier information may be determined according to a preset rule. Here, taking the first network identification information as an example that the first network identification information includes one or more wireless local area network identifications, and the second network identification information includes one or more cellular network identifications, where the third preset condition may be that the network strength of the wireless local area network is greater than or equal to a third preset network strength threshold or the network speed of the wireless local area network is greater than or equal to a third preset network speed threshold, that is, when there is a wireless local area network in the one or more wireless local area networks corresponding to the location information whose network strength is less than the third preset network strength threshold or whose network speed is less than the third preset network speed threshold, all cellular networks corresponding to the location information are determined, and all or part of the cellular networks in all the cellular networks are determined according to the preset rule.
It is understood that, in the present embodiment, the preset rule may be:
sorting the second network identification information from high to low according to the network quality of the corresponding network;
and taking the part of the second network identification information which is ranked at the top as the whole or part of the second network identification information.
Specifically, still taking the example that the second network identification information includes one or more cellular network identifications, after determining that there is a wireless local area network with a network strength smaller than a third preset network strength threshold or a network speed smaller than a third preset network speed threshold in the one or more wireless local area networks corresponding to the location information, the one or more acquired cellular networks corresponding to the location information may be ranked according to network quality from high to low, where the network quality may be, but is not limited to, the network strength or the network speed, for example, the one or more acquired cellular networks corresponding to the location information may be ranked according to network strength from high to low. Further, the part of the cellular networks with the top-ranked network quality is used as one or more cellular networks corresponding to the position information in the position network database. It is understood that the top two ranking orders may be, but are not limited to, the top two ranking orders (if only one cellular network corresponding to the location information is obtained, the cellular network may be directly used as the cellular network corresponding to the location information in the location network database).
Step 504, writing the first network identification information corresponding to the network whose network quality does not satisfy the third preset condition, all or part of the second network identification information and the corresponding location information into the location network database.
Specifically, after the electronic device determines all or part of the second network identification information corresponding to the location information, the first network identification information corresponding to the network whose network quality does not satisfy the third preset condition and the all or part of the second network identification information corresponding to the location information may be written into the location network database in a corresponding manner.
It can be understood that, here, the location network database may be used as a "blacklist" for performing wireless network connection on the electronic device, that is, when the current location of the electronic device is successfully matched with the location in the location network database, it indicates that a wireless local area network with poor network quality exists in the wireless local area network that can establish connection with the current location of the electronic device, and then the electronic device may perform network connection according to all or part of the cellular network identifier corresponding to the current location in the location network database, so as to ensure normal communication of the connection network. When the current position of the electronic equipment fails to be matched with the position in the position network database, the network quality of all wireless local area networks which can be connected with the current position of the electronic equipment is high, and the electronic equipment can be connected with the wireless local area network corresponding to the current position.
It should be noted that, in the prior art, when the detected network quality of the wlan is poor but communication with a low rate can still be maintained, the wlan and the cellular network are automatically connected, and cannot be switched to the cellular network, which is very likely to affect the normal network use experience of the user. And the location written in the location network database in step 503 and step 504 includes a wireless local area network with poor network quality, so as to select all or part of cellular networks corresponding to the current location of the electronic device to connect when the current location of the electronic device is successfully matched with the location in the location network database, so as to guarantee the communication quality of the electronic device.
Reference may be made to fig. 7 for a schematic diagram of another location network database structure.
As shown in fig. 7, the location network database may include three location information, i.e., a location D, a location E, and a location F, and a wireless local area network D, E, F1, and F2 corresponding to the location D, the location E, the location F, and a cellular network D1, D2 corresponding to the location D, a cellular network E corresponding to the location E, a cellular network F1, and F2 corresponding to the location F, respectively. The network quality of the wireless local area network D corresponding to the position D does not meet a third preset condition, and the network quality of the cellular network D1 and the cellular network D2 in the cellular network corresponding to the position D are ranked in the top. The network quality of the wireless local area network E corresponding to the position E does not meet a third preset condition, and the position E corresponds to a cellular network E. The network quality of the wireless local area network F1 and the wireless local area network F2 corresponding to the position F does not meet the third preset condition, and the network quality of the cellular network F1 and the cellular network F2 in the cellular network corresponding to the position F are ranked in the top.
It is further understood that, in step 504, the location information and all or part of the second network identification information corresponding to the location information may also be directly written into the location network database, and the embodiment is not limited thereto.
In the embodiment of the application, the position information and the network identification information corresponding to different requirements can be written into the position network database, so that the electronic equipment can determine reasonable network identification information quickly according to the matching result of the current position and the position network database, and the network communication quality and the network connection efficiency are guaranteed.
It should be further noted that the electronic device may write the location information and the network identification information corresponding to the location information into the location network database in real time, for example, when one or more pieces of commonly used location information are newly added to the electronic device, the electronic device may obtain the first network identification information and the second network identification information corresponding to the newly added one or more pieces of commonly used location information, determine the network identification information corresponding to the newly added commonly used location according to a determination result of whether the network quality of the network corresponding to the first network identification information satisfies a third preset condition, and write the newly added commonly used location and the network identification information corresponding to the newly added commonly used location into the location network database.
As another embodiment of the present application, the location network database includes a plurality of location information and first network identification information corresponding to a network whose network quality satisfies a third preset condition and corresponding to each of the plurality of location information, and refer to a flowchart of another network connection method shown in fig. 8.
As shown in fig. 8, the network connection method at least includes the following steps:
step 801, obtaining current position information of the electronic device.
Specifically, step 801 is identical to step 401, and is not described herein again.
Step 802, if the current location information is successfully matched with the location information in the location network database, taking the first network identification information corresponding to the network whose network quality corresponds to the successfully matched location information meets the third preset condition as a matching result.
Specifically, when the location network database includes a plurality of location information and first network identification information corresponding to a network whose network quality corresponding to the plurality of location information meets a third preset condition, if the electronic device detects that the current location is successfully matched with the location in the location network database, it indicates that the network quality of the first network identification information corresponding to the current location is high, and the first network identification information corresponding to the current location in the location network database may be used as a matching result.
Taking the example that the first network identification information includes one or more wlan identifications, if the electronic device detects that the current location is successfully matched with any one location in the location network database, the electronic device may use the one or more wlan identifications corresponding to the successfully matched location as the network matching result of the current location. It is to be understood that, as an advantage, the electronic device may use, as a network matching result of the current location, a wireless local area network identifier with top-ranked network quality among the one or more wireless local area network identifiers corresponding to the locations where matching is successful.
And 803, if the matching of the current position information and the position information in the position network database fails, determining all or part of second network identification information corresponding to the current position information according to a preset rule.
Specifically, when the location network database includes a plurality of location information and first network identification information corresponding to a network whose network quality corresponding to the plurality of location information meets a third preset condition, if the electronic device detects that the current location is unsuccessfully matched with the location in the location network database, it indicates that a network with poor network quality exists in the first network identification information corresponding to the current location, and in order to ensure network communication quality, all or part of the second network identification information may be screened out from the second network identification information corresponding to the current location according to a preset rule.
Taking the example that the first network identification information includes one or more wireless local area network identifiers, and the second network identification information includes one or more cellular network identifiers, if it is detected that the current location fails to match any one of the location network databases, indicating that a wireless local area network with poor network quality exists in the wireless local area network corresponding to the current location, the electronic device may acquire the one or more cellular networks corresponding to the current location, and determine a cellular network with the network quality ranked in the top order from high to low among the one or more cellular networks.
It can be understood here that, in the process that the electronic device writes the plurality of location information and the first network identification information corresponding to the network whose network quality corresponding to the plurality of location information meets the third preset condition into the location network database, the electronic device has already acquired the second network identification information corresponding to the plurality of location information, and based on this, the electronic device can directly call the acquired second network identification information corresponding to the current location when acquiring the second network identification information corresponding to the current location. In addition, in order to ensure the real-time performance of the second network identification information, the electronic device may further obtain the second network identification information corresponding to the current position according to a preset time interval, and store the updated second network identification information.
And step 804, taking all or part of the second network identification information as a matching result.
Specifically, when the electronic device only obtains one second network identifier corresponding to the current location, the second network identifier may be directly used as the network matching result of the current location. When the electronic device obtains a plurality of second network identifiers corresponding to the current location, the second network identifiers with the top rank from high to low in network quality in the plurality of second network identifiers may be selected as the network matching result of the current location, where the top second network identifiers may be, but are not limited to, the second network identifiers with the top two bits from high to low in network quality.
And step 805, performing network connection on the electronic equipment according to the matching result.
Specifically, after the network matching result of the current location is obtained, the electronic device may perform network connection according to the network identification information determined in the matching result. Possibly, when the matching result is the first network identifier information corresponding to the network whose network quality corresponding to the current location meets the third preset condition, the electronic device may select, by default, one first network identifier from one or more first network identifiers included in the first network identifier information to connect, where the default manner may be, but is not limited to, selecting the first network identifier with the highest network quality or the highest connection frequency.
It is to be understood that the electronic device may further present, to the user, one or more first network identifiers included in the first network identifier information, for example, a first network identifier list ordered from high to low according to network quality may be displayed on the current display interface, and after the user selects any one of the first network identifiers in the first network identifier list, the electronic device may perform connection according to the selected first network identifier. The first network identifier list displayed by the electronic device may be network names corresponding to one or more first network identifiers, and taking the example that the first network identifier information includes one or more wireless local area network identifiers, the wireless local area network list displayed by the electronic device may include one or more wireless local area network names ordered from high to low according to network quality, so as to improve the user experience.
Possibly, when the matching result is all or part of the second network identification information, the electronic device may select, by default, one second network identification from one or more second network identifications included in all or part of the second network identification information to connect, where the default manner may be, but is not limited to, selecting the second network identification with the highest network quality or the highest connection frequency.
As another embodiment of the present application, the location network database includes a plurality of location information, first network identification information corresponding to a network whose network quality does not satisfy a third preset condition and corresponding to each of the plurality of location information, and all or part of second network identification information, and refer to a flowchart of another network connection method shown in fig. 9.
As shown in fig. 9, the network connection method at least includes the following steps:
step 901, obtaining current position information of the electronic device.
Specifically, step 901 is identical to step 801 and step 401, and is not described here again.
And 902, if the current position information is successfully matched with the position information in the position network database, taking all or part of second network identification information corresponding to the successfully matched position information as a matching result.
Specifically, when the location network database includes a plurality of location information, first network identification information corresponding to a network whose network quality does not satisfy a third preset condition and all or part of second network identification information, if the electronic device detects that the current location is successfully matched with the location in the location network database, it indicates that a network with poor network quality exists in the first network identification information corresponding to the current location, and all or part of the second network identification information corresponding to the location information that is successfully matched may be used as a matching result. The whole or part of the second network identification information may be screened out from the second network identification information corresponding to the current position according to a preset rule, where the preset rule may refer to the above description, and redundant description is omitted here.
Taking the example that the first network identification information includes one or more wireless local area network identifications, and the second network identification information includes one or more cellular network identifications, the location network database includes a plurality of location information corresponding to wireless local area networks with poor network quality, wireless local area networks with poor network quality corresponding to the plurality of location information, and all or part of cellular networks corresponding to the plurality of locations. If the electronic equipment detects that the current position is successfully matched with any one position in the position network database, the electronic equipment indicates that one or more wireless local area networks corresponding to the current position have wireless local area networks with poor network quality, and then all or part of cellular network identifications corresponding to the successfully matched position can be used as the network matching result of the current position.
It is understood that the location network database may also include a plurality of location information and all or part of the second network identification information, which not only reduces the data storage space of the location network database, but also improves the efficiency of searching data.
Step 903, if the matching between the current position information and the position information in the position network database fails, acquiring first network identification information corresponding to a network, of which the network quality corresponding to the current position information meets a third preset condition, corresponding to the network.
And 904, taking the first network identification information corresponding to the network with the network quality meeting the third preset condition as a matching result.
Specifically, when the location network database includes a plurality of location information, first network identification information corresponding to a network whose network quality does not satisfy a third preset condition and all or part of second network identification information, if the electronic device detects that the current location fails to match with the location in the location network database, indicating that the network quality of the first network identification information corresponding to the current location is higher, the electronic device may acquire the first network identification information corresponding to the current location.
Taking the example where the first network identification information includes one or more wireless local area network identifications and the second network identification information includes one or more cellular network identifications, the location network database includes a plurality of location information corresponding to wireless local area networks with poor network quality, wireless local area networks with poor network quality corresponding to the plurality of location information, and all or part of cellular networks corresponding to the plurality of locations. If the electronic equipment detects that the matching between the current position and any one position in the position network database fails, one or more wireless local area networks corresponding to the current position can be obtained, and the one or more wireless local area networks are used as the network matching result of the current position.
It should be noted that, preferably, when the one or more wireless local area networks are used as the network matching result of the current location, the first network identification information corresponding to the network whose network quality satisfies the third preset condition may be ranked from high to low according to the network quality of the corresponding network, and the first network identification information corresponding to the network whose ranked part of network quality satisfies the third preset condition is used as the matching result, so as to further ensure the network communication quality.
It can be understood here that, in the process that the electronic device writes the plurality of location information, the first network identification information corresponding to the network whose network quality does not satisfy the third preset condition and all or part of the second network identification information into the location network database, the first network identification information corresponding to the plurality of location information is already acquired, and based on this, the electronic device may directly call the acquired first network identification information corresponding to the current location when acquiring the first network identification information corresponding to the current location. In addition, in order to ensure the real-time performance of the first network identification information, the electronic device may further obtain the first network identification information corresponding to the current position according to a preset time interval, and store the updated first network identification information.
And step 905, performing network connection on the electronic equipment according to the matching result.
Specifically, after the network matching result of the current location is obtained, the electronic device may perform network connection according to the network identification information determined in the matching result. Possibly, when the matching result is all or part of the second network identifier information corresponding to the successfully matched location information, the electronic device may select, by default, one second network identifier from one or more second network identifiers included in the all or part of the second network identifier information to connect, where the default manner may be, but is not limited to, selecting the second network identifier with the highest network quality or the highest connection frequency.
Possibly, when the matching result is the first network identifier information corresponding to the network whose network quality meets the third preset condition, the electronic device may select, by default, one first network identifier from one or more first network identifiers included in the first network identifier information corresponding to the network whose network quality meets the third preset condition to connect, where the default manner may be, but is not limited to, selecting the first network identifier with the highest network quality or the highest connection frequency.
As another embodiment of the present application, when the electronic device is network-connected according to the matching result, the network qualities of the networks corresponding to the network identification information may be ranked from high to low according to the matching result, and the electronic device is network-connected according to the network identification information with the highest ranking of the network qualities.
Specifically, the electronic device may rank the network identifier information obtained from the matching result according to the network quality from high to low, and perform network connection with the network identifier with the highest network quality as a preference, so that the network communication quality of the electronic device connection is good and extra cost loss is avoided.
As another embodiment of the present application, the network quality of the network identification information can also be obtained through a trained deep learning model. Specifically, the electronic device may obtain at least one of network strength, network speed, and network resolution data of the network identification information.
The network strength can be signal strength provided by the electronic equipment when the electronic equipment is connected with the network corresponding to the network identification information, and specifically can be presented through signal grids displayed on a display interface of the electronic equipment, wherein more signal grids indicate that the signal strength is higher, and less signal grids indicate that the signal strength is lower. The network speed can be determined by the transmission time of the data packet. The electronic device may send a fixed decompressed packet when connecting to a network corresponding to the network identification information, and determine the network analysis data corresponding to the network identification information according to the analysis condition of the fixed decompressed packet, for example, when the analysis condition of the fixed decompressed packet is that the analysis cannot be performed, the signal analysis data value is set to 0, and when the analysis condition of the decompressed packet is that the analysis is successful, the signal analysis data value is set to 1.
Further, taking the example that the electronic device obtains the network strength, the network speed and the network analysis data of the network identification information, the electronic device can bring the values corresponding to the network strength, the network speed and the network analysis data of the network identification information into the row vector, and input the row vector into the trained deep learning model to obtain the network quality of the network identification information.
The deep learning model may be, but is not limited to, a feedforward neural network, and includes an input layer, a plurality of hidden layers, and an output layer, where the input layer may correspond to the input row vector, the plurality of hidden layers may calculate the input vector of the input layer using the RELU activation function, and the output layer may output a network quality. It is to be understood that the output result of the output layer may be embodied as a fractional value here. In the process of training the deep learning model, the row vectors converted by the sample network identification information of a plurality of known network qualities can be input into the deep learning model, the obtained network qualities can be combined with the corresponding known network qualities to be brought into a loss function for calculation, the calculation of the loss function is minimized by continuously adjusting parameters, and the deep learning model with the output network quality meeting the preset accuracy is used as the trained deep learning model in the verification process. The preset accuracy may be a proportion of the number of correct results in the output results of the plurality of deep learning models to all the output results, and may be set to 95% preferably.
Referring to fig. 10, fig. 10 is a diagram illustrating a network connection effect of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 10, after the electronic device determines to perform network connection with the wlan according to the matching result of the current location information and the location network database, a pop-up content "connected wlan | may be displayed on the current display interface 1000 of the electronic device! The prompt dialog box 1001, and a confirmation control 1002 and a change control 1003 are further provided below the text content of the prompt dialog box 1001, when the user selects the confirmation control 1002, the prompt dialog box 1001 may automatically disappear, and when the user selects the change control 1003, the current display interface 1000 may continue to pop up a selection box including names of other wlans, so that the user may select other wlans. Wherein, the popup content in the current display interface 1000 of the electronic device is "connected to the wireless local area network! The network connection state of the electronic device can be displayed as the wireless network connection state while the dialog box 1001 is prompted, and it can be understood that if the network connection state of the electronic device is the cellular network connection state before then, the cellular network connection state can be switched to the wireless network connection state.
Note that the present embodiment is not limited to the text presentation format of the presentation dialog 1001.
Referring to fig. 11, fig. 11 is a schematic structural diagram illustrating a network connection device according to an embodiment of the present disclosure.
As shown in fig. 11, the network connection apparatus 1100 may include at least a first obtaining module 1001, a first processing module 1102 and a connection module 1103, wherein:
a first obtaining module 1101, configured to obtain current location information of an electronic device;
a first processing module 1102, configured to match current location information with a location network database to obtain a matching result, where the location network database includes multiple pieces of location information and network identification information corresponding to the multiple pieces of location information;
a connection module 1103, configured to perform network connection on the electronic device according to the matching result.
In some possible embodiments, the network identification information includes first network identification information and second network identification information, the first network identification information being of a different network type than the second network identification information.
In some possible embodiments, the first network identification information includes one or more first network identifications, and each first network identification corresponds to a wireless local area network whose network quality satisfies a first preset condition.
In some possible embodiments, the second network identification information includes one or more second network identifications, each corresponding to a cellular network whose network quality satisfies a second preset condition.
In some possible embodiments, the method further comprises:
the second acquisition module is used for acquiring first network identification information and second network identification information corresponding to the position information;
the second processing module is used for writing the first network identification information corresponding to the network with the network quality meeting the third preset condition and the corresponding position information into the position network database if the network quality of the network corresponding to the first network identification information meets the third preset condition; or
The network quality monitoring device is used for determining all or part of second network identification information according to a preset rule if the first network identification information corresponds to a network of which the network quality does not meet a third preset condition;
and writing the first network identification information corresponding to the network with the network quality not meeting the third preset condition, all or part of the second network identification information and the corresponding position information into a position network database.
In some possible embodiments, the preset rules include:
sorting the second network identification information from high to low according to the network quality of the corresponding network;
and taking the part of the second network identification information which is ranked at the top as the whole or part of the second network identification information.
In some possible embodiments, the location network database includes a plurality of location information and first network identification information corresponding to a network whose network quality corresponding to each of the plurality of location information satisfies a third preset condition;
the first processing module 1102 is specifically configured to:
if the current position information is successfully matched with the position information in the position network database, taking the first network identification information corresponding to the network with the network quality meeting the third preset condition corresponding to the successfully matched position information as a matching result;
if the matching of the current position information and the position information in the position network database fails, determining all or part of second network identification information corresponding to the current position information according to a preset rule;
and taking all or part of the second network identification information as a matching result.
In some possible embodiments, the location network database includes a plurality of location information, first network identification information corresponding to a network whose network quality does not satisfy a third preset condition and corresponding to each of the plurality of location information, and all or part of second network identification information;
the first processing module 1102 is specifically configured to:
if the current position information is successfully matched with the position information in the position network database, taking all or part of second network identification information corresponding to the successfully matched position information as a matching result;
if the matching of the current position information and the position information in the position network database fails, acquiring first network identification information corresponding to a network of which the network quality corresponding to the current position information meets a third preset condition;
and taking the first network identification information corresponding to the network with the network quality meeting the third preset condition as a matching result.
In some possible embodiments, the first processing module 1102 is specifically configured to:
ordering the first network identification information corresponding to the network with the network quality meeting the third preset condition from high to low according to the network quality of the corresponding network;
and taking the first network identification information corresponding to the network of which the quality of the part of the network in the front sequence meets the third preset condition as a matching result.
In some possible embodiments, the connection module 1103 is specifically configured to:
ranking the network quality of the network corresponding to the network identification information from high to low according to the matching result;
and performing network connection on the electronic equipment according to the network identification information with the highest network quality ranking.
Referring to fig. 12, fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 12, the electronic device 1200 may include: at least one processor 1201, at least one network interface 1204, a user interface 1203, memory 1205, a touch screen 1206, and at least one communication bus 1202.
The communication bus 1202 may be used for implementing the connection communication of the above components.
The user interface 1203 may include keys, and the optional user interface may include a standard wired interface or a wireless interface.
The network interface 1204 may optionally include a bluetooth module, an NFC module, a Wi-Fi module, or the like.
Processor 1201 may include one or more processing cores, among others. The processor 1201 interfaces with various interfaces and circuitry throughout the electronic device 1200 to perform various functions of the routing device 1200 and to process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1205, as well as invoking data stored in the memory 1205. Optionally, the processor 1201 may be implemented in at least one hardware form of DSP, FPGA, or PLA. The processor 1201 may integrate one or a combination of several of a CPU, GPU, modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1201, and may be implemented by a single chip.
The memory 1205 may include RAM and ROM. Optionally, the memory 1205 includes a non-transitory computer-readable medium. The memory 1205 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1205 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1205 may also optionally be at least one storage device located remotely from the processor 1201 described previously. As shown in fig. 12, the memory 1205, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a network connection application program.
In particular, the processor 1201 may be configured to invoke a network connectivity application stored in the memory 1205, and specifically perform the following operations:
acquiring current position information of the electronic equipment;
matching the current position information with a position network database to obtain a matching result, wherein the position network database comprises a plurality of position information and network identification information corresponding to the position information; and
and performing network connection on the electronic equipment according to the matching result.
In some possible embodiments, the network identification information includes first network identification information and second network identification information, the first network identification information being of a different network type than the second network identification information.
In some possible embodiments, the first network identification information includes one or more first network identifications, and each first network identification corresponds to a wireless local area network whose network quality satisfies a first preset condition.
In some possible embodiments, the second network identification information includes one or more second network identifications, each corresponding to a cellular network whose network quality satisfies a second preset condition.
In some possible embodiments, the processor 1201 is further configured to perform:
acquiring first network identification information and second network identification information corresponding to the position information;
if the network quality of the network corresponding to the first network identification information meets a third preset condition, writing the first network identification information corresponding to the network with the network quality meeting the third preset condition and the corresponding position information into a position network database;
if the first network identification information corresponds to a network of which the network quality does not meet a third preset condition, determining all or part of second network identification information according to a preset rule;
and writing the first network identification information corresponding to the network with the network quality not meeting the third preset condition, all or part of the second network identification information and the corresponding position information into a position network database.
In some possible embodiments, the preset rules include:
sorting the second network identification information from high to low according to the network quality of the corresponding network;
and taking the part of the second network identification information which is ranked at the top as the whole or part of the second network identification information.
In some possible embodiments, the location network database includes a plurality of location information and first network identification information corresponding to a network whose network quality corresponding to each of the plurality of location information satisfies a third preset condition;
the processor 1201 matches the current location information with the location network database, and when a matching result is obtained, is specifically configured to execute:
if the current position information is successfully matched with the position information in the position network database, taking the first network identification information corresponding to the network with the network quality meeting the third preset condition corresponding to the successfully matched position information as a matching result;
if the matching of the current position information and the position information in the position network database fails, determining all or part of second network identification information corresponding to the current position information according to a preset rule;
and taking all or part of the second network identification information as a matching result.
In some possible embodiments, the location network database includes a plurality of location information, first network identification information corresponding to a network whose network quality does not satisfy a third preset condition and corresponding to each of the plurality of location information, and all or part of second network identification information;
the processor 1201 matches the current location information with the location network database, and when a matching result is obtained, is specifically configured to execute:
if the current position information is successfully matched with the position information in the position network database, taking all or part of second network identification information corresponding to the successfully matched position information as a matching result;
if the matching of the current position information and the position information in the position network database fails, acquiring first network identification information corresponding to a network of which the network quality corresponding to the current position information meets a third preset condition;
and taking the first network identification information corresponding to the network with the network quality meeting the third preset condition as a matching result.
In some possible embodiments, when the processor 1201 takes the first network identification information corresponding to the network whose network quality satisfies the third preset condition as the matching result, the processor is specifically configured to perform:
ordering the first network identification information corresponding to the network with the network quality meeting the third preset condition from high to low according to the network quality of the corresponding network;
and taking the first network identification information corresponding to the network of which the quality of the part of the network in the front sequence meets the third preset condition as a matching result.
In some possible embodiments, when the processor 1201 performs network connection on the electronic device according to the matching result, the processor is specifically configured to perform:
ranking the network quality of the network corresponding to the network identification information from high to low according to the matching result;
and performing network connection on the electronic equipment according to the network identification information with the highest network quality ranking.
Embodiments of the present application also provide a computer-readable storage medium having stored therein instructions, which when executed on a computer or processor, cause the computer or processor to perform one or more of the steps in the embodiments of fig. 4 or fig. 5 or fig. 8 or fig. 9 described above. The respective constituent modules of the electronic device described above may be stored in the computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. And the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks. The technical features in the present examples and embodiments may be arbitrarily combined without conflict.
The above-described embodiments are merely preferred embodiments of the present application, and are not intended to limit the scope of the present application, and various modifications and improvements made to the technical solutions of the present application by those skilled in the art without departing from the design spirit of the present application should fall within the protection scope defined by the claims of the present application.

Claims (13)

1. A network connection method, comprising:
acquiring current position information of the electronic equipment;
matching the current position information with a position network database to obtain a matching result, wherein the position network database comprises a plurality of position information and network identification information corresponding to the position information; and
and performing network connection on the electronic equipment according to the matching result.
2. The method of claim 1, wherein the network identification information comprises first network identification information and second network identification information, and wherein the first network identification information is of a different network type than the second network identification information.
3. The method according to claim 2, wherein the first network identification information includes one or more first network identifications, and each of the first network identifications corresponds to a wireless local area network whose network quality satisfies a first preset condition.
4. The method of claim 2, wherein the second network identification information comprises one or more second network identifications, and each of the second network identifications corresponds to a cellular network whose network quality satisfies a second predetermined condition.
5. The method according to any one of claims 2-4, further comprising:
acquiring first network identification information and second network identification information corresponding to the position information;
if the network quality of the network corresponding to the first network identification information meets a third preset condition, writing the first network identification information corresponding to the network of which the network quality meets the third preset condition and the corresponding position information into the position network database;
if the first network identification information corresponds to a network of which the network quality does not meet the third preset condition, determining all or part of the second network identification information according to a preset rule;
and writing the first network identification information corresponding to the network with the network quality not meeting the third preset condition, all or part of the second network identification information and the corresponding position information into a position network database.
6. The method of claim 5, wherein the preset rules comprise:
sorting the second network identification information from high to low according to the network quality of the corresponding network;
and taking the part of the second network identification information which is ranked at the top as the whole or part of the second network identification information.
7. The method according to claim 5, wherein the location network database comprises a plurality of location information and first network identification information corresponding to a network whose network quality satisfies the third preset condition and corresponding to each of the plurality of location information;
the matching the current position information with a position network database to obtain a matching result comprises:
if the current position information is successfully matched with the position information in the position network database, taking first network identification information corresponding to a network of which the network quality corresponding to the successfully matched position information meets the third preset condition as the matching result;
if the matching of the current position information and the position information in the position network database fails, determining all or part of second network identification information corresponding to the current position information according to the preset rule;
and using all or part of the second network identification information as the matching result.
8. The method according to claim 5, wherein the location network database comprises a plurality of location information, first network identification information corresponding to a network whose network quality does not satisfy the third preset condition and corresponding to each of the plurality of location information, and all or part of second network identification information;
the matching the current position information with a position network database to obtain a matching result comprises:
if the current position information is successfully matched with the position information in the position network database, taking all or part of second network identification information corresponding to the successfully matched position information as the matching result;
if the matching of the current position information and the position information in the position network database fails, acquiring first network identification information corresponding to a network of which the network quality corresponding to the current position information meets the third preset condition;
and taking the first network identification information corresponding to the network with the network quality meeting the third preset condition as the matching result.
9. The method according to claim 8, wherein the taking the first network identification information corresponding to the network whose network quality satisfies the third preset condition as the matching result includes:
sorting the first network identification information corresponding to the network with the network quality meeting the third preset condition from high to low according to the network quality of the corresponding network;
and taking the first network identification information corresponding to the network with the top-ranked part of the network quality meeting the third preset condition as the matching result.
10. The method of claim 1, wherein the network connecting the electronic device according to the matching result comprises:
ranking the network quality of the network corresponding to the network identification information from high to low according to the matching result;
and performing network connection on the electronic equipment according to the network identification information with the highest network quality ranking.
11. A network connection device, comprising:
the first acquisition module is used for acquiring the current position information of the electronic equipment;
the first processing module is used for matching the current position information with a position network database to obtain a matching result, wherein the position network database comprises a plurality of position information and network identification information corresponding to the position information;
and the connection module is used for carrying out network connection on the electronic equipment according to the matching result.
12. An electronic device comprising a processor and a memory;
the processor is connected with the memory;
the memory for storing executable program code;
the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the method of any one of claims 1-10.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202111003381.5A 2021-08-30 2021-08-30 Network connection method, device, storage medium and electronic equipment Pending CN113709665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111003381.5A CN113709665A (en) 2021-08-30 2021-08-30 Network connection method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111003381.5A CN113709665A (en) 2021-08-30 2021-08-30 Network connection method, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113709665A true CN113709665A (en) 2021-11-26

Family

ID=78656728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111003381.5A Pending CN113709665A (en) 2021-08-30 2021-08-30 Network connection method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113709665A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114641054A (en) * 2022-03-08 2022-06-17 浙江大华技术股份有限公司 Network connection method and device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106658588A (en) * 2016-12-21 2017-05-10 广东欧珀移动通信有限公司 Network quality detection method and device and computer equipment
CN108391298A (en) * 2018-05-25 2018-08-10 四川斐讯全智信息技术有限公司 A kind of system and electronic equipment of network automatic switchover
CN109548103A (en) * 2018-12-19 2019-03-29 连尚(新昌)网络科技有限公司 Method and apparatus for handover network
CN110856225A (en) * 2018-08-20 2020-02-28 中兴通讯股份有限公司 Network switching method, device, terminal and storage medium
CN110972234A (en) * 2019-11-28 2020-04-07 维沃移动通信有限公司 Network connection method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106658588A (en) * 2016-12-21 2017-05-10 广东欧珀移动通信有限公司 Network quality detection method and device and computer equipment
CN108391298A (en) * 2018-05-25 2018-08-10 四川斐讯全智信息技术有限公司 A kind of system and electronic equipment of network automatic switchover
CN110856225A (en) * 2018-08-20 2020-02-28 中兴通讯股份有限公司 Network switching method, device, terminal and storage medium
CN109548103A (en) * 2018-12-19 2019-03-29 连尚(新昌)网络科技有限公司 Method and apparatus for handover network
CN110972234A (en) * 2019-11-28 2020-04-07 维沃移动通信有限公司 Network connection method and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114641054A (en) * 2022-03-08 2022-06-17 浙江大华技术股份有限公司 Network connection method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US10832677B2 (en) Coordinating the execution of a voice command across multiple connected devices
US9778062B2 (en) Methods, devices, and computer program products for exchanging interactive map information
US20160012820A1 (en) Multilevel speech recognition method and apparatus
EP3248114A1 (en) Contextual search using natural language
US11036922B2 (en) Route information interaction method, electronic device, and computer storage medium
CN104092821A (en) Icon hiding method and system of mobile terminal
US8682965B2 (en) Remote support system and remote support method for terminal
CN110147237A (en) A kind of redundant resource minimizing technology and device
CN104050205A (en) Address information input method, address information acquisition method, address information input device, address information acquisition device, equipment, and address information input system
US20210073476A1 (en) Recording medium, conversation control method, and information processing apparatus
CN109313668B (en) System and method for constructing session understanding system
CN109190101A (en) Note reading generation method, device and electronic equipment
CN106293765A (en) A kind of layout updates method and device
US20140280053A1 (en) Contextual socially aware local search
CN107560617A (en) A kind of air navigation aid based on advertisement machine, storage medium and advertisement machine
US9565304B2 (en) Method and apparatus for providing audio content, user terminal and computer readable recording medium
CN102067633A (en) Method, apparatus, and computer program product for location sharing
CN105573128B (en) User device, driving method thereof, service providing apparatus, and driving method thereof
CN113709665A (en) Network connection method, device, storage medium and electronic equipment
JP2012028840A (en) Communication controller, communication control system, communication control method and program
US20140129228A1 (en) Method, System, and Relevant Devices for Playing Sent Message
CN110489106A (en) A kind of generation method, device, medium and the electronic equipment of project initial code
US8769169B2 (en) Assistive buffer usage techniques
KR102467492B1 (en) System and method for recommending travel itinerary based on real-time user environment
KR20210065629A (en) Chatbot integration agent platform system and service method thereof

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