Behavior recognition method and device, equipment, medium and program product

By extracting multi-dimensional features and performing adaptive spatiotemporal context modeling, and integrating historical and real-time data to predict crowd behavior risks, the problem of one-sided behavior recognition results in existing technologies is solved, and higher accuracy is achieved.

CN121834675APending Publication Date: 2026-04-10CHINA MOBILE GROUP JIANGSU +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies for crowd behavior analysis rely solely on visual features such as body movements and crowd interactions extracted from video images, resulting in biased and inaccurate behavior recognition results.

Method used

Extract multi-dimensional features from population data, obtain the correlation and time series dependence of features, perform adaptive spatiotemporal context modeling, integrate historical risk data and real-time feature data, and input them into a dynamic risk prediction model for prediction.

Benefits of technology

By comprehensively capturing basic behavioral information and dynamically adjusting feature weights, the accuracy of predicting population behavioral risks has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834675A_ABST
    Figure CN121834675A_ABST
Patent Text Reader

Abstract

The invention provides a behavior recognition method and device, equipment, a medium and a program product, and relates to the technical field of cloud computing, and the method comprises the steps: extracting the features of multiple dimensions of crowd data; correlation of the features of the multiple dimensions is obtained, and the influence of time sequence dependency corresponding to the features of the multiple dimensions on crowd behaviors is obtained; performing adaptive spatio-temporal context modeling on the correlation of the features of the plurality of dimensions after feature fusion and the influence of the time sequence dependency corresponding to the features of the plurality of dimensions on crowd behaviors to obtain weighted fusion features; historical risk data, real-time feature data and the weighted fusion features are input into a dynamic risk prediction model for prediction, and a prediction result used for representing the risk level of crowd behaviors is obtained; wherein the real-time feature data are data which are collected in real time and correspond to the features of the multiple dimensions. Through the method, the accuracy of a behavior recognition result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a behavior recognition method, apparatus, device, medium, and program product. Background Technology

[0002] As cities attract more and more migrants, population mobility is increasing, and the public safety issues arising from large gatherings are becoming increasingly prominent. In particular, the timely prediction and detection of potential hazards in key populations and locations is crucial for improving urban public safety capabilities. However, current technologies for crowd behavior analysis rely solely on visual features such as body movements and crowd interactions extracted from video images, resulting in limited coverage, incomplete behavior recognition results, and low accuracy. Summary of the Invention

[0003] This application provides a behavior recognition method and apparatus that can solve the problems of one-sided behavior recognition results and low accuracy.

[0004] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a behavior recognition method, the method comprising: Extract features from multiple dimensions of population data; The correlation of features across the multiple dimensions is obtained, as well as the impact of the time-series dependencies corresponding to the features across the multiple dimensions on population behavior. Adaptive spatiotemporal context modeling is performed on the impact of the correlation of features in the multiple dimensions after feature fusion and the time series dependence of features in the multiple dimensions on population behavior to obtain weighted fusion features; Historical risk data, real-time feature data, and the weighted fusion features are input into a dynamic risk prediction model for prediction, resulting in a prediction of the risk level that characterizes population behavior; wherein, the real-time feature data refers to the data corresponding to the features of the multiple dimensions collected in real time.

[0005] Secondly, embodiments of this application provide a behavior recognition device, the device comprising: The extraction module is used to extract features from multiple dimensions of population data; The processing module is used to acquire the correlation of features in the multiple dimensions, and to acquire the impact of the time series dependencies corresponding to the features in the multiple dimensions on population behavior. The modeling module is used to adaptively model the spatiotemporal context of the impact of the correlation of the features of the multiple dimensions after feature fusion and the time series dependence of the features of the multiple dimensions on the behavior of the population, and to obtain weighted fusion features. The prediction module is used to input historical risk data, real-time feature data, and the weighted fusion features into a dynamic risk prediction model to make predictions and obtain prediction results that characterize the risk level of population behavior; wherein, the real-time feature data is the data corresponding to the features of the multiple dimensions collected in real time.

[0006] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and the program or instructions, when executed by the processor, implement the steps of the behavior recognition method as described in the first aspect.

[0007] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the behavior recognition method as described in the first aspect.

[0008] In this embodiment, features from multiple dimensions of population data are extracted; the correlation of these features and the impact of their time-series dependencies on population behavior are obtained; adaptive spatiotemporal context modeling is applied to the correlation of the features from multiple dimensions and the impact of their time-series dependencies on population behavior after feature fusion to obtain weighted fusion features; historical risk data, real-time feature data, and the weighted fusion features are input into a dynamic risk prediction model for prediction, resulting in a prediction of the risk level of population behavior; wherein the real-time feature data is the data corresponding to the features from multiple dimensions collected in real time. Thus, by extracting features from multiple dimensions of population data to comprehensively capture basic behavioral information, by separately mining the inherent correlation and time-series dependencies between features, and then dynamically adjusting feature weights and strengthening the representation of key information through adaptive spatiotemporal context modeling, and finally fusing historical risk data and real-time feature data into the dynamic risk prediction model, the accuracy of population behavior risk prediction is improved. Attached Figure Description

[0009] Figure 1 A flowchart illustrating the behavior recognition method provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the behavior recognition device provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0010] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0011] The following description, in conjunction with the accompanying drawings, further illustrates the behavior recognition method, apparatus, device, and storage medium proposed in the embodiments of the application.

[0012] Please see Figure 1 , Figure 1 A flowchart illustrating a behavior recognition method provided in this application embodiment is shown in the figure. The method includes: Step 110: Extract features from multiple dimensions of the population data; In this step, crowd data refers to various types of raw data related to people within a specific range. This data can be user location trajectory data and internet behavior data recorded by operators, or video image data collected by devices in public scenes, and interaction data between people and public facilities, which can reflect the actual status and activities of the crowd.

[0013] The aforementioned multiple dimensions of features are information dimensions extracted from population data that reflect different attributes or states of the population. These can include physical features, social features, emotional features, cultural features, etc. For example, physical features can be used to describe the spatial distribution and movement state of the population, social features can be used to describe the interaction relationships between the population, emotional features can be used to reflect the overall emotional tendency of the population, and cultural features can be used to reflect the regional cultural attributes of the population. In the specific extraction process, invalid information in the population data can be removed using data cleaning tools, such as abnormally fluctuating location data and duplicate internet browsing records. Then, feature engineering methods can be used to extract the required multiple dimensions of features. For example, physical features such as population motion entropy and velocity variance can be extracted from location trajectory data, and cultural features such as user preferences for specific types of applications (APPs) can be extracted from internet browsing behavior data.

[0014] Step 120: Obtain the correlation of the features in the multiple dimensions, and obtain the impact of the time series dependencies corresponding to the features in the multiple dimensions on the behavior of the population. In this step, the target network layer is a neural network structure built on a deep learning framework for specialized processing of features across multiple dimensions. It can be processed in parallel via two branches, simultaneously capturing different key attributes of the features. This network layer can be built on either the PyTorch or TensorFlow (TF) framework, depending on available computing resources and development needs. The first branch is the processing path within the target network layer focused on analyzing the correlation between features across multiple dimensions. Its main function is to uncover the intrinsic connections between different feature dimensions. For example, when processing physical and social features, the first branch can analyze the correlation between crowd density and the level of crowd collectivization, or the correlation between the crowd movement disorder index and the level of crowd isolation, thereby clarifying the synergistic impact of different features on crowd behavior.

[0015] The correlation of the above features refers to the degree to which different dimensional features influence and relate to each other. For example, the speed of crowd movement in physical features may be positively correlated with the level of socialization in social features. The slower the speed of crowd movement, the higher the level of socialization may be. The proportion of negative emotions in emotional features may be correlated with the regional conflict attributes in cultural features. The proportion of negative emotions may be more likely to increase in a specific regional context.

[0016] The second branch mentioned above focuses on analyzing the time-varying patterns of features across multiple dimensions and their impact on crowd behavior within the target network layer. It can capture the potential connection between dynamic changes in features over time and crowd behavior. For example, the second branch can analyze the impact of changes in crowd movement characteristics over 12 consecutive hours on crowd gathering behavior, and it can also analyze the impact of fluctuations in emotional characteristics at different times (such as morning rush hour, evening rush hour, and nighttime) on the probability of abnormal crowd behavior. Time series dependency refers to the correlation between the values ​​of multiple features at different time points and the impact of this correlation on crowd behavior. For example, a sustained increase in crowd density over a certain period may lead to subsequent crowding behavior, and a sustained decrease in positive emotions over a certain period may increase the risk of subsequent crowd conflict. In practical processing, the first branch can calculate feature correlations using a graph neural network model, while the second branch can analyze time series dependency using a temporal convolutional network model. The two branches run in parallel and output their respective intermediate results, laying the foundation for subsequent fusion processing.

