Abnormal trajectory identification method, device and computer equipment
Patent Information
- Application Number
- CN202211472667.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-11-17
AI Technical Summary
[0003]通常,异常轨迹的检测包含异常地点检测和异常轨迹片段检测,异常地点的检测是通过匹配人工配置的异常地点,识别范围不准确,识别率也很低;异常轨迹的识别通过简单的几个异常地点的连接形成一条异常轨迹,检测方法十分简陋,准确率也很低,因此,现有的异常轨迹检测方法因为准确度过低,并不能为后台工作人员提供较高的参考价值
[0039]The aforementioned abnormal trajectory recognition method, device, computer equipment, storage medium, and computer program product replace the previous manual recognition scheme by identifying abnormal locations based on word segmentation nouns, increasing the detection range and recognition accuracy of abnormal locations. By splitting the trajectory to be identified into multiple trajectory segments, the complexity of trajectory analysis is reduced, and the analysis of abnormal trajectory segments is further transformed into the analysis of intersection transition probabilities, further reducing the complexity of trajectory analysis. Compared with the previous method of only identifying abnormal points and using the trajectory formed by connecting abnormal points as the identification of abnormal trajectories, the abnormal trajectory recognition rate is higher, and the analysis of abnormal trajectories is more refined.
Smart Images

