Consumption behavior prediction method and system driven by spatio-temporal data

By constructing heterogeneous ternary graphs and multi-scale feature extraction technology, the problems of low accuracy and poor adaptability of consumer behavior prediction in traditional methods are solved, and high-precision and dynamic prediction of user consumption behavior are achieved.

CN120235646AActive Publication Date: 2025-07-01CHONGQING TOURISM CLOUD INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510703143.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-07-01
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

The existing consumption behavior prediction methods are not very accurate when reflecting user geographical regional differences and responding to emergencies, and lack the integration of real-time location and environmental factors, resulting in poor adaptability of the model in dynamically changing consumption scenarios.

Method used

A heterogeneous ternary graph is constructed, and the user's multi-grained spatial characteristics and event timing impact trend factors are extracted through multi-scale Motif sub-graph sampling and time-domain convolution networks, and combined with user's historical consumption data and business district POI data, and generated space-time fusion characteristics to predict consumption behavior.

Benefits of technology

It improves the accuracy and robustness of consumer behavior prediction, can dynamically capture users' consumption trends in different business districts, adapt to the changing consumption environment, and achieve forward-looking responses to sudden and cyclical events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235646A_ABST
    Figure CN120235646A_ABST
Patent Text Reader

Abstract

The invention discloses a spatio-temporal data driven consumption behavior prediction method and system, and relates to the technical field of text travel data intelligent analysis, and the method comprises the steps: respectively defining a user node, a business district node and an event node according to user attribute data, business district attribute data and a historical external event, performing analysis in combination with user historical consumption data and business district POI data to determine a corresponding user-business district consumption edge, a business district-event influence edge and an event-user trigger edge so as to construct a heterogeneous ternary graph; performing multi-scale Motif sub-graph sampling on the heterogeneous ternary graph to extract a multi-granularity sub-graph, and extracting multi-scale spatial features of corresponding user nodes from the multi-granularity sub-graph; and the two are organically fused into a highly expressed space-time fusion feature, and the business district consumption behaviors of the user in different business districts are predicted according to the space-time fusion feature. Therefore, the prediction precision and robustness of the commercial district consumption behavior of the user are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of cultural and tourism digital intelligence analysis, and particularly relates to a consumption behavior prediction method and system driven by spatio-temporal data. Background Art

[0002] With the rapid development of mobile Internet, Internet of Things and big data technologies, the retail industry has generated a large amount of heterogeneous consumer behavior data, including both store transaction flows, online order records, and trajectory data based on mobile phone positioning. These data show high non-stationarity and heterogeneity in the time and space dimensions.

[0003] Traditional consumption behavior prediction methods mainly rely on time series models (such as ARIMA, LSTM, etc.) to model the historical consumption amount or frequency of users. These methods only consider "when" consumption occurs, ignoring the impact of "where" consumption occurs on user decisions, and it is difficult to reflect the differences in different geographical regions or business districts; at the same time, the response to short-term emergencies such as holidays and promotions is lagged, and the prediction accuracy is not high.

[0004] In addition, some research scholars have proposed to construct a static consumption preference model based on user static portraits or demographic characteristics through feature engineering. Although such methods can depict the overall consumption tendency of users, due to the lack of integration of real-time location and environmental factors, it is difficult to adapt to dynamic consumption scenarios, and the workload of manually designing features is large and the scalability is poor. Summary of the Invention

[0005] This application provides a consumption behavior prediction method, system, storage medium, computer program product and electronic device, so as to at least solve the problem of low prediction accuracy of user consumption behavior in business districts in the current related technologies.

[0006] In a first aspect, an embodiment of the present application provides a consumption behavior prediction method driven by spatio-temporal data, including: defining user nodes, business district nodes, and event nodes according to user attribute data, business district attribute data, and historical external events respectively, and analyzing and determining corresponding user-business district consumption edges, business district-event influence edges, and event-user trigger edges by combining user historical consumption data and business district POI data, so as to construct a heterogeneous tripartite graph; the edge weight of the user-business district consumption edge is defined according to the historical consumption intensity of the user in the corresponding business district, the edge weight of the business district-event influence edge is defined according to the time-effect attenuation influence coefficient of the corresponding external event in the business district, and the edge weight of the event-user trigger edge is defined according to the historical response degree weight of the user to the corresponding external event; performing multi-scale Motif subgraph sampling on the heterogeneous tripartite graph to extract multi-granularity subgraphs matching the user nodes, calculating the spatial coding features of the user nodes in each granularity subgraph in the multi-granularity subgraphs, and obtaining the multi-scale spatial features of the corresponding user nodes through feature weighted fusion; based on a time-domain convolutional network, extracting the event time-series impact trend factors corresponding to each event node in the heterogeneous tripartite graph; obtaining at least one potential external event corresponding to a future preset time period, and determining the target event time-series impact trend factors of the corresponding user nodes by matching with each event node in the heterogeneous tripartite graph, and fusing each of the target event time-series impact trend factors and the multi-scale spatial features to obtain the spatio-temporal fusion features of the corresponding user nodes; predicting the business district consumption amount and business district consumption frequency of the corresponding user in each business district during the future preset time period according to the spatio-temporal fusion features of the user nodes.

[0007] Second aspect, an embodiment of the present application provides a spatio-temporal data-driven consumer behavior prediction system, including: a heterogeneous ternary graph construction unit, configured to define user nodes, business district nodes, and event nodes according to user attribute data, business district attribute data, and historical external events respectively, and analyze and determine corresponding user-business district consumption edges, business district-event influence edges, and event-user trigger edges by combining user historical consumption data and business district POI data, so as to construct a heterogeneous ternary graph; the edge weight of the user-business district consumption edge is defined according to the historical consumption intensity of the user in the corresponding business district, the edge weight of the business district-event influence edge is defined according to the time-dependent attenuation influence coefficient of the corresponding external event in the business district, and the edge weight of the event-user trigger edge is defined according to the historical response degree weight of the user to the corresponding external event; a spatial feature extraction unit, configured to perform multi-scale Motif subgraph sampling on the heterogeneous ternary graph to extract multi-granularity subgraphs matching the user nodes, and calculate the spatial encoding features of the user nodes in each granularity subgraph in the multi-granularity subgraphs, and obtain the multi-scale spatial features of the corresponding user nodes through feature weighted fusion; a temporal feature extraction unit, configured to extract the event temporal impact trend factors corresponding to each event node in the heterogeneous ternary graph based on a time-domain convolutional network; a spatio-temporal feature fusion unit, configured to obtain at least one potential external event corresponding to a future preset time period, and determine the target event temporal impact trend factors of the corresponding user nodes by matching with each event node in the heterogeneous ternary graph, and fuse each of the target event temporal impact trend factors and the multi-scale spatial features to obtain the spatio-temporal fusion features of the corresponding user nodes; a business district consumption prediction unit, configured to predict the business district consumption amount and business district consumption frequency of the corresponding user for each business district in the future preset time period according to the spatio-temporal fusion features of the user nodes.

[0008] Third aspect, an electronic device is provided, including: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the steps of the spatio-temporal data-driven consumer behavior prediction method according to any embodiment of the present application.

[0009] Fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, characterized in that when the program is executed by a processor, the steps of the spatio-temporal data-driven consumer behavior prediction method according to any embodiment of the present application are implemented.

[0010] Fifth aspect, an embodiment of the present application provides a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of the spatio-temporal data-driven consumer behavior prediction method according to any embodiment of the present application are implemented.

[0011] Through a consumption behavior prediction method and system driven by spatio-temporal data provided by this application, the following technical effects can be achieved at least: (1) By constructing a user-business district-event heterogeneous tripartite graph, the deep integration of multi-source information is realized; and multi-scale Motif subgraph sampling and time-domain convolutional network are used to extract spatial structure patterns and event time-series impact trends respectively, and then the two are organically integrated into highly expressive spatio-temporal fusion features, and the consumption behavior of users in different business districts is predicted based on the spatio-temporal fusion features. Thus, it can reflect the personalized preferences of users at both the macro business district and micro POI levels, and prospectively capture the impacts of events such as holidays, promotions, and extreme weather, significantly reducing the prediction error and greatly improving the prediction accuracy and robustness of users' business district consumption behavior.

[0012] (2) By introducing an edge weight modeling method that can reflect the actual interaction intensity between users and business districts in the heterogeneous graph, and simultaneously integrating the dynamic impact relationship of events on business districts and users, the model can comprehensively capture the complex evolution trends of users' behaviors in the time and space dimensions. Through the multi-scale subgraph sampling mechanism, the consumption behavior characteristics of users at different geographical scales can be effectively extracted, enhancing the model's modeling ability for geographical heterogeneity; combined with the extraction and modeling of event time-series impact trends by the time-domain convolutional network, the model has a stronger response ability when facing sudden or periodic external events such as holidays and promotions. Through the deep integration of users' spatial behavior characteristics and event impact trend factors, spatio-temporal fusion features that can dynamically reflect users' states are generated, thereby realizing the accurate prediction of users' consumption behaviors in different business districts within a specific future time period.