[0017] Step 130: Adaptive spatiotemporal context modeling is performed on the impact of the correlation of the features of the multiple dimensions after feature fusion and the time series dependence of the features of the multiple dimensions on the crowd behavior to obtain weighted fusion features; In this step, the target network layer outputs a set of feature correlation information from the first branch and time-series dependency information from the second branch. This set can be in the form of feature vectors or data matrices, comprehensively covering the correlation and temporal dynamic attributes of features across multiple dimensions. The aforementioned adaptive spatiotemporal context modeling refers to the process of automatically adjusting the attention given to spatial and temporal features based on the spatiotemporal environmental characteristics of a specific application scenario, thereby constructing a feature fusion model that meets the needs of the scenario. This process can dynamically adapt the importance of spatiotemporal features in different scenarios. For example, in a large concert venue, due to the rapid changes in crowd conditions, the attention given to temporal features may be increased to capture real-time dynamics; in a fixed commercial district, due to the relatively stable crowd distribution, the attention given to spatial features may be increased to analyze crowd distribution patterns. The aforementioned weighted fusion features can be understood as comprehensive features obtained by adaptively modeling spatiotemporal contexts, assigning corresponding weights to spatial and temporal features, and then fusing them. This allows for the simultaneous representation of key information in both spatial and temporal dimensions, with the weight allocation tailored to specific scenario requirements. For example, in a transportation hub during morning rush hour, the weighted fusion features can better reflect the dynamic information of crowd flow over time; in a scenic area, they can better reflect the static information of crowd distribution in space. During the modeling and acquisition process, the spatial and temporal features in the target network layer output can be concatenated first. Then, a multilayer perceptron is used to learn the weight distribution of different features. The number of hidden layers in the multilayer perceptron can be set according to scenario requirements, such as two or three layers. Finally, the learned weight distribution can be used to weight and fuse the features, resulting in the weighted fusion features.

[0018] Step 140: Input historical risk data, real-time feature data and the weighted fusion features into the dynamic risk prediction model for prediction to obtain a prediction result that characterizes the risk level of population behavior; wherein, the real-time feature data is the data corresponding to the features of the multiple dimensions collected in real time.

[0019] In this step, the aforementioned historical risk data can be understood as records of risk events related to crowd behavior over a past period and their corresponding characteristic data. This data can provide historical reference for this round of risk prediction. For example, it could be characteristic data of crowd congestion incidents at subway stations in the past year, or characteristic data of abnormal behavior at sporting events in the past six months. The aforementioned real-time characteristic data can be understood as multi-dimensional characteristic data collected at the current moment or in the most recent short period of time. This data can reflect the latest state of crowd behavior. For example, it could be real-time collected crowd density data, real-time monitored crowd movement speed data, or real-time acquired crowd emotional tendency data.

[0020] The aforementioned dynamic risk prediction model is a model that can combine historical data and real-time data to dynamically adjust the prediction strategy to output the degree of risk of population behavior. It can be built based on statistical learning algorithms or deep learning algorithms, such as logistic regression or recurrent neural network algorithms. It can respond to data changes and update the prediction results in real time.

[0021] The aforementioned risk level is a quantitative indicator used to describe the probability of risk events occurring due to crowd behavior. It can be presented numerically, such as using a range of 0-100 (higher values ​​indicate higher risk); or as a classification system, such as low risk, medium risk, and high risk (different levels correspond to different response strategies). During the prediction process, historical risk data, real-time feature data, and weighted fusion features can be input into a dynamic risk prediction model. The model first learns the patterns of risk occurrence based on historical risk data, then adjusts the prediction parameters by combining real-time feature data and weighted fusion features, and finally outputs the predicted risk level. This result can be directly used to guide safety management work; for example, when the predicted risk is high, a crowd evacuation plan can be immediately activated; when the predicted risk is low, routine monitoring efforts can be maintained.

[0022] In the behavior recognition method implemented in this application, features from multiple dimensions of population data are extracted to comprehensively capture basic behavioral information. The intrinsic correlation and time series dependence between features are mined by a dual-branch target network layer. Then, the feature weights are dynamically adjusted and the key information representation is strengthened through adaptive spatiotemporal context modeling. Finally, historical risk data and real-time feature data are integrated into the dynamic risk prediction model, thereby improving the accuracy of population behavior risk prediction.

[0023] Optionally, the features of the multiple dimensions include at least one of physical features, social features, emotional features, and cultural features; The physical characteristics include at least one of the following: crowd motion entropy, velocity variance, motion disorder index, and crowd density; The social features are feature data obtained based on call data and location trajectory data.

[0024] Physical characteristics are features that describe the spatial distribution and movement patterns of crowds. They quantify the objective spatial attributes of crowds and provide data support for assessing potential risks such as overcrowding and disorder. These characteristics include at least one of the following: crowd motion entropy, velocity variance, motion disorder index, and crowd density. The specific meanings and application scenarios of each characteristic are as follows: Crowd motion entropy can be understood as an indicator that measures the degree of disorder in the overall movement of a crowd. The higher the value, the more irregular and dispersed the crowd's movement. For example, during the morning rush hour at a subway station, a large number of people need to transfer quickly, with diverse movement directions and large differences in speed, resulting in a high crowd motion entropy. On the other hand, during the afternoon hours in a park on weekdays, people tend to walk slowly or rest still, with a stable movement state and a low crowd motion entropy.

[0025] Speed ​​variance can be understood as an indicator reflecting the degree of difference in movement speed among individuals in a group. The larger the variance, the more obvious the difference in movement speed between different individuals. For example, in a large shopping mall on weekends, some people move quickly to find their target stores, while others stroll slowly, resulting in a large speed variance. On the other hand, during school dismissal time, students tend to walk in groups at similar speeds, resulting in a smaller speed variance.

[0026] The Movement Disorder Index can be understood as an indicator describing the consistency of movement direction among a group of people. The higher the index, the more dispersed and chaotic the movement direction of the group. For example, at the moment a concert ends, a large number of people move towards multiple exits simultaneously, resulting in chaotic movement directions and a high Movement Disorder Index. In contrast, during a marathon, runners mostly move along a fixed route in the same direction, resulting in a unified movement direction and a low Movement Disorder Index.

[0027] Crowd density can be understood as the number of people within a unit of space, and it is the most direct indicator of how crowded a space is. For example, during peak hours when a sports event is being held in a stadium, there are many people per unit area, resulting in a high crowd density; while in a city park during weekday mornings, the crowd distribution is sparse, resulting in a low crowd density.

[0028] In practical applications, the selection of physical features can be flexibly combined with the needs of the scenario: for example, in daily monitoring of urban squares, physical features may only include crowd density and movement disorder index, focusing on whether local congestion or disorder occurs; in monitoring of highway service areas, physical features may include velocity variance and crowd movement entropy, focusing on the flow efficiency and order of the crowd.

[0029] The aforementioned social characteristics can be used to reflect the interaction relationships between people and the degree of group association. They can also be used to explore the impact of people's social attributes on behavior, such as the tendency to act collectively and the proportion of isolated individuals. The core data sources for this feature are call data and location trajectory data. This can be understood as extracting information that can characterize the social status of a group by analyzing the correlation between these two types of data.

[0030] For example, in community safety monitoring scenarios, based on residents' call data, we can count the number of people each resident calls to within a certain period and the average call duration, and then extract the "collectivization level" feature. The higher the proportion of residents with more people calling and longer average call duration, the higher the collectivization level of the community population, and the easier it is to form orderly group behavior. At the same time, combined with residents' location trajectory data, we can analyze whether different residents frequently appear in the same area in the community (such as community square, convenience store), and then extract the "socialization level" feature. The higher the proportion of residents who frequently engage in activities together in the same area, the higher the socialization level of the community population and the closer the interaction. For example, in the scenario of monitoring business district operations, based on the call data of consumers within the business district, the frequency of calls between consumers and other people in the business district can be counted to extract the feature of "consumer group interaction frequency". The higher the proportion of consumer groups with high interaction frequency, the higher the social activity of the people in the business district. Combined with the location trajectory data of consumers, it can be analyzed whether different consumers stay near similar stores (such as food and clothing areas) in the business district to extract the feature of "interest group aggregation". The higher the proportion of consumers staying near similar stores, the higher the interest correlation of the people in the business district, and the easier it is to form concentrated consumption behavior.

[0031] It should be noted that all user privacy data was obtained with the user's consent.

[0032] In the behavior recognition method implemented in this application, by selecting physical features, including quantifiable spatial attributes such as crowd motion entropy and velocity variance, and social features based on call and location trajectory data, and flexibly adapting to different monitoring scenarios, a more comprehensive characterization of the basic state and social attributes of the crowd is achieved, providing accurate and scenario-appropriate feature support for crowd behavior risk prediction.

[0033] Optionally, obtaining the correlation of the features across the multiple dimensions includes: Each feature across multiple dimensions is identified as a node, and the correlation between features across different multiple dimensions is identified as an edge between the nodes. A graph structure representing the feature association relationship is constructed based on the nodes and edges. The embedding function maps the features of the corresponding node in multiple dimensions to a low-dimensional space to obtain low-dimensional features. The low-dimensional features are processed using a nonlinear activation function to obtain the correlation results between nodes; The edges are updated based on the correlation results to form a graph structure containing specific correlation values; A dynamic graph neural network is used to track the time-varying pattern of the correlation results in order to dynamically update the correlation values ​​of the edges in the graph structure. Output the first branch processing result, which is the correlation information in the form of feature vectors extracted based on the graph structure.

