A data processing method and device

By obtaining the road network matrix and user historical behavior matrix, computing the road vector and generating user behavior vectors, the problems of large computing overhead and poor interpretability in the prior art are solved, and a more efficient and intuitive user-geographic position relationship representation is achieved.

CN118410246BActive Publication Date: 2025-04-08DITU (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311481748.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2025-04-08
Estimated Expiration
2043-11-08

AI Technical Summary

Technical Problem

The prior art has high computational overhead and poor interpretability when dealing with user and geolocation relationships, especially matrix decomposition algorithms that rely on gradient descent methods make model tuning difficult.

Method used

By obtaining the road network matrix and the user history behavior matrix, the road vectors of each road are calculated, and combined with the user history behavior matrix, the user behavior vector is generated to represent the relationship between the user and the geographical location.

Benefits of technology

It reduces computational overhead, improves the interpretability of the model, and makes the representation of the user's relationship with geographical location more intuitive and efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118410246B_ABST
    Figure CN118410246B_ABST
Patent Text Reader

Abstract

A data processing method and device are disclosed. By obtaining a road network matrix and a user history behavior matrix, the user history behavior matrix includes multiple first roads, the first roads are the roads that the user has traveled on in the past, first road vectors corresponding to each first road are obtained according to the road network matrix, and user behavior vectors are obtained according to the first road vectors and the user history behavior matrix to characterize the relationship between the user and the geographical location. In this way, the computational overhead can be reduced and the interpretability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method and device. Background Art

[0002] With the development of Internet technology, geographic information systems and services are gradually applied to various life scenarios, such as recommendation of points of interest, recommendation of boarding points, prediction of travel departure points and destinations, etc. Among them, the relationship between users and geographic locations has an important impact on the push structure. The prior art generally uses a two-dimensional matrix to express the relationship between users and geographic locations through a matrix decomposition algorithm. Specifically, the rows and columns of the matrix are projected into a low-dimensional implicit space by reconstructing the matrix, and the rows and columns of similar matrices have similar representations by optimizing the least squares objective of the low-rank matrix. However, since the prior art relies on the gradient descent method to optimize the model, model tuning often requires a lot of experimental verification, resulting in high computational overhead. At the same time, for shallow matrix decomposition models and deep graph network models, there is no direct connection between the prediction results and the graph structure (such as cluster relationships, smoothness, etc.), resulting in poor interpretability. Summary of the invention

[0003] In view of this, an object of an embodiment of the present invention is to provide a data processing method and device that can reduce computational overhead and improve interpretability.

[0004] In a first aspect, an embodiment of the present invention provides a data processing method, the method comprising:

[0005] Acquire a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes a plurality of first roads, and the first roads are roads on which the user has traveled in the past;

[0006] Acquire a first road vector corresponding to each first road according to the road network matrix; and

[0007] A user behavior vector is acquired according to the first road vector and the user historical behavior matrix, where the user behavior vector is used to characterize the relationship between the user and the geographic location.

[0008] In some embodiments, the method further comprises:

[0009] In response to receiving the data acquisition request, determining push data according to the user behavior vector using a pre-trained neural network model; and

[0010] The push data is sent to the terminal device.

[0011] In some embodiments, acquiring the first road vector of each first road according to the road network matrix comprises:

[0012] Obtaining a graph Laplacian matrix corresponding to the road network matrix;

[0013] performing eigenvalue decomposition on the graph Laplacian matrix to obtain a left singular matrix; and

[0014] The first road vector is obtained according to the left singular matrix.

[0015] In some embodiments, the graph Laplacian matrix is ​​calculated by the following formula:

[0016]

[0017] Among them, A is the road network matrix, I is the diagonal unit matrix, and D is the diagonal matrix. is the square root inverse matrix of the diagonal matrix, A T is the transposed matrix of the road network matrix, and L is the graph Laplace matrix.

[0018] In some embodiments, the left singular matrix is ​​calculated by the following formula:

[0019] L=UΣV T

[0020] Where L is the graph Laplace matrix, U is the left singular matrix, Σ is the singular value, V is the right singular matrix, V T is the transpose of the right singular matrix.

[0021] In some embodiments, obtaining the first road vector according to the left singular matrix is ​​specifically:

[0022] The first predetermined number of columns of the left singular matrix are used as the first road vector.

[0023] In some embodiments, obtaining the user behavior vector according to the first road vector and the user historical behavior matrix includes:

[0024] The first road vectors corresponding to the first roads in the user historical behavior matrix are summed to obtain the user behavior vector.

[0025] In some embodiments, the user behavior vector is calculated by the following formula:

[0026]

[0027] Among them, h is the user behavior vector, T is the number of first paths in the user's historical behavior matrix, U[v bm ,:k] is the first road vector corresponding to the mth first road in the user's historical behavior matrix.

[0028] In some embodiments, the method further comprises:

[0029] In response to acquiring new data, the user behavior vector is updated according to the new data, the new data including a second road traveled by the user.

[0030] In some embodiments, updating the user behavior vector according to the new data includes:

[0031] Obtaining a second road vector corresponding to the second road;

[0032] Acquire an intermediate vector according to the second road vector and the user behavior vector; and

[0033] An updated user behavior vector is obtained according to the intermediate vector and the second road vector.

[0034] In a second aspect, an embodiment of the present invention provides a data processing device, the device comprising:

[0035] A data acquisition unit, used to acquire a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes a plurality of first roads, wherein the first roads are roads on which the user has traveled in the past;

[0036] A first road vector acquisition unit, configured to acquire a first road vector corresponding to each first road according to the road network matrix; and

[0037] A user behavior vector acquisition unit is used to acquire a user behavior vector according to the first road vector and the user historical behavior matrix, wherein the user behavior vector is used to characterize the relationship between the user and the geographical location.

[0038] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in the first aspect.

[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer program instructions, wherein the computer program instructions implement the method described in the first aspect when executed by a processor.

[0040] The technical solution of the embodiment of the present invention obtains a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes multiple first roads, the first roads are the roads that the user has traveled on in the past, obtains first road vectors corresponding to each first road according to the road network matrix, and obtains user behavior vectors according to the first road vectors and the user history behavior matrix to characterize the relationship between the user and the geographical location. Thus, the computational overhead can be reduced and the interpretability can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0042] Figure 1 is a schematic diagram of a data processing system according to an embodiment of the present invention;

[0043] Figure 2 is a flow chart of a data processing method according to an embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of a road network according to an embodiment of the present invention;

[0045] Figure 4 is a flowchart of obtaining a first road vector according to an embodiment of the present invention;

[0046] Figure 5 is a flow chart of updating a user behavior vector according to an embodiment of the present invention;

[0047] Figure 6 is a schematic diagram of a data processing device according to an embodiment of the present invention;

[0048] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present invention without the description of these details. In order to avoid confusing the essence of the present invention, known methods, processes, flows, components and circuits are not described in detail.

[0050] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0051] Unless the context clearly requires otherwise, the words "include", "comprising" and the like throughout this application should be interpreted as including rather than exclusive or exhaustive; that is, as meaning "including but not limited to".

