Positioning calibration method and device, electronic equipment and storage medium
By comparing the real-time WIFI location with the calibration point location in the electronic student ID, a calibration model is built and the location is calibrated, which solves the problem of location drift of electronic student ID in home and classroom and achieves more accurate location upload.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-12-29
- Publication Date
- 2026-05-19
AI Technical Summary
When electronic student ID cards are used at home and in the classroom, Wi-Fi positioning often experiences location drift, resulting in inaccurate location queries.
By comparing the real-time collected WIFI location with the calibration point location (which is the average of multiple WIFI locations), the calibration point location is uploaded to the server when the difference is less than a preset distance, and the real-time location is uploaded when the difference is not less than the preset distance. A location scatter plot is constructed, and the calibration point is determined using the Mean-Shift algorithm for location calibration.
This effectively avoids the drift of WIFI positioning location, ensuring that the student location uploaded to the server is more accurate and improving positioning accuracy.
Smart Images

Figure CN116132919B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless network positioning technology, and in particular to a positioning calibration method, device, electronic device, and storage medium. Background Technology
[0002] According to the "Notice on Strengthening the Management of Mobile Phones for Primary and Secondary School Students" issued by the General Office of the Ministry of Education, the use of electronic student ID cards with call functions should be explored to address the communication needs between students and parents. This has led to an explosive growth in the market for electronic student ID cards on school campuses.
[0003] Current electronic student IDs track students' real-time locations and transmit the data to a backend server via IoT technology, allowing parents to monitor their children's movements. However, due to limitations in hardware cost and battery life, electronic student IDs cannot be equipped with precise positioning chips, and charging is difficult for students at school. Therefore, the only way to extend standby time is to reduce the positioning frequency and increase the positioning interval. Furthermore, since students primarily spend time in classrooms and at home, electronic student IDs in these locations rely solely on Wi-Fi positioning, which is highly susceptible to signal interference and prone to significant positioning errors.
[0004] This leads to frequent location drift issues when using electronic student ID cards at home and in the classroom via Wi-Fi. Summary of the Invention
[0005] In view of this, the present invention aims to provide a positioning calibration method, device, electronic device and storage medium to solve the problem of positioning drift that often occurs when electronic student ID cards are used in homes and classrooms via WIFI positioning.
[0006] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0007] A positioning calibration method for electronic student ID cards includes:
[0008] Obtain real-time Wi-Fi location data;
[0009] The real-time collected WIFI location is compared with the calibration point location, which is used to characterize the average position of multiple WIFI location locations uploaded by the electronic student ID card worn by the student.
[0010] If the difference between the real-time collected WIFI location and the calibration point location is less than or equal to a preset distance, the calibration point location is uploaded as the student's location to the backend server of the electronic student ID card.
[0011] If the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance, the real-time collected WIFI location is uploaded as the student's location to the backend server of the electronic student ID.
[0012] Furthermore, the calibration point locations include classroom location calibration points and / or home location calibration points. The classroom location calibration point is used to characterize the average position of multiple WIFI location locations uploaded by multiple students wearing the electronic student ID cards in the same classroom. The home location calibration point is used to characterize the average position of multiple WIFI location locations uploaded by students wearing the electronic student ID cards in their homes.
[0013] The step of uploading the calibration point location as the student's location to the backend server of the electronic student ID when the difference is less than or equal to a preset distance includes:
[0014] If the difference between the real-time collected WIFI location and the classroom location calibration point is less than or equal to the preset distance, the classroom location calibration point will be uploaded as the student's location to the backend server of the electronic student ID card.
[0015] If the difference between the real-time collected WIFI location and the home location calibration point is less than or equal to the preset distance, the home location calibration point will be uploaded as the student's location to the backend server of the electronic student ID card.
[0016] When the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance, the real-time collected WIFI location is uploaded as the student's location to the backend server of the electronic student ID, including:
[0017] If the difference between the real-time collected WIFI location and the classroom location calibration point and the home location calibration point is not less than the preset distance, the real-time collected WIFI location will be uploaded as the student's location to the backend server of the electronic student ID.
[0018] Furthermore, the method also includes:
[0019] Collect multiple WIFI location data uploaded by the electronic student ID card worn by the student;
[0020] A location scatter plot is constructed based on the multiple WIFI location locations;
[0021] The points within a circular region of a first preset radius in the location scatter plot are averaged to the center point of the circular region of the first preset radius.
[0022] Following the direction of the highest density of location points in the scatter plot, continuously move the circular area of the first preset radius and average it until the position of the calibration point is obtained.
[0023] Furthermore, after the final movement of the circular region of the first preset radius and averaging, the method further includes:
[0024] Using the center point of the circular area with the first preset radius after the last movement as the center point, the position points in the position scatter plot within a range of a second preset distance as the radius are divided into multiple groups.
[0025] Calculate the average position of the position points in each of the multiple groups;
[0026] The position of the calibration point is obtained by weighted summation of the average position points of the multiple groups.
[0027] Furthermore, after obtaining the calibration location point, the method further includes:
[0028] Obtain newly added WIFI location data on the current calibration date;
[0029] The calibration point position obtained from the last calibration is used as the average position point from the initial date to the last calibration date; the initial date is used to characterize the first day of the data collected to obtain the calibration point position.
[0030] Based on the newly added WIFI location and the calibration point location obtained from the last calibration, the average location point from the initial day to the current calibration day is obtained.
[0031] Furthermore, the method also includes:
[0032] Based on the location uploaded to the backend server of the electronic student ID, the student's movement trajectory is generated;
[0033] The movement trajectory is displayed in the parent's app.
[0034] Furthermore, after obtaining the student's movement trajectory, the method further includes:
[0035] The student's movement trajectory is compared with the preset electronic fence;
[0036] If a student's movement trajectory exceeds the electronic fence, an early warning message will be issued.
[0037] Compared with existing technologies, the positioning calibration method of the present invention has the following advantages:
[0038] This invention obtains real-time collected Wi-Fi location data; compares the real-time collected Wi-Fi location data with a calibration point location, where the calibration point location represents the average location of multiple Wi-Fi location data uploaded by the student's electronic student ID; if the difference between the real-time collected Wi-Fi location data and the calibration point location is less than or equal to a preset distance, the calibration point location is uploaded as the student's location to the backend server of the electronic student ID; if the difference between the real-time collected Wi-Fi location data and the calibration point location is not less than the preset distance, the real-time collected Wi-Fi location data is uploaded as the student's location to the backend server of the electronic student ID.
[0039] By comparing the real-time collected WIFI location with the calibration point location, the calibration point location is taken as the student's location if the difference between the two locations is less than or equal to a preset distance, and the real-time collected location is taken as the student's location if the difference is not less than the preset distance. This avoids the problem of WIFI location drift and makes the real-time location of the student uploaded to the server more accurate.
[0040] Another objective of this invention is to provide a positioning calibration device to solve the problem of positioning drift that often occurs when electronic student ID cards are used in homes and classrooms via Wi-Fi.
[0041] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0042] A positioning calibration device, comprising:
[0043] The acquisition module is used to obtain the real-time collected WIFI location;
[0044] The comparison module is used to compare the real-time collected WIFI location with the calibration point location, wherein the calibration point location is used to characterize the average location of multiple WIFI location uploaded by the electronic student ID card worn by the student.
[0045] The first upload module is used to upload the calibration point location as the student's location to the backend server of the electronic student ID card when the difference between the real-time collected WIFI positioning location and the calibration point location is less than or equal to a preset distance.
[0046] The second upload module is used to upload the real-time collected WIFI location as the student's location to the backend server of the electronic student ID card, provided that the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance.
[0047] The positioning calibration device and the positioning calibration method described above have the same advantages over the prior art, and will not be elaborated here.
[0048] Another objective of this invention is to propose an electronic device to solve the problem of frequent location drift during the use of current electronic student ID cards in homes and classrooms via Wi-Fi positioning.
[0049] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0050] An electronic device, comprising:
[0051] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the positioning calibration method described above.
[0052] The electronic device and the aforementioned positioning and calibration method have the same advantages over the prior art, which will not be elaborated here.
[0053] Another objective of this invention is to provide a computer-readable storage medium to solve the problem of frequent location drift during the use of electronic student ID cards in homes and classrooms via Wi-Fi.
[0054] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0055] A computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the positioning calibration method described in any of the preceding claims.
[0056] The computer-readable storage medium has the same advantages over the aforementioned positioning and calibration method, and will not be elaborated upon here. Attached Figure Description
[0057] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0058] Figure 1 A flowchart illustrating the steps of a positioning calibration method according to Embodiment 1 of the present invention is shown.
[0059] Figure 2 A flowchart illustrating the calibration model construction steps of a positioning calibration method according to another embodiment of the present invention is shown.
[0060] Figure 3 A flowchart illustrating the steps of obtaining the calibration point position in a positioning calibration method according to another embodiment of the present invention is shown.
[0061] Figure 4 A flowchart illustrating the calibration and update steps of a positioning calibration method according to another embodiment of the present invention is shown.
[0062] Figure 5 A flowchart illustrating the steps of generating a student's motion trajectory in a positioning calibration method according to another embodiment of the present invention is shown.
[0063] Figure 6 A flowchart illustrating the electronic fence function of a positioning calibration method according to another embodiment of the present invention is shown.
[0064] Figure 7 A flowchart of a positioning calibration method according to another embodiment of the present invention is shown;
[0065] Figure 8 A schematic diagram of a positioning calibration device according to Embodiment 2 of the present invention is shown;
[0066] Figure 9 A schematic diagram of the location scatter plot is shown;
[0067] Figure 10 A schematic diagram of a circular region with a first preset radius is shown;
[0068] Figure 11 A schematic diagram showing the movement of the center point of a circular region with a first preset radius is shown. Detailed Implementation
[0069] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0070] The following will describe in detail, with reference to the accompanying drawings and embodiments, a positioning calibration method, apparatus, electronic device and storage medium of the present invention.
[0071] Example 1
[0072] Reference Figure 1 , Figure 1 A flowchart illustrating the steps of a positioning calibration method according to Embodiment 1 of the present invention is shown, as follows: Figure 1 As shown, it includes:
[0073] Step S101: Obtain the real-time collected WIFI location.
[0074] With the introduction of national policies and the demand for campus informatization, electronic student ID cards have experienced explosive growth. Electronic student ID cards obtain students' locations through a "GPS+LBS+WIFI+BeiDou" positioning method, and transmit real-time location data to the backend server via IoT technology. Based on each student's location data, functions such as real-time location tracking, movement trajectory monitoring, and electronic fences are implemented. Parents can access their children's real-time location through mini-programs, applications, and public accounts.
[0075] Current electronic student ID cards are limited by hardware costs and power consumption, making it impossible to equip them with precise positioning chips and capabilities. Furthermore, students face difficulties charging their devices on campus, so the only way to extend standby time is to reduce the positioning frequency and increase the positioning interval. On the other hand, students are mainly in classrooms and at home, and electronic student ID cards can only be positioned via Wi-Fi in these two locations. Wi-Fi positioning is greatly affected by signal environment factors, resulting in large positioning errors.
[0076] This leads to frequent location drift when students use their electronic student IDs for Wi-Fi positioning at home and in the classroom, resulting in numerous problems with inaccurate electronic fence warning messages, student movement trajectories, and real-time location queries. Therefore, calibrating the Wi-Fi positioning location becomes extremely important.
[0077] In an embodiment of the present invention, a positioning calibration method is provided to avoid the positioning drift problem and make the real-time location data of students uploaded to the electronic student ID card backend server more accurate.
[0078] First, obtain the Wi-Fi location of the electronic student ID worn by the target student in real time.
[0079] Then proceed to step S102.
[0080] Step S102: Compare the real-time collected WIFI location with the calibration point location, where the calibration point location is used to characterize the average position of multiple WIFI location locations uploaded by the electronic student ID card worn by the student.
[0081] The electronic student ID card uploads the student's location to the backend server in real time. This location can include Wi-Fi location, GPS location, and cell tower location. When students use the electronic student ID card indoors, such as at home or in the classroom, the card uses Wi-Fi positioning technology to achieve real-time location tracking. When students use the electronic student ID card outdoors, the card uses GPS and cell tower positioning technologies to achieve real-time location tracking.
[0082] Multiple WIFI location data of the electronic student ID card uploaded to the backend server are obtained. A calibration model is constructed based on the multiple WIFI location data to obtain calibration point locations. The calibration point locations are used to characterize the average location of the multiple WIFI location data.
[0083] Compare the real-time WIFI location obtained in step S101 with the calibration point location.
[0084] If the difference between the real-time acquired WIFI location and the calibration point location is less than or equal to a preset distance, proceed to step S103; if the difference between the real-time acquired WIFI location and the calibration point location is not less than a preset distance, proceed to step S104.
[0085] Step S103: If the difference between the real-time collected WIFI location and the calibration point location is less than or equal to a preset distance, the calibration point location is uploaded as the student's location to the backend server of the electronic student ID.
[0086] If the difference between the real-time collected WIFI location and the calibration point location is less than or equal to a preset distance, it can be determined that the student's current location is within the calibration point location range. In this case, the calibration point location is uploaded as the student's current location to the backend server of the electronic student ID.
[0087] Step S104: If the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance, the real-time collected WIFI location is uploaded as the student's location to the backend server of the electronic student ID.
[0088] If the difference between the real-time collected WIFI location and the calibration point location is not less than a preset distance, it can be determined that the student's current location has exceeded the calibration point location range. In this case, the real-time collected WIFI location is directly uploaded to the backend server of the electronic student ID card as the student's current location.
[0089] In one optional embodiment, the calibration point location includes a classroom location calibration point and / or a home location calibration point. The classroom location calibration point is used to characterize the average position of multiple WIFI location locations uploaded by multiple students wearing the electronic student ID cards in the same classroom. The home location calibration point is used to characterize the average position of multiple WIFI location locations uploaded by students wearing the electronic student ID cards in their homes.
[0090] The step of uploading the calibration point location as the student's location to the backend server of the electronic student ID when the difference is less than or equal to a preset distance includes:
[0091] If the difference between the real-time collected WIFI location and the classroom location calibration point is less than or equal to the preset distance, the classroom location calibration point will be uploaded as the student's location to the backend server of the electronic student ID card.
[0092] If the difference between the real-time collected WIFI location and the home location calibration point is less than or equal to the preset distance, the home location calibration point will be uploaded as the student's location to the backend server of the electronic student ID card.
[0093] When the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance, the real-time collected WIFI location is uploaded as the student's location to the backend server of the electronic student ID, including:
[0094] If the difference between the real-time collected WIFI location and the classroom location calibration point and the home location calibration point is not less than the preset distance, the real-time collected WIFI location will be uploaded as the student's location to the backend server of the electronic student ID.
[0095] To prevent location drift issues during the use of electronic student ID cards in both classrooms and homes, calibration points are set up at both the student's classroom and home locations. The location point representing the average position of multiple Wi-Fi location data uploaded by multiple students wearing the same electronic student ID card in the same classroom can be called the classroom location calibration point; the location point representing the average position of multiple Wi-Fi location data uploaded by a student wearing the same electronic student ID card at home can be called the home location calibration point.
[0096] During the process of calibrating the real-time collected WIFI location of the electronic student ID, the real-time collected WIFI location is first compared with the student's classroom location calibration point to confirm whether the student is in the classroom.
[0097] If the difference between the real-time collected WIFI location and the classroom location calibration point is less than or equal to the preset distance, it can be determined that the student is currently within the classroom range, and the classroom location calibration point is then uploaded to the server as the student's current location.
[0098] Provided that the difference between the real-time collected WIFI location and the classroom location calibration point is not less than a preset distance, the real-time collected WIFI location is compared with the home location calibration point to determine whether the student is at home.
[0099] If the difference between the real-time collected WIFI location and the home location calibration point is less than or equal to a preset distance, it can be determined that the student is currently at home, and the home location calibration point is then uploaded to the server as the student's current location.
[0100] If the difference between the real-time collected WIFI location and the home location calibration point is not less than the preset distance, it can be determined that the student is currently neither in the classroom nor in the home. In this case, the real-time collected WIFI location is directly uploaded to the server as the student's current location.
[0101] In one specific implementation, the preset distance in this embodiment can be 200m.
[0102] This invention provides an embodiment that obtains real-time collected Wi-Fi location data; compares the real-time collected Wi-Fi location data with a calibration point location, where the calibration point location represents the average location of multiple Wi-Fi location data uploaded by the student's electronic student ID; if the difference between the real-time collected Wi-Fi location data and the calibration point location is less than or equal to a preset distance, the calibration point location is uploaded as the student's location to the backend server of the electronic student ID; if the difference between the real-time collected Wi-Fi location data and the calibration point location is not less than the preset distance, the real-time collected Wi-Fi location data is uploaded as the student's location to the backend server of the electronic student ID.
[0103] By comparing the real-time collected WIFI location with the calibration point location, the calibration point location is taken as the student's location if the difference between the two locations is less than or equal to a preset distance, and the real-time collected location is taken as the student's location if the difference is not less than the preset distance. This avoids the problem of WIFI location drift and makes the real-time location of the student uploaded to the server more accurate.
[0104] Reference Figure 2 , Figure 2 A flowchart illustrating the calibration model construction steps of a positioning calibration method according to another embodiment of the present invention is shown, as follows: Figure 2 As shown, it includes:
[0105] Step S201: Collect multiple WIFI location data uploaded by the electronic student ID card worn by the student.
[0106] During use, the electronic student ID will upload its Wi-Fi location, GPS location, and cell tower location. After obtaining these three types of location data, they will be stored separately according to their categories.
[0107] In one specific implementation, multiple location data uploaded by the electronic student ID can be obtained through Kafka technology, and these multiple location data can be stored as big data using HBase columnar database and HDFS distributed file system.
[0108] Next, the stored Wi-Fi location, GPS location, and base station location data are preprocessed, filtering out GPS and base station location data and retaining only the Wi-Fi location data. Each Wi-Fi location is then labeled with tags representing the school, grade, and class information carried by that location.
[0109] Understandably, some Wi-Fi location services carry tags, while others do not.
[0110] The locations of Wi-Fi networks with tags are extracted and grouped into one category, and the locations of Wi-Fi networks without tags are extracted and grouped into another category. The two categories of locations are stored separately.
[0111] Then, the Wi-Fi location data of multiple students from the same class using their electronic student ID cards in the classroom, and the Wi-Fi location data of the same students using their electronic student ID cards at home, were collected. A random decision forest was then built based on the collected Wi-Fi location data. This random decision forest was used to classify the multiple collected Wi-Fi location data.
[0112] Random decision forest is an ensemble algorithm that uses decision trees as the basic unit and integrates a large number of decision trees to form a random forest for classification and regression.
[0113] In one specific implementation, the decision tree nodes of a random decision forest can be provinces, cities, schools, grades, classes, etc.
[0114] After obtaining the random decision forest, proceed to step S202.
[0115] Step S202: Construct a location scatter plot based on the multiple WIFI location locations.
[0116] The random decision forest obtained in step S201 is abstracted to construct a location scatter plot.
[0117] Abstraction refers to the process of converting the longitude of each WIFI location in the random decision forest into the corresponding X-axis, and the latitude of each WIFI location into the Y-axis.
[0118] Reference Figure 9 , Figure 9 A schematic diagram of the location scatter plot is shown, such as... Figure 9As shown, a scatter plot of multiple locations is obtained within the space defined by the X and Y axes. The X-axis corresponds to the longitude of each location, and the Y-axis corresponds to the latitude of that location.
[0119] Then proceed to step S203.
[0120] Step S203: Average each location point in the circular area of the first preset radius in the location scatter plot to the center point of the circular area of the first preset radius.
[0121] Based on the location scatter plot, the center point of the scatter plot is determined using the Mean-Shift algorithm. The following is a detailed explanation of the steps involved in determining the center point of the location scatter plot:
[0122] First, create a Mean-Shift drift vector to obtain a circular region with a first preset radius in the position scatter plot. (Refer to...) Figure 10 , Figure 10 A schematic diagram of a circular region with a first preset radius is shown, as follows: Figure 10 As shown, Figure 10 The middle circular region is a circular region with a first preset radius.
[0123] The drift vector formula is as follows:
[0124]
[0125] Where, x i The points represent sample points in the scatter plot, where i can be 1, 2, 3...n; x represents any point; h represents the first preset radius; k represents the number of sample points in the scatter plot whose x is less than the radius h; S h This represents a circular region with a first preset radius.
[0126] The formula for defining the circular region with the first preset radius is:
[0127] S h (x)=(y\(yx)(yx) T ≤h 2 )
[0128] Where x represents the X-axis of the circular region with the first preset radius, y represents the Y-axis of the circular region with the first preset radius, and h represents the first preset radius.
[0129] After obtaining a circular region with a first preset radius, the center point of the circular region is obtained by averaging the points at each position within the circular region.
[0130] Then proceed to step S204.
[0131] Step S204: Following the direction of the highest density of position points in the scatter plot, continuously move the circular area of the first preset radius and average it until the position of the calibration point is obtained.
[0132] After obtaining the center point of the circular region with the first preset radius, a Gaussian kernel function is added to the drift vector based on the Mean-Shift algorithm, resulting in the following formula:
[0133]
[0134] Where, x i The points represent sample points in the scatter plot, where i can be 1, 2, 3...n; x represents any point; h represents the first preset radius; k represents the number of sample points in the scatter plot whose x is less than the radius h; S h K represents a circular region with a first preset radius; K(*) represents the Gaussian kernel function.
[0135] Reference Figure 11 , Figure 11 This diagram illustrates the movement of the center point of a circular region with a first preset radius. Figure 11 As shown, following the direction with the highest density of location points in the location scatter plot, the center point of the circular region with the first preset radius is iteratively moved along the Mean-Shift drift vector until the center point overlaps with the drift vector and can no longer be moved, thus obtaining the center point of the location scatter plot.
[0136] For example, the center point P1 of the circular region with the first preset radius is moved multiple times based on the drift vector, moving to PN, then to PX, and at this point it can no longer be moved, thus obtaining the center point PX of the position scatter plot.
[0137] Next, using the center point as the center, the location points in the scatter plot are divided into multiple groups, each with a different weight. The average location points for each group are then calculated.
[0138] Finally, the average position points of each group are weighted and averaged to obtain the calibration point position.
[0139] This invention collects multiple Wi-Fi location data uploaded by the electronic student ID worn by the student; constructs a location scatter plot based on these Wi-Fi location data; averages the location points within a circular area of a first preset radius in the location scatter plot to obtain the center point of that circular area; and continuously moves and averages the circular area of the first preset radius along the direction of maximum location point density in the location scatter plot until the calibration point position is obtained. Because the center point of the circular area of the first preset radius is continuously moved and averaged along the direction of maximum location point density in the location scatter plot, the final calibration point position is more accurate, resulting in more precise calibration of the student's real-time Wi-Fi location.
[0140] Reference Figure 3 , Figure 3 A flowchart illustrating the steps of obtaining the calibration point position in a positioning calibration method according to another embodiment of the present invention is shown, as follows: Figure 3 As shown, it includes:
[0141] Step S301: Taking the center point of the circular area with the first preset radius after the last movement as the center point, divide the various position points in the position scatter plot within the range of the second preset distance as the radius from the center point into multiple groups.
[0142] Using the center point of the circular area with the first preset radius after the last movement as the center point, and the second preset distance as the radius, the various position points within the circular area with the second preset distance as the radius are grouped, while the position points outside the circular area with the second preset distance as the radius are cleaned.
[0143] In one specific implementation, the second preset distance can be 200m.
[0144] The following is a detailed explanation of the steps for grouping the various location points within the circular region of the second preset distance:
[0145] First, taking the center point of the circular area with the first preset radius after the last movement as the center point, calculate the distance of each position point from the center point, and divide each position point into multiple groups based on the distance.
[0146] Specifically, all locations with a distance greater than or equal to 0m and less than 5m from the center point are divided into a first group; all locations with a distance greater than or equal to 5m and less than 15m from the center point are divided into a second group; all locations with a distance greater than or equal to 15m and less than 60m from the center point are divided into a third group; and all locations with a distance greater than or equal to 60m and less than or equal to 200m from the center point are divided into a fourth group.
[0147] Each group is assigned a different weight.
[0148] For example, the first group is assigned a first weight P1; the second group is assigned a second weight P2; the third group is assigned a third weight P3; and the fourth group is assigned a fourth weight P4.
[0149] Then proceed to step S302.
[0150] Step S302: Calculate the average position of the position points in each of the multiple groups.
[0151] Calculate the average position of all position points in each of the multiple groups.
[0152] The calculation formula is as follows:
[0153]
[0154] Where n represents the total number of location points in the target group, and i represents the location point in the target group.
[0155] For example, the first average position point is obtained by calculating the average position point of all position points in the first group; the second average position point is obtained by calculating the average position point of all position points in the second group; the third average position point is obtained by calculating the average position point of all position points in the third group; and the fourth average position point is obtained by calculating the average position point of all position points in the fourth group.
[0156] Then proceed to step S303.
[0157] Step S303: Perform a weighted summation of the average position points of the multiple groups to obtain the position of the calibration point.
[0158] The calibration point position is obtained by weighted summation of the average position points of each group.
[0159] The calculation formula is as follows:
[0160]
[0161] in, This indicates the first average position point of the first group; This indicates the second average position point of the second group; This indicates the third average position point of the third group; This indicates the fourth average position point of the fourth group.
[0162] This invention, in its embodiment, divides the location points in the scatter plot within a radius of a second preset distance from the center point of a circular region with the center point of the last movement as the center point. It then calculates the average location points in each group and performs a weighted sum of these average points to obtain the calibration point position. This results in a more accurate calibration point position, making the calibration of students' real-time Wi-Fi location more precise.
[0163] Reference Figure 4 , Figure 4 A flowchart illustrating the calibration update steps of a positioning calibration method according to another embodiment of the present invention is shown, as follows: Figure 4 As shown, it includes:
[0164] Step S401: Obtain the newly added WIFI location data on the current calibration day.
[0165] During the use of the electronic student ID, the electronic student ID continuously uploads the student's real-time WIFI location to the server. As the usage time increases, the WIFI location data will also increase.
[0166] To ensure the accuracy of the calibration point location, the calibration point location needs to be calibrated and updated once a day.
[0167] The calibration update procedure for calibration point locations is explained in detail below:
[0168] First, obtain the newly added WIFI location data on the current calibration date.
[0169] The current calibration date refers to the date on which the calibration point location calibration update is performed.
[0170] For example, if the calibration point location calibration is performed on January 3, then January 3 is the current calibration date.
[0171] Then proceed to step S402.
[0172] Step S402: Use the calibration point position obtained from the last calibration as the average position point from the initial day to the last calibration day; the initial day is used to characterize the first day of the data collected to obtain the calibration point position.
[0173] The calibration point position obtained from the last calibration is used as the average position point from the initial date to the last calibration date.
[0174] The initial date refers to the first day after which data was collected to obtain the location of the last calibration point. The last calibration date refers to the date on which the calibration point location calibration was last performed.
[0175] For example, if the last calibration point location was calibrated on January 2nd, then January 2nd would be the last calibration date.
[0176] The WIFI location data used to obtain the calibration point location was collected from January 1st to January 2nd, so January 1st is the initial date.
[0177] Then proceed to step S403.
[0178] Step S403: Based on the newly added WIFI positioning location and the calibration point location obtained from the last calibration, obtain the average location point from the initial day to the current calibration day.
[0179] The sum of the calibration point locations from the initial date to the last calibration date is calculated based on the calibration point location obtained from the last calibration and the number of days from the initial date to the last calibration date.
[0180] Based on the newly added WIFI location, the average location point is obtained by summing the newly added WIFI location and the calibration point location from the initial date to the last calibration date, and then calculating the number of days from the initial date to the current calibration date.
[0181] The average position point obtained is used as the current calibration date to calibrate and obtain the current calibration point.
[0182] For example, the calibration point position obtained on January 2nd can be used as the average position point for the two days from January 1st to January 2nd.
[0183] Multiply the calibration point location on January 2nd by two days to get the sum of the locations on those two days.
[0184] Then, add the newly added WIFI location obtained on January 3rd to the sum of the location points from the previous two days to get the sum of the location points for the three days from January 1st to January 3rd.
[0185] The average position point for the three days from January 1st to January 3rd is obtained by summing the position points over those three days and dividing by the sum of the position points over those three days. This average position point is then used as the calibration point for January 3rd.
[0186] In one alternative embodiment, the calibration point location needs to be calibrated and updated whenever a student's classroom or home location changes. Examples include adjusting grade level, changing classroom location, or moving.
[0187] This invention acquires newly added Wi-Fi location data on the current calibration day; uses the calibration point location obtained from the last calibration as the average location point from the initial day to the last calibration day; the initial day represents the first day from which the data was collected to obtain the calibration point location; and calculates the average location point from the initial day to the current calibration day based on the newly added Wi-Fi location and the calibration point location obtained from the last calibration. This enables daily calibration of the calibration point location, making the calibration points more accurate.
[0188] Reference Figure 5 , Figure 5 A flowchart illustrating the steps of generating a student's motion trajectory in a positioning calibration method according to another embodiment of the present invention is shown, as follows: Figure 5 As shown, it includes:
[0189] Step S501: Based on the location uploaded to the backend server of the electronic student ID, generate the student's movement trajectory.
[0190] Step S502: Display the motion trajectory in the parent's program.
[0191] The campus security platform's smart student ID system serves as the backend server system for electronic student IDs. The electronic student IDs upload students' real-time location data to the smart student ID system at a preset frequency. This system stores the location data and generates movement trajectories for each student, which are then displayed in the parent's app.
[0192] Parents can use apps on smartphones, tablets, computers, and other smart devices to view their children's movement trajectories and track their real-time location.
[0193] The parent-side program can be a mini-program, an application, a public account, etc.
[0194] This invention generates a student's movement trajectory based on the location data uploaded to the backend server of the electronic student ID; the movement trajectory is then displayed in the parent's application. This allows parents to view the student's movement trajectory and track their location at any time.
[0195] Reference Figure 6 , Figure 6 A flowchart illustrating the steps of an electronic fence function in a positioning calibration method according to another embodiment of the present invention is shown, as follows: Figure 6 As shown, it includes:
[0196] Step S601: Compare the student's movement trajectory with the preset electronic fence.
[0197] Step S602: If the student's movement trajectory exceeds the electronic fence, issue a warning message.
[0198] Parents and / or schools can pre-set electronic fence ranges in the campus security platform's smart student ID system.
[0199] An electronic fence is a boundary that defines a location that students cannot access.
[0200] The campus security platform's smart student ID system generates movement trajectories for each student based on the location uploaded by the electronic student ID, and then compares each student's movement trajectory with the corresponding preset electronic fence.
[0201] An early warning message will be issued if a student's movement trajectory exceeds the electronic fence.
[0202] Parents and / or schools can view the alert information in the app.
[0203] This invention compares the student's movement trajectory with a preset electronic fence; if the student's movement trajectory exceeds the electronic fence, an early warning message is issued. This allows parents to receive notifications of when their child has exceeded the electronic fence, making it easier to track the student's location.
[0204] The following example illustrates the steps of the positioning calibration method of the present invention in detail:
[0205] Reference Figure 7 , Figure 7 A flowchart of a positioning calibration method according to another embodiment of the present invention is shown, as follows: Figure 7 As shown, it includes:
[0206] First, the electronic student ID cards worn by students are collected and uploaded to the server, along with multiple Wi-Fi location data, GPS location data, and base station location data.
[0207] The collected data is preprocessed to filter out GPS and base station locations, retaining only Wi-Fi locations. Each Wi-Fi location is then labeled with tags representing the school, grade, and class information carried by that location.
[0208] The locations of tagged Wi-Fi networks are grouped into one category and stored, while the locations of untagged Wi-Fi networks are grouped into another category and stored.
[0209] The Wi-Fi location data of multiple students from the same class in the classroom and at home were collected separately to construct a random decision forest. This random decision forest was used to classify the multiple Wi-Fi location data.
[0210] The location data of WIFI in the random decision forest is abstracted, and the longitude of multiple WIFI locations is transformed into the X-axis and the latitude of multiple WIFI locations is transformed into the Y-axis to construct a location scatter plot.
[0211] The Mean-Shift vector is created using the Mean-Shift algorithm, with the following formula:
[0212]
[0213] Where, x i The points represent sample points in the scatter plot, where i can be 1, 2, 3...n; x represents any point; h represents the first preset radius; k represents the number of sample points in the scatter plot whose x is less than the radius h; S h This represents a circular region with a first preset radius.
[0214] The formula for defining the circular region with the first preset radius is:
[0215] S h (x)=(y\(yx)(yx) T ≤h 2 )
[0216] Where x represents the X-axis of the circular region with the first preset radius, y represents the Y-axis of the circular region with the first preset radius, and h represents the first preset radius.
[0217] After obtaining the center point of the circular region with the first preset radius, a Gaussian kernel function is added to the drift vector based on the Mean-Shift algorithm, resulting in the following formula:
[0218]
[0219] Where, x i The points represent sample points in the scatter plot, where i can be 1, 2, 3...n; x represents any point; h represents the first preset radius; k represents the number of sample points in the scatter plot whose x is less than the radius h; S h K represents a circular region with a first preset radius; K(*) represents the Gaussian kernel function.
[0220] Following the direction with the highest density of location points in the scatter plot, the center point of the circular region with the first preset radius is iteratively moved along the Mean-Shift drift vector until the center point overlaps with the drift vector and can no longer be moved, thus obtaining the center point of the scatter plot.
[0221] Using the center point of the circular area with the first preset radius after the last movement as the center point, calculate the distance of each position point from the center point, and divide each position point into multiple groups based on the distance.
[0222] Specifically, all locations with a distance greater than or equal to 0m and less than 5m from the center point are divided into a first group; all locations with a distance greater than or equal to 5m and less than 15m from the center point are divided into a second group; all locations with a distance greater than or equal to 15m and less than 60m from the center point are divided into a third group; and all locations with a distance greater than or equal to 60m and less than or equal to 200m from the center point are divided into a fourth group.
[0223] Each group is assigned a different weight.
[0224] For example, the first group is assigned a first weight P1; the second group is assigned a second weight P2; the third group is assigned a third weight P3; and the fourth group is assigned a fourth weight P4.
[0225] Calculate the average position of all positions in each of the multiple groups. The calculation formula is as follows:
[0226]
[0227] Where n represents the total number of location points in the target group, and i represents the location point in the target group.
[0228] For example, the first average position point is obtained by calculating the average position point of all position points in the first group; the second average position point is obtained by calculating the average position point of all position points in the second group; the third average position point is obtained by calculating the average position point of all position points in the third group; and the fourth average position point is obtained by calculating the average position point of all position points in the fourth group.
[0229] The calibration point position is obtained by weighted summation of the average position points of each group.
[0230] The calculation formula is as follows:
[0231]
[0232] in, This indicates the first average position point of the first group; This indicates the second average position point of the second group; This indicates the third average position point of the third group; This indicates the fourth average position point of the fourth group.
[0233] Finally, the student's actual location is compared with the obtained calibration point location using the electronic student verification system (ESR). If the difference between the ESR location and the calibration point location is less than or equal to a preset distance, the calibration point location is uploaded to the server as the student's location; if the difference between the ESR location and the calibration point location is not less than the preset distance, the ESR location is uploaded to the server as the student's location.
[0234] Example 2
[0235] Reference Figure 8 , Figure 8 A schematic diagram of a positioning calibration device according to Embodiment 2 of the present invention is shown, as follows: Figure 8 As shown, it includes:
[0236] The acquisition module 801 is used to obtain the real-time collected WIFI location;
[0237] Comparison module 802 is used to compare the real-time collected WIFI location with the calibration point location, wherein the calibration point location is used to characterize the average position of multiple WIFI location locations uploaded by the electronic student ID card worn by the student.
[0238] The first upload module 803 is used to upload the calibration point location as the student's location to the backend server of the electronic student ID card when the difference between the real-time collected WIFI positioning location and the calibration point location is less than or equal to a preset distance.
[0239] The second upload module 804 is used to upload the real-time collected WIFI location as the student's location to the backend server of the electronic student ID card, provided that the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance.
[0240] In an optional embodiment, the first upload module 803 includes:
[0241] The classroom location calibration point upload module is used to upload the classroom location calibration point as the student's location to the backend server of the electronic student ID card when the difference between the real-time collected WIFI location and the classroom location calibration point is less than or equal to a preset distance.
[0242] The home location calibration point upload module is used to upload the home location calibration point as the student's location to the backend server of the electronic student ID card when the difference between the real-time collected WIFI positioning location and the home location calibration point is less than or equal to a preset distance.
[0243] In an optional embodiment, the second upload module 804 includes:
[0244] The WIFI location upload module is used to upload the real-time WIFI location as the student's location to the backend server of the electronic student ID card, provided that the difference between the real-time WIFI location and the classroom location calibration point and the home location calibration point is not less than the preset distance.
[0245] In an optional embodiment, the positioning calibration device further includes:
[0246] The data acquisition module is used to collect multiple WIFI location data uploaded by the electronic student ID card worn by the student.
[0247] The construction module is used to construct a location scatter plot based on the multiple WIFI positioning locations;
[0248] An averaging module is used to average each location point in a circular area of a first preset radius in the location scatter plot to the center point of the circular area of the first preset radius.
[0249] The moving module is used to continuously move a circular area of the first preset radius and average it according to the direction with the highest density of position points in the position scatter plot until the position of the calibration point is obtained.
[0250] In one optional embodiment, the averaging module includes:
[0251] The grouping module is used to divide the various position points in the position scatter plot within a range of a second preset distance from the center point of the circular area of the first preset radius after the last movement into multiple groups.
[0252] The calculation module is used to calculate the average position of each group of position points in the plurality of groups;
[0253] The summation module is used to perform a weighted summation of the average position points of the multiple groups to obtain the position of the calibration point.
[0254] In an optional embodiment, the positioning calibration device further includes:
[0255] The acquisition module is used to acquire newly added WIFI location data on the current calibration day;
[0256] The average location point module is used to take the calibration point position obtained from the last calibration as the average location point from the initial day to the last calibration day; the initial day is used to characterize the first day of the data collected to obtain the calibration point position.
[0257] The calibration point location calibration module is used to obtain the average location point from the initial day to the current calibration day based on the newly added WIFI location and the calibration point location obtained from the last calibration.
[0258] In an optional embodiment, the positioning calibration device further includes:
[0259] The generation module is used to generate the student's movement trajectory based on the location uploaded to the backend server of the electronic student ID.
[0260] The display module is used to show the movement trajectory in the parent's application.
[0261] In one optional embodiment, the generation module includes:
[0262] The comparison module is used to compare the student's movement trajectory with a preset electronic fence;
[0263] The early warning module is used to issue an early warning message when the student's movement trajectory exceeds the electronic fence.
[0264] Based on the same inventive concept, embodiments of the present invention also provide an electronic device, comprising:
[0265] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the positioning calibration method described in any of the above embodiments.
[0266] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium, comprising: when the instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to perform the positioning calibration method described in any of the above embodiments.
[0267] 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, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0268] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, as some steps can be performed in other orders or simultaneously according to the present invention. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and components involved are not necessarily essential to the present invention.
[0269] The above provides a detailed description of the positioning calibration method, apparatus, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A positioning calibration method, characterized in that, Applied to electronic student ID cards, the method includes: Obtain real-time Wi-Fi location data; The real-time collected WIFI location is compared with the calibration point location, which is used to characterize the average position of multiple WIFI location locations uploaded by the electronic student ID card worn by the student. If the difference between the real-time collected WIFI location and the calibration point location is less than or equal to a preset distance, the calibration point location is uploaded as the student's location to the backend server of the electronic student ID card. If the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance, the real-time collected WIFI location will be uploaded as the student's location to the backend server of the electronic student ID card. The method further includes: Collect multiple WIFI location data uploaded by the electronic student ID card worn by the student; A location scatter plot is constructed based on the multiple WIFI location locations; The points within a circular region of a first preset radius in the location scatter plot are averaged to the center point of the circular region of the first preset radius. Following the direction of the highest density of location points in the location scatter plot, continuously move the circular area of the first preset radius and average it until the location of the calibration point is obtained. After the final movement of the circular region of the first preset radius and averaging, the method further includes: Using the center point of the circular area with the first preset radius after the last movement as the center point, the position points in the position scatter plot within a range of a second preset distance as the radius are divided into multiple groups. Calculate the average position of the position points in each of the multiple groups; The position of the calibration point is obtained by weighted summation of the average position points of the multiple groups.
2. The method according to claim 1, characterized in that, The calibration point locations include classroom location calibration points and / or home location calibration points. The classroom location calibration point is used to represent the average location of multiple WIFI location locations uploaded by multiple students wearing the electronic student ID cards in the same classroom. The home location calibration point is used to represent the average location of multiple WIFI location locations uploaded by students wearing the electronic student ID cards in their homes. The step of uploading the calibration point location as the student's location to the backend server of the electronic student ID when the difference is less than or equal to a preset distance includes: If the difference between the real-time collected WIFI location and the classroom location calibration point is less than or equal to the preset distance, the classroom location calibration point will be uploaded as the student's location to the backend server of the electronic student ID card. If the difference between the real-time collected WIFI location and the home location calibration point is less than or equal to the preset distance, the home location calibration point will be uploaded as the student's location to the backend server of the electronic student ID card. When the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance, the real-time collected WIFI location is uploaded as the student's location to the backend server of the electronic student ID, including: If the difference between the real-time collected WIFI location and the classroom location calibration point and the home location calibration point is not less than the preset distance, the real-time collected WIFI location will be uploaded as the student's location to the backend server of the electronic student ID.
3. The method according to claim 1, characterized in that, After obtaining the calibration point location, the method further includes: Obtain newly added WIFI location data on the current calibration date; The calibration point position obtained from the last calibration is used as the average position point from the initial date to the last calibration date; the initial date is used to characterize the first day of the data collected to obtain the calibration point position. Based on the newly added WIFI location and the calibration point location obtained from the last calibration, the average location point from the initial day to the current calibration day is obtained.
4. The method according to claim 1, characterized in that, The method further includes: Based on the location uploaded to the backend server of the electronic student ID, the student's movement trajectory is generated; The movement trajectory is displayed in the parent's app.
5. The method according to claim 4, characterized in that, After obtaining the student's movement trajectory, the method further includes: The student's movement trajectory is compared with the preset electronic fence; If a student's movement trajectory exceeds the electronic fence, an early warning message will be issued.
6. A positioning calibration device, characterized in that, The device includes: The acquisition module is used to obtain the real-time collected WIFI location; The comparison module is used to compare the real-time collected WIFI location with the calibration point location, wherein the calibration point location is used to characterize the average location of multiple WIFI location uploaded by the electronic student ID card worn by the student. The first upload module is used to upload the calibration point location as the student's location to the backend server of the electronic student ID card when the difference between the real-time collected WIFI positioning location and the calibration point location is less than or equal to a preset distance. The second upload module is used to upload the real-time collected WIFI location as the student's location to the backend server of the electronic student ID card, provided that the difference between the real-time collected WIFI location and the calibration point location is not less than the preset distance. The positioning calibration device further includes: The data acquisition module is used to collect multiple WIFI location data uploaded by the electronic student ID card worn by the student. The construction module is used to construct a location scatter plot based on the multiple WIFI positioning locations; An averaging module is used to average each location point in a circular area of a first preset radius in the location scatter plot to the center point of the circular area of the first preset radius. The moving module is used to continuously move a circular area of the first preset radius and average it according to the direction with the highest density of position points in the position scatter plot until the position of the calibration point is obtained. The averaging module includes: The grouping module is used to divide the various position points in the position scatter plot within a range of a second preset distance from the center point of the circular area of the first preset radius after the last movement into multiple groups. The calculation module is used to calculate the average position of each group of position points in the plurality of groups; The summation module is used to perform a weighted summation of the average position points of the multiple groups to obtain the position of the calibration point.
7. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the positioning calibration method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the positioning calibration method according to any one of claims 1 to 5.