A federated auxiliary large model urban traffic ubiquitous perception method
By constructing a hierarchical perception model based on spatiotemporal diffusion fields and federated learning, the problems of generalization ability and accuracy in urban traffic perception are solved, multi-task parallel perception and dynamic management are realized, and the needs of data privacy protection and diversified feature learning are met.
Patent Information
- Application Number
- CN202511334788.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-09-18
AI Technical Summary
Existing technologies have poor generalization ability and accuracy in urban traffic perception, making it difficult to adapt to diverse traffic scenarios. Furthermore, traditional methods rely on sensors and face difficulties in protecting data privacy.
By constructing a unified spatiotemporal diffusion field to represent multi-source heterogeneous traffic data, and using federated learning for contextualized training, a hierarchical perception model is generated to achieve multi-task parallel perception and dynamic management.
It achieves efficient, accurate, and safe multi-task parallel perception of urban traffic, meets the needs of data privacy protection and diverse feature learning, and provides a brand-new approach for intelligent transportation systems.
Smart Images

Figure CN120832508B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a federated auxiliary large model city traffic ubiquitous perception method. BACKGROUND
[0002] At present, with the continuous development of intelligent transportation system, city traffic perception is facing multiple challenges such as multi-source heterogeneous data fusion difficulty, high sensor dependence and data privacy protection. The traditional method usually adopts the "data collection-cleaning-feature engineering" mode, which not only cannot meet the real-time requirement, but also cannot fully utilize the scattered traffic data resources. In addition, the city traffic environment has strong spatio-temporal non-stationarity, and the model requirements of different road network regions and different traffic scenes are quite different, which makes it difficult for a unified centralized perception model to adapt to diversified application scenarios.
[0003] Therefore, there is an urgent need for a federated auxiliary large model city traffic ubiquitous perception method with high generalization ability and accuracy. SUMMARY
[0004] Therefore, the present application provides a federated auxiliary large model city traffic ubiquitous perception method, which at least partially solves the problem of poor generalization ability and accuracy in the prior art.
[0005] The present application provides a federated auxiliary large model city traffic ubiquitous perception method, comprising:
[0006] Step 1, constructing a spatio-temporal diffusion field based on multi-source heterogeneous traffic data of a target city, dynamically dividing traffic perception sub-tasks according to the spatio-temporal diffusion field, and obtaining a sub-task set;
[0007] Step 2, respectively training each traffic perception sub-task in the sub-task set based on federated learning, and obtaining a traffic perception sub-model corresponding to each traffic perception sub-task;
[0008] Step 3, layering and aggregating all traffic perception sub-models to obtain a layered perception large model, realizing multi-task parallel perception and dynamic management of the target city traffic.
[0009] The federated auxiliary large model city traffic ubiquitous perception scheme in the present application comprises: step 1, constructing a spatio-temporal diffusion field based on multi-source heterogeneous traffic data of a target city, dynamically dividing traffic perception sub-tasks according to the spatio-temporal diffusion field, and obtaining a sub-task set; step 2, respectively training each traffic perception sub-task in the sub-task set based on federated learning, and obtaining a traffic perception sub-model corresponding to each traffic perception sub-task; step 3, layering and aggregating all traffic perception sub-models to obtain a layered perception large model, realizing multi-task parallel perception and dynamic management of the target city traffic.
[0010] The beneficial effects of the present application are: through the scheme of the present disclosure, the context features of urban traffic are obtained by using the space-time diffusion field method, and the problem of difficult unified representation of different modal data is solved; then through the scenario training mechanism of the sub-model of federated learning, the demand of each edge node for local data privacy and diversified feature learning is met; finally, through the hierarchical perception large model aggregation, the outputs of different sub-models are flexibly spliced and fused, the multi-task parallel perception and dynamic management of urban traffic are realized, the method of the present application can achieve efficient, accurate and safe effect in city-level traffic perception, and provides a new idea for the construction and upgrading of intelligent traffic system. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0012] Figure 1 A flowchart of a federated auxiliary large model urban traffic ubiquitous perception method provided by the present application. DETAILED DESCRIPTION
[0013] The present application will be described in detail below with reference to the drawings.
[0014] The embodiments of the present disclosure will be described below through specific concrete examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the content disclosed in the present description. Obviously, the described embodiments are only some of the embodiments of the present disclosure, not all. The present disclosure can also be implemented or applied by other different specific embodiments, and each detail in the present description can be modified or changed based on different views and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present disclosure.
[0015] It is important to note that the various aspects described hereinafter in the detailed description section are not meant to be taken in a limiting sense. Any feature described herein can be implemented in a wide variety of forms, and any particular feature disclosed herein can be used independently or in any combination with any other feature or combination of features. As used herein, the term "exemplary" is used expansively with reference to implementations that serve as examples, can include embodiments that fall within a range of acceptable or allowable quality or can include embodiments that seek to achieve one or more desired results, benefits, or goals.
[0016] In addition, in the following description, specific details are provided to thoroughly understand examples. However, one having ordinary skill in the art will appreciate that the described aspects can be practiced without these specific details.
[0017] The present application provides a city traffic ubiquitous perception method assisted by a federal large model, which can be applied to the traffic ubiquitous perception process in the city traffic management scene.
[0018] Referring to Figure 1 , a flowchart of a city traffic ubiquitous perception method assisted by a federal large model provided by the present application is provided. As Figure 1 shown, the method mainly includes the following steps:
[0019] Step 1, based on the multi-source heterogeneous traffic data of the target city, a space-time diffusion field is constructed, based on which traffic perception sub-tasks are dynamically divided, and a sub-task set is obtained;
[0020] In specific implementation, this step unifies the multi-source heterogeneous traffic data into a shareable mathematical field structure by constructing a space-time diffusion field model, and then generates a context feature vector through a diffusion-de-noising process, and realizes dynamic screening and resource optimization allocation of sub-tasks based on the vector. Each sub-step follows the logical chain of "defining the basic framework → modeling the core process → generating the key features → realizing the task decision", which is as follows:
[0021] Sub-step 1.1, clearly define the construction target and the basic definition
[0022] (1) Determine the target of constructing the "context feature space"
[0023] Traditional traffic perception relies on the process of "data collection - cleaning - feature engineering", which has problems such as difficulty in multi-modal fusion and strong dependence on sensors. This sub-step aims to model the spatio-temporal diffusion field, unify multi-source heterogeneous data such as traffic environment, physical scene, and semantic information into a shareable mathematical field structure, and avoid explicit dependence on specific observation / sensing methods. The final context vector can directly serve downstream tasks such as path planning, cooperative perception, and accident prediction, simplifying data preprocessing and enhancing model generalization.
[0024] (2) Define the spatio-temporal field and potential field
[0025] To unify the description of multi-modal information in the spatio-temporal continuum, first define:
[0026] 1) Define the spatio-temporal field:
[0027] where the three-dimensional physical space and the positive half-axis of time (time variable t) form a continuous spatio-temporal coordinate system, used to describe the spatio-temporal evolution of traffic phenomena.
[0028] 2) Define the potential field:
[0029] Define a smooth function that maps any spatio-temporal point to a dimensional feature vector . Where is the configurable embedding dimension (such as 128). The field function implicitly encodes information such as traffic situation (such as congestion level), physical environment (such as road friction coefficient), and potential semantics (such as accident risk level), and does not rely on specific data sources (such as cameras, radars), providing a unified input carrier for the subsequent diffusion process.
[0030] 3) Diffuse the time parameter
[0031] To construct a reversible "noise whitening" process, introduce a dimensionless parameter independent of the physical time , and construct a reversible noise evolution process:
[0032] When increases from 0 to 1 (forward diffusion), the original field is degraded to a Gaussian distribution by gradually injecting noise, providing a standardized noise starting point for reverse denoising;
[0033] When decreases from 1 to 0 (reverse denoising), the original field structure is reconstructed by removing noise, achieving multi-modal information fusion and enhancement.
[0034] Sub-step 1.2, diffusion and de-noising process modeling
[0035] Based on the spatio-temporal domain and latent field defined in sub-step 1.1, this sub-step constructs a noise reversible transformation process, providing a basis for the generation of subsequent context vectors:
[0036] (1) Forward diffusion process, noise injection, establish a unified noise space:
[0037] The degradation process of the latent field to Gaussian noise is described by a stochastic differential equation (SDE):
[0038]
[0039] Where: represents the field at diffusion time ; is the drift term, containing learnable parameters , controlling the deterministic change of the field; is the diffusion coefficient, monotonically increasing with , controlling the noise injection rate; is the standard Brownian motion, introducing random disturbance.
[0040] As propels from 0 to 1, any initial field will be gradually "washed" into an isotropic multi-dimensional Gaussian distribution , forming a unified noise space independent of the original data, providing a universal reconstruction basis for the reverse process.
[0041] (2) Reverse de-noising process, noise stripping, reconstructing multi-modal features:
[0042] Noise stripping is achieved through reverse SDE, restoring the original field structure and reconstructing the latent field from Gaussian noise
[0043]
[0044] Where, is called the scoring network, used to estimate , where, represents the gradient of the log probability density function with respect to the latent field , called the score function in the diffusion model, guiding the de-noising direction (such as suppressing noise interference and enhancing real features); is the reverse-time Brownian motion (i.e., time-reversed Wiener process) opposite to the direction of the forward process, achieving step-by-step noise stripping.
[0045] When evolving back from to , the Gaussian noise is removed layer by layer, and the field will be "de-noised" to the original The corresponding distribution is consistent, and the final output is This is the original field estimate that incorporates multimodal information, providing the core input for feature extraction in sub-step 1.3.
[0046] Sub-step 1.3: Feature vector calculation and network training to generate task-usable features.
[0047] Based on the diffusion-denoising framework established in sub-step 1.2, this sub-step ensures the effectiveness of the inverse process by training a scoring network and extracts context vectors that can directly drive downstream tasks:
[0048] (1) Calculate the context vector and a unified representation of multimodal features.
[0049] After completing the reverse denoising, at the spatiotemporal point Extraction The field vector at time t is denoted as This vector naturally integrates traffic conditions, environmental features, and semantic information from the original field through a diffusion process, and possesses the following key characteristics:
[0050] Sensor-free: No need to consider the data source (such as cameras or radar), only the field function... Implicit encoding;
[0051] Unified Dimension: All heterogeneous data is mapped to a fixed dimension. The vector eliminates the dimension alignment problem in feature engineering;
[0052] Noise robustness: The effects of sensor noise or missing data are filtered out through a reverse denoising process.
[0053] (2) Self-supervised score matching is used to train the score network and ensure the correctness of the reverse process.
[0054] To enable the distributed network Accurate estimation of the intermediate distribution of forward diffusion The self-supervised objective function is designed as follows:
[0055]
[0056] In the formula, To match the denoising score with a loss function, and to use the objective function for training the scoring network. For the set of learnable parameters of the scoring network, This is a diffusion time parameter, ranging from [0,1], a dimensionless parameter independent of physical time t. Let be the potential field state at diffusion time τ. This represents the marginal distribution of the forward diffusion process at time τ. For the scoring network, the gradient of the log-probability density is used, For the distribution of the expectation, is the square of the L2 norm, which measures the difference between the predicted score and the true score.
[0057] Training logic: Utilize unlabelled historical scene data Simulate the forward diffusion process, forcing to learn the noise evolution law, so as to accurately remove noise in the reverse process, ensuring the reliability of the model;
[0058] Self-supervised advantage: No need for manual labeling, only relying on offline traffic scene simulation or historical data, reducing training cost, adapting to complex traffic environment.
[0059] where, is the marginal distribution of the forward diffusion process, is the variance scheduling parameter.
[0060] Sub-step 1.4, task screening and mapping
[0061] On the basis of the high-quality context vector generated in sub-step 1.3 , this sub-step solves the problem of "how to dynamically select active sub-tasks according to real-time scene, and realize resource optimization allocation":
[0062] (1) Discrimination vector extraction and task-related feature screening
[0063] Considering that downstream sub-tasks (such as congestion detection, accident warning) usually only focus on specific scene elements, the high-dimensional vector needs to be reduced in dimension and enhanced in features:
[0064] 1) Projection transformation:
[0065] Define a mapping such as a fully connected layer or a convolutional network, which converts into a low-dimensional discrimination vector .
[0066] Design goal: retain features strongly related to the task (such as the spatiotemporal gradient of traffic flow density for congestion detection, the change of road curvature for accident warning), eliminate irrelevant dimensions, and reduce the complexity of subsequent calculations;
[0067] Flexibility: Φ can choose linear or nonlinear transformation according to task requirements, adapting to the feature extraction needs of different scenes.
[0068] 2) Discretization indicator function:
[0069] toEach component of Task-sensitive threshold (defined by historical data cross-validation or domain knowledge), define the binary activation function:
[0070] ;
[0071] This function converts continuous features into Boolean conditions for task activation, providing the basis for preliminary task screening.
[0072] (2) Dynamic task mapping and resource optimization
[0073] Predefined set of potential subtasks Each task Corresponding revenue and resource consumption (such as computing power, memory usage), the goal is to select the activated subset M(Ct) under the resource upper limit Λ to maximize revenue:
[0074] 1) Preliminary task screening:
[0075] Calculate the task activation score through the scoring function , and select the candidate set:
[0076]
[0077] Where, is the task-specific activation threshold, excluding obviously irrelevant tasks and narrowing the optimization space.
[0078] 2) Optimal task combination under resource constraints:
[0079] Construct a binary optimization problem:
[0080]
[0081] Where, represents the activation of the traffic perception subtask . represents the resource upper limit, represents the condition that must be met for each element i in the set, represents the pre-screened candidate task set; this problem is solved through integer linear programming or heuristic algorithms, ensuring that high-revenue, low-consumption tasks are activated first under limited resources (such as activating high-real-time requirement accident warning tasks when computing power is tight).
[0082] 3) Mapping function definition:
[0083] The final activated subtask set is determined by the optimal solution Determined: the final activated subtask set is , realizing the end-to-end mapping of “real-time scene features→task activation decision”, supporting the dynamic resource allocation and efficient operation of the traffic perception system. With the update of , will also change accordingly, thereby realizing the dynamic division of tasks.
[0084] Step 2, based on federated learning, respectively according to each traffic perception subtask in the subtask set, the scene-based training is carried out to obtain the traffic perception submodel corresponding to each traffic perception subtask;
[0085] In implementation, the function realized by this step is the scene-based training of the traffic perception submodel based on federated learning, and the specific process includes:
[0086] Substep 1: edge node data and scene division
[0087] There are n edge nodes , each edge node holds a local data set . For a subtask , the data set is divided into scenes, where denotes different scenes, and satisfies , is the local training data of the subtask at the node . Wherein, denotes that after merging all L scene data sets of the subtask on the edge node , it is equal to the complete local training data set of the task at the node , denotes the local training data of the subtask at the edge node , initializes the submodel parameter set , and the edge node downloads the initial parameters of the subtask to initialize the local model .
[0088] Substep 2: scene-based local training phase
[0089] In the kth iteration, for the scene of the subtask on the edge node , the scene-specific loss function is defined as follows:
[0090] where, is the base loss function, which can be cross-entropy loss for classification tasks or mean square error loss for regression tasks. is the data sample and its label, is the scene sample number. is the balance coefficient, used to adjust the weight of the base loss and the scene constraint term. is the scene prediction distribution of the model. represents divergence, used to measure the difference between the model prediction distribution and the scene reference distribution ;
[0091] is the reference distribution of the scene , which is generated as follows: 1) Scene feature vector construction: Extract the spatio-temporal features related to the scene from the context vector generated in step 1 , and combine the local prior information of the edge node to construct the scene feature vector . Let be processed by aggregation operation , while combining the position coordinate component (replacing ), time period component , and historical traffic flow pattern component : . .
[0092] 2) Data-driven reference distribution modeling: Based on the historical scene dataset (containing historical samples of the scene ), estimate the reference distribution for different task types: Classification task: The reference distribution is the empirical probability distribution of the scene label: where is the class set, is the indicator function.
[0093] Regression task: The reference distribution is the conditional Gaussian distribution of the scene target variable, whose mean and variance are obtained by historical data statistics: .
[0094] 3) Scene correlation mapping: Map the scene feature vector to the reference distribution Mapped to the reference distribution parameter space. For classification tasks, the prior probabilities of each label are directly output; for regression tasks, the mean is output. and standard deviation The logarithm (ensuring positive definiteness). Through gradient calculation and parameter updates: ,in, It's the learning rate. It is the loss function with respect to the parameters The gradient.
[0095] Sub-step 3: Scene aggregation and parameter adjustment
[0096] At the edge node Above, for the same subtask Parameters updated for different scenarios Perform in-scene aggregation: ,in It is a scene Reference distribution With global reference distribution The JS divergence is used to measure scene specificity. It is a scene-specific adjustment factor that helps the model balance between general features and scene-specific features.
[0097] Sub-step 4: Cross-node federated aggregation phase
[0098] Define aggregate functions Collect the adjusted parameters of subtask Ti on all edge nodes. Perform a global parameter update: ,in, It is an edge node The weight.
[0099] Sub-step 5: Training convergence and model output
[0100] Set convergence threshold When satisfied Training stops when the time is right. The final output is a set of trained sub-models. ,in These sub-models, as the optimal parameters after convergence, will be used to aggregate and construct the hierarchical perception model in step 3.
[0101] Step 3: All traffic perception sub-models are hierarchically aggregated and spliced to obtain a hierarchical perception large model, which enables multi-task parallel perception and dynamic management of traffic in the target city.
[0102] In practice, the specific process of constructing a hierarchical perception-based large model includes:
[0103] Sub-step 1: Hierarchical architecture definition and sub-model input adaptation
[0104] The sub-model set output by step 2 is , where is the activated sub-task set of step 1 dynamic screening, is the scene-specific parameter obtained by training in step 2. A three-level hierarchical architecture is constructed , and each layer is defined as follows:
[0105] (1) Feature adaptation layer : Define the linear transformation matrix and the bias vector , map the context vector generated in step 1 to the adapted feature . , is the input dimension of the perception sub-model , and the inactive sub-task is filled with zeros to keep the structure uniform: .
[0106] (2) Sub-model parallel layer : Deploy sub-models in parallel , the input-output relationship is: , is the output dimension of the sub-model (classification task is the number of categories, regression task is 1);
[0107] Decision output layer : Map the fused feature vector to the final perception decision output, supporting multi-task joint inference. Define the fully connected transformation matrix and the bias vector , and the output projection matrix and the bias vector , the input-output relationship is: , where is the dynamic output dimension, is the output dimension of the sub-task (classification task is the number of categories, regression task is 1), is the hidden layer dimension (such as 512), and the final output is decomposed into in the order of sub-task index, realizing multi-task joint perception decision
[0108] Sub-step 2: Perception sub-model splicing and hierarchical aggregation mechanism
[0109] (1) Output feature splicing operator definition
[0110] Design a dynamic splicing operator , where is the current activated subtask index set, The specific concatenation process is defined as:
[0111]
[0112] where, is a set of real numbers is the output dimension of the submodel , is a vector space composed of all dimensional real number vectors, is the total output vector space after concatenation, is the current activated subtask index set, ;
[0113] This operator concatenates along the column dimension in the order of subtask indexes, generating a column vector with a dimension of .
[0114] (2) Cross-task attention fusion
[0115] Introduce the task attention matrix , whose element represents the contribution weight of the subtask to the th dimension of the fusion feature. The attention coefficient vector is generated by the scene gating function , The weighted fusion process is: where is a diagonal matrix with as the diagonal elements, which realizes the mapping of feature dimension and task weight.
[0116] Substep 3: Formal description of dynamic structure adjustment
[0117] When changes, define the activation mask ( is the predefined total number of subtasks), where iff . The dynamic adjustment process is implemented as follows:
[0118] (1) Real-time calculation of activated subtask dimension
[0119] Dynamic summation of input dimension:
[0120] Activated subtask index set:
[0121] .
[0122] (2) Tensor shape adaptive transformation
[0123] Define dimension alignment operator , dimension expansion is performed on each activation sub-model output:
[0124] where is a zero matrix. Through this operator, sub-model outputs of different dimensions are mapped to a unified global feature space, and finally spliced into: .
[0125] (3) Dynamic reconstruction of computation graph
[0126] In the dynamic computation graph, the tensor shape satisfies the relationship:
[0127] where denotes element-wise multiplication, is the summation operation. When is an empty set, the default output is a zero tensor: .
[0128] (4) Gradient backpropagation compatibility
[0129] The gradient propagation of the dynamic splicing operator satisfies the chain rule:
[0130] where is the joint loss function defined in step 3, ensuring the correctness of the sub-model parameter update path.
[0131] Sub-step 4: Large model verification and error calibration
[0132] (1) Multi-task joint verification dataset
[0133] Construct the verification set , where is the labeled data of sub-task , and the verification set dimension dynamically matches the activated sub-task:
[0134] ;
[0135] (2) Joint perception accuracy of classification tasks:
[0136] ;
[0137] where, is the product symbol, indicating the product operation on the set I, is the indicator function symbol, which is 1 when the condition in the parentheses is true, and 0 otherwise.
[0138] Overall RMSE of regression task:
[0139] ;
[0140] (3) Error calibration optimization equation
[0141] When verification error At that time, the sub-model parameters are updated using the following regularization optimization:
[0142] ;
[0143] in, To share parameter space for large models, For subtasks optimized after error calibration Fine-tuning parameters, Sub-tasks completed after federated learning training The convergence parameters, To represent subtasks General parameters, The learning rate for error calibration, and the step size for updating control parameters. Indicates the learning rate. Indicates the parameter Find the partial derivative. Represents the task loss function;
[0144] The validation error Err has the following relationship with the previously defined accuracy metric based on the type of activation subtask: Validation error for classification tasks:
[0145] ;
[0146] That is, the error rate equals 1 minus the joint perception accuracy of the classification task defined earlier, where:
[0147] ;
[0148] Validation error of the regression task: That is, directly use the overall RMSE of the regression task defined above:
[0149] ;
[0150] Validation error of mixed tasks: when the set of activation subtasks I contains both classification and regression tasks:
[0151] ;
[0152] in As a weight for the classification tasks, This serves as a reference benchmark for regression error.
[0153] wherein is the large model shared parameter space, ensuring the parameter compatibility of the sub-models and the overall architecture.
[0154] (4) Final large model mathematical expression
[0155] The integrated hierarchical model can be expressed as a composite function of a multilinear transformation:
[0156]
[0157] wherein, represents an attention fusion mechanism, represents the large model output, and C represents a dynamic splicing operator.
[0158] The mathematical mapping relationship of each module is:
[0159] Feature adaptation:
[0160] Sub-model reasoning:
[0161] Dynamic splicing:
[0162] Attention fusion:
[0163] Decision output: .
[0164] The city traffic ubiquitous perception method of the federated auxiliary large model provided in the embodiment solves the problem of difficult unified representation of different modal data by using the spatiotemporal diffusion field method to obtain the context features of city traffic; subsequently, the demand of each edge node for local data privacy and diversified feature learning is met through the sub-model scenario training mechanism of federated learning; finally, the outputs of different sub-models are flexibly spliced and fused through hierarchical perception large model aggregation, realizing the multi-task parallel perception and dynamic management of city traffic. The method of the present application can achieve efficient, accurate and safe effect in city-level traffic perception, and provides a new idea for the construction and upgrading of intelligent transportation systems.
[0165] It should be understood that various parts of the present disclosure can be implemented in hardware, software, firmware, or a combination thereof.
[0166] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or replacements within the technical scope disclosed in the present disclosure can be easily thought of by those skilled in the art, and should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A method for ubiquitous urban traffic perception using a federally assisted large-scale model, characterized in that, include: Step 1: Construct a spatiotemporal diffusion field based on multi-source heterogeneous traffic data of the target city, and dynamically divide the traffic perception sub-tasks accordingly to obtain a set of sub-tasks; Step 2: Based on federated learning, contextual training is performed for each traffic perception sub-task in the sub-task set to obtain the traffic perception sub-model corresponding to each traffic perception sub-task. Step 3: All traffic perception sub-models are hierarchically aggregated and spliced to obtain a hierarchical perception large model, which enables multi-task parallel perception and dynamic management of traffic in the target city. Step 1 specifically includes: Step 1.1: Define the spatiotemporal domain and potential field based on multi-source heterogeneous traffic data, and introduce the diffusion time parameter; Step 1.2: Construct a noise reversible transformation process based on the spatiotemporal domain, potential field, and diffusion time parameters; Step 1.3: Based on the reversible noise transformation process and the trained scoring network, reverse diffusion is performed. After the reverse denoising is completed, the field vector of the potential field when the diffusion time parameter is 0 is extracted at the spatiotemporal node as the context feature vector. Step 1.4: Convert the context feature vector into a low-dimensional discriminant vector through a mapping network, define a binarized activation function for each component of the low-dimensional discriminant vector, and perform dynamic task mapping and resource optimization accordingly to obtain a set of subtasks. Step 1.4 specifically includes: Step 1.4.1, Define the mapping network And based on this, the context feature vector Convert to low-dimensional discriminant vector ; Step 1.4.2, determine the low-dimensional discriminant vector. Each component Task sensitivity threshold Based on this, a binarization activation function is defined, and the low-dimensional discriminant vector is then divided according to the binarization activation function. Boolean condition for conversion to subtask activation: Step 1.4.3: Predefine the set of potential subtasks. Each task Corresponding benefits and resource consumption , This represents the total number of subtasks contained in the potential subtask set; Step 1.4.4, using the scoring function Calculate task activation scores and filter out candidate sets: ; in, This serves as the activation threshold for the task. Step 1.4.5, Construct the binary optimization problem: ; in, Indicates activation of the traffic perception subtask , Indicates the upper limit of resources. For each element i in the set, the following condition must be satisfied. This represents the pre-selected set of candidate tasks; Step 1.4.6 defines the objective as selecting the set of subtasks to be activated within the resource limit Λ. To maximize profits, the optimal solution can be obtained by solving the binary optimization problem using integer linear programming or heuristic algorithms. And based on this, the final set of activated subtasks is obtained as follows: .
2. The method according to claim 1, characterized in that, Step 2 specifically includes: Step 2.1, there are n edge nodes, each edge node Holding local datasets For the traffic perception subtask , local dataset Scene data is obtained by segmenting by scene. ,in, Representing different scenarios and satisfying ,in, This indicates that the edge node Sub-task All L scene datasets After merging, it equals the complete local training dataset for that task at that node. , Subtasks At the edge node Use local training data to initialize the sub-model parameter set. , Edge nodes For traffic perception subtask Download initial parameters To initialize the local model ; Step 2.2, in the k-th iteration, for the edge nodes Traffic perception subtask Scene data Define the loss function for scene data. for: ; in, It is the basic loss function. It consists of data samples and their labels. It is scene data The number of samples, It is the balance coefficient. It is scene data The predicted distribution of the model, It is scene data Reference distribution, KL divergence is used to measure the distribution predicted by the model. With scene reference distribution The degree of difference between them; Step 2.3, at the edge nodes Above, for the same traffic perception subtask Parameters updated in different scenarios Perform in-scene aggregation: ; in, For the scene Reference distribution With global reference distribution JS divergence, It is a scene-specific adjustment factor; Step 2.4, Define aggregate functions Collect traffic perception subtasks from all edge nodes Adjusted parameters Perform a global parameter update: ; in, It is an edge node The weights; Step 2.5, Set the convergence threshold When satisfied When the time is right, training stops, and the final output is the set of sub-models that have been trained. ,in These are the optimal scene-specific parameters after convergence.
3. The method according to claim 2, characterized in that, Prior to step 2.2, the method further includes: From context feature vectors Extracting from scenes Relevant spatiotemporal features, combined with edge nodes Construct scene feature vectors using local prior information. ; The empirical probability distribution of labels under different scenarios is calculated based on scene feature vectors, data samples and their labels as a reference distribution.
4. The method according to claim 3, characterized in that, Step 3 specifically includes: Step 3.1, Construct a three-tiered architecture ,in, For the feature adaptation layer, a linear transformation matrix is defined to map the context feature vectors to the adaptation features. Non-activated subtasks maintain structural uniformity through zero-padding. For the parallel layer of sub-models, deploy sub-models in parallel. And define its input-output relationship. As the decision output layer, it maps the fused feature vectors to the final perceptual decision output, supporting multi-task joint reasoning; Step 3.2: Define the output feature splicing operator to splice all traffic perception sub-models, and introduce the task attention matrix to fuse the splicing results to obtain a fused large model; Step 3.3: When the set of subtasks changes, define an activation mask to adjust the structure of the fusion model; Step 3.4: Construct a validation set to verify and adjust the validation error of the fusion model. When the validation error is greater than the error threshold, the parameters of the traffic perception sub-model are updated through regularization optimization and then integrated to obtain the hierarchical perception model.
5. The method according to claim 4, characterized in that, Step 3.2 specifically includes: Step 3.2.1, Design the feature splicing operator Based on the feature concatenation operator, all traffic perception sub-models are concatenated along the column dimension in subtask index order, generating a dimension of... column vectors : ; in, , Represents the set of real numbers Submodel The output dimension, Indicates all A vector space consisting of 3 real vectors. This represents the total output vector space after concatenation. This is the set of indices for the currently active subtasks. ; Step 3.2.2, introduce the task attention matrix. Attention coefficient vectors are generated through scene gating functions. Then, based on the task attention matrix and attention coefficient vector For column vectors We perform weighted fusion to obtain a large fusion model.
6. The method according to claim 5, characterized in that, The expression for the regularization optimization is: in, To share parameter space for large models, For subtasks optimized after error calibration Fine-tuning parameters, Sub-tasks completed after federated learning training The convergence parameters, To represent subtasks General parameters, The learning rate for error calibration, and the step size for updating control parameters. Indicates the learning rate. Indicates the parameter Find the partial derivative. Represents the task loss function; The expression for the hierarchical perception model is: ; In the formula, This indicates the attention fusion mechanism. represents the output of the large model, and C represents the dynamic splicing operator.
Citation Information
Patent Citations
Excitation method for federated learning driven by digital twinning in air-ground network
CN112367109A
Structural magnetic resonance image processing method based on federal map attention learning
CN116977272A