[0034] In this context, each node represents a feature across multiple dimensions, with each node corresponding to a specific feature. For example, if the features across multiple dimensions include population density, collectivization level, emotional tendency, and regional cultural attributes, then these four features can be defined as four independent nodes. The selection of nodes can be flexibly adjusted according to the needs of the scenario. For instance, in a city business district monitoring scenario, nodes could be population density, frequency of consumer interaction, and emotional tendency; in a campus activity monitoring scenario, nodes could be exercise disorder index, socialization level, and cultural preference. An edge represents the relationship between different nodes, indicating a potential mutual influence between two features. For example, there might be a correlation between population density and collectivization level, or between emotional tendency and regional cultural attributes. These correlations can all be abstracted as edges between nodes.

[0035] The graph structure described above is a topological structure composed of nodes and edges, used to intuitively present the relationships between features. Its core function is to transform scattered features of multiple dimensions into a whole with logical connections, facilitating subsequent analysis of the interactions between features. When constructing a graph structure, you can first list all the selected nodes, and then, based on domain experience or preliminary data statistics, determine whether any two nodes are related. If they are related, connect them with edges to form a preliminary graph structure. For example, in the morning rush hour scenario of a transportation hub, a triangular graph structure of "speed variance - crowd density - socialization level" can be constructed, where speed variance and crowd density, crowd density and socialization level, and speed variance and socialization level are all connected by edges.

[0036] The aforementioned embedding function transforms high-dimensional feature data into low-dimensional vectors, reducing the dimensionality of the feature data, decreasing subsequent computation, and preserving the core information of the features. The choice of embedding function is flexible; it can be constructed using the Word2Vec algorithm or an autoencoder. The low-dimensional features obtained after processing by the embedding function not only simplify the calculation process but also avoid overfitting problems caused by high-dimensional data. For example, the original population density feature might contain multi-dimensional information such as collection time, collection area, and numerical fluctuations, reaching up to 80 dimensions. After processing by the embedding function, the low-dimensional feature can be condensed to 20 dimensions, preserving the core variation patterns of population density while quickly adapting to subsequent processing modules.

[0037] The aforementioned nonlinear activation functions introduce nonlinear relationships into feature processing, capturing complex nonlinear correlations between low-dimensional features and avoiding the loss of correlation information caused by linear processing. The nonlinear activation function can be either the Rectified Linear Unit (ReLU) function or the Sigmoid function. For example, using the ReLU function filters out values ​​less than 0 in low-dimensional features, retaining only positive values ​​for correlation calculation, thus highlighting strong correlation information. Using the Sigmoid function maps the values ​​of low-dimensional features to between 0 and 1, making subsequent correlation results easier to interpret. The correlation result, obtained after processing with a non-linear activation function, is a numerical value used to quantify the degree of association between two nodes. The larger the value, the stronger the association between the two features; the smaller the value, the weaker the association. For example, when processing the low-dimensional features of crowd density and collectivization level, if the correlation result obtained by using the Sigmoid function is 0.85, it indicates that there is a strong correlation between crowd density and collectivization level, which can be understood as the higher the crowd density, the higher the collectivization level tends to be. When processing the low-dimensional features of motion disorder index and emotional tendency, the correlation result obtained is 0.23, indicating that the association between the two is relatively weak, and the change in motion disorder index has little impact on emotional tendency.

[0038] The updated edges are obtained in the previous step and assigned to the corresponding edges in the graph structure, transforming the abstract edges that originally only represented "correlation" into concrete edges with quantifiable information. For example, the edge "crowd density - collectivization level" can be assigned a correlation result of 0.85, and the edge "movement disorder index - emotional tendency" can be assigned a correlation result of 0.23. Graph structures with specific correlation values, where all edges have quantifiable correlation results, are more practical than the initial graph structure, as they can intuitively reflect the differences in the strength of correlations between different features. For example, in the graph structure of a large concert scene, the edge "crowd density - movement disorder index" is assigned a value of 0.92, and the edge "emotional tendency - cultural preference" is assigned a value of 0.67. Through these specific values, it can be quickly determined that crowd density and movement disorder index are the core correlation features, and their coordinated changes can be closely monitored.

[0039] The aforementioned dynamic graph neural network is a neural network that can process time-series data and track the changes in feature correlations over time. It can break the limitations of static graph structures and adapt to the dynamic fluctuations in feature correlations. The dynamic graph neural network can adopt either the Dynamic Graph Neural Network (DGNN) model or the Temporal Graph Neural Network (Temporal GNN) model. For example, in the scenario of morning and evening traffic rush hours in cities, the DGNN model can analyze the changes in correlation results every 10 minutes, while the Temporal GNN model can update the correlation tracking logic every 5 minutes. The specific choice can be determined according to the real-time requirements of the scenario. The temporal variation pattern refers to the changing trend of the correlation results over time. For example, during the morning rush hour (7:00-9:00), the correlation result of "speed variance - crowd density" gradually increases from 0.5 to 0.8, while during the off-peak hour (9:00-17:00), it decreases from 0.8 to 0.3, and during the evening rush hour (17:00-19:00), it increases again to 0.75. Dynamic graph neural networks can capture these changes in real time and update the correlation values ​​of the edges in the graph structure in a timely manner. For example, at 18:00 during the evening rush hour, the value of the "speed variance - crowd density" edge is updated from 0.6 to 0.72, ensuring that the graph structure always reflects the latest feature association status.

[0040] The first branch processing result can comprehensively reflect the final output information of feature correlation in multiple dimensions. It is presented in the form of feature vectors, which can be directly adapted to the subsequent fusion processing or model calculation of the target network layer. The dimension of the feature vector can be determined according to the complexity of the graph structure. For example, if the graph structure contains 5 nodes and 10 edges, a 10-dimensional feature vector can be extracted (each dimension corresponds to the correlation value of one edge). If the graph structure contains 6 nodes and 15 edges, a 15-dimensional feature vector can be extracted. The correlation values ​​of the edges can also be weighted according to the importance of the nodes to form a more targeted feature vector. For example, in the scenario of monitoring public squares during holidays, based on a graph structure containing specific values, a 4-dimensional feature vector of "crowd density - collectivization level (0.81), crowd density - movement disorder index (0.93), collectivization level - emotional tendency (0.52), movement disorder index - emotional tendency (0.38)" can be extracted as the first branch processing result. This vector can clearly convey the correlation information of the core features and can lay the foundation for subsequent fusion with the second branch result.

[0041] For example, in modeling relationships between population features, a Graph Neural Network (GNN) is used to capture the complex interactions between features. The graph structure naturally represents the correlations between features, with each feature acting as a node and the correlations between features as edges. Based on different population characteristics, the correlations between features are established, and the feature correlation formula is: Since human behavior changes over time, the correlations between features may also change. Therefore, a dynamic graph neural network is introduced to analyze these changes.

[0042] Where eij represents the correlation between nodes i and j, i and j represent different types of population features, σ is a non-linear activation function such as ReLU, ϕ is an embedding function used to map the original features to a low-dimensional space, and λ is a hyperparameter used to control the influence of historical correlation on current correlation.

[0043] The multi-scale feature fusion formula is: It is the feature representation after fusion. It is an aggregation operation at the k-th scale. These are weights obtained through learning. The ReLU activation function is used to emphasize the average correlation of the neighboring nodes associated with node k.

[0044] Through the above three steps, a model has been established that can capture the complex relationships, dynamic changes, and multi-scale effects among crowd characteristics. This model provides a strong foundation for subsequent crowd behavior recognition and early warning.

[0045] In the behavior recognition method of this application, features of multiple dimensions are abstracted into graph structure nodes and edges to represent feature associations. The correlation is then reduced by embedding function and quantified by nonlinear activation function. The correlation values ​​of the edges are updated by tracking time-series changes through dynamic graph neural network, and the result is output in the form of feature vector. This achieves comprehensive capture, dynamic quantification and efficient representation of feature correlation of multiple dimensions, providing accurate correlation feature support for subsequent prediction of population behavior risks.

[0046] Optionally, the impact of processing the time-series dependencies corresponding to the features of the multiple dimensions on population behavior includes: When the spatiotemporal fusion network is running, it extracts spatial features of the features in the multiple dimensions through a convolutional neural network to obtain spatial feature extraction results. The spatial feature extraction result is adjusted using a spatiotemporal attention mechanism. The adjusted spatial feature extraction result and the output result of the multi-scale temporal convolution module are then input into the long short-term memory network module for processing to obtain the first parallel network processing result.

[0047] The aforementioned spatiotemporal fusion network is a neural network that can simultaneously process spatial and temporal features and explore their synergistic relationship. It can break the limitations of processing spatial and temporal features separately and realize the linkage analysis of spatiotemporal information. This network can be used for monitoring pedestrian behavior during the morning rush hour at transportation hubs, as well as for analyzing crowd evacuation behavior at large concerts.