[0013] Through this technical solution, it does not rely on a large number of static features constructed manually, has high automation and scalability, can adapt to changing consumption environments and complex data structures, realizes a powerful spatio-temporal collaborative modeling ability, provides more accurate and efficient user consumption behavior prediction for the tourism consumption industry, and helps optimize cultural and tourism marketing strategies and resource allocation. Brief Description of the Drawings

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0015] Figure 1 Shows a flowchart of an example of a consumption behavior prediction method driven by spatio-temporal data according to an embodiment of the present application; Figure 2 The structural connection diagram of an example of a heterogeneous ternary graph according to an embodiment of the present application is shown; Figure 3 The operation flowchart of an example of multi-scale Motif subgraph sampling for a heterogeneous ternary graph according to an embodiment of the present application is shown; Figure 4 The effect diagram of various spatial Motif templates according to an embodiment of the present application is shown; Figure 5 The operation diagram of an example of extracting multi-scale spatial features from multi-granularity subgraphs according to an embodiment of the present application is shown; Figure 6 The operation flowchart of an example of extracting event time series shock trend factors based on a time domain convolutional network according to an embodiment of the present application is shown; Figure 7 The operation flowchart of an example of feature fusion operation for spatio-temporal fusion features according to an embodiment of the present application is shown; Figure 8 The structural block diagram of an example of a spatio-temporal data-driven consumer behavior prediction system according to an embodiment of the present application is shown; Figure 9 It is a structural schematic diagram of an embodiment of the electronic device of the present application. Detailed implementation manners

[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0017] It should be noted that some scholars have tried to introduce spatial information into the prediction process, using geographical proximity or fixed grids to divide cities and conduct consumption modeling for users within each region. However, these methods often perform unified aggregation at a single spatial scale and treat the spatial dimension only as a discrete label, ignoring geographical continuity. For example, the gravitational effect of consumer flow between business districts is simplified as Euclidean distance weighting, unable to take into account the multi-level spatial structure between "brand clusters", "local hotspots", and "macro business districts", resulting in inaccurate prediction of cross-regional consumer tidal phenomena; at the same time, when the business district heat changes dynamically due to factors such as holidays, weather, and events, the model is difficult to reflect the fluctuations of spatial attraction in a timely manner.

[0018] In addition, the artificially constructed spatio-temporal cross features (such as the combination of "weekday + core business district") lead to dimensional explosion. However, when the number of POI (Point of Interest) types exceeds 50, the feature importance ranking of the XGBoost (eXtreme Gradient Boosting) model will exhibit chaotic phenomena. Additionally, although the LSTM (Long Short-Term Memory) can capture time dependencies, it has a blind spot in perceiving spatial topological changes.

[0019] Current models are mostly trained on data from a single city or a fixed business district, lacking cross-domain generalization ability. When applied to a new city or a new business district, it is often necessary to re-collect a large amount of labeled data and retrain the model, which is costly and slow to deploy; and its adaptability to emerging events and few-shot scenarios is also poor, making it difficult to meet the requirements of real-time online updates and rapid responses.

[0020] It should be understood that the purpose of the above description of the current related technologies is only to facilitate the public's better understanding of the inventive spirit and motivation of this application, and is not regarded as a limitation of this application. In addition, the technical solutions described in the above current related technologies are not prior art, and may also be unpublished technical solutions, such as those under research or in the laboratory stage.

[0021] In the technical solution of this application, for the processing of the collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved, etc., it all complies with the provisions of relevant laws and regulations and does not violate public order and good customs.

[0022] Figure 1 A flowchart showing an example of a spatio-temporal data-driven consumer behavior prediction method according to an embodiment of this application is shown.

[0023] Regarding the execution subject of the method in the embodiment of this application, it can be any controller or processor with computing or processing capabilities. Specifically, it can be implemented by a consumer behavior prediction management platform, which fuses multi-scale spatial features with event time-series impact trend factors to construct spatio-temporal fusion features that can dynamically reflect the spatio-temporal behavior state of users, and then realizes the joint prediction of the consumption amount and consumption frequency of users in each business district within a specific future time period, significantly improving the fineness and personalization level of the prediction results.

[0024] In some examples, it can be integrated and configured in an electronic device or terminal in a software, hardware, or software-hardware combination manner, and the types of terminals or electronic devices can be diverse, such as mobile phones, tablets, or desktop computers, etc.

[0025] Such as Figure 1As shown, in step S110, user nodes, business district nodes, and event nodes are respectively defined based on user attribute data, business district attribute data, and historical external events, and combined with user historical consumption data and business district POI data for analysis to determine the corresponding user-business district consumption edges, business district-event influence edges, and event-user trigger edges, thereby constructing a heterogeneous tripartite graph.

[0026] In some embodiments, the platform first extracts three types of core information from the data source: user attribute data, business district attribute data, and historical external event data, and constructs three types of nodes based on these data respectively, namely user nodes, business district nodes, and event nodes. Specifically, each user node represents a user, and various types of user attribute information of the user (such as age, gender, occupation, place of residence, preference category, etc.) are recorded in the node attributes. Each business district is mapped to a business district node, and various business district attribute labels are recorded in the node attributes, such as business district geographical location, business district pedestrian flow heat, business district level, and so on. Each event node can represent an external event that may affect consumer behavior, such as large holidays, weather condition changes, city activities (such as concerts, exhibitions), traffic changes, etc.

[0027] Next, the platform constructs three types of edges to connect the above nodes by analyzing historical consumption behaviors and external event data. Exemplarily, transaction records of users in each business district are extracted from the user consumption logs, including transaction amount, transaction time, transaction frequency, etc.; the business district boundary outline, merchant POI distribution density, and historical passenger flow heat value sequence are obtained using a map service or GIS platform; the event type, occurrence time period, and covered business district range are extracted from the external event database (such as holidays, merchant promotions, regional coupon releases, extreme weather warnings, etc.). In some cases, user attribute data can be extracted from the platform logs, and the user attribute data can also be subject to fuzzy processing, such as user attribute data representing a consumer group rather than a specific user.

[0028] Furthermore, the edge weight of the user-business district consumption edge is defined according to the historical consumption intensity of the user in the corresponding business district. Exemplarily, an edge connection is established based on the historical consumption records of the user in a specific business district, and its edge weight is designed to reflect the consumption intensity of the user in this business district. For example, it can be comprehensively calculated by combining dimensions such as consumption amount, frequency, and duration. In addition, the edge weight of the business district-event impact edge is defined according to the time-dependent decay impact coefficient of the corresponding external event in this business district. The business district-event impact edge reflects the impact degree of a certain external event on a certain business district. For example, by statistically analyzing indicators such as the consumption heat and traffic fluctuations in the business district after the event occurs, and combining the time distance of the event, a time-dependent decay mechanism is used to give the weight of the edge, and the weight weakens over time. The edge weight of the event-user trigger edge is defined according to the historical response weight of the user to the corresponding external event, and this edge can be established based on the user's response records to historical events (such as whether to consume due to holiday promotions, whether to reduce consumption due to weather changes). The corresponding edge weight is defined by mining the responsive trend of the user's historical consumption behavior to events.

[0029] In some examples of the embodiments of the present application, the user consumption data includes the historical consumption transaction records of at least one user in each business district, which supports the platform to accurately count the consumption frequency and amount distribution of the user in different business districts; the business district POI data includes the business district range information (such as the business district polygon boundary), the POI distribution density (such as counting the number and type distribution of POIs per unit area, such as the density of restaurants, retail stores, entertainment venues, etc., reflecting the service supply level of the business district), and the historical passenger flow heat value sequence (such as forming a daily or even hourly passenger flow time series curve, used to reveal the change trend of the business district activity), which can quantitatively refine the attractiveness of the business district in space. After combining the two, the user-business district consumption edge in the heterogeneous ternary graph can reflect the comprehensive spatial characteristics of the coupling of "user preference + business district vitality" based on the real consumption intensity and POI layout, greatly improving the accurate description of the user's potential consumption ability and willingness.

[0030] In addition, the historical external events include at least one of the following event types: holiday events, regional public consumption coupon events, merchant promotion events, and extreme weather events. In this way, through the four major types of external events, which include both regular holiday effects and sudden and phased drivers, the external events are explicitly modeled as nodes and introduced into the graph structure, effectively enhancing the model's perception ability of consumption changes driven by non-user subjective factors. In addition, the differences in the impact mechanisms brought by different types of events (such as holiday promotions being positive stimuli and bad weather being inhibitory factors) can be dynamically reflected through the learning of the edge weights of the event-user trigger edge (such as positive weights or negative weights), improving the detail of event modeling.

