Space-time behavior sequence quantification method and device, storage medium and electronic equipment

By acquiring and fusing the spatial feature matrix and timing feature matrix, and using graph neural networks and recurrent neural networks to extract spatiotemporal feature representations, the problem of ignoring spatiotemporal continuity and correlation in the existing technology is solved, and a deeper understanding of user behavior is achieved. and the capture of higher-level features improves the accuracy of behavior prediction.

CN119249129APending Publication Date: 2025-01-03WISDOM FOOTPRINT DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411318218.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Existing spatial and temporal behavior quantification methods ignore the time and spatial continuity and correlation within and between behavior sequences, resulting in limited deep understanding of user behavior.

Method used

By obtaining the spatial feature matrix of the target area and the timing feature matrix of the target user, the graph neural network and the recurrent neural network are used for feature fusion, and the spatiotemporal feature representation is extracted using a pre-trained spatiotemporal analysis model to capture the correlation and continuity between behaviors.

Benefits of technology

It achieves a more comprehensive and global understanding of user behavior, captures more advanced features, and improves the accuracy of behavior prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249129A_ABST
    Figure CN119249129A_ABST
Patent Text Reader

Abstract

The invention provides a time-space behavior sequence quantification method and device, a storage medium and electronic equipment, and relates to the field of neural networks. In the method, the electronic equipment obtains a spatial feature matrix of a target area, and the spatial feature matrix comprises respective spatial feature vectors of a plurality of spatial nodes in the target area; a time sequence feature matrix of the target user in each time step is obtained, and each time sequence feature matrix comprises a time sequence feature vector of the target user in each space node in the corresponding time step; fusing each time sequence feature matrix with the spatial feature matrix to obtain each feature fusion matrix of the target user; and sequentially extracting features of each feature fusion matrix through a pre-trained space-time analysis model to obtain space-time feature representation of the target user. Therefore, the relevance between behaviors can be fully explored, the understanding of the input becomes more comprehensive, and the captured features are more advanced and global features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of neural networks, and in particular to a method, device, storage medium and electronic device for quantizing spatiotemporal behavior sequences. Background Art

[0002] The user's spatiotemporal behavior data is serialized and regularized, but a single behavior lacks sufficient information. Existing quantification methods either simplify user behavior, define it as a very small number of controllable rules, and use statistics for numerical quantification; or encode user behavior and then use NLP (Natural Language Processing) technology to discover user behavior patterns and use latent Dirichlet distribution to identify the intention of user behavior sequences, thereby discovering the approximate purpose of user behavior sequences.

[0003] The former adopts an experience-driven approach, and its information utilization efficiency depends significantly on the modeler's insight and subjective judgment, resulting in information extraction that may not be comprehensive or accurate. While the latter attempts to capture behavioral patterns through coding and statistical analysis, it ignores the continuity and correlation within and between behavioral sequences in time and space, which limits the in-depth understanding of user behavior. Summary of the invention

[0004] In order to overcome at least one of the deficiencies in the prior art, the present application provides a method, device, storage medium and electronic device for quantizing a spatiotemporal behavior sequence, specifically including: In a first aspect, the present application provides a method for quantifying a spatiotemporal behavior sequence, the method comprising: Acquire a spatial feature matrix of a target area, wherein the spatial feature matrix includes spatial feature vectors of respective spatial nodes in the target area; Acquire a time series feature matrix of the target user at each time step, wherein each of the time series feature matrices includes a time series feature vector of the target user at each of the spatial nodes within a corresponding time step; Fusing each of the temporal feature matrices with the spatial feature matrix respectively to obtain each feature fusion matrix of the target user; The features of each feature fusion matrix are extracted in turn through a pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user.

[0005] In combination with the optional implementation manner of the first aspect, obtaining a spatial feature matrix of the target area includes: Constructing a node relationship graph between the multiple spatial nodes, wherein the node relationship graph records the attributes of each of the spatial nodes and the spatial relationship between the multiple spatial nodes; Processing the node relationship graph through a graph neural network to obtain a spatial feature vector of each of the spatial nodes; The spatial feature matrix is ​​obtained according to the spatial feature vector of each of the spatial nodes.