[0048] In some alternative implementations, the long short-term memory network module of the spatiotemporal fusion network can be replaced with a multi-scale temporal convolution module. The aforementioned long short-term memory network module is a neural network module commonly used to process time-series data and can capture long-term data dependencies. However, when processing multi-scale time features (such as short-term fluctuations at the minute level and long-term trends at the hour level), it is prone to insufficient capture of fine-grained time changes. For example, when monitoring the flow of people in a shopping mall on weekdays, this module may only be able to capture the long-term flow trend of "morning-afternoon-evening", but it is difficult to identify short-term sudden changes in flow such as "10 minutes before lunch break" or "30 minutes before leaving get off work". Multi-scale temporal convolutional modules are modules that capture changes in features at different time scales simultaneously using convolutional kernels of varying sizes. Their advantage lies in their ability to cover multi-dimensional temporal dynamics from short-term to long-term. For example, a convolutional kernel with 3 time steps can capture short-term crowd fluctuations within 5 minutes, a kernel with 12 time steps can capture medium-term crowd trends within 1 hour, and a kernel with 24 time steps can capture long-term crowd changes within 2 hours. This multi-scale coverage comprehensively reflects the dynamic characteristics of time series. Replacing the Long Short-Term Memory (LSTM) network module with a multi-scale temporal convolutional module aims to enhance the ability to capture multi-scale temporal changes. For instance, in the scenario of large-scale sporting events ending, the replaced module can identify both the explosive growth in crowds within 1 minute of the event's end (short-term) and the gradual decline in crowds within 30 minutes after the event (long-term), providing more comprehensive temporal feature support for subsequent time series dependency analysis.

[0049] The aforementioned convolutional neural network is a type of neural network that excels at extracting spatial correlation information from data. It can capture and aggregate local spatial features through sliding calculations of convolutional kernels. This network can be a two-dimensional convolutional neural network, which is suitable for processing static spatial distribution data (such as a spatial distribution map of population density at a certain moment); or a three-dimensional convolutional neural network, which is suitable for processing dynamic spatial data with time segments.

[0050] The spatial characteristics of the above-mentioned multiple dimensions reflect the distribution patterns, locational relationships, and regional aggregation states of the population in space. For example, in the urban square scenario, spatial characteristics can be "population density in the central area of ​​the square", "proportion of people near the exits at the edge of the square", and "differences in population distribution in different activity areas within the square". In the subway station scenario, spatial characteristics can be "population density distribution in the waiting area of ​​the platform", "proportion of people in the transfer passage", and "relationship of population spatial flow between entrances / exits and platforms". Spatial feature extraction results are the feature data that represent key spatial information obtained after processing by a convolutional neural network. The form can be feature vectors or feature matrices. For example, in a shopping mall scenario, after processing the crowd distribution images of each floor of the mall through a two-dimensional convolutional neural network, the feature vectors of "first floor atrium (high density, feature value 0.92), second floor clothing area (medium density, feature value 0.65), and third floor catering area (high density, feature value 0.88)" can be output as spatial feature extraction results. In a high-speed rail station scenario, after processing a continuous 5-minute platform space video through a three-dimensional convolutional neural network, the feature matrix of "density changes in different areas of the platform within each time segment" can be output as spatial feature extraction results.

[0051] The aforementioned spatiotemporal attention mechanism is a mechanism that automatically assigns weights to different spatial features based on the importance of specific spatiotemporal scenarios. It can highlight key spatial features that have a greater impact on crowd behavior and suppress interference from irrelevant or secondary spatial features. For example, at large events, spatial areas near the stage or emergency exits have a greater impact on crowd behavior, and this mechanism can assign higher weights to the spatial features of these areas. Similarly, at transportation hubs, spatial areas such as transfer passages or security checkpoints are more critical, and this mechanism can assign them higher weights. The adjusted spatial feature extraction results, i.e., the spatial feature data weighted by the spatiotemporal attention mechanism, can more accurately focus on key spatial information. For example, the original spatial feature extraction result of "stage area (weight 0.5), back row area of ​​the audience (weight 0.5)" becomes "stage area (weight 0.88), back row area of ​​the audience (weight 0.12)" after adjustment, which better reflects the dominant influence of the stage area on crowd behavior during large events. The output of the multi-scale temporal convolution module is the multi-scale temporal feature data obtained after processing feature time series of multiple dimensions. For example, in the subway station scenario during the morning rush hour, the output can be a time feature vector of "7:00-7:05 (short-term, passenger flow growth rate 0.3), 7:00-7:15 (medium-term, passenger flow growth rate 0.6), 7:00-7:30 (long-term, passenger flow growth rate 0.8)"; in the park scenario during holidays, the output can be a time feature matrix of "10:00-10:10 (short-term, passenger flow growth rate 0.2), 10:00-10:30 (medium-term, passenger flow growth rate 0.5), 10:00-11:00 (long-term, passenger flow growth rate 0.7)". The Long Short-Term Memory (LSTM) network module here is used to fuse "adjusted spatial features" and "multi-scale temporal features" and capture their temporal correlation. It can uncover the dynamic patterns of spatial features changing over time. For example, it can analyze the correlation between "high-weight spatial features of transfer corridors" and "rapid increase in pedestrian flow from 7:10 to 7:15" to determine whether congestion will occur under the combined effect of the two. The processing result of the first parallel network is the core result obtained after processing by this module, which can characterize the "impact of time series dependence on crowd behavior". It can provide key time series dependence information support for the overall output of the subsequent target network layer and risk prediction.

[0052] For example, the formula for designing a multi-scale temporal convolutional module (MTCM) can be as follows:

[0053] in, It is the output of the multi-scale temporal convolution module, which integrates temporal features at different scales. This refers to the convolution operation at the l-th scale. Each convolutional layer can be a one-dimensional convolutional layer (1D CNN) using convolutional kernels of different sizes. It is the weight corresponding to the l-th scale, used to adjust the contribution of features at different scales during the feature fusion stage.