[0031] Figure 2A schematic diagram of structural connections of an example of a heterogeneous ternary graph according to an embodiment of the present application is shown.

[0032] like Figure 2 As shown in the figure, three types of graphic elements are set in the heterogeneous ternary graph, where circles represent user nodes (i.e., 211, 212, and 213), each of which carries user attribute characteristics (such as demographic attributes, provincial and municipal location, historical consumption preferences, etc.). Squares represent business district nodes (i.e., 221, 222, and 223), each of which carries attribute information such as POI distribution density, historical passenger flow thermal value sequence, and geographical range. Triangles represent event nodes (i.e., 231, 232, and 233), and event types may include holidays, public consumption coupons, merchant promotions, extreme weather, etc., with effective start and end times and preset event impact intensity. Various types of directed edge connections are also shown in the heterogeneous ternary graph. The user-business district consumption edge (such as 211→221, 212→222) represents the user's historical consumption behavior in the business district, which is used to capture the user's preference and consumption intensity for the business district. The business district-event impact edge (such as 231→221, 231→222) indicates the timeliness impact of an external event on the business district, and is used to quantify the attenuation effect of the event on consumption activity in different business districts. The event-user trigger edge (such as 231→211, 232→213) indicates the user's historical responsiveness to the external event, and is used to measure the actual number of users' participation or consumption in the relevant business district after the event is triggered.

[0033] Through the embodiments of the present application, a heterogeneous ternary graph is constructed, and the originally isolated users, business districts and external events are modeled in a unified graph structure, which not only expresses the direct consumption relationship between users and business districts, but also reflects the indirect impact of events on consumption behavior. A real-world scenario graph with multi-source heterogeneity and three-party interaction is constructed, which accurately captures the complex correlation between users, business districts and events.

[0034] In step S120, multi-scale Motif subgraph sampling is performed on the heterogeneous ternary graph to extract a multi-granularity subgraph that matches the user node, and the spatial coding features of the user node in each granularity subgraph in the multi-granularity subgraph are calculated, and the multi-scale spatial features of the corresponding user node are obtained by feature weighted fusion.

[0035] Here, the structural information associated with the target user node in the heterogeneous ternary graph is extracted through the Motif sampling method. For example, several typical graph structure Motifs are predefined first, such as four-node closed loop structure, user-trade zone-event ternary path, user-trade zone-user star structure, etc., to mine the user behavior and consumption preference information hidden in the local graph structure.

[0036] In addition, a multi-scale sampling method is adopted, that is, traversing and extracting Motif types of different scales (small structures, medium structures, large structures) to form multi-granularity subgraphs. Each granularity corresponds to the spatial feature capture ability of different information ranges. Exemplarily, by adopting a subgraph sampling strategy based on Depth-First Search (DFS) or random walk, a multi-granularity subgraph set containing a given user node is extracted within different hop numbers (such as 1 hop, 2 hops, 3 hops). Sampling is performed proportionally for each Motif type to ensure structural diversity and control the sampling scale.

[0037] Furthermore, for the subgraphs at each granularity, a graph encoding method (such as structure embedding or aggregation mechanism based on node adjacency relationship) is used to calculate the spatial feature encoding of the user node, which represents the spatial behavior characteristics of the user in the subgraph of this granularity. Finally, the feature encodings at different granularities are weighted and fused, and the fusion weights can be set based on granularity importance or historical model evaluation results to generate the final multi-scale spatial features.

[0038] Thus, more semantically meaningful substructures are extracted from the graph structure through diverse graph structure Motifs, different granularities of user collaboration and cross-circle patterns are extracted, and the high-order interaction patterns of three types of nodes are learned, which can effectively model the behavior habits of users in different spatial ranges and consumption scenarios, and capture the locality and cross-regionality of user consumption.

[0039] In step S130, based on the time-domain convolutional network, the event time-series impact trend factors corresponding to each event node in the heterogeneous ternary graph are extracted.

[0040] Here, by mining the time dynamic features carried by the event nodes, the impact trend that external events may have on consumption behavior is captured. Specifically, for each event node, its historical time series is constructed, which includes the actual impact indicators of the event on relevant business districts or user behavior at different time points, such as consumption growth rate, transaction frequency fluctuation, etc. The time-domain convolutional network is used to model this time series. The time-domain convolutional network has good time-series dependence modeling ability, which can effectively mine the evolution law of event impact on the time axis and finally output the time trend factor to represent the impact mode of this event on the consumption behavior of business district users. Thus, by introducing the time-domain convolution mechanism, the dynamic change trend of the impact of events on the consumption behavior of business district users is effectively characterized, which can effectively balance local sensitivity and long-range dependence and highlight the short-term impact effect of unexpected events.

[0041] In step S140, at least one potential external event corresponding to a future preset time period is obtained, and the target event time series impact trend factor of the corresponding user node is determined by matching with each event node in the heterogeneous ternary graph. The time-space fusion feature of the corresponding user node is obtained by fusing each target event time series impact trend factor and the multi-scale spatial features.

[0042] Here, the feature information in the two dimensions of time and space is effectively combined to generate the time-space fusion feature for predicting the business district consumption behavior. It should be understood that the duration of the future preset time period can be diversified and can be adjusted according to the platform requirements, such as next month or next week.

[0043] In some embodiments, it is first necessary to identify the external events that may occur within the future prediction time period. For example, it can be obtained from multiple channels such as public calendars (holidays), merchant schedules (promotions / discounts), weather forecasts (rain / snow / extreme temperatures), and government official website announcements (public consumption vouchers). Furthermore, semantic matching is performed with the event nodes defined by each historical event in the heterogeneous ternary graph to ensure the consistency of the event type fields. Then, according to the matching results, the time series impact trend factor of the target event associated with each user node is extracted.

[0044] Furthermore, each target event time series impact trend factor is fused with the multi-scale spatial features corresponding to the user node. The fusion method can be diversified, such as the attention mechanism, feature splicing followed by a multi-layer perceptron, or a graph attention network, etc. In this way, the generated time-space fusion feature not only contains the static preferences and spatial behavior patterns of the user, but also embeds the predictive information of the potential impact of external environmental changes on the business district consumption behavior.

[0045] In step S150, according to the time-space fusion feature of the user node, the business district consumption amount and business district consumption frequency of the corresponding user in the future preset time period are predicted.

[0046] In some embodiments, various non-restrictive multi-task deep learning models can be used to complete the consumption behavior prediction task. Its input is the time-space fusion feature, and the output is the consumption behavior in each potential business district, which includes two dimensions: consumption amount and consumption frequency. On the one hand, the consumption amount can be output through a regression model (such as a multi-layer perceptron, a graph neural regression network, etc.), and the number of transactions of the user within this time period can be output through a classification or regression model. On the other hand, a dual-branch network can also be designed. The shared layer is responsible for further mining the general information in the time-space fusion vector; the two task-specific branches adaptively fit the consumption amount and consumption frequency respectively.

[0047] Through the embodiments of the present application, by jointly modeling the consumption amount and consumption frequency of users in different business districts, the platform can not only determine whether a user will consume in a certain business district, but also estimate their consumption intensity, meeting the need for a fine assessment of user consumption potential.

[0048] Next, the calculation process of the edge weights for various types of edge connections in the heterogeneous ternary graph will be elaborated. It should be understood that the description of the edge weight calculation method below is only used as an example and should not be regarded as a limitation on the scope of implementation of the present application.

[0049] In some examples of the embodiments of the present application, the calculation of the edge weight for the user-business district consumption edge includes: , Equation (1) In the formula, is the user node and the business district node The edge weight corresponding to the user-business district consumption edge between them, which is used to express the historical consumption intensity of the user for this business district; represents the frequency weight coefficient, and the value range is ; represents the user node The total number of historical transactions within the business district node ; represents any business district node, represents the user node The sum of the number of transactions of the user node in all business district nodes; represents the user node The total historical consumption amount within the business district node represents the user node The total consumption amount of the user node in all business districts. The frequency weight coefficient

[0050] can be preset and can be set according to the emphasis requirements of the business side on "consumption times" and "consumption amount". For example, setting it to 0.7 indicates that the business side places more emphasis on "consumption times", while setting it to 0.3 indicates that the business side places more emphasis on "consumption amount".

