Track judgment method and device, terminal equipment and storage medium
By obtaining the trajectory information of the target object and calculating its speed, and judging whether its trajectory is normal, the problem of low judgment efficiency in the prior art is solved, and accurate identification and efficient judgment of the trajectory of the target object are achieved.
Patent Information
- Application Number
- CN202510196731.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, the method of judging whether the trajectory of a specific target object is abnormal is too complex and inefficient.
By obtaining the first track information of the target object at the previous time point and the second track information of the current time point, the speed of the target object is calculated, and the speed is compared with the preset speed threshold, the trajectory is judged whether the trajectory is normal, and the relevant information is written to the trajectory database.
The efficiency of judging whether the target object trajectory is abnormal is improved, the trajectory information can be accurately identified, and when the trajectory is normal, the latest trajectory information is written to the database.
Smart Images

Figure CN120102923A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of geographic information, and in particular to a trajectory determination method, apparatus, terminal device, and readable storage medium. Background Art
[0002] In certain fields of safety technology, it is necessary to identify the trajectory of a specific target object, but the method for determining whether the trajectory is abnormal is too complicated and inefficient. Summary of the invention
[0003] In view of this, the present application provides a trajectory determination method, which can improve the efficiency of determining whether the trajectory of a specific target object is abnormal. The trajectory determination method includes: Acquire first trajectory information of a target object at a previous time point, wherein the first trajectory information includes corresponding first coordinate information; Acquire second trajectory information of the target object at a current time point, where the second trajectory information includes corresponding second coordinate information; Calculating the speed of the target object according to the previous time point and the corresponding first coordinate information, and the current time point and the corresponding second coordinate information; comparing the speed of the target object with a preset speed threshold; When the speed of the target object is less than the preset speed threshold, the trajectory information is determined to be normal, and the second coordinate information and the corresponding timestamp are written into the trajectory database corresponding to the target object.
[0004] In one embodiment, the step of obtaining the trajectory information of the target object at a previous time point includes: A preset trajectory database is queried to obtain first trajectory information of the target object at a previous time point.
[0005] In one embodiment, the second trajectory information further includes IP address information of the target object, and the trajectory determination method further includes: When the preset trajectory database is queried and the first trajectory information of the target object at a previous time point is not obtained, obtaining the location corresponding to the IP address information of the target object; Determining whether the address corresponding to the second coordinate information is located within the home location; If so, it is determined that the trajectory information is normal, and the second trajectory information and the corresponding timestamp are written into the preset trajectory database.
[0006] In one embodiment, when the address corresponding to the second coordinate information is not located at the belonging place, the trajectory information is determined to be abnormal.
[0007] In one embodiment, the step of writing the second trajectory information and the corresponding timestamp into the preset trajectory database includes: The second trajectory information and the corresponding timestamp are used as the latest trajectory information of the target object to be written into the preset trajectory database.
[0008] In one embodiment, writing the second trajectory information and the corresponding timestamp as the latest trajectory information of the target object into the preset trajectory database includes: The current time point is written to cover the first time point, and the second track information is written to cover the first track information.
[0009] In one embodiment, after the step of writing the current time point to cover the first time point and writing the second track information to cover the first track information, the step further includes: It is determined whether the retention time after writing of the second track information is greater than a preset time threshold, and if so, the second track information and the corresponding timestamp are deleted.
[0010] In addition, a trajectory determination device is also provided, comprising: A first acquisition unit, used to acquire first trajectory information of a target object at a previous time point, wherein the trajectory information includes corresponding first coordinate information; A second acquisition unit, used to acquire second trajectory information of the target object at a current time point, wherein the trajectory information includes corresponding second coordinate information; A speed calculation unit, used to calculate the speed of the target object according to the previous time point and the corresponding first coordinate information, and the current time point and the corresponding second coordinate information; A speed comparison unit, configured to compare the speed of the target object with a preset speed threshold; The first trajectory processing unit is used to determine that the trajectory information is normal when the speed of the target object is less than the preset speed threshold, and write the second coordinate information and the corresponding timestamp into the trajectory database corresponding to the target object.
[0011] In addition, a terminal device is also provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned trajectory determination method when executed by the processor.
[0012] In addition, a readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned trajectory determination method are implemented.
[0013] In this embodiment, by acquiring first trajectory information of the target object at a previous time point, the first trajectory information includes corresponding first coordinate information; acquiring second trajectory information of the target object at a current time point, the second trajectory information includes corresponding second coordinate information; calculating the speed of the target object according to the previous time point and the corresponding first coordinate information, and the current time point and the corresponding second coordinate information; comparing the speed of the target object with a preset speed threshold; when the speed of the target object is less than the preset speed threshold, judging that the trajectory information is normal, and writing the second coordinate information and the corresponding timestamp into a trajectory database corresponding to the target object, by analyzing the first trajectory information corresponding to the target object at the previous time point, and the second trajectory information corresponding to the current time point, and then calculating the speed of the target object, and comparing the speed of the target object with the preset speed threshold, thereby judging whether the trajectory information of the target object is normal, and when the trajectory information of the target object is normal, writing the second coordinate information and the corresponding timestamp into the trajectory database corresponding to the target object, the trajectory information of the target object can be accurately identified. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A schematic diagram of a flow chart of a trajectory determination method provided in an embodiment of the present application; Figure 2 A schematic diagram of a flow chart of a trajectory determination method provided in another embodiment of the present application; Figure 3 A schematic block diagram of a trajectory determination device provided in an embodiment of the present application; Figure 4 This is a schematic block diagram of the internal structure of a terminal device according to an embodiment of the present application.
[0015] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0016] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0017] In addition, if the descriptions of "first", "second", etc. are involved in this application, they are only used for descriptive purposes (such as for distinguishing the same or similar elements), and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0018] like Figure 1 As shown, the present application provides a trajectory determination method, which includes the following steps: Step S110, obtaining first trajectory information of the target object at a previous time point, wherein the first trajectory information includes corresponding first coordinate information.
[0019] In this embodiment, the target object includes a target device or a target person, and the first trajectory information includes position information corresponding to the target device or the target person at a previous time point. The position information is usually expressed in coordinates, that is, first coordinate information.
[0020] The previous time point should be understood as the time point corresponding to the last trajectory information of the target object relative to the current time point, and the first trajectory information should be understood as the trajectory information corresponding to the last time point of the target object.
[0021] Step S120, obtaining second trajectory information of the target object at the current time point, wherein the trajectory information includes corresponding second coordinate information.
[0022] The second trajectory information includes the position information corresponding to the target device or the target person at the current time point. The position information is usually expressed in coordinates, that is, second coordinate information.
[0023] Step S130, calculating the speed of the target object according to the previous time point and the corresponding first coordinate information, and the current time point and the corresponding second coordinate information.
[0024] Step S140: comparing the speed of the target object with a preset speed threshold.
[0025] Step S150: When the speed of the target object is less than the preset speed threshold, it is determined that the trajectory information is normal, and the second coordinate information and the corresponding timestamp are written into the trajectory database corresponding to the target object.
[0026] In this embodiment, when the speed of the target object is greater than or equal to the preset speed threshold, the trajectory information is judged to be abnormal and an alarm is issued.
[0027] In this embodiment, by analyzing the first trajectory information corresponding to the target object at the previous time point and the second trajectory information corresponding to the current time point, the speed of the target object is calculated, and the speed of the target object is compared with a preset speed threshold to determine whether the trajectory information of the target object is normal. When the trajectory information of the target object is normal, the second coordinate information and the corresponding timestamp are written into the trajectory database corresponding to the target object, so that the trajectory information of the target object can be accurately identified.
[0028] In one embodiment, step S110 includes: A preset trajectory database is queried to obtain first trajectory information of the target object at a previous time point.
[0029] In this embodiment, when establishing a preset trajectory database, it is necessary to filter the abnormal coordinate information in the trajectory information to remove zero values and integer values.
[0030] like Figure 2 As shown, in one embodiment, the second trajectory information also includes the IP address information of the target object, and the trajectory determination method further includes: S160: When the preset trajectory database is queried and no first trajectory information of the target object at a previous time point is obtained, the location corresponding to the IP address information of the target object is obtained.
[0031] S170, determining whether the address corresponding to the second coordinate information is located within the belonging place, and if so, determining that the trajectory information is normal, and writing the second trajectory information and the corresponding timestamp into the preset trajectory database.
[0032] In this embodiment, when the preset trajectory database is queried and the first trajectory information of the target object at the previous time point is not obtained, the place of origin corresponding to the IP address information of the target object is further obtained to determine whether the address corresponding to the second coordinate information is located within the place of origin, thereby determining that the trajectory information is normal, thereby further improving the availability and accuracy of the above-mentioned trajectory judgment method.
[0033] In one embodiment, when the address corresponding to the second coordinate information is not located at the belonging place, the trajectory information is determined to be abnormal.
[0034] In one embodiment, the step of writing the second trajectory information and the corresponding timestamp into the preset trajectory database in step S170 includes: The second trajectory information and the corresponding timestamp are used as the latest trajectory information of the target object to be written into the preset trajectory database.
[0035] In one embodiment, the step of writing the second trajectory information and the corresponding timestamp as the latest trajectory information of the target object into the preset trajectory database includes: The current time point is written to cover the first time point, and the second track information is written to cover the first track information.
[0036] In this embodiment, in order to improve the screening efficiency, the current time point may be written into the preset trajectory database to cover the first time point, and the second trajectory information may be written to cover the first trajectory information.
[0037] In one embodiment, after the step of writing the current time point to cover the first time point and writing the second track information to cover the first track information, the step further includes: It is determined whether the retention time after writing of the second track information is greater than a preset time threshold, and if so, the second track information and the corresponding timestamp are deleted.
[0038] In this embodiment, the retention time of the last occurrence of the target object's trajectory information can be set. For example, when the retention time after the second trajectory information is written is greater than a preset time threshold, the second trajectory information and the corresponding timestamp are deleted.
[0039] In addition, if Figure 3 As shown, a trajectory determination device 200 is also provided, comprising: A first acquisition unit 210 is used to acquire first trajectory information of a target object at a previous time point, where the trajectory information includes corresponding first coordinate information; A second acquisition unit 220 is used to acquire second trajectory information of the target object at a current time point, where the trajectory information includes corresponding second coordinate information; A speed calculation unit 230, configured to calculate the speed of the target object according to the previous time point and the corresponding first coordinate information, and the current time point and the corresponding second coordinate information; A speed comparison unit 240, configured to compare the speed of the target object with a preset speed threshold; The first trajectory processing unit 250 is configured to determine that the trajectory information is normal when the speed of the target object is less than the preset speed threshold, and write the second coordinate information and the corresponding timestamp into a trajectory database corresponding to the target object.
[0040] In addition, a terminal device is also provided in an embodiment of the present application. The internal structure of the terminal device can be as follows: Figure 4 As shown. The terminal device includes a processor, a memory, a communication interface and a database connected via a system bus. The processor is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the terminal device is used to store data called by the computer program. The communication interface of the terminal device is used to communicate data with an external terminal. The input device of the terminal device is used to receive a signal input by an external device. When the computer program is executed by the processor, a trajectory judgment method as described in the above embodiment is implemented.
[0041] Those skilled in the art will understand that Figure 4 The structure shown in is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the terminal device to which the solution of the present application is applied.
[0042] In addition, the present application also proposes a readable storage medium, the readable storage medium includes a computer program, and the computer program, when executed by a processor, implements the steps of the method described in the above embodiment. It can be understood that the readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0043] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0044] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0045] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A trajectory determination method, characterized in that: include: Acquire first trajectory information of a target object at a previous time point, wherein the first trajectory information includes corresponding first coordinate information; Acquire second trajectory information of the target object at a current time point, where the second trajectory information includes corresponding second coordinate information; Calculating the speed of the target object according to the previous time point and the corresponding first coordinate information, and the current time point and the corresponding second coordinate information; comparing the speed of the target object with a preset speed threshold; When the speed of the target object is less than the preset speed threshold, the trajectory information is determined to be normal, and the second coordinate information and the corresponding timestamp are written into the trajectory database corresponding to the target object.
2. The trajectory determination method according to claim 1, characterized in that: The step of obtaining the trajectory information of the target object at the previous time point includes: A preset trajectory database is queried to obtain first trajectory information of the target object at a previous time point.
3. The trajectory determination method according to claim 2, characterized in that: The second track information also includes the IP address information of the target object, and the track determination method also includes: When the preset trajectory database is queried and the first trajectory information of the target object at a previous time point is not obtained, obtaining the location corresponding to the IP address information of the target object; Determining whether the address corresponding to the second coordinate information is located within the home location; If so, it is determined that the trajectory information is normal, and the second trajectory information and the corresponding timestamp are written into the preset trajectory database.
4. The trajectory determination method according to claim 3, characterized in that: When the address corresponding to the second coordinate information is not located at the belonging place, it is determined that the trajectory information is abnormal.
5. The trajectory determination method according to claim 2, characterized in that: The step of writing the second trajectory information and the corresponding timestamp into the preset trajectory database comprises: The second trajectory information and the corresponding timestamp are used as the latest trajectory information of the target object to be written into the preset trajectory database.
6. The trajectory determination method according to claim 2, characterized in that: The step of writing the second trajectory information and the corresponding timestamp as the latest trajectory information of the target object into the preset trajectory database includes: The current time point is written to cover the first time point, and the second track information is written to cover the first track information.
7. The trajectory determination method according to claim 2, characterized in that: After the step of writing the current time point to cover the first time point and writing the second track information to cover the first track information, the step further includes: It is determined whether the retention time after writing of the second track information is greater than a preset time threshold, and if so, the second track information and the corresponding timestamp are deleted.
8. A trajectory determination device, characterized in that: include: A first acquisition unit, used to acquire first trajectory information of a target object at a previous time point, wherein the first trajectory information includes corresponding first coordinate information; A second acquisition unit, used to acquire second trajectory information of the target object at a current time point, wherein the second trajectory information includes corresponding second coordinate information; A speed calculation unit, used to calculate the speed of the target object according to the previous time point and the corresponding first coordinate information, and the current time point and the corresponding second coordinate information; A speed comparison unit, configured to compare the speed of the target object with a preset speed threshold; The first trajectory processing unit is used to determine that the trajectory information is normal when the speed of the target object is less than the preset speed threshold, and write the second coordinate information and the corresponding timestamp into the trajectory database corresponding to the target object.
9. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the trajectory determination method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the trajectory determination method according to any one of claims 1 to 7 are implemented.