[0006] In combination with the optional implementation manner of the first aspect, obtaining the time series feature matrix of the target user at each time step includes: For each of the time steps, obtaining the residence information of the target user at each of the spatial nodes within the time step; According to the residence information of each of the spatial nodes, a time series feature vector of the target user at each of the spatial nodes is obtained; The time series feature matrix is ​​obtained according to the time series feature vector of the target user at each of the spatial nodes.

[0007] In combination with the optional implementation manner of the first aspect, the fusing each of the temporal feature matrices with the spatial feature matrix to obtain each feature fusion matrix of the target user includes: Each of the temporal feature matrices and the spatial feature matrix is ​​weighted with a preset weight to obtain each feature fusion matrix of the target user.

[0008] In combination with the optional implementation manner of the first aspect, extracting the features of each of the feature fusion matrices in sequence through the pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user includes: Processing each of the feature fusion matrices in turn through the spatiotemporal analysis model to obtain an encoding vector of each of the feature fusion matrices output by a target hidden layer of the spatiotemporal analysis model; According to the encoding vector of each feature fusion matrix, the spatiotemporal feature representation of the target user is obtained.

[0009] In combination with the optional implementation manner of the first aspect, the spatiotemporal analysis model is obtained by training a recurrent neural network model.

[0010] In combination with the optional implementation manner of the first aspect, the spatiotemporal analysis model can predict the travel purpose of the target user according to each of the feature fusion matrices.

[0011] In a second aspect, the present application further provides a spatiotemporal behavior sequence quantization device, the device comprising: A spatial feature module, used to obtain a spatial feature matrix of a target area, wherein the spatial feature matrix includes spatial feature vectors of each of a plurality of spatial nodes in the target area; A time feature module, used to obtain a time series feature matrix of the target user at each time step, wherein each of the time series feature matrices includes a time series feature vector of the target user at each of the spatial nodes within a corresponding time step; A feature fusion module, used to fuse each of the temporal feature matrices with the spatial feature matrix to obtain each feature fusion matrix of the target user; The feature extraction module is used to extract the features of each of the feature fusion matrices in turn through a pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user.

[0012] In conjunction with the optional implementation manner of the second aspect, the spatial feature module is further specifically used for: Constructing a node relationship graph between the multiple spatial nodes, wherein the node relationship graph records the attributes of each of the spatial nodes and the spatial relationship between the multiple spatial nodes; Processing the node relationship graph through a graph neural network to obtain a spatial feature vector of each of the spatial nodes; The spatial feature matrix is ​​obtained according to the spatial feature vector of each of the spatial nodes.

[0013] In conjunction with the optional implementation manner of the second aspect, the time feature module is further specifically used for: For each of the time steps, obtaining the residence information of the target user at each of the spatial nodes within the time step; According to the residence information of each of the spatial nodes, a time series feature vector of the target user at each of the spatial nodes is obtained; The time series feature matrix is ​​obtained according to the time series feature vector of the target user at each of the spatial nodes.

[0014] In conjunction with the optional implementation manner of the second aspect, the feature fusion module is further specifically used for: Each of the temporal feature matrices and the spatial feature matrix is ​​weighted with a preset weight to obtain each feature fusion matrix of the target user.

[0015] In conjunction with the optional implementation manner of the second aspect, the feature extraction module is further specifically used for: Processing each of the feature fusion matrices in turn through the spatiotemporal analysis model to obtain an encoding vector of each of the feature fusion matrices output by a target hidden layer of the spatiotemporal analysis model; According to the encoding vector of each feature fusion matrix, the spatiotemporal feature representation of the target user is obtained.

[0016] In combination with the optional implementation of the second aspect, the spatiotemporal analysis model is obtained by training a recurrent neural network model.