[0051] Regarding the calculation of the edge weight of the business district - event impact edge, it includes: , Equation (2) In the formula, is the business district node and the event node The edge weight corresponding to the business district - event impact edge between them is used to express the time - effect attenuation influence coefficient to quantify the average time - effect impact intensity of the event node on the business district node during its entire effective period; represents the inherent influence intensity of the event node , and the value range is ; is the time - effect attenuation rate weight, represents the start time of the event node ; represents the business district node in the event The set of all historical transaction times when transactions occur during the effective time interval , represents the total number of transaction times in the set , represents the set Any historical transaction time in; and respectively represent the start time and end time of the event node when it becomes effective. The time - effect attenuation rate weight can be pre - set and can be set to different values for different event types. For example, for holidays, it is about 0.2 (the after - heat fades in about 5 days, and the event influence has decayed to 37% of the initial value), for promotions, it is about 0.3 (rapid decay in about 3 days after the promotion, and the event influence has decayed to 41% of the initial value), and for extreme weather, it is about 0.5 (the effect weakens significantly in about 2 days, and the event influence has decayed to 37% of the initial value).

[0052] Here, in the calculation of the edge weight of the business district - event impact edge, on the basis of the original exponential decay model, "all actual transactions within the entire event cycle" is further introduced for averaging to smooth the fluctuations of single - pen transactions and allow the event itself to show positive incentives or negative inhibitions. By applying time - effect attenuation to each transaction during the event's effective period and taking the average, the comprehensive impact of the event on the business district throughout the cycle can be restored more accurately.

[0053] It should be noted that the event's inherent intensity There are positive and negative distinctions. For example, merchant promotions, consumer vouchers, etc. are regarded as incentives and assigned positive values; extreme weather, crisis alerts, etc. are regarded as inhibitions and assigned negative values. In this way, it is possible to simultaneously model positive incentives (promotions) and negative inhibitions (extreme weather) within the same framework, enabling the graph structure to comprehensively reflect the heterogeneous quantitative impact of multi-source events on the consumption in the business district.

[0054] Regarding the calculation of the edge weights of the event-user trigger edges, it includes: , Equation (3) In the formula, is the event node and the user node The edge weight corresponding to the event-user trigger edge between them is used to quantify the historical response degree weight of the user node to the event node ; represents that within the influence period of the event node , the actual consumption times of the user node in the business district related to this event are used to reflect the participation degree of this user in this event; represents any user node, represents the maximum response times obtained by statistically all user nodes for the event node .

[0055] In Equation (3), since there are significant differences in the responses of users to the same event, the corresponding edge weights are measured by the ratio of the actual consumption times of the user during the event period to the maximum response times of all users under this event, to measure individual sensitivity. Therefore, if an event can significantly trigger the effective consumption of users in the related business district, the response degree of this user to the event is high, otherwise it is low.

[0056] Figure 3 FIG. shows an operation flowchart of an example of multi-scale Motif subgraph sampling for a heterogeneous ternary graph according to an embodiment of the present application. Figure 4 FIG. shows a schematic diagram of the effects of various spatial Motif templates according to an embodiment of the present application.

[0057] As Figure 3 shown, in step S310, a spatial Motif template group is obtained, and this spatial Motif template group includes a triangular closed-loop template, a double-business district path template, and an event loop template.

[0058] Specifically, the triangular closed-loop template defines a three-node closed-loop structure formed by a target user node and another user node at the same business district node, and its template format is target user - business district - another user, which is used to capture the consumption synergy effect of group users within the same business district. As Figure 4As shown, the triangular closed-loop template adopts 411 → 421 ← 413. When multiple users make purchases in the same business district, this usually reflects the common attraction of this business district to this group (such as the same brand, the same promotional activity), making the sampled users tend to have similar consumption preferences or social relationships, revealing the internal collaboration among user groups with common consumption preferences at the micro level.

[0059] The two-business-district path template defines a two-hop path structure in which the target user node and another user node are sequentially connected through two different business district nodes. Its template format is target user - first business district - second business district - another user, and it is used to explore the consumption migration patterns and interest extension of users across business districts. For example, Figure 4 As shown, the two-business-district path template adopts 412 → 422 - 424 ← 414. If the consumption paths of user 412 in business district 422 and user 414 in business district 424 are similar, it indicates that the two may share cross-business-district interests (such as preferences for the same type of store). From this, the potential consumption intentions of users in the new business district can be predicted, providing a basis for cross-district promotion of business districts or user scenario drainage, and revealing the cross-district linkage and path dependence of users among different business districts at the meso level.

[0060] The event circle template defines a four-node event-driven closed-loop structure in which the target user node and another user node interact through business district nodes and event nodes. Its template format is target user - business district - event - another user, and it is used to extract the resonant consumption responses of different users to the same external event, and can reflect the collective impact of the external event on different user-business district paths within the same time window at the macro level. For example, Figure 4 As shown, the path of the event circle template is user node 415 → business district node 422 ← event node 431 → user node 417. Its meaning is that the target user node 415 points to the business district node 422 through the "user-business district consumption edge", the business district node 422 is associated with the event node 431 through the "business district-event impact edge", and the event node 431 then points to another user node 417 through the "event-user trigger edge", forming a complete four-node closed-loop structure. Through the event circle template, within the effective period of the same external event 431, the resonant consumption responses of different users (such as 415 and 417) in the same business district 422 can be extracted, thereby depicting the collective impact effect of this event on multiple user-business district paths at the macro level.

[0061] Through predefined templates, the model directly locks the spatial relationships that are most driving for consumption behavior, eliminating the redundant scanning of irrelevant subgraphs; different templates cover three practical scenarios from "local popularity" to "cross-regional migration" to "external intervention", ensuring that the extracted spatial features are both comprehensive and distinguishable.

[0062] In step S320, for each user node in the heterogeneous tripartite graph, construct and cache the set of neighbor business circles of the user node and the corresponding consumption edge weight information.

[0063] In some embodiments, it can be that the platform performs regular (e.g., daily or weekly) scanning and analysis, such as offline aggregation and batch update.

[0064] In step S330, for each business circle node in the heterogeneous tripartite graph, construct and cache the set of neighbor users, the set of neighbor business circles, and the set of neighbor events of the business circle node and the corresponding influence edge weight information.

[0065] In some embodiments, the offline aggregation and caching method can also be adopted, thereby significantly reducing the I / O overhead.

[0066] It should be noted that in the heterogeneous tripartite graph, there is no direct connection relationship between business circle nodes. The neighbor business circle nodes described here refer to business circle nodes with a bridging relationship. Specifically, there is a user co-occurrence relationship or an event co-occurrence relationship between a business circle node and its corresponding neighbor business circle node. The user co-occurrence relationship is used to indicate that there is an edge connection corresponding to the same user node between the first business circle node and the second business circle node, and the event co-occurrence relationship is used to indicate that there is an edge connection corresponding to the same event node between the third business circle node and the fourth business circle node. Exemplarily, count the number of common users for each pair of business circles , and count the number of common events for each pair of business circles , merge these two co-occurrence relationships and normalize them to obtain the composite edge weight between each pair of business circles . Thus, it can not only capture the business circles that directly share user traffic, but also discover the business circles that are linked due to common events, realizing extended spatial insight.

[0067] In step S340, for each event node in the heterogeneous tripartite graph, construct and cache the set of neighbor users of the event node and the corresponding trigger edge weight information.

[0068] In some embodiments, scan all event effective windows, cache the relevant business circle and event pairs, and retain all node and edge weight information.

[0069] In step S350, for each spatial Motif template in the spatial Motif template group, perform multiple sampling operations according to the spatial Motif template from the cached set of neighbor nodes and edge weight information to obtain the corresponding Motif subgraph cluster, and the number of Motif subgraphs in the Motif subgraph cluster is the preset number of template sampled subgraphs.

[0070] In some embodiments, for each template, multiple random samplings are performed from the cached neighbors according to the edge weights or co-occurrence intensities to form subgraph clusters, while performing deduplication and coverage monitoring to ensure that there are a preset number (e.g., 50) of subgraphs in the final Motif subgraph clusters.

[0071] In step S360, the Motif subgraph clusters corresponding to each spatial Motif template are combined to obtain corresponding multi-granularity subgraphs.

[0072] Here, the subgraph clusters corresponding to the three templates are merged to form a unified multi-granularity subgraph set, realizing the organic combination of subgraphs at different scales, so that the final spatial features simultaneously have multiple goals of "local cluster perception", "cross-circle collaborative insight", and "event response capture".

[0073] Figure 5 The operation schematic diagram of an example of extracting multi-scale spatial features from multi-granularity subgraphs according to an embodiment of the present application is shown.

[0074] As Figure 5 shown, in step S510, for each Motif subgraph in the Motif subgraph cluster, based on the graph attention network, the features of each neighbor node in the Motif subgraph are aggregated to the target user node to obtain the subgraph space encoding vector corresponding to the target user node.

