A method and system for positioning a mobile communication device based on a QR code
By generating a feature value summary and QR code refresh time point in the positioning server, combining the terminal position value, calculating the scope of the mobile communication device, the difficulty in obtaining location information and forging problems in large traffic scenarios is solved, and the mobile communication device is realized Accurate and insensitive positioning and efficient scanning of code processing.
Patent Information
- Application Number
- CN202210633233.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-06-07
AI Technical Summary
In scenarios with large flow of people, it is difficult for the prior art to effectively obtain the location information of mobile communication equipment, and there is a risk that the location information will be forged, which affects the efficiency and accuracy of professional activities such as public security control and epidemiological investigation.
By generating and pushing time-related feature value summary in the positioning server, combining the QR code to refresh the time point and terminal position value, the range of mobile communication devices is calculated, hash encoding and encryption are used to avoid forgery, and the QR code is dynamically refreshed to Adapt to the location changes of mobile devices.
It realizes accurate positioning without the authorization of mobile device holders, improves the efficiency of scanning code processing and positioning accuracy, avoids the forgery of location information, and ensures positioning accuracy in large-scale scenarios.
Smart Images

Figure CN115038038B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for positioning a mobile communication device based on a two-dimensional code. [Background technology]
[0002] By obtaining the geographic location information of the scanning device during the QR code scanning process, the geographic location of the scanning device can be located, providing location information for other services. The scanning device positioning method generally includes two methods: (1) The QR code published on the mobile communication device is scanned by a fixed scanning device. In this method, the mobile communication device must be in the same location as the fixed scanning device, so the location of the fixed scanning device is the scanning location of the QR code. (2) The mobile communication device scans a static or dynamically published QR code, and the mobile communication device application, HTML5 page or embedded scanning applet in the mobile communication device application initiates a location request to the mobile communication device. The browser or application of the mobile communication device makes a request to the holder to use the geographic location. After the holder agrees, the web script or application obtains the geographic location coordinates of the device and submits the location information to the location requester.
[0003] For method (1), a fixed code scanning device can usually only process the code scanning request of one mobile communication device at a time, and cannot process multiple code scanning requests at the same time. The processing efficiency is low when there is a large flow of people. However, method (2) can realize the simultaneous scanning of multiple mobile communication devices, with high processing efficiency, and is suitable for scenes with large flow of people.
[0004] However, for method (2), the holder of a mobile communication device will often reject the request for using the location information made by the mobile communication device application, HTML5 page or mini-program embedded in the mobile communication device application for privacy protection, and the location requesting party cannot obtain the location information of the mobile communication device. This brings technical limitations to professional activities such as public security deployment and epidemiological investigation based on location information.
[0005] In some scenarios, the holder of a mobile communication device can also crack the operating system permissions of the mobile communication device and install a simulated positioning application residing in the background of the mobile communication device operating system to take over the geographic location positioning module and provide fake geographic location information to the mobile communication device application, HTML5 page or small program embedded in the mobile communication device application, thereby bypassing the geographic location positioning in the mobile communication device application, HTML5 page or small program embedded in the mobile communication device application. These behaviors will bring more serious geographic location interference to professional activities such as public security deployment and epidemiological investigation.
[0006] In view of this, how to overcome the defects of the existing technology and solve the problem that the location information of the mobile communication terminal cannot be obtained or the location information is interfered in the scenario where a large number of users may scan the code at the same time is a problem to be solved in this technical field. [Summary of the invention]
[0007] In view of the above defects or improvement needs of the prior art, the present invention solves the problem that the location information of the mobile communication terminal cannot be obtained or the location information is forged in a scenario where a large number of users may scan the code at the same time.
[0008] The embodiment of the present invention adopts the following technical solution:
[0009] In the first aspect, the present invention provides a method for positioning a mobile communication device based on a QR code, specifically: a positioning server obtains a time-related feature value at each refresh time point according to a preset refresh strategy, converts the feature value into a feature value summary through hash coding, forms a key-value pair with the feature value summary and the corresponding refresh time point and saves it as a key-value pair sequence, and pushes the feature value summary to all QR code publishing terminals. When each QR code publishing terminal receives the feature value summary at this refresh time point, it generates a QR code including the feature value summary and an encrypted terminal location value, and publishes the QR code; the positioning server obtains the QR code data submitted by the mobile communication device, parses the time feature value summary and the terminal location value in the QR code, compares the feature value summary in the QR code with the feature value summary saved in the key-value pair sequence, obtains the refresh time point of the QR code, and calculates the range where the mobile communication device is located based on the difference between the refresh time point of the QR code and the current time point, as well as the terminal location value.
[0010] Preferably, the time-related characteristic values specifically include: the total number of people who have scanned the QR code at all QR code issuing terminals at the current refresh time point; and / or the total number of times the QR code is updated at all QR code issuing terminals at the current refresh time point.
[0011] Preferably, the preset refresh strategy specifically includes: calculating the allowed movement time according to the preset allowed movement distance, determining the refresh cycle with the allowed movement time as the upper limit of the refresh time interval, and regularly refreshing the QR code according to the refresh cycle.
[0012] Preferably, the preset refresh strategy also includes: when there is only one mobile communication device performing a scanning operation in front of a QR code publishing terminal, after the positioning server obtains the QR code data submitted by the mobile communication device, it generates a characteristic value summary with the current time point as the refresh time point, saves it and sends it to the QR code publishing terminal, and the QR code publishing terminal refreshes the QR code according to the received characteristic value summary.
[0013] Preferably, in a walking scene, the calculation of the range where the mobile communication device is located specifically includes: taking the difference between the refresh time point of the QR code and the current time point as the moving time value of the mobile communication device, and taking the average walking speed of a person as the speed value, to calculate the maximum possible moving distance of the mobile communication device; taking the position value of the QR code publishing device as the center of the circle, the maximum possible moving distance as the radius, and taking the circular range determined by the center of the circle and the radius as the range where the mobile communication device is located.
[0014] Preferably, it also includes: when the difference between the refresh time point of the QR code and the current time point exceeds a preset time threshold, the range where the mobile communication device that submitted the QR code is located is not calculated, wherein the preset time threshold is calculated based on a preset allowed moving distance; and / or, when the position value change of the QR code issuing terminal exceeds a preset error range, the range where the mobile communication device related to the QR code issued by the QR code issuing terminal is located is not calculated, and the calculation is resumed after the time when the position value change of the QR code issuing terminal is less than the preset error range reaches a preset static time; and / or, when it is not identified that there is a mobile communication device scanning the code in front of a QR code issuing terminal, the range where the mobile communication device related to the QR code issued by the QR code issuing terminal is located is not calculated, and the QR code issuing of the QR code issuing terminal is stopped, and when it is identified that a mobile communication device scanning the code appears in front of the QR code issuing terminal, the QR code of the QR code issuing terminal is refreshed, and the issuing and calculation are resumed.
[0015] Preferably, it also includes: each QR code publishing terminal and / or each mobile communication device obtains a current environmental characteristic value and sends it to a positioning server, wherein the environmental characteristic value includes one or more of luminance, decibel value and sound waveform; the positioning server calculates a standard environmental characteristic value based on the current environmental characteristic value of each QR code publishing terminal and / or the current environmental characteristic values of all mobile communication devices that submit the QR code published by the QR code publishing terminal; the standard characteristic value is compared with the current environmental characteristic value obtained by each mobile communication terminal, and when the deviation between the current environmental characteristic value of the mobile communication terminal and the standard characteristic value exceeds a preset deviation value, the range where the mobile communication device is located is not calculated.
[0016] Preferably, calculating the standard environmental characteristic value specifically includes: when the environmental characteristic value is lumen, obtaining the lumen obtained by the QR code issuing terminal and each mobile communication device corresponding to the QR code issuing terminal, calculating the average value of all lumens as the standard characteristic value, and / or performing Lorentz fitting on all lumens, taking the lumen corresponding to the central peak of the normal distribution after fitting as the standard characteristic value, and taking the standard deviation as the preset deviation value; when the environmental characteristic value is decibel value, obtaining the decibel value obtained by each mobile communication device corresponding to the same QR code issuing terminal, taking the average value of all decibel values as the standard characteristic value, and taking the standard deviation as the preset deviation value; when the environmental characteristic value is a sound waveform, performing time-frequency domain transformation on the sound waveform obtained by the QR code issuing terminal and the sound waveform distribution obtained by the mobile communication device, and performing frequency domain data comparison.
[0017] On the other hand, the present invention provides a system for positioning a mobile communication device based on a QR code, specifically: it includes a positioning server and at least one QR code issuing terminal, specifically: the positioning server publishes a feature value summary to all QR code issuing terminals according to the method for positioning a mobile communication device based on a QR code provided in the first aspect, and calculates the range of all mobile communication devices that submit QR codes; each QR code issuing terminal generates a QR code according to the feature value summary generated by the positioning server, and publishes it.
[0018] Preferably, it also includes: the two-dimensional code issuing terminal includes at least one environmental characteristic value collecting device for acquiring the current environmental characteristic value provided by the first aspect.
[0019] Compared with the prior art, the beneficial effect of the embodiments of the present invention is that the present invention calculates the location range of the mobile communication device through the QR code refresh time and the location value of the QR code issuing terminal, and does not require the mobile communication device holder to allow the mini-program or application page to obtain the permission to access the positioning module data in the mobile communication device, thereby realizing a positioning process that is imperceptible to the mobile communication device holder, and avoiding the falsification of positioning data by using the characteristic value summary and the terminal address value ciphertext, which helps to improve the effectiveness of scanning code positioning. Furthermore, in the preferred scheme of this embodiment, by comparing the QR code refresh time with the current time, and comparing the environmental characteristic values, the QR code is effectively prevented from being scanned and used at locations other than the QR code issuing terminal. When the mobile communication device holder is walking, the mobile range of the mobile communication device holder is limited by setting a suitable refresh cycle, providing positioning accuracy consistent with the civilian GPS, and effectively ensuring the accuracy of the QR code positioning information.
Brief Description of the Drawings
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A flowchart of a method for positioning a mobile communication device based on a QR code provided by an embodiment of the present invention;
[0022] Figure 2 A flowchart of another method for positioning a mobile communication device based on a QR code provided by an embodiment of the present invention;
[0023] Figure 3 A schematic diagram of a system architecture for positioning a mobile communication device based on a QR code provided by an embodiment of the present invention;
[0024] Figure 4 A flowchart of a method for using a system for positioning a mobile communication device based on a QR code provided by an embodiment of the present invention;
[0025] Figure 5 A flow chart of a method for using another system for positioning a mobile communication device based on a QR code provided by an embodiment of the present invention. [Specific implementation method]
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0027] The present invention is an architecture of a specific functional system, so the specific embodiments mainly illustrate the functional logical relationship between the various structural modules, and do not limit the specific software and hardware implementation methods.
[0028] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0029] Embodiment 1:
[0030] At present, the current location of the scanner can be associated with a fixed smaller area using methods such as a fixed QR code containing location information. For example, when entering shopping malls and other areas, it is necessary to scan a place code. However, for large areas with multiple entrances and exits such as large parks, scenic tourist areas, large open communities, and marathon competition venues, the area associated with the fixed QR code is too large, and the positioning accuracy is low. At the same time, the above-mentioned places usually have a large flow of people. If the codes are scanned one by one, it may cause queues at the entrances and exits, increasing the risk of crowd gathering. On the other hand, in real life, it may happen that after shooting a fixed QR code containing location information, the QR code is released and then scanned again, resulting in the location information in the fixed QR code being inconsistent with the location information of the scanning user, resulting in incorrect location information. In order to simultaneously ensure the accuracy of positioning and the efficiency of scanning, the present invention provides a method for positioning a mobile communication device that scans a code through a dynamic QR code.
[0031] like Figure 1 As shown, the specific steps of the method for positioning a mobile communication device based on a QR code provided by an embodiment of the present invention are as follows:
[0032] Step 101: The positioning server obtains time-related feature values at each refresh time point according to a preset refresh strategy, converts the feature values into feature value summaries through hash coding, saves the feature value summaries and the corresponding refresh time points as key-value pairs, and pushes the feature value summaries to all QR code publishing terminals. When each QR code publishing terminal receives the feature value summary at this refresh time point, it generates a QR code including the feature value summary and the encrypted terminal location value, and publishes the QR code.
[0033] In order to meet the needs of a large number of people to quickly scan the code and pass through, the solution provided in this embodiment adopts a technical solution in which a mobile communication device scans the QR code issued by the QR code issuing terminal. After the QR code is issued, multiple mobile communication devices can scan the code at the same time, meeting the efficiency requirements of scanning the code in large traffic scenarios. Furthermore, in order to avoid inaccurate location information acquisition caused by the holder of the mobile communication device leaving after shooting the QR code, this embodiment adopts a dynamic QR code method. The positioning server calculates the time-related feature value at each refresh time point and pushes the feature value to all QR code issuing terminals. Each feature value uniquely corresponds to a refresh time point of the QR code. After each QR code issuing terminal receives the feature value, it immediately generates a QR code containing the received feature value and its own location information, and publishes the QR code.
[0034] In order to prevent the time-related feature value information from being forged, the solution provided in this embodiment does not directly use the time value as the feature value, but uses random data that changes with time and does not repeat in different time periods. In actual implementation, the time-related feature value can use the total number of people who have scanned the QR code at all QR code issuing terminals at the current refresh time point, or the total number of QR code updates at all QR code issuing terminals at the current refresh time point, or other data that accumulates over time and has random numbers that can be obtained by the positioning server but cannot be obtained externally. Multiple data can also be mixed and used to further increase the difficulty of cracking and forging.
[0035] Further, in order to prevent the eigenvalue information from being reversely cracked, the plaintext or ciphertext of the eigenvalue is not used directly, but the eigenvalue is hashed, and the hash summary of the eigenvalue is used as the eigenvalue for judging the release time point. In actual implementation, the hash coding method includes: one of MD5, SHA-1, SHA-512, and Bcrypt. Without increasing the hardware for accelerating the hash algorithm, in order to ensure the operation efficiency when the QR code is refreshed and avoid rapid cracking, the SHA-1 algorithm can be preferably used as the hash coding generation method. On the other hand, since the eigenvalue summary needs to be compared each time the code is scanned, in order to avoid the positioning server from repeatedly calculating the eigenvalue summary, the eigenvalue summary and the corresponding refresh time point can be saved in pairs, and the refresh time point corresponding to the eigenvalue summary can be obtained by querying. In actual use, in order to improve the search efficiency, a distributed database can be used for storage, with the eigenvalue summary as the key and the refresh time point as the value, and the eigenvalue summary and its corresponding refresh time point are generated as a key-value pair one by one, and all key-value pairs that need to be compared are saved as a key-value pair sequence.
[0036] Similarly, in order to prevent the terminal location value from being forged, the terminal feature value also needs to be encrypted, and various existing encryption methods can be selected according to the actual required encryption strength and operation speed.
[0037] Step 102: The positioning server obtains the QR code data submitted by the mobile communication device, parses the time feature value summary and the terminal location value in the QR code, compares the feature value summary in the QR code with the feature value summary stored in the key-value pair sequence, obtains the refresh time point of the QR code, and calculates the range of the mobile communication device based on the difference between the refresh time point of the QR code and the current time point, as well as the terminal location value.
[0038] After the mobile communication device obtains the QR code issued by the QR code issuing terminal, it submits the QR code to the positioning server. The positioning server can obtain the characteristic value summary and the encrypted terminal location value in the QR code by parsing the QR code encoding. Since the plain text of the release time data is not directly used as the characteristic value in this embodiment, but the time-related characteristic value summary is used as the identifier of the QR code refresh time, in order to obtain the time point of the QR code refresh, it is also necessary to use the characteristic value summary as the key to query the key-value pair sequence stored in the positioning server to find the corresponding refresh time point. On the other hand, the encrypted terminal location value can be decrypted to obtain the plain text of the terminal location value. The encryption key can also use a time-related value. If the key is wrong and cannot be decrypted, it means that the QR code has expired.
[0039] In this embodiment, each QR code includes a time-related feature value summary, and the time point when the mobile communication device obtains the QR code is located in the time period between the refresh time point of the QR code submitted by the device to the positioning server and the next QR code refresh time point. Therefore, the time period between the refresh time point and the next refresh time point parsed from the QR code submitted by the device by the positioning server can be regarded as the time when the device obtains the QR code. In the case of normal code scanning, the location where the mobile communication device obtains the QR code is the location of the QR code issuing terminal. However, in actual scenarios, the QR code may be photographed by the user of the mobile communication device, and then scanned and used after leaving the location of the QR code issuing terminal, thereby causing the scanning location to be separated from the geographical location of the QR code issuing terminal. Since the QR code provided in this embodiment is a dynamic QR code and includes a time-related feature value summary, the maximum distance difference between the mobile communication device and the QR code issuing terminal can be calculated based on the difference between the time when the mobile communication device obtains the QR code and the current time and the user's moving speed in the current scene. The range where the mobile communication device is located is located within a circular range with the QR code issuing terminal as the center and the maximum distance difference as the radius. The user's moving speed in the current scene can be determined according to actual implementation needs. For example, in a large park scene, it can be set to the average walking speed, and in a marathon competition venue scene, it can be set to the average running speed of the contestants. In scenes such as parks and scenic spots, the mobile communication device user's movement method is mainly walking. The specific calculation method is to use the difference between the refresh time point of the QR code and the current time point as the moving time value of the mobile communication device, the average walking speed of a person as the speed value, calculate the maximum possible moving distance of the mobile communication device, use the location value of the QR code publishing device as the center of the circle, and the maximum possible moving distance as the radius. The circular range is the range where the mobile communication device is located.
[0040] After step 101 and step 102 provided in this embodiment, in a scenario where a large number of users scan the code at the same time, without the need for the mobile communication terminal to actively provide location information, the time period in which the mobile communication terminal obtains the QR code can be determined through the time-related characteristic value summary in the dynamic QR code, and then the location range of the mobile communication terminal can be calculated, and encrypted through the hash summary of the time-related characteristic value and the location value of the QR code issuing terminal, thereby avoiding the time and location data from being cracked or forged, and avoiding positioning errors caused by data forgery.
[0041] In step 101, the QR code needs to be dynamically refreshed according to a preset refresh strategy. In this embodiment, the possible movement range of the mobile communication device is calculated by the difference between the refresh time point of the QR code and the current time point. The smaller the difference, the smaller the possible movement range of the user and the higher the positioning accuracy. When the user of the mobile communication device scans and submits the code normally at the same location of the QR code issuing terminal, the maximum value of the difference is the interval time period between the two refreshes. In order to ensure that the user's moving distance does not exceed the preset allowable moving distance required by the positioning accuracy, the allowable moving time is calculated according to the preset allowable moving distance, and the refresh cycle is determined by taking the allowable moving time as the upper limit of the refresh time interval, and the QR code is refreshed regularly according to the refresh cycle. In the actual implementation scenario, the allowable moving distance is determined according to the actual positioning range accuracy requirements.
[0042] In order to further reduce the refresh time interval, other refresh strategies can be superimposed on the normal refresh cycle, such as refreshing each QR code after it is used once. In the scenario where a large number of users scan the code at the same time, using this strategy may cause other users who are scanning the code to be unable to complete the QR code acquisition action after a certain user scans the code, or the QR code refreshes too frequently, which puts too much burden on the positioning server. It is also necessary to judge the number of users currently scanning the code. Specifically, when there is only one mobile communication device scanning the code in front of a QR code publishing terminal, after the positioning server obtains the QR code data submitted by the mobile communication device, it uses the current time point as the refresh time point to generate a feature value summary for storage and sends it to the QR code publishing terminal. The QR code publishing terminal refreshes the QR code according to the received feature value summary. This method can ensure the stability of the QR code when a large number of users scan the code at the same time, so that all users can complete the scanning operation normally. It can also quickly refresh the QR code when not many people scan the code at the same time, reduce the area of the user's possible movement range obtained by calculation, and improve positioning accuracy.
[0043] In the actual implementation process, there may be some abnormal scanning methods, which will lead to excessive positioning deviation. Therefore, this embodiment also provides targeted QR code invalidation mechanisms in different scenarios. For situations where there may be abnormal scanning, the range where the mobile communication device is located is not calculated to avoid obtaining incorrect location information and misleading subsequent data use.
[0044] (1) In actual scenarios, it is possible that a user of a mobile communication device takes a photo of a fixed QR code containing location information and then leaves the QR code publishing location to scan the code again. In this case, the time of acquiring the QR code and the time of scanning the code may deviate greatly, resulting in a large deviation in the calculation of the position value. When the difference between the refresh time point of the QR code and the current time point exceeds a preset time threshold, the range where the mobile communication device that submitted the QR code is located is not calculated, where the preset time threshold is calculated based on the preset allowed movement distance. Through this restriction, the user can be restricted to complete the scanning operation near the QR code publishing terminal, so that the calculated location range matches the user's actual location value.
[0045] (2) In actual scenarios, the location value of the QR code issuing terminal may also move, resulting in a situation where the current actual location of the QR code issuing terminal is inconsistent with the location value in the generated QR code. When the location value change of the QR code issuing terminal exceeds the preset error range, the range where the mobile communication device related to the QR code issued by the QR code issuing terminal is located is not calculated. The calculation is resumed when the location value change of the QR code issuing terminal is less than the preset error range and the time reaches the preset static time. During the movement of the QR code issuing terminal, the QR code becomes invalid. After the position of the QR code mobile terminal stabilizes, the new stable location value is written into the QR code and the calculation is resumed. In actual use, the location value of the QR code issuing terminal is usually obtained using GPS, and the GPS may have position drift. The preset error range is the possible range of GPS position drift.
[0046] (3) In order to further avoid the situation where the user leaves after taking a photo, the number of mobile communication devices that are scanning the QR code in front of the QR code issuing terminal can also be identified. When no mobile communication device is identified to be scanning the QR code in front of a QR code issuing terminal, the range of mobile communication devices related to the QR code issued by the QR code issuing terminal is not calculated, and the QR code issuance of the QR code issuing terminal is stopped. When a mobile communication device is identified to be scanning the QR code in front of the QR code issuing terminal, the QR code of the QR code issuing terminal is refreshed, and the issuance and calculation are resumed. When no mobile communication device is scanning the QR code in front of a QR code issuing terminal, it means that no mobile communication terminal should submit the QR code to the positioning server at this time. If the positioning server receives the QR code submitted by the mobile communication device at this time, it means that the device is not in front of the QR code issuing terminal, and the QR code issued by the QR code issuing terminal should not be calculated. Furthermore, in order to avoid misjudgment, when no one is scanning the QR code in front of the QR code issuing terminal, the QR code is not issued, and the QR code is refreshed and issued after there is a user scanning the code.
[0047] In other scenarios, there are also situations where the captured QR code images and videos are remotely sent to others for scanning. Since the image is sent very quickly, it may not be accurate to determine whether it is an abnormal scan by means of time difference, etc., in this case. Therefore, the judgment is made by environmental feature values in this embodiment. The environmental feature values such as brightness and sound near each QR code publishing terminal are unique, and the environmental feature values obtained by each mobile communication terminal near the QR code publishing terminal are consistent with those of the QR code publishing terminal, but users who receive images remotely are usually far away from the QR code publishing terminal, so the surrounding environmental features may be different.
[0048] like Figure 2 As shown, verification of environmental characteristics can be performed through the following steps.
[0049] Step 201: Each QR code issuing terminal and / or each mobile communication device obtains a current environment feature value and sends it to a positioning server.
[0050] Step 202: The positioning server calculates a standard environment characteristic value according to the current environment characteristic value of each QR code publishing terminal and / or the current environment characteristic values of all mobile communication devices that submit the QR code published by the QR code publishing terminal.
[0051] Step 203: Compare the standard characteristic value with the current environment characteristic value obtained by each mobile communication terminal. When the deviation between the current environment characteristic value of the mobile communication terminal and the standard characteristic value exceeds a preset deviation value, the range where the mobile communication device is located is not calculated.
[0052] Through steps 201-203, the environmental characteristic values obtained by the two-dimensional code issuing terminal can be used as standard environmental characteristic values, or the environmental characteristic values obtained by all mobile communication devices near a certain two-dimensional code issuing terminal can be counted and used as standard environmental characteristic values. The positioning server records the standard environmental characteristic values, and matches and compares the environmental characteristic values obtained by the mobile communication device that submits the two-dimensional code with the standard characteristic values. If they are consistent, it means that the mobile communication device is near the two-dimensional code issuing terminal, and the calculated positioning range is valid; if they are inconsistent, it means that the mobile communication device is far away from the two-dimensional code issuing terminal, and the calculated positioning range may be wrong, so the location data of the two-dimensional code issuing terminal cannot be used to locate the device. On the other hand, since the environmental characteristic values may have natural fluctuations or measurement errors, it is possible to allow a certain error between the environmental characteristic values obtained by the mobile communication device and the standard environmental characteristic values, and use the error as a preset deviation value.
[0053] In a specific implementation, the environmental characteristic values that can be used include lumen, decibel value and sound waveform, or other environmental characteristic information that can be obtained. These environmental characteristic values can be used separately or in combination as needed. For different environmental characteristic values, due to their different physical properties, different methods are required to calculate the characteristic standard value and the preset deviation value.
[0054] (1) When the environmental characteristic value is lumen, the lumen obtained by the QR code issuing terminal and each mobile communication device corresponding to the QR code issuing terminal is obtained, and the average value of all lumens is calculated as the standard characteristic value, and / or all lumens are subjected to Lorentz fitting, and the lumen corresponding to the central peak of the normal distribution after fitting is used as the standard characteristic value, and the standard deviation is used as the preset deviation value.
[0055] (2) When the environmental characteristic value is a decibel value, the decibel value obtained by each mobile communication device corresponding to the same QR code issuing terminal is obtained, and the average value of all decibel values is used as the standard characteristic value, and the standard deviation is used as the preset deviation value.
[0056] (3) When the environmental characteristic value is a sound waveform, the sound waveform obtained by the QR code issuing terminal and the sound waveform distribution obtained by the mobile communication device are transformed in the time-frequency domain, and the frequency domain data are compared.
[0057] The method for positioning a mobile communication device based on a QR code provided in this embodiment does not require the holder of the mobile communication device to allow the mini-program or application page to obtain permission to access the positioning module data in the mobile communication device. In the scanning positioning process of the present invention, not only the holder of the mobile communication device is not aware of it, but the positioning data will not be interfered with by the simulation positioning program, which helps to improve the effectiveness of scanning positioning. The present invention embeds the time-related feature value summary into the QR code and dynamically refreshes the QR code. By comparing the time-related feature value summary in the mini-program or page application, it effectively identifies the situation where the QR code is scanned and used at a location other than the QR code issuing terminal. Under the condition that the holder of the mobile communication device is walking, it provides positioning accuracy similar to that of a civilian GPS, effectively ensuring the accuracy of the QR code positioning information.
[0058] Embodiment 2:
[0059] Based on the method for positioning a mobile communication device based on a QR code provided in the above embodiment 1, the present invention also provides a system for positioning a mobile communication device based on a QR code that can be used to implement the above method, such as Figure 3 FIG. 1 is a schematic diagram of a system architecture of an embodiment of the present invention.
[0060] The system provided in this embodiment includes a positioning server and at least one QR code issuing terminal.
[0061] According to the method for positioning a mobile communication device based on a QR code provided in Example 1, the positioning server publishes a feature value summary for all QR code issuing terminals, and calculates the range of all mobile communication devices that submit QR codes. The positioning server can receive a request for QR code recognition initiated by a mobile communication device through a QR code scanning applet or HTML5 page, and parse the QR code according to the request, and send the parsing result to the applet or HTML5 application page of the mobile communication device that made the request. At the same time, the feature value summary related to the time of QR code refresh carried in the QR code and the current geographic location information of the QR code issuing terminal are also obtained, and the location range of the mobile communication device that submitted the QR code scanning request is calculated based on this information. In this way, the geographic location information or geographic location range of the user of the mobile communication device is obtained without the user of the mobile communication device being aware of it.
[0062] Furthermore, in order to improve the accuracy of range calculation, the positioning server needs to push the feature value summary on time at each refresh time point to ensure the accuracy of the QR code release time on the QR code release terminal. The positioning server can also include a real-time clock to calibrate the refresh time point. The real-time clock obtains the network clock source for calibration with the help of the communication module and provides accurate current time information to the positioning server.
[0063] Each QR code issuing terminal generates a QR code according to the feature value summary generated by the positioning server and publishes it. The QR code issuing terminal includes a screen, a processor, a memory and a geographic location positioning module. The geographic location positioning module is used to obtain the current geographic location information of the QR code issuing terminal, the communication module is used to send the current location of the QR code issuing terminal and the acquired environmental feature values to the positioning server and receive the time-related feature values pushed by the positioning server, the screen is used to display the current QR code, the processor is used to generate the current QR code according to the received time-related feature value summary and its own geographic location information, and the memory is used to cache the data required for use.
[0064] Furthermore, in order to obtain the environmental characteristic values at the QR code issuing terminal, the QR code issuing terminal also needs to include at least one environmental characteristic value acquisition device for acquiring the current environmental characteristic values required to be used in the method for positioning a mobile communication device based on a QR code provided in Example 1. Specifically, a suitable acquisition device can be selected according to the type of environmental characteristic values to be collected. For example: using a camera or a light sensor to collect lumen, using a microphone or a decibel meter to collect decibel values, and using a microphone or a pickup to collect sound waveforms.
[0065] Furthermore, in some specific implementation scenarios, in order to obtain the number of people scanning the QR code in front of the QR code issuing terminal, the QR code issuing terminal also includes one or more image acquisition devices, such as cameras, CCDs, etc. The image acquisition device is located in the center above the screen or arranged around the screen, and is oriented in the same direction as the screen. The image acquisition device can be used to obtain the image features of the person scanning the QR code in front of the QR code issuing terminal, which is used to calculate the current number of people scanning the QR code in front of the QR code issuing terminal, as a basis for refreshing or invalidating the QR code.
[0066] According to the mobile communication device positioning based on the QR code provided in this embodiment, Figure 4 As shown, when a mobile communication device scans a code, the process of requesting an application or page from a positioning server is as follows.
[0067] Step 301: The mobile communication device obtains the current two-dimensional code issued by the two-dimensional code issuing device through the image acquisition device.
[0068] Step 302: The mobile communication device parses the QR code to extract the application address field and the application data field for scanning the code.
[0069] Step 303: The mobile communication device uses the application address field as the address to request an application page or application from the positioning server, and sends the feature value summary and terminal location value ciphertext in the current QR code, as well as its own environmental feature value, to the positioning server.
[0070] Step 304: The mobile communication device downloads the application page or application program according to the corresponding data pushed by the positioning server.
[0071] Through steps 301 to 304, the positioning server obtains the refresh time point of the QR code submitted by the user and the location value of the QR code issuing terminal without the mobile communication device user being aware of it, thereby meeting the data requirements for positioning calculation.
[0072] like Figure 5 As shown, after receiving a request to download an application page or an application program, the positioning server can complete the calculation of the range where the mobile communication device is located through the following steps.
[0073] Step 401: The positioning server searches for a refresh time point corresponding to the feature value summary, and the time when the user obtains the QR code is within the time period between the refresh time point and the next refresh time point.
[0074] Step 402: The positioning server decrypts the terminal location value and obtains the location value of the terminal that issued the QR code. The location value is the starting point of the path that the mobile communication device user may move after obtaining the QR code.
[0075] Step 403: The positioning server calculates the range of the mobile communication device according to the difference between the refresh time point of the QR code and the current time point, and the terminal location value.
[0076] Through steps 401 to 403, the positioning server can complete the positioning of the mobile communication device according to the scan code information submitted by the mobile communication device.
[0077] Furthermore, in order to avoid the situation where the user of the mobile communication device leaves the QR code publishing location and then scans the code again after taking a photo of a fixed QR code containing location information, after step 402, the time difference between the refresh time point of the QR code and the current time point can also be determined. If the time difference does not exceed the preset time threshold, it indicates that the user of the mobile communication device is near the QR code publishing terminal, and a more accurate positioning range value can be obtained through step 403. If the time difference exceeds the preset time threshold, it indicates that the holder of the mobile communication device may have moved away from the QR code publishing terminal, and the area calculated by step 403 is large and the calculation accuracy is low. Therefore, the data is not used for calculation, and the application page or application data to be downloaded is not pushed to the user, and more accurate positioning data is obtained by prompting the user that the QR code has expired and needs to be re-scanned.
[0078] Furthermore, in order to avoid the situation where the captured QR code pictures and videos are remotely sent to others for scanning, after step 402, the environmental characteristic values near the QR code issuing terminal and the environmental characteristic values near the mobile communication device can also be compared. If the environmental characteristic values are consistent, it indicates that the mobile communication device is located near the QR code issuing terminal, and a relatively accurate positioning range value can be obtained through step 403. If the environmental characteristic values are inconsistent, it indicates that the user of the mobile communication device is far away from the QR code issuing terminal, then the position value is not calculated and the application page or application data to be downloaded is not pushed to the user.
[0079] In actual implementation, the time difference judgment and the environmental characteristic value judgment can be used either one or both, and the specific judgment method and judgment order can be determined according to actual needs.
[0080] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for positioning a mobile communication device based on a QR code, Features: The positioning server obtains the time-related feature value at each refresh time point according to the preset refresh strategy, converts the feature value into a feature value summary through hash coding, saves the feature value summary and the corresponding refresh time point as a key-value pair sequence, and pushes the feature value summary to all QR code publishing terminals. When each QR code publishing terminal receives the feature value summary at the current refresh time point, it generates a QR code containing the feature value summary and the encrypted terminal location value, and publishes the QR code; The positioning server obtains the QR code data submitted by the mobile communication device, parses the time feature value summary and terminal location value in the QR code, compares the feature value summary in the QR code with the feature value summary stored in the key-value pair sequence, obtains the refresh time point of the QR code, and calculates the range of the mobile communication device based on the difference between the refresh time point of the QR code and the current time point, as well as the terminal location value.
2. The method for positioning a mobile communication device based on a two-dimensional code according to claim 1, It is characterized in that The time-related characteristic values specifically include: The total number of people who have scanned the QR code at all QR code issuing terminals at the current refresh time point; and / or, the total number of QR code updates of all QR code issuing terminals at the current refresh time point.
3. The method for positioning a mobile communication device based on a two-dimensional code according to claim 1, It is characterized in that The preset refresh strategy specifically includes: The allowed moving time is calculated according to the preset allowed moving distance, and the refresh cycle is determined by taking the allowed moving time as the upper limit of the refresh time interval, and the QR code is refreshed periodically according to the refresh cycle.
4. The method for positioning a mobile communication device based on a two-dimensional code according to claim 1, It is characterized in that The preset refresh strategy also includes: When there is only one mobile communication device performing a scanning operation in front of a QR code publishing terminal, after the positioning server obtains the QR code data submitted by the mobile communication device, it generates a feature value summary with the current time point as the refresh time point, saves it and sends it to the QR code publishing terminal. The QR code publishing terminal refreshes the QR code according to the received feature value summary.
5. The method for positioning a mobile communication device based on a two-dimensional code according to claim 1, It is characterized in that In a walking scenario, the calculation of the range of the mobile communication device specifically includes: The difference between the refresh time of the QR code and the current time is used as the moving time value of the mobile communication device, and the average walking speed of a person is used as the speed value to calculate the maximum possible moving distance of the mobile communication device; The location value of the QR code issuing device is taken as the center of the circle, the maximum possible moving distance is taken as the radius, and the circular range determined by the center and the radius is taken as the range where the mobile communication device is located.
6. The method for positioning a mobile communication device based on a two-dimensional code according to claim 1, It is characterized in that Also includes: When the difference between the refresh time point of the QR code and the current time point exceeds a preset time threshold, the range where the mobile communication device submitting the QR code is located is not calculated, wherein the preset time threshold is calculated based on a preset allowed movement distance; And / or, when the position value change of the QR code issuing terminal exceeds a preset error range, the range where the mobile communication device related to the QR code issued by the QR code issuing terminal is located is not calculated, and the calculation is resumed after the time when the position value change of the QR code issuing terminal is less than the preset error range reaches a preset static time; And / or, when it is not recognized that there is a mobile communication device scanning a QR code in front of a certain QR code issuing terminal, the range of the mobile communication device related to the QR code issued by the QR code issuing terminal is not calculated, and the QR code issuing of the QR code issuing terminal is stopped; when it is recognized that there is a mobile communication device scanning a QR code in front of the QR code issuing terminal, the QR code of the QR code issuing terminal is refreshed, and the issuing and calculation are resumed.
7. The method for positioning a mobile communication device based on a two-dimensional code according to claim 1, It is characterized in that Also includes: Each QR code issuing terminal and / or each mobile communication device obtains a current environmental characteristic value and sends it to a positioning server, wherein the environmental characteristic value includes one or more of lumen, decibel value and sound waveform; The positioning server calculates the standard environment characteristic value according to the current environment characteristic value of each QR code publishing terminal and / or the current environment characteristic values of all mobile communication devices that submit the QR code published by the QR code publishing terminal; The standard characteristic value is compared with the current environment characteristic value acquired by each mobile communication terminal. When the deviation between the current environment characteristic value of the mobile communication terminal and the standard characteristic value exceeds a preset deviation value, the range where the mobile communication terminal is located is not calculated.
8. The method for positioning a mobile communication device based on a two-dimensional code according to claim 7, It is characterized in that The calculation standard environmental characteristic values specifically include: When the environmental characteristic value is lumen, the lumen obtained by the QR code issuing terminal and each mobile communication device corresponding to the QR code issuing terminal is obtained, and the average value of all the lumens is calculated as the standard characteristic value, and / or all the lumens are subjected to Lorentz fitting, and the lumen corresponding to the central peak of the normal distribution after fitting is used as the standard characteristic value, and the standard deviation is used as the preset deviation value; When the environmental characteristic value is a decibel value, the decibel value obtained by each mobile communication device corresponding to the same QR code issuing terminal is obtained, and the average value of all decibel values is used as the standard characteristic value, and the standard deviation is used as the preset deviation value; When the environmental characteristic value is a sound waveform, the sound waveform obtained by the QR code issuing terminal and the sound waveform distribution obtained by the mobile communication device are transformed in the time-frequency domain, and the frequency domain data are compared.
9. A system for positioning mobile communication devices based on QR codes, It is characterized in that It includes a positioning server and at least one QR code issuing terminal, specifically: The positioning server publishes feature value summaries to all QR code issuing terminals according to the method for positioning a mobile communication device based on a QR code according to any one of claims 1 to 8, and calculates the ranges where all mobile communication devices that submit QR codes are located; Each QR code issuing terminal generates a QR code according to the feature value summary generated by the positioning server and issues it.
10. The system for positioning a mobile communication device based on a two-dimensional code according to claim 9, It is characterized in that Also includes: The two-dimensional code issuing terminal includes at least one environmental characteristic value collecting device for obtaining the current environmental characteristic value described in any one of claims 7-8.
