Terminal movement trajectory display method and apparatus, and device and medium
By obtaining terminal trajectory data and using the cell prediction model to perform feature extraction and dimensionality reduction processing, the problem that terminal mobility trajectory cannot be visualized is solved, and the intuitive display of terminal mobility analysis is achieved.
Patent Information
- Application Number
- PCT/CN2024/114271
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-28
- Filing Date
- 2024-08-23
- Publication Date
- 2025-08-14
AI Technical Summary
The prior art cannot visualize the terminal movement trajectory, especially in the absence of latitude and longitude information, it is difficult to visually display the results of terminal mobility analysis.
By acquiring the trajectory data of the terminal, the pre-trained passive cell prediction model extracts terminal features, historical cell position features and time interval features, perform feature dimensionality reduction processing, generate predicted moving trajectories and display them.
Visualization of terminal mobility trajectories lacking latitude and longitude information is realized, and the intuitiveness and accuracy of terminal mobility analysis are improved.
Smart Images

Figure CN2024114271_14082025_PF_FP_ABST
Abstract
Description
Terminal movement trajectory display method, device, equipment and medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 28, 2023, with application number 2023118385722, and application name “Terminal movement trajectory display method, device, equipment and medium”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for displaying terminal movement trajectories. Background Art
[0003] With the development of 5G technology, the 5G core network element (Network Data Analytics Function, NWDAF) needs to visualize the terminal movement trajectory when performing terminal mobility analysis to facilitate terminal monitoring and location anomaly detection.
[0004] When performing terminal mobility analysis, the location granularity of the terminal's visit is at the cell level, and cells do not have longitude and latitude. Therefore, it is currently impossible to visualize the terminal's movement trajectory when the original data completely lacks longitude and latitude.
[0005] Summary of the Invention
[0006] Based on this, it is necessary to provide a terminal movement trajectory display method, device, computer equipment, computer-readable storage medium and computer program product that can visualize the terminal movement trajectory to address the above technical problems.
[0007] In a first aspect, the present application provides a method for displaying a terminal movement trajectory, comprising:
[0008] Obtaining terminal trajectory data of the target terminal; the terminal trajectory data includes the location information of the target terminal's historically passed cells, and the time information of the target terminal passing through each historically passed cell;
[0009] Input the terminal information, location information of historically passed cells, and time information of the target terminal into a pre-trained passed cell prediction model. The passed cell prediction model obtains the terminal features corresponding to the terminal information and the cell location features corresponding to the location information of historically passed cells. Furthermore, the time interval features of the target terminal passing through each adjacent historically passed cell are obtained based on the time information.
[0010] Obtaining the cell location characteristics of the target terminal's predicted passing cells based on the terminal characteristics, cell location characteristics, and time interval characteristics;
[0011] The cell location features of the predicted passing cells are processed with feature dimensionality reduction to obtain the reduced-dimensional location information of the predicted passing cells, and the predicted movement trajectory of the target terminal is generated and displayed based on the reduced-dimensional location information.
[0012] In one embodiment, the step of training the transit cell prediction model includes:
[0013] Obtaining sample terminal trajectory data of the sample terminal; the sample terminal trajectory data includes location information of cells that the sample terminal has historically passed through, and time information of each cell that the sample terminal has historically passed through;
[0014] Inputting the terminal information, location information of historically passed cells, and time information of the sample terminal into a to-be-trained passed cell prediction model, the to-be-trained passed cell prediction model is used to obtain a composite trajectory representation of the sample terminal; the composite trajectory representation represents the terminal characteristics of the sample terminal, the location characteristics of historically passed cells, and the time interval characteristics corresponding to the time information;
[0015] The predicted passing cells are obtained based on the trajectory composite representation and the location information of the cells adjacent to the current cell; the current cell is one of the cells that the sample terminal has passed through in the past;
[0016] According to the sample terminal trajectory data, obtain the positive sample cell corresponding to the current cell and the negative sample cell corresponding to the current cell;
[0017] According to the trajectory composite representation, positive sample cells and negative sample cells, the loss value of the passed cell prediction model is obtained, and the passed cell prediction model is trained based on the loss value.
[0018] In one embodiment, obtaining a composite representation of the trajectory of a sample terminal through a to-be-trained cell prediction model includes:
[0019] Embed the terminal information of the sample terminal and the location information of the historically passed cells through the trained cell prediction model to obtain a terminal embedding matrix corresponding to the terminal information and a location embedding matrix corresponding to the location information;
[0020] After adding the terminal embedding matrix and the position embedding matrix, the component where the current cell is located is used as the first representation vector, and the component where the target cell is located is used as the second representation vector;
[0021] The component of the position embedding matrix where the current cell is located is used as the third representation vector;
[0022] Embed the time interval between the current cell and the target cell according to the time information to obtain a fourth representation vector;
[0023] Attention calculation is performed based on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector. After traversing all cells in the sample terminal trajectory data whose time information is before the current cell as the target cell, a composite representation of the sample terminal's trajectory is obtained.
[0024] In one embodiment, performing attention calculation based on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector includes:
[0025] Performing mapping processing on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector based on preset parameters to obtain a processing matrix; the preset parameters are obtained by transposing the query parameters and then multiplying them by the key parameters;
[0026] Performing mapping processing based on the value parameter on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector to obtain a value matrix;
[0027] Perform attention calculation on the processing matrix and the value matrix.
[0028] In one embodiment, the sample terminal trajectory data is composed of a plurality of sub-terminal trajectory data, and each sub-terminal trajectory data is used to connect adjacent cells;
[0029] According to the sample terminal trajectory data, the positive sample cell corresponding to the current cell and the negative sample cell corresponding to the current cell are obtained, including:
[0030] Get the current cell and the adjacent cells adjacent to the current cell;
[0031] Obtain target sub-terminal trajectory data starting from the current cell from the sub-terminal trajectory data, and use the cell where the target sub-terminal trajectory data ends as a positive sample cell;
[0032] Among the adjacent cells, cells other than the positive sample cells are regarded as negative sample cells.
[0033] In one embodiment, obtaining a loss value of a transit cell prediction model based on the trajectory composite representation, the positive sample cells, and the negative sample cells, and training the transit cell prediction model based on the loss value includes:
[0034] The positive sample prediction value is obtained based on the trajectory composite representation of the sub-terminal trajectory data before the current cell and the cell characteristics corresponding to the positive sample cell;
[0035] Obtain a negative sample prediction value based on the trajectory composite representation of the sub-terminal trajectory data before the current cell and the cell features corresponding to the negative sample cell;
[0036] According to the positive sample prediction value and the negative sample prediction value, the loss value of the prediction model of the passed cell is obtained; the loss value is negatively correlated with the positive sample prediction value and positively correlated with the negative sample prediction value;
[0037] The cell prediction model is trained based on the loss value.
[0038] In one embodiment, after obtaining the sample terminal trajectory data of the sample terminal, the method further includes:
[0039] Perform sliding window sampling processing on the sample terminal trajectory data according to a preset sliding size and a preset step size, and crop the terminal trajectory data located in the sliding window during the sliding process to obtain cropped training sample terminal trajectory data;
[0040] Inputting the terminal information of the sample terminal, the location information of the historically passed cells, and the time information into the passed cell prediction model to be trained, including:
[0041] A triplet is obtained based on the terminal trajectory data of the training sample; the triplet includes terminal information, location information, and time information;
[0042] The triplet is input into the to-be-trained cell prediction model for training the cell prediction model.
[0043] In one embodiment, generating and displaying a predicted movement trajectory of a target terminal based on the reduced-dimensionality location information includes:
[0044] Obtaining two-dimensional location information of the predicted passing cells based on the dimensionality-reduced location information;
[0045] Based on the two-dimensional information, the trajectory points of the predicted passing cells are determined, and the current trajectory points of the target terminal are connected with the trajectory points of the predicted passing cells to obtain the predicted moving trajectory of the target terminal and display it.
[0046] In a second aspect, the present application further provides a terminal movement trajectory display device, comprising:
[0047] A data acquisition module is used to obtain terminal trajectory data of the target terminal; the terminal trajectory data includes the location information of the target terminal's historically passed cells and the time information of the target terminal passing through each historically passed cell;
[0048] A feature extraction module is configured to input the terminal information, location information of historically passed cells, and time information of the target terminal into a pre-trained passed cell prediction model, obtain terminal features corresponding to the terminal information, cell location features corresponding to the location information of historically passed cells through the passed cell prediction model, and obtain time interval features of the target terminal passing through adjacent historically passed cells based on the time information;
[0049] A cell prediction module is used to obtain the cell location characteristics of the target terminal's predicted transit cells based on the terminal characteristics, cell location characteristics, and time interval characteristics;
[0050] The feature dimensionality reduction module is used to perform feature dimensionality reduction processing on the cell location features of the predicted passed cells to obtain the reduced dimensionality location information of the predicted passed cells, and generate and display the predicted movement trajectory of the target terminal based on the reduced dimensionality location information.
[0051] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0052] Obtaining terminal trajectory data of the target terminal; the terminal trajectory data includes the location information of the target terminal's historically passed cells, and the time information of the target terminal passing through each historically passed cell;
[0053] Input the terminal information, location information of historically passed cells, and time information of the target terminal into a pre-trained passed cell prediction model. The passed cell prediction model obtains the terminal features corresponding to the terminal information and the cell location features corresponding to the location information of historically passed cells. Furthermore, the time interval features of the target terminal passing through each adjacent historically passed cell are obtained based on the time information.
[0054] Obtaining the cell location characteristics of the target terminal's predicted passing cells based on the terminal characteristics, cell location characteristics, and time interval characteristics;
[0055] The cell location features of the predicted passing cells are processed with feature dimensionality reduction to obtain the reduced-dimensional location information of the predicted passing cells, and the predicted movement trajectory of the target terminal is generated and displayed based on the reduced-dimensional location information.
[0056] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0057] Obtaining terminal trajectory data of the target terminal; the terminal trajectory data includes the location information of the target terminal's historically passed cells, and the time information of the target terminal passing through each historically passed cell;
[0058] Input the terminal information, location information of historically passed cells, and time information of the target terminal into a pre-trained passed cell prediction model. The passed cell prediction model obtains the terminal features corresponding to the terminal information and the cell location features corresponding to the location information of historically passed cells. Furthermore, the time interval features of the target terminal passing through each adjacent historically passed cell are obtained based on the time information.
[0059] Obtaining the cell location characteristics of the target terminal's predicted passing cells based on the terminal characteristics, cell location characteristics, and time interval characteristics;
[0060] The cell location features of the predicted passing cells are processed with feature dimensionality reduction to obtain the reduced-dimensional location information of the predicted passing cells, and the predicted movement trajectory of the target terminal is generated and displayed based on the reduced-dimensional location information.
[0061] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0062] Obtaining terminal trajectory data of the target terminal; the terminal trajectory data includes the location information of the target terminal's historically passed cells, and the time information of the target terminal passing through each historically passed cell;
[0063] Input the terminal information, location information of historically passed cells, and time information of the target terminal into a pre-trained passed cell prediction model. The passed cell prediction model obtains the terminal features corresponding to the terminal information and the cell location features corresponding to the location information of historically passed cells. Furthermore, the time interval features of the target terminal passing through each adjacent historically passed cell are obtained based on the time information.
[0064] Obtaining the cell location characteristics of the target terminal's predicted passing cells based on the terminal characteristics, cell location characteristics, and time interval characteristics;
[0065] The cell location features of the predicted passing cells are processed with feature dimensionality reduction to obtain the reduced-dimensional location information of the predicted passing cells, and the predicted movement trajectory of the target terminal is generated and displayed based on the reduced-dimensional location information.
[0066] The above-mentioned terminal movement trajectory display method, device, computer equipment, storage medium and computer program product obtain the location information of the historical route cells in the terminal trajectory data of the target terminal, as well as the time information of the target terminal passing through the historical route cells, and then combine the terminal information of the target terminal to input the above information into a pre-trained route cell prediction model, and obtain the terminal characteristics and cell location characteristics corresponding to the terminal information through the prediction model, and obtain the time interval characteristics of the target terminal passing through each adjacent historical route cell based on the time information; obtain the cell location characteristics of the predicted route cell of the target terminal based on the above-mentioned characteristics; then perform feature dimensionality reduction processing on the obtained cell location characteristics of the predicted route cell to obtain the reduced dimensionality location information of the predicted route cell, and generate and display the predicted movement trajectory of the target terminal based on the reduced dimensionality location information. This application uses a pre-trained route cell prediction model to predict the route cells of a terminal containing location information, time information and terminal information, and performs feature dimensionality reduction processing on the obtained predicted route cell to obtain reduced dimensionality location information, and then generates and displays the predicted movement trajectory based on the reduced dimensionality location information. The location granularity of a terminal's visit is at the cell level. However, the location information contained in the cell does not contain longitude, latitude, or pixel coordinates, so the movement trajectory cannot be directly visualized. The above method can visualize this type of trajectory data without longitude and latitude. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0068] FIG1 is a diagram illustrating an application environment of a method for displaying a terminal movement trajectory according to an embodiment;
[0069] FIG2 is a schematic diagram of a process of displaying a terminal movement trajectory according to an embodiment;
[0070] FIG3 is a schematic diagram of a flow chart of the steps of training a transit cell prediction model in one embodiment;
[0071] FIG4 is a schematic flow chart of an attention calculation step in one embodiment;
[0072] FIG5 is a schematic diagram showing a terminal movement trajectory in one embodiment;
[0073] FIG6 is a schematic diagram of the structure of a transit cell prediction model according to an embodiment;
[0074] FIG7 is a structural block diagram of a terminal movement trajectory display device in one embodiment;
[0075] FIG8 is a diagram showing the internal structure of a terminal movement trajectory display device in one embodiment. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0077] The terminal movement trajectory display method provided in the embodiments of the present application can be applied in the application environment shown in Figure 1. In this embodiment, the target terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated with the server 104 or placed in the cloud or other network servers. Server 104 obtains terminal trajectory data of target terminal 102; the terminal trajectory data includes the location information of target terminal 102's historically passed cells and the time information of target terminal 102's passage through each historically passed cell. Server 104 inputs the target terminal 102's terminal information, the location information of the historically passed cells, and the time information into a pre-trained passed cell prediction model. The passed cell prediction model obtains terminal features corresponding to the terminal information, cell location features corresponding to the location information of the historically passed cells, and, based on the time information, obtains the time interval features of the target terminal 102's passage through each adjacent historically passed cell. Based on the terminal features, cell location features, and time interval features, server 104 obtains the cell location features of the predicted passed cells. Server 104 performs feature dimensionality reduction on the cell location features of the predicted passed cells to obtain reduced-dimensionality location information of the predicted passed cells. Based on the reduced-dimensionality location information, server 104 generates and displays a predicted movement trajectory of target terminal 102. The passed cell prediction model can be deployed on server 104 so that requests can be sent to it via a network interface to obtain prediction results. The target terminal 102 may be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. The server 104 may be implemented as a standalone server or a server cluster consisting of multiple servers.
[0078] In an exemplary embodiment, as shown in FIG2 , a method for displaying a terminal movement trajectory is provided, which is described by taking the method applied to the server 104 in FIG1 as an example, and includes the following steps S202 to S208 . In particular:
[0079] Step S202: Acquire terminal trajectory data of the target terminal.
[0080] The terminal trajectory data includes the target terminal's historical location information for the cells it has passed through, as well as the time information of each cell it has passed through. Step S202 can obtain the target terminal's terminal trajectory data by acquiring the location data, time data, and terminal data uploaded by the target terminal. A cell, also known as a cellular cell, refers to the area covered by a base station or a portion of a base station (sector antenna) in a cellular mobile communication system, within which a mobile terminal can reliably communicate with the base station via a wireless channel.
[0081] In step S204, the terminal information, location information of historically passed cells, and time information of the target terminal are input into a pre-trained passed cell prediction model. The passed cell prediction model is used to obtain the terminal features corresponding to the terminal information and the cell location features corresponding to the location information of historically passed cells. The time interval features of the target terminal passing through each adjacent historically passed cell are obtained based on the time information.
[0082] Among them, terminal information can be device information of the terminal, such as device model, operating system version, etc., which can be used to provide users with personalized application or service recommendations. The location information of the cells that the mobile (target) terminal has passed through in the past period of time can refer to the location information of the cells (base stations) that the mobile (target) terminal has passed through. This data can record the cells to which the mobile terminal is connected at different time points, thereby obtaining the spatial movement location information of the mobile terminal. Cell location features can include location adjacency, location visit sequence, similar locations (two locations are located as similar locations if they are frequently visited by the same terminal), etc.
[0083] For example, the server can input the target terminal's terminal information and the location information of historically passed cells into a pre-trained passed cell prediction model to obtain terminal features corresponding to the target terminal and cell location features corresponding to historically passed cells. The passed cell prediction model then combines the time information with the location information of historically passed cells to obtain the time interval features of the target terminal's passage through each adjacent historically passed cell. Specifically, the time difference between the appearance time of each cell passed by the target terminal over a period of time and the appearance time of the next cell can be calculated to obtain the time interval features of adjacent historically passed cells.
[0084] Step S206: Obtain the cell location characteristics of the target terminal's predicted transit cells based on the terminal characteristics, cell location characteristics, and time interval characteristics.
[0085] Among them, the terminal characteristics of the target terminal, the location characteristics of the cells historically passed through, and the time interval characteristics can be calculated to obtain the cells that the target terminal may pass through in the future and the corresponding probabilities. The cell corresponding to the maximum probability is used as the predicted path cell, and its cell location characteristics are obtained.
[0086] Step S208 , performing feature dimensionality reduction processing on the cell location features of the predicted passed cells to obtain the reduced-dimensionality location information of the predicted passed cells, and generating and displaying the predicted movement trajectory of the target terminal based on the reduced-dimensionality location information.
[0087] To perform dimensionality reduction on the location features of the predicted transit cells, dimensionality reduction algorithms such as principal component analysis or t-distribution neighborhood embedding can be used. These algorithms can reduce high-dimensional cell location features to a lower-dimensional feature space, reducing the number of features while preserving the data's primary structure and characteristics. After obtaining the reduced location information, the reduced location information can be combined with time information to generate a trajectory through interpolation or other methods. The generated trajectory can be displayed using map visualization tools, intuitively presenting the target terminal's predicted trajectory.
[0088] In the above-mentioned terminal movement trajectory display method, a pre-trained path cell prediction model is used to predict the path cells of the terminal, which includes location information, time information, and terminal information. The predicted path cells are then subjected to feature dimensionality reduction to obtain reduced-dimensional location information. The predicted movement trajectory is then generated and displayed based on this reduced-dimensional location information. The location granularity of the terminal's visit is at the cell level, and the location information contained in the cell does not contain longitude, latitude, or pixel coordinates, making it impossible to directly visualize the movement trajectory. The above-mentioned method can visualize this type of trajectory data without longitude and latitude.
[0089] In an exemplary embodiment, as shown in FIG3 , the training step of the transit cell prediction model includes:
[0090] Step S301: Acquire sample terminal trajectory data of a sample terminal.
[0091] The sample terminal trajectory data includes the location information of the cells that the sample terminal has passed through historically, and the time information of the sample terminal passing through each cell that the sample terminal has passed through historically.
[0092] Step S302 : Input the terminal information, location information of historically passed cells, and time information of the sample terminal into the passed cell prediction model to be trained, and obtain a composite representation of the trajectory of the sample terminal through the passed cell prediction model to be trained.
[0093] The composite trajectory representation represents the terminal characteristics of the sample terminal, the location characteristics of the cells it has historically passed through, and the time interval characteristics corresponding to the time information. For example, the terminal information, location information, and time information can be combined into a matrix; the location information can be encoded or converted into a vector representation, and the time information can be processed and input into the model. Ultimately, the model output yields a composite representation of the sample terminal's trajectory.
[0094] Step S303: Obtain predicted passing cells based on the trajectory composite representation and the location information of the cells adjacent to the current cell.
[0095] The current cell is one of the cells that the sample terminal has historically passed through. The trajectory composite representation can be in vector or matrix form. For example, the matrix corresponding to the trajectory composite representation can be multiplied by the matrices corresponding to the location information of each cell adjacent to the current cell to obtain the corresponding predicted value. The cell with the largest predicted value is then used as the predicted passed cell.
[0096] Step S304 : Acquire a positive sample cell corresponding to the current cell and a negative sample cell corresponding to the current cell according to the sample terminal trajectory data.
[0097] Positive sample cells can refer to cells with similar characteristics to the current cell, or they can be cells that immediately follow it in the trajectory. Based on the historical cell information passed in the trajectory data, one or more cells following the current cell can be found as positive sample cells. Negative sample cells can refer to cells with different characteristics from the current cell, or they can be cells that do not appear in the trajectory. Based on other cell information in the trajectory data, some cells that are different from the current cell can be selected as negative sample cells.
[0098] Step S305 , obtaining a loss value of a traveled cell prediction model based on the trajectory composite representation, the positive sample cells, and the negative sample cells, and training the traveled cell prediction model based on the loss value.
[0099] Among them, a suitable loss function can be selected to calculate the loss value, such as the cross-entropy loss function and the mean square error loss function. For example, the matrix corresponding to the trajectory composite representation can be multiplied by the matrix corresponding to the location information of the positive sample cell to obtain the corresponding positive sample prediction value. Similarly, the prediction value of the negative sample can be obtained. The predicted values of the positive and negative samples are then substituted into the cross-entropy loss function to obtain the loss value of the transit cell prediction model. The loss value can be used to backpropagate and update the model parameters to minimize the loss value, that is, the transit cell prediction model can be trained.
[0100] In this embodiment, the terminal information, location information, and time information of the sample terminal are input into the sample terminal to obtain a composite trajectory representation. Based on the composite trajectory representation and the location information of each adjacent cell, the predicted transit cells are determined. Positive and negative samples are obtained from the sample terminal trajectory data, and the loss value of the transit cell prediction model is calculated to further train the transit cell prediction model. By utilizing the terminal information, location information, and time information, potential information in the sample terminal trajectory data can be mined, thereby improving the utilization and value of the data. Using the loss values obtained from the positive and negative samples to train the model can improve the model's prediction accuracy.
[0101] In an exemplary embodiment, obtaining a composite representation of the trajectory of a sample terminal through a to-be-trained cell prediction model includes:
[0102] Step 1: Embed the terminal information of the sample terminal and the location information of the historically passed cells through the trained cell prediction model to obtain the terminal embedding matrix corresponding to the terminal information and the location embedding matrix corresponding to the location information;
[0103] Among them, an embedding layer can be used to embed the terminal information and the location information of the cells passed through historically to obtain the corresponding embedding matrix. Among them, for the terminal information, a terminal embedding layer can be used to map the terminal information to a real vector space with a lower dimension, thereby obtaining the terminal embedding matrix corresponding to the terminal information. This embedding matrix can capture the semantics and characteristics of the terminal information. For the embedding processing of the location information of the cells passed through historically, a position embedding layer can be used to map the location information of each cell to a real vector space with a lower dimension, thereby obtaining the position embedding matrix corresponding to the location information. This embedding matrix can capture the position relationship and characteristics between different cells.
[0104] Step 2: After adding the terminal embedding matrix and the position embedding matrix, the component of the current cell is used as the first representation vector, and the component of the target cell is used as the second representation vector; the component of the position embedding matrix where the current cell is located is used as the third representation vector; the time interval between the current cell and the target cell is embedded according to the time information to obtain the fourth representation vector; based on the first representation vector, the second representation vector, the third representation vector and the fourth representation vector, attention calculation is performed, and after traversing all cells in the sample terminal trajectory data whose time information is before the current cell as the target cell, a composite representation of the sample terminal trajectory is obtained.
[0105] Among them, for time information, first, the time interval needs to be converted into a representation suitable for neural network processing. Some standard representation methods can be used, such as normalizing the time interval to a suitable range, such as [0, 1] or [-1, 1]; then the normalized time interval is used as input and embedded through an embedding layer to map the time interval to a low-dimensional vector space. After this processing, the fourth representation vector can contain the time interval information between the current cell and the target cell and can be used as part of the subsequent attention calculation. It should be understood that when using the representation vector for attention calculation, an attention mechanism can be used to calculate the importance of the comprehensive representation vector in different cells. The first, second, third, and fourth representation vectors can be used as inputs to the attention mechanism, and then the importance of each cell can be calculated using the attention weight. Based on the results of the attention calculation, all cells in the sample terminal trajectory data whose time information precedes the current cell are traversed as target cells for attention calculation, and then the composite representation of the sample terminal trajectory is obtained based on the sum of all attention calculation results.
[0106] In this embodiment, the terminal embedding matrix is added to the position embedding matrix to obtain the representation vector corresponding to the current cell and the representation vector corresponding to the target cell, and then the representation vector corresponding to the current cell is obtained through the position embedding matrix, and then the time interval representation vector is obtained through the time interval between the current cell and the target cell, and then attention calculation is performed on all the above vectors, and after the target cell traverses all cells before the current cell, all attention calculation results are summed to obtain the trajectory composite representation of the sample terminal. In the above embodiment, the attention mechanism can help the model better understand the relationship between the input data, thereby extracting features with more representation capabilities. Through attention calculation, the model can dynamically assign weights between terminal information, location information and time information, so that the model can better capture the correlation and importance between the data. It also makes the representation accuracy of the trajectory composite representation of the sample terminal higher.
[0107] In an exemplary embodiment, as shown in FIG4 , performing attention calculation based on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector includes:
[0108] Step S402 : performing mapping processing based on preset parameters on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector to obtain a processing matrix.
[0109] The preset parameters are obtained by transposing the query parameters and multiplying them by the key parameters.
[0110] Step S404 : performing mapping processing based on the value parameter on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector to obtain a value matrix.
[0111] Step S406: Perform attention calculation on the processing matrix and the value matrix.
[0112] It should be understood that the query parameters are first transposed to obtain a transposed query parameter matrix, and the transposed query parameter matrix is matrix multiplied with the key parameter matrix to obtain a new parameter matrix, and the new parameter matrix is used as the preset parameter. The above-mentioned representation vector is mapped based on the preset parameters to obtain a processing matrix and preset parameters. Preset parameter matrices, such as weight matrices and bias vectors, can also be defined for the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector. Each representation vector is linearly transformed with the corresponding preset parameter matrix, and a bias term is added to obtain a processed representation vector. The processed representation vectors are combined into a processing matrix, and they can be connected by column to form a new matrix. The processing matrix and the value matrix are then subjected to attention calculation.
[0113] In this embodiment, the preset parameters are obtained by transposing the query parameters and then multiplying them with the key parameters. The matrix corresponding to the preset parameters can be used for subsequent attention weighting and feature fusion, thereby achieving more flexible and complex feature association and extraction. The query parameter matrix (query matrix) in the attention mechanism is removed from the algorithm, reducing the number of parameters and improving training efficiency.
[0114] In an exemplary embodiment, the sample terminal trajectory data is composed of a plurality of sub-terminal trajectory data, and each sub-terminal trajectory data is used to connect adjacent cells;
[0115] Based on the sample terminal trajectory data, a positive sample cell corresponding to the current cell and a negative sample cell corresponding to the current cell are obtained, including: obtaining the current cell and adjacent cells adjacent to the current cell; obtaining target sub-terminal trajectory data starting from the current cell from the sub-terminal trajectory data, and using the cell where the target sub-terminal trajectory data ends as the positive sample cell; and using cells other than the positive sample cell among the adjacent cells as negative sample cells.
[0116] It should be understood that obtaining the current cell and adjacent cells adjacent to the current cell refers to obtaining information about the cell covered by a specific wireless base station (usually a base station or cell) and other adjacent cells in a mobile communication network. After obtaining information about other adjacent cells, the target sub-terminal trajectory data starting from the current cell is obtained from the sub-terminal trajectory data, and the cell where the target sub-terminal trajectory data ends is used as a positive sample cell; the cells other than the positive sample cell in the adjacent cells are used as negative sample cells.
[0117] In the embodiment of the present application, the positive sample cells and negative sample cells obtained through the above steps can improve the accuracy and efficiency of model training.
[0118] In an exemplary embodiment, obtaining a loss value of a transit cell prediction model based on the trajectory composite representation, the positive sample cells, and the negative sample cells, and training the transit cell prediction model based on the loss value includes:
[0119] The positive sample prediction value is obtained based on the trajectory composite representation of the sub-terminal trajectory data before the current cell and the cell characteristics corresponding to the positive sample cell; the negative sample prediction value is obtained based on the trajectory composite representation of the sub-terminal trajectory data before the current cell and the cell characteristics corresponding to the negative sample cell.
[0120] Among them, the trajectory composite representation of the sub-terminal trajectory data before the current cell can be obtained through the passed cell prediction model, and then the cell features corresponding to the positive sample cell and the negative sample cell are extracted, and then the cell features of the positive and negative sample cells are multiplied with the trajectory composite representation to obtain the predicted values of the positive sample cell and the negative sample cell.
[0121] According to the positive sample prediction value and the negative sample prediction value, the loss value of the passed cell prediction model is obtained; the loss value is negatively correlated with the positive sample prediction value and positively correlated with the negative sample prediction value; the passed cell prediction model is trained based on the loss value.
[0122] The cross-entropy loss function can be used to calculate the predicted values for positive and negative samples to obtain the loss value of the transit cell prediction model. The transit cell prediction model is then trained based on this loss value. In the cross-entropy loss function, the loss value is negatively correlated with the predicted value for positive samples and positively correlated with the predicted value for negative samples. Therefore, during training, the corresponding standard value for positive samples is kept as close to 1 as possible, and the corresponding standard value for negative samples is kept as close to 0 as possible, to minimize the loss value of the transit cell prediction model.
[0123] In this embodiment, using positive samples and negative samples for training can help the transit cell prediction model learn to distinguish the features and associations between positive sample cells and negative sample cells, which can improve the prediction accuracy of the transit cell prediction model for the transit cells, thereby improving the prediction performance of the transit cell prediction model.
[0124] In an exemplary embodiment, after obtaining the sample terminal trajectory data of the sample terminal, the method further includes: performing sliding window sampling processing on the sample terminal trajectory data according to a preset sliding size and a preset step size, and cropping the terminal trajectory data located in the sliding window during the sliding process to obtain cropped training sample terminal trajectory data.
[0125] Inputting the terminal information, location information and time information of the historically passed cells of the sample terminal into the passed cell prediction model to be trained, including: obtaining a triplet based on the training sample terminal trajectory data; the triplet includes the terminal information, location information and time information; and inputting the triplet into the passed cell prediction model to be trained for the passed cell prediction model to be trained.
[0126] It should be understood that the sample terminal trajectory data is subjected to sliding window sampling processing according to a preset sliding size and a preset step size, and the terminal trajectory data located in the sliding window during the sliding process is cropped. The resulting multiple cropped training sample terminal trajectory data can cover all cell information in the sample terminal trajectory data, and can fully utilize the sequence information contained therein to train the transit cell prediction model. Each training sample terminal trajectory data is converted into a triple and input into the transit cell prediction model to be trained for the transit cell prediction model to be trained. Among them, combining terminal information, location information, and time information into a triple can better retain and express the terminal's behavioral characteristics, location information, and time association, and can improve the transit cell prediction model's ability to understand user behavior and environment.
[0127] In an exemplary embodiment, a predicted movement trajectory of a target terminal is generated and displayed based on the reduced-dimensionality position information, including: obtaining two-dimensional position information of predicted passing cells based on the reduced-dimensionality position information; determining trajectory points of predicted passing cells based on the two-dimensional information, connecting the current trajectory points of the target terminal with the trajectory points of the predicted passing cells, and obtaining and displaying the predicted movement trajectory of the target terminal.
[0128] Among them, the two-dimensional position information of the predicted passing cells is obtained based on the position information after dimensionality reduction, which can be achieved by mapping the position features after dimensionality reduction onto a two-dimensional plane. For example, a commonly used method is to use algorithms such as multidimensional scaling analysis or t-distribution neighborhood embedding to map high-dimensional features to two-dimensional space. Based on the two-dimensional position information after dimensionality reduction, the trajectory points of the predicted passing cells are determined, and the reduced dimensionality position information can be clustered by a clustering algorithm to obtain the trajectory points of each predicted passing cell. The current trajectory point of the target terminal is connected with the trajectory point of the predicted passing cell, and the current position of the target terminal can be connected with the trajectory point of the predicted passing cell by interpolation or finding the nearest neighbor to obtain the predicted movement trajectory of the target terminal. Finally, the predicted movement trajectory of the target terminal can be displayed on the map using a map visualization tool (as shown in Figure 5), showing the predicted movement trajectory of the target terminal in an intuitive way. This can help users understand the possible movement path of the target terminal more intuitively.
[0129] In an exemplary embodiment, the terminal movement trajectory display method may specifically include:
[0130] Step a: training the transit cell prediction model to be trained. The transit cell prediction model can be shown in FIG6 . Obtain the sample terminal trajectory data of the sample terminal; the sample terminal trajectory data includes the location information of the historical transit cells of the sample terminal, and the time information of the sample terminal passing through each historical transit cell; perform sliding window sampling processing on the sample terminal trajectory data according to the preset sliding size and the preset step size, and crop the terminal trajectory data located in the sliding window during the sliding process to obtain cropped training sample terminal trajectory data; wherein, using sliding window sampling can learn more location information. Input the terminal information, location information and time information of the historical transit cells of the sample terminal into the transit cell prediction model to be trained, including: obtaining a triplet based on the training sample terminal trajectory data; the triplet includes terminal information, location information and time information; inputting the triplet into the transit cell prediction model to be trained for the transit cell prediction model to be trained.
[0131] Among them, the triplet can be in the form of (u i ,c k ,t k ),u i represents the i-th terminal, c k Represents u i The kth location visited, t k Represents u i The arrival time of the kth cell visited.
[0132] A triplet containing the terminal information of a sample terminal, the location information of historically passed cells, and the time information is input into the passed cell prediction model to be trained, and the terminal information of the sample terminal and the location information of historically passed cells are embedded by the passed cell prediction model to obtain a terminal embedding matrix corresponding to the terminal information and a position embedding matrix corresponding to the location information; after adding the terminal embedding matrix and the position embedding matrix, the component where the current cell is located is used as the first representation vector, and the component where the target cell is located is used as the second representation vector; the component where the current cell is located in the position embedding matrix is used as the third representation vector; the time interval between the current cell and the target cell is embedded according to the time information to obtain a fourth representation vector; the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector are mapped based on preset parameters to obtain a processing matrix; the preset parameters are obtained by transposing the query parameters and multiplying them with the key parameters.
[0133] Different from the processing method of the related art, in some embodiments, the query matrix is not used because Can be converted to The form of the method steps are as follows:
[0134] W Q , W K They are query and key parameter matrices respectively. is the i-th component of the terminal embedding matrix plus the position embedding matrix, is the jth component of the terminal embedding matrix plus the position embedding matrix, is the i-th component of the position embedding matrix, is the value after embedding the time interval between the i-th visit time and the j-th visit time.
[0135] W K (W Q ) T As the new W K .because is obtained through embedding processing, so and (W Q ) T They can be further multiplied to form the corresponding embedding matrix. In simple terms, the query matrix can be merged into other matrices after mathematical transformation.
[0136] The first representation vector, the second representation vector, the third representation vector, and the fourth representation vector are mapped based on the value parameters to obtain a value matrix. Attention calculation is performed on the processing matrix and the value matrix. After traversing all cells in the sample terminal trajectory data whose time information precedes the current cell as the target cell, a composite representation of the sample terminal's trajectory is obtained. The composite trajectory representation characterizes the terminal characteristics of the sample terminal, the location characteristics of the historically passed cells, and the time interval characteristics corresponding to the time information.
[0137] The predicted transit cells are obtained based on the composite trajectory representation and the location information of the cells adjacent to the current cell. The current cell is one of the cells that the sample terminal has historically passed through. The sample terminal trajectory data is composed of multiple sub-terminal trajectory data, and each sub-terminal trajectory data is used to connect adjacent cells. The current cell and the adjacent cells adjacent to the current cell are obtained. From the sub-terminal trajectory data, the target sub-terminal trajectory data with the current cell as the starting point is obtained, and the cell where the target sub-terminal trajectory data ends is used as the positive sample cell. The cells in the adjacent cells other than the positive sample cell are used as negative sample cells. The positive sample prediction value is obtained based on the composite trajectory representation of the sub-terminal trajectory data before the current cell and the cell characteristics corresponding to the positive sample cell.
[0138] Based on the composite trajectory representation of the sub-terminal trajectory data before the current cell and the cell characteristics corresponding to the negative sample cell, the negative sample prediction value is obtained; based on the positive sample prediction value and the negative sample prediction value, the loss value of the transit cell prediction model is obtained; the loss value is negatively correlated with the positive sample prediction value and positively correlated with the negative sample prediction value; and the transit cell prediction model is trained based on the loss value.
[0139] Step b: Predict the transit cells using a pre-trained transit cell prediction model. Obtain the terminal trajectory data of the target terminal; the terminal trajectory data includes the location information of the target terminal's historical transit cells and the time information of the target terminal's passage through each historical transit cell. Input the target terminal's terminal information, the location information of the historical transit cells, and the time information into the pre-trained transit cell prediction model. The transit cell prediction model obtains the terminal features corresponding to the terminal information and the cell location features corresponding to the location information of the historical transit cells. The time interval features of the target terminal's passage through each adjacent historical transit cell are obtained based on the time information. The cell location features of the target terminal's predicted transit cells are obtained based on the terminal features, the cell location features, and the time interval features. Feature dimensionality reduction processing is performed on the cell location features of the predicted transit cells to obtain reduced-dimensionality location information of the predicted transit cells. Based on the reduced-dimensionality location information, two-dimensional location information of the predicted transit cells is obtained. The trajectory points of the predicted transit cells are determined based on the two-dimensional information. The current trajectory points of the target terminal are connected with the trajectory points of the predicted transit cells to obtain and display the predicted movement trajectory of the target terminal.
[0140] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0141] Based on the same inventive concept, the embodiments of the present application also provide a terminal movement trajectory display device for implementing the terminal movement trajectory display method involved above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of one or more terminal movement trajectory display device embodiments provided below can be referred to the limitations of the terminal movement trajectory display method above, and will not be repeated here.
[0142] In an exemplary embodiment, as shown in FIG7 , a terminal movement trajectory display device 700 is provided, comprising: a data acquisition module 701 , a feature extraction module 702 , a cell prediction module 703 , and a feature dimension reduction module 704 , wherein:
[0143] The data acquisition module 701 is used to acquire the terminal trajectory data of the target terminal; the terminal trajectory data includes the location information of the target terminal's historically passed cells, and the time information of the target terminal passing through each historically passed cell;
[0144] The feature extraction module 702 is configured to input the terminal information, location information of historically passed cells, and time information of the target terminal into a pre-trained passed cell prediction model, obtain terminal features corresponding to the terminal information, cell location features corresponding to the location information of historically passed cells, and obtain time interval features of the target terminal passing through adjacent historically passed cells based on the time information.
[0145] The cell prediction module 703 is used to obtain the cell location characteristics of the target terminal's predicted transit cells based on the terminal characteristics, cell location characteristics, and time interval characteristics;
[0146] The feature dimension reduction module 704 is used to perform feature dimension reduction processing on the cell location features of the predicted passed cells to obtain the reduced dimension location information of the predicted passed cells, and generate and display the predicted movement trajectory of the target terminal based on the reduced dimension location information.
[0147] In an exemplary embodiment, the terminal movement trajectory display device further includes a model training module for obtaining sample terminal trajectory data of a sample terminal; the sample terminal trajectory data includes the location information of the sample terminal's historically passed cells, and the time information of the sample terminal passing through each historically passed cell; the terminal information, location information of the historically passed cells, and time information of the sample terminal are input into the passed cell prediction model to be trained, and a composite representation of the trajectory of the sample terminal is obtained through the passed cell prediction model to be trained; the composite representation of the trajectory characterizes the terminal characteristics of the sample terminal, the location characteristics of the historically passed cells, and the time interval characteristics corresponding to the time information; a predicted passed cell is obtained based on the composite representation of the trajectory and the location information of each cell adjacent to the current cell; the current cell is one of the historical passed cells of the sample terminal; a positive sample cell corresponding to the current cell and a negative sample cell corresponding to the current cell are obtained based on the sample terminal trajectory data; a loss value of the passed cell prediction model is obtained based on the composite representation of the trajectory, the positive sample cell, and the negative sample cell, and the passed cell prediction model is trained based on the loss value.
[0148] In an exemplary embodiment, the above-mentioned model training module is also used to embed the terminal information of the sample terminal and the location information of the historical passed cells through the passed cell prediction model to be trained, and obtain the terminal embedding matrix corresponding to the terminal information and the position embedding matrix corresponding to the location information; after adding the terminal embedding matrix and the position embedding matrix, the component where the current cell is located is used as the first representation vector, and the component where the target cell is located is used as the second representation vector; the component where the current cell is located in the position embedding matrix is used as the third representation vector; the time interval between the current cell and the target cell is embedded according to the time information to obtain the fourth representation vector; attention calculation is performed based on the first representation vector, the second representation vector, the third representation vector and the fourth representation vector, and after traversing all the cells in the sample terminal trajectory data, the other cells whose time information is before the current cell are taken as the target cell, a composite representation of the trajectory of the sample terminal is obtained.
[0149] In an exemplary embodiment, the above-mentioned model training module is also used to perform mapping processing on the first representation vector, the second representation vector, the third representation vector and the fourth representation vector based on preset parameters to obtain a processing matrix; the preset parameters are obtained by transposing the query parameters and multiplying them with the key parameters; the first representation vector, the second representation vector, the third representation vector and the fourth representation vector are mapped based on value parameters to obtain a value matrix; and attention calculation is performed on the processing matrix and the value matrix.
[0150] In an exemplary embodiment, the model training module is further configured to obtain the current cell and adjacent cells adjacent to the current cell; obtain target sub-terminal trajectory data starting from the current cell from the sub-terminal trajectory data, and use the cell where the target sub-terminal trajectory data ends as a positive sample cell; and use cells other than the positive sample cell among the adjacent cells as negative sample cells. The sample terminal trajectory data is composed of multiple sub-terminal trajectory data, each of which is used to connect adjacent cells.
[0151] In an exemplary embodiment, the above-mentioned model training module is also used to obtain a positive sample prediction value based on the trajectory composite representation of the sub-terminal trajectory data before the current cell and the cell characteristics corresponding to the positive sample cell; obtain a negative sample prediction value based on the trajectory composite representation of the sub-terminal trajectory data before the current cell and the cell characteristics corresponding to the negative sample cell; obtain a loss value of the passing cell prediction model based on the positive sample prediction value and the negative sample prediction value; the loss value is negatively correlated with the positive sample prediction value and positively correlated with the negative sample prediction value; and train the passing cell prediction model based on the loss value.
[0152] In an exemplary embodiment, the above-mentioned model training module is also used to perform sliding window sampling processing on the sample terminal trajectory data according to a preset sliding size and a preset step size, and to crop the terminal trajectory data located in the sliding window during the sliding process to obtain cropped training sample terminal trajectory data; the terminal information, location information of the historical passed cells, and time information of the sample terminal are input into the passed cell prediction model to be trained, including: obtaining a triplet based on the training sample terminal trajectory data; the triplet includes terminal information, location information, and time information; and inputting the triplet into the passed cell prediction model to be trained for training the passed cell prediction model.
[0153] In an exemplary embodiment, the feature dimensionality reduction module 704 is also used to obtain the two-dimensional position information of the predicted passing cell based on the reduced dimensionality position information; determine the trajectory points of the predicted passing cell based on the two-dimensional information, connect the current trajectory points of the target terminal with the trajectory points of the predicted passing cell, obtain the predicted moving trajectory of the target terminal and display it.
[0154] Each module in the terminal movement trajectory display device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0155] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in Figure 8. The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store terminal trajectory data and related processing data. The I / O interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a terminal movement trajectory display method is implemented.
[0156] Those skilled in the art will understand that the structure shown in FIG8 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0157] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0159] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0161] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0162] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for displaying a terminal movement trajectory, comprising: Obtain terminal trajectory data of the target terminal; The terminal trajectory data includes the location information of the target terminal's historically passed cells, and the time information of the target terminal passing through each of the historically passed cells; Inputting the terminal information of the target terminal, the location information of the historically passed cells, and the time information into a pre-trained passed cell prediction model, obtaining terminal features corresponding to the terminal information and cell location features corresponding to the location information of the historically passed cells through the passed cell prediction model, and obtaining time interval features of the target terminal passing through each adjacent historically passed cell based on the time information; Obtaining, based on the terminal characteristics, the cell location characteristics, and the time interval characteristics, the cell location characteristics of the target terminal's predicted transit cells; Perform feature dimensionality reduction processing on the cell location features of the predicted passing cells to obtain the reduced-dimensionality location information of the predicted passing cells, and generate and display the predicted movement trajectory of the target terminal based on the reduced-dimensionality location information.
2. The method according to claim 1, wherein The training step of the transit cell prediction model includes: Acquire sample terminal trajectory data of the sample terminal; the sample terminal trajectory data includes location information of cells that the sample terminal has historically passed through, and time information of each cell that the sample terminal has historically passed through; Inputting the terminal information of the sample terminal, the location information of the historically passed cells, and the time information into a to-be-trained passed cell prediction model, and obtaining a composite trajectory representation of the sample terminal through the to-be-trained passed cell prediction model; the composite trajectory representation characterizing the terminal characteristics of the sample terminal, the location characteristics of the historically passed cells, and the time interval characteristics corresponding to the time information; Obtaining a predicted transit cell based on the trajectory composite representation and location information of cells adjacent to the current cell; the current cell being one of the cells that the sample terminal has historically transited; Acquire, according to the sample terminal trajectory data, a positive sample cell corresponding to the current cell and a negative sample cell corresponding to the current cell; According to the trajectory composite representation, the positive sample cells and the negative sample cells, a loss value of the transit cell prediction model is obtained, and the transit cell prediction model is trained according to the loss value.
3. The method according to claim 2, wherein: The obtaining of the trajectory composite representation of the sample terminal by using the to-be-trained cell prediction model includes: Embedding the terminal information of the sample terminal and the location information of the historically passed cells by using the to-be-trained passed cell prediction model to obtain a terminal embedding matrix corresponding to the terminal information and a location embedding matrix corresponding to the location information; After adding the terminal embedding matrix and the position embedding matrix, the component where the current cell is located is used as the first representation vector, and the component where the target cell is located is used as the second representation vector; Taking the component of the position embedding matrix where the current cell is located as a third representation vector; Embedding the time interval between the current cell and the target cell according to the time information to obtain a fourth representation vector; Attention calculation is performed based on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector. After traversing other cells whose time information is before the current cell in all cells in the sample terminal trajectory data as target cells, a composite representation of the trajectory of the sample terminal is obtained.
4. The method according to claim 3, wherein: The performing attention calculation based on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector includes: Performing mapping processing on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector based on preset parameters to obtain a processing matrix; the preset parameters are obtained by multiplying the key parameters after transposing the query parameters; performing mapping processing based on value parameters on the first representation vector, the second representation vector, the third representation vector, and the fourth representation vector to obtain a value matrix; An attention calculation is performed on the processing matrix and the value matrix.
5. The method according to claim 2, wherein: The sample terminal trajectory data is composed of a plurality of sub-terminal trajectory data, each sub-terminal trajectory data is used to connect adjacent cells; The acquiring, according to the sample terminal trajectory data, a positive sample cell corresponding to the current cell and a negative sample cell corresponding to the current cell, includes: Acquire a current cell and adjacent cells adjacent to the current cell; Acquire target sub-terminal trajectory data starting from the current cell from the sub-terminal trajectory data, and use the cell where the target sub-terminal trajectory data ends as a positive sample cell; Among the adjacent cells, cells other than the positive sample cells are used as negative sample cells.
6. The method according to claim 5, wherein: Obtaining a loss value of the transit cell prediction model based on the trajectory composite representation, the positive sample cell, and the negative sample cell, and training the transit cell prediction model based on the loss value, includes: Obtaining a positive sample prediction value based on a trajectory composite representation of the sub-terminal trajectory data before the current cell and a cell feature corresponding to the positive sample cell; Obtaining a negative sample prediction value based on a trajectory composite representation of the sub-terminal trajectory data before the current cell and a cell feature corresponding to the negative sample cell; Obtaining a loss value of the transit cell prediction model based on the positive sample prediction value and the negative sample prediction value; wherein the loss value is negatively correlated with the positive sample prediction value and positively correlated with the negative sample prediction value; The transit cell prediction model is trained based on the loss value.
7. The method according to claim 2, further comprising: After obtaining the sample terminal trajectory data of the sample terminal, Performing sliding window sampling processing on the sample terminal trajectory data according to a preset sliding size and a preset step size, and clipping the terminal trajectory data located in the sliding window during the sliding process to obtain clipped training sample terminal trajectory data; The inputting the terminal information of the sample terminal, the location information of the historically passed cells, and the time information into the passed cell prediction model to be trained includes: Obtaining a triplet according to the training sample terminal trajectory data; the triplet includes the terminal information, the location information, and the time information; The triplet is input into a to-be-trained cell-passing prediction model for training the cell-passing prediction model.
8. The method according to claim 1, wherein Generating and displaying the predicted movement trajectory of the target terminal according to the dimension-reduced position information includes: Obtaining the two-dimensional position information of the predicted transit cell according to the reduced-dimensional position information; The predicted trajectory points of the passing cells are determined based on the two-dimensional information, and the current trajectory points of the target terminal are connected with the predicted trajectory points of the passing cells to obtain the predicted moving trajectory of the target terminal and display it.
9. The method according to claim 1, wherein: The acquiring of the terminal trajectory data of the target terminal includes: Uploading location data, time data, and terminal data via the target terminal; The terminal trajectory data of the target terminal is obtained according to the position data, the time data, and the terminal data.
10. The method according to claim 1, wherein The obtaining, according to the time information, time interval characteristics of the target terminal passing through each adjacent historically passed cell includes: Calculating the time difference between the appearance time of each cell passed by the target terminal in the past period of time and the appearance time of the next cell; According to the time difference, the time interval characteristics of adjacent historical passed cells are obtained.
11. The method according to claim 1, wherein The obtaining, based on the terminal characteristics, the cell location characteristics, and the time interval characteristics, of the cell location characteristics of the target terminal, includes: Calculating the terminal characteristics, location characteristics, and time interval characteristics of the target terminal's historically passed cells to obtain the cells that the target terminal may pass through in the future and the corresponding probabilities; The cell corresponding to the maximum probability is used as the predicted path cell, and the cell location characteristics of the predicted path cell are obtained.
12. A terminal movement trajectory display device, comprising: A data acquisition module is used to obtain the terminal trajectory data of the target terminal; The terminal trajectory data includes the location information of the target terminal's historically passed cells, and the time information of the target terminal passing through each of the historically passed cells; a feature extraction module, configured to input the terminal information of the target terminal, the location information of the historically passed cells, and the time information into a pre-trained passed cell prediction model, obtain terminal features corresponding to the terminal information, cell location features corresponding to the location information of the historically passed cells through the passed cell prediction model, and obtain, based on the time information, time interval features of the target terminal passing through each adjacent historically passed cell; A cell prediction module, configured to obtain the cell location characteristics of the cells predicted to be passed by the target terminal based on the terminal characteristics, the cell location characteristics, and the time interval characteristics; The feature dimensionality reduction module is used to perform feature dimensionality reduction processing on the cell location features of the predicted passing cell to obtain the reduced dimensionality location information of the predicted passing cell, and generate and display the predicted movement trajectory of the target terminal based on the reduced dimensionality location information.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.