[0054] In STFN, replacing the original LSTM module with MTCM yields the following structure: STFN′(X,T)=LSTM′(CNN(X)⋅Attn(T),

[0055] LSTM' is an improved LSTM module that receives not only the spatial features CNN(X)⋅Attn(T) adjusted by the attention mechanism, but also the output of a multi-scale temporal convolution module. Attn(T) is a spatiotemporal attention mechanism used to emphasize key parts of a time series.

[0056] Fusing multi-scale temporal features can be achieved in the following ways: ; ffinal(X,T) is the final fused feature, which combines spatial and temporal features. γ is a learnable weight used to control the importance of spatial and temporal features.

[0057] In this way, STFN' can not only capture spatial features, but also take into account the dynamic changes of time series at different scales, thereby improving the model's performance on crowd behavior recognition tasks.

[0058] Finally, the entire STFN' model is trained using optimization algorithms such as backpropagation and gradient descent to minimize prediction error and optimize the parameters of each module.

[0059] This step integrates spatiotemporal fusion networks and multi-scale temporal convolution methods, which can more comprehensively capture the complex features in spatiotemporal data and provide strong model support for tasks such as crowd behavior recognition.

[0060] In the behavior recognition method of this application, by replacing the long short-term memory network module of the spatiotemporal fusion network with a multi-scale temporal convolution module, combining the extraction of spatial features by convolutional neural networks and the adjustment of key spatial information by spatiotemporal attention mechanism, and then integrating multi-scale temporal features and spatial features into the long short-term memory network module for processing, the comprehensive capture of multi-scale time series dependencies and the deep fusion of spatiotemporal features are achieved, accurately characterizing the impact of time series dependencies on crowd behavior, and providing reliable temporal feature support for crowd behavior risk prediction.

[0061] Optionally, after obtaining the first dual-parallel network processing result, the method further includes: Based on the processing results of the first parallel network, multiple convolutional kernels of different scales are used to perform convolution processing on the time series features corresponding to the features of the multiple dimensions. A corresponding weight is set for the convolution processing results of each scale to adjust the contribution of the convolution processing results of different scales to the time series dependency processing results. The convolutional processing results at all scales are integrated to form the time series processing result of the second branch, and the time series processing result is fused with the processing result of the first branch to obtain the output result of the dual parallel network layer.

[0062] Multiple convolutional kernels of different scales are computational units used to extract features from time series segments of different time lengths. Different scales correspond to different time spans. Their core function is to simultaneously capture short-term fluctuations, medium-term trends, and long-term patterns of time series, avoiding the one-sidedness of a single scale in depicting time dynamics. The scale of the convolutional kernels can be flexibly set according to the needs of the scenario. For example, in a park scenario during holidays, a combination of convolutional kernels of "2 steps (10 minutes) small scale, 6 steps (30 minutes) medium scale, and 12 steps (1 hour) large scale" can be set to capture the time features of "instantaneous gathering of tourists", "regional flow of people", and "peak flow of people throughout the day" respectively. In a shopping mall's daily operation scenario, a combination of convolutional kernels of "4 steps (20 minutes) small scale, 8 steps (40 minutes) medium scale, and 16 steps (80 minutes) large scale" can be set to capture the time features of "short-term flow of consumers", "switching of people between floors", and "peak shopping period" respectively.

[0063] Time series features corresponding to multiple dimensions are dynamic change data of multiple dimensions over time. These can be time series of physical features, social features, emotional features, or cultural features. For example, at a sports event, time series features can be dynamic data such as "the crowd density increases from 0.2 to 0.8 1 hour before the game, the sports disorder index remains at 0.3-0.5 during the game, and the crowd density decreases from 0.8 to 0.1 30 minutes after the game".

[0064] Convolution processing is the process of extracting key features at a corresponding time scale by sliding convolution kernels across time series features. For example, when processing a time series of "crowd density changes every 5 minutes" using 3 small-scale convolution kernels, the "peak growth rate of crowd density within 15 consecutive minutes" can be extracted. When processing with 12 medium-scale convolution kernels, the "fluctuation cycle of crowd density within 2 consecutive hours" can be extracted. When processing with 24 large-scale convolution kernels, the "peak occurrence period of crowd density within 12 consecutive hours" can be extracted. Multi-scale convolution enables a hierarchical characterization of time series features.

[0065] Weights are coefficients used to measure the importance of convolution processing results at different scales. The larger the coefficient, the stronger the impact of the result at that scale on the final time series dependency analysis; the smaller the coefficient, the weaker the impact. Weights can be predefined based on scenario requirements or learned automatically through model training to ensure that the weight allocation matches the core requirements of the actual application scenario.

[0066] In the step of "integrating the convolution processing results of all scales to form the time series processing result of the second branch", integration can be achieved by summing the results of convolution processing at each scale × corresponding weights to obtain a unified result that comprehensively reflects the time dynamics of multiple scales. This process can combine the advantages of different time scales and avoid the limitations of a single scale. For example, in the scenario of the end of a large exhibition, the small-scale convolution result is 0.8 (short-term surge in people) × 0.6 (weight) = 0.48, the medium-scale result is 0.5 (medium-term decline in people) × 0.3 (weight) = 0.15, and the large-scale result is 0.3 (long-term dissipation of people) × 0.1 (weight) = 0.03. The sum of the three is 0.66, which is the time series processing result of the second branch. Its physical meaning is "a comprehensive value of time series dependence dominated by short-term surge in people, combined with the medium-term decline and long-term dissipation trends".

[0067] Fusion refers to combining the "time series processing result" with the "first branch processing result" in a specific way to form a comprehensive feature that simultaneously covers the two core dimensions. Fusion methods can include feature concatenation, which can be understood as concatenating the vectors of the time series processing result and the first branch processing result to form a longer feature vector. For example, concatenating the 1-dimensional value of the time series processing result (e.g., 0.75) with the 3-dimensional feature vector (0.88, 0.72, 0.45) of the first branch into a 4-dimensional vector (0.75, 0.88, 0.72, 0.45). Alternatively, it can be weighted summation, which can be understood as allocating fusion weights according to the scenario's emphasis on "time dynamics" and "feature correlation." For example, in public safety emergency scenarios, time dynamics are more critical, so the weight of the time series processing result can be set to 0.6, and the weight of the first branch result can be set to 0.4. The weighted sum of the two yields the fused feature.

[0068] The output of the dual parallel network layer is the fused comprehensive feature, which can simultaneously convey the core information of "how features in multiple dimensions are related" and "how features change over time", providing comprehensive input for subsequent adaptive spatiotemporal context modeling. For example, in the scenario of a subway station during the morning rush hour in an urban area, the output can be a fused vector of "time series processing result (0.75, representing the time dependence dominated by the short-to-medium-term increase in pedestrian flow) + first branch processing result (0.88, 0.72, 0.45, representing the correlation between density, speed and collectivization level)". This vector can more accurately support the subsequent spatiotemporal modeling and predictive analysis of "people congestion risk".

[0069] In the behavior recognition method of this application, time series features of different time spans are extracted by multi-scale convolution kernels, weights are assigned to the results of each scale and integrated to form time series processing results, and then fused with the first branch feature association results, realizing the comprehensive integration of multi-scale time dynamics and feature association information, and outputting comprehensive features with both spatiotemporal correlation and time dependence, providing more comprehensive feature support for population behavior risk prediction.

[0070] Optionally, the adaptive spatiotemporal context modeling of the output of the target network layer includes: Spatial and temporal features are extracted from the output of the dual parallel network layer, and the spatial and temporal features are concatenated to obtain spatiotemporal concatenated features. The spatiotemporal stitching features are input into a multilayer perceptron, and the weight distributions of the spatial and temporal features are obtained based on the correlation between the spatiotemporal stitching features. The weight distribution output by the multilayer perceptron is subjected to probability normalization to obtain probability weights that reflect the importance of spatial and temporal features in the target scene. Based on the probability weights, the contribution of spatial and temporal features in the spatiotemporal splicing features is adjusted, and the weighted fusion features are output.

[0071] The aforementioned spatial features can be understood as characteristics extracted from the output of the dual parallel network layers, reflecting the spatial distribution patterns, locational relationships, and regional clustering states of crowds, thus characterizing the spatial attributes of the crowd. For example, in a large concert scenario, spatial features could be "crowd density around the stage, the proportion of people in the back rows of the audience, and the sparseness of crowd distribution near emergency exits." Temporal features, on the other hand, are characteristics extracted from the output of the dual parallel network layers, reflecting the changing patterns of crowd states over time, thus characterizing the dynamic temporal attributes of the crowd. For example, in a concert exit scenario, temporal features could be "the rate of increase in crowd flow within 5 minutes after the concert ends, and the rate of decrease in crowd flow within 15 minutes after the concert ends," etc.

[0072] The above concatenation, through dimensional expansion or structural integration, combines spatial and temporal features into a unified feature whole, ensuring that the information from both types of features can be collaboratively processed by subsequent modules. The concatenation method can be flexibly selected according to the feature form: if both spatial and temporal features are one-dimensional vectors (e.g., spatial features are 3-dimensional vectors and temporal features are 2-dimensional vectors), they can be concatenated end-to-end to form a 5-dimensional vector; if the spatial feature is a two-dimensional matrix (e.g., 3 rows and 4 columns) and the temporal feature is a one-dimensional vector (e.g., 3-dimensional), the temporal feature can be expanded into a 3-row, 1-column matrix and then concatenated with the spatial feature in the column dimension to form a 3-row, 5-column matrix.

[0073] A multilayer perceptron (MLP) is a deep learning model consisting of an input layer, hidden layers, and an output layer. It learns complex relationships between features through nonlinear transformations of multiple neurons. The number of hidden layers can be flexibly set according to the needs of the scenario. The spatiotemporal splicing feature relationship refers to the inherent connection and mutual influence between spatial and temporal features. For example, in the scenario of a large event's dispersal, there is a strong correlation between "high spatial density near emergency exits" and "high temporal pedestrian flow growth rate within 5 minutes after dispersal." The higher the density in the exit area, the greater the impact of the corresponding pedestrian flow growth rate on risk. By learning these relationships, the MLP can automatically determine the relative importance of spatial and temporal features in the analysis of crowd behavior in the current scenario and output the results in a weighted distribution.

[0074] The aforementioned weight distribution can be understood as a set of weights assigned by the multilayer perceptron to spatial and temporal features, reflecting their relative importance. For example, in scenarios where spatial features are more important, the weight distribution might be "spatial feature weight 0.65, temporal feature weight 0.35"; in scenarios where temporal features are more important, it might be "spatial feature weight 0.3, temporal feature weight 0.7". For instance, in the scenario of the end of a sports final, the spatiotemporal splicing features are strongly correlated with "the spatial density of the exit area and the change in pedestrian flow within 10 minutes after the event ends". After learning this correlation, the multilayer perceptron will output a weight distribution biased towards spatial features, such as "spatial feature weight 0.68, temporal feature weight 0.32".

[0075] The aforementioned probability normalization process refers to the process of transforming the weight distribution output by a multilayer perceptron into a probability form with values ​​between 0 and 1, where the sum of all weights is 1, using a specific algorithm. The core purpose of this process is to make the weights more intuitively reflect the relative proportions of feature importance. Commonly used normalization algorithms can be the softmax function or a normalized variant of the sigmoid function. The probability weights are the weights after normalization; their numerical values ​​directly correspond to the proportion of importance of the feature in the target scenario. The closer the value is to 1, the greater the impact of the feature on subsequent risk prediction; the closer the value is to 0, the smaller the impact.

[0076] The aforementioned contribution adjustment refers to multiplying the probability weights by the spatial and temporal features in the spatiotemporal splicing feature set, respectively. This results in features with higher weights having a larger "contribution ratio" in the final fusion result. For example, a temporal feature with a probability weight of 0.7 has more than twice the influence of a spatial feature with a probability weight of 0.3 in the fusion result. The weighted fusion feature, obtained after contribution adjustment, contains complete information from both spatial and temporal features and reflects the differentiated needs of the scenario for these two types of features through probability weights. This provides the most scenario-appropriate input data for subsequent dynamic risk prediction models.

[0077] In the behavior recognition method of this application, spatiotemporal features are extracted and concatenated, and a multilayer perceptron is used to learn feature associations to obtain a weight distribution. After probability normalization, a scenario-based probability weight is obtained, and the contribution of spatiotemporal features is dynamically adjusted to achieve adaptive and accurate fusion of spatiotemporal features. The weighted fusion features that fit the needs of the scenario are output, providing a more targeted core input for predicting crowd behavior risks.

[0078] Optionally, the step of inputting historical risk data, real-time feature data, and the weighted fusion features into a dynamic risk prediction model for prediction to obtain the risk level of population behavior includes: The first parameter for controlling the impact of historical risks is to obtain the behavioral risk records of people similar to the target scenario as historical risk values. The product of the first parameter and the historical risk value is determined to be the first product, and the first product represents the historical risk contribution; The real-time updated data of the features of the multiple dimensions are obtained as real-time feature data. Based on the weighted fusion features and the real-time feature data, the risk assessment result corresponding to the real-time feature data is obtained. The second product is determined to be the contribution of the real-time feature data to the prediction. The second product is the product of the risk assessment result and the first difference, where the first difference is the difference between 1 and the first parameter. The first product is integrated with the contribution of the real-time feature data to the prediction to obtain the risk level of crowd behavior.

[0079] In this embodiment, the first parameter is a coefficient used to control the degree of influence of historical risk data on the current risk prediction. Its value range is usually between 0 and 1. The larger the value, the stronger the influence of historical risk on the current prediction, and the smaller the value, the weaker the influence of historical risk. The determination of the first parameter can be adjusted according to the richness of historical data in the target scenario.

[0080] The target scenario refers to the specific scenario in which crowd behavior risk prediction needs to be conducted. This can be an indoor scenario (such as a shopping mall or stadium), an outdoor scenario (such as a city square or park), or a scenario during a specific time period (such as a subway station during morning rush hour or a shopping district on holidays). Crowd behavior risk records similar to the target scenario refer to past risk event data that are similar to the target scenario in terms of scenario type, crowd size, environmental conditions, and activity nature. For example, if the target scenario is a "basketball event with 10,000 participants in an indoor stadium," similar risk records could be records of "crowd congestion risk" and "evacuation efficiency risk" from basketball events of the same size and in the same stadium within the past six months. If the target scenario is a "festival celebration with 5,000 participants in a city square," similar risk records could be records of "crowd gathering risk" and "disorder risk" from festival activities of the same size and in the same square within the past three months.

[0081] Historical risk values ​​are numerical values ​​obtained by quantifying similar risk records. They reflect the severity or probability of risks occurring in similar past scenarios. Characterizing the contribution of historical risk means that the magnitude of the first product directly reflects the degree to which historical risk patterns support current predictions. For example, a first product of 0.45 indicates that risk prediction for the current scenario needs to heavily reference the risk characteristics of similar historical scenarios; a first product of 0.18 indicates that the risk of the current scenario is more influenced by real-time conditions, with historical patterns serving only as supplementary references. This quantification method avoids excessive interference from historical data and prevents predictive blindness caused by completely ignoring historical experience.

[0082] Real-time updated data of multiple-dimensional features refers to the latest collected data of multiple-dimensional features at the current moment or within the most recent short period (e.g., 5 minutes, 10 minutes), which can cover multiple dimensions such as physical features, social features, emotional features, and cultural features. Weighted fusion features are comprehensive features obtained through adaptive spatiotemporal context modeling as described in claim 6. They have integrated the core information of spatial and temporal features and are adapted to the needs of the current target scenario. Obtaining risk assessment results based on weighted fusion features and real-time feature data refers to combining the two types of data and calculating the risk level in the current real-time state using a preset algorithm or model. The algorithm used can be a logistic regression model or a lightweight neural network model (such as a shallow CNN model) to ensure a balance between computational efficiency and prediction accuracy.

[0083] The first difference is obtained by subtracting the first parameter from 1. Together with the first parameter, it forms the weighting system for historical and real-time risks. The first parameter controls the weight of historical risks, while the first difference controls the weight of real-time risks. The sum of the two is always 1, ensuring the logical consistency of the risk prediction weighting. The second product is obtained by multiplying the risk assessment result by the first difference. Its function is to quantify the actual contribution of real-time feature data to the current risk prediction. Together with the first product (historical risk contribution), it forms the core basis for the current risk prediction. Representing the contribution of real-time feature data to the prediction means that the magnitude of the second product directly reflects the criticality of the current real-time state to the risk judgment. For example, a second product of 0.34 indicates that the real-time passenger flow at the subway station has a significant impact on the assessment of congestion risk; a second product of 0.49 indicates that the real-time crowd state at an outdoor art exhibition is the core basis for risk prediction. Through the combination of the first and second products, the dynamic risk prediction model can simultaneously absorb historical experience and real-time information, outputting risk level results that are more closely aligned with the current scenario.

[0084] In the behavior recognition method of this application, the historical risk contribution is adjusted by the first parameter, and the risk assessment results of historical risk values ​​and real-time feature data in similar scenarios are combined with the weighted integration of historical and real-time risk contributions. This achieves the dynamic fusion of historical experience and real-time status, accurately outputs the risk level of population behavior, and improves the rationality and timeliness of risk prediction.

[0085] Optionally, before performing adaptive spatiotemporal context modeling on the output of the target network layer, the method further includes: For the features of the multiple dimensions, at least two different feature aggregation scales are set; For each set aggregation scale, feature aggregation operations are performed on the features of the corresponding dimensions among the features of the multiple dimensions to obtain the aggregation results of each scale; Based on the aggregation results at each scale, learnable weights are set for the aggregation results at each scale; The sum of the products of the aggregation results of all scales and the corresponding learnable weights is obtained. The sum of the products is then processed by a linear rectified activation function to filter out invalid feature information, thereby obtaining multi-scale fused features. The multi-scale fusion features are incorporated into the output of the dual parallel network layer.

[0086] Feature aggregation scale refers to the temporal or spatial range for integrating features across multiple dimensions. This scale can be based on either the temporal or spatial dimension. When dividing based on the temporal dimension, the scale can be set as a combination of short and long periods. For example, a small timescale of "5 minutes" can be used to capture rapid short-term changes in features, while a large timescale of "30 minutes" can be used to capture long-term overall trends. Alternatively, a small timescale of "10 minutes" and a large timescale of "1 hour" can be used. When dividing based on the spatial dimension, the scale can be set as a combination of small and large areas. For example, a small spatial scale of "50-meter radius" can be used to capture feature details in a local area, while a large spatial scale of "200-meter radius" can be used to capture the feature distribution of the entire area. Alternatively, a small spatial scale of "100-meter radius" and a large spatial scale of "300-meter radius" can be used.

[0087] In specific scenarios, the scale setting can match the characteristics of feature changes: for example, in the scenario of a subway station during the morning rush hour in the city, the flow of people is fast and the features change frequently, so the time scale can be set to "3 minutes" (small scale) and "20 minutes" (large scale), and the spatial scale can be set to "30-meter radius platform area" (small scale) and "150-meter radius hub area" (large scale); in the scenario of daily life in a city park, the flow of people is slow and the features change gradually, so the time scale can be set to "15 minutes" (small scale) and "1 hour" (large scale), and the spatial scale can be set to "100-meter radius activity area" (small scale) and "500-meter radius entire park area" (large scale).

[0088] The aforementioned feature aggregation operation refers to the statistical or integrated analysis of feature data from multiple dimensions within the same aggregation scale and dimension. This transforms the scattered raw data into numerical values ​​or vectors that reflect the core state of the features at that scale. Common aggregation methods include calculating the mean to reflect the average level of the features, calculating the maximum value to reflect the peak state of the features, and calculating the variance to reflect the degree of feature fluctuation. The specific choice can be determined based on the feature type and scenario requirements. The aggregation result at each scale is the output obtained after the aggregation operation for the corresponding dimension features at each aggregation scale. Its form can be a single numerical value or a feature vector, etc.

[0089] The aforementioned learnable weights refer to weight coefficients that can be automatically adjusted through model training. This allows the model to dynamically allocate weights based on the importance of the aggregated results at each scale to behavior recognition in different scenarios. Scales that contribute significantly to recognition will automatically have their weights increased, while scales that contribute less will have their weights decreased, avoiding adaptation bias caused by manually fixing weights. The learning basis for the learnable weights is the model's feedback on prediction errors during training. For example, when the model finds that small-scale aggregated results can more accurately predict "short-term crowding," it will automatically increase the small-scale weights; when it finds that large-scale aggregated results can more accurately predict "long-term crowd gathering trends," it will automatically increase the large-scale weights. In specific scenarios, the initial values ​​of the weights can be set based on experience and then optimized through training. The sum of the products of the aggregated results at all scales and their corresponding learnable weights means multiplying the aggregated result at each scale by its learnable weight, and then adding all the products together to obtain a preliminary fusion result that integrates information from all scales.

[0090] The Rectified Luminaire (ReLU) activation function filters out invalid feature information from the sum of products. This function converts values ​​less than 0 to 0, retaining values ​​greater than or equal to 0. In population behavior features, values ​​less than 0 typically lack practical physical or behavioral meaning; for example, the reasonable values ​​for features like population density and collectivization level are all non-negative, thus constituting invalid information. For instance, when the sum of products is (0.82, -0.1, 0.72), after processing with the ReLU, the invalid -0.1 will be converted to 0, resulting in (0.82, 0, 0.72); when the sum of products is 0.74, because the value is non-negative, it remains 0.74 after processing. Multi-scale fusion features are the final features obtained after the above product sum calculation and ReLU processing. They integrate the advantages of features from different scales while filtering out invalid information, providing a more comprehensive and accurate reflection of the true state of features across multiple dimensions.

[0091] The output of the dual parallel network layer is incorporated into the original output of the dual parallel network layer to form a more comprehensive feature set. The combination method can be feature splicing or feature superposition. The specific choice can be determined according to the feature form and dimension of both.

[0092] For example, mobile big data provides rich spatiotemporal context information, which is crucial for understanding crowd behavior. Adaptive spatiotemporal context modeling, by learning to adjust the importance of different features, can more accurately capture the dynamic changes in crowd behavior.

[0093] Adaptive(X,T)=softmax(MLP([X;T]))⋅[X;T] Here, [X;T] represents concatenating spatial feature X and temporal feature T to consider information from both simultaneously; MLP is a multilayer perceptron that learns combined weights of features and time to generate a probability distribution of feature weights; the softmax function is used to convert the output of the MLP into a probability distribution, so that each feature receives a probability weight based on its importance; Adaptive(X,T) is the feature representation after adaptive weight adjustment, which will be used for subsequent risk prediction; Dynamic risk prediction models combine historical and real-time data to predict the risk level of population behavior. This model considers the impact of historical risk levels on current risk, thus capturing how risk changes over time.

[0094] Rt=γ⋅Rt−1+(1−γ)⋅Risk(Xt,Tt) Where Rt represents the risk prediction at time t; γ is a hyperparameter used to control the impact of historical risk level Rt−1 on the current risk prediction; Risk(Xt,Tt) is a risk prediction function that assesses risk based on the current spatial characteristics Xt and temporal characteristics Tt; (1−γ) controls the contribution of real-time data to the risk prediction.

[0095] In the behavior recognition method of this application, by incorporating multi-scale fusion features, the output of the dual parallel network layer can supplement key information of multiple scale dimensions. For example, in the scenario of holiday management in business districts, the output after incorporation includes not only the original feature correlation and time series dependence, but also the details of pedestrian flow in small-scale catering areas and the overall pedestrian flow trend of large-scale business districts, providing more comprehensive feature support for subsequent adaptive spatiotemporal context modeling, thereby improving the accuracy of crowd behavior risk prediction.

[0096] To more clearly describe the behavior recognition method provided in this application, please refer to [link / reference needed]. Figure 2 , Figure 2 This is a schematic diagram of the structure of a behavior recognition device 200 provided in an embodiment of this application. As shown in the figure, the behavior recognition device 200 includes: Extraction module 210 is used to extract features from multiple dimensions of the population data; Processing module 220 is used to obtain the correlation of features in the multiple dimensions, and to obtain the impact of time series dependencies corresponding to features in the multiple dimensions on population behavior; Modeling module 230 is used to adaptively model the spatiotemporal context of the impact of the correlation of the features of the multiple dimensions after feature fusion and the time series dependence of the features of the multiple dimensions on the behavior of the population, and to obtain weighted fusion features. The prediction module 240 is used to input historical risk data, real-time feature data and the weighted fusion features into the dynamic risk prediction model for prediction, and obtain the prediction result used to characterize the risk level of population behavior; wherein, the real-time feature data is the data corresponding to the features of the multiple dimensions collected in real time.

[0097] Optionally, the features of the multiple dimensions include at least one of physical features, social features, emotional features, and cultural features; The physical characteristics include at least one of the following: crowd motion entropy, velocity variance, motion disorder index, and crowd density; The social features are feature data obtained based on call data and location trajectory data.

[0098] Optionally, the processing module 220 can also be used for: Each feature across multiple dimensions is identified as a node, and the correlation between features across different multiple dimensions is identified as an edge between the nodes. A graph structure representing the feature association relationship is constructed based on the nodes and edges. The embedding function maps the features of the corresponding node in multiple dimensions to a low-dimensional space to obtain low-dimensional features. The low-dimensional features are processed using a nonlinear activation function to obtain the correlation results between nodes; The edges are updated based on the correlation results to form a graph structure containing specific correlation values; A dynamic graph neural network is used to track the time-varying pattern of the correlation results in order to dynamically update the correlation values ​​of the edges in the graph structure. Output the first branch processing result, which is the correlation information in the form of feature vectors extracted based on the graph structure.

[0099] Optionally, the processing module 220 can also be used for: Replace the long short-term memory network module of the spatiotemporal fusion network with a multi-scale temporal convolution module; When the spatiotemporal fusion network is running, it extracts spatial features of the features in the multiple dimensions through a convolutional neural network to obtain spatial feature extraction results. The spatial feature extraction result is adjusted using a spatiotemporal attention mechanism. The adjusted spatial feature extraction result and the output result of the multi-scale temporal convolution module are then input into the long short-term memory network module for processing to obtain the first parallel network processing result.

[0100] Optionally, the processing module 220 can also be used for: Based on the processing results of the first parallel network, multiple convolutional kernels of different scales are used to perform convolution processing on the time series features corresponding to the features of the multiple dimensions. A corresponding weight is set for the convolution processing results of each scale to adjust the contribution of the convolution processing results of different scales to the time series dependency processing results. The convolutional processing results at all scales are integrated to form the time series processing result of the second branch, and the time series processing result is fused with the processing result of the first branch to obtain the output result of the dual parallel network layer.

[0101] Optionally, the modeling module 230 can also be used for: Spatial and temporal features are extracted from the output of the dual parallel network layer, and the spatial and temporal features are concatenated to obtain spatiotemporal concatenated features. The spatiotemporal stitching features are input into a multilayer perceptron, and the weight distributions of the spatial and temporal features are obtained based on the correlation between the spatiotemporal stitching features. The weight distribution output by the multilayer perceptron is subjected to probability normalization to obtain probability weights that reflect the importance of spatial and temporal features in the target scene. Based on the probability weights, the contribution of spatial and temporal features in the spatiotemporal splicing features is adjusted, and the weighted fusion features are output.

[0102] Optionally, the prediction module 240 can also be used for: The first parameter for controlling the impact of historical risks is to obtain the behavioral risk records of people similar to the target scenario as historical risk values. The product of the first parameter and the historical risk value is determined to be the first product, and the first product represents the historical risk contribution; The real-time updated data of the features of the multiple dimensions are obtained as real-time feature data. Based on the weighted fusion features and the real-time feature data, the risk assessment result corresponding to the real-time feature data is obtained. The second product is determined to be the contribution of the real-time feature data to the prediction. The second product is the product of the risk assessment result and the first difference, where the first difference is the difference between 1 and the first parameter. The first product is integrated with the contribution of the real-time feature data to the prediction to obtain the risk level of crowd behavior.

[0103] Optionally, the behavior recognition device 200 can also be used for: For the features of the multiple dimensions, at least two different feature aggregation scales are set; For each set aggregation scale, feature aggregation operations are performed on the features of the corresponding dimensions among the features of the multiple dimensions to obtain the aggregation results of each scale; Based on the aggregation results at each scale, learnable weights are set for the aggregation results at each scale; The sum of the products of the aggregation results of all scales and the corresponding learnable weights is obtained. The sum of the products is then processed by a linear rectified activation function to filter out invalid feature information, thereby obtaining multi-scale fused features. The multi-scale fusion features are incorporated into the output of the dual parallel network layer.

[0104] The behavior recognition device in the embodiments of this application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip.

[0105] The behavior recognition device provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method embodiments shown achieve the same technical effects, and will not be described again here to avoid repetition.

[0106] For details, see Figure 3 As shown in the figure, this application embodiment also provides an electronic device, including a bus 301, a transceiver 302, an antenna 303, a bus interface 304, a processor 305, and a memory 306.

[0107] Processor 305, used for: Extract features from multiple dimensions of population data; The correlation of features across the multiple dimensions is obtained, as well as the impact of the time-series dependencies corresponding to the features across the multiple dimensions on population behavior. Adaptive spatiotemporal context modeling is performed on the impact of the correlation of features in the multiple dimensions after feature fusion and the time series dependence of features in the multiple dimensions on population behavior to obtain weighted fusion features; Historical risk data, real-time feature data, and the weighted fusion features are input into a dynamic risk prediction model for prediction, resulting in a prediction of the risk level that characterizes population behavior; wherein, the real-time feature data refers to the data corresponding to the features of the multiple dimensions collected in real time.

[0108] exist Figure 3In this context, a bus architecture (represented by bus 301) is used. Bus 301 can include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 305 and memory represented by memory 306. Bus 301 can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 304 provides an interface between bus 301 and transceiver 302. Transceiver 302 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 305 is transmitted over a wireless medium via antenna 303, which further receives data and transmits it to processor 305.

[0109] Processor 305 manages bus 301 and general processing, and also provides various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 306 can be used to store data used by processor 305 during operation.

[0110] Alternatively, the processor 305 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD).