[0017] In combination with the optional implementation manner of the second aspect, the spatiotemporal analysis model can predict the travel purpose of the target user based on each of the feature fusion matrices.

[0018] In a third aspect, the present application further provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method for quantizing a spatiotemporal behavior sequence is implemented.

[0019] In a fourth aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the method for quantizing a spatiotemporal behavior sequence is implemented.

[0020] Compared with the prior art, this application has the following beneficial effects: The present application provides a method, device, storage medium and electronic device for quantifying spatiotemporal behavior sequences. In the method, the electronic device obtains a spatial feature matrix of a target area, wherein the spatial feature matrix includes the spatial feature vectors of each of the multiple spatial nodes in the target area; obtains a temporal feature matrix of the target user at each time step, wherein each temporal feature matrix includes the temporal feature vector of the target user at each spatial node in the corresponding time step; fuses each temporal feature matrix with the spatial feature matrix to obtain each feature fusion matrix of the target user; extracts the features of each feature fusion matrix in turn through a pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user. In this way, the correlation between behaviors can be fully explored, the understanding of the input becomes more comprehensive, and more advanced and global features are captured. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flow chart of a method for quantifying a spatiotemporal behavior sequence provided in an embodiment of the present application; Figure 2 A schematic diagram of a node relationship diagram provided in an embodiment of the present application; Figure 3 A schematic diagram of data flow in a graph neural network provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a spatiotemporal behavior sequence quantization device provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0025] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0026] In the description of the present application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. In addition, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0027] Based on the above statement, as introduced in the background technology, the method of encoding user behaviors and then using NLP technology to discover user behavior patterns, although attempting to capture behavior patterns through coding and statistical analysis, ignores the continuity and correlation in time and space within and between behavior sequences, which limits the in-depth understanding of user behavior.

[0028] Based on the discovery of the above technical problems, the inventors have proposed the following technical solutions to solve or improve the above problems through creative work. It should be noted that the defects in the solutions in the above prior art are the results obtained by the inventors after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in the embodiments of the present application for the above problems below should all be the contributions made by the inventors to the present application in the process of invention and creation, and should not be understood as technical contents known to those skilled in the art.

[0029] In view of the above technical problems, this embodiment provides a method for quantifying spatiotemporal behavior sequences. In this method, the electronic device obtains the spatial feature matrix of the target area, wherein the spatial feature matrix includes the spatial feature vectors of each of the multiple spatial nodes in the target area; obtains the temporal feature matrix of the target user at each time step, wherein each temporal feature matrix includes the temporal feature vector of the target user at each spatial node in the corresponding time step; fuses each temporal feature matrix with the spatial feature matrix respectively to obtain each feature fusion matrix of the target user; extracts the features of each feature fusion matrix in turn through a pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user. In this way, the correlation between behaviors can be fully explored, the understanding of the input becomes more comprehensive, and more advanced and global features are captured.

[0030] It is worth noting that for the scheme involved in this application, the data related to user privacy is explicitly notified before being collected and generated during the execution of the embodiments of this application, and is authorized by the user. At the same time, for the personal information involved in the embodiments of this application, the location of the storage device is in compliance with the laws and regulations of the country / region where the above-mentioned data-related behaviors occur, and the related behaviors include but are not limited to: authorization, generation, use, storage, etc. It can be understood that the space-time sequence used to implement this scheme, the location of the storage device is in compliance with the laws and regulations of the country / region where the above-mentioned data-related behaviors occur, and the related behaviors include but are not limited to: authorization, generation, use, storage, etc.

[0031] It should also be noted that the electronic device implementing the above-mentioned spatiotemporal behavior sequence quantification method may be, but is not limited to, a mobile terminal, a tablet computer, a laptop computer, a desktop computer, a server, etc. The server may be a single server or a server group. The server group may be centralized or distributed (for example, the server may be a distributed system). In some embodiments, the server may be local or remote relative to the user terminal. In some embodiments, the server may be implemented on a cloud platform; as an example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, a multi-cloud, etc., or any combination thereof. In some embodiments, the server may be implemented on an electronic device having one or more components.

