Trajectory recognition method and related devices and equipment

By determining the initial corner points in trajectory recognition and obtaining the same number of recognition points as the trajectory template, the trajectory type is directly determined, which solves the time-consuming and labor-intensive problem of training samples in the prior art, and achieves efficient and accurate trajectory recognition.

CN113469220BActive Publication Date: 2025-07-08GUANGZHOU HUYA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110642505.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-09
Publication Date
2025-07-08
Estimated Expiration
2041-06-09

AI Technical Summary

Technical Problem

Existing trajectory recognition methods require re-acquisition of large numbers of samples for training, resulting in inefficiency and difficulty in having practical value.

Method used

By obtaining multiple trajectory points of the trajectory to be identified, the initial corner points are determined, and the same number of identification points as the reference corner points of the trajectory template are obtained based on the initial corner points, and the trajectory type is determined using these points, the training steps for neural networks or classifiers are avoided.

Benefits of technology

It improves the accuracy and speed of trajectory recognition, reduces training consumption, and improves recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113469220B_ABST
    Figure CN113469220B_ABST
Patent Text Reader

Abstract

The present application discloses a trajectory recognition method and related devices and equipment. Among them, the trajectory recognition method includes: obtaining a plurality of trajectory points of the trajectory to be recognized; determining a plurality of initial corner points of the trajectory to be recognized from the plurality of trajectory points; obtaining a plurality of recognition points with the same number as the reference corner points of the trajectory template based on the initial corner points; and determining the type of the trajectory to be recognized by using the plurality of recognition points and the reference corner points. The above solution can improve the accuracy and efficiency of trajectory recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of trajectory recognition, in particular to a trajectory recognition method and related devices and equipment. Background Art

[0002] With the rapid development of science and technology, trajectory recognition is applied more and more widely in all walks of life. For example, handwriting input methods, the game of "you draw and I guess", and preschool literacy education all rely to a certain extent on trajectory recognition technology.

[0003] Currently, common trajectory recognition methods often first use statistical and machine learning principles to train a large number of samples to obtain a neural network or a classifier, and then use the neural network or the classifier to classify unknown samples.

[0004] However, in practice, if the types of trajectories to be recognized are increased, a large number of samples need to be re-obtained to train the neural network or the classifier again. This method is time-consuming and laborious and is difficult to have practical value. Summary of the Invention

[0005] This application provides a trajectory recognition method and related devices and equipment to solve the problem of low trajectory recognition efficiency in the prior art.

[0006] This application provides a trajectory recognition method, including: obtaining a plurality of trajectory points of a trajectory to be recognized; determining a plurality of initial corner points of the trajectory to be recognized from the plurality of trajectory points; obtaining a plurality of recognition points with the same number as the reference corner points of a trajectory template based on the initial corner points; and determining the type of the trajectory to be recognized by using the plurality of recognition points and the reference corner points.

[0007] Among them, the step of obtaining a plurality of recognition points with the same number as the reference corner points of a trajectory template based on the initial corner points includes: in response to the number of initial corner points being less than the number of reference corner points, using the multiple of the reference corner points relative to the number of initial corner points to divide the line segment between every two adjacent initial corner points of the trajectory to be recognized, to obtain at least one dividing point; and combining the dividing points and the initial corner points into recognition points.

[0008] Among them, the step of obtaining a plurality of recognition points with the same number as the reference corner points of a trajectory template based on the initial corner points further includes: in response to the multiple of the reference corner points relative to the number of initial corner points being a non-integer multiple, using the multiple and the remainder of the reference corner points relative to the number of initial corner points, in the connection order of each initial corner point, to increase the number of equal division times for the line segment between the two adjacent initial corner points of the first remainder number of the trajectory to be recognized in turn, so as to divide the line segment between every two adjacent initial corner points of the trajectory to be recognized, to obtain at least one dividing point; and combining the dividing points and the initial corner points into recognition points.

[0009] Among them, the step of determining multiple initial corner points of the trajectory to be recognized from multiple trajectory points includes: connecting each trajectory point in sequence according to the trajectory order of the trajectory to be recognized to obtain multiple trajectory vectors; comparing the angle between each two adjacent trajectory vectors with a preset angle, and determining the trajectory points between two adjacent trajectory vectors with all angles greater than the preset angle as initial corner points.

[0010] Among them, the step of obtaining multiple recognition points with the same number as the reference corner points of the trajectory template based on the initial corner points includes: in response to the number of initial corner points being greater than the number of reference corner points, increasing the angle of the preset angle so that the number of initial corner points is less than the number of reference corner points.

[0011] Among them, the step of determining the type of the trajectory to be recognized by using multiple recognition points and reference corner points includes: comparing the coordinates of the multiple recognition points with the coordinates of the reference corner points to determine the type of the trajectory to be recognized.

