WO2019061993A1 - Wi-fi hotspot connection method, device and storage medium - Google Patents

Wi-fi hotspot connection method, device and storage medium Download PDF

Info

Publication number
WO2019061993A1
WO2019061993A1 PCT/CN2018/076180 CN2018076180W WO2019061993A1 WO 2019061993 A1 WO2019061993 A1 WO 2019061993A1 CN 2018076180 W CN2018076180 W CN 2018076180W WO 2019061993 A1 WO2019061993 A1 WO 2019061993A1
Authority
WO
WIPO (PCT)
Prior art keywords
wifi
score
hotspots
wifi hotspots
hotspot
Prior art date
Application number
PCT/CN2018/076180
Other languages
French (fr)
Chinese (zh)
Inventor
金新
王建明
肖京
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019061993A1 publication Critical patent/WO2019061993A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a wifi hotspot connection method, an electronic device, and a computer readable storage medium.
  • the scanned wifi hotspot is displayed in the wireless local area network interface, and the user can manually connect the scanned wifi hotspot. If there is a connected wifi hotspot in the scanned hot spot, the system can The wifi hotspot automatically connects.
  • Wifi hotspots usually have a connection password to prevent the network and ensure communication security. In the wifi hotspot connection process, a password is required for the wifi hotspot with the password.
  • wifi hotspots there may be free wifi hotspots in the scanned list of wifi hotspots, such as: operator wifi hotspot (China Mobile, China Telecom, China Unicom), public wifi, merchant wifi hotspot, etc.
  • operator wifi hotspot China Mobile, China Telecom, China Unicom
  • public wifi public wifi
  • merchant wifi hotspot etc.
  • the user usually selects and manually connects to the scanned free wifi hotspot.
  • the wifi hotspot that causes the connection is usually not optimal, and the manual connection is not convenient enough to affect the user's online experience. Therefore, how to select a good wifi hotspot for the user to connect automatically is a very valuable and urgent problem to be solved.
  • the application provides a wifi hotspot connection method, an electronic device and a computer readable storage medium, the main purpose of which is to use the historical data of the wifi hotspot to calculate the score of the wifi hotspot using the real-time updated model, and select the optimal wifi hotspot for the user. And connect operations to enhance the user's online experience.
  • the present application provides a wifi hotspot connection method, and the method includes:
  • Receiving step receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
  • a model updating step updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model
  • the file is saved to the memory
  • a scoring step calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
  • a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
  • Connection step sequentially try to connect the plurality of wifi hotspots according to the sorting result.
  • the method further comprises the steps of:
  • the client After the client successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is really available. If the wifi hotspot is unavailable, the wifi hotspot after the wifi hotspot is continuously connected.
  • the present application further provides an electronic device, including: a memory, a processor, and a wifi hotspot connection program stored on the memory, where the wifi hotspot connection program is executed by the processor Implement the following steps:
  • Receiving step receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
  • a model updating step updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model
  • the file is saved to the memory
  • a scoring step calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
  • a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
  • Connection step sequentially try to connect the plurality of wifi hotspots according to the sorting result.
  • the present application further provides a computer readable storage medium, where the wifi hotspot connection program is stored on the computer readable storage medium, and the wifi hotspot connection program is executed by the processor to implement the foregoing The steps of the wifi hotspot connection method.
  • the wifi hotspot connection method, the electronic device and the computer readable storage medium proposed by the present application calculate the probability that the wifi hotspot may be successfully connected in the future by acquiring the historical data of the wifi hotspot, and then according to the wifi hotspot signal strength.
  • the score points are used to sort the wifi hotspots, and finally the user selects the optimal wifi hotspot and performs the connection operation to improve the user's online experience.
  • FIG. 1 is a schematic diagram of a preferred embodiment of an electronic device of the present application.
  • FIG. 2 is a schematic block diagram of a preferred embodiment of the wifi hotspot connection procedure of FIG. 1;
  • FIG. 3 is a flowchart of a preferred embodiment of a method for connecting a WiFi hotspot according to the present application.
  • the application provides an electronic device 1 .
  • FIG. 1 it is a schematic diagram of a preferred embodiment of the electronic device 1 of the present application.
  • the electronic device 1 includes a memory 11, a processor 12, a network interface 13, and a communication bus 14.
  • the electronic device 1 may be a terminal device having a computing function, such as a server, a smart phone, a tablet computer, a portable computer, a desktop computer, etc.
  • the server may be a rack server, a blade server, or a tower. Server or rack server, etc.
  • the network interface 13 may include a standard wired interface, a wireless interface (such as a WI-FI interface). Usually used to connect to the client (not shown in Figure 1).
  • the electronic device 1 connects the plurality of clients 2 through the network interface 13.
  • the client 2 can be a terminal device with a wireless local area network configuration such as a notebook, a tablet, a smart phone, or an e-book reader.
  • Communication bus 14 is used to implement connection communication between these components.
  • the memory 11 includes at least one type of readable storage medium.
  • the at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1.
  • the readable storage medium may also be an external storage device of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC). , Secure Digital (SD) card, Flash Card, etc.
  • SMC smart memory card
  • SD Secure Digital
  • the readable storage medium of the memory 11 is generally used to store a wifi hotspot connection program installed on the electronic device 1, a recently connected wifi hotspot collected by the client 2, and historical data of the user, in advance. Determine good and updated logistic regression models, etc.
  • the memory 11 can also be used to temporarily store data that has been output or is about to be output.
  • the processor 12 may be a Central Processing Unit (CPU), a microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing a wifi hotspot connection. Programs, etc.
  • CPU Central Processing Unit
  • microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing a wifi hotspot connection. Programs, etc.
  • FIG. 1 shows only the electronic device 1 having the components 11-14 and the wifi hotspot connection program 10, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the electronic device 1 may further include a user interface
  • the user interface may include an input unit such as a keyboard
  • the optional user interface may further include a standard wired interface and a wireless interface.
  • the electronic device 1 may further include a display, and in some embodiments, an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch sensor.
  • the display is used to display information processed in the electronic device and a user interface for displaying visualizations.
  • the electronic device 1 may further include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a wifi module, and the like, and details are not described herein.
  • RF Radio Frequency
  • a wifi hotspot connection program 10 is stored in the memory 11 as a computer storage medium.
  • the processor 12 executes the wifi hotspot connection program 10 stored in the memory 11, the following steps are implemented:
  • Receiving step receiving the available plurality of wifi hotspots scanned by the client 2 and the historical data of the plurality of wifi hotspots in the first preset time.
  • the client 2 used by each user is installed with the client 2 version of the wifi hotspot connection program (hereinafter referred to as APP), and the client 2 performs the connection wifi hotspot operation through the APP.
  • the APP continuously scans the plurality of wifi hotspots available at the current location through the client 2, and the electronic device 1 receives the plurality of wifi hotspots scanned by the APP through the client 2, and collects the users for the first preset time (nearly three months).
  • the historical data of the multiple wifi hotspots accessed in the system including: the name of the wifi, the time of the accessed time, the operation status (connection success, connection failure, login success, login failure, etc.), the frequency of access, whether the operator Provide and so on.
  • the electronic device 1 uploads the historical data to the log server, and extracts key historical data, such as wifi identification, time, location, connection operation, online time length, connection success times, and the like, through the data warehouse technology (Extract-Transform-Load, ETL).
  • ETL Extract-Transform-Load
  • the number of connection failures, the number of retries, the number of successful logins, the number of failed logins, etc., are saved in the memory 11 for subsequent model update and scoring operations.
  • a model updating step updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to memory.
  • the predetermined logistic regression model is obtained by offline training: analyzing the key data, constructing a model from a time dimension, an operator/share hotspot dimension, a connection/login/retry/online time statistics, and the like. Feature, determine the model label; count the frequency and data volume of the user using the wifi hotspot by month and day, determine the length of the last three months, the most recent week, plus "operator/share hotspot", "connection/login
  • the /retry/online time dimension combines into a series of features, such as the connection success rate of the carrier in the most recent month, and the number of retries of the wifi hotspot in the most recent week.
  • the key historical data of the last three months is used as a training set, and the random forest model is trained to obtain a logistic regression model for scoring the wifi hotspot, and the model file of the logistic regression model is saved into the memory 11.
  • the model file of the logistic regression model is saved into the memory 11.
  • the advantage of the offline training model is that there is a large amount of historical data and the sample is sufficient.
  • the advantage of the online training model is that it can use the latest data, the model can adapt to the changes of real-time data, and the online model is more accurate in the case of large data distribution and historical gap.
  • the above-mentioned logistic regression model is updated every second preset time (for example, one day).
  • model training is the process of iteratively solving model parameters using sample data using an optimization algorithm.
  • the goal of the iterative calculation of the optimization algorithm is to minimize the loss function value of the model.
  • L-BFGS algorithm Lited-memory Broyden–Fletcher–Goldfarb–Shanno
  • the offline model result in the online environment, using the FTRL-Proximal algorithm (Follow The (Proximally) Regularized Leader), load the set S0 as the initial value, and use the data of the next real-time arrived wifi hotspot to perform a calculation, and the calculation result is The new parameter value set S1; and so on, when another real-time data arrives, S1 is used as an input, and the result S2 is calculated, and the latest calculation result Sn is the latest model.
  • FTRL-Proximal algorithm Frallow The (Proximally) Regularized Leader
  • the scoring step calculating the first score of the plurality of wifi hotspots according to historical data in the first preset time and the updated logistic regression model.
  • the model file of the logistic regression model is called from the memory 11, and the historical data of the plurality of wifi hotspots within three months is retrieved from the memory 11
  • the input model obtains a first score of the plurality of wifi hotspots, that is, a probability that the plurality of wifi hotspots may be successfully connected in the future.
  • a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot.
  • the first score of the plurality of wifi hotspots is adjusted according to a predetermined weight reduction rule.
  • the predetermined decrement rule includes: reading the number of connection failures of the plurality of wifi hotspots in the third preset time in the historical data; and when the number of connection failures is less than the first preset threshold, retaining the a first score of the plurality of wifi hotspots as a second score of the plurality of wifi hotspots; when the number of connection failures is greater than a first preset threshold and less than a second preset threshold, the plurality of wifi hotspots are Multiplying the first score by the first coefficient as the second score of the plurality of wifi hotspots; and, when the number of connection failures is greater than the second predetermined threshold, multiplying the first score of the plurality of wifi hotspots Taking the second coefficient as the second score of the plurality of wifi hotspots.
  • the first scores of wifi hotspots A, B, and C are: 9.0, 8.5, and 9.5, respectively.
  • the third preset time is 30 min
  • the first preset threshold is 5
  • the second preset threshold is 10
  • the first coefficient is 0.8
  • the second coefficient is 0.4
  • the wifi hotspots A, B, and C are read within 30 minutes.
  • the number of connection failures is 8, 3, and 15, respectively.
  • the number of connection failures of the wifi hotspot A within 30 minutes is greater than the first preset threshold and less than the second predetermined threshold, so the second score of the wifi hotspot A is 7.2;
  • the number of connection failures of the wifi hotspot B within 30 minutes is less than the first preset threshold, so the second score of the wifi hotspot B is 8.5;
  • the number of connection failures of the wifi hotspot C within 30 minutes is greater than the second preset threshold, so the wifi hotspot
  • the second score for C is 3.8.
  • the logistic regression model cannot calculate the first score of the wifi hotspot, and cannot calculate the second score of the wifi hotspot.
  • the logistic regression model cannot calculate the first score of the wifi hotspot, and cannot calculate the second score of the wifi hotspot.
  • the default score is inconsistent with the average of the second scores of the other plurality of wifi hotspots, the second score is taken as the wifi hotspot of this type with a high score.
  • the sorting step sorting the plurality of wifi hotspots according to the signal strength of the plurality of wifi hotspots and the level of the second score.
  • the sorting step includes:
  • Sorting the plurality of wifi hotspots according to a sequence of strengths of the current signal strengths of the plurality of wifi hotspots (A B>C); for two or more wifis whose current signal strength is in the same signal strength interval
  • the hotspot is sorted according to the order of the second scores of the two or more wifi hotspots (B>A), so the final sorting result is B, A, C.
  • Connection step sequentially try to connect the plurality of wifi hotspots according to the sorting result.
  • the electronic device sequentially connects the wifi hotspots B, A, and C according to the order of the wifi hotspots B, A, and C.
  • the client 2 After the client 2 successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is truly available. If the wifi hotspot is unavailable, continue to connect the wifi hotspot after the wifi hotspot. . Assuming that the fourth preset time is 10s, when the client 2 successfully connects to a wifi hotspot B within 10s, it is detected whether the wifi hotspot B is actually available, for example, using the "ping" command to check whether the network of the wifi hotspot B is connected, analyzing and Determine if there is a network failure in wifi hotspot B.
  • the wifi hotspot B is not successfully connected for more than the fourth preset time 10s, or the wifi hotspot B is detected to have a network fault, it is understood that the wifi hotspot B is unavailable, and continues to the wifi hotspot after the wifi hotspot. (A, C) to perform the connection operation.
  • the first preset time to the fourth preset time, the preset default score, the predetermined weight reduction rule, and the like need to be preset parameters and rules, and the user can adjust according to actual conditions.
  • the electronic device 1 in this embodiment obtains a logistic regression model for calculating a wifi hotspot score in real time by acquiring historical data of a wifi hotspot, and calculates a probability that a wifi hotspot may be successfully connected in the future, and then according to the wifi hotspot signal strength and the score score.
  • the wifi hotspots are sorted, and finally the user selects the optimal wifi hotspot and performs the connection operation to improve the user's online experience.
  • the wifi hotspot connection program 10 may also be divided into one or more modules, one or more modules are stored in the memory 11 and executed by one or more processors, such as the present embodiment.
  • the processor 12 in the example executes to complete the application.
  • a module as referred to in this application refers to a series of computer program instructions that are capable of performing a particular function.
  • the wifi hotspot connection program 10 can be divided into: a receiving module 110, an updating module 120, a first scoring module 130, a second scoring module 140, a sorting module 150, and a connecting module 160.
  • the functions or operational steps implemented by the modules 110-160 are similar to the above, and are not described in detail herein, by way of example, for example:
  • the receiving module 110 is configured to receive, by the client, the available multiple wifi hotspots and the historical data of the multiple wifi hotspots in the first preset time;
  • the update module 120 is configured to update the predetermined logistic regression model by using the historical data of the plurality of wifi hotspots in the second preset time every second preset time, and the updated logistic regression model
  • the model file is saved to the memory
  • the first scoring module 130 is configured to calculate a first score of the multiple wifi hotspots according to historical data in the first preset time and the updated logistic regression model;
  • the second scoring module 140 is configured to read the number of connection failures of the multiple wifi hotspots in a third preset time, and adjust the first score of the multiple wifi hotspots according to a predetermined decrement rule. a second score of the plurality of wifi hotspots;
  • the sorting module 150 is configured to sort the plurality of wifi hotspots according to the signal strength of the plurality of wifi hotspots and the level of the second grading;
  • the connection module 160 is configured to sequentially connect the plurality of wifi hotspots according to the sorting result.
  • the application also provides a wifi hotspot connection method.
  • FIG. 3 it is a flowchart of the first embodiment of the wifi hotspot connection method of the present application. The method can be performed by a device that can be implemented by software and/or hardware.
  • the wifi hotspot connection method includes: step S10, step S20, step S30, step S40, step S50, and step S60.
  • Step S10 Receive historical data of the plurality of available wifi hotspots scanned by the client and the plurality of wifi hotspots in the first preset time.
  • the client version used by each user is installed with a client version of the wifi hotspot connection program (hereinafter referred to as APP), and the client connects to the wifi hotspot operation through the APP.
  • the APP continuously scans multiple wifi hotspots available at the current location through the client, and the electronic device receives multiple wifi hotspots scanned by the APP through the client, and collects the users to access within the first preset time (nearly three months).
  • the historical data of the plurality of wifi hotspots includes: the name of the wifi, the time of the accessed time, the operation status (connection success, connection failure, login success, login failure, etc.), frequency of access, availability by the operator, and the like.
  • the electronic device uploads the historical data to the log server, and extracts key historical data through the data warehouse technology (ETL), such as wifi identification, time, location, connection operation, internet connection duration, number of connection successes, number of connection failures, number of retries, The number of successful logins, the number of failed logins, etc., are saved to the memory for subsequent model update and scoring operations.
  • ETL data warehouse technology
  • Step S20 The second predetermined time is used to update the predetermined logistic regression model by using the historical data of the plurality of wifi hotspots in the second preset time, and the model file of the updated logistic regression model is to be updated. Save to memory.
  • the predetermined logistic regression model is obtained by offline training: analyzing the key data, constructing a model from a time dimension, an operator/share hotspot dimension, a connection/login/retry/online time statistics, and the like. Feature, determine the model label; count the frequency and data volume of the user using the wifi hotspot by month and day, determine the length of the last three months, the most recent week, plus "operator/share hotspot", "connection/login
  • the /retry/online time dimension combines into a series of features, such as the connection success rate of the carrier in the most recent month, and the number of retries of the wifi hotspot in the most recent week.
  • the random forest model is trained to obtain a logistic regression model for scoring the wifi hotspot, and the model file of the logistic regression model is saved into the memory.
  • the model file of the logistic regression model is saved into the memory.
  • the advantage of the offline training model is that there is a large amount of historical data and the sample is sufficient.
  • the advantage of the online training model is that it can use the latest data, the model can adapt to the changes of real-time data, and the online model is more accurate in the case of large data distribution and historical gap.
  • the above-mentioned logistic regression model is updated every second preset time (for example, one day).
  • model training is the process of iteratively solving model parameters using sample data using an optimization algorithm.
  • the goal of the iterative calculation of the optimization algorithm is to minimize the loss function value of the model.
  • For the logistic regression model we use the L-BFGS algorithm training in the offline environment to obtain the parameter set S0, which is the offline model result; in the online environment, the FTRL- The Proximal algorithm loads the set S0 as the initial value and uses the data of the next real-time arrived wifi hotspot to perform a calculation.
  • the result of the calculation is a new parameter value set S1; and so on, when a real-time data arrives, S1 is used as the initial value. Input, the result S2 is calculated, and the latest calculation result Sn is the latest model.
  • Step S30 Calculate a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model. After receiving the plurality of wifi hotspots sent by the client APP, calling the model file of the logistic regression model and the historical data of the plurality of wifi hotspots within three months from the memory, inputting the model into the model, and obtaining the plurality of The first score of the wifi hotspots, that is, the probability that the plurality of wifi hotspots may be successfully connected in the future.
  • step S40 the number of connection failures of the plurality of wifi hotspots in the third preset time is read, and the first scores of the plurality of wifi hotspots are adjusted according to a predetermined decrement rule to obtain the plurality of wifis.
  • the second rating of the hotspot in order to further ensure the reliability of the first score of the plurality of wifi hotspots, the first score of the plurality of wifi hotspots is adjusted according to a predetermined weight reduction rule.
  • the predetermined decrement rule includes: reading the number of connection failures of the plurality of wifi hotspots in the third preset time in the historical data; and when the number of connection failures is less than the first preset threshold, retaining the a first score of the plurality of wifi hotspots as a second score of the plurality of wifi hotspots; when the number of connection failures is greater than a first preset threshold and less than a second preset threshold, the plurality of wifi hotspots are Multiplying the first score by the first coefficient as the second score of the plurality of wifi hotspots; and, when the number of connection failures is greater than the second predetermined threshold, multiplying the first score of the plurality of wifi hotspots Taking the second coefficient as the second score of the plurality of wifi hotspots.
  • the first scores of wifi hotspots A, B, and C are: 9.0, 8.5, and 9.5, respectively.
  • the third preset time is 30 min
  • the first preset threshold is 5
  • the second preset threshold is 10
  • the first coefficient is 0.8
  • the second coefficient is 0.4
  • the wifi hotspots A, B, and C are read within 30 minutes.
  • the number of connection failures is 8, 3, and 15, respectively.
  • the number of connection failures of the wifi hotspot A within 30 minutes is greater than the first preset threshold and less than the second predetermined threshold, so the second score of the wifi hotspot A is 7.2;
  • the number of connection failures of the wifi hotspot B within 30 minutes is less than the first preset threshold, so the second score of the wifi hotspot B is 8.5;
  • the number of connection failures of the wifi hotspot C within 30 minutes is greater than the second preset threshold, so the wifi hotspot
  • the second score for C is 3.8.
  • the logistic regression model cannot calculate the first score of the wifi hotspot, and cannot calculate the second score of the wifi hotspot.
  • the logistic regression model cannot calculate the first score of the wifi hotspot, and cannot calculate the second score of the wifi hotspot.
  • the default score is inconsistent with the average of the second scores of the other plurality of wifi hotspots, the second score is taken as the wifi hotspot of this type with a high score.
  • Step S50 Sort the plurality of wifi hotspots according to the signal strength of the plurality of wifi hotspots and the level of the second score.
  • the sorting step includes:
  • Sorting the plurality of wifi hotspots according to a sequence of strengths of the current signal strengths of the plurality of wifi hotspots (A B>C); for two or more wifis whose current signal strength is in the same signal strength interval
  • the hotspot is sorted according to the order of the second scores of the two or more wifi hotspots (B>A), so the final sorting result is B, A, C.
  • Step S60 sequentially attempting to connect the plurality of wifi hotspots according to the sorting result.
  • the electronic device sequentially connects the wifi hotspots B, A, and C according to the order of the wifi hotspots B, A, and C.
  • the client successfully connects to a wifi hotspot in the fourth preset time it is detected whether the wifi hotspot is actually available. If the wifi hotspot is unavailable, the wifi hotspot after the wifi hotspot is continuously connected. Assume that the fourth preset time is 10s.
  • the client successfully connects to a wifi hotspot B within 10s it is detected whether the wifi hotspot B is actually available. For example, use the "ping" command to check whether the network of the wifi hotspot B is connected, analyze and determine. Whether there is a network failure in wifi hotspot B.
  • the wifi hotspot B is not successfully connected for more than the fourth preset time 10s, or the wifi hotspot B is detected to have a network fault, it is understood that the wifi hotspot B is unavailable, and continues to the wifi hotspot after the wifi hotspot. (A, C) to perform the connection operation.
  • the first preset time to the fourth preset time, the preset default score, the predetermined weight reduction rule, and the like need to be preset parameters and rules, and the user can adjust according to actual conditions.
  • the wifi hotspot connection method proposed in this embodiment obtains a logistic regression model for calculating a wifi hotspot score in real time by acquiring historical data of the wifi hotspot, and calculates a probability that the wifi hotspot may be successfully connected in the future, and then according to the wifi hotspot signal strength and the score score. Sort the wifi hotspots, and finally select the best wifi hotspots for the user and connect them to improve the user's online experience.
  • the embodiment of the present application further provides a computer readable storage medium, where the wifi hotspot connection program is stored, and when the wifi hotspot connection program is executed by the processor, the following operations are implemented:
  • Receiving step receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
  • a model updating step updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model
  • the file is saved to the memory
  • a scoring step calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
  • a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
  • Connection step sequentially try to connect the plurality of wifi hotspots according to the sorting result.
  • the specific implementation manner of the computer readable storage medium of the present application is substantially the same as the specific implementation manner of the wifi hotspot connection method, and details are not described herein again.
  • a disk including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Theoretical Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Signal Processing (AREA)
  • Mathematical Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Evolutionary Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Algebra (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A Wi-Fi hotspot connection method, a device and a storage medium. The method comprises: receiving a plurality of available Wi-Fi hotspots scanned by a client, and historical data of the plurality of Wi-Fi hotspots within a first preset time; updating a predetermined logistic regression model every second preset time; calculating first scores of the plurality of Wi-Fi hotspots according to the historical data within the first preset time and the updated logistic regression model; reading the number of connection failures of the plurality of Wi-Fi hotspots within a third preset time, and obtaining second scores of the plurality of Wi-Fi hotspots according to a predetermined weight reduction rule; sorting the plurality of Wi-Fi hotspots according to the signal strengths and the second scores of the plurality of Wi-Fi hotspots; and sequentially trying to connect the plurality of Wi-Fi hotspots according to the sorting result. The present application uses the historical data of the Wi-Fi hotspots to select an optimal Wi-Fi hotspot for the user, improving the user's internet browsing experience.

Description

wifi热点连接方法、装置及存储介质Wifi hotspot connection method, device and storage medium
优先权申明Priority claim
本申请基于巴黎公约申明享有2017年9月26日递交的申请号为CN201710884576.2、名称为“wifi热点连接方法、装置及存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合本申请中。The present application is based on the priority of the Chinese Patent Application filed on September 26, 2017, filed on September 26, 2017, with the application number of CN201710884576.2, entitled "wifi hotspot connection method, device and storage medium", the overall content of the Chinese patent application This application is incorporated by reference.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种wifi热点连接方法、电子装置及计算机可读存储介质。The present application relates to the field of computer technologies, and in particular, to a wifi hotspot connection method, an electronic device, and a computer readable storage medium.
背景技术Background technique
当移动终端启动无线局域网功能时,无线局域网界面中会显示扫描出的wifi热点,用户可对扫描出wifi热点进行手动连接,若扫描出的热点中存在曾连接过的wifi热点,则系统可对该wifi热点自动进行连接。wifi热点通常设有连接密码,可防止蹭网和确保通信安全。在wifi热点连接过程中,对于设有密码的wifi热点,需输入密码。When the mobile terminal starts the wireless local area network function, the scanned wifi hotspot is displayed in the wireless local area network interface, and the user can manually connect the scanned wifi hotspot. If there is a connected wifi hotspot in the scanned hot spot, the system can The wifi hotspot automatically connects. Wifi hotspots usually have a connection password to prevent the network and ensure communication security. In the wifi hotspot connection process, a password is required for the wifi hotspot with the password.
根据移动终端的位置,扫描出的wifi热点列表中,可存在免费wifi热点,如:运营商wifi热点(中国移动、中国电信、中国联通)、公共wifi、商家wifi热点等。用户对于扫描出的免费wifi热点,通常随意选择并进行手动连接,随意选择导致连接的wifi热点通常不是最优的,手动连接也不够方便,影响用户上网体验。因此,如何为用户挑选出好用的wifi热点自动连接,是一个非常有价值且亟待解决的问题。According to the location of the mobile terminal, there may be free wifi hotspots in the scanned list of wifi hotspots, such as: operator wifi hotspot (China Mobile, China Telecom, China Unicom), public wifi, merchant wifi hotspot, etc. The user usually selects and manually connects to the scanned free wifi hotspot. The wifi hotspot that causes the connection is usually not optimal, and the manual connection is not convenient enough to affect the user's online experience. Therefore, how to select a good wifi hotspot for the user to connect automatically is a very valuable and urgent problem to be solved.
发明内容Summary of the invention
本申请提供一种wifi热点连接方法、电子装置及计算机可读存储介质,其主要目的在于,利用wifi热点的历史数据,利用实时更新的模型计算wifi热点的评分,为用户挑选最优的wifi热点并进行连接操作,提升用户上网体验。The application provides a wifi hotspot connection method, an electronic device and a computer readable storage medium, the main purpose of which is to use the historical data of the wifi hotspot to calculate the score of the wifi hotspot using the real-time updated model, and select the optimal wifi hotspot for the user. And connect operations to enhance the user's online experience.
为实现上述目的,本申请提供一种wifi热点连接方法,该方法包括:To achieve the above objective, the present application provides a wifi hotspot connection method, and the method includes:
接收步骤:接收客户端扫描到的可用的多个wifi热点及所述多个wifi热 点在第一预设时间内的历史数据;Receiving step: receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
模型更新步骤:每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中;a model updating step: updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to the memory;
评分步骤:根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分;a scoring step: calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
评分调整步骤:读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分;a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序;及a sorting step of: sorting the plurality of wifi hotspots according to a signal strength of the plurality of wifi hotspots and a level of the second grading; and
连接步骤:按照排序结果依次尝试连接所述多个wifi热点。Connection step: sequentially try to connect the plurality of wifi hotspots according to the sorting result.
优选地,该方法还包括以下步骤:Preferably, the method further comprises the steps of:
当客户端在第四预设时间内成功连接一个wifi热点后,检测该wifi热点是否真正可用,若该wifi热点不可用,继续对排在该wifi热点后的wifi热点进行连接操作。After the client successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is really available. If the wifi hotspot is unavailable, the wifi hotspot after the wifi hotspot is continuously connected.
此外,为实现上述目的,本申请还提供一种电子装置,该电子装置包括:存储器、处理器,所述存储器上存储有wifi热点连接程序,所述wifi热点连接程序被所述处理器执行时实现如下步骤:In addition, in order to achieve the above object, the present application further provides an electronic device, including: a memory, a processor, and a wifi hotspot connection program stored on the memory, where the wifi hotspot connection program is executed by the processor Implement the following steps:
接收步骤:接收客户端扫描到的可用的多个wifi热点及所述多个wifi热点在第一预设时间内的历史数据;Receiving step: receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
模型更新步骤:每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中;a model updating step: updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to the memory;
评分步骤:根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分;a scoring step: calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
评分调整步骤:读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分;a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序;及a sorting step of: sorting the plurality of wifi hotspots according to a signal strength of the plurality of wifi hotspots and a level of the second grading; and
连接步骤:按照排序结果依次尝试连接所述多个wifi热点。Connection step: sequentially try to connect the plurality of wifi hotspots according to the sorting result.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有wifi热点连接程序,所述wifi热点连接程序被处理器执行时实现如上所述的wifi热点连接方法的步骤。In addition, in order to achieve the above object, the present application further provides a computer readable storage medium, where the wifi hotspot connection program is stored on the computer readable storage medium, and the wifi hotspot connection program is executed by the processor to implement the foregoing The steps of the wifi hotspot connection method.
相较于现有技术,本申请提出的wifi热点连接方法、电子装置及计算机可读存储介质,通过获取wifi热点的历史数据,计算wifi热点未来可能连接成功的概率,然后依次根据wifi热点信号强度、评分分值对wifi热点进行排序,最后为用户挑选最优的wifi热点并进行连接操作,提升用户上网体验。Compared with the prior art, the wifi hotspot connection method, the electronic device and the computer readable storage medium proposed by the present application calculate the probability that the wifi hotspot may be successfully connected in the future by acquiring the historical data of the wifi hotspot, and then according to the wifi hotspot signal strength. The score points are used to sort the wifi hotspots, and finally the user selects the optimal wifi hotspot and performs the connection operation to improve the user's online experience.
附图说明DRAWINGS
图1为本申请电子装置较佳实施例的示意图;1 is a schematic diagram of a preferred embodiment of an electronic device of the present application;
图2为图1中wifi热点连接程序较佳实施例的模块示意图;2 is a schematic block diagram of a preferred embodiment of the wifi hotspot connection procedure of FIG. 1;
图3为本申请wifi热点连接方法较佳实施例的流程图。FIG. 3 is a flowchart of a preferred embodiment of a method for connecting a WiFi hotspot according to the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
本申请提供一种电子装置1。参照图1所示,为本申请电子装置1较佳实施例的示意图。在本实施例中,该电子装置1包括存储器11、处理器12,网络接口13及通信总线14。The application provides an electronic device 1 . Referring to FIG. 1 , it is a schematic diagram of a preferred embodiment of the electronic device 1 of the present application. In the embodiment, the electronic device 1 includes a memory 11, a processor 12, a network interface 13, and a communication bus 14.
电子装置1可以是服务器、智能手机、平板电脑、便携计算机、桌上型计算机等具有运算功能的终端设备,在一些实施例中,所述服务器可以是机 架式服务器、刀片式服务器、塔式服务器或机柜式服务器等。The electronic device 1 may be a terminal device having a computing function, such as a server, a smart phone, a tablet computer, a portable computer, a desktop computer, etc., in some embodiments, the server may be a rack server, a blade server, or a tower. Server or rack server, etc.
网络接口13可以包括标准的有线接口、无线接口(如WI-FI接口)。通常用于连接客户端(图1中未标出)。在本实施例中,电子装置1通过网络接口13连接多个客户端2。其中,所述客户端2可以为笔记本、平板电脑、智能手机、电子书阅读器等具有无线局域网配置的终端设备。The network interface 13 may include a standard wired interface, a wireless interface (such as a WI-FI interface). Usually used to connect to the client (not shown in Figure 1). In the embodiment, the electronic device 1 connects the plurality of clients 2 through the network interface 13. The client 2 can be a terminal device with a wireless local area network configuration such as a notebook, a tablet, a smart phone, or an e-book reader.
通信总线14用于实现这些组件之间的连接通信。Communication bus 14 is used to implement connection communication between these components.
存储器11包括至少一种类型的可读存储介质。所述至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,所述可读存储介质可以是所述电子装置1的内部存储单元,例如该电子装置1的硬盘。在另一些实施例中,所述可读存储介质也可以是所述电子装置1的外部存储设备,例如所述电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1. In other embodiments, the readable storage medium may also be an external storage device of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC). , Secure Digital (SD) card, Flash Card, etc.
在本实施例中,所述存储器11的可读存储介质通常用于存储安装于所述电子装置1的wifi热点连接程序、客户端2收集的近期连接过的wifi热点及用户的历史数据、预先确定好的及更新后的逻辑回归模型等。所述存储器11还可以用于暂时地存储已经输出或者将要输出的数据。In this embodiment, the readable storage medium of the memory 11 is generally used to store a wifi hotspot connection program installed on the electronic device 1, a recently connected wifi hotspot collected by the client 2, and historical data of the user, in advance. Determine good and updated logistic regression models, etc. The memory 11 can also be used to temporarily store data that has been output or is about to be output.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行wifi热点连接程序等。The processor 12, in some embodiments, may be a Central Processing Unit (CPU), a microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing a wifi hotspot connection. Programs, etc.
图1仅示出了具有组件11-14以及wifi热点连接程序10的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。1 shows only the electronic device 1 having the components 11-14 and the wifi hotspot connection program 10, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
可选的,该电子装置1还可以包括用户接口,用户接口可以包括输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。Optionally, the electronic device 1 may further include a user interface, and the user interface may include an input unit such as a keyboard, and the optional user interface may further include a standard wired interface and a wireless interface.
可选地,该电子装置1还可以包括显示器(Display),在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。显示器用于显示在电子装置中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a display, and in some embodiments, an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch sensor. . The display is used to display information processed in the electronic device and a user interface for displaying visualizations.
可选地,该电子装置1还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、wifi模块等等,在此不再赘述。Optionally, the electronic device 1 may further include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a wifi module, and the like, and details are not described herein.
在图1所示的装置实施例中,作为一种计算机存储介质的存储器11中存储有wifi热点连接程序10,处理器12执行存储器11中存储的wifi热点连接程序10时实现如下步骤:In the apparatus embodiment shown in FIG. 1, a wifi hotspot connection program 10 is stored in the memory 11 as a computer storage medium. When the processor 12 executes the wifi hotspot connection program 10 stored in the memory 11, the following steps are implemented:
接收步骤:接收客户端2扫描到的可用的多个wifi热点及所述多个wifi热点在第一预设时间内的历史数据。Receiving step: receiving the available plurality of wifi hotspots scanned by the client 2 and the historical data of the plurality of wifi hotspots in the first preset time.
例如,各用户使用的客户端2上均安装有wifi热点连接程序的客户端2版本(之后简称APP),客户端2通过该APP进行连接wifi热点操作。该APP通过客户端2持续扫描在当前位置可用的多个wifi热点,电子装置1接收APP通过客户端2扫描到的多个wifi热点,并收集各用户在第一预设时间(近三个月)内访问过的该多个wifi热点的历史数据,包括:wifi的名称、被访问时间及时长、操作状态(连接成功、连接失败、登陆成功、登陆失败等)、被访问频次、是否运营商提供等。电子装置1将历史数据上传到日志服务器,并经过数据仓库技术(Extract-Transform-Load,简称ETL)抽取出关键历史数据,如wifi标识、时间、位置、连接操作、上网时长、连接成功次数、连接失败次数、重试次数、登陆成功次数、登陆失败次数等,保存至存储器11中,供后续进行模型更新及评分操作。For example, the client 2 used by each user is installed with the client 2 version of the wifi hotspot connection program (hereinafter referred to as APP), and the client 2 performs the connection wifi hotspot operation through the APP. The APP continuously scans the plurality of wifi hotspots available at the current location through the client 2, and the electronic device 1 receives the plurality of wifi hotspots scanned by the APP through the client 2, and collects the users for the first preset time (nearly three months). The historical data of the multiple wifi hotspots accessed in the system, including: the name of the wifi, the time of the accessed time, the operation status (connection success, connection failure, login success, login failure, etc.), the frequency of access, whether the operator Provide and so on. The electronic device 1 uploads the historical data to the log server, and extracts key historical data, such as wifi identification, time, location, connection operation, online time length, connection success times, and the like, through the data warehouse technology (Extract-Transform-Load, ETL). The number of connection failures, the number of retries, the number of successful logins, the number of failed logins, etc., are saved in the memory 11 for subsequent model update and scoring operations.
模型更新步骤:每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中。a model updating step: updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to memory.
具体地,所述预先确定的逻辑回归模型通过离线训练的方式得到:对上述关键数据进行分析,从时间维度、运营商/共享热点维度、连接/登陆/重试/上网时长统计等方面构造模型特征,确定模型label;按月、天统计用户使用wifi热点的频率和数据量,确定时间长度为最近三个月、最近一周的维度,再加上“运营商/共享热点”、“连接/登陆/重试/上网时长”维度组合成一系列特征,如最近一个月运营商的连接成功率、最近一周wifi热点的重试次数等。然后以最近三个月的关键历史数据作为训练集,对随机森林模型进行训练,得到用于对wifi热点进行评分的逻辑回归模型,并将该逻辑回归模型的模型文件保存至存储器11中。关于对该模型进行训练并使用它来计算每个wifi热点的 评分已经有成熟的计算方法,在此不再赘述。Specifically, the predetermined logistic regression model is obtained by offline training: analyzing the key data, constructing a model from a time dimension, an operator/share hotspot dimension, a connection/login/retry/online time statistics, and the like. Feature, determine the model label; count the frequency and data volume of the user using the wifi hotspot by month and day, determine the length of the last three months, the most recent week, plus "operator/share hotspot", "connection/login The /retry/online time dimension combines into a series of features, such as the connection success rate of the carrier in the most recent month, and the number of retries of the wifi hotspot in the most recent week. Then, the key historical data of the last three months is used as a training set, and the random forest model is trained to obtain a logistic regression model for scoring the wifi hotspot, and the model file of the logistic regression model is saved into the memory 11. There is already a mature calculation method for training the model and using it to calculate the score of each wifi hotspot, and will not be described here.
可以理解的是,离线训练模型的优点是已有大量的历史数据,样本充分。在线训练模型的优点是能够利用最新的数据,模型能适应实时数据的变化,在数据分布和历史差距较大的情形下,在线模型更准确。为了使后续计算得到的各个wifi热点的评分更准确,每隔第二预设时间(例如一天)对上述逻辑回归模型进行更新。通过结合使离线训练和在线训练两种方式,可以取两者优点,提升模型的准确度,同时防止了在线环境下,数据量太少或者网络、系统问题导致的实时模型更新失败等问题。It can be understood that the advantage of the offline training model is that there is a large amount of historical data and the sample is sufficient. The advantage of the online training model is that it can use the latest data, the model can adapt to the changes of real-time data, and the online model is more accurate in the case of large data distribution and historical gap. In order to make the scores of the subsequent calculated wifi hotspots more accurate, the above-mentioned logistic regression model is updated every second preset time (for example, one day). By combining offline training and online training, the advantages of both can be taken to improve the accuracy of the model, and at the same time, the problem of too little data volume or real-time model update failure caused by network and system problems is prevented in the online environment.
在一个实施例中,模型训练是使用样本数据,利用优化算法,迭代求解模型参数的过程。优化算法迭代计算的目标是使得模型的损失函数值最小,对于逻辑回归模型,我们离线环境下使用的是L-BFGS算法(Limited-memory Broyden–Fletcher–Goldfarb–Shanno)训练,得到参数集合S0,即离线模型结果;在线环境时,使用FTRL-Proximal算法(Follow The(Proximally)Regularized Leader),加载集合S0作为初始值,使用下一条实时到达的wifi热点的数据,进行一次计算,计算的结果是新的参数值集合S1;依次类推,再有一条实时数据到达时,使用S1作为输入,计算得到结果S2,最近一次的计算结果Sn即为最新的模型。In one embodiment, model training is the process of iteratively solving model parameters using sample data using an optimization algorithm. The goal of the iterative calculation of the optimization algorithm is to minimize the loss function value of the model. For the logistic regression model, we use the L-BFGS algorithm (Limited-memory Broyden–Fletcher–Goldfarb–Shanno) training in the offline environment to obtain the parameter set S0. That is, the offline model result; in the online environment, using the FTRL-Proximal algorithm (Follow The (Proximally) Regularized Leader), load the set S0 as the initial value, and use the data of the next real-time arrived wifi hotspot to perform a calculation, and the calculation result is The new parameter value set S1; and so on, when another real-time data arrives, S1 is used as an input, and the result S2 is calculated, and the latest calculation result Sn is the latest model.
评分步骤:根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分。当接收到客户端2APP发送的多个wifi热点后,从存储器11中调用所述逻辑回归模型的模型文件,并从存储器11中调取所述多个wifi热点三个月内的历史数据,将其输入模型,得到所述多个wifi热点的第一评分,也就是所述多个wifi热点在未来可能连接成功的概率。The scoring step: calculating the first score of the plurality of wifi hotspots according to historical data in the first preset time and the updated logistic regression model. After receiving the plurality of wifi hotspots sent by the client 2APP, the model file of the logistic regression model is called from the memory 11, and the historical data of the plurality of wifi hotspots within three months is retrieved from the memory 11 The input model obtains a first score of the plurality of wifi hotspots, that is, a probability that the plurality of wifi hotspots may be successfully connected in the future.
评分调整步骤:读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分。在本实施例中,为了进一步确保上述多个wifi热点的第一评分的可靠性,按照预先确定的降权规则,对所述多个wifi热点的第一评分进行调整。所述预先确定的降权规则包括:读取历史数据中所述多个wifi热点在第三预设时间内的连接失败次数;当所述连接失败次数小于第一预设阈值时,保留所述多个wifi热点的第一评分,作为所述多个wifi 热点的第二评分;当所述连接失败次数大于第一预设阈值、且小于第二预设阈值时,将所述多个wifi热点的第一评分乘以第一系数,作为所述多个wifi热点的第二评分;及,当所述连接失败次数大于第二预设阈值时,将所述多个wifi热点的第一评分乘以第二系数,作为所述多个wifi热点的第二评分。a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot. In this embodiment, in order to further ensure the reliability of the first score of the plurality of wifi hotspots, the first score of the plurality of wifi hotspots is adjusted according to a predetermined weight reduction rule. The predetermined decrement rule includes: reading the number of connection failures of the plurality of wifi hotspots in the third preset time in the historical data; and when the number of connection failures is less than the first preset threshold, retaining the a first score of the plurality of wifi hotspots as a second score of the plurality of wifi hotspots; when the number of connection failures is greater than a first preset threshold and less than a second preset threshold, the plurality of wifi hotspots are Multiplying the first score by the first coefficient as the second score of the plurality of wifi hotspots; and, when the number of connection failures is greater than the second predetermined threshold, multiplying the first score of the plurality of wifi hotspots Taking the second coefficient as the second score of the plurality of wifi hotspots.
以wifi热点A、B、C为例,wifi热点A、B、C的第一评分分别为:9.0、8.5、9.5。假设第三预设时间为30min,第一预设阈值为5,第二预设阈值为10,第一系数为0.8,第二系数为0.4,读取wifi热点A、B、C在30min内的连接失败次数分别为:8、3、15,wifi热点A在30min内的连接失败次数大于所述第一预设阈值、且小于第二预设阈值,故wifi热点A的第二评分为7.2;wifi热点B在30min内的连接失败次数小于所述第一预设阈值,故wifi热点B的第二评分为8.5;wifi热点C在30min内的连接失败次数大于第二预设阈值,故wifi热点C的第二评分为3.8。Taking wifi hotspots A, B, and C as an example, the first scores of wifi hotspots A, B, and C are: 9.0, 8.5, and 9.5, respectively. Assume that the third preset time is 30 min, the first preset threshold is 5, the second preset threshold is 10, the first coefficient is 0.8, the second coefficient is 0.4, and the wifi hotspots A, B, and C are read within 30 minutes. The number of connection failures is 8, 3, and 15, respectively. The number of connection failures of the wifi hotspot A within 30 minutes is greater than the first preset threshold and less than the second predetermined threshold, so the second score of the wifi hotspot A is 7.2; The number of connection failures of the wifi hotspot B within 30 minutes is less than the first preset threshold, so the second score of the wifi hotspot B is 8.5; the number of connection failures of the wifi hotspot C within 30 minutes is greater than the second preset threshold, so the wifi hotspot The second score for C is 3.8.
具体地,存在一种情况,所述多个wifi热点中,有一个wifi热点没有历史数据,那么所述逻辑回归模型无法计算该wifi热点的第一评分,也无法计算该wifi热点的第二评分,对于这一类wifi热点,取预设的默认评分或者取其它多个wifi热点的第二评分的平均值,赋值给这一类wifi热点。进一步地,当默认评分与其它多个wifi热点的第二评分的平均值不一致时,取分值高的作为这一类wifi热点的第二评分。Specifically, there is a case that one of the plurality of wifi hotspots has no history data, and the logistic regression model cannot calculate the first score of the wifi hotspot, and cannot calculate the second score of the wifi hotspot. For this type of wifi hotspot, take the default default score or take the average of the second scores of other multiple wifi hotspots, and assign them to this type of wifi hotspot. Further, when the default score is inconsistent with the average of the second scores of the other plurality of wifi hotspots, the second score is taken as the wifi hotspot of this type with a high score.
排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序。The sorting step: sorting the plurality of wifi hotspots according to the signal strength of the plurality of wifi hotspots and the level of the second score.
需要说明的是,对于同一个wifi热点,不同的客户端2在不同的位置扫描到该wifi热点的信号强度不一样,但是,对该wifi热点的评分一致,故不能只依据各wifi热点的评分对各wifi热点进行排序,还需要考虑各wifi热点的信号强度。以wifi热点A、B、C为例,根据上述降权规则得到wifi热点A、B、C的第二评分分别为:7.2、8.5、3.8,wifi热点A、B的信号强度区间都在-35dbm~-60dbm之间,wifi热点C的信号强度区间在-60dbm~-85dbm之间,具体地,所述排序步骤包括:It should be noted that, for the same wifi hotspot, the signal strength of different wifi hotspots scanned by different clients 2 in different locations is different, but the scores of the wifi hotspots are consistent, so it is not possible to only score according to each wifi hotspot. To sort each wifi hotspot, you also need to consider the signal strength of each wifi hotspot. Taking wifi hotspots A, B, and C as an example, according to the above-mentioned weight reduction rule, the second scores of wifi hotspots A, B, and C are: 7.2, 8.5, and 3.8, and the signal intensity intervals of wifi hotspots A and B are all at -35dbm. Between -60dbm, the signal intensity interval of the wifi hotspot C is between -60dbm and -85dbm. Specifically, the sorting step includes:
根据所述多个wifi热点当前的信号强度的强弱顺序,对所述多个wifi热点进行排序(A=B>C);对于当前信号强度在同一个信号强度区间的两个或多个wifi热点,按照所述两个或多个wifi热点的第二评分的高低顺序进行排 序(B>A),故最终排序结果为B、A、C。Sorting the plurality of wifi hotspots according to a sequence of strengths of the current signal strengths of the plurality of wifi hotspots (A=B>C); for two or more wifis whose current signal strength is in the same signal strength interval The hotspot is sorted according to the order of the second scores of the two or more wifi hotspots (B>A), so the final sorting result is B, A, C.
连接步骤:按照排序结果依次尝试连接所述多个wifi热点。按照最终排序结果,电子装置按照wifi热点B、A、C的顺序,依次对wifi热点B、A、C进行连接操作。Connection step: sequentially try to connect the plurality of wifi hotspots according to the sorting result. According to the final sorting result, the electronic device sequentially connects the wifi hotspots B, A, and C according to the order of the wifi hotspots B, A, and C.
具体地,当客户端2在第四预设时间内成功连接一个wifi热点后,检测该wifi热点是否真正可用,若该wifi热点不可用,继续对排在该wifi热点后的wifi热点进行连接操作。假设第四预设时间为10s,当客户端2在10s内成功连接一个wifi热点B,检测该wifi热点B是否真正可用,例如,利用“ping”命令检查wifi热点B的网络是否连通,分析和判定wifi热点B是否存在网络故障。可以理解的是,若超过第四预设时间10s未成功连接wifi热点B,或者检测到wifi热点B存在网络故障,理解为该wifi热点B不可用,继续对排在该wifi热点后的wifi热点(A、C)进行连接操作。Specifically, after the client 2 successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is truly available. If the wifi hotspot is unavailable, continue to connect the wifi hotspot after the wifi hotspot. . Assuming that the fourth preset time is 10s, when the client 2 successfully connects to a wifi hotspot B within 10s, it is detected whether the wifi hotspot B is actually available, for example, using the "ping" command to check whether the network of the wifi hotspot B is connected, analyzing and Determine if there is a network failure in wifi hotspot B. It can be understood that if the wifi hotspot B is not successfully connected for more than the fourth preset time 10s, or the wifi hotspot B is detected to have a network fault, it is understood that the wifi hotspot B is unavailable, and continues to the wifi hotspot after the wifi hotspot. (A, C) to perform the connection operation.
需要说明的是,所述第一预设时间~第四预设时间、预设的默认分值、预先确定的降权规则等需要预先设置的参数、规则,用户可以根据实际情况进行调整。It should be noted that the first preset time to the fourth preset time, the preset default score, the predetermined weight reduction rule, and the like need to be preset parameters and rules, and the user can adjust according to actual conditions.
本实施例提出的电子装置1,通过获取wifi热点的历史数据,实时更新计算wifi热点评分的逻辑回归模型,计算wifi热点未来可能连接成功的概率,然后依次根据wifi热点信号强度、评分分值对wifi热点进行排序,最后为用户挑选最优的wifi热点并进行连接操作,提升用户上网体验。The electronic device 1 in this embodiment obtains a logistic regression model for calculating a wifi hotspot score in real time by acquiring historical data of a wifi hotspot, and calculates a probability that a wifi hotspot may be successfully connected in the future, and then according to the wifi hotspot signal strength and the score score. The wifi hotspots are sorted, and finally the user selects the optimal wifi hotspot and performs the connection operation to improve the user's online experience.
可选地,在其他实施例中,wifi热点连接程序10还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器,例如本实施例中的处理器12所执行,以完成本申请。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段。Optionally, in other embodiments, the wifi hotspot connection program 10 may also be divided into one or more modules, one or more modules are stored in the memory 11 and executed by one or more processors, such as the present embodiment. The processor 12 in the example executes to complete the application. A module as referred to in this application refers to a series of computer program instructions that are capable of performing a particular function.
例如,参照图2所示,为图1中wifi热点连接程序10的模块示意图。在本实施例中,wifi热点连接程序10可以被分割为:接收模块110、更新模块120、第一评分模块130、第二评分模块140、排序模块150及连接模块160。所述模块110-160所实现的功能或操作步骤均与上文类似,此处不再详述,示例性地,例如其中:For example, referring to FIG. 2, it is a schematic diagram of a module of the wifi hotspot connection program 10 in FIG. In this embodiment, the wifi hotspot connection program 10 can be divided into: a receiving module 110, an updating module 120, a first scoring module 130, a second scoring module 140, a sorting module 150, and a connecting module 160. The functions or operational steps implemented by the modules 110-160 are similar to the above, and are not described in detail herein, by way of example, for example:
接收模块110,用于接收客户端扫描到的可用的多个wifi热点及所述多个 wifi热点在第一预设时间内的历史数据;The receiving module 110 is configured to receive, by the client, the available multiple wifi hotspots and the historical data of the multiple wifi hotspots in the first preset time;
更新模块120,用于每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中;The update module 120 is configured to update the predetermined logistic regression model by using the historical data of the plurality of wifi hotspots in the second preset time every second preset time, and the updated logistic regression model The model file is saved to the memory;
第一评分模块130,用于根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分;The first scoring module 130 is configured to calculate a first score of the multiple wifi hotspots according to historical data in the first preset time and the updated logistic regression model;
第二评分模块140,用于读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分;The second scoring module 140 is configured to read the number of connection failures of the multiple wifi hotspots in a third preset time, and adjust the first score of the multiple wifi hotspots according to a predetermined decrement rule. a second score of the plurality of wifi hotspots;
排序模块150,用于排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序;及The sorting module 150 is configured to sort the plurality of wifi hotspots according to the signal strength of the plurality of wifi hotspots and the level of the second grading; and
连接模块160,用于按照排序结果依次尝试连接所述多个wifi热点。The connection module 160 is configured to sequentially connect the plurality of wifi hotspots according to the sorting result.
此外,本申请还提供一种wifi热点连接方法。参照图3所示,为本申请wifi热点连接方法第一实施例的流程图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。In addition, the application also provides a wifi hotspot connection method. Referring to FIG. 3, it is a flowchart of the first embodiment of the wifi hotspot connection method of the present application. The method can be performed by a device that can be implemented by software and/or hardware.
在本实施例中,wifi热点连接方法包括:步骤S10、步骤S20、步骤S30、步骤S40、步骤S50及步骤S60。In this embodiment, the wifi hotspot connection method includes: step S10, step S20, step S30, step S40, step S50, and step S60.
步骤S10,接收客户端扫描到的可用的多个wifi热点及所述多个wifi热点在第一预设时间内的历史数据。Step S10: Receive historical data of the plurality of available wifi hotspots scanned by the client and the plurality of wifi hotspots in the first preset time.
例如,各用户使用的客户端上均安装有wifi热点连接程序的客户端版本(之后简称APP),客户端通过该APP进行连接wifi热点操作。该APP通过客户端持续扫描在当前位置可用的多个wifi热点,电子装置接收APP通过客户端扫描到的多个wifi热点,并收集各用户在第一预设时间(近三个月)内访问过的该多个wifi热点的历史数据,包括:wifi的名称、被访问时间及时长、操作状态(连接成功、连接失败、登陆成功、登陆失败等)、被访问频次、是否运营商提供等。电子装置将历史数据上传到日志服务器,并经过数据仓库技术(ETL)抽取出关键历史数据,如wifi标识、时间、位置、连接操作、上网时长、连接成功次数、连接失败次数、重试次数、登陆成功次数、登陆失败次数等,保存至存储器中,供后续进行模型更新及评分操作。For example, the client version used by each user is installed with a client version of the wifi hotspot connection program (hereinafter referred to as APP), and the client connects to the wifi hotspot operation through the APP. The APP continuously scans multiple wifi hotspots available at the current location through the client, and the electronic device receives multiple wifi hotspots scanned by the APP through the client, and collects the users to access within the first preset time (nearly three months). The historical data of the plurality of wifi hotspots includes: the name of the wifi, the time of the accessed time, the operation status (connection success, connection failure, login success, login failure, etc.), frequency of access, availability by the operator, and the like. The electronic device uploads the historical data to the log server, and extracts key historical data through the data warehouse technology (ETL), such as wifi identification, time, location, connection operation, internet connection duration, number of connection successes, number of connection failures, number of retries, The number of successful logins, the number of failed logins, etc., are saved to the memory for subsequent model update and scoring operations.
步骤S20,每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中。Step S20: The second predetermined time is used to update the predetermined logistic regression model by using the historical data of the plurality of wifi hotspots in the second preset time, and the model file of the updated logistic regression model is to be updated. Save to memory.
具体地,所述预先确定的逻辑回归模型通过离线训练的方式得到:对上述关键数据进行分析,从时间维度、运营商/共享热点维度、连接/登陆/重试/上网时长统计等方面构造模型特征,确定模型label;按月、天统计用户使用wifi热点的频率和数据量,确定时间长度为最近三个月、最近一周的维度,再加上“运营商/共享热点”、“连接/登陆/重试/上网时长”维度组合成一系列特征,如最近一个月运营商的连接成功率、最近一周wifi热点的重试次数等。然后以最近三个月的关键历史数据作为训练集,对随机森林模型进行训练,得到用于对wifi热点进行评分的逻辑回归模型,并将该逻辑回归模型的模型文件保存至存储器中。关于对该模型进行训练并使用它来计算每个wifi热点的评分已经有成熟的计算方法,在此不再赘述。Specifically, the predetermined logistic regression model is obtained by offline training: analyzing the key data, constructing a model from a time dimension, an operator/share hotspot dimension, a connection/login/retry/online time statistics, and the like. Feature, determine the model label; count the frequency and data volume of the user using the wifi hotspot by month and day, determine the length of the last three months, the most recent week, plus "operator/share hotspot", "connection/login The /retry/online time dimension combines into a series of features, such as the connection success rate of the carrier in the most recent month, and the number of retries of the wifi hotspot in the most recent week. Then, using the key historical data of the last three months as a training set, the random forest model is trained to obtain a logistic regression model for scoring the wifi hotspot, and the model file of the logistic regression model is saved into the memory. There are already mature calculation methods for training the model and using it to calculate the score of each wifi hotspot, and will not be described here.
可以理解的是,离线训练模型的优点是已有大量的历史数据,样本充分。在线训练模型的优点是能够利用最新的数据,模型能适应实时数据的变化,在数据分布和历史差距较大的情形下,在线模型更准确。为了使后续计算得到的各个wifi热点的评分更准确,每隔第二预设时间(例如一天)对上述逻辑回归模型进行更新。通过结合使离线训练和在线训练两种方式,可以取两者优点,提升模型的准确度,同时防止了在线环境下,数据量太少或者网络、系统问题导致的实时模型更新失败等问题。It can be understood that the advantage of the offline training model is that there is a large amount of historical data and the sample is sufficient. The advantage of the online training model is that it can use the latest data, the model can adapt to the changes of real-time data, and the online model is more accurate in the case of large data distribution and historical gap. In order to make the scores of the subsequent calculated wifi hotspots more accurate, the above-mentioned logistic regression model is updated every second preset time (for example, one day). By combining offline training and online training, the advantages of both can be taken to improve the accuracy of the model, and at the same time, the problem of too little data volume or real-time model update failure caused by network and system problems is prevented in the online environment.
在一个实施例中,模型训练是使用样本数据,利用优化算法,迭代求解模型参数的过程。优化算法迭代计算的目标是使得模型的损失函数值最小,对于逻辑回归模型,我们离线环境下使用的是L-BFGS算法训练,得到参数集合S0,即离线模型结果;在线环境时,使用FTRL-Proximal算法,加载集合S0作为初始值,使用下一条实时到达的wifi热点的数据,进行一次计算,计算的结果是新的参数值集合S1;依次类推,再有一条实时数据到达时,使用S1作为输入,计算得到结果S2,最近一次的计算结果Sn即为最新的模型。In one embodiment, model training is the process of iteratively solving model parameters using sample data using an optimization algorithm. The goal of the iterative calculation of the optimization algorithm is to minimize the loss function value of the model. For the logistic regression model, we use the L-BFGS algorithm training in the offline environment to obtain the parameter set S0, which is the offline model result; in the online environment, the FTRL- The Proximal algorithm loads the set S0 as the initial value and uses the data of the next real-time arrived wifi hotspot to perform a calculation. The result of the calculation is a new parameter value set S1; and so on, when a real-time data arrives, S1 is used as the initial value. Input, the result S2 is calculated, and the latest calculation result Sn is the latest model.
步骤S30,根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分。当接收到客户端APP发送的多个wifi热点后,从存储器中调用所述逻辑回归模型的模型文件及所述多个wifi 热点三个月内的历史数据,将其输入模型,得到所述多个wifi热点的第一评分,也就是所述多个wifi热点在未来可能连接成功的概率。Step S30: Calculate a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model. After receiving the plurality of wifi hotspots sent by the client APP, calling the model file of the logistic regression model and the historical data of the plurality of wifi hotspots within three months from the memory, inputting the model into the model, and obtaining the plurality of The first score of the wifi hotspots, that is, the probability that the plurality of wifi hotspots may be successfully connected in the future.
步骤S40,读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分。在本实施例中,为了进一步确保上述多个wifi热点的第一评分的可靠性,按照预先确定的降权规则,对所述多个wifi热点的第一评分进行调整。所述预先确定的降权规则包括:读取历史数据中所述多个wifi热点在第三预设时间内的连接失败次数;当所述连接失败次数小于第一预设阈值时,保留所述多个wifi热点的第一评分,作为所述多个wifi热点的第二评分;当所述连接失败次数大于第一预设阈值、且小于第二预设阈值时,将所述多个wifi热点的第一评分乘以第一系数,作为所述多个wifi热点的第二评分;及,当所述连接失败次数大于第二预设阈值时,将所述多个wifi热点的第一评分乘以第二系数,作为所述多个wifi热点的第二评分。In step S40, the number of connection failures of the plurality of wifi hotspots in the third preset time is read, and the first scores of the plurality of wifi hotspots are adjusted according to a predetermined decrement rule to obtain the plurality of wifis. The second rating of the hotspot. In this embodiment, in order to further ensure the reliability of the first score of the plurality of wifi hotspots, the first score of the plurality of wifi hotspots is adjusted according to a predetermined weight reduction rule. The predetermined decrement rule includes: reading the number of connection failures of the plurality of wifi hotspots in the third preset time in the historical data; and when the number of connection failures is less than the first preset threshold, retaining the a first score of the plurality of wifi hotspots as a second score of the plurality of wifi hotspots; when the number of connection failures is greater than a first preset threshold and less than a second preset threshold, the plurality of wifi hotspots are Multiplying the first score by the first coefficient as the second score of the plurality of wifi hotspots; and, when the number of connection failures is greater than the second predetermined threshold, multiplying the first score of the plurality of wifi hotspots Taking the second coefficient as the second score of the plurality of wifi hotspots.
以wifi热点A、B、C为例,wifi热点A、B、C的第一评分分别为:9.0、8.5、9.5。假设第三预设时间为30min,第一预设阈值为5,第二预设阈值为10,第一系数为0.8,第二系数为0.4,读取wifi热点A、B、C在30min内的连接失败次数分别为:8、3、15,wifi热点A在30min内的连接失败次数大于所述第一预设阈值、且小于第二预设阈值,故wifi热点A的第二评分为7.2;wifi热点B在30min内的连接失败次数小于所述第一预设阈值,故wifi热点B的第二评分为8.5;wifi热点C在30min内的连接失败次数大于第二预设阈值,故wifi热点C的第二评分为3.8。Taking wifi hotspots A, B, and C as an example, the first scores of wifi hotspots A, B, and C are: 9.0, 8.5, and 9.5, respectively. Assume that the third preset time is 30 min, the first preset threshold is 5, the second preset threshold is 10, the first coefficient is 0.8, the second coefficient is 0.4, and the wifi hotspots A, B, and C are read within 30 minutes. The number of connection failures is 8, 3, and 15, respectively. The number of connection failures of the wifi hotspot A within 30 minutes is greater than the first preset threshold and less than the second predetermined threshold, so the second score of the wifi hotspot A is 7.2; The number of connection failures of the wifi hotspot B within 30 minutes is less than the first preset threshold, so the second score of the wifi hotspot B is 8.5; the number of connection failures of the wifi hotspot C within 30 minutes is greater than the second preset threshold, so the wifi hotspot The second score for C is 3.8.
具体地,存在一种情况,所述多个wifi热点中,有一个wifi热点没有历史数据,那么所述逻辑回归模型无法计算该wifi热点的第一评分,也无法计算该wifi热点的第二评分,对于这一类wifi热点,取预设的默认评分或者取其它多个wifi热点的第二评分的平均值,赋值给这一类wifi热点。进一步地,当默认评分与其它多个wifi热点的第二评分的平均值不一致时,取分值高的作为这一类wifi热点的第二评分。Specifically, there is a case that one of the plurality of wifi hotspots has no history data, and the logistic regression model cannot calculate the first score of the wifi hotspot, and cannot calculate the second score of the wifi hotspot. For this type of wifi hotspot, take the default default score or take the average of the second scores of other multiple wifi hotspots, and assign them to this type of wifi hotspot. Further, when the default score is inconsistent with the average of the second scores of the other plurality of wifi hotspots, the second score is taken as the wifi hotspot of this type with a high score.
步骤S50,根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序。Step S50: Sort the plurality of wifi hotspots according to the signal strength of the plurality of wifi hotspots and the level of the second score.
需要说明的是,对于同一个wifi热点,不同的客户端在不同的位置扫描 到该wifi热点的信号强度不一样,但是,对该wifi热点的评分一致,故不能只依据各wifi热点的评分对各wifi热点进行排序,还需要考虑各wifi热点的信号强度。以wifi热点A、B、C为例,根据上述降权规则得到wifi热点A、B、C的第二评分分别为:7.2、8.5、3.8,wifi热点A、B的信号强度区间都在-35dbm~-60dbm之间,wifi热点C的信号强度区间在-60dbm~-85dbm之间,具体地,所述排序步骤包括:It should be noted that, for the same wifi hotspot, the signal strength of different wifi hotspots scanned by different clients in different locations is different, but the scores of the wifi hotspots are consistent, so it is not possible to rely solely on the scores of the wifi hotspots. The wifi hotspots are sorted, and the signal strength of each wifi hotspot needs to be considered. Taking wifi hotspots A, B, and C as an example, according to the above-mentioned weight reduction rule, the second scores of wifi hotspots A, B, and C are: 7.2, 8.5, and 3.8, and the signal intensity intervals of wifi hotspots A and B are all at -35dbm. Between -60dbm, the signal intensity interval of the wifi hotspot C is between -60dbm and -85dbm. Specifically, the sorting step includes:
根据所述多个wifi热点当前的信号强度的强弱顺序,对所述多个wifi热点进行排序(A=B>C);对于当前信号强度在同一个信号强度区间的两个或多个wifi热点,按照所述两个或多个wifi热点的第二评分的高低顺序进行排序(B>A),故最终排序结果为B、A、C。Sorting the plurality of wifi hotspots according to a sequence of strengths of the current signal strengths of the plurality of wifi hotspots (A=B>C); for two or more wifis whose current signal strength is in the same signal strength interval The hotspot is sorted according to the order of the second scores of the two or more wifi hotspots (B>A), so the final sorting result is B, A, C.
步骤S60,按照排序结果依次尝试连接所述多个wifi热点。按照最终排序结果,电子装置按照wifi热点B、A、C的顺序,依次对wifi热点B、A、C进行连接操作。Step S60, sequentially attempting to connect the plurality of wifi hotspots according to the sorting result. According to the final sorting result, the electronic device sequentially connects the wifi hotspots B, A, and C according to the order of the wifi hotspots B, A, and C.
进一步地,当客户端在第四预设时间内成功连接一个wifi热点后,检测该wifi热点是否真正可用,若该wifi热点不可用,继续对排在该wifi热点后的wifi热点进行连接操作。假设第四预设时间为10s,当客户端在10s内成功连接一个wifi热点B,检测该wifi热点B是否真正可用,例如,利用“ping”命令检查wifi热点B的网络是否连通,分析和判定wifi热点B是否存在网络故障。可以理解的是,若超过第四预设时间10s未成功连接wifi热点B,或者检测到wifi热点B存在网络故障,理解为该wifi热点B不可用,继续对排在该wifi热点后的wifi热点(A、C)进行连接操作。Further, after the client successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is actually available. If the wifi hotspot is unavailable, the wifi hotspot after the wifi hotspot is continuously connected. Assume that the fourth preset time is 10s. When the client successfully connects to a wifi hotspot B within 10s, it is detected whether the wifi hotspot B is actually available. For example, use the "ping" command to check whether the network of the wifi hotspot B is connected, analyze and determine. Whether there is a network failure in wifi hotspot B. It can be understood that if the wifi hotspot B is not successfully connected for more than the fourth preset time 10s, or the wifi hotspot B is detected to have a network fault, it is understood that the wifi hotspot B is unavailable, and continues to the wifi hotspot after the wifi hotspot. (A, C) to perform the connection operation.
需要说明的是,所述第一预设时间~第四预设时间、预设的默认分值、预先确定的降权规则等需要预先设置的参数、规则,用户可以根据实际情况进行调整。It should be noted that the first preset time to the fourth preset time, the preset default score, the predetermined weight reduction rule, and the like need to be preset parameters and rules, and the user can adjust according to actual conditions.
本实施例提出的wifi热点连接方法,通过获取wifi热点的历史数据,实时更新计算wifi热点评分的逻辑回归模型,计算wifi热点未来可能连接成功的概率,然后依次根据wifi热点信号强度、评分分值对wifi热点进行排序,最后为用户挑选最优的wifi热点并进行连接操作,提升用户上网体验。The wifi hotspot connection method proposed in this embodiment obtains a logistic regression model for calculating a wifi hotspot score in real time by acquiring historical data of the wifi hotspot, and calculates a probability that the wifi hotspot may be successfully connected in the future, and then according to the wifi hotspot signal strength and the score score. Sort the wifi hotspots, and finally select the best wifi hotspots for the user and connect them to improve the user's online experience.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读 存储介质上存储有wifi热点连接程序,所述wifi热点连接程序被处理器执行时实现如下操作:In addition, the embodiment of the present application further provides a computer readable storage medium, where the wifi hotspot connection program is stored, and when the wifi hotspot connection program is executed by the processor, the following operations are implemented:
接收步骤:接收客户端扫描到的可用的多个wifi热点及所述多个wifi热点在第一预设时间内的历史数据;Receiving step: receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
模型更新步骤:每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中;a model updating step: updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to the memory;
评分步骤:根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分;a scoring step: calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
评分调整步骤:读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分;a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序;及a sorting step of: sorting the plurality of wifi hotspots according to a signal strength of the plurality of wifi hotspots and a level of the second grading; and
连接步骤:按照排序结果依次尝试连接所述多个wifi热点。Connection step: sequentially try to connect the plurality of wifi hotspots according to the sorting result.
本申请之计算机可读存储介质的具体实施方式与上述wifi热点连接方法的具体实施方式大致相同,在此不再赘述。The specific implementation manner of the computer readable storage medium of the present application is substantially the same as the specific implementation manner of the wifi hotspot connection method, and details are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a series of elements includes those elements. It also includes other elements not explicitly listed, or elements that are inherent to such a process, device, item, or method. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, the device, the item, or the method that comprises the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘) 中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments. Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种wifi热点连接方法,应用于电子装置,该电子装置通过网络连接一个或多个客户端,其特征在于,所述方法包括:A wifi hotspot connection method is applied to an electronic device, and the electronic device is connected to one or more clients through a network, wherein the method includes:
    接收步骤:接收客户端扫描到的可用的多个wifi热点及所述多个wifi热点在第一预设时间内的历史数据;Receiving step: receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
    模型更新步骤:每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中;a model updating step: updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to the memory;
    评分步骤:根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分;a scoring step: calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
    评分调整步骤:读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分;a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
    排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序;及a sorting step of: sorting the plurality of wifi hotspots according to a signal strength of the plurality of wifi hotspots and a level of the second grading; and
    连接步骤:按照排序结果依次尝试连接所述多个wifi热点。Connection step: sequentially try to connect the plurality of wifi hotspots according to the sorting result.
  2. 如权利要求1所述的wifi热点连接方法,其特征在于,该方法还包括以下步骤:The wifi hotspot connection method according to claim 1, wherein the method further comprises the following steps:
    当客户端在第四预设时间内成功连接一个wifi热点后,检测该wifi热点是否真正可用,若该wifi热点不可用,继续对排在该wifi热点后的wifi热点进行连接操作。After the client successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is really available. If the wifi hotspot is unavailable, the wifi hotspot after the wifi hotspot is continuously connected.
  3. 根据权利要求1所述的wifi热点连接方法,其特征在于,所述预先确定的降权规则包括:The wifi hotspot connection method according to claim 1, wherein the predetermined weight reduction rule comprises:
    读取历史数据中所述多个wifi热点在第三预设时间内的连接失败次数;Reading the number of connection failures of the plurality of wifi hotspots in the third preset time in the historical data;
    当所述连接失败次数小于第一预设阈值时,保留所述多个wifi热点的第一评分,作为所述多个wifi热点的第二评分;When the number of connection failures is less than the first preset threshold, retaining the first score of the multiple wifi hotspots as the second score of the multiple wifi hotspots;
    当所述连接失败次数大于第一预设阈值、且小于第二预设阈值时,将所述多个wifi热点的第一评分乘以第一系数,作为所述多个wifi热点的第二评分,其中,所述第一预设阈值小于第二预设阈值;及When the number of connection failures is greater than the first preset threshold and less than the second preset threshold, multiplying the first score of the multiple wifi hotspots by the first coefficient as the second score of the multiple wifi hotspots The first preset threshold is less than the second preset threshold; and
    当所述连接失败次数大于所述第二预设阈值时,将所述多个wifi热点的第一评分乘以第二系数,作为所述多个wifi热点的第二评分。When the number of connection failures is greater than the second preset threshold, the first score of the plurality of wifi hotspots is multiplied by the second coefficient as a second score of the plurality of wifi hotspots.
  4. 根据权利要求1所述的wifi热点连接方法,其特征在于,所述排序步骤包括:The wifi hotspot connection method according to claim 1, wherein the sorting step comprises:
    根据所述多个wifi热点当前的信号强度的强弱顺序,对所述多个wifi热点进行排序;及Sorting the plurality of wifi hotspots according to a sequence of strengths of current signal strengths of the plurality of wifi hotspots; and
    对于当前信号强度在同一个信号强度区间的两个或多个wifi热点,按照所述两个或多个wifi热点的第二评分的高低顺序进行排序。For two or more wifi hotspots whose current signal strength is in the same signal strength interval, the ranking is performed according to the order of the second scores of the two or more wifi hotspots.
  5. 如权利要求1所述的wifi热点连接方法,其特征在于,所述评分步骤还包括:The wifi hotspot connection method according to claim 1, wherein the step of scoring further comprises:
    对所述多个wifi热点中没有历史数据的wifi热点赋予一个默认评分或赋予其它多个wifi热点的第二评分的平均分。A wifi hotspot having no historical data among the plurality of wifi hotspots is given a default score or an average score assigned to a second score of the other plurality of wifi hotspots.
  6. 如权利要求5所述的wifi热点连接方法,其特征在于,所述评分步骤还包括:The wifi hotspot connection method according to claim 5, wherein the step of scoring further comprises:
    当默认评分与其它多个wifi热点的第二评分的平均值不一致时,取分值高的作为这一类wifi热点的第二评分。When the default score is inconsistent with the average of the second scores of the other plurality of wifi hotspots, the second score is taken as the wifi hotspot of this type with a high score.
  7. 一种电子装置,其特征在于,该电子装置包括:存储器、处理器,所述存储器上存储有wifi热点连接程序,所述wifi热点连接程序被所述处理器执行时实现如下步骤:An electronic device, comprising: a memory, a processor, wherein the memory stores a wifi hotspot connection program, and when the wifi hotspot connection program is executed by the processor, the following steps are implemented:
    接收步骤:接收客户端扫描到的可用的多个wifi热点及所述多个wifi热点在第一预设时间内的历史数据;Receiving step: receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
    模型更新步骤:每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中;a model updating step: updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to the memory;
    评分步骤:根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分;a scoring step: calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
    评分调整步骤:读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分;a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
    排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所 述多个wifi热点进行排序;及Sorting step: sorting the plurality of wifi hotspots according to signal strength of the plurality of wifi hotspots and a level of the second grading; and
    连接步骤:按照排序结果依次尝试连接所述多个wifi热点。Connection step: sequentially try to connect the plurality of wifi hotspots according to the sorting result.
  8. 根据权利要求6所述的电子装置,其特征在于,所述wifi热点连接程序被所述处理器执行时还实现如下步骤:The electronic device according to claim 6, wherein when the wifi hotspot connection program is executed by the processor, the following steps are further implemented:
    当客户端在第四预设时间内成功连接一个wifi热点后,检测该wifi热点是否真正可用,若该wifi热点不可用,继续对排在该wifi热点后的wifi热点进行连接操作。After the client successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is really available. If the wifi hotspot is unavailable, the wifi hotspot after the wifi hotspot is continuously connected.
  9. 根据权利要求6所述的电子装置,其特征在于,所述预先确定的降权规则包括:The electronic device according to claim 6, wherein the predetermined weight reduction rule comprises:
    读取历史数据中所述多个wifi热点在第三预设时间内的连接失败次数;Reading the number of connection failures of the plurality of wifi hotspots in the third preset time in the historical data;
    当所述连接失败次数小于第一预设阈值时,保留所述多个wifi热点的第一评分,作为所述多个wifi热点的第二评分;When the number of connection failures is less than the first preset threshold, retaining the first score of the multiple wifi hotspots as the second score of the multiple wifi hotspots;
    当所述连接失败次数大于第一预设阈值、且小于第二预设阈值时,将所述多个wifi热点的第一评分乘以第一系数,作为所述多个wifi热点的第二评分;及When the number of connection failures is greater than the first preset threshold and less than the second preset threshold, multiplying the first score of the multiple wifi hotspots by the first coefficient as the second score of the multiple wifi hotspots ;and
    当所述连接失败次数大于第二预设阈值时,将所述多个wifi热点的第一评分乘以第二系数,作为所述多个wifi热点的第二评分。When the number of connection failures is greater than the second preset threshold, the first score of the plurality of wifi hotspots is multiplied by the second coefficient as a second score of the plurality of wifi hotspots.
  10. 根据权利要求6所述的电子装置,其特征在于,所述排序步骤包括:The electronic device according to claim 6, wherein the sorting step comprises:
    根据所述多个wifi热点当前的信号强度的强弱顺序,对所述多个wifi热点进行排序;及Sorting the plurality of wifi hotspots according to a sequence of strengths of current signal strengths of the plurality of wifi hotspots; and
    对于当前信号强度在同一个信号强度区间的两个或多个wifi热点,按照所述两个或多个wifi热点的第二评分的高低顺序进行排序。For two or more wifi hotspots whose current signal strength is in the same signal strength interval, the ranking is performed according to the order of the second scores of the two or more wifi hotspots.
  11. 根据权利要求6所述的电子装置,其特征在于,所述评分步骤还包括:The electronic device according to claim 6, wherein the step of scoring further comprises:
    对所述多个wifi热点中没有历史数据的wifi热点赋予一个默认评分或赋予其它多个wifi热点的第二评分的平均分。A wifi hotspot having no historical data among the plurality of wifi hotspots is given a default score or an average score assigned to a second score of the other plurality of wifi hotspots.
  12. 根据权利要求11所述的电子装置,其特征在于,所述评分步骤还包括:The electronic device according to claim 11, wherein the step of scoring further comprises:
    当默认评分与其它多个wifi热点的第二评分的平均值不一致时,取分值高的作为这一类wifi热点的第二评分。When the default score is inconsistent with the average of the second scores of the other plurality of wifi hotspots, the second score is taken as the wifi hotspot of this type with a high score.
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有wifi热点连接程序,所述wifi热点连接程序被处理器执行时实现如下步骤:A computer readable storage medium, wherein the computer readable storage medium stores a wifi hotspot connection program, and when the wifi hotspot connection program is executed by the processor, the following steps are implemented:
    接收步骤:接收客户端扫描到的可用的多个wifi热点及所述多个wifi热点在第一预设时间内的历史数据;Receiving step: receiving, by the client, the available plurality of wifi hotspots and the historical data of the plurality of wifi hotspots in the first preset time;
    模型更新步骤:每隔第二预设时间,利用所述多个wifi热点在该第二预设时间内的历史数据,对预先确定的逻辑回归模型进行更新,将更新后的逻辑回归模型的模型文件保存至存储器中;a model updating step: updating the predetermined logistic regression model by using historical data of the plurality of wifi hotspots in the second preset time every second preset time, and updating the model of the logistic regression model The file is saved to the memory;
    评分步骤:根据第一预设时间内的历史数据及所述更新后的逻辑回归模型,计算所述多个wifi热点的第一评分;a scoring step: calculating a first score of the plurality of wifi hotspots according to historical data in the first preset time period and the updated logistic regression model;
    评分调整步骤:读取所述多个wifi热点在第三预设时间内的连接失败次数,按照预先确定的降权规则对所述多个wifi热点的第一评分进行调整,得到所述多个wifi热点的第二评分;a score adjustment step of: reading a number of connection failures of the plurality of wifi hotspots in a third preset time, and adjusting a first score of the plurality of wifi hotspots according to a predetermined decrement rule to obtain the plurality of The second rating of the wifi hotspot;
    排序步骤:根据所述多个wifi热点的信号强度及第二评分的高低,对所述多个wifi热点进行排序;及a sorting step of: sorting the plurality of wifi hotspots according to a signal strength of the plurality of wifi hotspots and a level of the second grading; and
    连接步骤:按照排序结果依次尝试连接所述多个wifi热点。Connection step: sequentially try to connect the plurality of wifi hotspots according to the sorting result.
  14. 根据权利要求13所述的计算机可读存储介质,其特征在于,所述wifi热点连接程序被所述处理器执行时还实现如下步骤:The computer readable storage medium according to claim 13, wherein when the wifi hotspot connection program is executed by the processor, the following steps are further implemented:
    当客户端在第四预设时间内成功连接一个wifi热点后,检测该wifi热点是否真正可用,若该wifi热点不可用,继续对排在该wifi热点后的wifi热点进行连接操作。After the client successfully connects to a wifi hotspot in the fourth preset time, it is detected whether the wifi hotspot is really available. If the wifi hotspot is unavailable, the wifi hotspot after the wifi hotspot is continuously connected.
  15. 根据权利要求13所述的计算机可读存储介质,其特征在于,所述预先确定的降权规则包括:The computer readable storage medium of claim 13, wherein the predetermined weight reduction rule comprises:
    读取历史数据中所述多个wifi热点在第三预设时间内的连接失败次数;Reading the number of connection failures of the plurality of wifi hotspots in the third preset time in the historical data;
    当所述连接失败次数小于第一预设阈值时,保留所述多个wifi热点的第一评分,作为所述多个wifi热点的第二评分;When the number of connection failures is less than the first preset threshold, retaining the first score of the multiple wifi hotspots as the second score of the multiple wifi hotspots;
    当所述连接失败次数大于第一预设阈值、且小于第二预设阈值时,将所述多个wifi热点的第一评分乘以第一系数,作为所述多个wifi热点的第二评分;及When the number of connection failures is greater than the first preset threshold and less than the second preset threshold, multiplying the first score of the multiple wifi hotspots by the first coefficient as the second score of the multiple wifi hotspots ;and
    当所述连接失败次数大于第二预设阈值时,将所述多个wifi热点的第一 评分乘以第二系数,作为所述多个wifi热点的第二评分。When the number of connection failures is greater than a second preset threshold, the first score of the plurality of wifi hotspots is multiplied by a second coefficient as a second score of the plurality of wifi hotspots.
  16. 根据权利要求13所述的计算机可读存储介质,其特征在于,所述排序步骤包括:The computer readable storage medium of claim 13, wherein the ordering step comprises:
    根据所述多个wifi热点当前的信号强度的强弱顺序,对所述多个wifi热点进行排序;及Sorting the plurality of wifi hotspots according to a sequence of strengths of current signal strengths of the plurality of wifi hotspots; and
    对于当前信号强度在同一个信号强度区间的两个或多个wifi热点,按照所述两个或多个wifi热点的第二评分的高低顺序进行排序。For two or more wifi hotspots whose current signal strength is in the same signal strength interval, the ranking is performed according to the order of the second scores of the two or more wifi hotspots.
  17. 根据权利要求13所述的计算机可读存储介质,其特征在于,所述评分步骤还包括:The computer readable storage medium of claim 13, wherein the step of scoring further comprises:
    对所述多个wifi热点中没有历史数据的wifi热点赋予一个默认评分或赋予其它多个wifi热点的第二评分的平均分。A wifi hotspot having no historical data among the plurality of wifi hotspots is given a default score or an average score assigned to a second score of the other plurality of wifi hotspots.
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述评分步骤还包括:The computer readable storage medium of claim 17, wherein the step of scoring further comprises:
    当默认评分与其它多个wifi热点的第二评分的平均值不一致时,取分值高的作为这一类wifi热点的第二评分。When the default score is inconsistent with the average of the second scores of the other plurality of wifi hotspots, the second score is taken as the wifi hotspot of this type with a high score.
  19. 一种wifi热点连接程序,其特征在于,该程序包括:接收模块、更新模块、第一评分模块、第二评分模块、排序模块及连接模块。A wifi hotspot connection program is characterized in that the program comprises: a receiving module, an updating module, a first scoring module, a second scoring module, a sorting module and a connecting module.
  20. 如权利要求19所述的wifi热点连接程序,其特征在于,所述wifi热点连接程序被处理器执行时,可实现如权利要求1至6中任意一项wifi热点连接方法的步骤。The wifi hotspot connection program according to claim 19, wherein the step of the wifi hotspot connection method according to any one of claims 1 to 6 is implemented when the wifi hotspot connection program is executed by the processor.