[0032] To make the solution provided by this embodiment clearer, the following uses a server as the above electronic device, and combines Figure 1 Each step of the method is described in detail. However, it should be understood that the operations of the flowchart may not be implemented in order, and steps without logical contextual relationships may be reversed in order or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart, or remove one or more operations from the flowchart under the guidance of the content of this application. Figure 2 As shown, the method includes: S1, obtain the spatial feature matrix of the target area.

[0033] The spatial feature matrix includes the spatial feature vectors of multiple spatial nodes in the target area, which may be a city, county, district or other area that needs to be studied.

[0034] It should be understood that, assuming that the user's behavior is analyzed through the signaling data of the target user's mobile phone, each signaling data records that the user stayed at a certain location in a certain time slice. Therefore, as signaling data carrying information in both time and space, this embodiment integrates the two major features of space and time in order to explore the continuity and correlation between signaling data and sequences in time and space. For spatial features, this embodiment provides the following optional implementation methods: S1-1, construct a node relationship graph between multiple spatial nodes.

[0035] The node relationship diagram records the attributes of each spatial node and the spatial relationship between multiple spatial nodes. The above multiple spatial nodes are nodes pre-selected from the target area. These spatial nodes may include shopping malls, industrial parks, office buildings, tourist attractions, residential areas, schools, parks and other places in the target area that can attract a large number of people. Of course, when implementing this solution, technicians can also adaptively select other places as spatial nodes according to the purpose of analysis.

[0036] Based on the spatial nodes selected above, a node relationship graph can be constructed. The node relationship graph includes two concepts: spatial nodes and edges. The following describes these two concepts in detail: Spatial nodes (Nodes), each spatial node in the node relationship diagram represents a location in the target area. In order to locate more precisely, this embodiment adopts a method called semi-geohash6, which divides the geohash6 space into two parts, a left part and a right part, and generates a rectangle that is approximately a square, so as to accurately identify each spatial node. It should be noted that Geohash6 is a geographic coding system that represents a specific area on the earth's surface through a string of length 6. Each character represents a continuous binary operation on the earth's surface, thereby dividing the earth into fine grid units.

[0037] Each node has its own attributes, which are jointly determined by the constructed "spatial portrait" and "statistical spatial association user characteristics". Among them, the spatial portrait is a multi-dimensional representation, that is, by analyzing the land use type of the place (such as whether it is an office area, residential area or commercial area) to depict its probability distribution, so that the characteristics of the space can be seen at a glance. The statistical spatial association user characteristics contain more dynamic information about the place, such as gender ratio, age distribution, type of visit purpose, and the ratio of local and foreign tourists. These attribute information can fully and deeply understand the characteristics of each spatial node. In this way, rich feature information is provided for subsequent data analysis and decision-making.

[0038] Edges are used to connect different spatial nodes. These edges are constructed by observing the behavioral changes of people moving from one location to another. In this embodiment, the matrix describing this change in people flow is called the OD matrix (Origin-Destination matrix), that is, the matrix from the starting point to the end point. The OD matrix can systematically record and display the flow patterns of users between different locations, and then establish a path network in the entire area, thereby revealing the path preferences of users' daily activities.

[0039] For example, suppose the above multiple spatial nodes are shopping malls, parks, and schools; the OD matrix of shopping malls, parks, and schools is similar to a table that lists all combinations of starting points (O) and end points (D), that is, it records the flow of people or visit frequency from each starting point to each end point. Therefore, through the OD matrix, we can know how many people go from the shopping mall to the school, or from the park to the library every day.