[0111] Optionally, the features of the multiple dimensions include at least one of physical features, social features, emotional features, and cultural features; The physical characteristics include at least one of the following: crowd motion entropy, velocity variance, motion disorder index, and crowd density; The social features are feature data obtained based on call data and location trajectory data.

[0112] Optionally, the processor 305 is specifically used for: Each feature across multiple dimensions is identified as a node, and the correlation between features across different multiple dimensions is identified as an edge between the nodes. A graph structure representing the feature association relationship is constructed based on the nodes and edges. The embedding function maps the features of the corresponding node in multiple dimensions to a low-dimensional space to obtain low-dimensional features. The low-dimensional features are processed using a nonlinear activation function to obtain the correlation results between nodes; The edges are updated based on the correlation results to form a graph structure containing specific correlation values; A dynamic graph neural network is used to track the time-varying pattern of the correlation results in order to dynamically update the correlation values ​​of the edges in the graph structure. Output the first branch processing result, which is the correlation information in the form of feature vectors extracted based on the graph structure.

[0113] Optionally, the processor 305 is specifically used for: When the spatiotemporal fusion network is running, it extracts spatial features of the features in the multiple dimensions through a convolutional neural network to obtain spatial feature extraction results. The spatial feature extraction result is adjusted using a spatiotemporal attention mechanism. The adjusted spatial feature extraction result and the output result of the multi-scale temporal convolution module are then input into the long short-term memory network module for processing to obtain the first parallel network processing result.