[0052] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0053] Figure 1Schematic diagram of a data processing system according to an embodiment of the present invention. Figure 1 As shown, the data processing system of the embodiment of the present invention includes a terminal device 1 and a server 2. The terminal device 1 and the server 2 are connected in communication.

[0054] The server 2 obtains the user behavior vector in advance, and the user behavior vector is used to characterize the relationship between the user and the geographical location. The terminal device 1 sends a data acquisition request to the server, and the server 2 obtains the corresponding push data according to the user behavior vector and sends the push data to the terminal device 1.

[0055] The terminal device 1 is a terminal device used by a user, and the user may be a driver, a passenger, etc. The terminal device 1 may be implemented by a mobile phone, a tablet computer, a notebook computer, a desktop computer or other dedicated data processing terminals.

[0056] The server 2 has a data processing function, and may be a separate server or a server cluster consisting of multiple servers.

[0057] Figure 2 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 2 In the illustrated embodiment, the data processing method of the server includes the following steps:

[0058] Step S100: Obtain a road network matrix and a user history behavior matrix.

[0059] In this embodiment, the user historical behavior matrix includes a plurality of first roads, where the first roads are roads on which the user has historically traveled.

[0060] The server obtains road network data, the road network data includes a plurality of roads, and obtains a road network matrix according to the road network data, the road network matrix is ​​used to characterize the connectivity relationship between the various roads.