[0040] In addition, this embodiment also takes into account the fact that spatial nodes are often highly sparse, that is, most nodes do not have direct connections or have relatively few connections that can be pruned to reduce the complexity of the graph, so a sparse matrix is ​​used to store the adjacency relationship between nodes. For example, the sparse matrix can be represented by a matrix in the CSR (Compressed Sparse Row) format, which not only saves storage space but also optimizes computational efficiency. Among them, the CSR format is a compression method for storing and operating sparse matrices, which effectively represents the matrix through three one-dimensional arrays: the first array stores the values ​​of non-zero elements, the second array stores the column indexes of these values ​​in the matrix, and the third array records the starting position of each row of non-zero elements in the first array. Therefore, by storing only non-zero elements and their position information, the storage space requirement can be reduced, and in matrix operations, zero elements can be skipped, which significantly improves computational efficiency.

[0041] For example, Figure 2 , a node relationship diagram between six spatial nodes is shown in FIG. 1 , where the array next to each spatial node represents the quantized attribute information of the spatial node.

[0042] Based on the introduction of the node relationship graph in the above implementation, step S1 further includes: S1-2, the node relationship graph is processed through the graph neural network to obtain the spatial feature vector of each spatial node.

[0043] Since the node relationship graph contains a lot of spatial information, this embodiment will fuse the information of related nodes and the features of the structure in the relationship graph through the graph neural network (GNN), and finally obtain the spatial feature vector of each spatial node. The core concept of the graph neural network is to combine the feature information of the node itself and the information of its neighboring nodes to generate a richer node representation. To achieve this goal, the graph neural network achieves this goal by iteratively applying graph convolution operations to better capture local information and global patterns in the graph structure.

[0044] For example, Figure 3 The process of generating the spatial feature vector of each spatial node by the graph neural network is as follows: (1) Input feature matrix and adjacency matrix Feature Matrix , whose dimensions are ,in, Indicates the number of nodes in the node relationship graph, Represents the feature dimension of each node.

[0045] Adjacency Matrix , whose dimensions are , indicating the connection relationship between nodes.

[0046] (2) Calculate the degree matrix

[0047] Degree Matrix is a diagonal matrix where each diagonal element Is a node The degree of the node number of neighbors).

[0048] (3) Normalized adjacency matrix

[0049] The calculation formula of the symmetric normalized adjacency matrix is:

[0050] (4) Graph convolution operation For each layer The convolution operation can be expressed as:

[0051] In the formula, Indicates The node feature matrix of the layer; Indicates that it is The learnable weight matrix of the layer has the dimension ; Represents a non-linear activation function (such as ReLU).

[0052] (5) Process description of three-layer GCN In a three-layer GCN, the graph convolution operation is applied three times sequentially. The following is a detailed description of the process: 5.1) The first convolution layer: Input: Initial node features and the normalized adjacency matrix ; Operation: Perform graph convolution operation: ,in is the learnable weight matrix of the first layer, is the activation function; Output: It is the updated node feature after the first layer of convolution.

[0053] 5.2) Second convolution layer: Input: Output of the first layer and the normalized adjacency matrix ; Operation: Perform another graph convolution: ,in is the learnable weight matrix of the second layer; Output: It is the updated node feature after the second layer of convolution.

[0054] 5.3) The third convolution layer: Input: Output of the second layer and the normalized adjacency matrix ; Operation: Perform the final graph convolution: ,in is the learnable weight matrix of the third layer; Output: Represents the final node embedding after three layers of graph convolution.

[0055] Finally, the graph neural network generates a spatial feature vector for each node , and these spatial eigenvectors are combined into a spatial feature matrix , the spatial feature matrix is ​​of dimension The matrix of is the number of nodes, is the spatial feature vector of each node. Therefore, step S1 also includes: S1-3, obtain the spatial feature matrix according to the spatial feature vector of each spatial node.

[0056] In this way, the node relationship graph is converted into a spatial feature matrix of multiple spatial nodes. Based on the introduction of the spatial feature matrix in the above embodiment, see Figure 1 The spatiotemporal behavior sequence quantization method provided in this embodiment also includes: S2, obtain the time series feature matrix of the target user at each time step.