[0012] Among them, the step of comparing the coordinate information of multiple recognition points with the coordinate information of reference corner points to determine the type of the trajectory to be recognized includes: in response to the number of trajectory templates being greater than 1, comparing each recognition point with the corresponding reference corner point on the trajectory template in sequence according to the order of the trajectories, so as to determine the type of the trajectory to be recognized.

[0013] Among them, in response to the number of trajectory templates being greater than 1, the step of comparing the recognition points with the reference corner points of each trajectory template in sequence to determine the type of the trajectory to be recognized includes: comparing each of the multiple recognition points with the reference corner points of each trajectory template in sequence to obtain the similarity between the trajectory to be recognized and each trajectory template; determining the type of the trajectory template with the highest similarity as the type of the trajectory to be recognized.

[0014] Among them, the step of comparing each of the multiple recognition points with the reference corner points of each trajectory template in sequence to obtain the similarity between the trajectory to be recognized and each trajectory template includes: calculating the similarity R between the trajectory to be recognized and each trajectory template through the following formula:

[0015]

[0016] T1*T2=T1 1.x *T2 1.x +T1 1.y *T2 1.y ...T1 D.x *T2 D.x +T1 D.y *T2 D.y (2)

[0017] Among them, T1 is the trajectory to be recognized, T2 is the trajectory template, and D is the number of recognition points or reference corner points.

[0018] Among them, before the step of determining the type of the trajectory to be recognized by using a plurality of recognition points and reference corner points, it includes: calculating the center point between the plurality of recognition points, and taking the center point as the origin to map the coordinates of the plurality of recognition points into a preset range to normalize the plurality of recognition points.

[0019] The present application also provides a trajectory recognition device, including: an acquisition module for acquiring a plurality of trajectory points of the trajectory to be recognized; a corner module for determining a plurality of initial corner points of the trajectory to be recognized from the plurality of trajectory points; an identification module for obtaining a plurality of recognition points having the same number as the reference corner points of the trajectory template based on the initial corner points; and a determination module for determining the type of the trajectory to be recognized by using the plurality of recognition points and the reference corner points.

[0020] The present application also provides an electronic device, including a memory and a processor coupled to each other, and the processor is configured to execute program instructions stored in the memory to implement the trajectory recognition method of any one of the above.

[0021] The present application also provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the trajectory recognition method of any one of the above is implemented.

[0022] In the above solution, the present application first acquires a plurality of trajectory points of the trajectory to be recognized, and then determines a plurality of initial corner points of the trajectory to be recognized from the plurality of trajectory points. Then, a plurality of recognition points having the same number as the reference corner points of the trajectory template are obtained based on the initial corner points. Finally, the type of the trajectory to be recognized is determined by using the plurality of recognition points and the reference corner points, which can directly determine the type of the trajectory to be recognized through the trajectory template, improve the accuracy of trajectory recognition, and at the same time avoid the step of training a classifier based on training samples for trajectory recognition, reduce the training consumption, and improve the speed and efficiency of trajectory recognition. Description of the Drawings

[0023] Figure 1 is a schematic flowchart of an embodiment of the trajectory recognition method of the present application;

[0024] Figure 2 is a schematic flowchart of another embodiment of the trajectory recognition method of the present application;

[0025] Figure 3 is a schematic diagram of an embodiment of equidistant division of connections;

[0026] Figure 4 is a schematic framework diagram of an embodiment of the trajectory recognition device of the present application;

[0027] Figure 5 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0028] Figure 6 It is a schematic diagram of the framework of an embodiment of the computer-readable storage medium of the present application. Detailed implementation manners

[0029] Next, in conjunction with the accompanying drawings of the specification, the solutions of the embodiments of the present application will be described in detail.

[0030] In the following description, specific details such as specific system structures, interfaces, and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the present application.

[0031] In this article, the terms "system" and "network" are often used interchangeably. The term "and / or" in this article only describes the association relationship of associated objects, and there can be three relationships. For example, A and / or B can: exist alone A, exist simultaneously A and B, and exist alone B these three situations. In addition, the character " / " in this article generally has an "or" relationship between the associated objects before and after. In addition, "multiple" in this article means two or more than two.

[0032] Please refer to Figure 1 , Figure 1 It is a schematic flowchart of an embodiment of the trajectory recognition method of the present application.

[0033] Specifically, it may include the following steps:

[0034] Step S11: Obtain multiple trajectory points of the trajectory to be recognized.

[0035] Obtain multiple trajectory points of the trajectory to be recognized. Among them, the trajectory to be recognized may include human interaction trajectories such as the movement trajectory of a gesture and the movement trajectory of limbs, and the specific target object of the trajectory to be recognized is not limited here. By recognizing the human interaction trajectory to be recognized, the trajectory type is obtained, so as to determine the trajectory meaning and apply it to various trajectory recognition application scenarios, such as: handwriting input method, you draw and I guess game, etc.