PCT/CN2018/076180 2017-09-26 2018-02-10 Wi-fi hotspot connection method, device and storage medium WO2019061993A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710884576.2A CN107835520B (en) 2017-09-26 2017-09-26 Wifi hotspot connection method and device and storage medium
CN201710884576.2 2017-09-26

Publications (1)

Publication Number Publication Date
WO2019061993A1 true WO2019061993A1 (en) 2019-04-04

Family

ID=61643447

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076180 WO2019061993A1 (en) 2017-09-26 2018-02-10 Wi-fi hotspot connection method, device and storage medium

Country Status (2)

Country Link
CN (1) CN107835520B (en)
WO (1) WO2019061993A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810916B (en) * 2018-04-17 2022-08-12 深圳平安通信科技有限公司 Wi-Fi hotspot recommendation method and device and storage medium
CN108848545A (en) * 2018-07-02 2018-11-20 晶晨半导体(上海)股份有限公司 A kind of method for intelligent connection and system of wireless access point
CN108601040B (en) * 2018-07-23 2022-03-04 上海尚往网络科技有限公司 Wireless access point ordering method and device
CN109195204B (en) * 2018-11-12 2021-02-12 Oppo广东移动通信有限公司 Wireless network access method and device, computer readable medium and communication terminal
CN110856233B (en) * 2019-11-14 2022-04-22 Oppo广东移动通信有限公司 Communication control method and related product
CN111866994B (en) * 2020-07-26 2021-02-05 广云物联网科技(广州)有限公司 Method and device for rapidly distributing network at hot spot
CN113839820B (en) * 2021-10-14 2023-08-11 福建天晴数码有限公司 Method and system for searching optimal network updating node during updating service
CN113810947B (en) * 2021-10-29 2023-05-09 中国联合网络通信集团有限公司 WiFi network quality assessment method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2362689A1 (en) * 2010-02-26 2011-08-31 Research In Motion Limited Storage of radio information on a removable memory
CN102907121A (en) * 2010-05-20 2013-01-30 At&T移动第二有限责任公司 WI-FI intelligent selection engine
CN104768156A (en) * 2015-04-30 2015-07-08 北京奇虎科技有限公司 WiFi connection method and device
CN105376700A (en) * 2015-11-23 2016-03-02 努比亚技术有限公司 An access device and method for a free Wi-Fi network
CN105657790A (en) * 2016-03-23 2016-06-08 深圳优克云联科技有限公司 Network connecting method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2362689A1 (en) * 2010-02-26 2011-08-31 Research In Motion Limited Storage of radio information on a removable memory
CN102907121A (en) * 2010-05-20 2013-01-30 At&T移动第二有限责任公司 WI-FI intelligent selection engine
CN104768156A (en) * 2015-04-30 2015-07-08 北京奇虎科技有限公司 WiFi connection method and device
CN105376700A (en) * 2015-11-23 2016-03-02 努比亚技术有限公司 An access device and method for a free Wi-Fi network
CN105657790A (en) * 2016-03-23 2016-06-08 深圳优克云联科技有限公司 Network connecting method, device and system