[0057] Wherein, each time series feature matrix includes the time series feature vector of the target user at each spatial node in the corresponding time step. As an optional implementation of step S2, it includes: S2-1, for each time step, the server obtains the residence information of the target user at each spatial node within the time step.

[0058] For example, assuming that a day is taken as a unit and is divided into 24 hours, each hour corresponds to a time step. The residence information in each time step may include the length of time the user stays at each spatial node, the number of round trips, and other information, so as to characterize the dynamic behavior of the node.

[0059] S2-2, according to the residence information of each spatial node, the time series feature vector of the target user at each spatial node is obtained.

[0060] For example, assume that the time series feature matrix of all time steps has the structure Here, represents the number of time steps, represents the number of multiple spatial nodes, and Represents the temporal feature vector of each spatial node.

[0061] S2-3, obtain the time series feature matrix according to the time series feature vector of the target user at each spatial node.

[0062] Therefore, it can be understood that a time series feature matrix can be obtained for each time step. The time series feature matrix clearly shows the distribution of feature data of each node in each time step. Through such a structure, it is easy to capture the changing rules of the time series and the dynamic evolution relationship between different nodes over time.

[0063] Based on the introduction of the timing characteristic matrix in the above embodiment, continue to refer to Figure 1 The spatiotemporal behavior sequence quantization method provided in this embodiment also includes: S3, fuse each temporal feature matrix with the spatial feature matrix respectively to obtain each feature fusion matrix of the target user.

[0064] In this embodiment, the server may weight each temporal feature matrix and spatial feature matrix respectively with preset weights to obtain each feature fusion matrix of the target user.

[0065] In order to effectively fuse these two feature matrices, this embodiment adopts a weighted fusion strategy. Specifically, two weighted coefficients are introduced: and ,in, controls the importance of the spatial feature matrix, and The importance of the time series feature matrix is ​​controlled. Through these coefficients, the proportion of the two feature matrices in the final feature fusion matrix can be flexibly adjusted to adapt to different application scenarios and data characteristics. The expression is as follows:

[0066] In the formula, Indicates The time series feature matrix of time steps is Represents the spatial feature matrix.

[0067] Based on the feature fusion matrix of each time step obtained in the above embodiment, see Figure 1 The spatiotemporal behavior sequence quantization method provided in this embodiment also includes: S4, extracts the features of each feature fusion matrix in turn through the pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user.

[0068] In this embodiment, the spatiotemporal analysis model is obtained by training a recurrent neural network model, for example, the recurrent neural network model can be an LSTM model. In addition, the spatiotemporal analysis model can predict the travel purpose of the target user based on each feature fusion matrix. For example, continuing to take one day as the research object, including 24 time steps, and then processing the feature fusion matrix of these 24 time steps through the spatiotemporal analysis model, the user's travel purpose can be predicted, and the travel purpose can be one of going to work, going home, playing, picking up express delivery, and delivering takeout.

[0069] In this embodiment, the server processes each feature fusion matrix in turn through the spatiotemporal analysis model to obtain the encoding vector of each feature fusion matrix output by the target hidden layer of the spatiotemporal analysis model; based on the encoding vector of each feature fusion matrix, the spatiotemporal feature representation of the target user is obtained.

[0070] For example, we continue to take one day as the research object, including 24 time steps, and input the 24 feature fusion matrices into the spatiotemporal analysis model in chronological order for processing, so as to predict the user's travel purpose. For each feature fusion matrix, the spatiotemporal analysis model processes one of the feature fusion matrices each time, and its target hidden layer output will output the encoding vector of the feature fusion matrix; therefore, 24 encoding vectors can be obtained. The server combines these 24 encoding vectors into the spatiotemporal feature representation of the target user; or obtains the spatiotemporal feature representation of the target user by aggregating and averaging the 24 encoding vectors.