[0036] Among them, the specific method for obtaining the trajectory to be recognized can be obtained through devices such as sensors, cameras, GPS positioning systems or Beidou positioning systems. The specific acquisition method can be determined based on the type of the target object of the trajectory to be recognized, and is not limited here.

[0037] Step S12: Determine multiple initial corner points of the trajectory to be recognized from the multiple trajectory points.

[0038] Determine multiple initial corner points on the trajectory to be recognized from multiple trajectory points of the trajectory to be recognized. Herein, a corner point refers to a bending point on the trajectory to be recognized. By using the initial corner points of the trajectory to be recognized for subsequent recognition and judgment in this embodiment, the trajectory can be smoothed to a certain extent, the characteristics of the trajectory can be retained, the accuracy of subsequent trajectory recognition can be improved, the computational amount of trajectory recognition can be reduced, and the efficiency of trajectory recognition can be improved.

[0039] In a specific application scenario, the method for determining multiple initial corner points on the trajectory to be recognized may include: connecting each two adjacent trajectory points on the trajectory to be recognized to obtain multiple connected trajectory vectors, and determining whether the angle between each two adjacent trajectory vectors exceeds a preset angle. If it exceeds, the corner point between the two adjacent trajectory vectors is determined as an initial corner point. In another specific application scenario, the method for determining multiple initial corner points on the trajectory to be recognized may further include: connecting each two adjacent trajectory points on the trajectory to be recognized to obtain multiple connected trajectory vectors, and respectively determining whether the trajectory gap between each two adjacent trajectory vectors and the trend line of the trajectory to be recognized exceeds a preset gap. If it exceeds, the corner point between the two adjacent trajectory vectors is determined as an initial corner point. Herein, the method for determining multiple initial corner points on the trajectory to be recognized in this embodiment is not limited herein.

[0040] Step S13: Obtain multiple recognition points based on the initial corner points, and the number of the recognition points is the same as that of the reference corner points of the trajectory template.

[0041] Since the number of initial corner points of each trajectory to be recognized is different, and it needs to be unified during recognition. Therefore, in this step, multiple recognition points with the same number as the reference corner points of the trajectory template can be obtained based on the initial corner points, so that the number of recognition points of the trajectory to be recognized is the same as that of the reference corner points of the trajectory template.

[0042] The manner of obtaining multiple recognition points may include increasing or decreasing the number of initial corner points by adjusting the manner of determining the initial corner points in step S12, adding recognition points based on the characteristics between the initial corner points, or adding recognition points according to a preset rule, etc. The specific manner of obtaining multiple recognition points is not limited herein.

[0043] Step S14: Determine the type of the trajectory to be recognized by using the multiple recognition points and the reference corner points.

[0044] Determine the type of the trajectory to be recognized by using the multiple recognition points of the trajectory to be recognized and the multiple reference corner points of the trajectory template. Specifically, the similarity between the multiple recognition points of the trajectory to be recognized and the multiple reference corner points of the trajectory template can be determined to determine the type of the trajectory to be recognized.

[0045] In a specific application scenario, the relative positions between multiple recognition points of the trajectory to be recognized can be compared with the relative positions between multiple reference corner points of the trajectory template. When the similarity between the relative positions of multiple recognition points and the relative positions of multiple reference corner points meets the preset requirements, the type of the trajectory template can be determined as the type of the trajectory to be recognized. Among them, the preset requirements can be set based on the actual situation and are not limited here.

[0046] In another specific application scenario, the coordinates of multiple recognition points of the trajectory to be recognized and multiple reference corner points of the trajectory template can also be obtained and compared one by one. When the similarity between multiple recognition points and multiple reference corner points meets the preset requirements, the type of the trajectory template can be determined as the type of the trajectory to be recognized. Among them, the method for determining the type of the trajectory to be recognized by using multiple recognition points and reference corner points in this embodiment is not limited here.

[0047] Through the above method, the trajectory recognition method of this embodiment first obtains multiple trajectory points of the trajectory to be recognized, and then determines multiple initial corner points of the trajectory to be recognized from the multiple trajectory points. Then, based on the initial corner points, multiple recognition points with the same number as the reference corner points of the trajectory template are obtained. Finally, the type of the trajectory to be recognized is determined by using the multiple recognition points and the reference corner points, which can directly determine the type of the trajectory to be recognized through the trajectory template, improve the accuracy of trajectory recognition, and at the same time avoid the steps of training a neural network or a classifier based on training samples for trajectory recognition, reduce the training consumption, and improve the speed and efficiency of trajectory recognition.

[0048] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of another embodiment of the trajectory recognition method of this application. Specifically, it can include the following steps:

[0049] Step S21: Obtain multiple trajectory points of the trajectory to be recognized.

[0050] After obtaining multiple trajectory points of the trajectory to be recognized, in a specific application scenario, after obtaining the trajectory to be recognized of the target object, each trajectory point and its coordinates can be obtained by performing key point recognition on the trajectory to be recognized. Among them, the key point recognition can be performed by means of a trained deep neural network or manual recognition.

[0051] In this embodiment, through (T1, T2,..., T N) Represent each trajectory point and its coordinates of the trajectory to be recognized according to the trajectory order of the trajectory to be recognized, where N is the number of trajectory points. Among them, the trajectory to be recognized in this embodiment is a trajectory including at least 3 trajectory points. When the number of trajectory points of the trajectory to be recognized is 1 or 2, the comparison and judgment in step S25 can be directly performed.

[0052] Step S22: Connect each trajectory point in sequence according to the trajectory order of the trajectory to be recognized to obtain multiple trajectory vectors. Compare the angle between each two adjacent trajectory vectors with a preset angle, and determine the trajectory points between the two adjacent trajectory vectors with all angles greater than the preset angle as initial corner points.

[0053] Connect each trajectory point in sequence according to the trajectory order of the trajectory to be recognized to obtain multiple trajectory vectors. Compare the angle between each two adjacent trajectory vectors with a preset angle θ, and determine the trajectory points between the two adjacent trajectory vectors with all angles greater than the preset angle θ as initial corner points. Among them, the preset angle θ can be 0 degrees, 5 degrees, etc., and can be specifically set based on the number requirement of recognition points or actual situations.

[0054] Among them, the method for comparing the angle between trajectory vectors with the preset angle θ is to translate one of the two trajectory vectors so that the starting points of the two trajectory vectors coincide, and then determine whether the angle between the two trajectory vectors after the coincident starting points exceeds the preset angle. If it exceeds, determine the trajectory points between the two trajectory vectors as initial corner points.

[0055] In a specific application scenario, when two adjacent trajectory vectors T 2-3 and T 3-4 have trajectory vectors of (1.1)-(2.2) and (2.2)-(3.1) respectively, at this time, the angle between the two adjacent trajectory vectors T 2-3 and T 3-4 after the starting points coincide is 90 degrees, which is greater than the preset angle of 0 degrees. Therefore, determine the trajectory point T3(2.2) between the two adjacent trajectory vectors as the initial corner point.

[0056] After determining multiple initial corner points of the trajectory to be recognized by comparing the angle between every two adjacent trajectory vectors with a preset angle θ, the multiple initial corner points can be connected in sequence again to obtain multiple initial corner point vectors. Then, compare the angle between every two adjacent initial corner point vectors with the preset angle θ again, and retain the initial corner points between two adjacent initial corner point vectors whose angles are greater than the preset angle θ, and eliminate the initial corner points between two adjacent initial corner point vectors whose angles are less than the preset angle θ. Among them, the preset angle θ in this comparison is the same as the preset angle θ in the trajectory vector comparison, so as to perform repeated operations on the initial corner points to remove the influence of burr protrusions on the trajectory to be recognized and only retain the real initial corner points.

[0057] After obtaining the initial corner points in this step, the coordinates of the initial corner points are determined based on the coordinates of each trajectory point.

[0058] Step S23: Obtain multiple recognition points equal in number to the reference corner points of the trajectory template based on the initial corner points.

[0059] Obtain multiple recognition points equal in number to the reference corner points of the trajectory template based on the initial corner points. Specifically, points can be added on the basis of the initial corner points according to the number of reference corner points of the trajectory template, so that the sum of the number of the added points and the initial corner points is the same as the number of reference corner points of the trajectory template.

[0060] In a specific application scenario, after obtaining multiple initial corner points of the trajectory to be recognized, connect the multiple initial corner points in sequence according to the order of the trajectory to be recognized, and judge whether the number of multiple preset corner points on the trajectory to be recognized is less than the number of reference corner points. If it is less than or equal to the number of reference corner points, divide the connection between each adjacent initial corner point equally to obtain multiple recognition points of the trajectory to be recognized.

[0061] If it is greater than the preset number, modify the rule for determining the initial corner points in step S22 to reduce the number of initial corner points. For example, adjust the preset angle θ so that the number of initial corner points is less than or equal to the number of reference corner points. Among them, the number of reference corner points can be 10, 20, 50, etc., which is specifically adjusted and set based on the preset number, and the preset number is not limited here.

[0062] Among them, the reference corner points of the trajectory template are obtained in the same way as the multiple recognition points of the trajectory to be recognized, that is, by obtaining multiple trajectory points of the trajectory template, determining multiple initial corner points from them, and then adjusting the number of initial corner points to be the same as the preset number and then performing normalization processing. The specific acquisition process can refer to the acquisition process of the multiple recognition points of the trajectory to be recognized, which will not be elaborated here. Among them, once the trajectory to be recognized and each trajectory template are recognized, the specific number of the preset number is fixed and cannot be modified, so as to ensure that the number of recognition points finally obtained for the trajectory to be recognized and the trajectory template is the same, both being the preset number, for easy comparison and recognition.