[0114] Optionally, the processor 305 is specifically used for: Based on the processing results of the first parallel network, multiple convolutional kernels of different scales are used to perform convolution processing on the time series features corresponding to the features of the multiple dimensions. A corresponding weight is set for the convolution processing results of each scale to adjust the contribution of the convolution processing results of different scales to the time series dependency processing results. The convolutional processing results at all scales are integrated to form the time series processing result of the second branch, and the time series processing result is fused with the processing result of the first branch to obtain the output result of the dual parallel network layer.

[0115] Optionally, the processor 305 can also be used for: Spatial and temporal features are extracted from the output of the dual parallel network layer, and the spatial and temporal features are concatenated to obtain spatiotemporal concatenated features. The spatiotemporal stitching features are input into a multilayer perceptron, and the weight distributions of the spatial and temporal features are obtained based on the correlation between the spatiotemporal stitching features. The weight distribution output by the multilayer perceptron is subjected to probability normalization to obtain probability weights that reflect the importance of spatial and temporal features in the target scene. Based on the probability weights, the contribution of spatial and temporal features in the spatiotemporal splicing features is adjusted, and the weighted fusion features are output.

[0116] Optionally, the processor 305 is specifically used for: The first parameter for controlling the impact of historical risks is to obtain the behavioral risk records of people similar to the target scenario as historical risk values. The product of the first parameter and the historical risk value is determined to be the first product, and the first product represents the historical risk contribution; The real-time updated data of the features of the multiple dimensions are obtained as real-time feature data. Based on the weighted fusion features and the real-time feature data, the risk assessment result corresponding to the real-time feature data is obtained. The second product is determined to be the contribution of the real-time feature data to the prediction. The second product is the product of the risk assessment result and the first difference, where the first difference is the difference between 1 and the first parameter. The first product is integrated with the contribution of the real-time feature data to the prediction to obtain the risk level of crowd behavior.