[0075] It should be noted that the influences of different neighbor nodes on the target user are not equivalent. Processing the neighbor features and the target features according to "concatenation → mapping → activation → normalization" can dynamically calculate the relative importance of each edge in the subgraph, so that the neighbor information with high value or high correlation obtains a greater weight.

[0076] Furthermore, within a single subgraph, the weighted features of the neighbor nodes and its own features are fused by weighted summation to construct the single-scale spatial expression of the target user node in the subgraph, realizing the information refinement of the "local receptive field". The specific calculation details are as follows: , Equation (4) , Equation (5) In the formula, represents the subgraph space encoding vector of the target user node in the th Motif subgraph, is the Sigmoid activation function; represents any node adjacent to in the Motif subgraph, represents the set of neighbor nodes directly connected to in the Motif subgraph, is the attention coefficient, which is used to measure the information attention degree of the target user node to its neighbor nodes ; and are respectively and input feature vectors, represents the feature mapping matrix, which is used to project the original feature vector into the attention space; represents the vector concatenation operation, represents the transpose of the attention weight vector, represents the LeakyReLU activation function; represents any node adjacent to in the Motif subgraph, represents performing the same mapping and summing on all neighbor nodes to be used as the normalization denominator.

[0077] In step S520, the subgraph space encoding vectors corresponding to each Motif subgraph in the Motif subgraph cluster are aggregated to obtain the template average space feature for the corresponding spatial Motif template.

[0078] It should be noted that multiple samplings under the same template can cover different instances of this pattern. By simple averaging (or extended to weighted averaging), the accidental noise brought by individual subgraphs is eliminated to form the most representative spatial feature representation of this template. The specific calculation formula is as follows: , Equation (6) In the formula, represents the template average space feature for the th spatial Motif template, represents the number of sampled subgraphs of the template, represents the encoding vector of the target user node in the Motif subgraph obtained by the th sampling of the th spatial Motif template; In step S530, the template average space features corresponding to each spatial Motif template are fused through cross-template attention to obtain the multi-scale spatial feature of the target user node.

[0079] It should be noted that for the three templates of "micro triangle", "meso double circle", and "macro event", the importance of their respective encoding results is different for different users or different scenarios. An adaptive matching is achieved by automatically calculating the fusion weights of each template through a lightweight feedforward network. Furthermore, the spatial features of each template after adaptive weighting are linearly superimposed to obtain a multi-scale spatial feature with the capabilities of local cooperation, meso transfer, and global event response. The specific calculation formula is as follows: , Equation (7) , Equation (8) Wherein is the multi-scale spatial feature corresponding to the target user node ; represents the template average spatial feature of various spatial Motif templates weighted and summed according to the corresponding fusion weights ; represents the th type of spatial Motif template feature fusion weight; represents the linear mapping matrix for the th type of spatial Motif template; represents the hyperbolic tangent activation function; represents the transpose of the global fusion weight vector; represents any type of spatial Motif template; represents the same mapping and score calculation for all types of spatial Motif templates, which is used as the normalization denominator.

[0080] Through the embodiments of the present application, multi-scale Motif subgraph sampling and hierarchical attention aggregation are adopted to effectively fuse the three types of spatial features of "group collaboration", "cross-circle flow" and "event resonance", realizing the refined characterization of heterogeneous spatio-temporal consumption networks.

[0081] Figure 6 shows an operation flow chart of an example of extracting event time series impact trend factors based on a time domain convolutional network according to the embodiments of the present application. Through the operations of the embodiments of the present application, for each event node in the figure , its influence in the graph structure is converted into a vectorized factor available for downstream fusion through a "graph-time series" coupling pipeline.

[0082] As Figure 6 shown, in step S610, an event node spatio-temporal input sequence is extracted from the heterogeneous ternary graph, and the event node spatio-temporal input sequence includes an aggregated business district consumption sequence and an aggregated event intensity sequence.

[0083] Here, by means of the "business district-event" neighbor edge, the business district consumption and the event self-attenuation signal in the graph structure are aggregated into a two-channel time series vector, ensuring that the input used is not only the time stamp or static intensity of the event itself, but also the actual consumption response of each business district it connects, realizing graph-aware time series input.

[0084] Specifically, the calculation of the aggregated business district consumption sequence includes: , Equation (9) , formula (10) In the formula,[[]] represents the historical trading time steps within represents the time series index,[[]] is the event node corresponding to the total number of historical time series steps, indicating the total number of time steps collected backward from the effective time of the event node ; represents the event node at the total weighted regional consumption, which is used to obtain the aggregated business district consumption sequence through time series fusion; represents the event node the set of neighboring business districts directly connected in the heterogeneous ternary graph, represents the sum of all business district nodes belonging to the set of neighboring business districts of the event node to summarize the consumption within the scope of the event effect; represents the total consumption of the business district node at ; represents the immediate impact weight corresponding to the business district node and the event node at to quantify the impact intensity of the event on the business district at this moment.

[0085] Here, by adopting the weighted aggregated consumption sequence, multiplying the business district - event connection weight in the heterogeneous ternary graph by the consumption volume and then aggregating, it can sensitively reflect the actual fluctuation of the business district consumption volume after the event occurs, enabling the input sequence to contain both topological structure information (which business districts are more affected) and actual economic activities (changes in consumption volume).

[0086] Regarding the calculation of the aggregated event intensity sequence, it includes: , formula (11) In the formula,[[]] represents the time series decay intensity value of the event node at which is used to obtain the aggregated event intensity sequence through time series fusion.

[0087] It should be noted that both formula (10) and formula (11) adopt the time - exponential decay function because the self - influence intensity of the event (formula 11) and its stimulating effect on business district consumption (formula 10) essentially follow the same exponential decay process. That is to say, whether it is the "immediate impact weight" used to weight the business district consumption sequence ​, or the "temporal decay intensity value" used to describe the decay of the event itself over time , essentially expressing the same physical quantity - that is, as time goes by, the influence of the event decays according to an exponential function.

[0088] Here, an exponential decay intensity sequence is adopted, combined with the decay channel of the event itself, to retain the continuous description of the event's own attributes (such as promotions, extreme weather), ensuring that the model does not only focus on the accidental outbreak of a certain period of data.

[0089] In step S620, the combined aggregated business district consumption sequence and the aggregated event intensity sequence are used to obtain a two-channel event node spatio-temporal input sequence .

[0090] In step S630, based on the multi-scale time-domain convolutional network, the event node is extracted from the event node spatio-temporal input sequence of the event temporal impact trend factor .

[0091] It should be noted that the event temporal impact trend factor is a vectorized condensed expression of the dynamic impact of a single event node on the business district consumption during its effective period. Specifically, by splicing the weighted business district consumption sequence of the event at each historical moment and its own decay intensity sequence and inputting them into the multi-scale time-domain convolutional network, and taking the hidden representation at the last moment of the last layer.

[0092] More specifically, is input into the multi-scale time-domain convolutional network. The first layer focuses on short-term impacts, and subsequent layers successively expand the receptive field to capture medium- and long-term trends. Take the last layer (such as the th layer) corresponding to the last moment of the output hidden representation as the event temporal impact trend factor .

[0093] Here, the multi-scale time-domain convolutional network contains multiple cascaded TCN layers, and each TCN layer has a successively increasing receptive field size to capture the impact and evolution trend of the event node at different time scales.

[0094] In some embodiments, each TCN layer is respectively set with different dilation rates and convolutional kernel lengths to obtain a successively increasing receptive field size, so that the model can capture various temporal patterns from "adjacent moment pulsations" to "long-distance trend evolution" without increasing the sequence length or global self-attention, covering different scales from several-step short-term impacts to longer-period evolutions, realizing a multi-stage convolutional structure, achieving both sensitivity to instantaneous peaks and consideration of the grasp of medium- and long-term trend directions.

[0095] As a further preferred embodiment, residual connections can also be added between each layer of TCN layers, and LayerNorm is performed after each layer, so as to ensure the smooth flow of information in the deep network and avoid the problems of gradient disappearance or explosion caused by the increase in the number of layers.

[0096] Figure 7 The operation flowchart of an example of the feature fusion operation for spatio-temporal fusion features according to an embodiment of the present application is shown.

[0097] As Figure 7 shown, in step S710, an event factor vector of the user node is constructed according to each target event time series impact trend factor and the edge weight of the corresponding event-user trigger edge.

[0098] It should be noted that in the heterogeneous ternary graph, the edge weight of the event-user trigger edge can accurately reflect the response sensitivity of the user to historical events. When facing multiple future potential events, those user-event pairs that showed a high response to the same type of events in history can be given priority.