[0063] In a specific application scenario, in response to the number of initial corner points being less than the number of reference corner points, the connection line between every two adjacent initial corner points of the trajectory to be recognized is evenly divided by using the multiple of the reference corner points relative to the number of initial corner points to obtain at least one evenly divided point; the evenly divided points are combined with the initial corner points to form recognition points, so as to obtain recognition points with the same number as the reference corner points, that is, the preset number of recognition points.

[0064] Please refer to Figure 3 , Figure 3 which is a schematic diagram of an implementation method of connection line equal division.

[0065] In this implementation method, there are 4 initial corner points. Among them, the 4 initial corner points are connected in sequence to obtain a vector group a. If it is necessary to divide the 4 initial corner points 1 into 8 recognition points at this time, that is, the number of reference corner points is 8, then based on the multiple of 2 times of the reference corner points relative to the number of initial corner points 1, each vector in the vector group a is divided into 2 equal parts to obtain a vector group b. Based on the starting point and the end point of the divided vector, 4 new evenly divided points 2 are obtained. The 4 evenly divided points 2 in the vector group b are combined with the original 4 initial corner points 1 to form 8 recognition points.

[0066] In a specific application scenario, in response to the multiple of the reference corner points relative to the number of initial corner points being a non-integer multiple, the multiple and remainder of the reference corner points relative to the number of initial corner points are used. According to the connection order of each initial corner point, the equal division times of the connection line between the first remainder of the two adjacent initial corner points of the trajectory to be recognized are increased in sequence to evenly divide the connection line between every two adjacent initial corner points of the trajectory to be recognized to obtain at least one evenly divided point; the evenly divided points are combined with the initial corner points to form recognition points, so as to obtain recognition points with the same number as the reference corner points, that is, the preset number of recognition points.

[0067] In a specific application scenario, assume that the number of initial corner points is 4, and the number of reference corner points / preset number is 9. Then the multiple of the reference corner points relative to the initial corner points is 2, and the remainder is 1. According to the connection order of the initial corner points, the equal division times of the connection line between the previous two adjacent initial corner points are increased by one time, which is 3 times. The equal division times of the remaining other connection lines are 2 times. Then the equal division times of each connection line after equal division are 3 + 2 + 2 + 2 in sequence, and the newly added equal division points are 2 + 1 + 1 + 1. Combining the original 4 initial corner points, there are a total of 9 recognition points. If the number of initial corner points is 4 and the number of reference corner points / preset number is 10, then the multiple is 2 and the remainder is 2. The equal division times of the connection lines between the previous two adjacent initial corner points are increased by one time, both are 3 times. The equal division times of the remaining other connection lines are 2 times. Then the equal division times of each connection line after equal division are 3 + 3 + 2 + 2 in sequence, and the newly added equal division points are 2 + 2 + 1 + 1. Combining the original 4 initial corner points, there are a total of 10 recognition points.

[0068] Step S24: Calculate the center points among multiple recognition points, and use the center points as the origin to map the coordinates of multiple recognition points to a preset range to normalize multiple recognition points.

[0069] After determining the preset number of recognition points of the trajectory to be recognized, due to the dynamic uncertainty existing in the trajectory to be recognized itself, the coordinate ranges of the recognition points of each trajectory to be recognized are not the same. Therefore, in this step, the multiple recognition points of the trajectory to be recognized are normalized to facilitate subsequent coordinate comparison. Among them, the multiple reference corner points of each trajectory template have been pre-normalized in the same way before coordinate comparison.

[0070] Specifically, the normalization method includes: first calculate the center points of all recognition points of the trajectory to be recognized, and use the center points as the origin to map the coordinates of multiple recognition points to a preset range, so as to normalize multiple recognition points. Among them, the calculation method of the center point is: add the abscissas of all recognition points and then divide by the number of recognition points to obtain the abscissa of the center point; and add the ordinates of all recognition points and then divide by the number of recognition points to obtain the ordinate of the center point, so as to obtain the complete coordinates of the center point.

[0071] Among them, the preset range includes ranges such as [-1, 1], [-2, 2], [-10, 10], etc. By proportionally mapping the coordinates of all recognition points to the preset range, it is convenient for subsequent comparison calculations and reduces the amount of calculation. Among them, when the preset range is [-1, 1], it can further reduce the amount of comparison calculation and improve the comparison efficiency.

[0072] Step S25: Compare the coordinates of multiple recognition points with the coordinates of reference corner points to determine the type of the trajectory to be recognized.