Figure CN115935963B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information automation processing technology, and in particular to an abnormal trajectory recognition method, apparatus, computer equipment, storage medium and computer program product. Background Technology
[0002] Abnormal trajectory detection methods are applied in many scenarios. For example, they can be used to detect the driving position of vehicles to prevent drivers from having accidents, detect the driving path of public transportation vehicles to prevent them from deviating from the predetermined path, and detect the movement path of persons restricted from leaving the country to prevent them from leaving the country without authorization.
[0003] Typically, abnormal trajectory detection includes abnormal location detection and abnormal trajectory segment detection. Abnormal location detection is achieved by matching manually configured abnormal locations, which has an inaccurate identification range and a low recognition rate. Abnormal trajectory recognition is achieved by connecting several abnormal locations to form an abnormal trajectory. This detection method is very rudimentary and has a low accuracy rate. Therefore, existing abnormal trajectory detection methods cannot provide high reference value for back-end staff due to their low accuracy. Summary of the Invention
[0004] Therefore, it is necessary to provide an abnormal trajectory recognition method, device, computer equipment, storage medium, and computer program product that can identify abnormal trajectories with high accuracy and reduce the complexity of trajectory analysis, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides an abnormal trajectory recognition method, including:
[0006] Collect the trajectory to be identified, which includes multiple transit points and trajectory segments between each pair of transit points;
[0007] The locations along the route are segmented into words, and abnormal locations are identified based on the nouns obtained after word segmentation.
[0008] Calculate the intersection transition probability of the trajectory segment at the intersection it passes through, and identify abnormal trajectory segments based on the intersection transition probability;
[0009] When the abnormal location and the abnormal trajectory meet preset conditions, the trajectory to be identified is determined to be an abnormal trajectory.
[0010] In one embodiment, the step of segmenting the route locations and identifying abnormal locations based on the nouns obtained after segmentation includes:
[0011] Input the locations along the route into a pre-trained word segmentation model to obtain multiple nouns corresponding to the locations along the route;
[0012] Based on all the anomalous location names contained in the first set, determine the anomalous probability of the name;
[0013] Determine the normal probability of the noun based on all normal place names contained in the second set;
[0014] Based on the abnormal and normal probabilities of the terms, determine the abnormal location probability and normal location probability of the route locations;
[0015] When the probability of an abnormal location is greater than the probability of a normal location, the route location is determined to be an abnormal location.
[0016] In one embodiment, calculating the intersection transition probability of the trajectory segment passing through the intersection, and identifying abnormal trajectory segments based on the intersection transition probability, includes:
[0017] Obtain all intersections along the route included in the trajectory segment;
[0018] For each intersection, calculate the intersection transition probability of moving from the previous intersection to the current intersection;
[0019] The transition probability of the trajectory segment is determined based on the intersection transition probability of each of the said intersections.
[0020] When the transition probability is less than a preset probability threshold, the trajectory segment is determined to be an abnormal trajectory segment.
[0021] In one embodiment, determining the trajectory to be identified as an abnormal trajectory when the abnormal location and the abnormal trajectory segment meet preset conditions includes:
[0022] Calculate a first ratio of the total number of abnormal locations to the total number of locations along the route;
[0023] Calculate a second ratio between the total length of the abnormal trajectory fragments and the total length of the trajectory to be identified;
[0024] When the first ratio is greater than or equal to the first threshold, and / or when the second ratio is greater than or equal to the second threshold, the trajectory to be identified is determined to be an abnormal trajectory.
[0025] In one embodiment, after determining that the trajectory to be identified is an abnormal trajectory when the abnormal location and the abnormal trajectory meet preset conditions, the process includes:
[0026] Receive a confirmation instruction, and determine the classification result for each of the route locations based on the confirmation instruction;
[0027] When the classification result indicates that the route location is an abnormal location, the route location is added to the first set; when the classification result indicates that the route location is a normal location, the route location is added to the second set.
[0028] In one embodiment, determining the classification result for each of the route locations according to the determining instruction includes:
[0029] When the determination instruction is the same as the discrimination result of each of the route locations, the discrimination result is taken as the classification result of the current route location;
[0030] When the determination instruction differs from the discrimination result of each of the route locations, the classification result of the current route location is determined according to the determination instruction.
[0031] Secondly, this application also provides an abnormal trajectory recognition device, comprising:
[0032] The acquisition module is used to acquire the trajectory to be identified, which includes multiple transit points and trajectory segments between each pair of transit points;
[0033] The first discrimination module is used to perform word segmentation on the locations along the route and to discriminate abnormal locations based on the nouns obtained after word segmentation.
[0034] The second discrimination module is used to calculate the intersection transition probability of the trajectory segment passing through the intersection, and to discriminate abnormal trajectory segments based on the intersection transition probability;
[0035] The determination module is used to determine that the trajectory to be identified is an abnormal trajectory when the abnormal location and the abnormal trajectory meet preset conditions.
[0036] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the abnormal trajectory recognition method described in any of the above embodiments.
[0037] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the abnormal trajectory recognition method described in any of the above embodiments.
[0038] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the abnormal trajectory recognition method described in any of the above embodiments.
[0039] The aforementioned abnormal trajectory recognition method, device, computer equipment, storage medium, and computer program product replace the previous manual recognition scheme by identifying abnormal locations based on word segmentation nouns, increasing the detection range and recognition accuracy of abnormal locations. By splitting the trajectory to be identified into multiple trajectory segments, the complexity of trajectory analysis is reduced, and the analysis of abnormal trajectory segments is further transformed into the analysis of intersection transition probabilities, further reducing the complexity of trajectory analysis. Compared with the previous method of only identifying abnormal points and using the trajectory formed by connecting abnormal points as the identification of abnormal trajectories, the abnormal trajectory recognition rate is higher, and the analysis of abnormal trajectories is more refined. Attached Figure Description
[0040] Figure 1 This is an application environment diagram of an abnormal trajectory recognition method in one embodiment;
[0041] Figure 2 This is a flowchart illustrating an abnormal trajectory recognition method in one embodiment;
[0042] Figure 3 This is a flowchart illustrating the process of determining abnormal locations using an abnormal trajectory recognition method in one embodiment.
[0043] Figure 4 This is a flowchart illustrating the process of determining abnormal trajectory segments using an abnormal trajectory recognition method in one embodiment.
[0044] Figure 5 This is a flowchart illustrating the process of determining an abnormal trajectory using an abnormal trajectory recognition method in one embodiment.
[0045] Figure 6 This is a structural block diagram of an abnormal trajectory recognition device in one embodiment;
[0046] Figure 7 This is a structural block diagram of the first discrimination module of the abnormal trajectory recognition device in one embodiment;
[0047] Figure 8 This is a structural block diagram of the second discrimination module of the abnormal trajectory recognition device in one embodiment;
[0048] Figure 9 This is a structural block diagram of the abnormal trajectory recognition device determination module in one embodiment;
[0049] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] The abnormal trajectory recognition method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown.
[0052] For example, the abnormal trajectory recognition method is applied to terminal 102. Terminal 102 first collects the trajectory to be identified, which includes multiple transit points and trajectory segments between each pair of transit points. Then, terminal 102 performs word segmentation on the transit points and identifies abnormal locations based on the nouns obtained after word segmentation. It also calculates the intersection transition probability of the trajectory segments passing through intersections and identifies abnormal trajectory segments based on the intersection transition probability. When the abnormal locations and the abnormal trajectory meet preset conditions, terminal 102 determines the trajectory to be identified as an abnormal trajectory and sends it to server 104. Server 104 stores it in a data storage system. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and IoT devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication, such as through a network connection.
[0053] For example, the abnormal trajectory recognition method is applied to server 104. Server 104 first collects the trajectory to be identified, which includes multiple transit points and trajectory segments between each pair of transit points. Then, server 104 performs word segmentation on the transit points and identifies abnormal locations based on the nouns obtained after word segmentation. It also calculates the intersection transition probability of the trajectory segments passing through intersections and identifies abnormal trajectory segments based on the intersection transition probability. When abnormal locations and abnormal trajectories meet preset conditions, server 104 determines the trajectory to be identified as an abnormal trajectory and stores it in the data storage system. It can be understood that the data storage system can be an independent storage device, or the data storage system can be located on the server, or the data storage system can be located on another terminal.
[0054] In one embodiment, an abnormal trajectory identification method is provided. This embodiment uses the application of this abnormal trajectory identification method to server 104 as an example for illustration. Figure 2 As shown, the abnormal trajectory recognition method includes:
[0055] Step 202: Collect the trajectory to be identified, which includes multiple transit points and trajectory segments between each transit point.
[0056] The trajectory to be identified can be a trajectory obtained by processing location data received over a period of time. Location data can be transmitted in real time by a terminal set up on the object making the specific movement, or it can be obtained from historical location data of the terminal set up on the object making the specific movement. In practical applications, the object making the specific movement can be a salesperson. When salespeople conduct offline marketing, their marketing terminals can report location data at fixed or non-fixed time intervals. Each reported location data can be considered a trajectory point. The location data can specifically include the location of the trajectory point and the time of arrival at that point; the location data can also only include the location of the trajectory point. The server uses the time of receiving each piece of location data as the arrival time of that trajectory point. Alternatively, in the method of reporting at fixed time intervals, the arrival time of each trajectory point can be determined by the order in which the location data is received. For example, if the first trajectory point is received at 2:00 AM, and the time interval is 20 seconds, then the arrival time of the second trajectory point can be determined as 2:00 AM and 20 seconds. The order of multiple trajectory points can be determined based on the time carried by the location data or the reporting order of the location data.
[0057] A transit point can be a location where an object performing a specific movement stays for more than a preset time. Specifically, when a business person stays at a certain location for more than the preset time, that location is considered a transit point. For example, if the receiving time interval between any two trajectory points is 20 seconds and the preset time is 200 seconds, and there are ten consecutive trajectory points in the same location, it can be considered that the object has stayed at that location for more than 200 seconds, and that location is then considered a transit point.
[0058] A trajectory segment refers to the path an object takes when moving between two waypoints. A trajectory segment is generated by sequentially selecting two consecutive trajectory points. All trajectory segments and all waypoints together form a unique and continuous trajectory to be identified. In practical applications, waypoints are the work locations where business personnel conduct business, and trajectory segments are the paths they take when moving from one work location to another.
[0059] In this embodiment, the server obtains the specific location data of the business personnel through a terminal set on the object making a specific movement action, and takes the location of the trajectory point where the business personnel stay for a long time as the way point, and the path between the two way points as the trajectory segment, to generate a trajectory to be identified for recording the movement process of the business personnel.
[0060] Step 204: Perform word segmentation on the locations along the route, and identify abnormal locations based on the nouns obtained after word segmentation.
[0061] As an example, the server can use a window of preset length to exhaustively segment the names of the locations along the route, thereby obtaining multiple nouns corresponding to each location along the route, and forming multiple sets based on the multiple nouns corresponding to each location along the route.
[0062] Furthermore, for each set, the first similarity between each noun and the noun corresponding to the abnormal location can be obtained based on all the nouns contained in the set. The average value of all the first similarities is calculated to obtain the second similarity value between the name of the route location corresponding to the current set and the abnormal location. When the second similarity value reaches the preset similarity threshold, the route location is regarded as an abnormal location.
[0063] In this embodiment, the server can perform word segmentation on the names of the locations along the route, and determine whether the locations along the route are abnormal locations based on the multiple nouns obtained.
[0064] Step 206: Calculate the intersection transition probability of the trajectory segment passing through the intersection, and identify abnormal trajectory segments based on the intersection transition probability.
[0065] The trajectory segments are formed based on the actual terrain and road conditions. During the movement of business personnel, they will pass through multiple intersections. The trajectory segments can identify the entry point when business personnel enter each intersection and the transfer point when they exit that intersection.
[0066] The intersection transition probability refers to the ratio of the number of trajectories a business operator takes from an entry point at a fork in the road to a transition point to the number of trajectories a business operator takes from the entry point at the current fork in the road to any other intersection. The intersection transition process is a Markov process.
[0067] As an example, after obtaining the intersection transition probability of each intersection in a trajectory segment, the intersection transition probabilities of each intersection can be multiplied to obtain the intersection transition probability of the trajectory segment. When the intersection transition probability of the trajectory segment is less than or equal to a preset probability threshold, the trajectory segment is regarded as an abnormal trajectory segment.
[0068] In this embodiment, the server can determine the intersection transition probability of a trajectory segment based on the intersection transition probabilities of all intersections passed through in each trajectory segment, and when the intersection transition probability of a trajectory segment is less than or equal to a preset probability threshold, the trajectory segment is taken as a trajectory segment.
[0069] Step 208: When the abnormal location and abnormal trajectory meet the preset conditions, the trajectory to be identified is determined to be an abnormal trajectory.
[0070] In this embodiment, the server traverses all the locations and all the trajectory segments contained in the trajectory to be identified to obtain the abnormal locations and abnormal trajectories contained in the trajectory to be identified. When the abnormal locations and abnormal trajectories contained in the trajectory to be identified meet the preset conditions set by the user in advance, the trajectory to be identified can be identified as an abnormal trajectory.
[0071] In the above-mentioned abnormal trajectory recognition method, the server can receive location data from the terminal set on the object making a specific movement action, form a trajectory to be identified, and perform word segmentation on the name of each location passed through in the trajectory to be identified to obtain multiple nouns. Based on the nouns, it is determined whether the current location passed through is an abnormal location. For each trajectory segment in the trajectory to be identified, the intersection transition probability of all intersections passed through by each trajectory segment is calculated. Based on the intersection transition probability, it is determined whether the current trajectory segment is an abnormal trajectory segment. When the abnormal location and abnormal trajectory meet the preset conditions, the trajectory to be identified is determined as an abnormal trajectory, thereby realizing the anomaly detection of the trajectory to be identified. The aforementioned abnormal trajectory recognition method replaces the previous manual recognition approach by using a model to automatically segment words and identify abnormal locations based on the segmented nouns. This increases the detection range and recognition accuracy of abnormal locations. The method also breaks down the trajectory to be identified into multiple trajectory segments, reducing the complexity of trajectory analysis. Furthermore, the analysis of abnormal trajectory segments is further transformed into the analysis of intersection transition probabilities, which further reduces the complexity of trajectory analysis. Compared to the previous method of only identifying abnormal points and using the trajectory formed by connecting abnormal points as the identification of abnormal trajectories, this method achieves a higher abnormal trajectory recognition rate and more refined analysis of abnormal trajectories.
[0072] like Figure 3 As shown, in some optional embodiments, step 204 includes: step 2042, inputting the route locations into a pre-trained word segmentation model to obtain multiple nouns corresponding to the route locations; step 2044, determining the abnormal probability of the nouns based on all abnormal location nouns contained in the first set; step 2046, determining the normal probability of the nouns based on all normal location nouns contained in the second set; step 2048, determining the abnormal location probability and normal location probability of the route location based on the abnormal probability and normal probability of the nouns; step 20410, determining the route location as an abnormal location when the abnormal location probability of the route location is greater than the normal location probability.
[0073] For example, the word segmentation model can be an N-gram model, where the processor inputs the names of the places along the route into a pre-trained N-gram model to obtain multiple nouns from the segmentation.
[0074] The first set can contain names of multiple abnormal locations pre-stored by the user, such as "cinema," "park," and "amusement park." The second set can contain names of multiple normal locations pre-stored by the user, such as "studio," "building," and "laboratory."
[0075] The probability of an anomaly in a noun can be expressed by the following formula:
[0076]
[0077] Among them, P j1 Let L(j|D1) represent the probability of an anomaly of the j-th term at the current location, D1 represent the first set, and L(j|D1) represent the number of anomaly locations in the first set that contain the j-th term. This represents the total number of nouns representing outlier locations in the first set.
[0078] The normal probability of a noun can be expressed by the following formula:
[0079]
[0080] Among them, P j2 Let L(j|D2) represent the normal probability of the j-th term at the current location, D1 represent the second set, and L(j|D2) represent the number of normal locations in the second set that contain the j-th term. This represents the total number of nouns representing normal locations in the second set.
[0081] Furthermore, the probability of an outlier location at a transit point can be expressed by the following formula:
[0082] P1 = P 11 *P 21 ...*P j1 ...*P m1
[0083] Where P1 represents the probability of an abnormal location at the current route location, and m represents the total number of nouns obtained after word segmentation processing of the current route location.
[0084] The probability of a normal location being a transit point can be expressed by the following formula:
[0085] P2 = P 12 *P 22 ...*P j2 ...*P m2
[0086] Where P2 represents the probability of an abnormal location at the current route location, and m represents the total number of nouns obtained after word segmentation processing of the current route location.
[0087] When P1 is greater than P2, the route location is determined to be an abnormal location; when P1 is less than or equal to P2, the route location is determined to be a normal location.
[0088] As an example, the name of the transit location is "Paradise Film Studio". The user-preset first set contains twenty abnormal location terms such as "film", "paradise", "cinema", and "comedy studio", while the second set contains twenty normal location terms such as "studio", "film studio", "film base", and "Paradise Film Studio". When this transit location is input into the word segmentation model, it yields three terms: "paradise", "film", and "studio". For the term "paradise", its normal probability can be calculated as follows: The probability of an anomaly is Regarding the term "film and television", its normal probability can be calculated as follows: The probability of an anomaly is Regarding the term "studio," its normal probability can be calculated as follows: The probability of an anomaly is The normal probability of the current route location can be further calculated as follows: The probability of an anomaly is Therefore, this route location was determined to be a normal location.
[0089] like Figure 4 As shown, in some optional embodiments, step 206 includes:
[0090] Step 2062: Obtain all intersections passed through in the trajectory segment; Step 2064: For each intersection passed through, calculate the intersection transfer probability of the current intersection from the previous intersection; Step 2066: Determine the transfer probability of the trajectory segment based on the intersection transfer probability of each intersection passed through; Step 2068: When the transfer probability is less than a preset probability threshold, determine the trajectory segment as an abnormal trajectory segment.
[0091] As an example, each trajectory to be identified is based on actual roads. Business personnel pass through multiple intersections offline, forming the trajectory to be identified. Each trajectory segment also includes multiple intersections traversed by the business personnel. The intersection transition probability of each traversed intersection can be expressed by the following formula:
[0092]
[0093] Among them, inter i Indicates a change of intersection, inter i-1 Indicates entering the intersection, P(inter) i inter i-1 The ) represents the intersection switching probability at the fork in the road where the switching intersection and the entry intersection are located. Indicates the point of entry into the intersection.i-1 The number of trajectories leading to the transfer intersection interi; Indicates the point of entry into the intersection. i-1 The number of trajectories leading to any intersection.
[0094] Furthermore, the intersection transition probability of a trajectory segment can be expressed by the following formula:
[0095] P(inter1, inter2...inter) n )=P(inter1)P(inter2|inter1)...P(inter n inter n-1 )
[0096] Where P(inter1, inter2...inter) n ) represents the intersection transition probability of the current trajectory segment, and n represents the total number of entry and exit intersections traversed by the current trajectory segment.
[0097] When P(inter1, inter2...inter) n If the probability is less than or equal to a preset probability threshold, the trajectory segment is determined to be an abnormal trajectory segment.
[0098] In this embodiment, the server calculates the intersection transition probability of each fork in the road for each trajectory segment, multiplies the intersection transition probabilities of each fork in the road to obtain the intersection transition probability of the trajectory segment, and determines the trajectory segment as an abnormal trajectory segment when the intersection transition probability of the trajectory segment is less than or equal to a preset probability threshold. Through this setting, the process of identifying abnormal trajectories can be simplified to the analysis of intersection transition probabilities, reducing the complexity of abnormal trajectory analysis.
[0099] like Figure 5 As shown, in some optional embodiments, step 208 includes: step 2082, calculating a first ratio of the total number of abnormal locations to the total number of transit locations; step 2084, calculating a second ratio of the total length of abnormal trajectory segments to the total length of the trajectory to be identified; step 2086, determining the trajectory to be identified as an abnormal trajectory when the first ratio is greater than or equal to a first threshold, and / or when the second ratio is greater than or equal to a second threshold.
[0100] After the server has traversed and identified all the waypoints in the trajectory to be identified, it divides the total number of abnormal locations by the total number of waypoints to obtain the percentage of abnormal locations. When the percentage of abnormal locations exceeds the first threshold preset by the user, the server can determine that the object making the specific movement has deviated from its trajectory. After the server has traversed and identified all the abnormal trajectory segments in the trajectory to be identified, it divides the total length of the abnormal trajectory segments by the total length of the trajectory to be identified to obtain the percentage of abnormal trajectory segments. When the percentage of abnormal trajectory segments exceeds the second threshold preset by the user, the server can also determine that the object making the specific movement has deviated from its trajectory.
[0101] In this embodiment, the server determines whether the trajectory to be identified is an abnormal trajectory based on whether the percentage of the total number of abnormal locations contained in the trajectory to be identified exceeds a first threshold and whether the percentage of the length of the abnormal trajectory segment exceeds a second threshold. This setting makes the identification of abnormal trajectories more accurate.
[0102] In some optional embodiments, after step 208, the abnormal trajectory identification method further includes: receiving a determination instruction, determining the classification result of each path location according to the determination instruction; when the classification result indicates that the path location is an abnormal location, adding the path location to a first set, and when the classification result indicates that the path location is a normal location, adding the path location to a second set.
[0103] The determination command can be issued by the user through the human-computer interaction interface of the terminal. The determination command is used to determine the final classification result of each path location. It can be understood that the classification result of each path location output by the abnormal trajectory recognition method is first determined according to the determination command issued by the user, and then according to the judgment automatically made by the server. The determination command has a higher priority than the judgment automatically made by the server.
[0104] Furthermore, after a transit location is identified as an abnormal location, the server adds the name of the transit location to the first set. After a transit location is identified as a normal location, the server adds the name of the transit location to the second set. This provides a feedback function during the discrimination process, allowing the first and second sets to continuously expand the number of terms as the discrimination process progresses.
[0105] In some optional embodiments, the classification result for each transit point is determined according to the determination instruction, including:
[0106] When the determination instruction is the same as the discrimination result of each transit point, the discrimination result is used as the classification result of the current transit point;
[0107] When the determination instruction differs from the classification result of each transit point, the classification result of the current transit point is determined according to the determination instruction.
[0108] As an example, when the server determines that the route location is an abnormal location in step 204, but the determination instruction indicates that the route location is a normal location, the server will take priority to adopt the content of the determination instruction and determine the classification result of the route location as a normal location.
[0109] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0110] Based on the same inventive concept, this application also provides an abnormal trajectory recognition device for implementing the abnormal trajectory recognition method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the abnormal trajectory recognition device provided below can be found in the limitations of the abnormal trajectory recognition method described above, and will not be repeated here.
[0111] In one embodiment, such as Figure 6 As shown, an abnormal trajectory recognition device 600 is provided, including: a data acquisition module 602, a first discrimination module 604, a second discrimination module 606, and a determination module 608, wherein: the data acquisition module 602 is used to acquire the trajectory to be identified, which includes multiple path locations and trajectory segments between each pair of path locations; the first discrimination module 604 is used to perform word segmentation processing on the path locations and to identify abnormal locations based on the nouns obtained after word segmentation processing; the second discrimination module 606 is used to calculate the intersection transition probability of the trajectory segment passing through the intersection and to identify abnormal trajectory segments based on the intersection transition probability; the determination module 608 is used to determine the trajectory to be identified as an abnormal trajectory when the abnormal location and abnormal trajectory meet preset conditions.
[0112] like Figure 7As shown, in some optional embodiments, the first discrimination module 604 includes: a word segmentation unit 6042, used to input the route location into a pre-trained word segmentation model to obtain multiple nouns corresponding to the route location; a first determination unit 6044, used to determine the abnormal probability of a noun based on all abnormal location nouns contained in the first set; a second determination unit 6046, used to determine the normal probability of a noun based on all normal location nouns contained in the second set; a third determination unit 6048, used to determine the abnormal location probability and normal location probability of the route location based on the abnormal probability and normal probability of the noun; and a fourth determination unit 60410, used to determine the route location as an abnormal location when the abnormal location probability of the route location is greater than the normal location probability.
[0113] like Figure 8 As shown, in some optional embodiments, the second discrimination module 606 includes: an acquisition unit 6062, used to acquire all the intersections included in the trajectory segment; a first calculation unit 6064, used to calculate the intersection transition probability of the current intersection from the previous intersection for each intersection; a fifth determination unit 6066, used to determine the transition probability of the trajectory segment based on the intersection transition probability of each intersection; and a sixth determination unit 6068, used to determine the trajectory segment as an abnormal trajectory segment when the transition probability is less than a preset probability threshold.
[0114] like Figure 9 As shown, in some optional embodiments, the determining module 608 includes: a second calculation unit 6082, used to calculate a first ratio of the total number of abnormal locations to the total number of transit locations; a third calculation unit 6084, used to calculate a second ratio of the total length of abnormal trajectory segments to the total length of the trajectory to be identified; and a seventh determining unit 6086, used to determine the trajectory to be identified as an abnormal trajectory when the first ratio is greater than or equal to a first threshold, and / or when the second ratio is greater than or equal to a second threshold.
[0115] In some optional embodiments, the abnormal trajectory identification device 600 is further configured to: receive a determination instruction, determine the classification result of each path location according to the determination instruction; when the classification result indicates that the path location is an abnormal location, add the path location to a first set, and when the classification result indicates that the path location is a normal location, add the path location to a second set.
[0116] In some optional embodiments, the abnormal trajectory recognition device 600 is further configured to: when the determination instruction is the same as the discrimination result of each waypoint, use the discrimination result as the classification result of the current waypoint; when the determination instruction is different from the discrimination result of each waypoint, determine the classification result of the current waypoint according to the determination instruction.
[0117] Each module in the aforementioned abnormal trajectory recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0118] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an enterprise data processing method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0119] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0120] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0121] Collect the trajectory to be identified, which includes multiple transit points and trajectory segments between each pair of transit points;
[0122] The locations along the route are segmented into words, and abnormal locations are identified based on the nouns obtained after word segmentation.
[0123] Calculate the intersection transition probability of the trajectory segment at the intersection, and identify abnormal trajectory segments based on the intersection transition probability;
[0124] When an abnormal location and an abnormal trajectory meet preset conditions, the trajectory to be identified is determined to be an abnormal trajectory.
[0125] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0126] Input the locations along the route into a pre-trained word segmentation model to obtain multiple nouns corresponding to the locations along the route;
[0127] Determine the probability of anomalies of the nouns based on all the anomalous location nouns contained in the first set;
[0128] Determine the normal probability of the nouns based on all normal place nouns contained in the second set;
[0129] Based on the abnormal and normal probabilities of the nouns, determine the abnormal and normal probabilities of the locations along the route;
[0130] When the probability of an abnormal location is greater than the probability of a normal location, the location is identified as an abnormal location.
[0131] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0132] Obtain all intersections along the route included in the trajectory segment;
[0133] For each intersection, calculate the intersection transition probability of moving from the previous intersection to the current intersection;
[0134] The transition probability of a trajectory segment is determined based on the intersection transition probability of each intersection encountered.
[0135] When the transition probability is less than a preset probability threshold, the trajectory segment is determined to be an abnormal trajectory segment.
[0136] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0137] Calculate the first ratio of the total number of abnormal locations to the total number of transit locations;
[0138] Calculate the second ratio of the total length of the abnormal trajectory segments to the total length of the trajectory to be identified;
[0139] When the first ratio is greater than or equal to the first threshold, and / or the second ratio is greater than or equal to the second threshold, the trajectory to be identified is determined to be an abnormal trajectory.
[0140] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0141] Receive the confirmation instruction and determine the classification result for each route location based on the confirmation instruction;
[0142] When the classification result indicates that the route location is an abnormal location, the route location is added to the first set; when the classification result indicates that the route location is a normal location, the route location is added to the second set.
[0143] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0144] When the determination instruction is the same as the discrimination result of each transit point, the discrimination result is used as the classification result of the current transit point;
[0145] When the determination instruction differs from the classification result of each transit point, the classification result of the current transit point is determined according to the determination instruction.
[0146] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0147] Collect the trajectory to be identified, which includes multiple transit points and trajectory segments between each pair of transit points;
[0148] The locations along the route are segmented into words, and abnormal locations are identified based on the nouns obtained after word segmentation.
[0149] Calculate the intersection transition probability of the trajectory segment at the intersection, and identify abnormal trajectory segments based on the intersection transition probability;
[0150] When an abnormal location and an abnormal trajectory meet preset conditions, the trajectory to be identified is determined to be an abnormal trajectory.
[0151] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0152] Input the locations along the route into a pre-trained word segmentation model to obtain multiple nouns corresponding to the locations along the route;
[0153] Determine the probability of anomalies of the nouns based on all the anomalous location nouns contained in the first set;
[0154] Determine the normal probability of the nouns based on all normal place nouns contained in the second set;
[0155] Based on the abnormal and normal probabilities of the nouns, determine the abnormal and normal probabilities of the locations along the route;
[0156] When the probability of an abnormal location is greater than the probability of a normal location, the location is identified as an abnormal location.
[0157] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0158] Obtain all intersections along the route included in the trajectory segment;
[0159] For each intersection, calculate the intersection transition probability of moving from the previous intersection to the current intersection;
[0160] The transition probability of a trajectory segment is determined based on the intersection transition probability of each intersection encountered.
[0161] When the transition probability is less than a preset probability threshold, the trajectory segment is determined to be an abnormal trajectory segment.
[0162] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0163] Calculate the first ratio of the total number of abnormal locations to the total number of transit locations;
[0164] Calculate the second ratio of the total length of the abnormal trajectory segments to the total length of the trajectory to be identified;
[0165] When the first ratio is greater than or equal to the first threshold, and / or the second ratio is greater than or equal to the second threshold, the trajectory to be identified is determined to be an abnormal trajectory.
[0166] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0167] Receive the confirmation instruction and determine the classification result for each route location based on the confirmation instruction;
[0168] When the classification result indicates that the route location is an abnormal location, the route location is added to the first set; when the classification result indicates that the route location is a normal location, the route location is added to the second set.
[0169] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0170] When the determination instruction is the same as the discrimination result of each transit point, the discrimination result is used as the classification result of the current transit point;
[0171] When the determination instruction differs from the classification result of each transit point, the classification result of the current transit point is determined according to the determination instruction.
[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0174] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An abnormal trajectory recognition method, characterized in that, include: Collect the trajectory to be identified, which includes multiple transit points and trajectory segments between each pair of transit points; the transit points are used to characterize locations where the object stays for more than a preset time. Input the locations along the route into a pre-trained word segmentation model to obtain multiple nouns corresponding to the locations along the route; Based on all the anomalous location names contained in the first set, determine the anomalous probability of the name; Determine the normal probability of the noun based on all normal place names contained in the second set; Based on the abnormal and normal probabilities of the terms, determine the abnormal location probability and normal location probability of the route locations; When the probability of an abnormal location is greater than the probability of a normal location, the route location is determined to be an abnormal location. Obtain all intersections along the route included in the trajectory segment; For each intersection, calculate the intersection transition probability of moving from the previous intersection to the current intersection; The transition probability of the trajectory segment is determined based on the intersection transition probability of each of the said intersections. When the transition probability is less than a preset probability threshold, the trajectory segment is determined to be an abnormal trajectory segment; When the abnormal location and the abnormal trajectory segment meet preset conditions, the trajectory to be identified is determined to be an abnormal trajectory.
2. The method according to claim 1, characterized in that, The step of determining the trajectory to be identified as an abnormal trajectory when the abnormal location and the abnormal trajectory segment meet preset conditions includes: Calculate a first ratio of the total number of abnormal locations to the total number of locations along the route; Calculate a second ratio between the total length of the abnormal trajectory fragments and the total length of the trajectory to be identified; When the first ratio is greater than or equal to the first threshold, and the second ratio is greater than or equal to the second threshold, the trajectory to be identified is determined to be an abnormal trajectory.
3. The method according to claim 2, characterized in that, When the abnormal location and the abnormal trajectory segment meet preset conditions, after determining that the trajectory to be identified is an abnormal trajectory, the process includes: Receive a confirmation instruction, and determine the classification result for each of the route locations based on the confirmation instruction; When the classification result indicates that the route location is an abnormal location, the route location is added to the first set; when the classification result indicates that the route location is a normal location, the route location is added to the second set.
4. The method according to claim 3, characterized in that, The step of determining the classification result for each of the route locations according to the determination instruction includes: When the determination instruction is the same as the discrimination result of each of the route locations, the discrimination result is taken as the classification result of the current route location; When the determination instruction differs from the discrimination result of each of the route locations, the classification result of the current route location is determined according to the determination instruction.
5. An abnormal trajectory recognition device, characterized in that, include: The acquisition module is used to acquire the trajectory to be identified, which includes multiple path locations and trajectory segments between each pair of path locations; the path locations are used to characterize locations where the object stays for more than a preset time. The first discrimination module is used to input the route location into a pre-trained word segmentation model to obtain multiple nouns corresponding to the route location; determine the abnormal probability of the noun based on all abnormal location nouns contained in the first set; determine the normal probability of the noun based on all normal location nouns contained in the second set; determine the abnormal location probability and normal location probability of the route location based on the abnormal probability and normal probability of the noun; when the abnormal location probability of the route location is greater than the normal location probability, the route location is determined to be an abnormal location. The second discrimination module is used to calculate the intersection transition probability of the trajectory segment passing through the intersection, and to discriminate abnormal trajectory segments based on the intersection transition probability; The determination module is used to determine that the trajectory to be identified is an abnormal trajectory when the abnormal location and the abnormal trajectory segment meet preset conditions; The second discrimination module includes: The acquisition unit is used to acquire all the intersections passed through in the trajectory segment; The first calculation unit is used to calculate the intersection transition probability of the previous intersection to the current intersection for each intersection. The fifth determining unit is used to determine the transition probability of the trajectory segment based on the intersection transition probability of each of the said intersections. The sixth determining unit is used to determine that the trajectory segment is an abnormal trajectory segment when the transition probability is less than a preset probability threshold.
6. The apparatus according to claim 5, characterized in that, The determining module includes: The second calculation unit is used to calculate a first ratio between the total number of abnormal locations and the total number of the route locations; The third calculation unit is used to calculate a second ratio between the total length of the abnormal trajectory segment and the total length of the trajectory to be identified; The seventh determining unit is used to determine that the trajectory to be identified is an abnormal trajectory when the first ratio is greater than or equal to the first threshold and the second ratio is greater than or equal to the second threshold.
7. The apparatus according to claim 6, characterized in that, The abnormal trajectory identification device is further configured to receive a determination instruction, determine the classification result of each of the route locations according to the determination instruction; when the classification result indicates that the route location is an abnormal location, add the route location to the first set; when the classification result indicates that the route location is a normal location, add the route location to the second set.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the abnormal trajectory recognition method according to any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the abnormal trajectory recognition method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the abnormal trajectory recognition method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Time-space isolated point-based vehicle abnormal track detection method
CN108345666A
Markov model-based uncertainty road network vehicle trajectory prediction method
CN108346284A