[0099] , Equation (12) In the formula, denotes the event factor vector of the user node , is the total number of event nodes connected to the user node matched by the potential external event, denotes any matched event node, denotes the corresponding time series impact trend factor, denotes the user node in the heterogeneous ternary graph and the event node the edge weight between them; denotes the normalized weight coefficient, which is used to measure the relative importance of each event factor to the user node in the interval; denotes the sum of the event-user trigger weights corresponding to all the matched potential external events, which is used as the normalization denominator.

[0100] In Equation (12), by using to weight each event factor , not only the information of historical behavior preferences can be retained, but also different influence is assigned to future events at the user level. Thus, weights are differentially assigned according to the user's historical behavior, so that different users have different reaction amounts to the same future event, greatly enhancing the personalization ability of the model.

[0101] In addition, the original response weights of different events may have different dimensions and ranges, and direct weighting may cause some weights to be too large and dominate all factor vectors. Here, by taking the sum of all event-user weights as the denominator, the normalized weights are obtained. , so that the weights of each matching event are proportionally distributed between 0 and 1, and the sum is 1.

[0102] In step S720, the multi-scale spatial features of the user node and the event factor vector are fused through gating to obtain the corresponding spatio-temporal fusion features.

[0103] It should be noted that in the process of implementing this application, when comparing "attention fusion" and "gating fusion", attention fusion needs to score each event or each pair of spatial / event dimensions separately, and the computational cost increases exponentially with the number of events or dimensions. In contrast, in gating fusion, the balance coefficient is calculated directly based on two overall vectors of space and event through a single mapping and the Sigmoid function, which is more efficient.

[0104] Specifically, the per-dimensional gating vector is obtained by linearly mapping and then weighted summing the spatial features and event factors, and through a Sigmoid non-linear mapping, which determines the fusion ratio of the spatial and event signals in each dimension.

[0105] First, linear mappings are performed on the two input paths respectively and then summed, and the per-dimensional gating vector is obtained through Sigmoid activation.

[0106] , Equation (13) In the formula, represents the per-dimensional gating vector, and represent the gating mapping matrices for the spatial features and event factors respectively, is the gating bias vector, represents the multi-scale spatial features corresponding to the user node .

[0107] Here, the gating coefficient output by the Sigmoid function is a vector that independently controls the weights of the spatial and event signals in each dimension, avoiding the situation that the global fixed ratio cannot capture the differences in the importance of signals in different dimensions. In addition, the gating mapping matrices , and the gating bias vector are learnable parameters, and they can all be jointly trained with the downstream network, enabling the fusion method to be automatically optimized according to the actual data.

[0108] Therefore, compared with multi-head attention or recurrent scoring for each pair of signals, gated fusion only requires one tensor operation, and the online latency can be reduced by several times. In addition, as the feature distribution changes, the gating coefficients can be automatically adjusted without manual adjustment of the fusion hyperparameters, improving the adaptability of the model to multiple scenarios.

[0109] Then, based on the per-dimensional gating vector, the two signals are weighted and merged element-wise to obtain the spatio-temporal fusion feature of the corresponding user node.

[0110] , Equation (14) where represents the spatio-temporal fusion feature of user node , represents the all-ones vector, represents the element-wise product.

[0111] Here, the spatial feature and the event factor are linearly weighted element-wise by the gating vector to obtain . Through the element-wise weighting method, the smooth transition and fusion of the two signals are realized. Compared with hard splicing, this fusion gives a continuous trade-off value in each dimension, and there will be no situation where one of the signals is completely truncated, and a smooth curve can be formed in the feature space, enhancing the modeling ability for the transitional period of user behavior.

[0112] Regarding the details of the final prediction of the consumption behavior of business district users, in some examples of the embodiments of this application, the spatio-temporal fusion feature of the user node is concatenated with the business district attribute feature corresponding to the target business district node to form an input vector .

[0113] The input vector is input into a Deep Cross Network (DCN), and through layers of explicit feature crossing, and the business district consumption amount and business district consumption frequency of the corresponding user in the target business district are output via a double regression head.

[0114] Specifically, the following calculations are performed layer by layer on layers: , Equation (15) where is the input vector of the th layer, and when it represents the initial input vector after concatenation; represents the transpose of the cross-weight of the th layer, represents the bias term of the th layer; Here, the cross module of DCN undergoes several layers of iteration. In each layer, the initial features are scaled by the inner product scalar (an explicit cross intensity at one time) of the initial input and the current input, and then a bias and a residual are added to achieve an explicit combination of high-order features layer by layer.

[0115] It should be noted that in consumer behavior prediction, there may be complex combination relationships of the second order, third order, and even higher orders between the user spatio-temporal fusion features and the business district attributes - for example, "the sensitivity of a user to a certain business district during the promotion period" may be jointly affected by multiple signals such as user preferences × event impact × business district heat. However, in traditional deep networks, they can only implicitly learn such interactions through multiple layers of non-linear transformations, which are difficult to interpret and require a relatively deep network. In contrast, in the cross module of DCN, in each cross layer, based on the interaction result of the previous layer, an explicit product is performed again with the initial input, so as to cumulatively model the second order, third order... up to N +1 order. Through the stepped structure, not only the low-order feature signals are retained, but also the high-order signals can be smoothly incorporated into the representation, avoiding overfitting and gradient degradation at one time.

[0116] After times of crossing, the cross output is obtained, and are respectively sent into two linear regression heads to directly predict the corresponding business district consumption amount and business district consumption frequency.

[0117] Here, after obtaining the output of the top layer of the cross network, the model predicts the consumption amount and consumption frequency in parallel through two sets of extremely simple linear regression heads.

[0118] , Equation (16) , Equation (17) In the formula, represents the cross output vector of the th layer, represents the predicted value of the consumption amount of user node for the target business district node within a preset future time period, represents the predicted value of the consumption frequency of user node for the target business district node within the same time period, and respectively represent the transpose of the regression weight vector of the first regression head and the transpose of the regression weight vector of the second regression head, and respectively represent the regression bias of the first regression head and the regression bias of the second regression head.

[0119] Here, by using two sets of independent weight vectors but sharing the input, the model can perform regression on two metrics simultaneously on the same feature representation, avoiding duplicate encoding. Since the consumption amount and consumption frequency are both related and significantly different, the independent parameters of the two heads ensure their respective optimal fitting capabilities. Thus, performing two regressions in parallel on the same feature representation avoids the repeated calculations of single-task, saving memory and computing resources. In addition, sharing the cross output can also promote the joint convergence of the two tasks in the early training stage, improving the sample utilization efficiency.

[0120] Through the embodiments of the present application, a deep learning model with an end-to-end combination of a cross network and a dual regression head is adopted. Without manually designing a large number of cross features or introducing a deep MLP (Multi-Layer Perceptron), the internal cross module of the model can automatically construct a combination from the second order to N the +1 order, greatly improving the development efficiency and the interpretability of the model.

[0121] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of actions combined. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application. In the above embodiments, each embodiment is described with emphasis. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0122] Figure 8 The structural block diagram of an example of a consumption behavior prediction system driven by spatio-temporal data according to an embodiment of the present application is shown.

[0123] As Figure 8 shown, the spatio-temporal data-driven consumption behavior prediction system 800 includes a heterogeneous tripartite graph construction unit 810, a spatial feature extraction unit 820, a temporal feature extraction unit 830, a spatio-temporal feature fusion unit 840, and a business district consumption prediction unit 850.

[0124] The heterogeneous ternary graph construction unit 810 is used to define user nodes, business district nodes, and event nodes according to user attribute data, business district attribute data, and historical external events respectively, and analyze the user historical consumption data and business district POI data to determine the corresponding user-business district consumption edges, business district-event influence edges, and event-user trigger edges, so as to construct a heterogeneous ternary graph; the edge weight of the user-business district consumption edge is defined according to the historical consumption intensity of the user in the corresponding business district, the edge weight of the business district-event influence edge is defined according to the time-dependent decay influence coefficient of the corresponding external event in the business district, and the edge weight of the event-user trigger edge is defined according to the historical response weight of the user to the corresponding external event.

[0125] The spatial feature extraction unit 820 is used to perform multi-scale Motif subgraph sampling on the heterogeneous ternary graph to extract multi-granularity subgraphs matching the user nodes, and calculate the spatial coding features of the user nodes in each granularity subgraph of the multi-granularity subgraph, and obtain the multi-scale spatial features of the corresponding user nodes through feature weighted fusion.

[0126] The temporal feature extraction unit 830 is used to extract the event temporal impact trend factors corresponding to each event node in the heterogeneous ternary graph based on a time-domain convolutional network.

[0127] The spatio-temporal feature fusion unit 840 is used to obtain at least one potential external event corresponding to a future preset time period, and determine the target event temporal impact trend factors of the corresponding user nodes by matching with each event node in the heterogeneous ternary graph, and fuse each of the target event temporal impact trend factors and the multi-scale spatial features to obtain the spatio-temporal fusion features of the corresponding user nodes.

