A false positioning detection method, device and electronic equipment
By constructing a location detection model based on static feature vectors and managing a device blacklist, the problem of low accuracy in false location detection was solved, achieving efficient and accurate false location detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUANENG POWER INT INC
- Filing Date
- 2022-10-10
- Publication Date
- 2026-05-29
AI Technical Summary
Existing methods for detecting false locations are insufficient in terms of accuracy, and are prone to misjudgment, especially when roaming across regions.
By acquiring sample datasets and location information of communication devices to be verified, feature extraction is performed, a location detection model is constructed, and static feature vectors are used to detect false locations, including device blacklist management and the construction of decision tree models.
It has automated the detection of false locations, improved the speed and accuracy of detection, and provided strong support for preventing false locations.
Smart Images

Figure CN115623520B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication technology, and specifically to a method, apparatus, and electronic device for detecting false location information. Background Technology
[0002] Location-based services refer to mobile communication systems acquiring the geographical location information of mobile terminals through specific positioning technologies and providing it to the mobile user, the communication system, or a third-party positioning client. With the support of certain electronic map information, these services offer location-related calling or non-calling services to the mobile user. Existing mobile communication systems primarily use mobile positioning services for emergency rescue, such as emergency medical care and user location in emergency call scenarios; location-based information services, such as in-vehicle GPS applications, yellow pages, traffic information, weather information, navigation information, and tour guide services; location-triggered services, such as location-based management information and billing; and tracking and asset management services, such as vehicle dispatching / tracking / monitoring / anti-theft, material tracking, and elderly and child monitoring services. In recent years, with the increasingly widespread application of positioning and the expanding scope of related services, many false locations have emerged. If these false locations with security risks are not detected and prevented, they can easily lead to serious adverse effects. However, existing false location detection methods typically rely on roaming location determination, which can easily lead to cross-regional misjudgments when a local person uses a number from another region to make a local call, resulting in low detection accuracy. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method for detecting false positioning, in order to solve the problem of low accuracy in detecting false positioning in the prior art.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] This invention provides a method for detecting false location data, comprising:
[0006] Acquire a sample dataset and the location information of the communication device to be verified. The sample dataset includes multiple samples of location information of communication devices with both real and fake location information.
[0007] Each of the aforementioned location information samples is subjected to feature extraction to obtain a corresponding static feature vector;
[0008] A localization detection model is constructed based on the static feature vectors described above;
[0009] The static feature vector to be verified is extracted from the location information, and the static feature vector to be verified is input into the location detection model to obtain the location detection result.
[0010] Optionally, the step of extracting features from each of the location information samples to obtain corresponding static feature vectors includes:
[0011] Static features are obtained by extracting features from the current location information sample;
[0012] The static features of the current location information sample are transformed into vectors to obtain the static feature vector corresponding to the current location information sample.
[0013] Optionally, the step of constructing a localization detection model based on each of the static feature vectors includes:
[0014] The static feature vectors are divided into training and test sets.
[0015] A first detection model is constructed by extracting static feature vectors from the training set.
[0016] The static feature vectors in the test set are input into the first detection model to obtain the first verification result;
[0017] Determine whether the first verification result meets the preset standard;
[0018] If the first verification result does not meet the preset standard, the number of static feature vectors extracted is adjusted, and the step of extracting static feature vectors from the training set to construct the first detection model is returned.
[0019] If the first verification result meets the preset standard, then the first detection model is used as the localization detection model.
[0020] Optionally, the step of extracting static feature vectors from the training set to construct the first detection model includes:
[0021] Static feature vectors are extracted from the training set, and the information gain of each extracted static feature vector is calculated.
[0022] The extracted static feature vectors are sorted in descending order of information gain to obtain a feature sequence;
[0023] The first detection model is obtained by constructing a decision tree based on the feature sequence.
[0024] Optionally, the step of constructing a decision tree based on the feature sequence to obtain the first detection model includes:
[0025] The static feature vector with the largest information gain in the feature sequence is determined as the root node;
[0026] The decision tree is constructed by sequentially selecting the static feature vector with the largest information gain from the remaining static feature vectors in the feature sequence as the next-level node, until the information gain of all remaining static feature vectors in the feature sequence is less than a preset threshold or the feature sequence is empty, thus obtaining the first detection model.
[0027] Optionally, before performing feature extraction on each of the location information samples to obtain corresponding static feature vectors, the method further includes:
[0028] Get the device blacklist;
[0029] Determine whether the communication device to be verified is in the device blacklist;
[0030] If the communication device to be verified is in the device blacklist, then the communication device to be verified will be isolated directly.
[0031] If the communication device to be verified is not in the device blacklist, then feature extraction is performed on multiple location information samples to obtain multiple corresponding static feature vectors.
[0032] Optionally, the method further includes:
[0033] Determine whether the location detection result is a false location;
[0034] If the location detection result is a false location, the communication device to be verified will be added to the device blacklist.
[0035] This invention also provides a false location detection device, comprising:
[0036] The acquisition module is used to acquire a sample dataset and the location information of the communication device to be verified. The sample dataset includes multiple samples of location information of communication devices with both true and false location information.
[0037] The extraction module is used to extract features from each of the location information samples to obtain the corresponding static feature vectors;
[0038] The training module is used to construct a localization detection model based on the static feature vectors described above;
[0039] The detection module is used to extract the static feature vector to be verified from the positioning information and input the static feature vector to be verified into the positioning detection model to obtain the positioning detection result.
[0040] This invention also provides an electronic device, comprising:
[0041] The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes these computer instructions to perform the false location detection method provided in this embodiment of the invention.
[0042] This invention also provides a computer-readable storage medium storing computer instructions for causing a computer to execute the false location detection method provided in this invention.
[0043] The technical solution of this invention has the following advantages:
[0044] This invention provides a method for detecting false location data. It involves acquiring a sample dataset and location information of communication devices to be verified. The sample dataset includes location information samples from multiple communication devices, each containing both genuine and false location information. Feature extraction is performed on each location information sample to obtain a corresponding static feature vector. A location detection model is constructed based on these static feature vectors. A static feature vector to be verified is extracted from the location information and input into the location detection model to obtain the location detection result. This invention automates false location detection by establishing a location detection model with static feature vectors that can determine the authenticity of the location data, effectively improving the detection speed and accuracy, and providing strong support for preventing false location data. Attached Figure Description
[0045] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0046] Figure 1 This is a flowchart of the false location detection method in an embodiment of the present invention;
[0047] Figure 2 This is a flowchart of blacklist detection according to an embodiment of the present invention;
[0048] Figure 3 This is a flowchart illustrating the extraction of static feature vectors according to an embodiment of the present invention;
[0049] Figure 4 A flowchart illustrating the construction of a localization detection model according to an embodiment of the present invention;
[0050] Figure 5 This is a flowchart illustrating the process of extracting static feature vectors from the training set to construct a first detection model according to an embodiment of the present invention;
[0051] Figure 6 This is a schematic diagram of a decision tree for location detection according to an embodiment of the present invention;
[0052] Figure 7 This is a flowchart illustrating the process of constructing a decision tree based on feature sequences to obtain a first detection model according to an embodiment of the present invention.
[0053] Figure 8 This is a flowchart illustrating the process of adding false locations to a blacklist according to an embodiment of the present invention;
[0054] Figure 9 This is a schematic diagram of the false positioning detection device in an embodiment of the present invention;
[0055] Figure 10 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] According to an embodiment of the present invention, a method for detecting false positioning is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0058] This embodiment provides a method for detecting false location data, which can be used in the aforementioned terminal devices, such as computers, etc. Figure 1 As shown, the false location detection method includes the following steps:
[0059] Step S1: Obtain the sample dataset and the location information of the communication device to be verified. The sample dataset includes multiple location information samples from communication devices containing both real and fake location information. Specifically, the sample dataset contains location information samples with real location and location information samples with fake location. Location information samples with real location can be obtained by calling the core location of the phone's system functions (e.g., the core location of the iOS system). Location information samples with fake location can be obtained through existing software (e.g., Xcode software, which is an integrated development environment running on the Mac operating system). Virtual location data can be obtained through GPX files (files with the .GPX extension contain geographic data in the form of points, routes, and trajectories saved in XML-based text format), by hooking location methods based on continuously updated latitude and longitude values in jailbroken devices, or by sending virtual location data through external devices (such as Bluetooth connections to the phone).
[0060] Step S2: Extract features from each location information sample to obtain the corresponding static feature vector.
[0061] Step S3: Construct a localization detection model based on each static feature vector. Specifically, by constructing a localization detection model, the speed and accuracy of localization detection can be effectively improved.
[0062] Step S4: Extract the static feature vector to be verified from the location information, and input the static feature vector to be verified into the location detection model to obtain the location detection result. Specifically, the location information is classified by the location detection model, and the location detection result can be used to intuitively determine whether it is a false location, providing strong support for preventing false locations.
[0063] Through steps S1 to S4 above, the false location detection method provided by this embodiment of the invention establishes a location detection model by using static feature vectors with features that can determine whether the location is true or false, thereby automating the false location detection, effectively improving the detection speed and accuracy, and providing strong support for preventing false location.
[0064] Specifically, in one embodiment, before step S2 described above, as follows: Figure 2 As shown, the specific steps also include the following:
[0065] Step S021: Obtain the device blacklist. Specifically, the device blacklist stores information on devices that have been identified as having false locations in historical location detection results.
[0066] Step S022: Determine whether the communication device to be verified is in the device blacklist.
[0067] Step S023: If the communication device to be verified is in the device blacklist, then the communication device to be verified is directly isolated.
[0068] Step S024: If the communication device to be verified is not in the device blacklist, then perform feature extraction on multiple location information samples to obtain multiple corresponding static feature vectors.
[0069] Specifically, by determining whether the communication device to be verified is in the device blacklist, when it is identified as being in the device blacklist, there is no need to use the location detection model for judgment; it can be directly isolated, thus avoiding the duplication of detection and improving detection efficiency.
[0070] Specifically, in one embodiment, step S2 described above is as follows: Figure 3 As shown, the specific steps include the following:
[0071] Step S21: Extract static features from the current location information sample. Specifically, static features can be extracted from each of the location datasets using a preset n-gram segmentation algorithm and a sliding window algorithm. Static features include, but are not limited to, the accuracy of the latitude and longitude of the location, the altitude value of the location, the vertical accuracy of the location, the number of times the location callback function is triggered, and the response time of the location call function.
[0072] Step S22: Perform vector transformation on the static features of the current location information sample to obtain the static feature vector corresponding to the current location information sample.
[0073] Specifically, in one embodiment, step S3 described above is as follows: Figure 4 As shown, the specific steps include the following:
[0074] Step S31: Divide the static feature vectors to obtain a training set and a test set. Specifically, the division ratio can be set according to requirements, for example, a 7:3 ratio can be set; train the preset detection model based on the static feature vector corresponding to each localization sample in the divided training set.
[0075] Step S32: Extract static feature vectors from the training set to construct the first detection model. Specifically, during the model construction process, the internal nodes of each split are selected based on the static features ranked from highest to lowest information gain. By selecting nodes through this process, a concise and efficient decision tree classification model can be finally formed.
[0076] Step S33: Input the static feature vectors from the test set into the first detection model to obtain the first verification result. Specifically, the first detection model is verified using the test set to check the accuracy of the currently constructed first detection model.
[0077] Step S34: Determine whether the first verification result meets the preset standard. Specifically, the preset standard is a preset accuracy rate, such as 80% or 90%, etc., but the present invention is not limited thereto.
[0078] Step S35: If the first verification result does not meet the preset standard, adjust the number of static feature vectors extracted and return to the step of extracting static feature vectors from the training set to construct the first detection model.
[0079] Step S36: If the first verification result meets the preset standard, then the first detection model is used as the localization detection model.
[0080] Specifically, a model is built using a training set and validated using a test set. Based on the validation results, the number of static feature vectors required for training is continuously adjusted. For example, if the preset standard is not met, the number of static feature vectors required for training is increased. Additionally, some static feature vectors can be extracted from the remaining test set to partially replace the static feature vectors used in the current training. This process can effectively improve the accuracy of the localization and detection model and ensure its accuracy.
[0081] Specifically, in one embodiment, step S32 described above is as follows: Figure 5 As shown, the specific steps include the following:
[0082] Step S321: Extract static feature vectors from the training set and calculate the information gain of each extracted static feature vector. Specifically, the information gain of each static feature vector can be calculated using algorithms such as ID3. Information gain is a statistic that describes the ability of an attribute to distinguish data samples. The higher the information gain, the simpler the decision tree will be. The degree of information gain is usually measured by the change in information entropy. The feature with the highest information gain is the optimal feature and can be used as the selection criterion for the root node when building the model using the decision tree.
[0083] Step S322: Sort the extracted static feature vectors in descending order of information gain to obtain the feature sequence.
[0084] Step S323: Construct a decision tree based on the feature sequence to obtain the first detection model. Specifically, the decision tree model has a tree structure and consists of three parts: Root node: The root node is at the top of the tree, and the node contains a static feature that has the greatest impact on the classification result. Internal nodes: Internal nodes are nodes that split from the root node or its upper-level internal nodes, and each node represents a feature selection condition. Leaf nodes are the nodes at the bottom of the tree, also known as the decision results. The decision tree for localization detection can be as follows: Figure 6As shown, the high-precision latitude and longitude within the rectangular shape is the condition for the root node. The elliptical shape has a location callback call count greater than 1 and a slow response time of the location call function as internal nodes. The triangle contains the classification results. By comparison, the location judgment result can be quickly obtained.
[0085] Specifically, during the model construction process, the internal nodes of each split are selected based on the static features ranked from highest to lowest information gain. By selecting nodes through this process, a concise and efficient decision tree classification model can be finally formed.
[0086] Specifically, in one embodiment, step S323 described above is as follows: Figure 7 As shown, the specific steps include the following:
[0087] Step S3231: Determine the static feature vector with the largest information gain in the feature sequence as the root node.
[0088] Step S3232: Select the static feature vector with the largest information gain from the remaining static feature vectors in the feature sequence as the next level node to build a decision tree, until the information gain of all remaining static feature vectors in the feature sequence is less than the preset threshold or the feature sequence is empty, and obtain the first detection model.
[0089] Specifically, selecting nodes in the model through information gain is highly efficient and fast, and can efficiently generate a concise and efficient decision tree classification model as the first detection model.
[0090] Specifically, in one embodiment, the above-described method, such as Figure 8 As shown, the specific steps also include the following:
[0091] Step S51: Determine whether the location detection result is a false location.
[0092] Step S52: If the location detection result is a false location, add the communication device to be verified to the device blacklist.
[0093] Specifically, adding fraudulent phone numbers to the device's blacklist makes it easier to quickly detect and isolate such devices the next time a communication request is received, improving the efficiency and accuracy of location detection and thus providing better protection for users' personal and property safety.
[0094] This embodiment also provides a false positioning detection device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0095] This embodiment provides a false location detection device, such as Figure 9 As shown, it includes:
[0096] The acquisition module 101 is used to acquire a sample dataset and the location information of the communication device to be verified. The sample dataset includes multiple location information samples of communication devices with real and fake location information. For details, please refer to the relevant description of step S1 in the above method embodiment, which will not be repeated here.
[0097] The extraction module 102 is used to extract features from each location information sample to obtain the corresponding static feature vector. For details, please refer to the relevant description of step S2 in the above method embodiment, which will not be repeated here.
[0098] Training module 103 is used to construct a localization detection model based on each static feature vector. For details, please refer to the relevant description of step S3 in the above method embodiment, which will not be repeated here.
[0099] The detection module 104 is used to extract the static feature vector to be verified from the positioning information and input the static feature vector to be verified into the positioning detection model to obtain the positioning detection result. For details, please refer to the relevant description of step S4 in the above method embodiment, which will not be repeated here.
[0100] In this embodiment, the false positioning detection device is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0101] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0102] An electronic device is also provided according to embodiments of the present invention, such as Figure 10 As shown, the electronic device may include a processor 901 and a memory 902, wherein the processor 901 and the memory 902 may be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0103] Processor 901 can be a Central Processing Unit (CPU). Processor 901 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0104] The memory 902, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the method embodiments of the present invention. The processor 901 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 902, thereby implementing the methods in the above method embodiments.
[0105] The memory 902 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 901, etc. Furthermore, the memory 902 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 902 may optionally include memory remotely located relative to the processor 901, and these remote memories may be connected to the processor 901 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0106] One or more modules are stored in memory 902, and when executed by processor 901, they perform the methods described in the above method embodiments.
[0107] The specific details of the aforementioned electronic device can be understood by referring to the relevant descriptions and effects in the above method embodiments, and will not be repeated here.
[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0109] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for detecting false positioning, characterized in that, include: Acquire a sample dataset and the location information of the communication device to be verified. The sample dataset includes multiple samples of location information of communication devices with both real and fake location information. Each of the location information samples is subjected to feature extraction to obtain a corresponding static feature vector, wherein the static feature vector includes at least: the accuracy of the latitude and longitude of the location, the number of times the location callback function is triggered, and the response time of the location call function; Based on each of the static feature vectors, the information gain of each static feature vector is calculated. The static feature vectors are sorted in descending order of information gain to obtain a feature sequence. A decision tree is constructed based on the feature sequence to obtain a localization detection model. The static feature vector to be verified is extracted from the location information, and the static feature vector to be verified is input into the location detection model to obtain the location detection result.
2. The false location detection method according to claim 1, characterized in that, The step of extracting features from each of the location information samples to obtain corresponding static feature vectors includes: Static features are obtained by extracting features from the current location information sample; The static features of the current location information sample are transformed into vectors to obtain the static feature vector corresponding to the current location information sample.
3. The false location detection method according to claim 1, characterized in that, The construction of the localization detection model based on each of the static feature vectors includes: The static feature vectors are divided into training and test sets. A first detection model is constructed by extracting static feature vectors from the training set. The static feature vectors in the test set are input into the first detection model to obtain the first verification result; Determine whether the first verification result meets the preset standard; If the first verification result does not meet the preset standard, the number of static feature vectors extracted is adjusted, and the step of extracting static feature vectors from the training set to construct the first detection model is returned. If the first verification result meets the preset standard, then the first detection model is used as the localization detection model.
4. The false location detection method according to claim 3, characterized in that, The step of extracting static feature vectors from the training set to construct the first detection model includes: Static feature vectors are extracted from the training set, and the information gain of each extracted static feature vector is calculated. The extracted static feature vectors are sorted in descending order of information gain to obtain a feature sequence; The first detection model is obtained by constructing a decision tree based on the feature sequence.
5. The false location detection method according to claim 4, characterized in that, The process of constructing a decision tree based on the feature sequence to obtain the first detection model includes: The static feature vector with the largest information gain in the feature sequence is determined as the root node; The decision tree is constructed by sequentially selecting the static feature vector with the largest information gain from the remaining static feature vectors in the feature sequence as the next level node, until the information gain of all remaining static feature vectors in the feature sequence is less than a preset threshold or the feature sequence is empty, thus obtaining the first detection model.
6. The false location detection method according to claim 1, characterized in that, Before performing feature extraction on each of the aforementioned location information samples to obtain corresponding static feature vectors, the method further includes: Get the device blacklist; Determine whether the communication device to be verified is in the device blacklist; If the communication device to be verified is in the device blacklist, then the communication device to be verified will be isolated directly. If the communication device to be verified is not in the device blacklist, then feature extraction is performed on multiple location information samples to obtain multiple corresponding static feature vectors.
7. The false location detection method according to claim 1, characterized in that, The method further includes: Determine whether the location detection result is a false location; If the location detection result is a false location, the communication device to be verified will be added to the device blacklist.
8. A false positioning detection device, characterized in that, include: The acquisition module is used to acquire a sample dataset and the location information of the communication device to be verified. The sample dataset includes multiple samples of location information of communication devices with both true and false location information. The extraction module is used to extract features from each of the positioning information samples to obtain corresponding static feature vectors, wherein the static feature vectors include at least: the accuracy of the positioning latitude and longitude, the number of times the positioning callback function is triggered, and the response time of the positioning call function; The training module is used to calculate the information gain of each static feature vector based on each static feature vector, sort the static feature vectors in descending order of information gain to obtain a feature sequence, and construct a decision tree based on the feature sequence to obtain a localization detection model. The detection module is used to extract the static feature vector to be verified from the positioning information and input the static feature vector to be verified into the positioning detection model to obtain the positioning detection result.
9. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the false location detection method according to any one of claims 1-7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the false location detection method according to any one of claims 1-7.