Floating object track prediction method, model training method, system and device and medium
Through the combination of cross-modal coding and probability diffusion models, a sea floating object trajectory prediction model is constructed, which solves the problems of complex calculations and model differences in traditional methods, and realizes high-precision and efficient trajectory prediction, which is suitable for multi-sea environments.
Patent Information
- Application Number
- CN202411681522.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The traditional method of sea floating object trajectory prediction is difficult to achieve accurate prediction and efficient calculation due to complex calculations and differences in hydrodynamic models, which limits its ability to operate in maritime rescue and multi-sea areas.
The encoder and decoder are trained by cross-modal encoding method, combined with the probability diffusion model, and construct a floating object trajectory prediction model, and generate high-precision trajectory prediction through the encoding and decoding of hydrodynamic data and real trajectory data.
It realizes accurate prediction of floating object trajectory, reduces the time and calculation amount required for prediction, can be applied to more marine environments, and improves the efficiency of maritime rescue and environmental monitoring.
Smart Images

Figure CN119720743A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning technology, and in particular to a floating object trajectory prediction method, model training method, system, device and medium. Background Art
[0002] Traditional trajectory prediction of floating objects at sea uses the principles of fluid mechanics and numerical calculations, which are complex and time-consuming, resulting in limited applications and making it difficult to perform maritime rescue missions. At the same time, due to the large differences in hydrodynamic models in different sea areas, ordinary prediction models are difficult to complete trajectory prediction tasks. Summary of the invention
[0003] The main purpose of the embodiments of the present disclosure is to propose a floating object trajectory prediction method, model training method, system, device and medium, which can accurately predict the trajectory of floating objects, reduce the time required for prediction and the calculation amount of the prediction model, and can be applied to more marine environments.
[0004] To achieve the above purpose, one aspect of an embodiment of the present application proposes a floating object trajectory prediction model training method, comprising the following steps:
[0005] Acquire a first data set, wherein the first data set includes a plurality of positive sample data, each of the positive sample data includes real trajectory data of a floating object and hydrodynamic data of a corresponding environment;
[0006] Based on the cross-modal encoding method, a first encoder and a second encoder are trained according to the first data set to obtain the trained first encoder and the trained second encoder, wherein the first encoder is used to output a first vector of hydrodynamic data, and the second encoder is used to output a second vector of real trajectory data;
[0007] Using the trained first encoder and the second encoder to encode the positive sample data of the first data set to obtain a second data set;
[0008] Training an intermediate product generation model based on a probability diffusion model according to the second data set to obtain a trained intermediate product generation model, wherein the intermediate product generation model is used to output a corresponding second vector according to the first vector;
[0009] forming a third data set according to the real trajectory data and a second vector of the real trajectory data;
[0010] Training a decoder according to the third data set to obtain the trained decoder, wherein the decoder is used to decode the second vector into decoded trajectory data;
[0011] The trained first encoder, the intermediate product generation model and the decoder are combined to obtain a floating object trajectory prediction model.
[0012] In some embodiments, the first data set is obtained by:
[0013] Acquiring a trajectory of a floating object, and segmenting the trajectory of the floating object to obtain multiple segments of real trajectory data;
[0014] Retrieving the hydrodynamic data according to the time and longitude and latitude of each segment of the real trajectory data to obtain the hydrodynamic data of the corresponding environment;
[0015] Combining the real trajectory data with the hydrodynamic data to obtain the positive sample data;
[0016] All the positive sample data are combined to obtain the first data set.
[0017] In some embodiments, the method based on the cross-modal encoding, training the first encoder and the second encoder according to the first data set to obtain the trained first encoder and the trained second encoder, includes the following steps:
[0018] Inputting the hydrodynamic data into the first encoder to obtain a first vector of the hydrodynamic data;
[0019] Inputting the real trajectory data into the second encoder to obtain a second vector of the real trajectory data;
[0020] Calculating the similarity between the first vector and the second vector to obtain vector similarity;
[0021] With the goal of increasing the vector similarity of positive sample data, the parameters of the first encoder and the parameters of the second encoder are adjusted to obtain the trained first encoder and the trained second encoder.
[0022] In some embodiments, training the intermediate product generation model based on the probability diffusion model according to the second data set to obtain the trained intermediate product generation model includes the following steps:
[0023] Inputting a first vector of hydrodynamic data in the second data set into the intermediate product generation model to obtain a third vector of predicted trajectory data;
[0024] A loss function is calculated based on the second vector of the real trajectory data and the third vector of the predicted trajectory data;
[0025] With the goal of reducing the loss function, the parameters of the intermediate product generation model are adjusted to obtain a trained intermediate product generation model.
[0026] In some embodiments, training a decoder according to the third data set to obtain the trained decoder comprises the following steps:
[0027] Inputting the second vector of the real trajectory data in the third data set into the decoder to obtain decoded trajectory data;
[0028] Calculating according to the real trajectory data and the decoded trajectory data to obtain trajectory similarity between the decoded trajectory data and the real trajectory data;
[0029] With the goal of improving the trajectory similarity, the parameters of the decoder are adjusted to obtain the trained decoder.
[0030] On the other hand, an embodiment of the present invention provides a method for predicting the trajectory of floating objects, comprising the following steps:
[0031] Get the starting point information of the floating object;
[0032] According to the starting point information, obtaining hydrodynamic data of the corresponding environment;
[0033] The hydrodynamic data is input into a floating object trajectory prediction model to obtain floating object trajectory data, wherein the floating object trajectory prediction model is trained by the floating object trajectory prediction model training method described in the previous embodiment.
[0034] In some embodiments, inputting the hydrodynamic data into the floating object trajectory prediction model to obtain the floating object trajectory data comprises the following steps:
[0035] Inputting the hydrodynamic data into a first encoder to obtain a first vector of the hydrodynamic data;
[0036] Inputting the first vector of hydrodynamic data into an intermediate product generation model to obtain a second vector of predicted trajectory data;
[0037] The second vector of the predicted trajectory data is input into a decoder to obtain the floating object trajectory data.
[0038] On the other hand, an embodiment of the present invention provides a floating object trajectory prediction model training system, including:
[0039] A first module is used to obtain a first data set, wherein the first data set includes a plurality of positive sample data, each of which includes real trajectory data of a floating object and hydrodynamic data of a corresponding environment;
[0040] A second module is used to train a first encoder and a second encoder according to the first data set based on a cross-modal encoding method to obtain a trained first encoder and a trained second encoder, wherein the first encoder is used to output a first vector of hydrodynamic data, and the second encoder is used to output a second vector of real trajectory data;
[0041] A third module is used to encode the positive sample data of the first data set using the trained first encoder and the second encoder to obtain a second data set;
[0042] A fourth module is used to train an intermediate product generation model based on a probability diffusion model according to the second data set to obtain a trained intermediate product generation model, wherein the intermediate product generation model is used to output a corresponding second vector according to the first vector;
[0043] A fifth module, configured to form a third data set according to the real trajectory data and a second vector of the real trajectory data;
[0044] A sixth module, training a decoder according to the third data set to obtain the trained decoder, wherein the decoder is used to decode the second vector into decoded trajectory data;
[0045] The seventh module is used to combine the trained first encoder, the intermediate product generation model and the decoder to obtain a floating object trajectory prediction model.
[0046] On the other hand, an embodiment of the present invention provides an electronic device, including:
[0047] at least one processor;
[0048] at least one memory for storing at least one program;
[0049] When the at least one program is executed by the at least one processor, the at least one processor implements the floating object trajectory prediction model training method or the floating object trajectory prediction method as described in the previous embodiments.
[0050] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the floating object trajectory prediction model training method or the floating object trajectory prediction method as described in the previous embodiments.
[0051] The above technical scheme of the present invention has at least one of the following advantages or beneficial effects: a method for predicting the trajectory of a floating object, a model training method, a system, a device and a medium, firstly obtaining the real trajectory data of the floating object and the hydrodynamic data of the corresponding environment, pre-processing the trajectory data and the hydrodynamic data to obtain a first data set including a plurality of positive sample data, then training the first encoder and the second encoder according to the first data set to obtain the trained first encoder and the trained second encoder, encoding the first data set using the trained first encoder and the second encoder to obtain the second data set, training the intermediate generation product model according to the second data set to obtain the trained intermediate generation product model, forming a third data set according to the second vector of the real trajectory data of the real trajectory data and the real trajectory data of the second data set, training the decoder according to the third data set to obtain the trained decoder, combining the trained first encoder, the intermediate product generation model and the decoder to obtain a floating object trajectory prediction model. The present application constructs a mapping model of the relationship between various hydrodynamic data and trajectory data, and the model can predict the trajectory of the floating object according to the starting point information of the floating object and the environmental hydrodynamic data, can accurately predict the trajectory of the floating object, reduce the time required for prediction and the calculation amount of the prediction model, and can be applied to more marine environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flow chart of a floating object trajectory prediction model training method provided in an embodiment of the present application;
[0053] Figure 2 It is a schematic diagram of the structure of the hydrodynamic-trajectory generation model provided in the embodiment of the present application;
[0054] Figure 3 is a flow chart of a method for predicting the trajectory of floating objects provided in an embodiment of the present application;
[0055] Figure 4 yes Figure 3 Flow chart of the specific method of step S830;
[0056] Figure 5 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] First, some nouns involved in this application are analyzed:
[0061] Cross-modal encoder model (Contrastive Language-Image Pre-training, CLIP): It is a multimodal pre-training model proposed by OpenAI in 2021. It embeds images and text into the same semantic space through contrastive learning, so that the model can understand the semantic relationship between images and text. The CLIP model adopts a dual-stream architecture to process image and text data separately. The image stream extracts visual features through the CNN convolutional neural network, and the text stream processes language information through the Transformer encoder. The outputs of the two streams are contrastively learned in the embedding space. Contrastive learning trains the model by comparing positive samples (matching image-text pairs) and negative samples (mismatching image-text pairs).
[0062] Denoising Diffusion Probabilistic Models (DDPM): It is a data generation technique that starts with complex data, gradually removes details, and finally leaves simple random noise. It can regenerate new data by running it in reverse. This technique is used in computer vision, natural language processing and other fields. The DDPM model repeatedly adds noise and denoises, simulating multiple random processes, so as to learn how to extract complex patterns from randomness and create new data samples based on the training data. The focus of the DDPM model is to simulate the gradual evolution of data distribution, from a simple starting point (such as a standard Gaussian distribution) to a more complex distribution. This process is completed through a series of reversible steps. Once the model learns this transformation process, it can start from a simple distribution and then gradually "diffuse" or transform this point into a more complex data distribution to create new data samples. The generated samples have a high degree of similarity with the original data distribution, making the diffusion model a powerful tool for tasks such as image synthesis, data completion and denoising.
[0063] In the field of trajectory prediction of floating objects at sea, the traditional application of the principles of fluid mechanics and the use of numerical calculations have a complex and time-consuming process, resulting in limited applications and difficulty in performing maritime rescue missions. At the same time, due to the large differences in hydrodynamic models in different sea areas, ordinary prediction models are difficult to complete trajectory prediction tasks.
[0064] Based on this, the embodiments of the present disclosure provide a floating object trajectory prediction method, model training method, system, device and medium, which can accurately predict the trajectory of floating objects, reduce the time required for prediction and the calculation amount of the prediction model, and can be applied to more marine environments.
[0065] The floating object trajectory prediction method and model training method provided in the embodiments of the present application relate to the field of deep learning technology. The floating object trajectory prediction model training method or floating object trajectory prediction method provided in the embodiments of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, or a smart watch, etc.; the server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN) and big data and artificial intelligence platforms; the software can be an application that implements a floating object trajectory prediction model training method or a floating object trajectory prediction method, etc., but is not limited to the above forms.
[0066] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0067] Reference Figure 1 As shown, Figure 1 It is an optional flowchart of a floating object trajectory prediction model training method provided in some embodiments of the present application. A floating object trajectory prediction model training method in an embodiment of the present invention includes but is not limited to steps S100 to S700.
[0068] Step S100, obtaining a first data set, wherein the first data set includes a plurality of positive sample data, each positive sample data includes real trajectory data of a floating object and hydrodynamic data of a corresponding environment;
[0069] Step S200, based on the cross-modal encoding method, training a first encoder and a second encoder according to the first data set to obtain a trained first encoder and a trained second encoder, wherein the first encoder is used to output a first vector of hydrodynamic data, and the second encoder is used to output a second vector of real trajectory data;
[0070] Step S300, using the trained first encoder and the second encoder to encode the positive sample data of the first data set to obtain a second data set;
[0071] Step S400, training an intermediate product generation model based on a probability diffusion model according to the second data set to obtain a trained intermediate product generation model, wherein the intermediate product generation model is used to output a corresponding second vector according to the first vector;
[0072] Step S500, forming a third data set according to the real trajectory data and the second vector of the real trajectory data;
[0073] Step S600, training a decoder according to the third data set to obtain a trained decoder, wherein the decoder is used to decode the second vector into decoded trajectory data;
[0074] Step S700, combining the trained first encoder, the intermediate product generation model and the decoder to obtain a floating object trajectory prediction model.
[0075] In step S100 of some embodiments, the first data set is a hydrodynamic-trajectory data set, which is obtained by preprocessing the real trajectory data of the floating object and the hydrodynamic data of the corresponding environment. Specifically, the matched hydrodynamic data and trajectory data are combined to obtain the hydrodynamic-trajectory data, one hydrodynamic-trajectory data is a positive sample data, and the hydrodynamic-trajectory data set includes a plurality of hydrodynamic-trajectory data. The floating object can be a floating buoy, floating garbage, but is not limited thereto. The real trajectory data of the floating object and the hydrodynamic data of the corresponding environment can be obtained using simulation methods such as real data or numerical calculation.
[0076] In some embodiments, the first data set in step S100 may be obtained by, but not limited to, steps S110 to S140:
[0077] Step S110, obtaining the trajectory of the floating object, and segmenting the trajectory of the floating object to obtain multiple segments of real trajectory data;
[0078] Step S120, searching the hydrodynamic data according to the time and longitude and latitude of each segment of the real trajectory data to obtain the hydrodynamic data of the corresponding environment;
[0079] Step S130, combining the real trajectory data with the hydrodynamic data to obtain a positive sample data;
[0080] Step S140: combine all positive sample data to obtain a first data set.
[0081] In step S110 of some embodiments, the trajectory of the floating object is segmented. First, the data dimension is determined, and the trajectory data is segmented according to the data dimension, that is, a suitable number of trajectory points is selected so that each segment of the trajectory contains the same number of trajectory points.
[0082] In step S120 of some embodiments, the real track data of the floating object includes time, longitude and latitude information; the hydrodynamic data includes hydrodynamic data of the area covered by the track of the floating object, and the data includes time, longitude and latitude, and hydrodynamic information (wind, waves, currents, etc.). In order to match the time, longitude and latitude of the real track data and the hydrodynamic data in the positive sample data, the retrieval process of the hydrodynamic data retrieval is as follows.
[0083] The hydrodynamic data are retrieved and matched according to the segmented real trajectory data to obtain the corresponding hydrodynamic data. Specifically, the hydrodynamic data are conditionally retrieved according to the maximum time, minimum time, maximum dimension, minimum dimension, maximum longitude, and minimum longitude to obtain all the hydrodynamic information of the corresponding interval, and the data dimensions are made consistent through interpolation processing.
[0084] In steps S130 to S140 of some embodiments, the hydrodynamic data structure is as shown in formula (1), the real trajectory data structure is as shown in formula (2), the positive sample data structure is as shown in formula (3), and the first data set structure is as shown in formula (4).
[0085] Data_fh i =[N t , N n , N s , num fluid , N none ];(1)
[0086] Data_traj i =[N none ×2]; (2)
[0087] P_sample i ={Data_fh, Data_traj}; (3)
[0088]
[0089] In formula (1), Data_fh i represents the hydrodynamic data in the i-th positive sample data, where N t represents the time dimension, N n ×N s Indicates spatial latitude and longitude, num fluid Indicates the number of types of hydrodynamic data corresponding to a single point, N none Indicates the actual trajectory starting point as a conditional input.
[0090] In formula (2), Data_traj i Represents the true trajectory data in the i-th positive sample data, where N none ×2 means that the real trajectory data includes longitude and latitude, a total of two dimensions.
[0091] In formula (3), P_samole i Represents the i-th positive sample data, including the hydrodynamic data Data_fh i And the real trajectory data Data_traj i .
[0092] In formula (4), DATA_psample represents the first data set obtained by preprocessing, which includes n positive sample data.
[0093] In step S200 of some embodiments, the cross-modal encoder is a neural network model, including a hydrodynamic data encoder, a trajectory data encoder, and a similarity calculation module. The main function is to reduce the dimension of the data and extract data features at the same time. The hydrodynamic data encoder and the trajectory data encoder are two different neural network models, and different neural network models can be selected according to the data features. The first encoder is a hydrodynamic encoder, which is used to encode the hydrodynamic data and output the first vector of the hydrodynamic data. The second encoder is a trajectory data encoder, which is used to encode the trajectory data and output the second vector of the trajectory data. The first vector of the hydrodynamic data is a low-dimensional hydrodynamic data vector, and the second vector of the real trajectory data is a low-dimensional trajectory data vector. The dimensions of the low-dimensional hydrodynamic data vector and the low-dimensional trajectory data vector are the same, so the similarity can be calculated based on the similarity calculation module, and the encoder parameters are adjusted according to the similarity to complete the training.
[0094] In some embodiments, step S200 may include but is not limited to steps S210 to S240:
[0095] Step S210, inputting the hydrodynamic data into a first encoder to obtain a first vector of the hydrodynamic data;
[0096] Step S220, inputting the real trajectory data into a second encoder to obtain a second vector of the real trajectory data;
[0097] Step S230, calculating the similarity between the first vector and the second vector to obtain vector similarity;
[0098] Step S240 , with the goal of increasing the vector similarity of the positive sample data, adjusting the parameters of the first encoder and the parameters of the second encoder to obtain a trained first encoder and a trained second encoder.
[0099] In steps S210 to S220 of some embodiments, the hydrodynamic data is input into a hydrodynamic data encoder, and the hydrodynamic data encoder performs dimensionality reduction processing on the hydrodynamic data, extracts data features, and obtains a low-dimensional hydrodynamic data vector.
[0100] The real trajectory data is input into the trajectory data encoder, and the trajectory data encoder performs dimensionality reduction processing on the real trajectory data, extracts data features, and obtains a low-dimensional trajectory data vector.
[0101] In step S230 of some embodiments, the cosine similarity between the low-dimensional hydrodynamic data vector and the low-dimensional trajectory data vector is calculated to measure the correspondence between the hydrodynamic data and the trajectory data. The larger the cosine similarity, the stronger the correspondence between the low-dimensional hydrodynamic data vector and the low-dimensional trajectory data vector, and vice versa.
[0102] In step S240 of some embodiments, the hydrodynamic data encoder parameters and trajectory data encoder parameters are adjusted respectively during the similarity calculation process, so that the similarity between positive samples is greater and the similarity between negative samples is smaller. The cosine similarity of positive samples is maximized and the cosine similarity of negative samples is minimized. Finally, the hydrodynamic data encoder parameters and trajectory data encoder parameters are fixed to complete the training and obtain the trained hydrodynamic data encoder and trajectory data encoder.
[0103] In step S300 of some embodiments, a trained first encoder (hydrodynamic encoder) and a second encoder (trajectory data encoder) are prepared, and each positive sample in the first data set (i.e., a sample containing hydrodynamic data and true trajectory data) is input into the corresponding encoder to encode the hydrodynamic data and the true trajectory data, respectively. The hydrodynamic data of each positive sample is processed using the first encoder to generate a low-dimensional hydrodynamic data vector (first vector). The first encoder extracts features from the hydrodynamic data and maps them to a low-dimensional vector space for comparison with the encoded vector of the trajectory data. The true trajectory data of the positive sample is encoded using the second encoder to generate a low-dimensional trajectory data vector (second vector). The second encoder extracts and reduces the dimension of the trajectory data features so that its output vector dimension is the same as the first vector. The hydrodynamic data vector (first vector) of each positive sample is paired with the corresponding trajectory data vector (second vector), and the second data set includes a plurality of "hydrodynamic-trajectory vector pairs in the form of low-dimensional vectors" for subsequent training of an intermediate product generation model based on a probability diffusion model.
[0104] In step S400 of some embodiments, the training samples in the second data set are pairs of hydrodynamic data vectors and trajectory data vectors. Before using the second data set to train the model, the training samples need to be standardized or normalized so that the subsequent model can be stably learned.
[0105] In one example, the specific process of the intermediate product generation model is as follows:
[0106] Diffusion process (forward process): gradually add noise to the second vector (trajectory vector) of each sample to make it close to a pure noise distribution. In the training of the diffusion model, noise addition is multi-step, that is, noise is gradually added to the vector at each time step. The purpose of this process is to help the model learn to gradually restore data features from random noise.
[0107] Inverse diffusion process (reverse process) training: Using the reverse process of the diffusion model, learn how to generate the corresponding second vector (trajectory vector) from the first vector (i.e., the hydrodynamic vector). In this process: the model's task is to predict the second vector at the current noise level and try to restore it to a clear trajectory vector.
[0108] By evaluating the difference between the generated vector and the original second vector using a loss function (such as mean squared error), the model parameters are gradually adjusted to minimize the deviation of the prediction from the target during the noise reduction process.
[0109] During training, the hydrodynamic data vector (first vector) of each positive sample is input into the diffusion model, and noise is added to the trajectory data vector (second vector) at different time steps. The diffusion model gradually learns how to restore the second vector from the first vector. The model's structure, noise steps, learning rate and other parameters are tuned according to the quality of the generated results to improve the model's generalization ability and prediction accuracy.
[0110] In some embodiments, step S400 may include, but is not limited to, steps S410 to S430:
[0111] Step S410, inputting the first vector of hydrodynamic data in the second data set into the intermediate product generation model to obtain a third vector of predicted trajectory data;
[0112] Step S420, calculating a loss function according to the second vector of the real trajectory data and the third vector of the predicted trajectory data;
[0113] Step S430, with the goal of reducing the loss function, adjust the parameters of the intermediate product generation model to obtain a trained intermediate product generation model.
[0114] In step S410 of some embodiments, the first vector of the second data set is used as an input of an intermediate product generation model, and the model generates a predicted trajectory data vector (third vector) that meets the hydrodynamic conditions through learning.
[0115] In step S420 of some embodiments, a suitable loss function is selected to evaluate the difference between the predicted third vector and the second vector of the real trajectory data. Commonly used loss functions include mean square error (MSE) or cosine similarity.
[0116] In step S430 of some embodiments, an optimization algorithm (such as Adam or SGD) is selected to adjust the parameters of the model. The value of the loss function is usually gradually reduced through the gradient descent method, so that the predicted output (the third vector) is closer to the actual trajectory vector (the second vector). The process of "input data-calculate loss-adjust parameters" is repeated to continuously reduce the value of the loss function. The model learns more accurate mapping relationships in continuous iterations. Training can be stopped when the preset loss value is reached, the set number of iterations is completed, or the loss drops to a certain threshold and no longer changes significantly.
[0117] In step S500 of some embodiments, real trajectory data is obtained from the first data set, and the real trajectory data is processed by the trained second encoder to generate a low-dimensional trajectory data vector (second vector). Each real trajectory data is combined with the corresponding second vector into a data pair. All generated data pairs are collected to form a third data set. The data pairs of the third data set represent the matching relationship between the high-dimensional trajectory data and the low-dimensional vector.
[0118] In step S600 of some embodiments, the decoder is a neural network, and a suitable neural network structure is selected as the decoder (such as a multi-layer perceptron or a convolutional neural network, etc.) so that it can restore high-dimensional trajectory data from low-dimensional vectors.
[0119] In some embodiments, step S600 may include, but is not limited to, steps S610 to S630:
[0120] Step S610, inputting the second vector of the real trajectory data in the third data set into a decoder to obtain decoded trajectory data;
[0121] Step S620, calculating according to the real trajectory data and the decoded trajectory data to obtain the trajectory similarity between the decoded trajectory data and the real trajectory data;
[0122] Step S630, with the goal of improving trajectory similarity, adjust the parameters of the decoder to obtain a trained decoder.
[0123] In step S610 of some embodiments, each second vector (low-dimensional trajectory data vector) in the third data set is input into a decoder. The decoder generates corresponding decoded trajectory data according to the input second vector. The decoded trajectory data is high-dimensional and attempts to restore a trajectory shape consistent with the real trajectory data.
[0124] In step S620 of some embodiments, a calculation is performed based on the real trajectory data and the decoded trajectory data to obtain the trajectory similarity between the decoded trajectory data and the real trajectory data, and a trajectory similarity calculation method is defined: a suitable similarity measurement method is selected to compare the decoded trajectory data with the real trajectory data. The selectable similarity measurement methods include but are not limited to: mean square error (MSE) and cosine similarity.
[0125] In step S630 of some embodiments, with the goal of maximizing trajectory similarity, an optimization algorithm (such as Adam or SGD) is used to adjust the parameters of the decoder to improve the similarity of the decoded trajectory data. Repeat the process of "input vector-decoding generation-calculation of similarity-parameter update" so that the decoder gradually learns to accurately restore the low-dimensional vector to high-dimensional trajectory data in continuous optimization. During the training process, the decoder is regularly evaluated on the validation set to avoid overfitting. When the trajectory similarity of the decoder reaches the expected standard, the trained decoder is saved for use in the overall combination of the subsequent floating object trajectory prediction model.
[0126] In step S700 of some embodiments, the trained first encoder (for encoding hydrodynamic data), the intermediate product generation model (for generating trajectory vectors), and the decoder (for decoding the generated trajectory vectors) are loaded into the system for combination, wherein all model parameters for combination are in a trained state, so that the prediction model can accurately predict the trajectory. The test data set is used to input the model, the trajectory prediction accuracy of the combined model is checked, and whether the output predicted trajectory accurately reflects the actual situation is observed, and necessary fine-tuning is performed according to the results.
[0127] Please refer to Figure 2 , a hydrodynamic-trajectory generation model, i.e., a floating object trajectory prediction model, Figure 2 This is a schematic diagram of the structure of the hydrodynamic-trajectory generation model. Based on the hydrodynamic-trajectory dataset (the first dataset), a pre-trained cross-modal encoder model (the first encoder), a pre-trained trajectory data decoder (decoder), and a pre-trained hydrodynamic-trajectory generation model (intermediate product generation model) are obtained through training. Finally, the three models are combined to obtain the hydrodynamic-trajectory generation model, and the corresponding floating object trajectory can be obtained according to the hydrodynamic information.
[0128] In some embodiments, by inputting real-time hydrodynamic data, the future trajectory of floating objects can be generated to support tasks such as monitoring, early warning and rescue of floating objects at sea.
[0129] Please refer to Figure 3 , Figure 3 The embodiment of the present invention further provides a floating object trajectory prediction method including but not limited to steps S810 to S830.
[0130] Step S810, obtaining the starting point information of the floating object;
[0131] Step S820, obtaining hydrodynamic data of the corresponding environment according to the starting point information;
[0132] Step S830, inputting the hydrodynamic data into the floating object trajectory prediction model to obtain floating object trajectory data, wherein the floating object trajectory prediction model is trained by the floating object trajectory prediction model training method of the above embodiment.
[0133] In step S810 of some embodiments, the initial position of the floating object is determined, and the coordinates of the starting point of the floating object are obtained, including the starting longitude and latitude and time information. This information is used to determine the initial environment of the floating object, so as to obtain appropriate hydrodynamic data.
[0134] In step S820 of some embodiments, the required range of hydrodynamic data is determined based on the longitude and latitude of the starting point and the time, including data such as wind speed, ocean current, and waves, and the hydrodynamic data matching the starting point position is obtained from the environmental database. If the time and spatial resolution of the hydrodynamic data are inconsistent with the model requirements, the hydrodynamic data can be interpolated and processed.
[0135] In step S830 of some embodiments, the hydrodynamic data is converted into a corresponding hydrodynamic vector (first vector) by a first encoder. Then, the first vector is converted into a predicted trajectory vector (third vector) by an intermediate product generation model. The third vector is input into a decoder to generate high-dimensional floating object trajectory data and obtain a complete trajectory prediction result.
[0136] In some embodiments, step S830 may include, but is not limited to, steps S831 to S833:
[0137] Step S831, inputting the hydrodynamic data into a first encoder to obtain a first vector of the hydrodynamic data;
[0138] Step S832, inputting the first vector of hydrodynamic data into the intermediate product generation model to obtain a second vector of predicted trajectory data;
[0139] Step S833: input the second vector of the predicted trajectory data into the decoder to obtain floating object trajectory data.
[0140] Please refer to Figure 4 , Figure 4The specific prediction flow chart of the floating object trajectory is as follows: first, the starting position information of the floating object of the trajectory to be predicted is obtained, and the hydrodynamic data of the corresponding environment is obtained according to the starting position information. The hydrodynamic data is encoded by a hydrodynamic data encoder to obtain a hydrodynamic data vector, and then the hydrodynamic data vector is input into the intermediate product generation model based on the probability diffusion model to obtain the corresponding trajectory data vector. The trajectory data vector is decoded by a trajectory data decoder to obtain the predicted trajectory data.
[0141] In step S831 of some embodiments, the pre-processed hydrodynamic data (such as wind speed, ocean current, wave information, etc.) is input into the first encoder, and the first encoder converts the high-dimensional hydrodynamic data into a low-dimensional representation, extracts key features, and generates a first vector of the hydrodynamic data. The first vector is a simplified representation of the current hydrodynamic environment and will be used for subsequent trajectory generation.
[0142] In step S832 of some embodiments, the first vector is input into the intermediate product generation model, and the intermediate product generation model generates a second vector of predicted trajectory data from the first vector of hydrodynamic data using a diffusion model structure. The second vector contains the core information of the future movement trend of the floating object.
[0143] In step S833 of some embodiments, the decoder converts the low-dimensional second vector into high-dimensional trajectory data, recovers the actual geographic coordinates and time series, and the floating object trajectory data generated by the decoder contains a predicted geographic location sequence, reflecting the expected movement path of the floating object in the future period of time.
[0144] In some embodiments, the floating object trajectory prediction method can be applied to maritime search and rescue and emergency response. When an emergency occurs at sea (such as people falling into the water, ships in distress, cargo falling into the sea, etc.), the model can quickly predict the trajectory of floating objects and help rescuers locate the target location. By inputting the latest hydrodynamic data in real time, the model can provide high-precision drift prediction, reduce the search and rescue scope, and improve the search and rescue efficiency.
[0145] In some embodiments, the trajectory of floating garbage (such as plastic garbage and marine floating objects) is predicted to help environmental monitoring agencies track the drifting direction and distribution of the garbage and plan cleaning plans. This can assist in selecting the best cleaning path and resource allocation, and optimize cleaning efficiency.
[0146] In some embodiments, it is used for ship navigation risk assessment and collision avoidance, predicting the movement trajectory of floating objects or small buoys on the sea surface, helping ships to avoid floating objects during navigation, preventing accidental collisions, real-time monitoring and prediction of floating objects on the sea surface, and ensuring navigation safety.
[0147] The embodiment of the present invention further provides a floating object trajectory prediction model training system, comprising:
[0148] A first module is used to obtain a first data set, wherein the first data set includes a plurality of positive sample data, each of which includes real trajectory data of the floating object and hydrodynamic data of the corresponding environment;
[0149] A second module is used for training a first encoder and a second encoder according to the first data set based on a cross-modal encoding method to obtain a trained first encoder and a trained second encoder, wherein the first encoder is used to output a first vector of hydrodynamic data, and the second encoder is used to output a second vector of real trajectory data;
[0150] The third module is used to encode the positive sample data of the first data set using the trained first encoder and second encoder to obtain a second data set;
[0151] A fourth module is used to train an intermediate product generation model based on a probability diffusion model according to the second data set to obtain a trained intermediate product generation model, wherein the intermediate product generation model is used to output a corresponding second vector according to the first vector;
[0152] A fifth module, configured to form a third data set according to the real trajectory data and a second vector of the real trajectory data;
[0153] A sixth module, training a decoder according to the third data set to obtain a trained decoder, wherein the decoder is used to decode the second vector into decoding trajectory data;
[0154] The seventh module is used to combine the trained first encoder, the intermediate product generation model and the decoder to obtain a floating object trajectory prediction model.
[0155] It can be understood that the contents of the above-mentioned floating object trajectory prediction model training method embodiment are all applicable to the present system embodiment, the functions specifically implemented by the present system embodiment are the same as those in the above-mentioned floating object trajectory prediction model training method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned floating object trajectory prediction model training method embodiment.
[0156] Combine the following Figure 5 The electronic device according to the embodiment of the present application is introduced in detail.
[0157] like Figure 5 , Figure 5 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0158] The processor 1100 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure;
[0159] The memory 1200 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1200 can store an operating system and other applications. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1200, and the processor 1100 calls and executes the anti-fraud method based on knowledge graph reasoning in the embodiments of the present disclosure;
[0160] Input / output interface 1300, used to implement information input and output;
[0161] The communication interface 1400 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0162] Bus 1500 , which transmits information between various components of the device (e.g., processor 1100 , memory 1200 , input / output interface 1300 , and communication interface 1400 );
[0163] The processor 1100 , the memory 1200 , the input / output interface 1300 , and the communication interface 1400 are connected to each other in communication within the device via a bus 1500 .
[0164] The embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned floating object trajectory prediction model training method and floating object trajectory prediction method.
[0165] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0166] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0167] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present disclosure, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0168] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0170] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0171] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one item (one) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0172] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0173] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0174] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, 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 software functional units.
[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, server, or network equipment, etc.) to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store programs.
[0176] The preferred embodiments of the present disclosure are described above with reference to the accompanying drawings, but the scope of the rights of the present disclosure is not limited thereto. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present disclosure should be within the scope of the rights of the present disclosure.
Claims
1. A floating object trajectory prediction model training method, characterized in that: The following steps are involved: Acquire a first data set, wherein the first data set includes a plurality of positive sample data, each of the positive sample data includes real trajectory data of a floating object and hydrodynamic data of a corresponding environment; Based on the cross-modal encoding method, a first encoder and a second encoder are trained according to the first data set to obtain the trained first encoder and the trained second encoder, wherein the first encoder is used to output a first vector of hydrodynamic data, and the second encoder is used to output a second vector of real trajectory data; Using the trained first encoder and the second encoder to encode the positive sample data of the first data set to obtain a second data set; Training an intermediate product generation model based on a probability diffusion model according to the second data set to obtain a trained intermediate product generation model, wherein the intermediate product generation model is used to output a corresponding second vector according to the first vector; forming a third data set according to the real trajectory data and a second vector of the real trajectory data; Training a decoder according to the third data set to obtain the trained decoder, wherein the decoder is used to decode the second vector into decoded trajectory data; The trained first encoder, the intermediate product generation model and the decoder are combined to obtain a floating object trajectory prediction model.
2. The floating object trajectory prediction model training method according to claim 1 is characterized in that: The first data set is obtained by the following steps: Acquiring a trajectory of a floating object, and segmenting the trajectory of the floating object to obtain multiple segments of real trajectory data; Retrieving the hydrodynamic data according to the time and longitude and latitude of each segment of the real trajectory data to obtain the hydrodynamic data of the corresponding environment; Combining the real trajectory data with the hydrodynamic data to obtain the positive sample data; All the positive sample data are combined to obtain the first data set.
3. The floating object trajectory prediction model training method according to claim 1 is characterized in that: The method based on cross-modal encoding, training a first encoder and a second encoder according to the first data set to obtain the trained first encoder and the trained second encoder, includes the following steps: Inputting the hydrodynamic data into the first encoder to obtain a first vector of the hydrodynamic data; Inputting the real trajectory data into the second encoder to obtain a second vector of the real trajectory data; Calculating the similarity between the first vector and the second vector to obtain vector similarity; With the goal of increasing the vector similarity of positive sample data, the parameters of the first encoder and the parameters of the second encoder are adjusted to obtain the trained first encoder and the trained second encoder.
4. The floating object trajectory prediction model training method according to claim 1 is characterized in that: The step of training the intermediate product generation model based on the probability diffusion model according to the second data set to obtain the trained intermediate product generation model comprises the following steps: Inputting a first vector of hydrodynamic data in the second data set into an intermediate product generation model to obtain a third vector of predicted trajectory data; A loss function is calculated based on the second vector of the real trajectory data and the third vector of the predicted trajectory data; With the goal of reducing the loss function, the parameters of the intermediate product generation model are adjusted to obtain a trained intermediate product generation model.
5. The floating object trajectory prediction model training method according to claim 1, characterized in that: The step of training a decoder according to the third data set to obtain the trained decoder comprises the following steps: Inputting the second vector of the real trajectory data in the third data set into the decoder to obtain decoded trajectory data; Calculating according to the real trajectory data and the decoded trajectory data to obtain trajectory similarity between the decoded trajectory data and the real trajectory data; With the goal of improving the trajectory similarity, the parameters of the decoder are adjusted to obtain the trained decoder.
6. A method for predicting the trajectory of floating objects, characterized in that: The following steps are involved: Get the starting point information of the floating object; According to the starting point information, obtaining hydrodynamic data of the corresponding environment; The hydrodynamic data is input into a floating object trajectory prediction model to obtain floating object trajectory data, wherein the floating object trajectory prediction model is trained by the floating object trajectory prediction model training method according to any one of claims 1 to 5.
7. The floating object trajectory prediction method according to claim 6, characterized in that: The step of inputting the hydrodynamic data into the floating object trajectory prediction model to obtain the floating object trajectory data comprises the following steps: Inputting the hydrodynamic data into a first encoder to obtain a first vector of the hydrodynamic data; Inputting the first vector of hydrodynamic data into an intermediate product generation model to obtain a second vector of predicted trajectory data; The second vector of the predicted trajectory data is input into a decoder to obtain the floating object trajectory data.
8. A floating object trajectory prediction model training system, characterized in that: include: A first module is used to obtain a first data set, wherein the first data set includes a plurality of positive sample data, each of which includes real trajectory data of a floating object and hydrodynamic data of a corresponding environment; A second module is used to train a first encoder and a second encoder according to the first data set based on a cross-modal encoding method to obtain a trained first encoder and a trained second encoder, wherein the first encoder is used to output a first vector of hydrodynamic data, and the second encoder is used to output a second vector of real trajectory data; A third module is used to encode the positive sample data of the first data set using the trained first encoder and the second encoder to obtain a second data set; A fourth module is used to train an intermediate product generation model based on a probability diffusion model according to the second data set to obtain a trained intermediate product generation model, wherein the intermediate product generation model is used to output a corresponding second vector according to the first vector; A fifth module, configured to form a third data set according to the real trajectory data and a second vector of the real trajectory data; A sixth module, training a decoder according to the third data set to obtain the trained decoder, wherein the decoder is used to decode the second vector into decoded trajectory data; The seventh module is used to combine the trained first encoder, the intermediate product generation model and the decoder to obtain a floating object trajectory prediction model.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the floating object trajectory prediction model training method as described in any one of claims 1 to 5 or the floating object trajectory prediction method as described in claims 6 to 7.
10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the floating object trajectory prediction model training method as described in any one of claims 1 to 5 or the floating object trajectory prediction method as described in claims 6 to 7 when executed by the processor.
Citation Information
Patent Citations
Track prediction method and device, electronic equipment and readable storage medium
CN115130750A
Scene-level multi-agent track generation method and device based on consistent diffusion
CN117473032A
Offshore floater trajectory prediction method based on quantum convolutional long-short term memory (QCNN-LSTM) model
CN117540616A
Marine floating object track prediction method, system and equipment based on machine learning
CN118211178A
Multi-agent trajectory prediction
US20210276547A1
Cited By
Sea drift trajectory prediction model training method and device
CN121071495A