[0128] The business district consumption prediction unit 850 is used to predict the business district consumption amount and business district consumption frequency of the corresponding user for each business district in the future preset time period according to the spatio-temporal fusion features of the user nodes.

[0129] In some embodiments, the embodiments of the present application provide a non-volatile computer-readable storage medium, in which one or more programs including execution instructions are stored, and the execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to be used to execute the steps of any one of the above spatio-temporal data-driven consumption behavior prediction methods of the present application.

[0130] In some embodiments, the embodiments of the present application further provide a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to execute the steps of any one of the above spatio-temporal data-driven consumer behavior prediction methods.

[0131] In some embodiments, the embodiments of the present application further provide an electronic device, which includes: at least one processor, and a memory communicatively connected to the at least one processor. Wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the steps of the spatio-temporal data-driven consumer behavior prediction method.

[0132] Figure 9 is a schematic hardware structure diagram of an electronic device for executing the spatio-temporal data-driven consumer behavior prediction method provided by another embodiment of the present application, as Figure 9 shown, the device includes: one or more processors 910 and a memory 920, Figure 9 taking one processor 910 as an example.

[0133] The device for executing the spatio-temporal data-driven consumer behavior prediction method may further include: an input device 930 and an output device 940.

[0134] The processor 910, the memory 920, the input device 930, and the output device 940 may be connected through a bus or other means, Figure 9 taking connection through a bus as an example.

[0135] The memory 920, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the spatio-temporal data-driven consumer behavior prediction method in the embodiments of the present application. The processor 910 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 920, that is, implements the spatio-temporal data-driven consumer behavior prediction method in the above method embodiments.

[0136] The memory 920 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the electronic device and the like. In addition, the memory 920 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 920 may optionally include a memory remotely disposed relative to the processor 910, and these remote memories may be connected to the electronic device through a network. Examples of the above networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0137] The input device 930 may receive input digital or character information and generate signals related to user settings and function controls of the electronic device. The output device 940 may include a display device such as a display screen.

[0138] The one or more modules are stored in the memory 920 and, when executed by the one or more processors 910, execute the spatio-temporal data-driven consumer behavior prediction method in any of the above method embodiments.

[0139] The above product may execute the method provided in the embodiments of the present application and has functional modules and beneficial effects corresponding to the execution of the method. Technical details not described in detail in this embodiment may be referred to the method provided in the embodiments of the present application.

[0140] The electronic device in the embodiments of the present application exists in various forms, including but not limited to: (1) Mobile communication devices: These devices are characterized by having mobile communication functions and mainly aim to provide voice and data communication. Such terminals include: smart phones, multimedia phones, functional phones, and low-end phones, etc.

[0141] (2) Ultra-mobile personal computer devices: These devices belong to the category of personal computers, have computing and processing functions, and generally also have the characteristic of mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices, etc.

[0142] (3) Portable entertainment devices: These devices can display and play multimedia content. Such devices include: audio and video players, handheld game consoles, e-books, and smart toys and portable in-vehicle navigation devices.

[0143] (4) Other airborne electronic devices with data interaction functions.

[0144] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0145] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the related technology can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A consumption behavior prediction method driven by spatio-temporal data, characterized in that, The method comprises: According to user attribute data, business district attribute data and historical external events, user nodes, business district nodes and event nodes are defined respectively, and the corresponding user-business district consumption edges, business district-event influence edges and event-user trigger edges are determined by combining the user's historical consumption data and business district POI data, so as to construct a heterogeneous ternary graph; the edge weight of the user-business district consumption edge is defined according to the historical consumption intensity of the user in the corresponding business district, the edge weight of the business district-event influence edge is defined according to the time-attenuation influence coefficient of the corresponding external event in the business district, and the edge weight of the event-user trigger edge is defined according to the historical responsiveness weight of the user to the corresponding external event; Performing multi-scale Motif subgraph sampling on the heterogeneous ternary graph to extract a multi-granularity subgraph matching the user node, and calculating the spatial encoding features of the user node in each granularity subgraph in the multi-granularity subgraph, and obtaining the multi-scale spatial features of the corresponding user node by weighted feature fusion; Based on the time domain convolutional network, extract the event time series impact trend factor corresponding to each event node in the heterogeneous ternary graph; Acquire at least one potential external event corresponding to a preset time period in the future, and determine the target event time series impact trend factor of the corresponding user node by matching with each event node in the heterogeneous ternary graph, and fuse each of the target event time series impact trend factors with the multi-scale spatial features to obtain the spatiotemporal fusion features of the corresponding user node; According to the spatiotemporal fusion characteristics of the user nodes, the shopping district consumption amount and shopping district consumption frequency of the corresponding user in each shopping district in the future preset time period are predicted.

2. The method according to claim 1, wherein The calculation of edge weights for the user-business district consumption edge includes: , Wherein, is the user node and the business district node The edge weight corresponding to the user-business district consumption edge between them is used to express the historical consumption intensity of the user for this business district; represents the frequency weight coefficient, and the value range is ; represents the user node The total number of historical transactions within the business district node ; represents any business district node, represents the user node The sum of the number of transactions in all business district nodes; represents the user node The total historical consumption amount in the business district node , represents the user node The total consumption amount in all business districts; The calculation of the edge weight of the business district-event impact edge includes: , In the formula, is the business district node and the event node The edge weight corresponding to the business district - event impact edge between them is used to express the time - effect attenuation influence coefficient to quantify the average time - effect impact intensity of the event node on the business district node during its entire effective period; represents the inherent influence intensity of the event node , and the value range is ; is the time - effect attenuation rate weight, represents the start time of the event node ; represents the business district node during the event The set of all historical transaction times when transactions occur within the effective time interval , represents the total number of transaction times in the set , represents any historical transaction time in the set ; and respectively represent the start time and end time of the event node when it becomes effective; The calculation of the edge weight of the event-user trigger edge includes: , Wherein, is the event node and the user node The edge weight corresponding to the event-user trigger edge between them is used to quantify the historical response weight of the user node to the event node ; Indicates that within the influence period of the event node , the user node The actual consumption times in the business district related to the event are used to reflect the user's participation in the event; Represents any user node, Represents the maximum response times for the event node obtained by counting all user nodes.

3. The method according to claim 2, characterized in that, The performing multi-scale Motif subgraph sampling on the heterogeneous ternary graph to extract a multi-granularity subgraph matching the user node includes: A spatial Motif template group is obtained, wherein the spatial Motif template group includes a triangular closed loop template, a dual business district path template, and an event circle template; the triangular closed loop template defines a three-node closed loop structure formed by a target user node and another user node at the same business district node, and its template format is target user-business district-another user, which is used to capture the consumption synergy effect of group users in the same business district; the dual business district path template defines a two-hop path structure formed by connecting a target user node and another user node in sequence through two different business district nodes, and its template format is target user-first business district-second business district-another user, which is used to mine the consumption migration pattern and interest extension of users across business districts; the event circle template defines a four-node event-driven closed loop structure formed by the target user node and another user node interacting through business district nodes and event nodes, and its template format is target user-business district-event-another user, which is used to extract the resonant consumption response of the same external event to group users; For each user node in the heterogeneous ternary graph, construct and cache the set of neighboring business districts of the user node and the corresponding consumption edge weight information; For each business district node in the heterogeneous ternary graph, construct and cache the set of neighboring users, the set of neighboring business districts, and the set of neighboring events of the business district node and the corresponding influence edge weight information; there is a user co-occurrence relationship or an event co-occurrence relationship between the business district node and the corresponding neighboring business district node. The user co-occurrence relationship is used to indicate that there is an edge connection corresponding to the same user node between the first business district node and the second business district node, and the event co-occurrence relationship is used to indicate that there is an edge connection corresponding to the same event node between the third business district node and the fourth business district node; For each event node in the heterogeneous ternary graph, construct and cache the set of neighboring users of the event node and the corresponding trigger edge weight information; For each spatial Motif template in the spatial Motif template group, perform multiple sampling operations according to the spatial Motif template from the cached set of neighboring nodes and edge weight information to obtain the corresponding Motif subgraph cluster; the number of Motif subgraphs in the Motif subgraph cluster is the preset number of sampled subgraphs of the template; Combine the Motif subgraph clusters corresponding to each spatial Motif template to obtain the corresponding multi-granularity subgraph.