[0073] The normalized coordinates of the plurality of identification points are compared with the normalized coordinates of the reference corner points to determine the type of the trajectory to be identified.

[0074] In response to the number of trajectory templates being greater than one, each identification point is sequentially compared with the corresponding reference corner point on the trajectory template in the order of the trajectory to determine the type of the trajectory to be identified. Specifically, multiple identification points may be sequentially compared with the reference corner point of each trajectory template to obtain the similarity between the trajectory to be identified and each trajectory template; the type of the trajectory template with the highest similarity is determined as the type of the trajectory to be identified.

[0075] The similarity R between the trajectory to be identified and each trajectory template is calculated by the following formula:

[0076]

[0077] T1*T2=T1 1.x *T2 1.x +T1 1.y *T2 1.y ...T1 D.x *T2 D.x +T1 D.y *T2 D.y (2)

[0078] Among them, T1 is the trajectory to be identified, T2 is the trajectory template, and D is the preset number, that is, the number of identification points or reference corner points. 1.x is the horizontal coordinate of the first identification point on the trajectory to be identified, T2 1.x is the horizontal coordinate of the first reference corner point on the trajectory template, T1 D.x is the horizontal coordinate of the Dth identification point on the trajectory to be identified, T2 D.x is the horizontal coordinate of the Dth reference corner point on the trajectory template, and the other coordinate symbols are similar.

[0079] The similarity R between the trajectory to be identified and each trajectory template is calculated in turn by the above two formulas, and the type of the trajectory template with the largest similarity R to the trajectory to be identified is determined as the type of the trajectory to be identified.

[0080] In a specific application scenario, when there are three types of trajectory templates, namely letter A, letter B and letter C, the above formula shows that the similarity R between the trajectory template of letter A and the trajectory to be identified is 2.1, the similarity R between the trajectory template of letter B and the trajectory to be identified is 1.4, and the similarity R between the trajectory template of letter C and the trajectory to be identified is 2.0, then the recognition result of the trajectory to be identified is letter A.

[0081] Among them, the template trajectory is a plurality of template trajectories pre-stored in the template library before the trajectory to be recognized is recognized. Among them, the template trajectory can include various types, such as text, numbers, patterns, letters, etc. The template trajectories stored in the template library are the trajectory types that can be recognized. The template trajectories stored in the template library are all obtained through the same processing method as the trajectory to be recognized, that is, after passing through steps S21 - step S24 of obtaining trajectory points, determining initial corner points, adjusting the number of recognition points based on a preset quantity, and normalization processing, etc.

[0082] When encountering a trajectory type not in the template library, only need to process the new trajectory type through the processing steps of steps S21 - step S24 to obtain a new trajectory template including a preset number of reference trajectory points, and store it in the template library. The recognition method of this embodiment can eliminate the need to train a neural network or classifier. Subsequently, only by adding a new trajectory type, the corresponding trajectory can be recognized, thereby accelerating the speed and efficiency of recognizing various trajectories.

[0083] Through the above method, the trajectory recognition method of this embodiment first compares the angle between each two adjacent trajectory vectors on the trajectory to be recognized with a preset angle, and determines the trajectory points between two adjacent trajectory vectors with all angles greater than the preset angle as initial corner points, and judges the type of the trajectory to be recognized through the corner feature, that is, while retaining the trajectory feature, it simplifies the comparison calculation complexity; then, based on the initial corner points, obtains a plurality of recognition points with the same number as the reference corner points of the trajectory template to unify the number specifications of the recognition points and the reference corner points for subsequent comparison calculations, and then calculates the center points among the plurality of recognition points, and takes the center point as the origin to map the coordinates of the plurality of recognition points to a preset range to perform normalization processing on the plurality of recognition points to further reduce the comparison calculation complexity and improve the recognition efficiency. Finally, compares the coordinates of the plurality of recognition points with the coordinates of the reference corner points to determine the type of the trajectory to be recognized. This embodiment can improve the accuracy and efficiency of trajectory recognition, eliminate the need to train a neural network or classifier, and only need to add a new trajectory type subsequently to recognize the corresponding trajectory, thereby further accelerating the speed and efficiency of recognizing various trajectories.

[0084] Please refer to Figure 4 , Figure 4It is a schematic framework diagram of an embodiment of the trajectory recognition device of the present application. The trajectory recognition device 40 includes an acquisition module 41, a corner module 42, a recognition module 43, and a determination module 44. The acquisition module 41 is used to acquire a plurality of trajectory points of the trajectory to be recognized; the corner module 42 is used to determine a plurality of initial corner points of the trajectory to be recognized from the plurality of trajectory points; the recognition module 43 is used to obtain a plurality of recognition points with the same number as the reference corner points of the trajectory template based on the initial corner points; the determination module 44 is used to determine the type of the trajectory to be recognized by using the plurality of recognition points and the reference corner points.