[0061] Specifically, Figure 3 is a schematic diagram of a road network according to an embodiment of the present invention. Figure 3 In the illustrated embodiment, eight roads in the road network data are taken as examples for illustration, namely W1-W8, wherein road W1 is connected to road W2, road W2 is connected to roads W1, W3, and W4, road W3 is connected to roads W2 and W5, road W4 is connected to roads W2 and W5, road W5 is connected to roads W3, W4, W6, and W7, road W6 is connected to road W5, road W7 is connected to roads W5 and W8, and road W8 is connected to road W7.

[0062] The server generates the road network matrix according to the connection relationship of each road in the road network data, wherein the rows and columns of the road network matrix are road identifiers, and the values ​​of the elements in the road network matrix represent the connectivity of the roads, wherein if the value of the element is 1, it means that the roads corresponding to the row and column are connected, and if the value of the element is 0, it means that the roads corresponding to the row and column are not connected or the row and column are the same road. That is, assuming that there are n roads in the road network, then the road network matrix is ​​an n*n matrix, and for the element a in the i-th row and j-th column of the road network matrix i,j , if the i-th road is connected to the j-th road, then a i,j =1, if i=j or the i-th road is not connected to the j-th road, then a i,j =0.

[0063] Therefore, Figure 3 Take the road network data shown in the figure as an example to illustrate, the corresponding road network matrix is ​​as follows:

[0064]

[0065] Furthermore, the server obtains the user's historical data from the database, the historical data including historical travel routes, summarizes the historical data to obtain the user's historical behavior, and generates a corresponding user historical behavior matrix, the user historical behavior matrix including multiple first roads, the first roads being the roads on which the user has traveled historically.

[0066] Assume that the historical data of a user includes two data "W8, Monday" and "W7, Tuesday", which means that the user drove on road W8 on Monday and on road W7 on Tuesday, then the generated user historical behavior matrix B = [W8, W7]. That is, the user historical behavior matrix includes multiple first roads, where the first roads are the roads that the user has driven in the past, and the multiple first roads are arranged in chronological order.

[0067] It should be understood that when the number of roads that the user has traveled on in history is relatively small, the following steps may not be performed. That is, the server obtains the number of roads that the user has traveled on in history, and if the number is less than a predetermined threshold, the process ends; if the number is greater than or equal to the predetermined threshold, the process proceeds to step S200.

[0068] It should also be understood that in the above examples, the user travels on one road per day. In actual scenarios, the user often travels on multiple consecutive roads each time.

[0069] Step S200: Acquire first road vectors corresponding to each first road according to the road network matrix.

[0070] In this embodiment, after obtaining the road network matrix, the server performs eigenvalue decomposition on the road network matrix to obtain the first road vector corresponding to each first road.

[0071] Specifically, Figure 4 FIG. 1 is a flowchart of obtaining a first road vector according to an embodiment of the present invention. Figure 4 As shown, the server obtains the first road vector corresponding to each first road according to the road network matrix, including the following steps:

[0072] Step S210: Obtain a graph Laplacian matrix corresponding to the road network matrix.

[0073] The graph Laplacian matrix is ​​obtained by calculation using the following formula:

[0074]