[0071] It should be noted that, through the above implementation, the behavior characteristics of the target user in terms of time and space can be compressed into a spatiotemporal feature representation, which can be used in various scenarios later. For example, input into a large language model for processing, it can achieve user sequence classification, time series prediction, anomaly detection, user behavior analysis, etc.

[0072] Based on the same inventive concept as the spatiotemporal behavior sequence quantization method provided in this embodiment, this embodiment also provides a spatiotemporal behavior sequence quantization device. The device includes at least one software function module that can be stored in a memory or fixed in an electronic device in the form of software. The processor in the electronic device is used to execute the executable module stored in the memory. For example, the software function module and computer program included in the device. Please refer to Figure 4 , functionally speaking, the device may include: A spatial feature module 11 is used to obtain a spatial feature matrix of a target area, wherein the spatial feature matrix includes spatial feature vectors of respective spatial nodes in the target area; A time feature module 12 is used to obtain a time series feature matrix of the target user at each time step, wherein each time series feature matrix includes a time series feature vector of the target user at each spatial node in the corresponding time step; A feature fusion module 13 is used to fuse each temporal feature matrix with the spatial feature matrix to obtain each feature fusion matrix of the target user; The feature extraction module 14 is used to extract the features of each feature fusion matrix in turn through a pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user.

[0073] In this embodiment, the spatial feature module 11 is used to implement Figure 1 In step S1, the time feature module 12 is used to implement Figure 1 In step S2, the feature fusion module 13 is used to implement Figure 1 In step S3, the feature extraction module 14 is used to implement Figure 1 Therefore, for the detailed description of each of the above steps, please refer to the specific implementation of the corresponding step. In addition, it should be noted that, in view of the same inventive concept as the above-mentioned spatiotemporal behavior sequence quantization method, the spatiotemporal behavior sequence quantization device can also implement other steps or sub-steps of the method through the above-mentioned modules or other modules, which will not be described in detail in this embodiment.

[0074] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0075] It should also be understood that if the above implementation is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0076] Therefore, this embodiment further provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the spatiotemporal behavior sequence quantization method provided in this embodiment is implemented. Among them, the storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., which can store program codes.

[0077] This embodiment provides an electronic device for implementing a method for quantizing a spatiotemporal behavior sequence. Figure 5 As shown, the electronic device may include a processor 22 and a memory 21. In addition, the memory 21 stores a computer program, and the processor implements the spatiotemporal behavior sequence quantization method provided in this embodiment by reading and executing the computer program corresponding to the above implementation in the memory 21.

[0078] Continue to see Figure 5 The electronic device further includes a communication unit 23. The memory 21, the processor 22 and the communication unit 23 are electrically connected to each other directly or indirectly through a system bus 24 to achieve data transmission or interaction.

[0079] The memory 21 may be an information recording device based on any electronic, magnetic, optical or other physical principle, used to record execution instructions, data, etc. In some embodiments, the memory 21 may be, but is not limited to, a volatile memory, a non-volatile memory, a storage drive, etc.

[0080] In some embodiments, the volatile memory may be a random access memory (RAM); in some embodiments, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), a flash memory, etc.; in some embodiments, the storage drive may be a disk drive, a solid-state drive, any type of storage disk (such as a CD, a DVD, etc.), or a similar storage medium, or a combination thereof, etc.

[0081] The communication unit 23 is used to send and receive data through a network. In some embodiments, the network may include a wired network, a wireless network, a fiber optic network, a telecommunication network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, or a near field communication (NFC) network, or any combination thereof. In some embodiments, the network may include one or more network access points. For example, the network may include a wired or wireless network access point, such as a base station and / or a network switching node, and one or more components of the service request processing system may be connected to the network through the access point to exchange data and / or information.

[0082] The processor 22 may be an integrated circuit chip with signal processing capability, and the processor may include one or more processing cores (e.g., a single-core processor or a multi-core processor). By way of example only, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.