[0085] The recognition module 43 is further used to, in response to the number of initial corner points being less than the number of reference corner points, use the multiple of the reference corner points relative to the number of initial corner points to equally divide the connection line between every two adjacent initial corner points of the trajectory to be recognized, obtaining at least one equally divided point; and combining the equally divided points and the initial corner points into recognition points.

[0086] The recognition module 43 is further used to, in response to the multiple of the reference corner points relative to the number of initial corner points being a non-integer multiple, use the multiple and the remainder of the reference corner points relative to the number of initial corner points, and in the connection order of each initial corner point, increase the number of equal division times for the connection lines of the first remainder of the two adjacent initial corner points of the trajectory to be recognized in turn, so as to equally divide the connection line between every two adjacent initial corner points of the trajectory to be recognized, obtaining at least one equally divided point; and combining the equally divided points and the initial corner points into recognition points.

[0087] The corner module 42 is further used to connect each trajectory point in turn according to the trajectory order of the trajectory to be recognized, obtaining a plurality of trajectory vectors; comparing the angle between every two adjacent trajectory vectors with a preset angle, and determining the trajectory points between the two adjacent trajectory vectors with all angles greater than the preset angle as the initial corner points.

[0088] The recognition module 43 is further used to, in response to the number of initial corner points being greater than the number of reference corner points, increase the angle of the preset angle so that the number of initial corner points is less than the number of reference corner points.

[0089] The determination module 44 is further used to compare the coordinates of the plurality of recognition points with the coordinates of the reference corner points to determine the type of the trajectory to be recognized.

[0090] The determination module 44 is further used to, in response to the number of trajectory templates being greater than 1, compare the recognition points with the reference corner points of each trajectory template one by one in turn to determine the type of the trajectory to be recognized.

[0091] The determination module 44 is further used to compare the plurality of recognition points with the reference corner points of each trajectory template in turn to obtain the similarity between the trajectory to be recognized and each trajectory template; and determining the type of the trajectory template with the highest similarity as the type of the trajectory to be recognized.

[0092] The determination module 44 is further configured to calculate the similarity R between the to-be-recognized trajectory of the to-be-recognized trajectory and each trajectory template through the following formula:

[0093]

[0094] T1 * T2 = T1 1.x * T2 1.x + T1 1.y * T2 1.y ...T1 D.x * T2 D.x + T1 D.y * T2 D.y (2)

[0095] Wherein, T1 is the to-be-recognized trajectory, T2 is the trajectory template, and D is the number of recognition points or reference corner points.

[0096] The determination module 44 is further configured to calculate the center point between multiple recognition points, and take the center point as the origin to map the coordinates of the multiple recognition points to a preset range, so as to perform normalization processing on the multiple recognition points.

[0097] The above solution can improve the accuracy and efficiency of trajectory recognition.

[0098] Please refer to Figure 5 , Figure 5 which is a schematic framework diagram of an embodiment of the electronic device of the present application. The electronic device 50 includes a memory 51 and a processor 52 that are coupled to each other. The processor 52 is configured to execute program instructions stored in the memory 51 to implement the steps of any of the above-described embodiments of the trajectory recognition method. In a specific implementation scenario, the electronic device 50 may include, but is not limited to, a microcomputer, a server. In addition, the electronic device 50 may also include mobile devices such as a laptop computer, a tablet computer, etc., which are not limited herein.

[0099] Specifically, the processor 52 is used to control itself and the memory 51 to implement the steps of any of the above-described voice detection method embodiments. The processor 52 may also be referred to as a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip with signal processing capabilities. The processor 52 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Additionally, the processor 52 may be implemented jointly by integrated circuit chips.

[0100] The above solution can improve the accuracy and efficiency of trajectory recognition.

[0101] Please refer to Figure 6 , Figure 6 which is a schematic framework diagram of an embodiment of the computer-readable storage medium of the present application. The computer-readable storage medium 60 stores program instructions 601 that can be run by a processor. The program instructions 601 are used to implement the steps of any of the above-described trajectory recognition method embodiments.

[0102] The above solution can improve the accuracy and efficiency of trajectory recognition.

[0103] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0104] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0105] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0106] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

Claims

1. A trajectory recognition method, characterized in that, The described trajectory recognition method includes: Obtaining a plurality of trajectory points of the trajectory to be recognized; Determining a plurality of initial corner points of the trajectory to be recognized from the plurality of trajectory points; Obtaining a plurality of recognition points with the same number as the reference corner points of the trajectory template based on the initial corner points; including: in response to the number of the initial corner points being less than the number of the reference corner points, using the multiple of the reference corner points relative to the number of the initial corner points to equally divide the connection line between every two adjacent initial corner points in the trajectory to be recognized, to obtain at least one equal division point; combining the equal division point and the initial corner points into the recognition points; Determining the type of the trajectory to be recognized by using the plurality of recognition points and the reference corner points.

2. The trajectory recognition method according to claim 1, wherein The step of obtaining a plurality of recognition points with the same number as the reference corner points of the trajectory template based on the initial corner points further includes: In response to the multiple of the reference corner points relative to the number of the initial corner points being a non-integer multiple, using the multiple and the remainder of the reference corner points relative to the number of the initial corner points, and in the connection line order of each of the initial corner points, increasing the equal division times of the connection line between the two adjacent initial corner points of the first remainder number of the trajectory to be recognized in sequence, to equally divide the connection line between every two adjacent initial corner points in the trajectory to be recognized, to obtain at least one equal division point; Combining the equal division point and the initial corner points into the recognition points.

3. The trajectory recognition method according to claim 1, wherein The step of determining a plurality of initial corner points of the trajectory to be recognized from the plurality of trajectory points includes: Connecting each of the trajectory points in sequence according to the trajectory order of the trajectory to be recognized, to obtain a plurality of trajectory vectors; Comparing the angle between every two adjacent trajectory vectors with a preset angle, and determining the trajectory points between the two adjacent trajectory vectors with all angles greater than the preset angle as the initial corner points.

4. The trajectory recognition method according to claim 3, wherein, The step of obtaining a plurality of recognition points with the same number as the reference corner points of the trajectory template based on the initial corner points includes: In response to the number of the initial corner points being greater than the number of the reference corner points, increasing the angle of the preset angle, so that the number of the initial corner points is less than the number of the reference corner points.

5. The trajectory recognition method according to claim 1, characterized in that The step of determining the type of the trajectory to be recognized by using the plurality of recognition points and the reference corner points includes: Comparing the coordinates of the plurality of recognition points with the coordinates of the reference corner points to determine the type of the trajectory to be recognized.

6. The trajectory recognition method according to claim 5, wherein The step of comparing the coordinates of the plurality of recognition points with the coordinates of the reference corner points to determine the type of the trajectory to be recognized includes: In response to the number of the trajectory templates being greater than 1, comparing each of the recognition points with the corresponding reference corner points on the trajectory templates in sequence according to the sequence of the trajectories, to determine the type of the trajectory to be recognized.

7. The trajectory recognition method according to claim 6, wherein, The step of, in response to the number of the trajectory templates being greater than 1, comparing each of the recognition points with the corresponding reference corner points on the trajectory templates in sequence according to the sequence of the trajectories, to determine the type of the trajectory to be recognized includes: Compare each of the multiple recognition points with the reference corner points of each trajectory template in sequence to obtain the similarity between the trajectory to be recognized and each trajectory template; Determine the type of the trajectory template with the highest similarity as the type of the trajectory to be recognized.

8. The trajectory recognition method according to claim 7, wherein The step of comparing each of the multiple recognition points with the reference corner points of each trajectory template in sequence to obtain the similarity between the trajectory to be recognized and each trajectory template includes: Calculate the similarity R between the trajectory to be recognized and each trajectory template through the following formula: T1 * T2 = T1 1.x * T2 1.x + T1 1.y * T2 1.y ... T1 D.x * T2 D.x + T1 D.y * T2 D.y (2)) where T1 is the trajectory to be recognized, T2 is the trajectory template, and D is the number of recognition points or reference corner points.

9. The trajectory recognition method according to claim 1, wherein Before the step of determining the type of the trajectory to be recognized by using the multiple recognition points and the reference corner points, it includes: Calculate the center point among the multiple recognition points, and with the center point as the origin, map the coordinates of the multiple recognition points to a preset range to normalize the multiple recognition points.

10. A trajectory recognition device, characterized in that, The trajectory recognition device includes: An acquisition module, configured to acquire multiple trajectory points of a trajectory to be recognized; A corner module, configured to determine multiple initial corner points of the trajectory to be recognized from the multiple trajectory points; An identification module, configured to obtain multiple recognition points having the same number as the reference corner points of the trajectory template based on the initial corner points; wherein, in response to the number of the initial corner points being less than the number of the reference corner points, use the multiple of the reference corner points relative to the number of the initial corner points to equally divide the connection line between every two adjacent initial corner points in the trajectory to be recognized to obtain at least one equal division point; combine the equal division point and the initial corner points into the recognition points; A determination module, configured to determine the type of the trajectory to be recognized by using the multiple recognition points and the reference corner points.

11. An electronic device, characterized in that, It includes a memory and a processor that are mutually coupled, and the processor is configured to execute program instructions stored in the memory to implement the trajectory recognition method according to any one of claims 1 to 9.

12. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, the trajectory recognition method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Continuous character gesture track recognizing method based on STDW

    CN106354252A