[0075] Among them, A is the road network matrix, I is the diagonal unit matrix, and D is the diagonal matrix. is the square root inverse matrix of the diagonal matrix, A T is the transposed matrix of the road network matrix, and L is the graph Laplace matrix.

[0076] The diagonal unit matrix I is an n*n matrix, the elements of the main diagonal of the diagonal unit matrix I are 1, and the other elements are 0. n is the number of roads in the road network.

[0077] The diagonal matrix D is an n*n diagonal matrix, and the values ​​on the diagonal of the matrix are D i =∑ j∈n a i,j Among them, a i,j is the element in the i-th row and j-th column in the road network matrix A.

[0078] Step S220: Perform eigenvalue decomposition on the graph Laplacian matrix to obtain a left singular matrix.

[0079] In this embodiment, the graph Laplacian matrix L is subjected to eigenvalue decomposition to obtain a left singular matrix. The eigenvalue decomposition may adopt a singular value decomposition algorithm.

[0080] Specifically, the formula for the singular value decomposition of the graph Laplacian matrix L is:

[0081] L=UΣV T

[0082] Where L is the graph Laplace matrix, U is the left singular matrix, Σ is the singular value matrix, V is the right singular matrix, V T is the transpose of the right singular matrix.

[0083] If the road network matrix A is an n*n matrix, then the graph Laplacian matrix L corresponding to the road network matrix A is also an n*n matrix. Therefore, after singular value decomposition, Σ is also an n*n matrix. Among them, each element on the main diagonal of Σ is a singular value, and the other elements are all 0.

[0084] Furthermore, the non-zero elements on the main diagonal of the singular value matrix Σ can be expressed as

[0085] The specific algorithm of singular value decomposition can refer to various existing calculation methods, and the embodiments of the present invention will not be described in detail here.

[0086] Step S230: Obtain the first road vector according to the left singular matrix.

[0087] In this embodiment, the server uses the first predetermined number of columns of the left singular matrix as the first road vector.

[0088] The predetermined number is k, and k is a positive integer greater than 1, that is, the first k columns of the left singular matrix are used as the first road vector.

[0089] Specifically, for the i-th road, its corresponding road vector is recorded as U[v i ,:k].

[0090] Thus, the road vectors of all roads in the road network matrix can be obtained, and then according to the first roads in the user history behavior matrix, the first road vectors corresponding to each first road can be obtained.

[0091] Assume that the user historical behavior matrix B = [W8, W7], that is, the user behavior matrix includes two first roads W7 and W8. Among the road vectors obtained above, the road vectors corresponding to the first roads W7 and W8 are determined as first road vectors, which are first road vectors U[v8,:k] and U[v7,:k] respectively.

[0092] Step S300: Obtain a user behavior vector according to the first road vector and the user historical behavior matrix.

[0093] In this embodiment, the user behavior vector is used to characterize the relationship between the user and the geographical location.

[0094] The user behavior vector is obtained by calculating the following formula:

[0095]

[0096] Among them, h is the user behavior vector, T is the number of first paths in the user's historical behavior matrix, U[v bm,:k] is the first road vector corresponding to the mth first road in the user's historical behavior matrix.

[0097] Assume that the user history behavior matrix B = [W8, W7], when T = 2, m = 1, v b1 is the first road vector U[v8,:k] of the first road W8 in the user's historical behavior matrix; when m=2, v b2 is the first road vector U[v7,:k] of the second road W7 of the user historical behavior matrix. At this time, the calculation formula of the user behavior vector is:

[0098] h=U[v8,:k]+U[v7,:k]

[0099] The embodiment of the present invention obtains a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes multiple first roads, the first roads are roads that the user has traveled on in the past, obtains first road vectors corresponding to each first road according to the road network matrix, and obtains user behavior vectors according to the first road vectors and the user history behavior matrix to characterize the relationship between the user and the geographical location. Thus, the computational overhead can be reduced and the interpretability can be improved.

[0100] In some embodiments, the data processing method further comprises the following steps:

[0101] Step S400: In response to acquiring new data, updating the user behavior vector according to the new data.