[0117] It should be noted that the electronic device provided in this application embodiment is a device capable of executing the above-described behavior recognition method. Therefore, all implementation methods in the above-described behavior recognition method embodiments are applicable to this electronic device and can achieve the same or similar beneficial effects. To avoid repetition, this embodiment will not elaborate further.

[0118] This invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the various processes of the above-described behavior recognition method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0119] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described behavior recognition method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0120] This application also provides a computer program product, including computer instructions. When executed by a processor, the computer instructions implement the various processes of the above-described behavior recognition method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0121] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0123] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A behavior recognition method, characterized in that, The method includes: Extract features from multiple dimensions of population data; The correlation of features across the multiple dimensions is obtained, as well as the impact of the time-series dependencies corresponding to the features across the multiple dimensions on population behavior. Adaptive spatiotemporal context modeling is performed on the impact of the correlation of features in the multiple dimensions after feature fusion and the time series dependence of features in the multiple dimensions on population behavior to obtain weighted fusion features; Historical risk data, real-time feature data, and the weighted fusion features are input into a dynamic risk prediction model for prediction, resulting in a prediction of the risk level that characterizes population behavior; wherein, the real-time feature data refers to the data corresponding to the features of the multiple dimensions collected in real time.

2. The method according to claim 1, characterized in that, The features of the multiple dimensions include at least one of physical features, social features, emotional features, and cultural features; The physical characteristics include at least one of the following: crowd motion entropy, velocity variance, motion disorder index, and crowd density; The social features are feature data obtained based on call data and location trajectory data.

3. The method according to claim 1, characterized in that, The process of obtaining the correlation of the features across the multiple dimensions includes: Each feature across multiple dimensions is identified as a node, and the correlation between features across different multiple dimensions is identified as an edge between the nodes. A graph structure representing the feature association relationship is constructed based on the nodes and edges. The embedding function maps the features of the corresponding node in multiple dimensions to a low-dimensional space to obtain low-dimensional features. The low-dimensional features are processed using a nonlinear activation function to obtain the correlation results between nodes; The edges are updated based on the correlation results to form a graph structure containing specific correlation values; A dynamic graph neural network is used to track the time-varying pattern of the correlation results in order to dynamically update the correlation values ​​of the edges in the graph structure. Output the first branch processing result, which is the correlation information in the form of feature vectors extracted based on the graph structure.

4. The method according to any one of claims 1 to 3, characterized in that, The impact of processing the time-series dependencies corresponding to the features of the multiple dimensions on population behavior includes: When the spatiotemporal fusion network is running, it extracts spatial features of the features in the multiple dimensions through a convolutional neural network to obtain spatial feature extraction results. The spatial feature extraction result is adjusted using a spatiotemporal attention mechanism. The adjusted spatial feature extraction result and the output result of the multi-scale temporal convolution module are then input into the long short-term memory network module for processing to obtain the first parallel network processing result.

5. The method according to claim 4, characterized in that, After obtaining the first dual-parallel network processing result, the process further includes: Based on the processing results of the first parallel network, multiple convolutional kernels of different scales are used to perform convolution processing on the time series features corresponding to the features of the multiple dimensions. A corresponding weight is set for the convolution processing results of each scale to adjust the contribution of the convolution processing results of different scales to the time series dependency processing results. The convolutional processing results at all scales are integrated to form the time series processing result of the second branch, and the time series processing result is fused with the processing result of the first branch to obtain the output result of the dual parallel network layer.

6. The method according to any one of claims 1 to 3, characterized in that, The adaptive spatiotemporal context modeling of the output of the target network layer includes: Spatial and temporal features are extracted from the output of the dual parallel network layer, and the spatial and temporal features are concatenated to obtain spatiotemporal concatenated features. The spatiotemporal stitching features are input into a multilayer perceptron, and the weight distributions of the spatial and temporal features are obtained based on the correlation between the spatiotemporal stitching features. The weight distribution output by the multilayer perceptron is subjected to probability normalization to obtain probability weights that reflect the importance of spatial and temporal features in the target scene. Based on the probability weights, the contribution of spatial and temporal features in the spatiotemporal splicing features is adjusted, and the weighted fusion features are output.

7. The method according to any one of claims 1 to 3, characterized in that, The step of inputting historical risk data, real-time feature data, and the weighted fusion features into a dynamic risk prediction model to obtain the risk level of population behavior includes: The first parameter for controlling the impact of historical risks is to obtain the behavioral risk records of people similar to the target scenario as historical risk values. The product of the first parameter and the historical risk value is determined to be the first product, and the first product represents the historical risk contribution; The real-time updated data of the features of the multiple dimensions are obtained as real-time feature data. Based on the weighted fusion features and the real-time feature data, the risk assessment result corresponding to the real-time feature data is obtained. The second product is determined to be the contribution of the real-time feature data to the prediction. The second product is the product of the risk assessment result and the first difference, where the first difference is the difference between 1 and the first parameter. The first product is integrated with the contribution of the real-time feature data to the prediction to obtain the risk level of crowd behavior.

8. The method according to any one of claims 1 to 3, characterized in that, Before performing adaptive spatiotemporal context modeling on the output of the target network layer, the method further includes: For the features of the multiple dimensions, at least two different feature aggregation scales are set; For each set aggregation scale, feature aggregation operations are performed on the features of the corresponding dimensions among the features of the multiple dimensions to obtain the aggregation results of each scale; Based on the aggregation results at each scale, learnable weights are set for the aggregation results at each scale; The sum of the products of the aggregation results of all scales and the corresponding learnable weights is obtained. The sum of the products is then processed by a linear rectified activation function to filter out invalid feature information, thereby obtaining multi-scale fused features. The multi-scale fusion features are incorporated into the output of the dual parallel network layer.

9. A behavior recognition device, characterized in that, include: The extraction module is used to extract features from multiple dimensions of population data; The processing module is used to acquire the correlation of features in the multiple dimensions, and to acquire the impact of the time series dependencies corresponding to the features in the multiple dimensions on population behavior. The modeling module is used to adaptively model the spatiotemporal context of the impact of the correlation of the features of the multiple dimensions after feature fusion and the time series dependence of the features of the multiple dimensions on the behavior of the population, and to obtain weighted fusion features. The prediction module is used to input historical risk data, real-time feature data, and the weighted fusion features into a dynamic risk prediction model to make predictions and obtain prediction results that characterize the risk level of population behavior; wherein, the real-time feature data is the data corresponding to the features of the multiple dimensions collected in real time.

10. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the behavior recognition method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the behavior recognition method as described in any one of claims 1 to 8.

12. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the behavior recognition method as described in any one of claims 1 to 8.