[0083] Understandably, Figure 5 The structure shown is for illustration only. The electronic device may also have Figure 5 More or fewer components than shown, or with Figure 5 Different configurations are shown. Figure 5 The components shown may be implemented in hardware, software or a combination thereof.

[0084] It should be understood that the apparatus and method disclosed in the above-mentioned embodiments can also be implemented in other ways. The apparatus embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0085] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for quantifying spatiotemporal behavior sequences, characterized in that: The method comprises: Acquire a spatial feature matrix of a target area, wherein the spatial feature matrix includes spatial feature vectors of respective spatial nodes in the target area; Acquire a time series feature matrix of the target user at each time step, wherein each of the time series feature matrices includes a time series feature vector of the target user at each of the spatial nodes within a corresponding time step; Fusing each of the temporal feature matrices with the spatial feature matrix respectively to obtain each feature fusion matrix of the target user; The features of each feature fusion matrix are extracted in turn through a pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user.

2. The method for quantifying spatiotemporal behavior sequences according to claim 1, characterized in that: Get the spatial feature matrix of the target area, including: Constructing a node relationship graph between the multiple spatial nodes, wherein the node relationship graph records the attributes of each of the spatial nodes and the spatial relationship between the multiple spatial nodes; Processing the node relationship graph through a graph neural network to obtain a spatial feature vector of each of the spatial nodes; The spatial feature matrix is ​​obtained according to the spatial feature vector of each of the spatial nodes.

3. The method for quantifying spatiotemporal behavior sequences according to claim 1, characterized in that: The step of obtaining the time series feature matrix of the target user at each time step includes: For each of the time steps, obtaining the residence information of the target user at each of the spatial nodes within the time step; According to the residence information of each of the spatial nodes, a time series feature vector of the target user at each of the spatial nodes is obtained; The time series feature matrix is ​​obtained according to the time series feature vector of the target user at each of the spatial nodes.

4. The method for quantifying spatiotemporal behavior sequences according to claim 1, characterized in that: The step of fusing each of the temporal feature matrices with the spatial feature matrix to obtain each feature fusion matrix of the target user comprises: Each of the temporal feature matrices and the spatial feature matrix is ​​weighted with a preset weight to obtain each feature fusion matrix of the target user.

5. The method for quantifying spatiotemporal behavior sequences according to claim 1, characterized in that: The pre-trained spatiotemporal analysis model is used to extract the features of each of the feature fusion matrices in turn to obtain the spatiotemporal feature representation of the target user, including: Processing each of the feature fusion matrices in turn through the spatiotemporal analysis model to obtain an encoding vector of each of the feature fusion matrices output by a target hidden layer of the spatiotemporal analysis model; According to the encoding vector of each feature fusion matrix, the spatiotemporal feature representation of the target user is obtained.

6. The method for quantifying spatiotemporal behavior sequences according to claim 1, characterized in that: The spatiotemporal analysis model is obtained by training a recurrent neural network model.

7. The method for quantifying spatiotemporal behavior sequences according to claim 1, characterized in that: The spatiotemporal analysis model can predict the travel purpose of the target user according to each feature fusion matrix.

8. A device for quantifying a spatiotemporal behavior sequence, characterized in that: The device comprises: A spatial feature module, used to obtain a spatial feature matrix of a target area, wherein the spatial feature matrix includes spatial feature vectors of each of a plurality of spatial nodes in the target area; A time feature module, used to obtain a time series feature matrix of the target user at each time step, wherein each of the time series feature matrices includes a time series feature vector of the target user at each of the spatial nodes within a corresponding time step; A feature fusion module, used to fuse each of the temporal feature matrices with the spatial feature matrix to obtain each feature fusion matrix of the target user; The feature extraction module is used to extract the features of each of the feature fusion matrices in turn through a pre-trained spatiotemporal analysis model to obtain the spatiotemporal feature representation of the target user.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for quantifying a spatiotemporal behavior sequence according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the spatiotemporal behavior sequence quantization method described in any one of claims 1 to 7 is implemented.