[0102] In this embodiment, the new data includes the second road traveled by the user.

[0103] Further, Figure 5 is a flow chart of updating user behavior vectors according to an embodiment of the present invention. Figure 5 In the illustrated embodiment, updating the user behavior vector according to the new data includes the following steps:

[0104] Step S410: Obtain a second road vector corresponding to the second road.

[0105] In step S230, the road vectors of all roads in the road network matrix can be obtained. Since the second road is also a road in the road network matrix, the second road vector corresponding to the second road can be obtained. The second road vector corresponding to the second road in the new data is recorded as U[v new ,:k].

[0106] Step S420: Acquire an intermediate vector according to the second road vector and the user behavior vector.

[0107] Specifically, a first matrix is ​​obtained according to the singular value matrix, and an intermediate vector is obtained according to the first matrix, the second road vector and the user behavior vector.

[0108] Wherein, the first matrix is ​​a diagonal matrix, and the values ​​on the diagonal are determined according to the singular value matrix. As mentioned above, the non-zero elements on the main diagonal of the singular value matrix Σ can be expressed as

[0109] Then the first matrix r can be:

[0110]

[0111] The elements of the main diagonal of the first matrix r are determined according to the singular value matrix, and the other elements are all zero.

[0112] Alternatively, the first matrix r can also be:

[0113]

[0114] The elements of the main diagonal of the first matrix r are determined according to the singular value matrix, and the other elements are all zero.

[0115] Furthermore, the intermediate vector is the product of the second road vector and the first matrix plus the user behavior vector.

[0116] Specifically, the calculation formula of the intermediate vector is as follows:

[0117] y new =h+U[v new ,:k]*r

[0118] Among them, U[v new ,:k] is the second road vector, h is the user behavior vector, y new is the intermediate vector and r is the first matrix.

[0119] Step S430: Obtain an updated user behavior vector according to the intermediate vector and the second road vector.

[0120] Among them, the calculation formula of the updated user behavior vector is as follows:

[0121] h new =y new +K(z new -y new )

[0122] Among them, h new is the updated user behavior vector, y new is the middle vector, z new =U[v new,:k], K is the first adjustment parameter.

[0123] The calculation formula of the first adjustment parameter K is as follows:

[0124]

[0125] Among them, K is the first adjustment parameter, Q is the second adjustment parameter, H2=σ2I, σ2 is a pre-set hyperparameter, and I is a diagonal unit matrix.

[0126] The calculation formula of the second adjustment parameter Q is as follows:

[0127] Q=hh T / k

[0128] Among them, Q is the second adjustment parameter, h is the user behavior vector before update, and h T is the transposed matrix of h, k is a predetermined number, and the value of k may be as described in the above step S230.

[0129] That is, obtaining the updated user behavior vector includes: calculating a second adjustment parameter according to the user behavior vector and the predetermined number, obtaining a first adjustment parameter according to the second adjustment parameter, and obtaining the updated user behavior vector according to the first adjustment parameter, the intermediate vector and the second road vector.

[0130] The present invention adopts a method for updating user behavior representation in a streaming data scenario, takes into account the structure of a road traffic network, combines user historical records and current new records, and generates a robust user vector representation.

[0131] The embodiment of the present invention obtains a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes multiple first roads, the first roads are roads that the user has traveled on in the past, obtains first road vectors corresponding to each first road according to the road network matrix, and obtains user behavior vectors according to the first road vectors and the user history behavior matrix to characterize the relationship between the user and the geographical location. Thus, the computational overhead can be reduced and the interpretability can be improved.

[0132] In some embodiments, the data processing method further comprises the following steps:

[0133] Step S500: In response to receiving a data acquisition request, push data is determined according to the user behavior vector using a pre-trained neural network model.

[0134] In this embodiment, after the server obtains the user behavior vector, in response to receiving the data acquisition request, the server determines the push data according to the user behavior vector through a pre-trained neural network model.

[0135] Specifically, when the server receives the data acquisition request, it obtains the user behavior vector corresponding to the user according to the user identifier in the data acquisition request, and determines the push data according to the user behavior vector through the pre-trained neural network model. The server can obtain the user behavior vectors of all users in advance and store them in a database, and obtain the corresponding user behavior vector in the database according to the user identifier.

[0136] In some embodiments, the user may be a passenger, and in a travel scenario, for a given starting point and end point, the user behavior vector and other features are input as features into a pre-trained neural network model to obtain a corresponding navigation path. In this case, the push data is the navigation path.

[0137] In some embodiments, the user can be a ride-hailing or taxi driver, obtain the user behavior vector corresponding to the driver, and obtain the driver's navigation path, input the user behavior vector and navigation path into a pre-trained neural network model, and the neural network model outputs the estimated travel time. In this case, the push data is the travel time of a given navigation path.

[0138] It should be noted that the specific implementation of the neural network model in the embodiment of the present invention is not limited, and it can be implemented based on various existing prediction models. In a specific implementation, the neural network model can be implemented by a multilayer perceptron (Multilayer Perceptron, MLP). Among them, the multilayer perceptron (Multilayer Perceptron, MLP) is a deep learning model based on a feedforward neural network (Feedforward Neural Network), which consists of multiple neuron layers, each of which is fully connected to the previous layer. The multilayer perceptron can be used to solve various machine learning problems such as classification, regression and clustering. Each neuron layer of the multilayer perceptron is composed of many neurons, wherein the input layer receives input features, the output layer gives the final prediction results, and the middle hidden layer is used to extract features and perform nonlinear transformations. Each neuron receives the output of the previous layer, performs weighted sum and activation function operations, and obtains the output of the current layer. Through continuous iterative training, the multilayer perceptron can automatically learn the complex relationship between the input features and predict new data.

[0139] Step S600: Send the push data to the terminal device.

[0140] In this embodiment, the server sends the acquired push data to the terminal device, and the terminal device displays the push data.

[0141] The embodiment of the present invention obtains a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes multiple first roads, the first roads are roads that the user has traveled on in the past, obtains first road vectors corresponding to each first road according to the road network matrix, and obtains user behavior vectors according to the first road vectors and the user history behavior matrix to characterize the relationship between the user and the geographical location. Thus, the computational overhead can be reduced and the interpretability can be improved.

[0142] Figure 6 Schematic diagram of a data processing device according to an embodiment of the present invention. Figure 6 In the illustrated embodiment, the data processing device includes a data acquisition unit 61, a first road vector acquisition unit 62, and a user behavior vector acquisition unit 63. The data acquisition unit 61 is used to acquire a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes a plurality of first roads, wherein the first roads are roads that the user has traveled on in the past. The first road vector acquisition unit 62 is used to acquire first road vectors corresponding to each first road according to the road network matrix. The user behavior vector acquisition unit 63 is used to acquire a user behavior vector according to the first road vector and the user history behavior matrix, wherein the user behavior vector is used to characterize the relationship between the user and the geographic location.

[0143] In some embodiments, the apparatus further comprises:

[0144] a request receiving unit, configured to, in response to receiving a data acquisition request, determine push data according to the user behavior vector using a pre-trained neural network model; and

[0145] A push data sending unit is used to send the push data to the terminal device.

[0146] In some embodiments, the first road vector acquisition unit includes:

[0147] A graph Laplace matrix acquisition subunit, used to acquire a graph Laplace matrix corresponding to the road network matrix;

[0148] a left singular matrix acquisition subunit, configured to perform eigenvalue decomposition on the graph Laplacian matrix to acquire a left singular matrix; and

[0149] The first road vector acquisition subunit is used to acquire the first road vector according to the left singular matrix.

[0150] In some embodiments, the graph Laplacian matrix is ​​calculated by the following formula:

[0151]

