CN110636445A - WIFI-based indoor positioning method, device, equipment and medium - Google Patents

WIFI-based indoor positioning method, device, equipment and medium Download PDF

Info

Publication number
CN110636445A
CN110636445A CN201910984358.5A CN201910984358A CN110636445A CN 110636445 A CN110636445 A CN 110636445A CN 201910984358 A CN201910984358 A CN 201910984358A CN 110636445 A CN110636445 A CN 110636445A
Authority
CN
China
Prior art keywords
wifi
hotspot
ssid
type
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910984358.5A
Other languages
Chinese (zh)
Other versions
CN110636445B (en
Inventor
方泽伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910984358.5A priority Critical patent/CN110636445B/en
Publication of CN110636445A publication Critical patent/CN110636445A/en
Application granted granted Critical
Publication of CN110636445B publication Critical patent/CN110636445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/33Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses an indoor positioning method, device, equipment and medium based on WIFI, and relates to the technical field of information, wherein the method comprises the following steps: acquiring service set identifiers SSID of a plurality of WIFI hotspots; identifying the SSID of the WIFI hotspot through a convolutional neural network to obtain the WIFI type of the WIFI hotspot; the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed; constructing a WIFI fingerprint database according to the WIFI hotspot with the fixed WIFI type; and when the indoor positioning request is received, responding to the indoor positioning request according to the WIFI fingerprint database. According to the method and the device, the WIFI hotspot is identified by calling the convolutional neural network, the influence of the signal of the WIFI hotspot which is easy to move on the positioning result is eliminated, and the accuracy and the reliability of the indoor positioning result are improved.

Description

WIFI-based indoor positioning method, device, equipment and medium
Technical Field
The present application relates to the field of information technologies, and in particular, to a WIFI-based indoor positioning method, apparatus, device, and medium.
Background
With the development of information technology, Wireless Fidelity (WIFI) is becoming more and more popular in daily life. The developer utilizes WIFI to assist indoor positioning, and the method has great application potential.
In the indoor positioning system based on WIFI, the mobile WIFI and the private WIFI are not beneficial to model construction of the indoor positioning system due to the fact that installation positions are easy to change.
In the related art, the WIFI of the type cannot be identified, so that the accuracy of the indoor positioning system is poor, and the application effect of the indoor positioning system is poor. .
Disclosure of Invention
The embodiment of the application provides an indoor positioning method, an indoor positioning device, indoor positioning equipment and an indoor positioning medium based on WIFI, and the method, the device, the equipment and the medium can be used for solving the problems that the accuracy of an indoor positioning system is poor and the application effect of the indoor positioning system is poor due to the fact that the type of the WIFI cannot be identified. The technical scheme is as follows:
according to an aspect of the present application, there is provided a WIFI-based indoor positioning method, including:
acquiring service set identifiers SSID of a plurality of WIFI hotspots;
identifying the SSID of the WIFI hotspot through a convolutional neural network to obtain the WIFI type of the WIFI hotspot; the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed;
constructing a WIFI fingerprint database according to the WIFI hotspot with the fixed WIFI type;
and when the indoor positioning request is received, responding to the indoor positioning request according to the WIFI fingerprint database.
According to one aspect of the application, a WIFI type identification method based on machine learning is provided, and the method comprises the following steps:
acquiring the SSID of the WIFI hotspot;
extracting the vector characteristics of the WIFI hotspot according to the SSID;
calling a convolutional neural network to identify the vector characteristics of the SSID to obtain the WIFI type of the WIFI hotspot;
the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed.
According to an aspect of the present application, there is provided a positioning device of a WIFI-based indoor positioning system, the device including: the system comprises an acquisition module, an identification module, a fingerprint library module and a positioning module;
the system comprises an acquisition module, a Service Set Identification (SSID) module and a service processing module, wherein the acquisition module is configured to acquire Service Set Identifications (SSIDs) of a plurality of WIFI hotspots;
the identification module is configured to identify a Service Set Identifier (SSID) of the WIFI hotspot through a convolutional neural network to obtain a WIFI type of the WIFI hotspot; the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed;
the fingerprint library module is configured to construct a WIFI fingerprint library according to the WIFI hotspot of which the WIFI type is fixed WIFI;
and the positioning module is configured to respond to the indoor positioning request according to the WIFI fingerprint database when receiving the indoor positioning request.
According to an aspect of the present application, there is provided a WIFI type identification apparatus based on machine learning, the apparatus including: the device comprises an acquisition module, a data preprocessing module and a convolutional neural network identification module;
the acquisition module is configured to acquire the SSID of the WIFI hotspot;
the data preprocessing module is configured to extract the vector characteristics of the WIFI hotspot according to the SSID;
the convolutional neural network identification module is configured to call a convolutional neural network to identify the vector characteristics of the SSID to obtain the WIFI type of the WIFI hotspot;
wherein the convolutional neural network is trained based on a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed
In another aspect, a computer device is provided, which includes a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement a machine learning-based WIFI type identification method, or a WIFI-based indoor positioning method, as provided in embodiments of the present application.
In another aspect, a computer-readable storage medium is provided, having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is loaded and executed by the processor to implement a machine learning-based WIFI type identification method, or a WIFI-based indoor positioning method, as provided in the embodiments of the present application.
In another aspect, a computer program product is provided, which when run on a computer, causes the computer to execute a WIFI type identification method based on machine learning, or an indoor positioning method based on WIFI, as provided in the embodiments of the present application.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
by acquiring SSID information of the WIFI hotspot, model training is carried out on the convolutional neural network, the convolutional neural network is called to identify the WIFI hotspot, whether the WIFI hotspot is mobile WIFI or private WIFI or not is identified, and the identification accuracy and reliability are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an implementation environment provided by an exemplary embodiment of the present application;
fig. 2 is a schematic diagram of an application scenario of a WIFI-based indoor positioning method provided in an exemplary embodiment of the present application;
fig. 3 is a flowchart of a WIFI-based indoor positioning method provided by an exemplary embodiment of the present application;
fig. 4 is a flowchart of a WIFI-based indoor positioning method provided by an exemplary embodiment of the present application;
fig. 5 is a flowchart of a WIFI type identification method based on machine learning according to an exemplary embodiment of the present application;
fig. 6 is a flowchart of a WIFI type identification method based on machine learning according to an exemplary embodiment of the present application;
FIG. 7 is a diagram illustrating the use of a convolution kernel to obtain convolution data as provided by an exemplary embodiment of the present application;
FIG. 8 is a diagram illustrating invoking a pooling layer to obtain pooled convolution data as provided by an exemplary embodiment of the present application;
FIG. 9 is a diagram illustrating the conversion of convolved data into one-dimensional vector features as provided by an exemplary embodiment of the present application;
fig. 10 is a flowchart of a WIFI type identification method based on machine learning provided by an exemplary embodiment of the present application;
FIG. 11 is a schematic diagram of a fully-connected layer operation provided by an exemplary embodiment of the present application;
fig. 12 is a flowchart of a WIFI-based indoor positioning method provided by an exemplary embodiment of the present application;
FIG. 13 is a schematic diagram of data processing in a convolutional neural network identification module as provided by an exemplary embodiment of the present application;
fig. 14 is a flowchart of a WIFI type identification method based on machine learning provided by an exemplary embodiment of the present application;
fig. 15 is a flowchart illustrating extraction of vector features of WIFI hotspots according to SSIDs according to an exemplary embodiment of the present application;
fig. 16 is a flowchart of a WIFI type identification method based on machine learning provided by an exemplary embodiment of the present application;
FIG. 17 is a flow diagram of regular expression identification provided by an exemplary embodiment of the present application;
fig. 18 is a schematic diagram of a machine learning-based WIFI type identification system provided by an exemplary embodiment of the present application;
fig. 19 is a block diagram of a positioning device of a WIFI-based indoor positioning system provided by an exemplary embodiment of the present application;
fig. 20 is a block diagram of a machine learning-based WIFI type identification apparatus provided by an exemplary embodiment of the present application;
fig. 21 is a block diagram of a machine learning-based WIFI type identification apparatus provided by an exemplary embodiment of the present application;
fig. 22 is a block diagram of a server according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, terms referred to in the embodiments of the present application are briefly described:
WIFI: also known as "mobile hotspot," is a Wireless Local Area Network (WLAN) technology that is built into the IEEE 802.11 standard. The purpose of this technique is to improve interoperability between wireless network products based on the IEEE 802.11 standard.
Service Set Identifier (SSID): i.e. the name of WIFI. The SSID divides a wireless local area network into a plurality of sub-networks which need different authentication, each sub-network needs independent authentication, and only the user who passes the authentication can enter the corresponding sub-network, so that the unauthorized user is prevented from entering the network.
Convolutional Neural Networks (CNN): is a feedforward neural network with a deep structure and including convolution calculation, and is one of the representative algorithms of deep learning (deep learning). Consists of several convolution kernels, pooling layers (pooling layers) and full-link layers at the ends. Convolutional neural networks give better results in terms of image and audio, and fewer parameters than other deep neural networks.
Drop-out (drop-out): is a technique to avoid model overfitting by randomly discarding neurons during deep neural network training. The technology enables only part of neurons to play a role in each iteration, so that the network structure of the model is simple, and because the neurons playing a role are randomly selected, dependence on specific neurons is further avoided, and overfitting is inhibited.
jieba: is a Chinese word segmentation tool.
Unicode: is an industry standard in the field of computer science and comprises character sets, coding schemes and the like. It sets uniform and unique binary code for each character in each language to meet the requirements of cross-language and cross-platform text conversion and processing.
Linear rectification function (Rectified Linear Unit, ReLU): also called modified linear unit, is a commonly used activation function in artificial neural networks, and usually refers to a nonlinear function represented by a ramp function and its variants.
Sigmoid: also known as S-type growth curves. In the information science, due to the properties of single increment and single increment of an inverse function, a Sigmoid function is often used as an activation function of a neural network, and variables are mapped to be between 0 and 1.
Adaptive moment estimation (Adam) optimization algorithm: the method is a first-order optimization algorithm which can replace the traditional random gradient descent process. The algorithm can iteratively update neural network weights based on training data.
Fig. 1 is a schematic diagram illustrating an implementation environment of a WIFI-based indoor positioning method according to an exemplary embodiment of the present application, where the implementation environment includes a large number of terminals 120 and a server 140.
The terminal 120 and the server 140 are connected to each other through WIFI.
Optionally, the terminal 120 supports WIFI connection, including at least one of a laptop, a desktop, a smart phone, a tablet, a smart speaker, and a smart robot.
Optionally, the server 140 supports WIFI connection, and may be an independent server or a server cluster formed by multiple servers.
The terminal 120 includes a first memory and a first processor. The first memory stores a first program; the first program is called and executed by the first processor to realize the WIFI-based indoor positioning method. The first memory may include, but is not limited to, the following: random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Read-Only Memory (EPROM), and electrically Erasable Read-Only Memory (EEPROM).
The first processor may be comprised of one or more integrated circuit chips. Alternatively, the first processor may be a general purpose processor, such as a Central Processing Unit (CPU) or a Network Processor (NP).
The server 140 includes a second memory and a second processor. The second memory stores a second program, and the second program is called by the second processor to implement the WIFI-based indoor positioning method provided by the present application. Illustratively, the second memory stores therein a WIFI-type recognition model 110, which WIFI-type recognition model 110 is invoked by the second processor to implement the steps performed by the server in the machine-learning based WIFI-type recognition method. Optionally, the second memory may include, but is not limited to, the following: RAM, ROM, PROM, EPROM, EEPROM.
Optionally, the second processor may implement the above-mentioned WIFI-based indoor positioning method by calling the WIFI type identification model 110 stored in the second memory. Alternatively, the second processor may be a general purpose processor, such as a CPU or NP.
The WIFI-based indoor positioning method can be applied to terminals supporting indoor positioning systems.
As shown in fig. 2, the application scenario of the present application is a fingerprint database construction stage and a positioning result determination stage of an indoor positioning system, that is, an indoor positioning system offline stage and an indoor positioning system online stage.
The indoor positioning system in this embodiment adopts a WLAN positioning technology.
Indoor positioning refers to the calculation of position coordinates of a target by an indoor positioning system in an indoor environment. In an indoor environment, the WLAN estimates the location of the mobile device through existing access points and wireless networks. The WLAN has a coverage range of 50-100 m and is not limited by the line of sight, so that the WLAN becomes the hottest indoor positioning technology.
In the WLAN positioning technology, a method mainly used is a positioning method based on Signal Strength indicator (RSSI), and positioning by constructing a fingerprint database is one of RSSI methods.
In the fingerprint library construction stage, a stable electromagnetic field environment is a precondition for constructing a stable and reliable fingerprint library. The stable electromagnetic field environment makes the signal of WIFI need to keep relatively stable. Besides the influence of environmental factors, the mounting position of WIFI also influences the stability of WIFI signals. Since the installation locations of the mobile WIFI and the private WIFI are easily changed, the two types of WIFI need to be listed as black lists.
In the fingerprint database construction stage, before the fingerprint database is constructed, blacklist identification is carried out on WIFI through a WIFI type identification method based on machine learning. If the WIFI is identified to exist in the blacklist, the WIFI is not allowed to participate in building a fingerprint library; if WIFI is identified as not present in the blacklist, the WIFI is allowed to participate in building the fingerprint library.
And in the positioning result judging stage, judging the positioning result according to the WIFI signal strength of the position of the user. And comparing the WIFI signal intensity of the position of the user with all the WIFI signal intensities in the system, wherein the position which is similar to the WIFI is the positioning result. The mobile WIFI and the private WIFI cannot generate a unique mapping relation with an indoor physical location because their locations are easy to change. Similarly, the above two kinds of WIFI need to be listed as black lists.
In the positioning result judging stage, before online positioning, blacklist identification is carried out on WIFI through a WIFI type identification method based on machine learning, and signal intensity of WIFI in a blacklist is filtered.
Fig. 3 is a flowchart illustrating a WIFI-based indoor positioning method according to an exemplary embodiment of the present application, which is applied to the server shown in fig. 1. The method comprises the following steps:
step 301, acquiring SSIDs of a plurality of WIFI hotspots;
optionally, the WIFI hotspot (also referred to as a WLAN hotspot) is a convenient wireless local area network that can perform data transmission.
The WIFI hotspot utilizes a Radio Frequency (RF) technology to replace an old-fashioned local area network formed by a twisted pair copper wire (Coaxial) with poor flexibility, so that the wireless local area network can enable a user to access a wireless network by using a simple access architecture.
Illustratively, the handheld terminal is a portable WIFI hotspot and has the function of sharing a wireless network with other devices supporting WIFI access functions. The handheld terminal can be used as a wireless router to broadcast the wireless network and then be received by other devices supporting the WIFI access function.
Optionally, the SSID is the name of WIFI.
The SSID divides a wireless local area network into a plurality of sub-networks which need different authentication, each sub-network needs independent authentication, and only the user who passes the authentication can enter the corresponding sub-network, so that the unauthorized user is prevented from entering the network.
Illustratively, the SSID is "My WIFI! ". For a device which wants to access a sub-network of the wireless local area network corresponding to the SSID, the WLAN function needs to be turned on, and "my WIFI | is selected! And connecting, and obtaining authorization through identity authentication to enter the wireless network.
Step 302, identifying the SSID of the WIFI hotspot through a convolutional neural network to obtain the WIFI type of the WIFI hotspot;
the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed.
The convolutional neural network is a feedforward neural network including convolutional calculation and having a deep structure, and is one of representative algorithms of deep learning. The convolutional neural network consists of a plurality of convolutional kernels, a pooling layer and a full-link layer.
Optionally, the WIFI types include the following two types: mobile WIFI or private WIFI, fixed WIFI (e.g., merchant WIFI).
In machine learning, positive and negative examples are defined for the classification problem.
Alternatively, a positive sample refers to a sample belonging to a certain class, and a negative sample (negative sample) refers to a sample not belonging to a certain class. Illustratively, when image recognition of the letter a is performed, the sample of the letter a belongs to a positive sample, and the sample of the letter a belongs to a negative sample.
In the application, the positive sample is a WIFI hotspot whose position is easy to change, such as mobile WIFI or private WIFI; the negative sample is a WIFI hotspot whose position is not easily changed, such as a merchant WIFI.
Optionally, the convolutional neural network identifies the WIFI type of the WIFI hotspot through training. The recognition result comprises: and mobile WIFI or private WIFI or fixed WIFI.
Step 303, constructing a WIFI fingerprint database according to the WIFI hotspot with the fixed WIFI type;
the WIFI fingerprint database associates the positions of WIFI hotspots in the actual environment with certain fingerprints, and one position corresponds to one unique fingerprint.
Optionally, the fingerprint in the WIFI fingerprint database corresponds to the signal strength of the WIFI hotspot.
304, when an indoor positioning request is received, responding to the indoor positioning request according to the WIFI fingerprint database;
and the server receives an indoor positioning request sent by a user through an indoor positioning system, and calls the WIFI fingerprint library to obtain an indoor positioning result.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, the WIFI fingerprint library is established for the fixed WIFI hotspot according to the WIFI type, the influence of the signal of the WIFI hotspot which is easy to move on the positioning result is removed, and the accuracy and reliability of the indoor positioning result are improved.
In an alternative embodiment based on fig. 3, fig. 4 shows a flowchart of a WIFI-based indoor positioning method provided by an exemplary embodiment of the present application. In this embodiment, step 302 in the above embodiment may alternatively be implemented as step 3021, step 3022:
step 3021, extracting vector characteristics of the WIFI hotspot according to the SSID;
optionally, the server obtains an SSID of the WIFI hotspot, and converts the SSID into a vector corresponding to the WIFI hotspot through processing steps of character segmentation, encoding and the like.
Step 3022, calling the convolutional neural network to identify the vector characteristics of the SSID, so as to obtain the WIFI type of the WIFI hotspot;
the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed.
Optionally, the WIFI types include the following two types: mobile WIFI or private WIFI, fixed WIFI (e.g., merchant WIFI).
Optionally, the convolutional neural network identifies the WIFI type of the WIFI hotspot through training. The recognition result comprises: and mobile WIFI or private WIFI or fixed WIFI.
In one example, a convolutional neural network comprises a concatenation of: n-1 groups of convolution layers and pooling layers, wherein the nth convolution layer and the full-connection layer are provided, and n is an integer greater than 1; calling a convolutional neural network to identify the vector characteristics of the SSID, wherein the identification comprises the following steps: determining the vector characteristics of the WIFI hotspot as 1 st order convolution data; calling the ith convolution layer to perform feature extraction on input ith-1 order convolution data to obtain ith order convolution data, wherein i is a positive integer not greater than n, and the 1 st order convolution data is convolution data of a WIFI hotspot; when i is not equal to n, calling the ith pooling layer to perform pooling treatment on the ith order convolution data to obtain pooled ith order convolution data and inputting the pooled ith order convolution data into the next layer of convolution layer; when i is equal to n, converting the pooled nth order convolution data into one-dimensional vector features; and calling the full connection layer to identify the one-dimensional vector characteristics to obtain the WIFI type with the WIFI characteristics.
Optionally, the convolutional layer functions to perform feature extraction on the input data. Convolutional layer parameters include convolutional kernel size, step size, and padding, which together determine the dimensions of the convolutional layer output signature. Where the convolution kernel size can be specified as an arbitrary value smaller than the size of the input convolution data, the larger the convolution kernel, the more complex the input features that can be extracted.
Optionally, the function of the pooling layer is to reduce the amount of data to be processed by the next convolutional layer. And performing pooling layer operation once every time the convolution layer operation of one layer is completed until the convolution layer calculation of n layers is completed. The pooling comprises the following steps: at least one of maximum Pooling (Max Pooling) and Average Pooling (Average Pooling).
Optionally, the full connection layer is an output layer, and the function of the full connection layer is to perform nonlinear combination on the extracted features to obtain an output.
In one example, according to a WIFI hotspot with a fixed WIFI type, constructing a WIFI fingerprint library, comprising: if the WIFI type is a WIFI hotspot of mobile WIFI or private WIFI, listing the WIFI hotspot in a blacklist; and if the WIFI type is a WIFI hotspot of fixed WIFI, constructing a WIFI fingerprint database according to the WIFI hotspot.
Since the installation locations of the mobile WIFI and the private WIFI are easily changed, the two types of WIFI need to be listed as black lists. And at the WIFI hotspot of the blacklist, the WIFI fingerprint database is not constructed.
In one example, when an indoor positioning request is received, a WIFI hotspot with the strongest signal strength is determined according to a WIFI fingerprint library; and determining the position information of the WIFI hotspot as a response result of the indoor positioning request.
The indoor positioning system receives the indoor positioning request and responds to the indoor positioning request.
Optionally, the WIFI fingerprint database includes signal strength information of a WIFI hotspot whose WIFI type is fixed WIFI. The indoor positioning system judges the signal intensity information of the WIFI hotspots in the WIFI fingerprint database, determines a WIFI hotspot with the strongest signal intensity, and determines the position information of the WIFI hotspot as a response result of the indoor positioning request.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, the WIFI fingerprint library is established for the fixed WIFI hotspot according to the WIFI type, the influence of the signal of the WIFI hotspot which is easy to move on the positioning result is removed, and the accuracy and reliability of the indoor positioning result are improved.
By invoking a convolutional neural network, the convolutional neural network comprising: the cascaded n-1 groups of convolution layers and pooling layers, the nth convolution layer and the full-connection layer identify the vector characteristics of the SSID, prevent over-fitting, improve the identification effect and improve the accuracy of the indoor positioning system.
Fig. 5 is a flowchart illustrating a WIFI type identification method based on machine learning according to an exemplary embodiment of the present application, which is applied to the server shown in fig. 1. The method comprises the following steps:
step 501, acquiring an SSID of a WIFI hotspot;
optionally, the WIFI hotspot (also referred to as a WLAN hotspot) is a convenient wireless local area network that can perform data transmission.
The WIFI hotspot utilizes a Radio Frequency (RF) technology to replace an old-fashioned local area network formed by a twisted pair copper wire (Coaxial) with poor flexibility, so that the wireless local area network can enable a user to access a wireless network by using a simple access architecture.
Illustratively, the handheld terminal is a portable WIFI hotspot and has the function of sharing a wireless network with other devices supporting WIFI access functions. The handheld terminal can be used as a wireless router to broadcast the wireless network and then be received by other devices supporting the WIFI access function.
Optionally, the SSID is the name of WIFI.
The SSID divides a wireless local area network into a plurality of sub-networks which need different authentication, each sub-network needs independent authentication, and only the user who passes the authentication can enter the corresponding sub-network, so that the unauthorized user is prevented from entering the network.
Illustratively, the SSID is "My WIFI! ". For a device which wants to access a sub-network of the wireless local area network corresponding to the SSID, the WLAN function needs to be turned on, and "my WIFI | is selected! And connecting, and obtaining authorization through identity authentication to enter the wireless network.
Step 502, extracting the vector characteristics of the WIFI hotspot according to the SSID;
optionally, the server obtains an SSID of the WIFI hotspot, and converts the SSID into a vector corresponding to the WIFI hotspot through processing steps of character segmentation, encoding and the like.
Step 503, calling a convolutional neural network to identify the vector characteristics of the SSID, and obtaining the WIFI type of the WIFI hotspot;
the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed.
The convolutional neural network is a feedforward neural network including convolutional calculation and having a deep structure, and is one of representative algorithms of deep learning. The convolutional neural network consists of a plurality of convolutional kernels, a pooling layer and a full-link layer.
Optionally, the WIFI types include the following two types: mobile WIFI or private WIFI, fixed WIFI (e.g., merchant WIFI).
In machine learning, positive and negative examples are defined for the classification problem.
Alternatively, a positive sample refers to a sample belonging to a certain class, and a negative sample (negative sample) refers to a sample not belonging to a certain class. Illustratively, when image recognition of the letter a is performed, the sample of the letter a belongs to a positive sample, and the sample of the letter a belongs to a negative sample.
In the application, the positive sample is a WIFI hotspot whose position is easy to change, such as mobile WIFI or private WIFI; the negative sample is a WIFI hotspot whose position is not easily changed, such as a merchant WIFI.
Optionally, the convolutional neural network identifies the WIFI type of the WIFI hotspot through training. The recognition result comprises: and mobile WIFI or private WIFI or fixed WIFI.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, whether the WIFI hotspot is a mobile WIFI or a private WIFI is identified, and the accuracy and reliability of identification are improved.
In an alternative embodiment based on fig. 5, fig. 6 shows a flowchart of a machine learning-based WIFI type identification method provided by an exemplary embodiment of the present application. In this embodiment, step 503 in the above embodiment can be alternatively implemented as step 5031, step 5032, step 5033 and step 5034:
step 5031, determining the vector characteristics of the WIFI hotspot as 1 st order convolution data;
optionally, the 1 st order convolution data is obtained by the server by acquiring an SSID of a WIFI hotspot, converting the SSID into a vector corresponding to the WIFI hotspot, and calling the first convolution layer to extract a vector feature of the WIFI hotspot.
The purpose of the convolution operation is to extract different features of the input.
Optionally, the vector features corresponding to the convolution data of the 1 st order are relatively low-level, and through the multilayer convolution layer, more complex features can be iteratively extracted from the low-level features.
Step 5032, calling the ith convolution layer to perform feature extraction on the input ith-1 order convolution data to obtain ith order convolution data, wherein i is a positive integer not greater than n, and the 1 st order convolution data is convolution data of a WIFI hotspot;
the convolutional layer functions to perform feature extraction on input data.
Convolutional layer parameters include convolutional kernel size, step size, and padding, which together determine the dimensions of the convolutional layer output signature. Where the convolution kernel size can be specified as an arbitrary value smaller than the size of the input convolution data, the larger the convolution kernel, the more complex the input features that can be extracted.
The step length defines the distance between positions of convolution kernels which are adjacent to each other and sweep through the feature map corresponding to the input i-1 th order convolution data twice, when the convolution step length is 1, the convolution kernels sweep through elements of the feature map one by one, and when the step length is n, n-1 pixels can be skipped in the next scanning.
Filling is a method for artificially increasing the size of a feature map corresponding to the i-1 th order convolution data before the feature map passes through a convolution kernel so as to counteract the influence of size shrinkage in calculation. A common padding method is padding by 0 and repeated boundary value (replication padding).
Optionally, the convolution layer of the ith layer includes a plurality of convolution kernels, and each element constituting a convolution kernel corresponds to a weight coefficient and a bias vector (bias vector), similar to a neuron (neuron) of a feedforward neural network. Each neuron in the convolution layer is connected to a plurality of neurons in a closely located region in the previous layer, the size of the region being dependent on the size of the convolution kernel.
When the convolution kernel works, the convolution kernel regularly sweeps the input characteristics, matrix element multiplication summation is carried out on the input characteristics, and deviation amount is superposed.
FIG. 7 is a diagram illustrating the use of a convolution kernel to obtain a convolution output according to an exemplary embodiment of the present application;
a 5 x 5 matrix is input and a convolution operation with a size of 3 and a step size of 1 is performed on the matrix.
The size is 3, i.e. the convolution kernel is a 3 x 3 matrix. The step size is 1, i.e. each time sliding one unit to the right with a fixed window of 3 x 3. And (4) convolution outputting one element every time the window slides once, and obtaining an output matrix after calculation is completed.
The calculation formula of the size of the output matrix is as follows: [ (original matrix size-convolution kernel size)/step ] + 1. Substituting the original matrix size 5, the convolution kernel size 3 and the step size 1, and calculating to obtain the output matrix which is a 3 x 3 matrix.
Illustratively, the convolution kernel is [ -1, 0, -1; -1, 0, -1; -1, 0, -1], data within the window being [1, 0, 2; 5, 4, 2; 3, 4, 5], the process of the convolution operation is (-1) × 1+0 × 0+1 × 2+ (-1) × 5+0 × 4+1 × 2+ (-1) × 3+0 × 4+1 × 5 ═ 0, and the output element of the current convolution operation is 0.
As the window of the convolution kernel continues to slide, a 3 x 3 output matrix is calculated.
Optionally, the ith convolutional layer includes a plurality of convolution kernels, and the convolution kernels are used to perform convolution operation on the input i-1 th order convolution data to obtain a plurality of corresponding output matrices, that is, the step of calling the ith convolutional layer to perform feature extraction on the input i-1 th order convolution data is completed.
Step 5033, when i is not equal to n, calling the ith pooling layer to perform pooling on the ith order convolution data to obtain pooled ith order convolution data and inputting the pooled ith order convolution data into the next layer of convolution layer;
the function of the pooling layer is to reduce the amount of data to be processed by the next convolutional layer. And performing pooling layer operation once every time the convolution layer operation of one layer is completed until the convolution layer calculation of n layers is completed.
Optionally, pooling comprises: at least one of Max Pooling (Max Pooling), Average Pooling (Average Pooling).
The pooling layer selects pooling areas as the same procedure as the convolution kernel scan profile described above, controlled by pooling size, step size and fill.
Illustratively, when the output size of the i-th convolutional layer is 32 × 32 and the size of the i-th pooling layer filter is 2 × 2, after the pooling process, the size of the output data is 16 × 16, that is, the existing data amount is reduced to 1/4 before pooling, so that the number of parameters is reduced, and thus, network overfitting can be prevented.
FIG. 8 is a diagram illustrating invoking a pooling layer to obtain pooled convolution data as provided by an exemplary embodiment of the present application;
the size of the i-th pooled layer filter was 2 x 2 when the output size of the i-th convolutional layer was 4 x 4. Maximum pooling is used.
The data for the current pooled window is [7, 3; 8, 7], taking the maximum value 8 of the data in the current pooling window to obtain the corresponding element 8 of the pooling output.
After pooling, the size of the output data is 2 x 2, namely the existing data amount is reduced to 1/4 before pooling, so that the feature dimension is reduced, the number of data and parameters is reduced, overfitting is reduced, and the fault tolerance of the model is improved.
Step 5034, when i is equal to n, converting the pooled nth order convolution data into one-dimensional vector features;
and after the operation of all the convolution layers and the pooling layer is finished, obtaining nth order convolution data corresponding to a plurality of one-dimensional vectors, and unfolding all the one-dimensional vectors into a whole one-dimensional vector.
As shown in fig. 9, the characteristic diagram corresponding to the pooled nth order convolution data is a 3 × 3 matrix [1, 1, 0; 4, 2, 1; 0,2,1]. The matrix is expanded to obtain a 1 × 9 one-dimensional matrix [1, 1, 0, 4, 2, 1, 0, 2, 1], i.e. a one-dimensional vector.
Step 5035, calling the full connection layer to identify the one-dimensional vector characteristics to obtain a WIFI type with WIFI characteristics;
and the fully-connected layer is an output layer, and the function of the fully-connected layer is to carry out nonlinear combination on the extracted features to obtain output.
Alternatively, the fully-connected layer does not have feature extraction capability per se, but rather attempts to utilize existing high-order features to accomplish the goal of machine learning.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, whether the WIFI hotspot is a mobile WIFI or a private WIFI is identified, and the accuracy and reliability of identification are improved.
Through n-1 cascaded convolution layers and pooling layers, the nth convolution layer and the full-connection layer, the vector characteristics of the SSID are identified, overfitting is prevented, and the identification effect is improved.
In an alternative embodiment based on fig. 6, fig. 10 shows a flowchart of a machine learning-based WIFI type identification method provided by an exemplary embodiment of the present application. In this embodiment, step 5035 in the above embodiment may alternatively be implemented as step 50351, step 50352, step 50353:
step 50351, calling the first full-connection layer to process the one-dimensional vector features to obtain a first full-connection result;
the full-connection layer includes: the first full connection layer and the second full connection layer have different activation functions;
optionally, the activation function of the first fully-connected layer is a ReLU.
ReLU is an activation function commonly used in artificial neural networks, and generally refers to a nonlinear function represented by a ramp function and its variants.
Optionally, the ReLU may enhance the nonlinear characteristic of the entire convolutional neural network, and increase the training speed of the convolutional neural network by several times without significantly affecting the generalization accuracy of the model.
Step 50352, performing a weight-discarding operation on the first full-connection result to obtain an operated first full-connection result;
drop-out (drop-out) is a technique that avoids model overfitting by randomly dropping neurons during deep neural network training.
Optionally, drop-out operation is performed on the first full connection result, only part of neurons play a role, so that the network structure of the model is simplified, and the neurons playing a role are randomly selected, so that dependence on specific neurons is further avoided, and overfitting is inhibited.
Note that the objective of suppressing overfitting can also be achieved using L1 and L2 regularizations.
Step 50353, calling a second full connection layer to process the calculated first full connection result to obtain a WIFI type with WIFI characteristics;
optionally, the activation function of the second fully connected layer is Sigmoid.
The Sigmoid function maps the input computed first full connection result to between 0 and 1.
As shown in fig. 11, the fully-connected layer includes a first fully-connected layer and a second fully-connected layer. A one-dimensional vector is a 1024-dimensional vector.
The activation function of the first fully-connected layer is ReLU, which is used to speed up training and obtain a 200-dimensional one-dimensional vector. And performing drop-out operation between the two fully connected layers once again to avoid overfitting. The activation function of the second fully connected layer is Sigmoid, resulting in a one-dimensional vector.
In one example, the convolutional neural network is trained by using two-class cross entropy as a loss function and an adaptive moment estimation (Adam) optimization algorithm.
Cross Entropy (Cross Entropy) is a concept in information theory used to measure the dissimilarity information between two probability distributions.
The loss function for the binary cross entropy is defined as follows:
wherein the content of the first and second substances,the probability that the neural network model predicts that the sample is a positive sample is shown, y is a sample label, if the sample belongs to the positive sample, the value is 1, otherwise, the value is 0.
The Adam optimization algorithm is a first-order optimization algorithm that can replace the traditional random gradient descent process. The algorithm can iteratively update neural network weights based on training data.
Optionally, the Adam optimization algorithm can adapt the learning rate to enable the convolutional neural network model to converge quickly.
Optionally, for the hyper-parameters in the network, such as the size of the convolution kernel and the ratio of drop-out, a Grid Search (Grid Search) is adopted, and an optimal value is selected according to the convergence effect of the loss function of the trained binary cross entropy.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, whether the WIFI hotspot is a mobile WIFI or a private WIFI is identified, and the accuracy and reliability of identification are improved.
By utilizing the optimization technology of the activation function and the drop-out, the training speed of the model is improved, overfitting is prevented, and the recognition effect is improved.
Fig. 12 is a flowchart illustrating a method for WIFI type identification in a convolutional neural network identification module according to an exemplary embodiment of the present application;
step 1201, acquiring SSIDs of a plurality of WIFI hotspots;
optionally, the SSID is the name of WIFI.
The SSID divides a wireless local area network into a plurality of sub-networks which need different authentication, each sub-network needs independent authentication, and only the user who passes the authentication can enter the corresponding sub-network, so that the unauthorized user is prevented from entering the network.
Step 1202, extracting vector features of the WIFI hotspot according to the SSID;
optionally, the server obtains an SSID of the WIFI hotspot, and converts the SSID into a vector corresponding to the WIFI hotspot through processing steps of character segmentation, encoding and the like.
Step 1203, inputting the preprocessed character string;
optionally, the pre-processing comprises: and extracting the vector characteristics of the WIFI hotspot according to the SSID.
Step 1204, vectorizing the character string mean value to obtain a corresponding one-dimensional vector;
as shown in fig. 13, the SSID of the WIFI hotspot is converted into a 1024-bit string.
Optionally, the maximum length of the SSID of the WIFI hotspot is 32 characters, and each character may be represented by a 32-bit 2-ary character string. Each SSID may be represented by a 1024-bit binary string, with less than 1024 bits represented by a predetermined value "-1".
And carrying out mean vectorization on the 1024-bit string.
Optionally, the character "0" corresponds to the vector [0.5 ]; the character "1" corresponds to vector [1.0 ]; the character "-1" corresponds to the vector [0], and the 1024-bit string is converted into a 1024-dimensional one-dimensional vector.
Step 1205, inputting one-dimensional vectors corresponding to the character strings in the convolution layer, and outputting one-dimensional vectors with various lengths by various convolution kernels;
the convolution layer contains a plurality of convolution kernels, and the convolution kernels are used for performing convolution operation on one-dimensional vectors corresponding to the input character strings to obtain corresponding one-dimensional vectors with various lengths.
Step 1206, outputting a plurality of one-dimensional vectors with the length equal to the number of convolution kernels at the pooling layer;
each time the convolution layer operation of one layer is completed, a pooling layer operation is performed.
Step 1207, expanding the pooled 1-dimensional vectors into 1 one-dimensional vector;
step 1208, calling a first full-connection layer to process the one-dimensional vector features to obtain a first full-connection result;
optionally, the activation function of the first fully-connected layer is a ReLU.
Step 1209, calling a second full connection layer to process the first full connection result after the drop-out operation;
optionally, the activation function of the second fully connected layer is Sigmoid.
Step 1210, grid searching for an optimal threshold;
grid search is a parameter adjusting means, namely exhaustive search. Of all candidate parameters, the best performing parameter is the final result by trying each possibility through a loop traversal.
Optionally, the convolutional neural network is obtained by using a two-class cross entropy as a loss function and training by using an Adam optimization algorithm.
And (4) for the hyper-parameters in the network, adopting grid search, and selecting an optimal numerical value according to the convergence effect of the loss function of the trained two-class cross entropy.
Step 1211, output whether fixed WIFI is available.
Step 1212, establishing a WIFI fingerprint database according to the WIFI hotspot with the fixed WIFI type;
the WIFI fingerprint database associates the positions of WIFI hotspots in the actual environment with certain fingerprints, and one position corresponds to one unique fingerprint.
Optionally, the fingerprint in the WIFI fingerprint database corresponds to the signal strength of the WIFI hotspot.
Step 1213, when the indoor positioning request is received, responding to the indoor positioning request according to the WIFI fingerprint database;
and the server receives an indoor positioning request sent by a user through an indoor positioning system, and calls the WIFI fingerprint library to obtain an indoor positioning result.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, whether the WIFI hotspot is a fixed WIFI hotspot is identified, a fingerprint database is constructed according to the WIFI hotspot of a fixed WIFI type, and the accuracy and reliability of indoor positioning are improved.
Illustratively, the steps performed in the convolutional neural network identification module are shown in table one:
watch 1
Layer(type) Output Shape
main_input(InputLayer) (None,1024,1)
Conv1d_1(Conv1D) (None,1024,64)
max_pooling1d_1(MaxPooling1) (None,256,64)
Conv1d_2(Conv1D) (None,256,64)
max_pooling1d_2(MaxPooling1) (None,64,64)
Conv1d_3(Conv1D) (None,64,64)
max_pooling1d_3(MaxPooling1) (None,16,64)
Conv1d_4(Conv1D) (None,16,64)
flatten_1(Flatten) (None,1024)
dense_1(Dense) (None,200)
dropout_1(Dropout) (None,200)
main_output(Dense) (None,1)
As shown in table one, main _ input represents the input layer of the convolutional neural network recognition module, the operation type is InputLayer, and the data of the layer is a two-dimensional vector of 1024 × 1.
The convolution layer Conv1d _1 performs convolution operation Conv1D on the output result of the input layer, and obtains 1024 × 64 two-dimensional vectors.
The pooling layer max _ pooling1d _1 performs a pooling process MaxPooling1 on the output result of the convolutional layer Conv1d _1 to obtain a two-dimensional vector of 256 × 64.
The convolution layer Conv1d _2 performs convolution operation Conv1D on the output result of the pooling layer max _ posing 1d _1 to obtain a two-dimensional vector of 256 × 64.
The pooling layer max _ pooling1d _2 performs a pooling process MaxPooling1 on the output result of the convolutional layer Conv1d _2 to obtain a two-dimensional vector of 64 × 64.
The convolution layer Conv1d _3 performs convolution operation Conv1D on the output result of the pooling layer max _ posing 1d _2 to obtain a two-dimensional vector of 64 × 64.
The pooling layer max _ pooling1d _3 performs a pooling process MaxPooling1 on the output result of the convolutional layer Conv1d _3 to obtain a two-dimensional vector of 16 × 64.
The convolution layer Conv1d _4 performs convolution operation Conv1D on the output result of the pooling layer max _ posing 1d _3 to obtain a two-dimensional vector of 16 × 64.
The unfolding layer Flatten _1 performs a Flatten operation on the convolutional layer Conv1d _4 to obtain a 1024-dimensional one-dimensional vector.
And the first fully connected layer Dense _1 performs a first Dense operation on the output result of the unfolding layer flatten _1 to obtain a 200-dimensional one-dimensional vector.
And the drop weight layer Dropout _1 carries out Dropout operation on the output result of the first full connection layer dense _1 to obtain a 200-dimensional one-dimensional vector.
And main _ input represents an output layer of the convolutional neural network identification module, and a second Dense operation is performed on an output result of the weight abandon layer dropout _1 to obtain a one-dimensional vector.
In an alternative embodiment based on fig. 5, fig. 14 is a flowchart illustrating a WIFI type identification method based on machine learning provided by an exemplary embodiment of the present application. In this embodiment, the step 502 in the above embodiment may alternatively be implemented as the step 5021, the step 5022, and the step 5023:
step 5021, the SSID is segmented into single characters;
optionally, the SSID comprises: at least one of letters, numbers, words and symbols.
Characters refer to letters, numbers, words and symbols used in computers. Illustratively, the numbers are 1, 2, 3; the letters are A, B, C; the characters are you, me and he; the symbols are! And percent; all the above are characters.
Illustratively, for the SSID "My WIFI! ", split into 7 characters:" I "," W "," I "," F "," I ", and"! ".
Step 5022, converting the single character after being split into a binary character string in a binary format according to a character coding format;
the server can only process the numbers and can not process the characters, and if the characters are processed, the characters must be converted into the numbers to be processed.
The encoding method includes but is not limited to: at least one of American Standard Code for Information Interchange (ASCII), Chinese character set for Information Interchange (GB 2312), extended Chinese character Code (GBK), and Unicode.
The Unicode is a character encoding scheme which is set by the international organization and can accommodate all characters and symbols in the world. Unicode enables computers to implement cross-language, cross-platform text conversion and processing. Current Unicode characters are organized into 17 groups, 0x0000 to 0x10FFFF, each group being called planes (planes) with 65536 code bits per Plane for a total of 1114112. However, only a few planes are currently used. A Unicode Transformation Format (UTF) is an encoding scheme for transforming numbers into program data, and includes: UTF-8, UTF-16, UTF-32.
In addition, the number of bytes corresponding to the same character is not necessarily the same in different encoding methods. In ASCII encoding, 1 byte is required for one english alphabet character to be stored. In GB 2312 coding or GBK coding, 2 bytes are required for one kanji character storage. In UTF-8 encoding, 1 byte is required for one english alphabet character storage and 3 to 4 bytes are required for one kanji character storage. In UTF-16 encoding, 2 bytes are required for either an english alphabet character or a kanji character storage (some kanji storage for Unicode extension requires 4 bytes). In UTF-32 encoding, the storage of any character in the world requires 4 bytes.
Step 5023, when the binary string reaches the maximum length, determining the binary string as the vector feature of the WIFI hotspot;
optionally, the maximum length of the binary string is defined as a 1024-bit binary character.
In one example, when the binary string does not reach a maximum value, the binary string is padded with a predetermined value.
Optionally, the front of the binary string is padded to 1024 bits by using a predetermined value-1.
Illustratively, the SSID "my WIFI! "contains 7 characters, each of which can be represented by a 32-bit binary string, so the SSID" I WIFI my! "the number of bits of the corresponding binary string is: bit 7 × 32-224. The binary string does not reach the maximum value of 1024 bits, and the binary string is filled up by adopting-1.
Fig. 15 is a flowchart illustrating extraction of vector features of WIFI hotspots according to SSIDs according to an exemplary embodiment of the present application;
step 1501, SSID is input;
the SSID of the unknown WIFI hotspot is input as "Tencent-GuestWiFi".
Step 1502, the SSID is segmented into individual characters.
The SSID "Tencent-GuestWiFi" contains 17 characters: "T", "e", "n", "c", "e", "n", "T", "-", "G", "u", "e", "s", "T", "W", "i", "F", and "i".
At step 1503, the characters are converted into numbers by Unicode code conversion.
According to the Unicode encoding mode, 17 characters corresponding to SSID "Tencent-GuestWiFi" are converted into numbers: 84, 101,110, 99, 101,110, 116, 45, 71, 117, 115, 101, 116, 87, 105, 70, 105.
Step 1504, the number is converted into binary format.
Alternatively, the binary data is a number represented by two digital numbers of 0 and 1. Its cardinality is 2, the carry rule is "go one by two", and the borrow rule is "borrow one as two".
The binary conversion is carried out on the numbers obtained by SSID 'Tencent-GuestWiFi' coding, and the result is as follows: '1010100','1100101','1101110','1100011','1100101','1101110','1110100','101101','1000111','1110101','1110011','1100101','1110100','1010111','1101001','1000110','1101001'.
In step 1505, 32-bit character completion is performed on the binary conversion result.
Alternatively, each character may be represented by a 32-bit binary string. If the binary conversion result corresponding to each character in the step 1304 is less than 32 bits, add 0 to the front of the binary conversion result for completion.
Illustratively, the binary conversion result of the character 'T' is '1010100', less than 32 bits, and the '00000000000000000000000001010100' is obtained by completion.
Step 1505, completing the character string of the binary character string with completed character completion into 1024 bit character string;
each character may be represented by a 32-bit binary string, so the SSID "tengent-guest wifi" corresponds to a binary string with the following number of bits: bit 17 × 32 ═ 544. The binary string has not reached a maximum of 1024 bits and 480-1 s are used to complete the binary string.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, whether the WIFI hotspot is a mobile WIFI or a private WIFI is identified, and the accuracy and reliability of identification are improved.
When the vector characteristics of the WIFI hotspot are extracted according to the SSID, a binary format of Unicode encoding is adopted as a vector, so that the information loss of keyword extraction is avoided, and the expression quality of the vector does not depend on the scale of a lexicon.
In an alternative embodiment based on fig. 5, fig. 16 is a flowchart illustrating a WIFI type identification method based on machine learning provided by an exemplary embodiment of the present application. In this embodiment, step 501 in the above embodiment further includes step 504:
step 504, identifying the SSID by adopting a regular expression to obtain a WIFI type of the WIFI hotspot;
regular expressions (a.k.a. regular expressions) are a logical formula that operates on strings of characters, including common characters (e.g., letters between a and z) and special characters (called "meta characters"). Regular expressions are typically used to retrieve, replace, text that conforms to a certain pattern (rule).
Optionally, specific characters defined in advance and combinations of the specific characters are used to form a "regular character string", and the "regular character string" is used to express a filtering logic for the character string.
And if the SSID of the WIFI hotspot is matched with the regular expression, the WIFI type of the WIFI hotspot is private WIFI or mobile WIFI.
In one example, a regular expression is obtained by:
firstly, acquiring WIFI connection data;
optionally, the WIFI connection data includes but is not limited to: SSID data of WIFI, and longitude and latitude data of WIFI.
It should be noted that, when the terminal accesses the WIFI, since the coverage of the WIFI signal is usually about 20 to 30m, the longitude and latitude of the terminal is equal to the longitude and latitude of the accessed WIFI.
Secondly, screening WIFI connection data meeting rule conditions from the WIFI connection data to serve as private/mobile WIFI;
wherein the rule conditions include: the longitude and latitude change distance is larger than a first threshold value, and the change times in a first time period are larger than a second threshold value, or the active times in a second time period are larger than a third threshold value, and the historical connection equipment number is smaller than a fourth threshold value.
Optionally, the first threshold is set by the server. The first threshold is 100 meters.
Optionally, the first time period is set by the server. The first period of time was 1 day.
Optionally, the second threshold is set by the server. The second threshold is 10 times.
Optionally, the second time period is set by the server. The second period of time was 3 months.
Optionally, the third threshold is set by the server. The third threshold is 45 times.
Optionally, the fourth threshold is set by the server. The fourth threshold is 5.
Illustratively, the mobile phone serves as a WIFI hotspot. After the WIFI connection data of the mobile phone is acquired, the mobile phone is determined to be private/mobile WIFI if the number of times that the longitude and latitude change distance is greater than 100 meters is greater than 10 times within 1 day.
Thirdly, performing word segmentation processing on the SSID of the private/mobile WIFI to obtain a plurality of candidate keywords;
optionally, the SSID of the private/mobile WIFI is subjected to word segmentation according to a jieba word segmentation tool.
Illustratively, the SSID "router 233" is tokenized to obtain candidate keywords "router" and "233".
Fourthly, counting word frequencies of the same candidate keywords to obtain keywords with the word frequencies larger than a word frequency threshold;
optionally, the word frequency threshold is set by the server.
Fifthly, constructing to obtain a regular expression according to the keywords of which the word frequency is greater than the word frequency threshold;
illustratively, the keywords greater than the word frequency threshold are "tend", "FAST", "dlink", and "router", and the regular expression is 'tend (tend | FAST | dlink | router). about'.
FIG. 17 illustrates a flow chart of regular expression identification provided by an exemplary embodiment of the present application;
step 1701, acquiring WIFI connection data;
optionally, the WIFI connection data includes but is not limited to: SSID data of WIFI, and longitude and latitude data of WIFI.
Step 1702, screening the WIFI connection data meeting the rule condition from the WIFI connection data as private/mobile WIFI;
optionally, the rule condition is: the location changes are frequent or active and there are few connected users.
Step 1703, performing word segmentation processing on the SSID of the private/mobile WIFI to obtain a plurality of keywords;
optionally, the SSID of the private/mobile WIFI is subjected to word segmentation processing to obtain a plurality of candidate keywords, and word frequencies of the same candidate keywords are counted to obtain keywords with the word frequencies larger than a word frequency threshold.
Step 1704, constructing a regular expression according to the keywords with the word frequency larger than the word frequency threshold;
regular expressions are a logical formula that operates on strings of characters and special characters.
Step 1705, inputting an SSID of the unknown WIFI hotspot;
if the SSID of the WIFI hotspot is unknown to match the regular expression, jumping to step 1506; if the SSID of the unknown WIFI hotspot does not match the regular expression, then proceed to step 1507.
Step 1706, the WIFI type of the unknown WIFI hotspot is private/mobile WIFI;
and step 1707, carrying out convolutional neural network identification on the unknown WIFI hotspot.
In summary, according to the method provided by this embodiment, the SSID information of the WIFI hotspot is acquired, the convolutional neural network is subjected to model training, the convolutional neural network is called to identify the WIFI hotspot, whether the WIFI hotspot is a mobile WIFI or a private WIFI is identified, and the accuracy and reliability of identification are improved.
The WIFI type of the unknown WIFI hotspot is preliminarily identified by the regular expression, wherein the seed WIFI for constructing the regular expression is selected according to WIFI connection data, so that the accuracy is improved and manual intervention is avoided on the premise of ensuring the scale of the seed WIFI.
Fig. 18 shows a schematic diagram of a machine-learning-based WIFI type identification system provided by an exemplary embodiment of the present application, which includes 3 modules: the system comprises a system input module, a system execution module and a system output module;
a system input module:
step 1801, inputting an unknown WIFI hotspot;
and inputting the SSID of the unknown WIFI hotspot, and identifying the type of the WIFI.
A system execution module;
step 1802, judging whether the existing blacklist has the WIFI hotspot or not;
since the installation locations of the mobile WIFI and the private WIFI are easily changed, the two types of WIFI need to be listed as black lists. And determining the existing blacklist according to the historical connection records.
Step 1803, judging the type of the WIFI hotspot according to the regular expression identification module;
if the type of the WIFI hotspot is private WIFI or mobile WIFI, jumping to step 1606; if the type of WIFI of the WIFI hotspot is not private WIFI or mobile WIFI, jump to step 1604.
Step 1804, a data preprocessing module;
and extracting the vector characteristics of the WIFI hotspot according to the SSID, and converting the SSID into a vector.
1805, judging the type of the WIFI hotspot according to a convolutional neural network identification module;
optionally, the convolutional neural network is trained based on a positive sample with the WIFI type being mobile WIFI or private WIFI, and a negative sample with the WIFI type being fixed.
If the type of the WIFI hotspot is private WIFI or mobile WIFI, jumping to step 1606; if the type of the WIFI hotspot is not private WIFI or mobile WIFI, jump to step 1607.
Step 1806, the WIFI type of the WIFI hotspot is private WIFI or mobile WIFI;
step 1807, the WIFI type of the WIFI hotspot is fixed WIFI;
a system output module;
step 1808, outputting the recognition result;
the recognition result comprises: the WIFI type of the WIFI hotspot is at least one of private WIFI or mobile WIFI and fixed WIFI.
Step 1809, update the existing blacklist;
and if the WIFI type of the WIFI hotspot is private WIFI or mobile WIFI, listing the WIFI hotspot in a blacklist.
The performance of the machine learning-based WIFI type identification system in test data is shown in table two:
watch two
Figure BDA0002236217710000261
The accuracy of the identification system is 83%, the recall rate is 83%, the comprehensive evaluation index f1 value is 83%, and it can be seen that the identification effect of the identification system for the WIFI type is better.
Fig. 19 is a block diagram illustrating a positioning apparatus of a WIFI-based indoor positioning system according to an exemplary embodiment of the present application, where the apparatus includes: an acquisition module 1901, an identification module 1902, a fingerprint library module 1903 and a positioning module 1904;
an obtaining module 1901 configured to obtain SSIDs of a plurality of WIFI hotspots;
the identification module 1902 is configured to identify a service set identifier SSID of the WIFI hotspot through a convolutional neural network, so as to obtain a WIFI type of the WIFI hotspot; the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed;
the fingerprint database module 1903 is configured to construct a WIFI fingerprint database according to a WIFI hotspot whose WIFI type is fixed WIFI;
a positioning module 1904 configured to, when receiving an indoor positioning request, respond to the indoor positioning request according to the WIFI fingerprint library.
In one example, identifying module 1902, is configured to extract vector features of WIFI hotspots according to SSID; and calling the convolutional neural network to identify the vector characteristics of the SSID to obtain the WIFI type of the WIFI hotspot.
In one example, a convolutional neural network comprises a concatenation of: n-1 groups of convolution layers and pooling layers, wherein the nth convolution layer and the full-connection layer are provided, and n is an integer greater than 1;
an identifying module 1902 configured to determine vector characteristics of the WIFI hotspot as order 1 convolution data; calling the ith convolution layer to perform feature extraction on input ith-1 order convolution data to obtain ith order convolution data, wherein i is a positive integer not greater than n, and the 1 st order convolution data is convolution data of a WIFI hotspot; when i is not equal to n, calling the ith pooling layer to perform pooling treatment on the ith order convolution data to obtain pooled ith order convolution data and inputting the pooled ith order convolution data into the next layer of convolution layer; when i is equal to n, converting the pooled nth order convolution data into one-dimensional vector features; and calling the full connection layer to identify the one-dimensional vector characteristics to obtain the WIFI type with the WIFI characteristics.
In one example, the fingerprint library module 1903 is configured to blacklist a WIFI hotspot if the WIFI type is a WIFI hotspot of mobile WIFI or private WIFI; and if the WIFI type is a WIFI hotspot of fixed WIFI, constructing a WIFI fingerprint database according to the WIFI hotspot.
In one example, the location module 1904 is configured to determine, when an indoor location request is received, a WIFI hotspot with the strongest signal strength according to a WIFI fingerprint database; and determining the position information of the WIFI hotspot as a response result of the indoor positioning request.
Fig. 20 is a block diagram illustrating a server according to an exemplary embodiment of the present application, where the server includes: an acquisition module 2001, a data preprocessing module 2002, and a convolutional neural network recognition module 2003;
an obtaining module 2001 configured to obtain an SSID of the WIFI hotspot;
a data preprocessing module 2002 configured to extract vector features of the WIFI hotspot according to the SSID;
the convolutional neural network identification module 2003 is configured to call a convolutional neural network to identify the vector characteristics of the SSID, so as to obtain the WIFI type of the WIFI hotspot;
the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed.
Fig. 21 is a block diagram illustrating a structure of a server according to an exemplary embodiment of the present application, where the server includes: an acquisition module 2001, a data preprocessing module 2002, a convolutional neural network recognition module 2003, and a regular expression recognition module 2004; the convolutional neural network recognition module 2003 further includes: a determination module 20031, a convolution processing module 20032, a pooling processing module 20033 and a full-connection operation module 20034;
an obtaining module 2001 configured to obtain an SSID of the WIFI hotspot;
a data preprocessing module 2002 configured to extract vector features of the WIFI hotspot according to the SSID;
the convolutional neural network identification module 2003 is configured to call a convolutional neural network to identify the vector characteristics of the SSID, so as to obtain the WIFI type of the WIFI hotspot;
the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is business.
In one example, the determining module 20031 is configured to determine the vector feature of the WIFI hotspot as the 1 st order convolution data; the convolution processing module 20032 is configured to call the ith convolution layer to perform feature extraction on the input i-1 th order convolution data to obtain ith order convolution data, wherein i is a positive integer not greater than n, and the 1 st order convolution data is convolution data of a WIFI hotspot; the pooling processing module 20033 is configured to call the ith pooling layer to perform pooling processing on the ith order convolution data when i is not equal to n, obtain pooled ith order convolution data and input the pooled ith order convolution data into the next layer of convolution layer; a pooling processing module 20033 configured to convert the pooled nth order convolution data into one-dimensional vector features when i is equal to n; and the full-connection operation module 20034 is configured to call a full-connection layer to identify the one-dimensional vector features, so as to obtain the WIFI type with the WIFI characteristics.
In one example, the full-join operation module 20034 is configured to invoke a first full-join layer to process the one-dimensional vector feature, so as to obtain a first full-join result; the full-connection operation module 20034 is configured to perform a right-discarding operation on the first full-connection result to obtain a first full-connection result after the operation; and the full-connection operation module 20034 is configured to call a second full-connection layer to process the operated first full-connection result, so as to obtain a WIFI type with WIFI characteristics.
In one example, the convolutional neural network is obtained by using two-class cross entropy as a loss function and training by using an Adam optimization algorithm.
In one example, a data pre-processing module 2002 configured to segment the SSID into single characters; converting the single character after segmentation into a binary character string in a binary format according to a character coding format; and when the binary string reaches the maximum length, determining the binary string as the vector feature of the WIFI hotspot.
In one example, when a binary string does not reach a maximum value, the binary string is padded with-1.
In one example, the regular expression identification module 2004 is configured to identify the SSID by using a regular expression to obtain a WIFI type of the WIFI hotspot; keywords in the regular expression are obtained according to the SSID of private WIFI or mobile WIFI.
In one example, the regular expression identification module 2004 is configured to obtain WIFI connection data; screening WIFI connection data meeting the rule conditions from the WIFI connection data to serve as private/mobile WIFI; performing word segmentation processing on the SSID of the private/mobile WIFI to obtain a plurality of candidate keywords; counting the word frequency of the same candidate keywords to obtain the keywords of which the word frequency is greater than a word frequency threshold; constructing to obtain a regular expression according to the keywords with the word frequency larger than the word frequency threshold;
wherein the rule conditions include: the longitude and latitude change distance is larger than a first threshold value, and the change times in a first time period are larger than a second threshold value, or the active times in a second time period are larger than a third threshold value, and the historical connection equipment number is smaller than a fourth threshold value.
The application also provides a server, which comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to realize the machine learning-based WIFI type identification method or the WIFI-based indoor positioning method provided by the above method embodiments. It should be noted that the server may be a server as provided in fig. 22 below.
Referring to fig. 22, a schematic structural diagram of a server according to an exemplary embodiment of the present application is shown. Specifically, the method comprises the following steps: the server 2200 includes a Central Processing Unit (CPU)2201, a system memory 2204 including a Random Access Memory (RAM)2202 and a Read Only Memory (ROM)2203, and a system bus 2205 connecting the system memory 2204 and the central processing unit 2201. The server 2200 also includes a basic input/output system (I/O system) 2206 to facilitate information transfer between devices within the computer, and a mass storage device 2207 to store an operating system 2213, application programs 2214, and other program modules 2222.
The basic input/output system 2206 includes a display 2208 for displaying information and an input device 2209, such as a mouse, keyboard, etc., for a user to input information. Wherein the display 2208 and the input device 2209 are both connected to the central processing unit 2201 through an input output controller 2210 connected to the system bus 2205. The basic input/output system 2206 may also include an input/output controller 2210 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 2210 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 2207 is connected to the central processing unit 2201 through a mass storage controller (not shown) connected to the system bus 2205. The mass storage device 2207 and its associated computer-readable media provide non-volatile storage for the server 2200. That is, the mass storage device 2207 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROI drive.
Without loss of generality, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 2204 and mass storage device 2207 described above may be collectively referred to as memory.
The memory stores one or more programs configured to be executed by the one or more central processing units 2201, the one or more programs containing instructions for implementing the above-described machine-learning-based WIFI type identification method, the central processing unit 2201 executing the one or more programs implementing the machine-learning-based WIFI type identification method, or the WIFI-based indoor positioning method, provided by the various method embodiments described above.
According to various embodiments of the present application, the server 2200 may also operate as a remote computer connected to a network via a network, such as the Internet. That is, the server 2200 may be connected to the network 2212 through a network interface unit 2211 connected to the system bus 2205, or may be connected to other types of networks or remote computer systems (not shown) using the network interface unit 2211.
The memory further includes one or more programs, the one or more programs being stored in the memory, the one or more programs including instructions for performing the steps performed by the server in the machine learning-based WIFI type identification method or the WIFI-based indoor positioning method provided by the embodiments of the present invention.
The embodiment of the application further provides computer equipment, which comprises a memory and a processor, wherein at least one instruction, at least one section of program, code set or instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded by the processor and is used for realizing the machine learning-based WIFI type identification method or the WIFI-based indoor positioning method.
An embodiment of the present application further provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or an instruction set is stored in the computer-readable storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the foregoing WIFI type identification method based on machine learning, or the indoor positioning method based on WIFI.
The present application further provides a computer program product, which when running on a computer, causes the computer to execute the WIFI type identification method based on machine learning, or the indoor positioning method based on WIFI, provided in the above method embodiments.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, which may be a computer readable storage medium contained in a memory of the above embodiments; or it may be a separate computer-readable storage medium not incorporated in the terminal. The computer-readable storage medium has stored therein at least one instruction, at least one program, a set of codes, or a set of instructions that are loaded and executed by a processor to implement the above-described machine learning-based WIFI type identification method, or WIFI-based indoor positioning method.
Optionally, the computer-readable storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a Solid State Drive (SSD), or an optical disc. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the above mentioned program may be stored in a computer readable storage medium, and the above mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The present application is intended to cover various modifications, alternatives, and equivalents, which may be included within the spirit and scope of the present application.

Claims (15)

1. An indoor positioning method based on wireless fidelity (WIFI), which is characterized by comprising the following steps:
acquiring service set identifiers SSID of a plurality of WIFI hotspots;
identifying the SSID of the WIFI hotspot through a convolutional neural network to obtain the WIFI type of the WIFI hotspot; the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed;
constructing a WIFI fingerprint database according to the WIFI type as the WIFI hotspot of the fixed WIFI;
and when an indoor positioning request is received, responding to the indoor positioning request according to the WIFI fingerprint database.
2. The method of claim 1, wherein the identifying the SSID of the WIFI hotspot by a convolutional neural network to obtain the WIFI type of the WIFI hotspot comprises:
extracting vector features of the WIFI hotspot according to the SSID;
and calling the convolutional neural network to identify the vector characteristics of the SSID to obtain the WIFI type of the WIFI hotspot.
3. The method of claim 2, wherein the convolutional neural network comprises a concatenation of: n-1 groups of convolution layers and pooling layers, wherein the nth convolution layer and the full-connection layer are provided, and n is an integer greater than 1;
the calling the convolutional neural network to identify the vector characteristics of the SSID, including:
determining the vector characteristics of the WIFI hotspot as 1 st order convolution data;
calling the ith convolution layer to perform feature extraction on input ith-1 order convolution data to obtain ith order convolution data, wherein i is a positive integer not greater than n, and the 1 st order convolution data is convolution data of the WIFI hotspot;
when i is not equal to n, calling the ith pooling layer to perform pooling processing on the ith order convolution data to obtain pooled ith order convolution data and inputting the pooled ith order convolution data into the next layer of convolution layer;
when i is equal to n, converting the pooled nth order convolution data into one-dimensional vector features;
and calling a full connection layer to identify the one-dimensional vector characteristics to obtain the WIFI type of the WIFI characteristics.
4. The method of claim 1, wherein the constructing a WIFI fingerprint library according to the WIFI hotspot of which the WIFI type is the fixed WIFI comprises:
if the WIFI type is a WIFI hotspot of the mobile WIFI or the private WIFI, listing the WIFI hotspot in a blacklist;
and if the WIFI type is the WIFI hotspot of the fixed WIFI, constructing the WIFI fingerprint database according to the WIFI hotspot.
5. The method of any one of claims 1 to 4, wherein responding to the indoor positioning request according to the WIFI fingerprint database when the indoor positioning request is received comprises:
when an indoor positioning request is received, determining a WIFI hotspot with the strongest signal intensity according to the WIFI fingerprint library;
and determining the position information of the WIFI hotspot as a response result of the indoor positioning request.
6. A WIFI type identification method based on machine learning is characterized by comprising the following steps:
acquiring a service set identifier SSID of the WIFI hotspot;
extracting vector features of the WIFI hotspot according to the SSID;
calling a convolutional neural network to identify the vector characteristics of the SSID to obtain the WIFI type of the WIFI hotspot;
wherein the convolutional neural network is trained based on a positive sample of which the WIFI type is mobile WIFI or private WIFI, and a negative sample of which the WIFI type is fixed.
7. The method of claim 6, wherein the convolutional neural network comprises a concatenation of: n-1 groups of convolution layers and pooling layers, wherein the nth convolution layer and the full-connection layer are provided, and n is an integer greater than 1;
the calling the convolutional neural network to identify the vector characteristics of the SSID, including:
determining the vector characteristics of the WIFI hotspot as 1 st order convolution data;
calling the ith convolution layer to perform feature extraction on input ith-1 order convolution data to obtain ith order convolution data, wherein i is a positive integer not greater than n, and the 1 st order convolution data is convolution data of the WIFI hotspot;
when i is not equal to n, calling the ith pooling layer to perform pooling processing on the ith order convolution data to obtain pooled ith order convolution data and inputting the pooled ith order convolution data into the next layer of convolution layer;
when i is equal to n, converting the pooled nth order convolution data into one-dimensional vector features;
and calling a full connection layer to identify the one-dimensional vector characteristics to obtain the WIFI type of the WIFI characteristics.
8. The method of claim 7, wherein the fully connected layer comprises: a first fully connected layer and a second fully connected layer, the first fully connected layer and the second fully connected layer having different activation functions;
the calling of the full connection layer to identify the one-dimensional vector features to obtain the WIFI type of the WIFI characteristics comprises the following steps:
calling the first full-connection layer to process the one-dimensional vector features to obtain a first full-connection result;
performing weight-losing operation on the first full-connection result to obtain an operated first full-connection result;
and calling the second full-connection layer to process the calculated first full-connection result to obtain the WIFI type with the characteristics of the WIFI.
9. The method of any of claims 6 to 8, wherein the extracting the vector features of the WIFI hotspot according to the SSID comprises:
segmenting the SSID into individual characters;
converting the single character after segmentation into a binary character string in a binary format according to a character coding format;
when the binary string reaches a maximum length, determining the binary string as a vector feature of the WIFI hotspot.
10. The method of any of claims 6 to 8, wherein before extracting the vector features of the WIFI hotspot according to the SSID, the method further comprises:
identifying the SSID by adopting a regular expression to obtain a WIFI type of the WIFI hotspot; keywords in the regular expression are obtained according to the SSID of private WIFI or mobile WIFI.
11. The method of claim 10, wherein the regular expression is obtained by:
acquiring WIFI connection data;
screening WIFI connection data meeting rule conditions from the WIFI connection data to serve as private/mobile WIFI;
performing word segmentation processing on the SSID of the private/mobile WIFI to obtain a plurality of candidate keywords;
counting the word frequency of the same candidate keywords to obtain the keywords of which the word frequency is greater than a word frequency threshold;
constructing and obtaining the regular expression according to the keywords of which the word frequency is greater than the word frequency threshold;
wherein the rule conditions include: the longitude and latitude change distance is larger than a first threshold value, and the change times in a first time period are larger than a second threshold value, or the active times in a second time period are larger than a third threshold value, and the historical connection equipment number is smaller than a fourth threshold value.
12. An indoor positioning device based on wireless fidelity (WIFI), the device comprising: the system comprises an acquisition module, an identification module, a fingerprint library module and a positioning module;
the acquisition module is configured to acquire Service Set Identifiers (SSIDs) of a plurality of WIFI hotspots;
the identification module is configured to identify a Service Set Identifier (SSID) of the WIFI hotspot through a convolutional neural network to obtain a WIFI type of the WIFI hotspot; the convolutional neural network is trained on the basis of a positive sample of which the WIFI type is mobile WIFI or private WIFI and a negative sample of which the WIFI type is fixed;
the fingerprint library module is configured to construct a WIFI fingerprint library according to the WIFI type as the WIFI hotspot of the fixed WIFI;
the positioning module is configured to respond to an indoor positioning request according to the WIFI fingerprint database when the indoor positioning request is received.
13. A machine learning-based WIFI type identification device, the device comprising: the device comprises an acquisition module, a data preprocessing module and a convolutional neural network identification module;
the acquisition module is configured to acquire a Service Set Identifier (SSID) of the WIFI hotspot;
the data preprocessing module is configured to extract vector features of the WIFI hotspot according to the SSID;
the convolutional neural network identification module is configured to call a convolutional neural network to identify the vector characteristics of the SSID to obtain the WIFI type of the WIFI hotspot;
wherein the convolutional neural network is trained based on a positive sample of which the WIFI type is mobile WIFI or private WIFI, and a negative sample of which the WIFI type is fixed.
14. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, the at least one instruction, at least one program, set of codes, or set of instructions being loaded and executed by the processor to implement the WIFI-based indoor positioning method of any of claims 1 to 5 or the machine-learning-based WIFI type identification method of any of claims 6 to 11.
15. A computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the WIFI-based indoor positioning method of any one of claims 1 to 5 or the machine-learning based WIFI type identification method of any one of claims 6 to 11.
CN201910984358.5A 2019-10-16 2019-10-16 WIFI-based indoor positioning method, device, equipment and medium Active CN110636445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910984358.5A CN110636445B (en) 2019-10-16 2019-10-16 WIFI-based indoor positioning method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910984358.5A CN110636445B (en) 2019-10-16 2019-10-16 WIFI-based indoor positioning method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN110636445A true CN110636445A (en) 2019-12-31
CN110636445B CN110636445B (en) 2022-09-16

Family

ID=68975423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910984358.5A Active CN110636445B (en) 2019-10-16 2019-10-16 WIFI-based indoor positioning method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110636445B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111044974A (en) * 2020-03-18 2020-04-21 腾讯科技(深圳)有限公司 Indoor positioning method and device based on WiFi signal and storage medium
CN111615178A (en) * 2020-05-09 2020-09-01 腾讯科技(深圳)有限公司 Method and device for identifying wireless network type and model training and electronic equipment
CN112754363A (en) * 2021-02-07 2021-05-07 美智纵横科技有限责任公司 Cleaning control method, cleaning control device, cleaning apparatus, and storage medium
CN112949485A (en) * 2021-03-01 2021-06-11 八维通科技有限公司 Data processing method and device based on artificial intelligence
CN113596731A (en) * 2021-08-16 2021-11-02 吉林建筑大学 ZigBee inertia auxiliary rapid positioning system and method based on convolutional neural network
CN113630719A (en) * 2021-08-06 2021-11-09 恒鸿达科技有限公司 Method, device, equipment and medium for identifying mobile wifi signal
CN113852913A (en) * 2021-08-06 2021-12-28 恒鸿达科技有限公司 Low-power-consumption indoor and outdoor positioning method and device based on mobile wifi identification
CN114269001A (en) * 2021-12-20 2022-04-01 北京达佳互联信息技术有限公司 Network hotspot type identification method and network hotspot identification model training method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108566675A (en) * 2017-12-04 2018-09-21 西安电子科技大学 WiFi indoor orientation methods based on multiple AP selection
CN108683985A (en) * 2018-04-27 2018-10-19 深圳市交投科技有限公司 A kind of WIFI location fingerprints point prescreening method and storage medium
CN109063055A (en) * 2018-07-19 2018-12-21 中国科学院信息工程研究所 Homologous binary file search method and device
CN109951846A (en) * 2019-03-25 2019-06-28 腾讯科技(深圳)有限公司 Wireless network recognition methods, device, storage medium and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108566675A (en) * 2017-12-04 2018-09-21 西安电子科技大学 WiFi indoor orientation methods based on multiple AP selection
CN108683985A (en) * 2018-04-27 2018-10-19 深圳市交投科技有限公司 A kind of WIFI location fingerprints point prescreening method and storage medium
CN109063055A (en) * 2018-07-19 2018-12-21 中国科学院信息工程研究所 Homologous binary file search method and device
CN109951846A (en) * 2019-03-25 2019-06-28 腾讯科技(深圳)有限公司 Wireless network recognition methods, device, storage medium and computer equipment

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111044974B (en) * 2020-03-18 2020-07-07 腾讯科技(深圳)有限公司 Indoor positioning method and device based on WiFi signal and storage medium
CN111044974A (en) * 2020-03-18 2020-04-21 腾讯科技(深圳)有限公司 Indoor positioning method and device based on WiFi signal and storage medium
CN111615178A (en) * 2020-05-09 2020-09-01 腾讯科技(深圳)有限公司 Method and device for identifying wireless network type and model training and electronic equipment
CN111615178B (en) * 2020-05-09 2022-04-15 腾讯科技(深圳)有限公司 Method and device for identifying wireless network type and model training and electronic equipment
CN112754363A (en) * 2021-02-07 2021-05-07 美智纵横科技有限责任公司 Cleaning control method, cleaning control device, cleaning apparatus, and storage medium
CN112949485B (en) * 2021-03-01 2022-03-15 八维通科技有限公司 Data processing method and device based on artificial intelligence
CN112949485A (en) * 2021-03-01 2021-06-11 八维通科技有限公司 Data processing method and device based on artificial intelligence
CN113630719A (en) * 2021-08-06 2021-11-09 恒鸿达科技有限公司 Method, device, equipment and medium for identifying mobile wifi signal
CN113852913A (en) * 2021-08-06 2021-12-28 恒鸿达科技有限公司 Low-power-consumption indoor and outdoor positioning method and device based on mobile wifi identification
CN113852913B (en) * 2021-08-06 2024-05-14 恒鸿达科技有限公司 Low-power-consumption indoor and outdoor positioning method and device based on mobile wifi identification
CN113596731A (en) * 2021-08-16 2021-11-02 吉林建筑大学 ZigBee inertia auxiliary rapid positioning system and method based on convolutional neural network
CN113596731B (en) * 2021-08-16 2024-04-02 吉林建筑大学 ZigBee inertial auxiliary positioning system based on convolutional neural network
CN114269001A (en) * 2021-12-20 2022-04-01 北京达佳互联信息技术有限公司 Network hotspot type identification method and network hotspot identification model training method

Also Published As

Publication number Publication date
CN110636445B (en) 2022-09-16

Similar Documents

Publication Publication Date Title
CN110636445B (en) WIFI-based indoor positioning method, device, equipment and medium
CN109783582B (en) Knowledge base alignment method, device, computer equipment and storage medium
CN112528025A (en) Text clustering method, device and equipment based on density and storage medium
CN111667022A (en) User data processing method and device, computer equipment and storage medium
CN113095370B (en) Image recognition method, device, electronic equipment and storage medium
CN113657087B (en) Information matching method and device
WO2023020214A1 (en) Retrieval model training method and apparatus, retrieval method and apparatus, device and medium
CN112418320A (en) Enterprise association relation identification method and device and storage medium
CN113315851A (en) Domain name detection method, device and storage medium
CN113761262B (en) Image retrieval category determining method, system and image retrieval method
CN112418256A (en) Classification, model training and information searching method, system and equipment
CN111783688B (en) Remote sensing image scene classification method based on convolutional neural network
CN110830939B (en) Positioning method based on improved CPN-WLAN fingerprint positioning database
CN105740916B (en) Characteristics of image coding method and device
CN116883740A (en) Similar picture identification method, device, electronic equipment and storage medium
CN114691875A (en) Data classification and classification processing method and device
CN113762298B (en) Similar crowd expansion method and device
CN116861226A (en) Data processing method and related device
CN113723514A (en) Safe access log data balance processing method based on hybrid sampling
CN115797041A (en) Financial credit assessment method based on depth map semi-supervised learning
CN109359694B (en) Image classification method and device based on mixed collaborative representation classifier
CN113627514A (en) Data processing method and device of knowledge graph, electronic equipment and storage medium
CN112463964A (en) Text classification and model training method, device, equipment and storage medium
CN111708884A (en) Text classification method and device and electronic equipment
CN109359462A (en) False device identification method, equipment, storage medium and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40019648

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant