Space-time adjoint weight optimization method

Through the space-time accompanying weight optimization method, the problems of incomplete positive samples and insensitive sorting are solved, and a supervised learning trajectory accompanying model that is adapted to different samples is established, feature weights are optimized, and the recall and recall of the model are improved, local optimal solutions are avoided, and more accurate trajectory accompanying calculation is achieved.

CN120429329APending Publication Date: 2025-08-05CHENGDU HELIO INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510574948.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In the calculation of existing spatiotemporal trajectory, the incompleteness of positive samples and the insensitivity of sorting between positive samples lead to poor application effects of existing LTR models, and the optimization of feature weights is difficult to adapt to different scenarios, affecting model performance.

Method used

The space-time accompanying weight optimization method is adopted. By establishing the accompanying result evaluation function, setting the initial weight vector, calculating the output accompanying result, evaluating the function value, determining the convergence state, and calculating the calibration vector of the weight parameters, adjusting the learning rate and introducing random noise, and optimizing the weight parameters.

Benefits of technology

A supervised learning trajectory accompanying model adapted to incomplete positive samples and insensitive scenarios is established, and the weight parameters are automatically learned, which improves the basic recall rate of the model, optimizes recall rate and main number recall rate, reduces the impact of unknown positive samples on ranking, and avoids local optimal solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429329A_ABST
    Figure CN120429329A_ABST
Patent Text Reader

Abstract

The invention discloses a space-time adjoint weight optimization method. The method comprises the following steps: S1, establishing an adjoint result evaluation function; s2, setting an initialization weight vector; s3, calculating and outputting an accompanying result; s4, calculating an evaluation function value; s5, determining the convergence state of the evaluation function; s6, calculating a calibration vector of the weight parameter; s7, the current weight parameter vector Wj and the calibration vector Cj are added, and a new round of weight vector Wj + 1 is obtained.The method is suitable for the technical field of spatio-temporal trajectory adjoint, the evaluation function is directly used for evaluating the performance of the model, the basic recall rate, the optimization recall rate and the main number recall rate are comprehensively evaluated, and the evaluation efficiency is improved. The influence of unknown positive samples and rankings among the positive samples on the performance of the model is reduced; a supervised learning trajectory adjoint model of parameter initialization, result calculation, result evaluation and parameter adjustment is established, and a parameter model adapted to different samples can be quickly formed according to automatic learning weight parameters of positive samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of space-time trajectory accompanying technology, and specifically relates to a space-time accompanying weight optimization method. Background Art

[0002] Calculations for spatiotemporal trajectory adjacency typically use a spatiotemporal collision method to determine candidate target numbers for a primary number. A spatiotemporal collision occurs when a candidate target number's trajectory points fall within a pre-set spatiotemporal neighborhood of the primary number's trajectory points. A candidate target number is one that experiences multiple spatiotemporal collisions with the primary number within a specified timeframe.

[0003] For each pair of primary numbers and candidate target numbers, the existing solution calculates the accompanying features of each pair. These features include, but are not limited to, the number of collisions, the proportion of target trajectory points involved in the collision, the number of collision points, the proportion of target trajectory points involved in the collision, the trajectory overlap time, the trajectory overlap time ratio, the collision time span of the associated pair, the collision space span of the associated pair, etc. After normalization, the above accompanying features are weighted averaged with the preset feature weights to form the correlation score of the associated pair. The calculation formula is:

[0004] R=W*Z_F T ;

[0005] Where: R is the correlation score of the association pair, W is the weight vector composed of each feature weight, Z_F is the standardized feature vector of each association pair under the same main number, Z_F T The eigenvectors are transposed to ensure that the product of two one-dimensional vectors is a scalar. Normalization ensures that each eigenvalue is a dimensionless value and is comparable. The normalization calculation formula for each feature is as follows:

[0006] z-score = (x - μ) / σ;

[0007] The correlation score R is comparable under the same main number. The larger R is, the higher the correlation between the candidate target number and the main number under the main number, and the greater the probability that the candidate target and the main number form a trajectory. R is generally not comparable under different main numbers.

[0008] Therefore, feature weights play a key role in trajectory adjoint computation. They determine the ranking order of candidate targets and the output of the top N trajectory adjoints (depending on the application, the top N can be top 10, top 20, etc.). Feature weight optimization is achieved through parameter tuning, verification, and performance testing using known positive samples. Compared to other supervised learning methods, trajectory adjoint computation has the following characteristics:

[0009] 1. The positive samples are incomplete. Outside the known positive samples, there are other target numbers that form an accompanying relationship with the main number. For example, the long-term accompanying positive samples are formed after verification and governance based on the vehicle code association and person code association relationships (such as vehicle registration data or mobile phone account opening data) formed by other business applications. This type of data comes from active registration by personnel. Generally, the registration personnel will not register all the mobile phones in use, and there may also be inconsistencies between the registered information and the actual usage information, resulting in some unknown positive samples. On the other hand, when conducting short-term accompanying calculations (hour-level trajectory accompaniment) through road tests, although all the mobile phone numbers carried by the road test personnel can be obtained, during the movement of personnel and vehicles, there may be other unknown personnel or vehicles that form short-term accompanying relationships with the road test personnel and vehicles, resulting in some unknown positive samples.

[0010] Secondly, due to the incompleteness of the positive samples, unknown positive samples may occupy the top positions in the ranking of predicted accompanying numbers. Therefore, the accuracy evaluation of predicted accompanying numbers generally requires known positive samples to be within the ranking range, rather than requiring an absolute ranking order.

[0011] 2. The performance evaluation method uses multi-level recall rates, including basic recall rate, optimized recall rate, and main number recall rate. The performance goal of the algorithm is to improve the optimized recall rate and main number recall rate while ensuring the basic recall rate. The basic recall rate refers to the proportion of predicted associated pairs that hit positive sample associated pairs among all positive sample associated pairs. The optimized recall rate is the recall rate of a candidate target subset with higher confidence. This subset may be a high-confidence candidate target number subset with a confidence level higher than a preset threshold, or it may be a subset ranked Top O (Top O < Top N, such as Top 5) in the accompanying score ranking. The main number recall rate refers to the proportion of the main numbers of the predicted associated pairs that hit positive sample associated pairs to all the main numbers in the positive samples. The main number recall rate is used to evaluate the scalability of the algorithm, ensuring that the algorithm model can calculate positive sample associated pairs for more main numbers.

[0012] Currently, there are mainly two ways to calculate the weights of spatio-temporal trajectory accompaniment: the empirical value method and the machine learning model based on grouped ranking.

[0013] The empirical value method is used in cases where the accompanying features and the number of positive samples are relatively small. Generally, there are no fixed rules. It mainly compares each accompanying feature of the positive samples outside Top N with the candidate targets ranked at the bottom in Top N. If a certain feature in the former is greater than the corresponding accompanying feature in the latter, the weight of this feature is increased; otherwise, the weight is decreased. The amplitude of weight increase and decrease is positively correlated with the difference in features.

[0014] The output accompanying the spatiotemporal trajectory is the group ranking result based on the main number. In theory, the existing LTR (Learning to Rank) model can be applied to this scenario. Model developers can use the Listwise LTR machine learning model to learn and train, which directly optimizes the overall quality of the sorted list. Typical LTR models include ListNet and LambdaMART.

[0015] ListNet treats the sorting problem as a list-level optimization problem and learns the sorting model by minimizing the difference between the predicted sorting and the actual sorting. ListNet uses cross-entropy loss to measure the difference between the predicted sorting and the actual sorting. The loss function can be expressed as:

[0016] L=-∑p i log(q i );

[0017] in:

[0018] ·p i is the probability of the i-th item in the true ranking;

[0019] ·q i is the probability of the ith item in the ranking predicted by the model.

[0020] p i and q i The Softmax function converts the scores of the real and predicted rankings into probability values, ensuring that the sum of the probabilities of all items is 1.

[0021] LambdaMART is derived from LambdaRank, combining Gradient Boosting Tree (GBDT) and LambdaRank, and specifically optimizes the evaluation indicator NDCG (Normalized Discounted Cumulative Gain) for sorting tasks. NDCG is a commonly used ranking evaluation indicator used to measure the quality of results of information retrieval systems or ranking models. It combines relevance and document position, focusing on both the relevance of documents and the ranking position of highly relevant documents. NDCG is the normalized value of DCG and IDCG, which is used to convert the actual sorting effect DCG into the ranking result. p With ideal sorting IDCG p For comparison:

[0022] DCG p =∑(2 reli -1) / log2(i+1);

[0023] IDCGp =∑(2 reli_ideal -1) / log2(i+1);

[0024] NDCG p =DCG p / IDCG p ;

[0025] in:

[0026] i: the position of the document in the sorted list (starting from 1);

[0027] ·rel i : predicted relevance score for document i (e.g., 0-3 represents irrelevant to highly relevant);

[0028] ·rel i _ideal is the relevance score of the i-th document in the ideal ranking;

[0029] log2(i+1): A discount factor for position, meaning that documents at lower positions contribute less to the overall gain.

[0030] The value range of NDCG is [0,1]:

[0031] 1 means the model's ranking is exactly the same as the ideal ranking.

[0032] 0 indicates extremely poor ranking quality (e.g. completely irrelevant documents are ranked first).

[0033] The empirical value method in the existing technical solution is suitable for scenarios with fewer features and parameters, relies on personal experience, and is basically not generalizable.

[0034] The LTR model uses a loss function to evaluate the model, measuring the performance of the model by measuring the difference between the predicted ranking and the actual ranking. In the field to which the present invention belongs, there are two problems that lead to the poor application of existing LTR models, specifically including:

[0035] 1. Incompleteness of positive samples. As mentioned in the background, large-scale positive samples have long been derived from person-phone number or vehicle code pairs acquired through other applications. These pairs are acquired through user-initiated registration, and typically only register a single mobile phone number. The current mobile phone penetration rate in China is 127.1 per 100 people, meaning a significant number of people have more than two mobile phone numbers, a fact not reflected in the positive samples.

[0036] 2. The ranking between positive samples is insensitive. For the adjoint calculation results containing multiple positive samples, as long as the results appear in the required ranking range, the ranking between the positive samples does not affect the actual application.

[0037] Due to the incompleteness of positive samples and the insensitivity to the order of positive samples, the loss function values of the predicted values and the true values are difficult to calculate correctly, resulting in poor application of the LTR model. Summary of the Invention

[0038] The purpose of the present invention is to overcome the defects of the prior art and provide a method for optimizing spatiotemporal weights.

[0039] To achieve the above object, the present invention adopts the following technical solutions:

[0040] A method for spatiotemporal weight optimization comprises the following steps:

[0041] S1 establishes the accompanying result evaluation function;

[0042] S2 sets the initial weight vector;

[0043] S3 calculates and outputs the accompanying result;

[0044] S4 calculates the evaluation function value;

[0045] S5 determines the convergence state of the evaluation function;

[0046] S6 calculates a calibration vector of weight parameters;

[0047] S7 takes the current weight parameter vector W j With the calibration vector C j Add them together to get the new round of weight vector W j+1 .

[0048] Preferably, the step S1 specifically includes:

[0049] The quantitative function value is calculated based on the adjoint calculation results and positive samples. The evaluation function calculation formula is:

[0050] f=fw b *r b +fw o *r o +fw m *r m ;

[0051] in:

[0052] r b Basic recall rate: the proportion of positive samples of the top N predicted association pairs to all positive samples;

[0053] r o To optimize the recall rate: optimize the proportion of positive samples in the subset prediction association pairs to all positive samples;

[0054] r mMain number recall rate: the ratio of the main number of the positive sample hit by the optimized subset prediction association pair to the main number of all positive samples;

[0055] fw b 、fw o 、fw m They are the weights of the basic recall rate, optimized recall rate, and main number recall rate in the evaluation function, which can be adjusted according to application needs. In general, fw b >>fw o >fw m .

[0056] Preferably, the step S2 specifically includes:

[0057] The dimension of the weight vector is determined according to the number of features n of the existing adjoint model, and the initialization vector is set and selected as needed;

[0058] The calculation method is:

[0059] W0=(w 10, w 20,…, w n0 );

[0060] Among them, the existing adjoint model features include but are not limited to the number of collisions, the proportion of collision trajectories, the number of collision points, and the proportion of collision points, and W0 is the initialization weight vector.

[0061] Preferably, the step S3 specifically includes:

[0062] Using the weight parameter vector and the accompanying calculation formula, the output Top N predicted association pairs, positive sample association pairs, and the ranking and confidence of each output association pair are calculated.

[0063] Preferably, the step S4 specifically includes:

[0064] Calculate the basic recall rate r under this weight parameter b , optimize the recall rate r o , main number recall rate r m , and then calculate the evaluation function value corresponding to the parameter.

[0065] Preferably, the step S5 specifically includes:

[0066] S51 calculates the improvement rate l of this round of iteration j ; The formula for the promotion rate is:

[0067] l j =(f j -f j-1 ) / f j-1 ;

[0068] Among them, j represents the number of iterations, l j >0 indicates model performance improvement, l j <0 indicates that the model performance is degraded. j Continuous decline means that the convergence point has been skipped;

[0069] S52 If k rounds are passed, l j >0 and lower than the preset convergence threshold l m , it means that the evaluation function has converged; then the current weight parameter vector W j That is the optimized weight vector, where k>2;

[0070] S53 If the evaluation function does not converge and exceeds the maximum round r m , then go to step S2, readjust the initialized weight vector, and restart the parameter iteration;

[0071] S54 If the evaluation function does not converge and the iteration round is less than the preset maximum round r m , then go to the next step and start weight parameter calibration.

[0072] Preferably, in step S5, after obtaining the optimized weight vector W, in order to avoid interference from the local optimal solution, a random noise vector N is added to the weight vector W. r , use W+N r As a new initialization vector, start a new iteration until the new iteration converges;

[0073] If there are multiple local optimal solutions, the new iterative convergence may also be the local optimal solution. By repeating step S5, until the performance is optimal or the preset maximum batch E is reached m Epoch refers to the number of times the weight reaches the local optimal solution from the initialization vector or exceeds the preset maximum round r. m A process.

[0074] Preferably, the step S6 specifically includes:

[0075] S61 Calculate the grouping benchmark feature vector: Group by main number and calculate the grouping benchmark feature vector F of the top N predicted association pairs in each group. b , F b Take the mean eigenvector or median eigenvector of the predicted association pair. The formula for calculating the mean eigenvector is:

[0076] S62 calculates the difference vector between the positive sample and the reference feature vector: calculate the feature vector P of each positive sample in the group k and the predicted baseline value vector F b The difference vector D k =P k-F b ;

[0077] S63 Calculate the calibration vector of the group: group by main number and calculate the difference vector D under the group i The mean of the values is the calibration vector of this group.

[0078] S64 calculates the weight vector calibration vector and averages the calibration vectors of all groups, which is the weight calibration vector C of this round. j If the number of positive samples in each group is different, the weighted average is calculated based on the number of positive samples in each group.

[0079] Preferably, in step S6, when calculating the calibration vector of the weight parameter, the mean feature vector of the low confidence prediction association pair is subtracted from the feature vector of the missed positive sample, and the specific steps include:

[0080] 1) Extract the set of positive samples FN that are not in the Top N;

[0081] 2) Calculate the low confidence benchmark feature vector within the group: Take the main number of the missed positive sample as the group, and calculate the group benchmark feature vector F of the predicted association pairs ranked lower in each group b , F b The mean eigenvector or median eigenvector of the lower-ranked predicted association pairs can be taken;

[0082] 3) Calculate the difference vector between each positive sample in FN and the baseline feature vector of this group: Calculate the feature vector FN of each positive sample in the group k and the predicted baseline value vector F b The difference vector D k =FN k -F b ;

[0083] 4) Calculate the calibration vector of the group: group by main number and calculate the difference vector D under the group i The mean of the values is the calibration vector of this group.

[0084] 5) Calculate the weight vector calibration vector and average the calibration vectors of all groups to get the weight calibration vector C for this round. j ,Similarly, weighted averaging is performed based on the number of ,missing positive samples in each group.

[0085] Preferably, the step S7 further includes:

[0086] Jump to step S3 and perform a new round of calculation, which specifically includes:

[0087] The learning rate parameter learning_rate is used to adjust the calibration speed of the parameters to solve the problem that the parameter calibration vector is too large when close to convergence, causing the evaluation function value to fail to converge; the learning_rate value range is (0,1], and the vector calculation formula is: W j+1 =W j +learning_rate*C j ;

[0088] The learning rate parameter learning_rate can be calculated based on the evaluation function value f in this round. j and the previous round of evaluation function value f j-1 The improvement rate l j Perform dynamic adjustment, the improvement rate formula is: j =(f j -f j-1 ) / f j-1 , when l j >0 and lower than the preset learning rate adjustment threshold l r When , reduce the value of learning_rate, the learning rate adjustment threshold l r Need to be less than the convergence threshold l m .

[0089] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0090] In the present invention, the evaluation function is directly used to evaluate the model performance, and the basic recall rate, optimized recall rate and main number recall rate are comprehensively evaluated to reduce the impact of unknown positive samples and the ranking between positive samples on the model performance; a supervised learning trajectory accompanying model for parameter initialization, result calculation, result evaluation and parameter adjustment is established, which can automatically learn weight parameters according to positive samples and quickly form a parameter model suitable for different samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 It is a flow chart of a method for spatiotemporal weight optimization of the present invention. DETAILED DESCRIPTION

[0092] The specific embodiments of the present invention are described in detail below.

[0093] The "ranges" disclosed herein are defined in the form of lower and upper limits. A given range is defined by selecting a lower limit and an upper limit, and the selected lower and upper limits define the boundaries of the particular range. Ranges defined in this manner can be inclusive or exclusive and can be combined arbitrarily, i.e., any lower limit can be combined with any upper limit to form a range. For example, if a range of 10 to 50 is listed for a particular parameter, it is understood that ranges of 10 to 40 and 20 to 50 are also contemplated. Furthermore, if the minimum range values listed are 1 and 2, and if the maximum range values listed are 3, 4, and 5, then the following ranges are all contemplated: 1 to 3, 1 to 4, 1 to 5, 2 to 3, 2 to 4, and 2 to 5. In this application, unless otherwise specified, the numerical range "a to b" is an abbreviation for any combination of real numbers between a and b, where a and b are real numbers. For example, the numerical range "0 to 5" means that all real numbers between "0 to 5" are listed herein, and "0 to 5" is simply an abbreviation for these numerical combinations.

[0094] Unless otherwise specified, all embodiments and optional embodiments of the present application can be combined with each other to form a new technical solution.

[0095] Unless otherwise specified, all technical features and optional technical features of this application can be combined with each other to form a new technical solution.

[0096] Unless otherwise specified, all steps of the present application may be performed sequentially or randomly, preferably sequentially. For example, the method includes steps (a) and (b), indicating that the method may include steps (a) and (b) performed sequentially, or may include steps (b) and (a) performed sequentially. For example, the method may further include step (c), indicating that step (c) may be added to the method in any order, for example, the method may include steps (a), (b) and (c), or may include steps (a), (c) and (b), or may include steps (c), (a) and (b), etc.

[0097] Unless otherwise specified, the terms "include" and "comprising" used in this application may be open-ended or closed-ended. For example, "include" and "comprising" may mean that other components not listed may also be included or that only the listed components are included.

[0098] Unless otherwise specified, the reaction is carried out at room temperature and pressure.

[0099] Unless otherwise specified, all parts or percentages are by weight.

[0100] In the present invention, all substances used are known substances and can be purchased or synthesized by known methods.

[0101] In the present invention, the devices or equipment used are all conventional devices or equipment known in the art and are commercially available.

[0102] The following further illustrates a specific implementation of a spatiotemporal weight optimization method of the present invention in conjunction with an embodiment. The spatiotemporal weight optimization method of the present invention is not limited to the description of the following embodiment.

[0103] Example:

[0104] A method of spatiotemporal weight optimization, such as Figure 1 As shown, the specific steps include:

[0105] 1. Establish an adjoint result evaluation function: Calculate the quantitative function value based on the adjoint calculation results and positive samples. The evaluation function calculation formula is: f = fw b *r b +fw o *r o +fw m *r m ;in:

[0106]

[0107] 2. Set the initial weight vector W0: Determine the dimension of the weight vector according to the number of existing adjoint model features n, such as the number of collisions, the proportion of collision trajectories, the number of collision points, the proportion of collision points, etc. W0 = (w 10, w 20,…, w n0 ), the initialization vector can be set and selected as needed;

[0108] 3. Calculate and output adjoint results: Use the weight parameter vector and adjoint calculation formula to calculate and output the top N predicted association pairs, positive sample association pairs, and the ranking and confidence of each output association pair;

[0109] 4. Calculate the evaluation function value: Calculate the basic recall rate r under this weight parameter b , optimize the recall rate r o , main number recall rate r m , and then calculate the evaluation function value corresponding to the parameter;

[0110] 5. Determine the convergence status of the evaluation function:

[0111] 1) Calculate the improvement rate l of this round of iteration j : The formula for the improvement rate is: l j =(f j -f j-1) / f j-1 , where j represents the number of iterations, l j >0 indicates model performance improvement, l j <0 indicates that the model performance is degraded. j Continuous decline means that the convergence point has been skipped;

[0112] 2) If k (k>2) rounds are passed, l j >0 and lower than the preset convergence threshold l m , it means that the evaluation function has converged; then the current weight parameter vector W j That is the optimized weight vector;

[0113] 3) If the evaluation function does not converge and exceeds the maximum round r m , then go to step 2, readjust the initialized weight vector, and restart the parameter iteration;

[0114] 4) If the evaluation function does not converge and the number of iterations is less than the preset maximum number of rounds r m , then go to the next step and start weight parameter calibration.

[0115] 6. Calculate the calibration vector for the weight parameters:

[0116] 1) Calculate the grouping benchmark feature vector: Group by main number and calculate the grouping benchmark feature vector F of the top N predicted association pairs in each group b , F b The mean eigenvector or median eigenvector of the predicted association pair can be taken. For example, the mean eigenvector calculation formula is:

[0117] 2) Calculate the difference vector between the positive sample and the baseline feature vector: Calculate the feature vector P of each positive sample in the group k and the predicted baseline value vector F b The difference vector D k =P k -F b ;

[0118] 3) Calculate the calibration vector of the group: group by main number and calculate the difference vector D under the group i The mean of the values is the calibration vector of this group.

[0119] 4) Calculate the weight vector calibration vector and average the calibration vectors of all groups to get the weight calibration vector C for this round. j If the number of positive samples in each group is different, the weighted average is calculated based on the number of positive samples in each group;

[0120] 7. The weight vector W of this round jWith the calibration vector C j Add them together to get the new round of weight vector W j+1 , the calculation formula is: W j+1 =W j +C j , jump to step 3 and perform a new round of calculation.

[0121] Furthermore, when calculating the new round of weight vectors in step 7 above, the learning rate parameter learning_rate is used to adjust the calibration speed of the parameters to solve the problem that the parameter calibration vector is too large when close to convergence, causing the evaluation function value to fail to converge. The learning_rate value range is (0,1], and the vector calculation formula at this time is: W j+1 =W j +learning_rate*C j .

[0122] The learning rate parameter learning_rate can be calculated based on the evaluation function value f in this round. j and the previous round of evaluation function value f j-1 The improvement rate l j Perform dynamic adjustment, the improvement rate formula is: j =(f j -f j-1 ) / f j-1 , when l j >0 and lower than the preset learning rate adjustment threshold l r When , reduce the value of learning_rate, the learning rate adjustment threshold l r Need to be less than the convergence threshold l m .

[0123] Furthermore, when calculating the calibration vector of the weight parameter in step 6, instead of using the positive sample feature vector minus the mean feature vector, the miss positive sample feature vector minus the mean feature vector of the low confidence prediction association pair is used. The specific steps include:

[0124] 1) Extract the set of positive samples FN that are not in the Top N;

[0125] 2) Calculate the low confidence benchmark feature vector within the group: group the main numbers of the missed positive samples and calculate the group benchmark feature vector F of the predicted association pairs ranked at the bottom (for example, the bottom 1 / 4) in each group. b , F b The mean eigenvector or median eigenvector of the lower-ranked predicted association pairs can be taken;

[0126] 3) Calculate the difference vector between each positive sample in FN and the baseline feature vector of this group: Calculate the feature vector FN of each positive sample in the group kand the predicted baseline value vector F b The difference vector D k =FN k -F b ;

[0127] 4) Calculate the calibration vector of the group: group by main number and calculate the difference vector D under the group i The mean of the values is the calibration vector of this group.

[0128] 5) Calculate the weight vector calibration vector and average the calibration vectors of all groups to get the weight calibration vector C for this round. j ,Similarly, weighted averaging can be performed based on the number of ,missing positive samples in each group;

[0129] Furthermore, in order to avoid falling into a local optimal solution, after obtaining the optimized weight vector W in step 5 above, a random noise vector N is added to the weight vector W. r , use W+N r As a new initialization vector, start a new iteration until the new iteration converges. If there are multiple local optimal solutions, the new iteration convergence may also be the local optimal solution. You can repeat this step until the performance is optimal or the preset maximum batch E is reached. m Among them, the iterative batch Epoch refers to the weight reaching the local optimal solution from the initialization vector or exceeding the preset maximum round r m a process.

[0130] By adopting the above technical solutions:

[0131] A supervised learning trajectory adjoint model was established, which can automatically initialize parameters, calculate results, evaluate results, and adjust parameters in scenarios where positive samples are incomplete and the order between positive samples is insensitive.

[0132] The model of the present invention avoids the problems of existing models in scenarios where positive samples are incomplete and the ranking between positive samples is not sensitive;

[0133] A multi-level recall evaluation function is established, in which the basic recall rate, optimized recall rate, and main number recall rate are positively correlated. The weight parameters can be directly learned and trained based on the multi-level recall rate to achieve a balance among the basic recall rate, optimized recall rate, and main number recall rate.

[0134] The learning rate parameter is introduced to automatically adjust the learning rate when the evaluation function is close to convergence, avoiding skipping the optimal solution directly when the parameter adjustment vector is too large, resulting in convergence failure;

[0135] For single learning results, random noise is introduced and multi-batch learning and training are performed to skip the local optimal solution;

[0136] The authority parameter calibration vector supports multiple methods. The calibration vector is calculated by the difference between the feature vector of the positive sample and the prediction value baseline feature vector. The feature vector of the positive sample can select all positive sample feature vectors or the feature vector of the missed positive sample as needed. The prediction value baseline feature vector can select the mean feature value vector or median vector of all prediction results or low confidence prediction results.

[0137] In summary, the technical problem addressed by this application is to establish a supervised learning trajectory accompanying model to automatically optimize the weights of each accompanying feature, ensuring that positive samples can maximize their chances of falling within the user's desired ranking range, in scenarios where positive samples are incomplete, the ranking of multiple positive samples in the prediction results for the same main number is insensitive, and the application of existing models is ineffective.

[0138] This application directly uses the evaluation function to evaluate the model performance, comprehensively evaluating the basic recall rate, optimized recall rate, and main number recall rate to reduce the impact of unknown positive samples and the ranking between positive samples on the model performance;

[0139] This application establishes a supervised learning trajectory accompanying model for parameter initialization, result calculation, result evaluation, and parameter adjustment, which can automatically learn weight parameters based on positive samples and quickly form a parameter model adapted to different samples.

[0140] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.

Claims

1. A method for spatiotemporal weight optimization, characterized in that: The following steps are involved: S1 establishes the accompanying result evaluation function; S2 sets the initial weight vector; S3 calculates and outputs the accompanying result; S4 calculates the evaluation function value; S5 determines the convergence state of the evaluation function; S6 calculates a calibration vector of weight parameters; S7 takes the current weight parameter vector W j With the calibration vector C j Add them together to get the new round of weight vector W j+1 .

2. The method for spatiotemporal weight optimization according to claim 1, wherein: The step S1 specifically includes: The quantitative function value is calculated based on the adjoint calculation results and positive samples. The evaluation function calculation formula is: f=fw b *r b +fw o *r o +fw m *r m ; in: r b Basic recall rate: the proportion of positive samples of the top N predicted association pairs to all positive samples; r o To optimize the recall rate: optimize the proportion of positive samples in the subset prediction association pairs to all positive samples; r m Main number recall rate: the ratio of the main number of the positive sample hit by the optimized subset prediction association pair to the main number of all positive samples; fw b 、fw o 、fw m They are the weights of the basic recall rate, optimized recall rate, and main number recall rate in the evaluation function, which can be adjusted according to application needs. In general, fw b >>fw o >fw m .

3. The method for spatiotemporal weight optimization according to claim 1, wherein: The step S2 specifically includes: The dimension of the weight vector is determined according to the number of features n of the existing adjoint model, and the initialization vector is set and selected as needed; The calculation method is: W0=(w 10, In 20,…, In n0 ); Among them, the existing adjoint model features include but are not limited to the number of collisions, the proportion of collision trajectories, the number of collision points, and the proportion of collision points, and W0 is the initialization weight vector.

4. The method for optimizing spatiotemporal weights according to claim 1, wherein: The step S3 specifically includes: Using the weight parameter vector and the accompanying calculation formula, the output Top N predicted association pairs, positive sample association pairs, and the ranking and confidence of each output association pair are calculated.

5. The method for spatiotemporal weight optimization according to claim 1, wherein: The step S4 specifically includes: Calculate the basic recall rate r under this weight parameter b , optimize the recall rate r o , main number recall rate r m , and then calculate the evaluation function value corresponding to the parameter.

6. The method for spatiotemporal weight optimization according to claim 1, wherein: The step S5 specifically includes: S51 calculates the improvement rate l of this round of iteration j ; The formula for the promotion rate is: the j =(f j -f j-1 ) / f j-1 ; Among them, j represents the number of iterations, l j >0 indicates model performance improvement, l j <0 indicates that the model performance is degraded. j Continuous decline means that the convergence point has been skipped; S52 If k rounds are passed, l j >0 and lower than the preset convergence threshold l m , it means that the evaluation function has converged; then the current weight parameter vector W j That is the optimized weight vector, where k>2; S53 If the evaluation function does not converge and exceeds the maximum round r m , then go to step S2, readjust the initialized weight vector, and restart the parameter iteration; S54 If the evaluation function does not converge and the iteration round is less than the preset maximum round r m , then go to the next step and start weight parameter calibration.

7. The method for spatiotemporal weight optimization according to claim 6, wherein: In step S5, after obtaining the optimized weight vector W, in order to avoid interference from the local optimal solution, a random noise vector N is added to the weight vector W. r , use W+N r As a new initialization vector, start a new iteration until the new iteration converges; If there are multiple local optimal solutions, the new iterative convergence may also be the local optimal solution. By repeating step S5, until the performance is optimal or the preset maximum batch E is reached m Epoch refers to the number of times the weight reaches the local optimal solution from the initialization vector or exceeds the preset maximum round r. m a process.

8. The method for spatiotemporal weight optimization according to claim 1, wherein: The step S6 specifically includes: S61 Calculate the grouping reference feature vector: Group by main number and calculate the grouping reference feature vector F of the top N predicted association pairs in each group. b , F b Take the mean eigenvector or median eigenvector of the predicted association pair. The formula for calculating the mean eigenvector is: S62 calculates the difference vector between the positive sample and the reference feature vector: calculate the feature vector P of each positive sample in the group k and the predicted baseline value vector F b The difference vector D k =P k -F b ; S63 Calculate the calibration vector of the group: group by main number and calculate the difference vector D under the group i The mean of the values is the calibration vector of this group. S64 calculates the weight vector calibration vector and averages the calibration vectors of all groups, which is the weight calibration vector C of this round. j If the number of positive samples in each group is different, the weighted average is calculated based on the number of positive samples in each group.

9. The method for spatiotemporal weight optimization according to claim 1, wherein: In step S6, when calculating the calibration vector of the weight parameter, the mean feature vector of the low confidence prediction association pair is subtracted from the feature vector of the missed positive sample. The specific steps include: 1) Extract the set of positive samples FN that are not in the Top N; 2) Calculate the low confidence benchmark feature vector within the group: Take the main number of the missed positive sample as the group, and calculate the group benchmark feature vector F of the predicted association pairs ranked lower in each group b , F b The mean eigenvector or median eigenvector of the lower-ranked predicted association pairs can be taken; 3) Calculate the difference vector between each positive sample in FN and the baseline feature vector of this group: Calculate the feature vector FN of each positive sample in the group k and the predicted baseline value vector F b The difference vector D k =FN k -F b ; 4) Calculate the calibration vector of the group: group by main number and calculate the difference vector D under the group i The mean of the values is the calibration vector of this group. 5) Calculate the weight vector calibration vector and average the calibration vectors of all groups to get the weight calibration vector C for this round. j ,Similarly, weighted averaging is performed based on the number of ,missing positive samples in each group.

10. The method for spatiotemporal weight optimization according to claim 1, wherein: The step S7 further includes: Jump to step S3 and perform a new round of calculation, which specifically includes: The learning rate parameter learning_rate is used to adjust the calibration speed of the parameters to solve the problem that the parameter calibration vector is too large when close to convergence, causing the evaluation function value to fail to converge; the learning_rate value range is (0,1], and the vector calculation formula is: W j+1 =W j +learning_rate*C j ; The learning rate parameter learning_rate can be calculated based on the evaluation function value f in this round. j and the previous round of evaluation function value f j-1 The improvement rate l j Perform dynamic adjustment, the improvement rate formula is: j =(f j -f j-1 ) / f j-1 , when l j >0 and lower than the preset learning rate adjustment threshold l r When , reduce the value of learning_rate, the learning rate adjustment threshold l r Need to be less than the convergence threshold l m .