[0152] Among them, A is the road network matrix, I is the diagonal unit matrix, and D is the diagonal matrix. is the square root inverse matrix of the diagonal matrix, A T is the transposed matrix of the road network matrix, and L is the graph Laplace matrix.

[0153] In some embodiments, the left singular matrix is ​​calculated by the following formula:

[0154] L=UΣV T

[0155] Where L is the graph Laplace matrix, U is the left singular matrix, Σ is the singular value, V is the right singular matrix, V T is the transpose of the right singular matrix.

[0156] In some embodiments, obtaining the first road vector according to the left singular matrix is ​​specifically:

[0157] The first predetermined number of columns of the left singular matrix are used as the first road vector.

[0158] In some embodiments, the user behavior vector acquisition unit is used to:

[0159] The first road vectors corresponding to the first roads in the user historical behavior matrix are summed to obtain the user behavior vector.

[0160] In some embodiments, the user behavior vector is calculated by the following formula:

[0161]

[0162] Among them, h is the user behavior vector, T is the number of first paths in the user's historical behavior matrix, U[v bm ,:k] is the first road vector corresponding to the mth first road in the user's historical behavior matrix.

[0163] In some embodiments, the apparatus further comprises:

[0164] An updating unit is used to update the user behavior vector according to the new data in response to acquiring new data, wherein the new data includes a second road traveled by the user.

[0165] In some embodiments, the updating unit includes:

[0166] A second road vector acquisition subunit, configured to acquire a second road vector corresponding to the second road;

[0167] an intermediate vector acquisition subunit, configured to acquire an intermediate vector according to the second road vector and the user behavior vector; and

[0168] The user behavior vector updating subunit is configured to obtain an updated user behavior vector according to the intermediate vector and the second road vector.

[0169] The embodiment of the present invention obtains a road network matrix and a user history behavior matrix, wherein the user history behavior matrix includes multiple first roads, the first roads are roads that the user has traveled on in the past, obtains first road vectors corresponding to each first road according to the road network matrix, and obtains user behavior vectors according to the first road vectors and the user history behavior matrix to characterize the relationship between the user and the geographical location. Thus, the computational overhead can be reduced and the interpretability can be improved.

[0170] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present invention. Figure 7 The electronic device shown is a general data processing device, which includes a general computer hardware structure, which at least includes a processor 71 and a memory 72. The processor 71 and the memory 72 are connected via a bus 73. The memory 72 is suitable for storing instructions or programs executable by the processor 71. The processor 71 can be an independent microprocessor or a collection of one or more microprocessors. Thus, the processor 71 executes the instructions stored in the memory 72, thereby executing the method flow of the embodiment of the present invention as described above to realize the processing of data and the control of other devices. The bus 73 connects the above-mentioned multiple components together, and at the same time connects the above-mentioned components to the display controller 74 and the display device and the input / output (I / O) device 75. The input / output (I / O) device 75 can be a mouse, a keyboard, a modem, a network interface, a touch input device, a somatosensory input device, a printer, and other devices known in the art. Typically, the input / output device 75 is connected to the system via an input / output (I / O) controller 76.

[0171] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, devices (equipment) or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0172] The present invention is described with reference to flowcharts of methods, apparatuses (devices) and computer program products according to embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions.

[0173] These computer program instructions may be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.

[0174] These computer program instructions may also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.