Also Published As

Publication number Publication date
CN107835520B (en) 2021-01-05
CN107835520A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
WO2019061993A1 (en) Wi-fi hotspot connection method, device and storage medium
CN107102941B (en) Test case generation method and device
US10332184B2 (en) Personalized application recommendations
TWI603220B (en) Method and device for network verification information
CN109918205B (en) Edge equipment scheduling method, system, device and computer storage medium
US20160241589A1 (en) Method and apparatus for identifying malicious website
CN108074177A (en) Data account checking method, system and computer readable storage medium
US10057915B2 (en) Methods and systems for adaptive scheduling of packets in a wireless broadband network
US20180204135A1 (en) Systems and methods for improving accuracy of classification-based text data processing
CN108280115A (en) Identify the method and device of customer relationship
CN107809740B (en) Wi-Fi hotspot deployment optimization method, server and storage medium
CN104156232B (en) The non-linear method and apparatus redirected of the page is used under linear page structure
US10748166B2 (en) Method and system for mining churn factor causing user churn for network application
CN110764798A (en) Microcode upgrading method, device, computer equipment and storage medium
WO2019056501A1 (en) Personalized wifi hotspot pushing method, device, and storage medium
US20170169062A1 (en) Method and electronic device for recommending video
CN112104505B (en) Application recommendation method, device, server and computer readable storage medium
US20140214841A1 (en) Semantic Product Classification
US20140214845A1 (en) Product classification into product type families
CN111669379A (en) Behavior abnormity detection method and device
CN110807050B (en) Performance analysis method, device, computer equipment and storage medium
US20150227453A1 (en) System and method for automatically testing performance of high-volume web navigation tree services
CN109376745A (en) Farming activities method for pushing, device, server and storage medium
CN109615393A (en) The follow-up processing method and processing device of breakpoint
CN105610596B (en) Resource directory management method and network terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18863759

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18863759

Country of ref document: EP

Kind code of ref document: A1