4. The method according to claim 3, wherein Calculating the spatial encoding features of the user nodes in each granularity subgraph of the multi-granularity subgraph and obtaining the multi-scale spatial features of the corresponding user nodes through feature weighted fusion, including: For each Motif subgraph in the Motif subgraph cluster, aggregate the features of each neighboring node in the Motif subgraph to the target user node based on the graph attention network to obtain the subgraph spatial encoding vector corresponding to the target user node: , , In the formula, represents the sub - graph space encoding vector of the target user node in the th Motif sub - graph, is the Sigmoid activation function; represents any node adjacent to within the Motif sub - graph, represents the set of neighbor nodes directly connected to in the Motif sub - graph, is the attention coefficient, used to measure the information attention degree of the target user node to its neighbor node and are respectively and input feature vectors, represents the feature mapping matrix, used to project the original feature vector into the attention space; represents the vector concatenation operation, represents the transpose of the attention weight vector, is the LeakyReLU activation function; represents any node adjacent to within the Motif sub - graph, represents performing the same mapping and summing over all neighbor nodes to be used as the normalization denominator; Aggregate the subgraph spatial encoding vectors corresponding to each Motif subgraph in the Motif subgraph cluster to obtain the template average spatial feature for the corresponding spatial Motif template: , In the formula, represents the template average spatial feature for the th spatial Motif template, represents the number of template sampled sub - graphs, represents the th sampling for the th spatial Motif template. In the Motif sub - graph obtained from the th sampling, it is the encoding vector of the target user node. Perform cross-template attention fusion on the template average spatial features corresponding to each spatial Motif template to obtain the multi-scale spatial features of the target user node: , , In the formula, is the multi-scale spatial feature corresponding to the target user node , represents the weighted sum of the template average spatial features of various spatial Motif templates according to the corresponding fusion weights ; represents the -th feature fusion weight of the spatial Motif template; represents the linear mapping matrix for the -th spatial Motif template, represents the hyperbolic tangent activation function; represents the transpose of the global fusion weight vector, represents any type of spatial Motif template, represents performing the same mapping and score calculation on all types of spatial Motif templates for use as the normalization denominator.

5. The method according to claim 4, characterized in that, Based on the time-domain convolutional network, extract the event time-series impact trend factors corresponding to each event node in the heterogeneous ternary graph, including: Extract the event node spatio-temporal input sequence from the heterogeneous ternary graph. The event node spatio-temporal input sequence includes the aggregated business district consumption sequence and the aggregated event intensity sequence; Regarding the calculation of the aggregated business district consumption sequence, including: , , In the formula, express Historical trading time steps within Represents a time series index, For event nodes The total number of historical time series steps corresponding to the event node The total number of time steps collected from the time of effectiveness; Represents an event node exist The weighted regional consumption total is used to obtain the aggregated business district consumption sequence through time series fusion; Represents an event node The set of directly connected neighboring business districts in the heterogeneous ternary graph, Indicates that for all event nodes Neighborhood shopping district collection Business district nodes Sum to summarize the consumption within the scope of the event; Indicates a business district node exist Total consumption of Indicates a business district node With event nodes exist The corresponding immediate impact weight is used to quantify the impact of the event on the business district at that moment; Regarding the calculation of the aggregated event intensity sequence, including: , In the formula, represents an event node at the time-series attenuation intensity value of which is used to obtain an aggregated event intensity sequence through time-series fusion; Combine the aggregated business district consumption sequence and the aggregated event intensity sequence to obtain a two-channel event node spatio-temporal input sequence ; Extract the event node from the event time series shock trend factor ; the multi-scale time-domain convolutional network includes multiple cascaded TCN layers, and each TCN layer has a receptive field size that increases sequentially to capture the event node at different time scales of shock and evolution trends.

6. The method according to claim 5, wherein Fusing each of the target event time-series impact trend factors and the multi-scale spatial features to obtain the spatio-temporal fusion features of the user node, including: Construct the event factor vector of the user node according to each of the target event time-series impact trend factors and the edge weight of the corresponding event-user trigger edge: , Wherein, represents the event factor vector of the user node , is the total number of event nodes connected to the user node matched by the potential external event, represents any matched event node, represents the corresponding time series shock trend factor, represents the edge weight between the user node and the event node in the heterogeneous ternary graph; represents the normalized weight coefficient, which is used to measure the relative importance of each event factor to the user node in the interval; represents the summation of the event - user trigger weights corresponding to all the matched potential external events, which is used as the normalization denominator; Perform gated fusion on the multi-scale spatial features of the user node and the event factor vector to obtain the corresponding spatio-temporal fusion features, including: Perform linear mappings on two input paths respectively, sum them up, and obtain a per-dimensional gating vector through Sigmoid activation: , In the formula, represents the per-dimensional gating vector, and respectively represent the gating mapping matrices for the spatial features and the event factors, is the gating bias vector, represents the user node corresponding multi-scale spatial features; Based on the per-dimensional gating vector, weight and merge the two paths of signals element-wise to obtain the spatio-temporal fusion feature of the corresponding user node: , In the formula, represents the spatio-temporal fusion feature of the user node , represents the all-ones vector, represents the element-wise product.

7. The method according to claim 6, characterized in that, Predict the consumption amount and consumption frequency of each business district by the corresponding user in the preset future time period according to the spatio-temporal fusion feature of the user node, including: Fuse the spatio-temporal features of the user node with the business district attribute features corresponding to the target business district node and splice them to form an input vector ; Input the input vector into the deep cross network, and through layers of explicit feature crossing, and output the corresponding user's consumption amount and consumption frequency in the target business district through the dual regression head: For each layer, perform the following calculations: , In the formula, is the input vector of the th layer, and when , represents the initial input vector of the concatenation; represents the transpose of the cross weight of the th layer, represents the bias term of the th layer; After crossings, the cross output is obtained, and are respectively fed into two linear regression heads to directly predict the corresponding consumption amount and consumption frequency in the business district: , , In the formula, represents the cross-output vector of the th layer, represents the predicted consumption amount of the user node for the target business district node within a preset future time period, represents the predicted consumption frequency of the user node for the target business district node and respectively represent the transpose of the regression weight vector of the first regression head and the transpose of the regression weight vector of the second regression head, and respectively represent the regression bias of the first regression head and the regression bias of the second regression head.

8. The method according to any one of claims 1 to 7, characterized in that The user consumption data includes historical consumption transaction records of at least one user in each business district. The business district POI data includes business district range information, POI distribution density, and historical passenger flow heat value sequence. And the historical external events include at least one of the following event types: holiday events, regional public consumption voucher events, merchant promotion events, and extreme weather events.

9. A consumption behavior prediction system driven by spatio-temporal data, characterized in that, The system includes: A heterogeneous tripartite graph construction unit, which is used to define user nodes, business district nodes, and event nodes according to user attribute data, business district attribute data, and historical external events respectively, and analyze and determine the corresponding user-business district consumption edges, business district-event influence edges, and event-user trigger edges by combining user historical consumption data and business district POI data, so as to construct a heterogeneous tripartite graph; the edge weight of the user-business district consumption edge is defined according to the historical consumption intensity of the user in the corresponding business district, the edge weight of the business district-event influence edge is defined according to the time-dependent decay influence coefficient of the corresponding external event in this business district, and the edge weight of the event-user trigger edge is defined according to the historical response degree weight of the user to the corresponding external event; A spatial feature extraction unit, which is used to perform multi-scale Motif subgraph sampling on the heterogeneous tripartite graph to extract multi-granularity subgraphs matching the user nodes, and calculate the spatial coding features of the user nodes in each granularity subgraph in the multi-granularity subgraph, and obtain the multi-scale spatial features of the corresponding user nodes through feature weighted fusion; A temporal feature extraction unit, which is used to extract the event temporal impact trend factors corresponding to each event node in the heterogeneous tripartite graph based on a temporal convolutional network; A spatio-temporal feature fusion unit, which is used to obtain at least one potential external event corresponding to a preset future time period, and determine the target event temporal impact trend factors of the corresponding user nodes by matching with each event node in the heterogeneous tripartite graph, and fuse each of the target event temporal impact trend factors and the multi-scale spatial features to obtain the spatio-temporal fusion features of the corresponding user nodes; A business district consumption prediction unit, which is used to predict the consumption amount and consumption frequency of each business district by the corresponding user in the preset future time period according to the spatio-temporal fusion features of the user nodes.

Citation Information

Patent Citations

  • Knowledge graph completion method based on multi-granularity hierarchy and dynamic embedding

    CN116842199A

  • Random group interest point recommendation method, system and device and storage medium

    CN118193853A

  • Method and system for analyzing user consumption behaviors in different scenes in commercial space

    CN119850253A

  • Commercial vitality prediction and business district evaluation method based on multi-modal feature fusion

    CN119918981A

  • Method, system, and device for obtaining expression of relationship between entities, and advertisement retrieval system

    WO2020147594A1

Cited By

  • Shop operation management system based on big data analysis

    CN120509931A

  • Store operation management system based on big data analysis

    CN120509931B

  • Analysis method and device for screening target customer group, equipment and medium

    CN120561625A