[0175] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire a road network matrix and a user history behavior matrix of a single user, wherein the user history behavior matrix includes a plurality of first roads, where the first roads are roads on which the user has traveled in history; Acquire a first road vector corresponding to each first road according to the road network matrix; and Acquire a user behavior vector of a single user according to the first road vector and the user historical behavior matrix, wherein the user behavior vector is used to characterize the relationship between the user and the geographic location; In response to receiving the data acquisition request, acquiring a user behavior vector corresponding to the user according to the user identifier in the data acquisition request; Obtain corresponding push data according to the user behavior vector and send it to the terminal device; In response to acquiring new data, updating the user behavior vector according to the new data, the new data including a second road traveled by the user; Wherein, acquiring the first road vector of each first road according to the road network matrix comprises: Obtaining a graph Laplacian matrix corresponding to the road network matrix; performing eigenvalue decomposition on the graph Laplacian matrix to obtain a left singular matrix; and Acquire the first road vector according to the left singular matrix; Wherein, updating the user behavior vector according to the new data includes: Obtaining a second road vector corresponding to the second road; Obtain a first matrix according to the singular value matrix, wherein the elements of the main diagonal of the first matrix are determined according to the singular value matrix, and the other elements are all zero; Acquire an intermediate vector according to the first matrix, the second road vector and the user behavior vector; and An updated user behavior vector is obtained according to the intermediate vector and the second road vector.

2. The method according to claim 1, characterized in that The acquiring corresponding push data according to the user behavior vector includes: The push data is determined according to the user behavior vector through a pre-trained neural network model.

3. The method according to claim 1, characterized in that: The graph Laplacian matrix is ​​calculated by the following formula: Among them, A is the road network matrix, I is the diagonal unit matrix, and D is the diagonal matrix. is the square root inverse matrix of the diagonal matrix, A T is the transposed matrix of the road network matrix, and L is the graph Laplace matrix.

4. The method according to claim 3, characterized in that The left singular matrix is ​​obtained by calculating the following formula: L=UΣV T Where L is the graph Laplace matrix, U is the left singular matrix, Σ is the singular value, V is the right singular matrix, V T is the transpose of the right singular matrix.

5. The method according to claim 4, characterized in that The step of obtaining the first road vector according to the left singular matrix is ​​specifically as follows: The first predetermined number of columns of the left singular matrix are used as the first road vector.

6. The method according to claim 1, characterized in that The acquiring of a user behavior vector of a single user according to the first road vector and the user historical behavior matrix comprises: The first road vectors corresponding to the first roads in the user historical behavior matrix are summed to obtain the user behavior vector.

7. The method according to claim 6, characterized in that The user behavior vector is calculated by the following formula: Among them, h is the user behavior vector, T is the number of first paths in the user's historical behavior matrix, U[v bm ,:k] is the first road vector corresponding to the mth first road in the user's historical behavior matrix.

8. A data processing device, characterized in that: The device comprises: A data acquisition unit, used to acquire a road network matrix and a user history behavior matrix of a single user, wherein the user history behavior matrix includes a plurality of first roads, wherein the first roads are roads on which the user has traveled in the past; A first road vector acquisition unit, configured to acquire a first road vector corresponding to each first road according to the road network matrix; and A user behavior vector acquisition unit, configured to acquire a user behavior vector of a single user according to the first road vector and the user historical behavior matrix, wherein the user behavior vector is used to characterize the relationship between the user and the geographic location; a request receiving unit, configured to, in response to receiving a data acquisition request, acquire a user behavior vector corresponding to the user according to a user identifier in the data acquisition request; A push data sending unit, used to obtain corresponding push data according to the user behavior vector and send it to the terminal device; an updating unit, configured to update the user behavior vector in response to acquiring new data according to the new data, wherein the new data includes a second road traveled by the user; Wherein, the first road vector acquisition unit is used for: Obtaining a graph Laplacian matrix corresponding to the road network matrix; Performing eigenvalue decomposition on the graph Laplacian matrix to obtain a left singular matrix; and Acquire the first road vector according to the left singular matrix; Wherein, the updating unit is used for: Obtaining a second road vector corresponding to the second road; Obtain a first matrix according to the singular value matrix, wherein the elements of the main diagonal of the first matrix are determined according to the singular value matrix, and the other elements are all zero; Acquire an intermediate vector according to the first matrix, the second road vector and the user behavior vector; and An updated user behavior vector is obtained according to the intermediate vector and the second road vector.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Vehicle abnormal trajectory detection and model training method and device

    CN111694917A

  • Road information acquisition method and device, electronic equipment and readable storage medium

    CN111862584A