Automatic driving scene perception method and system based on online continuous cross-domain small sample learning

By constructing a source domain perception model and a distributed prototype memory library, and adjusting the model weights using cross-domain prototype matching and topology-preserving distillation constraint signals, the problem of cross-domain adaptation in autonomous driving scenario perception is solved, achieving perception accuracy and reliability in the target domain.

CN122364482APending Publication Date: 2026-07-10GUIZHOU INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU INST OF TECH
Filing Date
2026-05-27
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In autonomous driving scenario perception, existing technologies are prone to disrupting the discriminative knowledge structure already learned in the source domain when the sample size in the target domain is small, leading to a decline in perception capabilities and difficulty in maintaining accuracy and reliability in cross-domain environments.

Method used

A source domain-aware model and a distributed prototype memory are constructed. By matching cross-domain prototypes with associated pairs, the model weights are adjusted using topology-preserving distillation constraint signals. Combined with distributed offsets to recode prototype knowledge, an updated target domain-aware model is generated, thus achieving cross-domain adaptation.

Benefits of technology

In the absence of labeled data for the target domain, maintaining the consistency of the model's spatial structure with the knowledge of the old domain, improving the accuracy of the bounding box coordinates and category labels of the target object, and ensuring the perception reliability of the autonomous driving system under domain change conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122364482A_ABST
    Figure CN122364482A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for autonomous driving scene perception based on online continuous cross-domain few-shot learning, belonging to the field of autonomous driving perception technology. The method constructs a source domain pre-trained perception model and a distributed prototype memory indexed by semantic categories. When the scene switches to the target domain, a target domain response tensor is extracted using a small number of unlabeled samples and matched with prototypes in the memory to establish cross-domain prototype matching association pairs. After freezing the source domain model, a response tensor is synthesized using the matched prototypes as conditions, and a topology-preserving distillation constraint signal is calculated to guide the weight update of the target domain perception model. Simultaneously, prototypes in the memory are re-encoded and written. Finally, the updated model and memory are used to perform perception inference on new images in the target domain, outputting the bounding box coordinates and category labels of the target objects. This invention suppresses catastrophic forgetting under cross-domain few-shot conditions, improving the accuracy of target domain perception and model adaptation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular to an autonomous driving scene perception method and system based on online continuous cross-domain few-shot learning. Background Technology

[0002] Autonomous driving scene perception technology requires classifying and estimating the location of target objects in the vehicle's surrounding environment to provide a basis for subsequent decision-making and planning. When dealing with cross-domain switching in driving environments, a common approach is to fine-tune the parameters of a pre-trained perception model in the source domain using samples from the target domain to adapt to the data distribution in the new scenario. However, when the number of available samples in the target domain is limited, this fine-tuning process can easily disrupt the discriminative knowledge structure already learned in the source domain, causing a decline in the model's perception capabilities in older scenarios. Furthermore, due to the cost constraints of target domain annotation, the model struggles to receive sufficient supervision during adaptation. Simple fitting with only a small number of samples cannot maintain the stability of the structural relationships between different samples in the response space, resulting in perception results that fail to meet the reliability requirements for continuous cross-domain operation in terms of spatial localization and class determination. Summary of the Invention

[0003] This invention provides an autonomous driving scene perception method and system based on online continuous cross-domain few-shot learning.

[0004] In a first aspect, the present invention provides an autonomous driving scene perception method based on online continuous cross-domain few-shot learning, comprising: Construct a source domain perception model that has completed pre-training for source domain driving scenarios and a distributed prototype memory associated with the source domain perception model. The distributed prototype memory stores a set of response distributed prototypes extracted from the intermediate layer of the source domain perception model and indexed by semantic categories. When the driving environment switches from the source domain to the target domain, driving scene image samples collected in the target domain are input into the source domain perception model to perform forward propagation operations, extract the target domain response tensor of the specified intermediate layer, and retrieve the matching source domain response distribution prototypes based on the similarity between the target domain response tensor and each response distribution prototype in the distribution prototype memory, and establish a cross-domain prototype matching association pair composed of the target domain response tensor and the matching source domain response distribution prototype. Based on cross-domain prototype matching association pairs, the parameters of the source domain perception model are frozen, and a synthetic response tensor aligned with the source domain distribution is synthesized through generation processing conditioned on the matched source domain response distribution prototype. Combining the target domain response tensor and the synthetic response tensor, the structured distillation constraint used to maintain the relative relationship of response space between different image samples is calculated to obtain the topology-preserving distillation constraint signal. Guided by the topology-preserving distillation constraint signal, the model weight values ​​of the pre-built target domain perception model are adjusted. At the same time, the distribution offset between the target domain response tensor and the source domain response distribution prototype is associated through cross-domain prototype matching. The corresponding source domain response distribution prototype in the distribution prototype memory is re-encoded and written to generate the updated target domain perception model and the updated distribution prototype memory. Using the updated target domain perception model and the updated distributed prototype memory, perceptual inference is performed on newly captured driving scene images in the target domain, and the driving scene perception results containing the bounding box coordinates and category labels of the target objects are output.

[0005] Secondly, embodiments of the present invention provide a computer system including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement the steps in the above method.

[0006] This invention constructs a source domain perception model and a distributed prototype memory indexed by semantic categories, enabling model adaptation using only a limited number of samples after the driving environment switches to the target domain. A cross-domain prototype matching association is established between the target domain response tensor and the response distribution prototypes in the memory. A synthetic response tensor aligned with the source domain distribution is synthesized based on the matching prototypes. Furthermore, a topological preservation distillation constraint signal maintaining the relative relationship of the response space is calculated, preserving the spatial structural consistency of the source domain knowledge even in the absence of target domain labeled data. This constraint signal guides the weight adjustment of the target domain perception model, while the distributed offset is used to re-encode and write the prototypes in the memory, allowing model parameters and prototype knowledge to evolve synchronously towards the target domain. This avoids the catastrophic forgetting problem caused by traditional fine-tuning and endows the model with continuous perception capabilities for both new and old domains. During inference, the updated model and memory can output enhanced features guided by the fusion of source domain prototypes, improving the accuracy of the target object bounding box coordinates and category labels, and ensuring the perception reliability of the autonomous driving system under domain transition conditions. Attached Figure Description

[0007] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the specification, serve to explain the technical solutions of the present invention.

[0008] Figure 1 This is a schematic diagram illustrating the principle of an autonomous driving scene perception method based on online continuous cross-domain few-shot learning, as provided in an embodiment of the present invention.

[0009] Figure 2 This is a schematic diagram illustrating the implementation process of an autonomous driving scene perception method based on online continuous cross-domain few-shot learning, as provided in an embodiment of the present invention.

[0010] Figure 3 This is a schematic diagram of the hardware entity of a computer system provided in an embodiment of the present invention. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on the present invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0012] This invention provides an autonomous driving scene perception method based on online continuous cross-domain few-shot learning. This method can be executed by a computer system, such as an in-vehicle computing platform. The in-vehicle computing platform can refer to computing devices deployed in the vehicle, such as autonomous driving domain controllers, in-vehicle embedded artificial intelligence computing units, automotive-grade system-on-a-chip computing platforms, and driver assistance electronic control units, which possess real-time data processing and neural network inference capabilities. These devices typically integrate hardware acceleration modules such as graphics processors, neural network processors, or tensor processors, and are connected to visual sensors such as forward-looking cameras and surround-view cameras via a high-speed in-vehicle bus to acquire driving scene image data.

[0013] Combination Figure 1 and Figure 2 Referring to the present invention, the autonomous driving scene perception method based on online continuous cross-domain few-shot learning provided in this embodiment includes the following steps: Step S100: Construct a source domain perception model that has completed source domain driving scenario pre-training and a distributed prototype memory associated with the source domain perception model. The distributed prototype memory stores a set of response distributed prototypes extracted from the intermediate layer of the source domain perception model, indexed by semantic category.

[0014] The source domain awareness model is a deep convolutional neural network pre-trained on a large-scale labeled dataset of source domain driving scenes. Its function is to extract hierarchical visual features from input driving scene images and locate and classify target objects in the images based on these features. For example, this model can employ a two-stage detection architecture: a ResNet-101 residual network as the backbone, a Feature Pyramid Network (FPN) for neck connections, a Region Proposal Network (RPN) based on anchor boxes for head detection, RoIAlign pooling layers, and a fully connected classification and regression branch. The ResNet-101 backbone consists of 10 convolutional layers and fully connected layers, containing four residual stages. Each stage is composed of multiple stacked bottleneck residual blocks. Each bottleneck residual block sequentially contains a 1×1 convolutional layer for channel compression, a 3×3 convolutional layer for spatial feature extraction, and a 1×1 convolutional layer for channel expansion. Each convolutional layer is followed by a batch normalization layer and a rectified linear unit activation function. The input and output of the bottleneck residual block are added together via identity skip connections.

[0015] The Feature Pyramid Network (FPN) takes four layers of feature maps output from the four residual stages of the backbone network as input. Through a top-down path and lateral connections, it fuses the semantic information of deep features into shallow features, generating a multi-scale feature map set. Each scale feature map passes through a 3×3 convolutional layer to eliminate upsampling aliasing artifacts. The Region Proposal Network (RPN) scans each feature pyramid level with a 3×3 convolutional sliding window, generating anchor boxes of various scales and aspect ratios at each sliding window position. A classification branch determines whether each anchor box contains a target object, and a regression branch corrects the center coordinates and dimensions of the anchor boxes. The RoIAlign pooling layer maps the candidate regions output by the RPN to the corresponding feature pyramid levels, using bilinear interpolation to calculate fixed-size pooling outputs, ensuring the spatial correspondence accuracy between candidate regions and feature maps.

[0016] The classification and regression branch consists of two fully connected layers, each containing 1024 hidden units followed by a rectified linear unit activation function, ultimately outputting the class probability distribution and bounding box coordinate offsets in parallel. The pre-training dataset for this source domain awareness model is a large-scale public dataset containing hundreds of thousands of driving scene images and corresponding annotations. The annotation information includes the bounding box coordinates and semantic category labels of the target objects. Semantic categories include common road participants and facilities such as cars, trucks, buses, motorcycles, bicycles, pedestrians, traffic lights, traffic signs, and lane lines.

[0017] The pre-training process employs a momentum-driven stochastic gradient descent optimizer with a momentum coefficient of 0.9, a weight decay coefficient of 0.0001, and an initial learning rate of 0.01, which gradually decays during training using a cosine annealing strategy. The batch size is set to 16 images, and the training epochs are set to 50. The loss function consists of a weighted sum of the classification cross-entropy loss and the smoothed L1 loss of bounding box regression, with both the classification and regression losses weighted at 1. The mean average accuracy (mAP) across all semantic categories is used as the evaluation metric for early model stopping and optimal model selection. The distributed prototype memory is an external parameter storage container bound to the source domain perception model. Its internal physical implementation is a composite structure of a key-value pair mapping table and a multidimensional parameter matrix. The keys in the key-value pair mapping table are the index codes of the semantic category labels, and the values ​​are pointers to the starting addresses of the corresponding distributed prototypes in the multidimensional parameter matrix. The multidimensional parameter matrix stores the statistical parameters of each response distribution prototype, specifically including three types of information: category center coordinates, distribution spread range, and distribution shape parameters. The category center coordinates record the mean position of the response distribution prototype in the feature space, which is a vector with the same length as the number of channels in the corresponding intermediate layer. The distribution spread range records the standard deviation of the response distribution prototype along each channel dimension, which is also a vector with the same length as the number of channels. The distribution shape parameters record higher-order statistics of the response distribution prototype, such as skewness and kurtosis.

[0018] The response distribution prototype is a parameterized representation of the intermediate layer responses of each semantic category in the source domain dataset obtained by the source domain-aware model during the pre-training phase after statistical analysis. It characterizes the statistical features of the response activation patterns of a certain semantic category in the source domain at a specified intermediate layer at the probability distribution level. The intermediate layer was selected as the third-level feature map output layer with a medium resolution in the Feature Pyramid Network (FPN). The spatial size of the feature map in this layer is one-eighth of the input image size, and the number of channels is 256. This layer demonstrated the best trade-off performance between semantic discrimination and spatial localization in the ablation experiments.

[0019] The construction process of the response distribution prototype set is as follows: After pre-training in the source domain, all labeled samples in the source domain training set are sequentially input into the source domain perception model for forward propagation. The response tensor of each sample is extracted at the designated intermediate layer, i.e., the output layer of the feature map at level 3 of the feature pyramid network. The size of this response tensor is 256 channels multiplied by a specific spatial height multiplied by a specific spatial width. For each semantic category, the response tensors of all samples belonging to that category are collected at this intermediate layer. The mean and standard deviation of the response values ​​at all spatial locations of these response tensors in each channel are calculated. The mean constitutes the category center coordinates, and the standard deviation constitutes the distribution scatter range. Simultaneously, the skewness and kurtosis of the response value distribution for each channel are calculated as distribution shape parameters. The category center coordinates, distribution scatter range, and distribution shape parameters of each semantic category are packaged into a response distribution prototype entry and stored in the distribution prototype memory according to the semantic category label index. The storage organization of the distribution prototype memory is managed according to the semantic category index. The index structure uses a hash mapping table, allowing for the retrieval of the response distribution prototype for a given semantic category label in constant time.

[0020] Step S200: When the driving environment is switched from the source domain to the target domain, the driving scene image samples collected in the target domain are input into the source domain perception model to perform forward propagation operation, extract the target domain response tensor of the specified intermediate layer, and retrieve the matching source domain response distribution prototypes based on the similarity between the target domain response tensor and each response distribution prototype in the distribution prototype memory, and establish a cross-domain prototype matching association pair composed of the target domain response tensor and the matching source domain response distribution prototype.

[0021] In one implementation, step S200 may specifically include the following steps S210 to S260: Step S210: Divide the target domain response tensor into non-overlapping channel groups along the channel dimension, perform response pattern extraction on each channel group, and generate a local response pattern descriptor corresponding to each channel group. The local response pattern descriptor records the spatial distribution of response activation within the channel group.

[0022] As one implementation method, step S210 involves dividing the target domain response tensor into non-overlapping channel groups along the channel dimension, extracting response patterns for each channel group, and generating local response pattern descriptors for each channel group. Specifically, this may include the following steps S211~S215: Step S211: Obtain the total number of channels of the target domain response tensor. According to the channel group segmentation granularity uniformly agreed in the distributed prototype memory, divide the channel dimension into several groups in sequence. Each group contains the same number of continuous channels. Record the starting channel index and ending channel index of each channel group to obtain the channel group division record.

[0023] The total number of channels in the target domain response tensor is determined by the number of output channels in the third layer of the Feature Pyramid Network (FPN) of the source domain perceptual model. This layer has 256 output channels, a value determined by the number of convolutional kernels in the 1×1 convolutional layers used for lateral connections during the construction of the Feature Pyramid Network. This value remains constant during both the source domain pre-training phase and the distributed prototype memory construction phase. The uniformly agreed-upon channel group segmentation granularity in the distributed prototype memory is 32. This value is set as a hyperparameter during the construction of the distributed prototype memory. Its selection is based on a trade-off determined after performing a grid search on the source domain validation set to evaluate prototype matching recall and precision at different segmentation granularities. When the segmentation granularity is too large, each group contains too many channels, leading to insufficient sensitivity of local pattern descriptors to fine-grained differences. Conversely, when the segmentation granularity is too small, each group contains too few channels, resulting in overly fragmented local patterns and loss of the integrity of the joint activation topology between channels.

[0024] The channel dimension is divided into several groups sequentially, for example: starting from channel index 0, every 32 consecutive channels form one group, and so on, resulting in a total of 8 channel groups. The starting channel index of group 1 is 0, and the ending channel index is 31; the starting channel index of group 2 is 32, and the ending channel index is 63; the starting channel index of group 3 is 64, and the ending channel index is 95; the starting channel index of group 4 is 96, and the ending channel index is 127; the starting channel index of group 5 is 128, and the ending channel index is 159; the starting channel index of group 6 is 160, and the ending channel index is 191; the starting channel index of group 7 is 192, and the ending channel index is 223; and the starting channel index of group 8 is 224, and the ending channel index is 255. The channel group division record is a structured data, encapsulating complete metadata of the division result, specifically including the total number of channel groups (8), the number of channels in each group (32), and a list. Each element in the list contains the group number, the starting channel index, and the ending channel index of a channel group.

[0025] Step S212: For each channel group, perform threshold binarization transformation on the response values ​​of all channels in the group at their spatial locations, mark the spatial locations where the response values ​​are in the preset activation range as activation points, and mark the remaining locations as silent points, and generate a binary activation map for the channel group.

[0026] For a channel group containing 32 channels, the response values ​​of all channels at any spatial location constitute a 32-dimensional vector. The threshold binarization transformation is not performed on the response value of a single channel, but rather on the output of this 32-dimensional vector after passing through a joint activation decision function. The calculation logic of the joint activation decision function is as follows: first, the mean of the 32 channel response values ​​at that spatial location is calculated; simultaneously, the ratio of the maximum value of the 32 channel response values ​​at that spatial location to the mean is calculated. Only when the mean exceeds a first preset activation threshold and the ratio exceeds a second preset activation threshold is the spatial location determined as an active point; otherwise, it is determined as a silent point. The consideration for using joint activation decision instead of individual channel-by-channel decision is that the response value of a single channel may be affected by image noise or model randomness, resulting in occasional spikes. Joint activation decision requires that a sufficient number of channels at a spatial location simultaneously produce high responses, and that some channels produce significantly prominent peak responses. Such spatial locations are more likely to correspond to the local structure of the real target object that has been captured by the model. The first preset activation threshold is an adaptive threshold determined during the construction phase of the distributed prototype memory based on the global statistics of the source domain response distributed prototypes. Its value is the 75th percentile of the mean response of all source domain response distributed prototypes across all channels. The second preset activation threshold is also a hyperparameter determined during the construction of the distributed prototype memory. Its value balances the precision and recall of activation point labeling on the source domain validation set. The aforementioned joint activation decision function is executed sequentially for each spatial location within the channel group, resulting in a two-dimensional Boolean matrix with the same spatial size as the channel group. True values ​​correspond to activation points, and false values ​​correspond to silent points. This Boolean matrix is ​​the binary activation map of the channel group.

[0027] Step S213: Perform connected component labeling on the binary activation graph, identify the independent connected regions formed by all activation points, extract the contour coordinate chain of each connected region, and determine the region area and the direction angle of the major axis of the region based on the contour coordinate chain, as the morphological attributes of the connected region.

[0028] Connectivity labeling employs a two-pass scanning algorithm based on run-length encoding. The first pass traverses the binary activation graph row by row from top to bottom and left to right, assigning a temporary connectivity label to each activation point. During the scan, if an activation point is found to belong to the same connectivity region as its adjacent activation point above or to its left, their temporary labels are recorded as equivalent label pairs. The second pass merges all equivalent label pairs into a final label using a disjoint-set data structure, ensuring that all activation points within the same connected region are assigned the same final label. After two passes, all activation points in the binary activation graph are divided into several independent connected regions. Each connected region consists of a group of spatially adjacent activation points, and the regions are not connected to each other. For each connected region, the contour coordinate chain is extracted using a contour tracing algorithm. This algorithm starts from the top-left activation point of the connected region and traces the boundary of the connected region pixel by pixel in a clockwise direction, recording the spatial coordinates of each boundary pixel until it returns to the starting point to form a closed coordinate chain. During contour tracking, boundary pixels are determined based on the eight-neighbor connectivity criterion. That is, if an active point has at least one silent point in its eight neighborhoods, it is identified as a boundary point, and contour tracking proceeds only along these boundary points. The contour coordinate chain is stored in an ordered list, where each element is a coordinate pair containing a row and column index. The length of the list depends on the perimeter of the connected region. When determining the area of ​​a region based on the contour coordinate chain, the polygon area formula is used to calculate the area enclosed by the chain. The column indices of adjacent coordinate points are added together and multiplied by the difference in their row indices, following the order of the contour coordinate chain. The contributions of all edges are accumulated, and the absolute value is taken and divided by 2 to obtain the area of ​​the connected region in pixels.

[0029] To determine the major axis orientation angle of a region, first calculate the spatial distribution covariance matrix of all active points within the connected region. This covariance matrix is ​​a 2x2 symmetric matrix, with its main diagonal elements representing the variances of the row and column indices, and its secondary diagonal elements representing the covariances of the row and column indices. Next, perform eigenvalue decomposition on this covariance matrix to obtain two eigenvalues ​​and two corresponding eigenvectors. The eigenvector corresponding to the larger eigenvalue points towards the main extension direction of the connected region. Finally, calculate the angle between this eigenvector and the horizontal direction, mapping the angle value to a range of 0 to 180 degrees to obtain the major axis orientation angle of the connected region. The region area and the major axis orientation angle together constitute the morphological attributes of the connected region, describing its scale and spatial orientation, respectively.

[0030] Step S214: Sort the morphological attributes of all connected regions in each channel group according to the centroid position of the connected regions in space to obtain a connected region sequence, and encode the spatial distance and directional relationship between adjacent connected regions in the connected region sequence to obtain the connected region context relationship code.

[0031] The centroid of a connected region is calculated by averaging the row indices and column indices of all active points within that region, resulting in a two-dimensional coordinate representing the geometric center of the connected region in space. When sorting all connected regions within a channel group according to their centroid positions, a spatial scan order from top left to bottom right is used. First, they are sorted by centroid row index from smallest to largest; if row indices are the same, they are then sorted by centroid column index from smallest to largest. After sorting, an ordered sequence of connected regions is obtained, with each region arranged sequentially according to its spatial position. The length of the connected region sequence depends on the number of connected regions in the binary activation graph of the channel group. When there are no active points in the binary activation graph, the connected region sequence is empty, and the corresponding local response mode descriptor records that the channel group is inactive. For any two adjacent connected regions in a connected region sequence, the spatial distance is calculated by first obtaining the centroid coordinates of the preceding and following connected regions, and then calculating the Euclidean distance between these two centroid coordinates. Specifically, this distance is the square root of the sum of the squares of the differences in row indices and the squares of the differences in column indices. This distance reflects the spatial density of the two connected regions. The directional relationship is calculated by using the centroid of the preceding connected region as a reference point to determine the azimuth of the centroid of the following connected region relative to the reference point. The azimuth is calculated as the angle between the vector formed by the difference between the row index and column index of the following centroid and the difference between the row index and column index of the preceding centroid, and the horizontal direction. The azimuth ranges from 0 degrees to 360 degrees. When encoding spatial interval distance and directional relationships, the azimuth angle is mapped to a sector number from one of eight preset directional sectors. These eight sectors divide the 360 ​​degrees equally into 45-degree units. The sector number corresponding to the right direction is 0, and the counter-clockwise directions are numbered 1 to 7, corresponding to the upper right, upper left, upper left, lower left, lower right, and lower right, respectively. Spatial interval distance is mapped to distance level identifiers according to five preset distance intervals. The boundary values ​​of these intervals are determined proportionally based on the length of the spatial diagonal of the binary activation map. Interval 1 corresponds to the closest distance range with a distance level identifier of 0; interval 2 corresponds to a relatively close distance range with a distance level identifier of 1; interval 3 corresponds to a medium distance range with a distance level identifier of 2; interval 4 corresponds to a relatively far distance range with a distance level identifier of 3; and interval 5 corresponds to the farthest distance range with a distance level identifier of 4. A spatial transition code is generated for each pair of adjacent connected regions. This spatial transition code is formed by concatenating the directional sector number and the distance level identifier.By sequentially connecting the spatial transition codes corresponding to all adjacent connected regions in the connected region sequence, the connected region context relation code of the channel group is obtained. The connected region context relation code is a variable-length encoding sequence whose length is equal to the number of connected regions in the connected region sequence minus 1. When the number of connected regions is 0 or 1, the connected region context relation code is empty, which indicates that there is no spatial context relation between connected regions in the channel group.

[0032] Step S215: Combine the morphological attributes of each connected region in the connected region sequence with the connected region context relation code to generate the local response mode descriptor of the channel group; store the local response mode descriptors of all channel groups together with the channel group partitioning record.

[0033] In one implementation, step S215 may specifically include the following steps S2151 to S2156: Step S2151: For the connected region sequence, extract the contour coordinate chain of each connected region in sequence, convert the contour coordinate chain into a relative coordinate sequence with the centroid of the connected region as the origin, and normalize the orientation to obtain a contour shape chain code that is independent of rotation.

[0034] For each connected region in the connected region sequence, the corresponding contour coordinate chain data is extracted from its stored morphological attributes. The contour coordinate chain exists as an ordered list of coordinate pairs, each identified by a row index and a column index. To convert this contour coordinate chain into a relative coordinate sequence with the centroid of the connected region as the origin, firstly, the centroid row index and centroid column index of the connected region are calculated. The centroid row index equals the arithmetic mean of all row indices in the contour coordinate chain, and the centroid column index equals the arithmetic mean of all column indices in the contour coordinate chain. Then, each coordinate point in the contour coordinate chain is traversed, and the relative row coordinate is obtained by subtracting the centroid row index from the row index of each coordinate point, and the relative column coordinate is obtained by subtracting the centroid column index from the column index of each coordinate point. After all conversions are completed, a relative coordinate sequence with the centroid as the origin and pixels as the unit is obtained. The purpose of orientation normalization is to eliminate the influence of rotation of connected regions within the image plane on the contour shape description. Specifically, it involves locating the relative coordinate point farthest from the centroid in the relative coordinate sequence, calculating the polar angle of the line connecting this point and the centroid relative to the horizontal direction, and then rotating the entire relative coordinate sequence in reverse according to this polar angle, ensuring that the point farthest from the centroid always falls in the horizontal right direction. This reverse rotation is achieved by multiplying each relative coordinate point by a rotation matrix, where the rotation angle is the negative of the polar angle, and the elements of the rotation matrix consist of the cosine and sine values ​​of the rotation angle. The resulting coordinate sequence after orientation normalization is the contour shape chain code, independent of the rotation of the connected region. This chain code records the normalized spatial distribution of each point on the contour boundary relative to the centroid.

[0035] Step S2152: For each connected region, compare its region area with the total area of ​​the binary activation map, determine a size description item based on the comparison result, and map its region major axis direction angle to the corresponding sector number in the preset direction sector.

[0036] The total area of ​​the binary activation map is equal to the total number of pixels obtained by multiplying the spatial height of the binary activation map by its spatial width. Dividing the area of ​​the connected regions by the total area of ​​the binary activation map yields an area percentage value between 0 and 1. The size description term is determined based on the preset interval into which the area percentage value falls. The size description term uses multi-level discrete coding, divided into 5 levels: the size description term is minimal when the area percentage value falls into the first preset interval, small when it falls into the second, medium when it falls into the third, large when it falls into the fourth, and extremely large when it falls into the fifth. The boundary values ​​of each interval are determined during the distributed prototype memory construction phase based on the statistical quantiles of the connected region areas on the source domain validation set. When mapping the major axis direction angle of a region to the corresponding sector number in a preset direction sector, the preset direction sector adopts the same 8-sector division scheme as in step S214. The right direction corresponds to sector number 0, and the counterclockwise direction corresponds to sector numbers 1 to 7. The range of the major axis direction angle of the region from 0 degrees to 180 degrees is mapped to the sector space from 0 degrees to 360 degrees. The mapping method is that when the major axis direction angle of the region is less than 180 degrees, it is directly mapped according to the 45-degree sector it falls into. When the major axis direction angle of the region is equal to 180 degrees, it is mapped to the left direction of sector number 4. This mapping method ensures that each major axis direction angle of the region uniquely corresponds to a sector number.

[0037] Step S2153: Combine the contour shape chain code, size description item and direction sector number into a morphological description triplet for the connected region, and replace the original morphological attributes in the connected region sequence.

[0038] A morphological description triplet is a structured triplet data unit. The first element is the contour shape chain code, which is a variable-length array of coordinate sequences; the second element is the size description item, which is a discrete-level code; and the third element is the direction sector number, which is an integer in the range of 0 to 7. The above combination operation is performed sequentially on each connected region in the connected region sequence to generate the corresponding morphological description triplet. This morphological description triplet then replaces the original morphological attribute (composed of the region area and the region's major axis direction angle) stored in the corresponding connected region in the connected region sequence. After the replacement, the morphological description field of each element in the connected region sequence changes from two values ​​to a triplet structure.

[0039] Step S2154: For adjacent connected regions in the connected region sequence, determine the orientation and interval distance of the centroid of the next connected region relative to the centroid of the previous connected region, map the orientation to the sector number in the preset direction sector, map the interval distance to the distance level identifier according to the preset distance interval, and generate the spatial transition code of the adjacent connected regions.

[0040] For any pair of adjacent connected regions in the connected region sequence, first obtain the centroid row index and centroid column index of the preceding connected region, then obtain the centroid row index and centroid column index of the following connected region. Calculate the row offset obtained by subtracting the centroid row index of the preceding connected region from the centroid row index of the following connected region, and the column offset obtained by subtracting the centroid column index of the preceding connected region from the centroid column index of the following connected region. Calculate the azimuth angle based on the row and column offsets. The azimuth angle is calculated using the arctangent function. Substitute the row offset as the increment of the ordinate and the column offset as the increment of the abscissa into the arctangent function to obtain the radian value. Then convert the radian value to degrees and adjust it to the range of 0 to 360 degrees. The rule for mapping the azimuth angle to the direction sector number is consistent with step S2152, using the same 8-sector partitioning scheme. The interval distance is calculated as the square root of the sum of the squares of the row offset and the squares of the column offset. The rule for mapping the interval distance to distance level identifiers according to the preset 5 distance intervals is consistent with that in step S214, and the same 5-level distance level coding is used. The interval boundary values ​​of each level follow the setting in step S214, which divides the space according to the diagonal length of the binary activation graph. The directional sector number and the distance level identifier are concatenated into a spatial transition code. The spatial transition code consists of two parts: the first part is the directional sector number, and the second part is the distance level identifier.

[0041] Step S2155: Generate a spatial transition code for each pair of adjacent connected regions in the connected region sequence, and connect all spatial transition codes in sequence to obtain the connected region context relation code.

[0042] Traverse all adjacent connected component pairs in the connected component sequence, and generate a corresponding spatial transition code for each pair of adjacent connected components according to the method in step S2154. If there are K connected components in the connected component sequence, there are K-1 pairs of adjacency relationships, and K minus one spatial transition code is generated accordingly. These K minus one spatial transition codes are concatenated sequentially according to the adjacency order of the connected component sequence to form an encoding sequence, which is the connected component context relation code. The length of the connected component context relation code is directly related to the number of connected components in the connected component sequence. When the number of connected components is 0 or 1, the connected component context relation code is an empty code.

[0043] Step S2156: Combine the morphological description triplet of each connected region in the connected region sequence with the connected region context relation code in sequence order to generate the local response mode descriptor of the channel group.

[0044] The morphological description triples of each connected component are extracted sequentially from the connected component sequence and arranged into a list of morphological description triples according to the sequence order. This list is then concatenated with the connected component context relation code generated in step S2155. The concatenated whole is the local response pattern descriptor for that channel group. The complete structure of the local response pattern descriptor includes: a header field recording the number of connected components K, a middle field being a sequence of morphological description triples of length K, and a tail field being a connected component context relation code of length K-1. All eight channel group local response pattern descriptors, along with the channel group partitioning record generated in step S211, are stored together in the target domain response tensor analysis result cache in memory, forming a dictionary structure with the channel group number as the key and the local response pattern descriptor as the value. The channel group partitioning record is stored as an additional metadata field of this dictionary structure.

[0045] Step S220: For each response distribution prototype in the distribution prototype memory, obtain its pre-stored channel group division method and prototype local pattern descriptor, compare the morphological match of the local response pattern descriptor of each channel group with the prototype local pattern descriptor of the corresponding channel group, and determine whether the spatial distribution pattern recorded by the local response pattern descriptor falls within the acceptable morphological range of the prototype local pattern descriptor.

[0046] In the distributed prototype memory, each response distributed prototype is constructed with the same channel group partitioning granularity and method as step S210, storing the prototype local pattern descriptors of each channel group. Therefore, the source domain prototype and the target domain response are comparable at the channel group level. Morphological matching is performed independently at the channel group granularity, comparing the eight channel groups sequentially. The comparison logic for a single channel group is as follows: compare the number of connected regions recorded in the local response pattern descriptor of the target domain and the prototype local pattern descriptor of the source domain. If the absolute value of the difference in the number of connected regions exceeds the preset tolerance range, the morphological matching comparison of that channel group is directly determined to have failed. When the difference in the number of connected regions is within the tolerance range, further compare the three elements in the morphological description triplet region by region according to the order of the connected region sequence. The comparison of the contour shape chain code uses a dynamic time warping algorithm to calculate the warping distance between the two chain code sequences. This algorithm constructs a cumulative cost matrix on the contour coordinate sequence, with each row of the matrix corresponding to the coordinate point of the target domain contour shape chain code sequence. The columns of the matrix correspond to the coordinates of the prototype contour shape chain code sequence. The cost value of each element in the matrix is ​​the Euclidean distance between two corresponding coordinate points. The cumulative minimum cost is calculated recursively from the top left corner of the matrix along the diagonal direction. The cumulative cost at the bottom right corner of the matrix is ​​the normalized distance between the two chain code sequences. The contour shape comparison passes when the normalized distance does not exceed the preset chain code distance tolerance. The size description item comparison directly compares whether the two discrete level codes are the same or differ by no more than one level. The directional sector number comparison considers the cyclic characteristics of the directional sectors and calculates the shortest distance between the two sector numbers on the modulo-8 integer ring. The directional comparison passes when the shortest distance does not exceed one sector step. A connected region is only judged to have a matching individual shape when all three comparisons of the contour shape chain code, size description item, and directional sector number pass. Within a channel group, if all connected regions pass the individual morphological matching comparison, and the spatial transition codes of each pair of adjacent connected regions in the connected region context relation code are consistent or differ by no more than one level step in two coding bits, the morphological matching comparison of the channel group is determined to be passed, and the spatial distribution morphology recorded by the local response pattern descriptor is considered to fall within the acceptable morphological range of the prototype local pattern descriptor; otherwise, the morphological matching comparison of the channel group fails.

[0047] Step S230: Mark the channel groups that pass the morphological matching comparison as reliable channel groups, and mark the channel groups that fail the morphological matching comparison as questionable channel groups. Based on the proportion of reliable channel groups in all channel groups and the continuity of spatial coverage, select a set of candidate response distribution prototypes that meet the conditions from the distribution prototype memory.

[0048] For the currently compared prototypes, the eight channel groups in step S220 are marked as either trusted or questionable channel groups. The number of trusted channel groups is counted, and the proportion of trusted channel groups to the total number of channel groups (8) is calculated. The spatial coverage continuity assessment checks whether the eight channel groups exhibit an alternating pattern of trusted, questionable, and trusted channel groups in their channel index order. Channel groups have a natural linear topological order from group 1 to group 8 in their channel index. If trusted channel groups form continuous segments in their channel index order, and the length of these segments is not less than a preset minimum continuous length, then the spatial coverage continuity is satisfied. The conditions for selecting candidate response distribution prototype sets from the distributed prototype memory are: the proportion of trusted channel groups exceeds a preset lower limit threshold, and the spatial coverage continuity is satisfied. Only response distribution prototypes that simultaneously meet both conditions are included in the candidate response distribution prototype set. The lower limit threshold is determined during the distributed prototype memory construction phase by statistically analyzing the morphological fluctuation range of each channel group within the same type of sample in the source domain, ensuring that the prototypes retained in the candidate set have sufficient overall morphological consistency with the target domain response.

[0049] Step S240: For each candidate response distribution prototype in the candidate response distribution prototype set, extract its category center coordinates and distribution range. Query the preset channel group compensation rule library through the local response pattern descriptor of the questionable channel group to determine whether the form of the questionable channel group can be adjusted to the acceptable form range of the corresponding prototype local pattern descriptor through compensation rules.

[0050] The channel group compensation rule base is a set of rules built concurrently with the construction of the distributed prototype memory. Its input is the difference pattern between the local response pattern descriptor of a questionable channel group and the corresponding prototype local pattern descriptor. The output is a set of compensation operations and a judgment on the executability of each operation. The rule base is built by comparing and analyzing the intermediate layer responses of samples of the same class in the source domain training set under different data augmentation conditions during the source domain pre-training phase. It records which monotonic adjustment operations can be used to pull the deviated morphology back to the vicinity of the original morphology when each element in the morphological description triplet and each encoded bit in the connected region context relation code deviates within a reasonable perturbation range. Internally, the rule base is organized by difference pattern index, with each difference pattern corresponding to one compensation rule. The compensation rule specifies which fields in the target domain local response pattern descriptor need to be adjusted in terms of direction and size, such as increasing or decreasing the size description by one level, rotating the direction sector number clockwise or counterclockwise by one step, or applying dilation or erosion morphological operations to the contour shape chain code. During the query, the field-by-field differences between the local response pattern descriptor and the corresponding prototype local pattern descriptor of the questionable channel group are extracted and combined into a difference pattern vector. This vector is used as the query key to retrieve the channel group compensation rule base. If a rule is hit and the rule is marked as executable, the questionable channel group is determined to be able to be adjusted to an acceptable form range through the compensation rule. If no rule is hit or the hit rule is marked as non-executable, the questionable channel group is determined to be non-compensable.

[0051] Step S250: Retain the candidate response distribution prototypes that can be compensated for the questionable channel group, and remove the candidate response distribution prototypes that cannot be compensated, to obtain a set of matching response distribution prototypes. Select the one from the set of matching response distribution prototypes that is most consistent with the spatial coverage continuity of the trustworthy channel group as the matching source domain response distribution prototype.

[0052] For each candidate response distribution prototype in the candidate response distribution prototype set, perform the compensation query in step S240. Based on the query results, divide the candidate response distribution prototypes into two categories: compensable and non-compensable. Remove all non-compensable candidate response distribution prototypes, and retain the set of matching response distribution prototypes. The most consistent measure of spatial coverage continuity is as follows: for each prototype in the matching response distribution prototype set, obtain the length of the continuous segment of the trusted channel group recorded in step S230, and select the prototype with the largest continuous segment length as the matching source domain response distribution prototype. If multiple prototypes have the same maximum continuous segment length, further compare the proportion of trusted channel groups, and select the prototype with the higher proportion as the matching source domain response distribution prototype.

[0053] Step S260: Combine the category center coordinates, distribution range, and channel group division records of the matched source domain response distribution prototype to obtain cross-domain prototype matching association pairs.

[0054] The category center coordinate vector, distribution range vector, and semantic category label of the matching source domain response distribution prototype selected in step S250, along with the channel group partitioning record generated in step S211, the complete data copy of the target domain response tensor truncated in step S200, and the similarity score between the two, are combined into a complete data structure, which is the cross-domain prototype matching association pair. This association pair is serialized into a structured data unit and written into a cache area readable by subsequent steps. In step S300, it is used to guide the generation of the topology-preserving distillation constraint signal, and in step S400, it is used to drive the recoding update of the distribution prototype memory.

[0055] Step S300: Based on cross-domain prototype matching association pairs, the parameters of the source domain perception model are frozen, and a synthetic response tensor aligned with the source domain distribution is synthesized through generation processing based on the matched source domain response distribution prototype. Combining the target domain response tensor and the synthetic response tensor, the structured distillation constraint used to maintain the relative relationship of response space between different image samples is calculated to obtain the topology-preserving distillation constraint signal.

[0056] In one implementation, step S300 may specifically include the following steps S310 to S360: Step S310: Mark all trainable parameters of the source domain perception model as read-only to complete parameter freezing.

[0057] The algorithm iterates through all tensors registered as trainable parameters in the source domain awareness model, including the kernel weights and biases of all convolutional layers in the ResNet-101 backbone network, the scaling and translation coefficients of all batch normalized layers, the weights and biases of all convolutional layers in the Feature Pyramid Network (FPN), the weights and biases of convolutional layers in the classification and regression branches of the Region Proposal Network (RPN), and the weights and biases of fully connected layers in the fully connected classification and regression branches. The gradient requirement flag for each parameter tensor is set to false, preventing that parameter from generating a gradient in subsequent backpropagation calculations. Simultaneously, the model is switched to evaluation mode, where all batch normalized layers use the moving average mean and variance statistically derived during the source domain pre-training phase for inference, and all randomly deactivated layers are bypassed, ensuring the deterministic and reproducible results of the forward propagation computation.

[0058] Step S320: Divide the target domain response tensor into regions along the spatial dimension to obtain several non-overlapping spatial response blocks. Extract the distribution contour of the response value in each spatial response block along the channel dimension. Group spatial response blocks with consistent distribution contours into homogeneous block groups. Construct a spatial homogeneous topological skeleton based on the spatial adjacency relationship of the homogeneous block groups. The spatial homogeneous topological skeleton consists of the adjacent nodes and connecting edges of the block groups.

[0059] In one implementation, step S320 may specifically include the following steps S321 to S326: Step S321: The target domain response tensor is uniformly divided according to a preset spatial grid. All channel response values ​​in each grid cell are taken as a spatial response block to obtain a set of spatial response blocks. Each spatial response block retains its spatial row and column index in the original tensor.

[0060] The preset spatial grid is an 8x8 uniform grid. The spatial height and width of the target domain response tensor are each divided into 8 equal segments. The number of spatial pixels in each segment is determined by the actual spatial size of the target domain response tensor. When the spatial size of the target domain response tensor is height H and width W, the height of each grid cell is H divided by 8 and rounded down, and the width is W divided by 8 and rounded down. The grid division results in a total of 64 non-overlapping grid cells. For each grid cell, the response values ​​of all positions within its spatial range across all 256 channels are extracted in row and column order to form a 3D data block. The size of this data block is the height of the grid cell multiplied by the width of the grid cell multiplied by 256. This data block is a spatial response block. The data structure of each spatial response block contains two parts: response value data and spatial row and column indices. The spatial row and column indices record the grid row number and grid column number of the block in the original tensor. The row number ranges from 0 to 7, and the column number ranges from 0 to 7. The 64 spatial response blocks constitute a set of spatial response blocks.

[0061] Step S322: For each spatial response block, traverse the response values ​​of each channel in the block at all spatial locations, calculate the median position and the distribution span of the response values ​​for each channel, and use the median position and the distribution span of the response values ​​for all channels as the channel distribution profile of the spatial response block.

[0062] For the c-th channel within a spatial response block, the response values ​​of that channel at all spatial locations within the block are extracted into a one-dimensional array, which is then sorted in ascending order of value. The median position of the response values ​​is determined by calculating the median of the sorted array; this median represents the median position of the channel's response values ​​within the spatial response block, characterizing the central intensity level of the channel's response activation. The response value dispersion span is determined by calculating the 25th and 75th percentiles of the sorted array; subtracting the 25th percentile from the 75th percentile yields the interquartile range, which represents the dispersion of the channel's response activation. This process is repeated for all 256 channels, calculating the median position and dispersion span for each channel, resulting in a median position vector and a dispersion span vector of length 256. These two vectors are concatenated into a single vector of length 512, which represents the channel distribution profile of the spatial response block.

[0063] Step S323: For any two spatial response blocks in the spatial response block set, compare their channel distribution contours channel by channel. When the difference in the median position of the response value and the difference in the dispersion span of the response value both fall within the preset homogeneity judgment interval, classify the two spatial response blocks into the same homogeneous block group to obtain several homogeneous block groups.

[0064] The spatial response block set contains 64 spatial response blocks. When comparing the channel distribution profiles of any two spatial response blocks, the absolute values ​​of the channel differences on the median position vector and the distribution span vector of the response values ​​are calculated for each profile. After channel-by-channel comparison, if the maximum value of the absolute value of the median position difference across all 256 channels does not exceed a preset median position homogeneity threshold, and the maximum value of the absolute value of the distribution span difference across all 256 channels does not exceed a preset distribution span homogeneity threshold, then the channel distribution profiles of the two spatial response blocks are considered to be consistent, and they are classified into the same homogeneous block group. The preset median position homogeneity threshold and the preset distribution span homogeneity threshold are determined statistically based on the fluctuation range of channel distribution profiles between different spatial blocks within the same type of sample in the source domain when constructing the distribution prototype memory. The division of homogeneous block groups is achieved through the disjoint-set data structure algorithm. Initially, each of the 64 spatial response blocks is an independent homogeneous block group. For each pair of spatial response blocks that meet the homogeneity criteria, a merging operation is performed in the disjoint-set data structure. After the disjoint-set data structure is merged, the spatial response blocks that are in the same set belong to the same homogeneous block group.

[0065] Step S324: For each homogeneous block group, determine the spatial row and column index range covered by the homogeneous block group, and calculate the average state of the channel distribution profile of all spatial response blocks within the coverage range of the homogeneous block group as the group-level distribution profile of the homogeneous block group.

[0066] For a homogeneous block group, collect the spatial row and column indices of all spatial response blocks within the group, determine the minimum row index, maximum row index, minimum column index, and maximum column index, and obtain the spatial row and column index range of the homogeneous block group on an 8×8 grid. The group-level distribution profile is calculated as follows: calculate the arithmetic mean of the channel distribution profile vectors of all spatial response blocks within the homogeneous block group element by element at corresponding positions. The resulting 512-dimensional vector is the group-level distribution profile of the homogeneous block group.

[0067] Step S325: Treat each homogeneous block group as a node in the spatial homogeneous topological skeleton, assign the node a group-level distribution profile and the spatial row and column index range it covers. If two homogeneous block groups have adjacent or intersecting row and column index ranges in space, establish a connection edge between the two corresponding nodes and add a spatial adjacency type mark to the connection edge.

[0068] The spatial homogeneous topological skeleton is an undirected graph data structure. Each node in the graph corresponds to a homogeneous block group. The node attributes include the group-level distribution contour vector and the spatial row and column index range. The logic for determining the connection edge between two homogeneous block groups is as follows: if the spatial row and column index ranges of the two homogeneous block groups have an adjacency relationship on an 8×8 grid where the row index difference is 1 and the column index range overlaps, or the column index difference is 1 and the row index range overlaps, or the row and column index ranges intersect, then the two are determined to be spatially adjacent or intersecting, and a connection edge is added between the two corresponding nodes. Each connection edge is marked with a spatial adjacency type, which has three values: when the row index ranges of the two homogeneous block groups are adjacent and the column index ranges overlap, it is marked as horizontal adjacency; when the column index ranges are adjacent and the row index ranges overlap, it is marked as vertical adjacency; when the row and column index ranges intersect, it is marked as overlapping adjacency.

[0069] Step S326: Combine the nodes corresponding to all homogeneous block groups with all connecting edges to obtain a spatial homogeneous topological skeleton.

[0070] All nodes and all connecting edges generated in step S325 are combined according to the graph data structure specification. Nodes are stored as a node list, and each node has a unique node number. Connecting edges are stored as an edge list, and each edge records the numbers of the two nodes it connects to and the spatial adjacency type label. This graph structure is the spatial homogeneous topological skeleton, which is used for the topology-aware offset description transfer in subsequent steps S340 to S360.

[0071] Step S330: Extract the class center coordinates from the matched source domain response distribution prototype as conditions, and call the conditional response generator to map the class center coordinates into a synthetic response tensor. The conditional response generator is a network whose parameters have been fixed during the source domain pre-training stage.

[0072] The network architecture, training process, and generation flow of the conditional response generator are described in the general description of step S300. When the conditional response generator is invoked, the category center coordinate vector of the matched source domain response distribution prototype is used as the conditional input. It passes through a fully connected expansion layer, a reshaping operation, a 3-level transposed convolutional block, and a 1×1 convolutional output layer in sequence. After forward propagation, a synthetic response tensor is obtained. The spatial size of the synthetic response tensor is 32×32 and the number of channels is 256.

[0073] Step S340: For each node in the spatial homogeneous topological skeleton, extract the local response distribution sequence of the spatial response block corresponding to the node in the target domain response tensor, and at the same time extract the synthetic local response distribution sequence of the corresponding position of the spatial response block in the synthetic response tensor. Align the local response distribution sequence and the synthetic local response distribution sequence in terms of distribution shape to generate a node-level distribution shape offset description.

[0074] In one implementation, step S340 may specifically include the following steps S341 to S346: Step S341: For each node in the spatial homogeneous topological skeleton, based on the spatial row and column index range covered by the node, extract the response data of the corresponding region from the target domain response tensor, expand the response data along the channel dimension and sort it according to the channel index to obtain the local response distribution sequence.

[0075] For node n in a spatially homogeneous topological skeleton, obtain the range of spatial row and column indices stored in its attributes, including the minimum row index rmin, maximum row index rmax, minimum column index cmin, and maximum column index cmax. Map these row and column indices to the actual spatial coordinates of the target domain response tensor. Within a rectangular region in the height dimension starting from rmin multiplied by the grid cell height and ending at (rmax+1) multiplied by the grid cell height, and in the width dimension starting from cmin multiplied by the grid cell width and ending at (cmax+1) multiplied by the grid cell width, extract the corresponding sub-tensor. This sub-tensor contains 256 channels, and the spatial dimensions of each channel are the height and width of the rectangular region. For each channel, expand the response values ​​of all spatial locations within that channel into a one-dimensional array. Arrange these 256 one-dimensional arrays in order of channel index 0 to 255. The resulting sequence structure is the local response distribution sequence, where each element is a one-dimensional array of the same length as the number of spatial locations.

[0076] Step S342: For the spatial row and column index range covered by the same node, extract the response data of the corresponding region from the synthetic response tensor, expand the response data along the channel dimension and sort it according to the channel index to obtain the synthetic local response distribution sequence.

[0077] The spatial size of the synthesized response tensor is 32×32. Since this spatial size may differ from that of the target domain response tensor, a proportional mapping is performed during spatial region mapping: the normalized coordinates of the node's spatial row and column indices on an 8×8 grid are mapped to the 32×32 spatial grid of the synthesized response tensor. Specifically, the minimum row index is divided by 8, multiplied by 32, and rounded down to obtain the minimum row coordinate of the synthesized region; the maximum row coordinate is obtained by dividing (maximum row index plus 1) by 8, multiplying by 32, and rounding down. Column coordinate mapping follows the same procedure. Sub-tensors are extracted from the mapped synthesized region, and following the same operation as in step S341, the response values ​​of each channel are expanded and sorted by channel index 0 to 255 to obtain the synthesized local response distribution sequence.

[0078] Step S343: Divide the local response distribution sequence into several response segments. Each response segment contains response values ​​from several consecutive channels. Extract the peak position and attenuation trend of each response segment to form the morphological label of that response segment. The morphological labels of all response segments constitute the target domain morphological label sequence.

[0079] The response segmentation uses a fixed number of channels (16). The 256 channels are divided into 16 segments according to their index, each containing 16 consecutive channels. For each of the 16 channels within a response segment, the mean of the response value in the local response distribution sequence of each channel within that segment is obtained, resulting in 16 means. These 16 means are arranged by channel index to form a mean sequence of length 16. The segment peak position is determined by traversing the mean sequence and finding the channel index of the maximum value in the sequence as the segment peak position. This position is an integer between 0 and 15. The segment decay trend is determined by dividing the mean sequence into a left segment and a right segment using the segment peak position as the boundary, and performing monotonicity tests and slope statistics on the left and right segments respectively. For the left segment, check each element from the segment peak position to the left for monotonically increasing. If monotonically increasing, record the decay trend as left monotonic, and calculate the first-order difference mean of the elements in the left segment as the left decay rate. If there are increasing elements, record the decay trend as left non-monotonic. Perform a symmetrical operation on the right segment. Combining the monotonicity determination results of the left and right segments, if both sides are monotonic, the segment decay trend is set to bilateral monotonic, and the absolute values ​​of the left and right decay rates are added as decay amplitude information; if only one side is monotonic, the segment decay trend is set to unilateral monotonic and the monotonic side is indicated; if neither side is monotonic, the segment decay trend is set to non-monotonic. Combine the segment peak position and segment decay trend to form the morphological label of the response segment. The morphological labels of the 16 response segments are arranged in segment order to form the target domain morphological label sequence.

[0080] Step S344: Divide the synthetic local response distribution sequence into segments in the same way as the local response distribution sequence, extract the peak position and decay trend of each response segment, and form a synthetic domain morphological label sequence.

[0081] The synthesized local response distribution sequence is also segmented using a fixed number of channels (16), divided into 16 segments according to channel indices from 0 to 255. For each segment, the peak position and attenuation trend are extracted using the same procedure as in step S343, forming a morphological marker for that segment. The morphological markers of the 16 segments are arranged in sequence to obtain the morphological marker sequence of the synthesized domain.

[0082] Step S345: Compare the morphological marker sequence of the target domain with the morphological marker sequence of the synthesized domain segment by segment according to the response segment order. When the morphological marker of the target domain and the morphological marker of the synthesized domain are inconsistent in the peak position of the segment, record the peak position offset of the segment; when they are inconsistent in the decay trend of the segment, record the decay trend offset of the segment; use the peak position offset of the segment and the decay trend offset of the segment together as the morphological offset description of the response segment.

[0083] The segmented peak position offset is the difference between the target domain segmented peak position and the synthesized domain segmented peak position, where the difference is an integer between -15 and +15. The segmented decay trend offset is recorded as follows: the segmented decay trend is encoded as a composite code containing monotonicity states and decay rates. The composite code of the target domain is compared with that of the synthesized domain. If the monotonicity states are different, a state reversal flag is recorded. If the monotonicity states are the same but the difference in decay rates exceeds a preset rate tolerance, a rate offset flag and the offset amount are recorded. If the monotonicity states are the same and the decay rates are within the tolerance range, the segmented decay trend offset is empty. The segmented peak position offset and the segmented decay trend offset are combined into a structure, which serves as the morphological offset description of the response segment.

[0084] Step S346: Summarize the segment peak position offset and segment decay trend offset of all segments within the same node to obtain the distribution pattern offset description of the node.

[0085] The morphological offset descriptions of the 16 response segments corresponding to the current node in the spatial homogeneous topological skeleton are arranged sequentially to form a list of length 16. This list is the distribution morphological offset description of the node. Steps S341 to S346 are executed for all spatial response blocks in each homogeneous block group covered by the node to obtain the distribution morphological offset description of each spatial response block.

[0086] Step S350: Transmit the distribution morphology offset description of each node along the connecting edges of the spatial homogeneous topological skeleton, and use the topological adjacency relationship between the connecting edges of adjacent nodes to diffuse and propagate the distribution morphology offset description, so that the distribution morphology offset description of each node is updated into a topology-aware offset description after absorbing the offset information of the adjacent nodes.

[0087] The diffusion propagation mechanism employs an iterative message-passing mechanism based on graph convolution. In each round of message passing, each node sends its current distribution offset description to all its neighboring nodes and simultaneously receives distribution offset descriptions from all neighboring nodes. After receiving the offset information from its neighboring nodes, a node merges its own offset description with the offset descriptions of its neighbors according to preset adjacency weights. The adjacency weights are determined based on the spatial adjacency type label: when the connecting edge is labeled as horizontal adjacency, the first preset weight value is used; when labeled as vertical adjacency, the second preset weight value is used; and when labeled as overlapping adjacency, the third preset weight value is used. The third preset weight value is greater than the first and second preset weight values ​​to reflect the stronger spatial coupling of overlapping adjacencies. The fusion method is a segment-by-segment weighted average. For each of the 16 segments, the current segment peak position offset of the node is summed with the segment peak position offsets of the corresponding segments of each neighboring node according to their weights, and then divided by the total weights to obtain the updated segment peak position offset. If there is a state reversal flag in the segment decay trend offset, the state is determined to be retained by majority voting. The message passing iterative execution is performed for a fixed number of rounds. After each round, the offset description of each node is replaced by the updated value. After a preset number of iterations, the distribution shape offset description of each node is updated to a topology-aware offset description because it has fully absorbed the offset information of the topological neighboring nodes.

[0088] Step S360: Restore the topology-aware offset descriptions of all nodes in the spatially homogeneous topological skeleton to a tensor form of the same size as the target domain response tensor according to their original spatial positions, and use it as a topology-preserving distillation constraint signal.

[0089] The restoration process broadcasts the topology-aware offset description of each node to the rectangular region corresponding to its original spatial size in the target domain response tensor, based on the spatial row and column index range covered by each node in the spatial homogeneous topological skeleton. For each spatial location within each spatial response block, a two-dimensional constraint signal value is generated for each channel at that location, according to the segment peak position offset and segment decay trend offset corresponding to the response segment to which that channel belongs in the topology-aware offset description. When the response value of a certain channel within the spatial response block is active, the segment peak position offset is directly applied as a positive value to the constraint signal at that location, indicating that the intensity adjustment direction of the response needs to be migrated towards the center of the source domain distribution at that location; the decay rate offset in the segment decay trend offset is distributed to each spatial location using linear interpolation, forming a constraint signal value that changes continuously from location to location. The constraint signal values ​​of all spatial locations and all channels are combined into a four-dimensional tensor whose size is completely consistent with the target domain response tensor, i.e., the number of channels is 256, and the spatial size is the same as the spatial height and spatial width of the target domain response tensor. This four-dimensional tensor is the topology-preserving distillation constraint signal, which is passed to step S400 to guide the weight update of the target domain perception model.

[0090] Step S400: Guided by the topology-preserving distillation constraint signal, perform model weight adjustment operation on the pre-built target domain perception model. At the same time, through cross-domain prototype matching, associate the distribution offset between the target domain response tensor and the source domain response distribution prototype. Perform recoding and writing operation on the corresponding source domain response distribution prototype in the distribution prototype memory to generate the updated target domain perception model and the updated distribution prototype memory.

[0091] In one implementation, step S400 may specifically include the following steps S410 to S460: Step S410: Separate the adjustment instruction for each spatial location from the topology-preserving distillation constraint signal, inject the adjustment instruction into the network layer corresponding to the receptive field of the spatial location in the pre-built target domain perception model, and transmit the adjustment signal along the reverse path of the network, updating the weight values ​​of each layer during the transmission process.

[0092] In one implementation, step S410 may specifically include the following steps S411 to S416: Step S411: Parse the adjustment instructions corresponding to each spatial position from the topology-preserving distillation constraint signal. Based on the spatial position index carried by the adjustment instructions and the receptive field backtracking relationship of each intermediate layer of the target domain perception model, determine the target intermediate layer to which the adjustment instructions are bound and the local response coordinates in that layer.

[0093] The topology-preserving distillation constraint signal is a four-dimensional tensor with four dimensions: channel index, spatial height index, spatial width index, and batch index. During parsing, the constraint signal value vector expanded along the channel dimension at each spatial height and spatial width position is extracted. This vector, with a length of 256, serves as the adjustment indicator, and each adjustment indicator carries the spatial position index of that spatial position. The receptive field backtracking relationship of each intermediate layer of the target domain perception model is pre-calculated as follows: Taking the third layer of the Feature Pyramid Network (FPN) as a reference, the receptive field center coordinates and receptive field size of each spatial coordinate in this layer are determined by the cumulative convolution stride and pooling stride of each layer of the backbone network. For a spatial coordinate at the third layer of the FPN, the corresponding mapping coordinates of its receptive field center in the layers before the third layer of the FPN are calculated by multiplying the spatial coordinates by the reciprocal of the spatial scaling factor of the current layer relative to the third layer of the FPN. The spatial scaling factor is the spatial size of the current layer's feature map divided by the spatial size of the feature map of the third layer of the FPN. Accordingly, each adjustment instruction is mapped to the corresponding local response coordinates of the target intermediate layer, i.e., the third level of the FPN, based on its spatial location index, thereby determining the target intermediate layer to which the adjustment instruction is bound and the local response coordinates in that layer.

[0094] Step S412: Arrange all adjustment instructions bound to the same target intermediate layer according to the local response coordinates to generate an adjustment demand distribution map of the target intermediate layer. The adjustment demand distribution map marks the channel range that needs to be adjusted and the polarity requirements of the adjustment direction in a position-by-position manner.

[0095] The adjustment requirement distribution map is a two-dimensional arrangement with the same spatial size as the target intermediate layer output feature map. Each spatial location is associated with a vector, the length of which is equal to the number of channels in the target intermediate layer, 256. Each element in the vector takes one of three polarities: positive adjustment, negative adjustment, or no adjustment. The logic for determining the polarity requirement is as follows: extract the constraint signal value of that spatial location on that channel from the topology-preserving distillation constraint signal. When the constraint signal value is positive and its absolute value exceeds a preset adjustment sensitivity threshold, the polarity is positive adjustment; when the constraint signal value is negative and its absolute value exceeds the threshold, the polarity is negative adjustment; and when the absolute value does not exceed the threshold, the polarity is no adjustment.

[0096] Step S413: Traverse each position in the adjustment demand distribution diagram that needs to be adjusted, and classify the weight connection corresponding to the position into the active set or the temporarily silent set according to the polarity requirement of the adjustment direction. The weight connection in the active set maintains the response transmission function in subsequent iterations, and the weight connection in the temporarily silent set is bypassed in subsequent iterations.

[0097] Weighted connections refer to the convolutional kernel weight elements in the target intermediate layer that have a receptive field relationship with the spatial location that needs to be adjusted. For each convolutional layer in the target intermediate layer, the weight elements in its convolutional kernel that participate in the calculation of the response at the current spatial location are traversed. These weight elements include the weight values ​​at all spatial offset positions within the receptive field of the convolutional kernel. Based on the polarity requirement of this location in the adjustment demand distribution map, these weight elements are divided into sets: when the polarity is positive for adjustment, the corresponding weight elements are assigned to the "keep active" set, meaning that these weight elements need to maintain or enhance their contribution to the positive response in subsequent updates; when the polarity is negative for adjustment, the corresponding weight elements are assigned to the "temporarily silent" set, meaning that these weight elements need to be temporarily suppressed in subsequent iterations.

[0098] Step S414: For the convolution kernel region in the target intermediate layer that contains weight connections from both the active set and the temporarily silent set, perform weight connection rearrangement within the convolution kernel. Move the weight connections belonging to the active set towards the center of the receptive field of the convolution kernel, and move the weight connections belonging to the temporarily silent set towards the edge of the receptive field, while keeping the relative spatial order of the weight connections within the same set unchanged.

[0099] Convolutional kernel internal weight rearrangement is a structured weight reorganization operation targeting 3×3 convolutional kernels in the target intermediate layer that simultaneously contain both active and silent weights. During rearrangement, the offset distance of each weight element relative to the geometric center of the convolutional kernel within the 3×3 grid is first calculated. Then, weight elements marked as maintaining the active set are placed closer to the center according to their relative spatial order, while weight elements marked as temporarily silent sets are placed closer to the edges according to their relative spatial order. If the center position is insufficient to accommodate all active weight elements, the rearrangement expands outward layer by layer. The rearrangement operation only changes the position of the weight elements in the spatial arrangement of the convolutional kernel, without changing the numerical values ​​of the weight elements themselves. It maintains the relative spatial order within the active and temporarily silent sets before and after rearrangement, ensuring that the spatial coordination relationship between weights within the same set is not disrupted.

[0100] Step S415: Connect and adapt the target intermediate layer after weighted connection rearrangement to the adjacent layers that have not been rearranged. Adjust the weighted connection positions in the adjacent layers that have connections with the rearranged region so that the connection paths between the front and back layers maintain spatial correspondence.

[0101] Because the spatial arrangement of the weights in the target intermediate layer has been rearranged, the spatial correspondence of the convolutional kernel weights in the adjacent next layer connected to the output feature map of the target intermediate layer needs to be adjusted accordingly. The connection adaptation method is as follows: for each convolutional kernel in the adjacent layer, trace the spatial sampling position of each weight element on the output feature map of the target intermediate layer. Based on the source changes of the response at each spatial position in the output feature map after the weight rearrangement of the target intermediate layer, redistribute the spatial arrangement of the weight elements of the convolutional kernels in the adjacent layers, so that each weight element in the adjacent layer still samples from the new spatial position of the original weight element before the rearrangement, thereby maintaining the semantic spatial consistency of the connection paths between the preceding and following layers.

[0102] Step S416: Use a limited number of driving scene image samples collected from the target domain to verify the response consistency of the target domain perception model after weighted connection rearrangement and connection adaptation. When the difference between the forward response obtained in the verification and the distribution of the corresponding prototype in the distributed prototype memory is within a preset acceptable range, the weight value update is completed.

[0103] The driving scene image samples collected from the target domain are input again into the target domain perception model adjusted in steps S411 to S415. Forward propagation is performed, and the updated target domain response tensor is extracted at the third level of the specified intermediate layer FPN. The updated target domain response tensor is associated with the cross-domain prototype matching, and the distribution difference of the matched source domain response distribution prototype is measured. The cosine distance between the mean vector of the updated target domain response tensor in the channel dimension and the category center coordinates of the source domain response distribution prototype is calculated. When the cosine distance does not exceed the preset distribution difference acceptance limit, the response consistency verification is passed, and the weight value update is completed. If the cosine distance exceeds the limit, the rearrangement and adaptation operation is rolled back, the adjustment step size is reduced, and steps S413 to S415 are re-executed until the verification is passed.

[0104] Step S420: When updating the weight values ​​of each layer, maintain a weight update history table. The weight update history table records the update direction mark of each weight position in the continuous update steps. When the direction mark of the current update step is consistent with the direction mark of the previous update step, the original update amount is maintained. When the direction marks are opposite, the original update amount is reduced.

[0105] The weight update history table is a dictionary structure that corresponds one-to-one with all trainable weight parameters of the target domain perception model. The dictionary keys are the names of the weight tensors and their index positions in the multidimensional tensors, while the dictionary values ​​are a fixed-length queue containing the direction markers of the most recent updates. The update direction marker has three possible values: positive update, negative update, and no update. Each time a weight update is performed, the direction marker for that update is pushed to the tail of the queue corresponding to the weight position, and the oldest record at the head of the queue is popped. When calculating the update amount for the current step, the two most recent direction markers in the queue are compared. If both are positive or both are negative updates, it indicates that the update directions are consistent for two consecutive rounds, and the original update amount remains unchanged. If the directions are opposite, it indicates that the weight update is oscillating, and the original update amount is multiplied by a decay coefficient, which takes a value between 0 and 1, to smooth the weight update process and enhance the stability of small-sample training.

[0106] Step S430: Obtain the semantic category label corresponding to the source domain response distribution prototype from the cross-domain prototype matching association pair, generate a category supervision signal using the semantic category label, and bind the category supervision signal and the adjustment signal at the channel level to participate in the weight value update together.

[0107] The category supervision signal is a two-dimensional matrix with the same size as the target domain response tensor space. Each element in the matrix is ​​a surrogate value of the one-hot encoded vector of the semantic category label corresponding to the prototype of the matched source domain response distribution. This surrogate value only serves as an identifier, indicating that the spatial location is forcibly associated with the prototype constraint of the semantic category. The channel-level binding method is as follows: the constraint signal value of each spatial location in the adjustment signal (i.e., the topology-preserving distillation constraint signal) in the channel dimension is superimposed element-wise with the surrogate value of the corresponding spatial location in the category supervision signal. The superimposed composite signal contains both the distribution topology constraint and the category semantic constraint. During backpropagation, both types of constraints contribute to the weight gradient of the target domain perception model.

[0108] Step S440: Extract the range deviation description between the distribution range of each channel response value of the target domain response tensor and the distribution scattering range of the matched source domain response distribution prototype from the cross-domain prototype matching association pair, and convert the range deviation description into prototype recoding instructions.

[0109] In one implementation, step S440 may specifically include the following steps S441 to S446: Step S441: Extract the target domain response tensor after distribution normalization from the cross-domain prototype matching association pair, obtain the distribution density profile of the channel response value at all spatial locations for each channel, take the extended boundary of the distribution density profile as the single channel distribution range of the target domain, and gather the single channel distribution ranges of the target domain of all channels to form a set of target domain distribution ranges.

[0110] Distribution normalization refers to Z-score standardization of the target domain response tensor for each channel. This involves subtracting the mean of each channel's response value from its mean and then dividing by its standard deviation. After standardization, the distribution of response values ​​for each channel has zero mean and unit standard deviation, making the distribution ranges of different channels comparable. For the c-th channel of the standardized target domain response tensor, the response values ​​of this channel at all spatial locations are collected into a one-dimensional sample set. The probability density function of this sample set is estimated using a kernel density estimation method. A Gaussian kernel is chosen as the kernel function, and the bandwidth is automatically selected based on the sample set size through cross-validation. Extending the probability density function from the peak value to both sides until the cumulative probability density reaches a preset coverage ratio, the two endpoints corresponding to the left and right response values ​​constitute the extended boundary of the channel's distribution density profile, i.e., the single-channel distribution range of the target domain. This operation is performed on each of the 256 channels, resulting in 256 intervals, which are then aggregated into a target domain distribution range set containing these 256 intervals.

[0111] Step S442: Extract the source domain single-channel distribution range from the distribution scattering range of the matched source domain response distribution prototype channel by channel, perform boundary alignment comparison between the source domain single-channel distribution range of all channels and the target domain single-channel distribution range of the corresponding channel in the target domain distribution range set, and record the overflow channels and overflow boundary segments where the target domain single-channel distribution range exceeds the source domain single-channel distribution range.

[0112] In the distribution range of the matched source domain response prototype, each channel stores the standard deviation. The single-channel distribution range of the source domain is taken as an interval consisting of the category center coordinates plus or minus a certain multiple of the standard deviation. For each channel, the left boundary of the single-channel distribution range of the source domain is compared with the left boundary of the single-channel distribution range of the target domain, and the right boundary is compared with the right boundary. When the left boundary of the single-channel distribution range of the target domain is smaller than the left boundary of the single-channel distribution range of the source domain, the left overflow boundary segment is recorded, which extends from the left boundary of the target domain to the left boundary of the source domain. When the right boundary of the single-channel distribution range of the target domain is larger than the right boundary of the single-channel distribution range of the source domain, the right overflow boundary segment is recorded. Channels with overflow on either side or both sides are marked as overflow channels, and their overflow boundary segments are recorded.

[0113] Step S443: For each overflow channel, analyze the distribution pattern of response values ​​within its overflow boundary section, decompose the distribution pattern of response values ​​into a concentrated area, a transition area, and a tailing area, and obtain the proportion and interval position of each area within the channel as overflow pattern decomposition information.

[0114] For the response values ​​within the overflow boundary segment of an overflow channel, kernel density estimation is used again to obtain the local distribution density function within that overflow segment. Three regions are identified on the local distribution density function: a concentrated region (a continuous region where the density value exceeds a preset proportion of the global peak), a transition region (a region where the density value decreases from the concentrated region boundary to a preset tailing boundary), and a tailing region (a region where the density value is below the preset tailing boundary). The length proportion of each region within the total length of the overflow boundary segment is calculated, and the starting and ending response value intervals of each region are recorded. These three factors together constitute the overflow morphology decomposition information of the overflow channel.

[0115] Step S444: Based on the overflow morphology decomposition information, determine the direction and magnitude of the expansion of the source domain single-channel distribution range corresponding to the overflow channel. Encode the expansion direction and magnitude as a single-channel adjustment segment of the overflow channel. The single-channel adjustment segments of all overflow channels form a channel-level adjustment segment set.

[0116] The expansion direction is determined as follows: if the overflow occurs on the left, the expansion direction is leftward; if the overflow occurs on the right, the expansion direction is rightward; if both sides overflow, the expansion direction is bidirectional. The expansion magnitude is determined as follows: if the proportion of the trailing area in the overflow morphology decomposition information is lower than a preset trailing area proportion threshold, the expansion magnitude is taken as the length of the concentrated area in the overflow boundary segment; if the proportion of the trailing area exceeds the threshold, the expansion magnitude is taken as the length of the concentrated area in the overflow boundary segment plus the length of the transition area. The expansion direction and expansion magnitude are encoded into a single-channel adjustment segment, with a structure containing three fields: channel index, expansion direction, and expansion magnitude. The set of single-channel adjustment segments for all overflow channels constitutes a channel-level adjustment segment set.

[0117] Step S445: Obtain the coupling constraint relationship between each channel in the matching source domain response distribution prototype. When the expansion amplitude indicated by the single-channel adjustment segment of an overflow channel violates the coupling constraint relationship between the overflow channel and the adjacent channel, a follow-up adjustment segment is also generated for the single-channel distribution range of the adjacent channel, and the follow-up adjustment segment is merged into the channel-level adjustment segment set.

[0118] The coupling constraints between channels are obtained during the source domain pre-training phase by calculating the correlation coefficient matrix of the response values ​​between all pairs of channels in the source domain response distribution prototype. When the absolute value of the correlation coefficient between two channels exceeds a preset strong coupling threshold, the two channels are considered to have a coupling constraint relationship, meaning that a change in the distribution range of one channel will force a corresponding adjustment in the distribution range of the other coupled channel. The violation determination method is as follows: if the expansion amplitude indicated by the single-channel adjustment segment of the overflow channel causes the interval overlap rate between the adjusted distribution range of that channel and the distribution range of the adjacent coupled channel to be lower than a preset minimum overlap rate, then it is determined to be a violation of the coupling constraint relationship. At this time, a follow-up adjustment segment is generated for the adjacent coupled channel. The expansion direction of the follow-up adjustment segment is the same as that of the overflow channel, and the expansion amplitude is the minimum amplitude required to restore the interval overlap rate of the distribution ranges of the two adjusted channels to the minimum overlap rate. This follow-up adjustment segment is then merged into the channel-level adjustment segment set.

[0119] Step S446: Package the channel-level adjustment fragment set with the semantic category identifier of the matched source domain response distribution prototype to generate a prototype recoding instruction.

[0120] The prototype recoding instruction is a structured instruction data packet containing two parts: an operation object identifier and operation content. The operation object identifier is the semantic category identifier of the matched source domain response distribution prototype. The operation content is a set of channel-level adjustment fragments. Each single-channel adjustment fragment in the set indicates the correction of the standard deviation parameter in the distribution range of the corresponding channel. When expanding to the left, the standard deviation is stretched to the left by the corresponding adjustment amount; when expanding to the right, it is stretched to the right; and when expanding in both directions, both sides are stretched simultaneously. This instruction data packet is passed to step S450 to execute the actual modification of the distribution prototype memory.

[0121] Step S450: Locate the response distribution prototypes in the distribution prototype memory that have the same semantic category as the source domain response distribution prototypes and whose distribution ranges overlap. Synchronously modify the distribution range boundaries of these response distribution prototypes according to the prototype recoding instruction, so that the boundaries of the overlapping regions contract or expand in tandem.

[0122] Using the semantic category identifier of the matching source domain response distribution prototype as an index in the distribution prototype memory, all response distribution prototype entries under that semantic category are retrieved. For each retrieved prototype, the overlap between its distribution range and the distribution range of the matching prototype across 256 channels is calculated. When the distribution ranges of two prototypes overlap in more than half of the channels, an overlapping region is determined. For these overlapping prototypes, the standard deviation parameter of their distribution range is adjusted channel by channel according to the content of the channel-level adjustment fragment set in the prototype recoding instruction. The direction and magnitude of the adjustment are the same as those for the matching prototype in the prototype recoding instruction, thereby causing the boundaries of the overlapping region to expand or contract collaboratively, maintaining the relative topological relationship between prototypes of the same type in the feature space.

[0123] Step S460: Re-verify the index consistency of the modified distributed prototype memory. After the verification is passed, generate the updated target domain awareness model and the updated distributed prototype memory.

[0124] Index consistency verification checks whether there are null pointers to response distribution prototype entries pointed to by all semantic category indices in the distributed prototype memory, whether the dimensions of the category center coordinates and distribution spread range vectors of each response distribution prototype are both 256 and all elements are valid values, and whether there are any abnormalities such as unreasonable mutual inclusion or complete separation between the distribution spread ranges of different response distribution prototypes under the same semantic category. After the verification passes, the target domain-aware model whose weights have been updated in steps S410 to S430 is marked as the updated target domain-aware model, and the distributed prototype memory that has been recoded and written in steps S440 to S450 is marked as the updated distributed prototype memory. Both serve as the basis for performing target domain-aware inference in step S500.

[0125] Step S500: Perform perceptual inference on the newly captured driving scene image in the target domain using the updated target domain perception model and the updated distributed prototype memory, and output the driving scene perception result containing the bounding box coordinates and category labels of the target objects.

[0126] The newly captured driving scene images in the target domain are RGB color images collected in real time by the forward-facing camera during the continuous driving of the autonomous vehicle in the target domain environment. These images are input into the updated target domain perception model, and then sequentially pass through the ResNet-101 backbone network for feature extraction, the Feature Pyramid Network (FPN) for multi-scale feature fusion, the Region Proposal Network (RPN) for candidate region generation, the RoIAlign pooling layer for candidate region feature regularization, and the fully connected classification and regression branch for category classification and bounding box regression. Finally, the model outputs predicted bounding box coordinates and category labels for each target object in the image. During the perception inference process, the updated distributed prototype memory participates in the auxiliary verification of candidate region classification. By comparing the similarity between the pooled features of the candidate regions and the response distributed prototypes of the corresponding semantic categories in the distributed prototype memory, the credibility of the classification results is weighted and adjusted, thereby improving the perception accuracy in the target domain environment.

[0127] In one implementation, step S500 may specifically include the following steps S510 to S560: Step S510: Input the newly captured driving scene image in the target domain into the updated target domain perception model, execute the operations of each network layer in sequence, and extract the shallow response tensor, middle response tensor and deep response tensor output by the predetermined intermediate layer.

[0128] The newly captured driving scene image in the target domain is input into the updated target domain perception model after undergoing the same preprocessing operations as in step S200. The shallow response tensor is taken from the output of the second residual stage of the backbone network ResNet-101, which has high spatial resolution and low semantic abstraction, with 512 channels; the middle response tensor is taken from the output of the third level of the Feature Pyramid Network (FPN), i.e., the designated intermediate layer as in step S200, with 256 channels; the deep response tensor is taken from the output of the fifth level of the FPN, which has the lowest spatial resolution and the highest semantic abstraction, with 256 channels. The response tensors of the three levels capture the feature representation of the target object at different scales. The shallow response tensor preserves local details such as edges and textures, the middle response tensor encodes component-level structural information, and the deep response tensor contains global semantic context information.

[0129] Step S520: Generate candidate regions for the deep response tensor. Slide anchor points with preset size and aspect ratio in space and select the spatial position of the top response value in the deep response tensor as the center of the candidate region to generate a set of candidate bounding boxes.

[0130] At each spatial location of the deep response tensor, anchor boxes of various scales and aspect ratios are generated centered on that location. The baseline scale of the anchor boxes is set according to the spatial scaling factor of the deep response tensor relative to the input image, and the aspect ratio takes three preset values. A matching score is calculated between each anchor box and the corresponding spatial location response feature vector in the deep response tensor. The score calculation uses a scoring network implemented with 1×1 convolutional layers, which is trained synchronously during the training phase of the Region Proposal Network (RPN). All anchor boxes at all spatial locations are sorted in descending order of score, and a preset number of anchor boxes with the highest scores are selected as candidate bounding boxes, forming a candidate bounding box set.

[0131] Step S530: For each candidate bounding box, perform cropping and size normalization on the shallow response tensor, the middle response tensor, and the deep response tensor according to its spatial coordinates to obtain the shallow region response block, the middle region response block, and the deep region response block.

[0132] For a candidate bounding box, its spatial coordinates are defined at the original image scale and need to be mapped to the respective spatial scales of the shallow, medium, and deep response tensors. The mapping ratio is the ratio of the spatial size of each layer to the input image size. At the mapped coordinate positions of each layer, the feature regions corresponding to the candidate bounding box are cropped from the shallow, medium, and deep response tensors, respectively. Then, the RoIAlign pooling operation is used to normalize the cropped region features of different sizes into a uniform spatial size. The three normalized feature blocks correspond to the shallow, medium, and deep region response blocks, respectively.

[0133] Step S540: Perform prototype matching between the shallow region response block, the middle region response block, and the deep region response block and the corresponding level prototype set stored in the updated distributed prototype memory, respectively, to obtain the most matching level prototype for each level, and extract the semantic category tendency corresponding to the most matching level prototype.

[0134] The updated distribution prototype memory stores shallow prototype sets, intermediate prototype sets, and deep prototype sets according to network levels. The shallow prototype set corresponds to the output of the second residual stage of the backbone network ResNet-101, the intermediate prototype set corresponds to the output of the third level of the Feature Pyramid Network (FPN), and the deep prototype set corresponds to the output of the fifth level of the FPN. The construction method of the three-level prototype sets is consistent with the construction method of the intermediate layer response distribution prototype set described in step S100. All three are completed in the source domain pre-training stage and are recoded and updated synchronously with the intermediate layer prototypes in step S400.

[0135] In one implementation, step S540 may specifically include the following steps S541 to S546: Step S541: Obtain the shallow prototype set, the middle prototype set, and the deep prototype set stored in the updated distributed prototype memory according to the network level. Each set includes multiple prototype entries, and each prototype entry records the category center coordinates and semantic category identifier.

[0136] Using the network hierarchy index as the query key, the shallow prototype set, the mid-level prototype set, and the deep prototype set are retrieved from the updated distributed prototype memory. The category center coordinate vector length for each prototype entry in the shallow prototype set is 512, consistent with the number of channels in the shallow region response block; the category center coordinate vector length for each prototype entry in the mid-level prototype set is 256; and the category center coordinate vector length for each prototype entry in the deep prototype set is 256. The semantic category identifier is an integer code that uniquely corresponds to a semantic category.

[0137] Step S542: The shallow region response block is processed by global pooling to obtain the shallow response representation. The shallow response representation is compared with the category center coordinates of each prototype entry in the shallow prototype set. The prototype entry that is closest to the shallow response representation is selected as the shallow best matching prototype, and its semantic category is recorded as the first semantic category tendency.

[0138] The shallow region response block is subjected to global average pooling in the spatial dimension to obtain a shallow response representation vector of length 512. The cosine similarity between this vector and the category center coordinate vector of each prototype entry in the shallow prototype set is calculated. The prototype entry with the largest cosine similarity is selected as the shallow best-matching prototype, and its semantic category identifier is recorded as the first semantic category tendency.

[0139] Step S543: The mid-layer response block is processed by global pooling to obtain the mid-layer response representation. The mid-layer response representation is compared with the category center coordinates of each prototype item in the mid-layer prototype set. The prototype item that is closest to the mid-layer response representation is selected as the mid-layer best matching prototype, and its semantic category is recorded as the second semantic category tendency.

[0140] The mid-level response block is subjected to global average pooling in the spatial dimension to obtain a mid-level response representation vector of length 256. It is then compared with each prototype entry in the mid-level prototype set by cosine similarity. The prototype entry with the highest cosine similarity is taken as the mid-level best matching prototype, and its semantic category is recorded as the second semantic category tendency.

[0141] Step S544: The deep response block is processed by global pooling to obtain the deep response representation. The deep response representation is compared with the category center coordinates of each prototype item in the deep prototype set. The prototype item that is closest to the deep response representation is selected as the deep best matching prototype, and its semantic category is recorded as the third semantic category tendency.

[0142] The deep region response block is subjected to global average pooling in the spatial dimension to obtain a deep response representation vector of length 256. It is then compared with each prototype entry in the deep prototype set by cosine similarity. The prototype entry with the highest cosine similarity is taken as the deep best matching prototype, and its semantic category is recorded as the third semantic category tendency.

[0143] Step S545: Obtain the prototype freshness markers recorded in the shallow best-matching prototype, the middle best-matching prototype, and the deep best-matching prototype respectively. The prototype freshness marker indicates the number of model update rounds that the prototype entry has undergone since the most recent recoding write. Assign a tendency confidence level to the corresponding semantic category tendency according to the number of rounds indicated by the prototype freshness marker. The more rounds, the later the confidence level is assigned.

[0144] The prototype freshness tag is a timestamp counter attached during recoding and writing to the distributed prototype memory. Each prototype entry has its freshness tag set to 0 upon initial creation. Subsequently, whenever the target domain-aware model completes one round of weight updates without the prototype entry being recoded and modified, its freshness tag value is incremented by 1. When the prototype entry is recoded and written, the freshness tag is reset to 0. The confidence level is divided into three tiers: high, medium, and low. A high confidence level is assigned when the number of rounds with freshness tags does not exceed the first threshold; a medium confidence level is assigned when the number of rounds exceeds the first threshold but does not exceed the second threshold; and a low confidence level is assigned when the number of rounds exceeds the second threshold.

[0145] Step S546: Output the first semantic category tendency and its tendency confidence level, the second semantic category tendency and its tendency confidence level, and the third semantic category tendency and its tendency confidence level together.

[0146] The output is organized in a list format for the three semantic category tendencies and their respective credibility levels, which are then used by step S550 to make a cross-level consistency decision.

[0147] Step S550: Perform a consistency judgment on the semantic category tendency corresponding to the shallow region response block, the semantic category tendency corresponding to the middle region response block, and the semantic category tendency corresponding to the deep region response block. When the semantic category tendencies of the three levels point to the same semantic category, use the semantic category as the category label of the candidate bounding box; otherwise, mark the candidate bounding box as pending.

[0148] In one implementation, step S550 may specifically include the following steps S551 to S556: Step S551: Obtain the first semantic category tendency, the second semantic category tendency, and the third semantic category tendency, and their corresponding tendency credibility levels.

[0149] Extract three semantic category tendencies and their respective credibility levels from the output of step S546.

[0150] Step S552: Compare whether the semantic categories indicated by the first semantic category tendency, the second semantic category tendency, and the third semantic category tendency are completely identical. If they are completely identical, the consistency is determined, and the completely identical semantic category is output as the category label of the candidate bounding box.

[0151] When the first semantic category tendency, the second semantic category tendency, and the third semantic category tendency all point to the same semantic category, it indicates that the response features of the three levels—shallow, medium, and deep—reach a consensus on the candidate bounding box. At this point, the consensus is established, and the semantic category label is directly assigned to the candidate bounding box as its category label.

[0152] Step S553: ​​When the three semantic category tendencies are not completely identical, check whether there are two semantic category tendencies that are the same and another that is different. If so, take the one with the higher confidence level among the two identical semantic category tendencies as the dominant tendency, and the other different semantic category tendency as the dissenting tendency.

[0153] When two of the three semantic category tendencies are the same and one is different, the credibility level of the two identical semantic category tendencies is compared, and the semantic category tendency with the higher credibility level is taken as the dominant tendency, and the semantic category tendency with the different credibility level is taken as the dissenting tendency.

[0154] Step S554: Compare the credibility level of the objection tendency with the preset level limit. When the comparison result shows that the credibility level of the objection tendency is outside the acceptable range defined by the preset level limit, adopt the semantic category of the dominant tendency as the category label of the candidate bounding box, and record the hierarchical combination corresponding to the dominant tendency as the priority basis for subsequent retrieval.

[0155] The preset level limit is low credibility. When the credibility level of the dissenting tendency is low, the dissenting tendency is considered insufficiently credible and outside the acceptable range. In this case, the semantic category of the dominant tendency is adopted as the category label of the candidate bounding box. At the same time, the hierarchical combination from which the dominant tendency comes is recorded. For example, if the dominant tendency comes from the shallow and middle levels while the dissenting tendency comes from the deep level, the shallow and middle levels are recorded as the preferred hierarchical combination for subsequent retrieval reference.

[0156] Step S555: If the credibility level of the objection tendency is within the acceptable range defined by the preset level limit, or if the three semantic category tendencies are not the same, then mark the candidate bounding box as pending and retain all semantic category tendency records.

[0157] When the credibility level of the dissenting tendency is not low (i.e., the dissenting tendency has a medium or high credibility level), it indicates that the contradictory judgments given at different levels all have credibility. In this case, it cannot be directly decided based on the existing information, and the candidate bounding box is marked as pending. If the three semantic category tendencies are different, they are also marked as pending. The candidate bounding box marked as pending retains all records of its first, second, and third semantic category tendencies.

[0158] Step S556: For the candidate bounding box, construct a limited semantic category set. The limited semantic category set contains only all semantic categories that have appeared in the first semantic category tendency, the second semantic category tendency, and the third semantic category tendency. Use the limited semantic category set as the semantic category filtering condition of the memory bank when searching again.

[0159] The limited semantic category set is a set of unique semantic category labels. Its elements are all different semantic category labels that have appeared in the first, second, and third semantic category tendencies. If all three tendencies are different, the set contains three elements; if two tendencies are the same and one is different, the set contains two elements. This set is used as the semantic category filtering condition for the memory bank during the subsequent retrieval in step S560.

[0160] Step S560: For candidate bounding boxes marked as pending, use their deep region response blocks to search again in the updated distributed prototype memory. This search limits the memory to retain only semantic categories that intersect with the three levels of semantic category tendencies. Redetermine the category labels, perform bounding box coordinate fine-tuning and deduplication on the candidate bounding boxes with determined category labels, and output the driving scene perception results.

[0161] For a candidate bounding box marked as pending, the limited semantic category set generated in step S556 is used as the filtering condition. In the deep prototype set of the updated distributed prototype memory, only prototype entries whose semantic category identifiers belong to the limited semantic category set are retained for retrieval. The deep region response blocks of the pending candidate bounding boxes are globally pooled to obtain deep response representation vectors. Cosine similarity is calculated with each prototype entry in the filtered deep prototype set. The semantic category identifier of the prototype entry with the highest cosine similarity is taken as the redefined category label of the pending candidate bounding box. For all candidate bounding boxes with determined category labels, the original coordinates of the candidate bounding boxes are fine-tuned using the coordinate offset output by the bounding box regression branch to obtain the fine-tuned bounding box coordinates. Non-maximum suppression deduplication is performed on all bounding boxes of the same category after fine-tuning. The intersection-union ratio (IU) threshold for deduplication is set according to the settings used during the training of the Region Proposal Network (RPN). Each bounding box retained after deduplication, along with its category label and coordinate information, is output as the final driving scene perception result.

[0162] Figure 3 A hardware entity diagram of a computer system provided as an embodiment of the present invention, such as... Figure 3 As shown, the hardware entity of the computer system 1000 includes a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can run on the processor 1001, and the processor 1001 executes the program to implement the steps in the method of any of the above embodiments.

[0163] The memory 1002 stores computer programs that can run on the processor. The memory 1002 is configured to store instructions and applications that can be executed by the processor 1001. It can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data, and video communication data) of the processor 1001 and various modules in the computer system 1000. It can be implemented by flash memory or random access memory (RAM).

[0164] When the processor 1001 executes the program, it implements any of the steps of the above-mentioned autonomous driving scene perception method based on online continuous cross-domain few-shot learning. The processor 1001 typically controls the overall operation of the computer system 1000.

[0165] This invention provides a computer storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the autonomous driving scene perception method based on online continuous cross-domain few-shot learning as described in any of the above embodiments.

[0166] The above description is merely an embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. An autonomous driving scene perception method based on online continuous cross-domain few-shot learning, characterized in that, include: Construct a source domain perception model that has completed pre-training for source domain driving scenarios and a distributed prototype memory associated with the source domain perception model. The distributed prototype memory stores a set of response distributed prototypes extracted from the intermediate layer of the source domain perception model and indexed by semantic categories. When the driving environment switches from the source domain to the target domain, driving scene image samples collected in the target domain are input into the source domain perception model to perform forward propagation operations, extract the target domain response tensor of the specified intermediate layer, and retrieve the matching source domain response distribution prototypes based on the similarity between the target domain response tensor and each response distribution prototype in the distribution prototype memory, and establish a cross-domain prototype matching association pair composed of the target domain response tensor and the matching source domain response distribution prototype. Based on the cross-domain prototype matching association pair, the parameters of the source domain perception model are frozen, and a synthetic response tensor aligned with the source domain distribution is synthesized through generation processing based on the matched source domain response distribution prototype. Combining the target domain response tensor and the synthetic response tensor, a structured distillation constraint for maintaining the relative relationship of response space between different image samples is calculated to obtain the topology-preserving distillation constraint signal. Guided by the topology-preserving distillation constraint signal, the model weight value adjustment operation is performed on the pre-built target domain perception model. At the same time, the distribution offset between the target domain response tensor and the source domain response distribution prototype is associated through the cross-domain prototype matching. The corresponding source domain response distribution prototype in the distribution prototype memory is re-encoded and written to generate the updated target domain perception model and the updated distribution prototype memory. Using the updated target domain perception model and the updated distributed prototype memory, perceptual inference is performed on newly captured driving scene images in the target domain, and driving scene perception results containing the bounding box coordinates and category labels of the target objects are output.

2. The method according to claim 1, characterized in that, The process involves collecting driving scene image samples in the target domain, inputting these samples into the source domain perception model to perform forward propagation, extracting the target domain response tensor of a specified intermediate layer, and retrieving matching source domain response distribution prototypes based on the similarity between the target domain response tensor and each response distribution prototype in the distribution prototype memory. This process establishes a cross-domain prototype matching association pair consisting of the target domain response tensor and the matching source domain response distribution prototypes, including: The target domain response tensor is divided into non-overlapping channel groups along the channel dimension. Response pattern extraction is performed on each channel group to generate a local response pattern descriptor for each channel group. The local response pattern descriptor records the spatial distribution of response activation within the channel group. For each response distribution prototype in the distributed prototype memory, obtain its pre-stored channel group division method and prototype local pattern descriptor, compare the local response pattern descriptor of each channel group with the prototype local pattern descriptor of the corresponding channel group in terms of morphological matching, and determine whether the spatial distribution pattern recorded by the local response pattern descriptor falls within the acceptable morphological range of the prototype local pattern descriptor. Channel groups that pass the morphological matching comparison are marked as trustworthy channel groups, and channel groups that fail the morphological matching comparison are marked as questionable channel groups. Based on the proportion of trustworthy channel groups in all channel groups and the continuity of spatial coverage, a set of candidate response distribution prototypes that meet the conditions is selected from the distribution prototype memory. For each candidate response distribution prototype in the candidate response distribution prototype set, extract its category center coordinates and distribution range. Query the preset channel group compensation rule library through the local response mode descriptor of the questionable channel group to determine whether the form of the questionable channel group can be adjusted to the acceptable form range of the corresponding prototype local mode descriptor through compensation rules. The candidate response distribution prototypes that can be compensated for the questionable channel group are retained, and the candidate response distribution prototypes that cannot be compensated are removed to obtain a set of matching response distribution prototypes. From the set of matching response distribution prototypes, the one that is most consistent with the spatial coverage continuity of the trusted channel group is selected as the matching source domain response distribution prototype. The category center coordinates, distribution range, and channel group division records of the target domain response tensor of the matched source domain response distribution prototype are combined to obtain cross-domain prototype matching association pairs.

3. The method according to claim 2, characterized in that, The step of dividing the target domain response tensor into non-overlapping channel groups along the channel dimension, performing response pattern extraction on each channel group, and generating local response pattern descriptors corresponding to each channel group includes: Obtain the total number of channels of the target domain response tensor, divide the channel dimension into several groups according to the channel group segmentation granularity uniformly agreed in the distribution prototype memory, each group contains the same number of continuous channels, and record the starting channel index and ending channel index of each channel group to obtain the channel group segmentation record; For each channel group, the response values ​​of all channels in the group are subjected to threshold binarization transformation in spatial location. The spatial locations where the response values ​​are in the preset activation range are marked as activation points, and the remaining locations are marked as silent points, thus generating a binary activation map for the channel group. Connectivity labeling is performed on the binary activation graph to identify the independent connected regions formed by all activation points. The contour coordinate chain of each connected region is extracted, and the region area and the direction angle of the major axis of the region are determined according to the contour coordinate chain as the morphological attributes of the connected region. The morphological attributes of all connected regions in each channel group are sorted according to the centroid position of the connected regions in space to obtain a connected region sequence. The spatial interval distance and directional relationship between adjacent connected regions in the connected region sequence are encoded to obtain a connected region context relationship code. The morphological attributes of each connected region in the connected region sequence are combined with the connected region context relation code to generate the local response mode descriptor of the channel group; the local response mode descriptors of all channel groups are stored together with the channel group partitioning record.

4. The method according to claim 3, characterized in that, The step of combining the morphological attributes of each connected region in the connected region sequence with the connected region context relation code to generate a local response mode descriptor for the channel group includes: For the connected region sequence, the contour coordinate chain of each connected region is extracted in sequence, the contour coordinate chain is converted into a relative coordinate sequence with the centroid of the connected region as the origin, and the orientation is normalized to obtain a contour shape chain code that is independent of rotation. For each connected region, its area is compared with the total area of ​​the binary activation map. Based on the comparison result, a size description item is determined, and its major axis direction angle is mapped to the corresponding sector number in the preset direction sector. The outline shape chain code, size description item and direction sector number are combined into a morphological description triplet of the connected region, replacing the original morphological attributes in the connected region sequence; For adjacent connected regions in the connected region sequence, determine the orientation and spacing distance of the centroid of the next connected region relative to the centroid of the previous connected region, map the orientation to the sector number in the preset direction sector, and map the spacing distance to the distance level identifier according to the preset distance interval, and generate a spatial transition code for adjacent connected regions. For each pair of adjacent connected regions in the connected region sequence, a spatial transition code is generated, and all spatial transition codes are connected in sequence to obtain the connected region context relation code. The morphological description triplet of each connected region in the connected region sequence is combined with the connected region context relation code in sequence to generate the local response mode descriptor of the channel group.

5. The method according to claim 1, characterized in that, The process involves freezing the parameters of the source domain perception model based on the cross-domain prototype matching association pair, and synthesizing a synthetic response tensor aligned with the source domain distribution through generation processing conditioned on the matched source domain response distribution prototype. Combining the target domain response tensor with the synthetic response tensor, a structured distillation constraint for maintaining the relative relationship of response space between different image samples is calculated to obtain a topology-preserving distillation constraint signal, including: Mark all trainable parameters of the source domain perception model as read-only to complete parameter freezing; The target domain response tensor is divided into regions along the spatial dimension to obtain several non-overlapping spatial response blocks. The distribution contour of the response value in each spatial response block in the channel dimension is extracted. Spatial response blocks with consistent distribution contours are grouped into homogeneous block groups. A spatial homogeneous topological skeleton is constructed based on the spatial adjacency relationship of the homogeneous block groups. The spatial homogeneous topological skeleton consists of the adjacent nodes and connecting edges of the block groups. The class center coordinates are extracted from the matched source domain response distribution prototype as conditions, and the conditional response generator is called to map the class center coordinates into a synthetic response tensor. The conditional response generator is a network whose parameters are fixed during the source domain pre-training stage. For each node in the spatial homogeneous topological skeleton, the local response distribution sequence of the spatial response block corresponding to the node in the target domain response tensor is extracted. At the same time, the synthetic local response distribution sequence of the spatial response block at the corresponding position in the synthetic response tensor is extracted. The local response distribution sequence and the synthetic local response distribution sequence are aligned in terms of distribution shape to generate a node-level distribution shape offset description. The distribution morphology offset description of each node is transmitted along the connecting edges of the spatial homogeneous topological skeleton. The topological adjacency relationship between the connecting edges of adjacent nodes is used to spread the distribution morphology offset description, so that the distribution morphology offset description of each node is updated into a topology-aware offset description after absorbing the offset information of the adjacent nodes. The topology-aware offset descriptions of all nodes in the spatially homogeneous topological skeleton are restored to tensor form of the same size as the target domain response tensor according to their original spatial positions, and used as topology-preserving distillation constraint signals.

6. The method according to claim 5, characterized in that, The process involves dividing the target domain response tensor along spatial dimensions to obtain several non-overlapping spatial response blocks. The distribution contour of the response values ​​within each spatial response block along the channel dimension is extracted. Spatial response blocks with consistent distribution contours are grouped into homogeneous block groups. A spatial homogeneous topological skeleton is constructed based on the spatial adjacency relationships of these homogeneous block groups, including: The target domain response tensor is uniformly divided according to a preset spatial grid. All channel response values ​​in each grid cell are taken as a spatial response block to obtain a set of spatial response blocks. Each spatial response block retains its spatial row and column index in the original tensor. For each spatial response block, traverse the response values ​​of each channel in the block at all spatial locations, calculate the median position and the distribution span of the response values ​​of each channel, and use the median position and the distribution span of the response values ​​of all channels as the channel distribution profile of the spatial response block. For any two spatial response blocks in the set of spatial response blocks, the channel distribution contours of the two are compared channel by channel. When the difference in the median position of the response value and the difference in the dispersion span of the response value both fall within the preset homogeneity judgment interval, the two spatial response blocks are classified into the same homogeneous block group, resulting in several homogeneous block groups. For each homogeneous block group, determine the spatial row and column index range covered by the homogeneous block group, and calculate the average state of the channel distribution profile of all spatial response blocks within the coverage range of the homogeneous block group as the group-level distribution profile of the homogeneous block group. Each homogeneous block group is treated as a node in the spatial homogeneous topological skeleton. The node group is given a distribution profile and the spatial row and column index range it covers. If two homogeneous block groups have adjacent or intersecting row and column index ranges in space, a connection edge is established between the two corresponding nodes, and a spatial adjacency type mark is added to the connection edge. By combining the nodes corresponding to all homogeneous block groups with all connecting edges, a spatial homogeneous topological skeleton is obtained.

7. The method according to claim 5, characterized in that, For each node in the spatially homogeneous topological skeleton, the local response distribution sequence of the corresponding spatial response block in the target domain response tensor is extracted. Simultaneously, the synthetic local response distribution sequence at the corresponding position of the spatial response block in the synthetic response tensor is extracted. The local response distribution sequences and the synthetic local response distribution sequences are aligned in terms of distribution morphology to generate a node-level distribution morphology offset description, including: For each node in the spatial homogeneous topological skeleton, based on the spatial row and column index range covered by the node, the response data of the corresponding region is extracted from the target domain response tensor, the response data is expanded along the channel dimension and sorted by the channel index to obtain the local response distribution sequence; For the spatial row and column index range covered by the same node, the response data of the corresponding region is extracted from the synthetic response tensor, the response data is expanded along the channel dimension and sorted by the channel index to obtain the synthetic local response distribution sequence. The local response distribution sequence is divided into several response segments, each containing response values ​​from several consecutive channels. The peak position and attenuation trend of each response segment are extracted to form the morphological marker of that response segment. The morphological markers of all response segments constitute the target domain morphological marker sequence. The synthetic local response distribution sequence is divided into segments in the same way as the local response distribution sequence. The peak position and attenuation trend of each response segment are extracted to form a synthetic domain morphological labeling sequence. The target domain morphological marker sequence and the synthetic domain morphological marker sequence are compared segment by segment according to the response segment order. When the target domain morphological marker and the synthetic domain morphological marker are inconsistent in the segment peak position, the segment peak position offset is recorded; when they are inconsistent in the segment decay trend, the segment decay trend offset is recorded; the segment peak position offset and the segment decay trend offset are used together as the morphological offset description of the response segment. By summarizing the peak position offset and attenuation trend offset of all segments within the same node, the distribution pattern offset description of that node can be obtained.

8. The method according to claim 1, characterized in that, Guided by the topology-preserving distillation constraint signal, the pre-built target domain perception model is adjusted in terms of model weights. Simultaneously, the distribution offset between the target domain response tensor and the source domain response distribution prototype is correlated through cross-domain prototype matching. The corresponding source domain response distribution prototype in the distribution prototype memory is then re-encoded and written to generate an updated target domain perception model and an updated distribution prototype memory. This includes: The adjustment instruction for each spatial location is separated from the topology-preserving distillation constraint signal. The adjustment instruction is injected into the network layer corresponding to the receptive field of the spatial location in the pre-built target domain perception model. The adjustment signal is transmitted along the reverse path of the network, and the weight values ​​of each layer are updated during the transmission process. When updating the weight values ​​of each layer, a weight update history table is maintained. The weight update history table records the update direction mark of each weight position in consecutive update steps. When the direction mark of the current update step is consistent with the direction mark of the previous update step, the original update amount is maintained. When the direction marks are opposite, the original update amount is reduced. Semantic category labels corresponding to the source domain response distribution prototypes matched from the cross-domain prototype matching association pairs are obtained. Category supervision signals are generated using these semantic category labels. The category supervision signals and adjustment signals are then bound together at the channel level and participate in the weight value update. Extract the range deviation description between the distribution range of each channel response value of the target domain response tensor and the distribution scattering range of the matched source domain response distribution prototype from the cross-domain prototype matching association pair, and convert the range deviation description into prototype recoding instructions. In the distributed prototype memory, locate the response distribution prototypes that have the same semantic category as the matched source domain response distribution prototypes and whose distribution ranges overlap. Synchronously modify the distribution range boundaries of these response distribution prototypes according to the prototype recoding instruction, so that the boundaries of the overlapping regions contract or expand in tandem. The modified distributed prototype memory is re-indexed for consistency. Once the consistency check is passed, an updated target domain-aware model and an updated distributed prototype memory are generated.

9. The method according to claim 8, characterized in that, The step of separating the adjustment instruction for each spatial location from the topology-preserving distillation constraint signal, injecting the adjustment instruction into the network layer corresponding to the receptive field of the pre-built target domain perception model, and propagating the adjustment signal along the reverse path of the network, while updating the weight values ​​of each layer during the propagation process, includes: The adjustment instructions corresponding to each spatial position are parsed from the topology-preserving distillation constraint signal. Based on the spatial position index carried by the adjustment instructions and the receptive field backtracking relationship of each intermediate layer of the target domain perception model, the target intermediate layer to which the adjustment instructions are bound and the local response coordinates in that layer are determined. All adjustment instructions bound to the same target intermediate layer are arranged according to local response coordinates to generate an adjustment demand distribution map of the target intermediate layer. The adjustment demand distribution map marks the channel range that needs to be adjusted and the polarity requirement of the adjustment direction in a position-by-position manner. Traverse each position in the adjustment demand distribution map that requires intervention, and classify the weighted connection corresponding to the position into the active set or the temporarily silent set according to the polarity requirement of the adjustment direction. The weighted connection in the active set maintains the response transmission function in subsequent iterations, and the weighted connection in the temporarily silent set is bypassed in subsequent iterations. For the convolution kernel region in the target intermediate layer that contains weight connections from both the active set and the temporarily silent set, perform weight connection rearrangement within the convolution kernel. Move the weight connections belonging to the active set towards the center of the receptive field of the convolution kernel, and move the weight connections belonging to the temporarily silent set towards the edge of the receptive field, while keeping the relative spatial order of the weight connections within the same set unchanged. The target intermediate layer after weighted connection rearrangement is connected and adapted to the adjacent unrearranged layers. The weighted connection positions in the adjacent layers that have connections with the rearranged region are adjusted so that the connection paths between the front and back layers maintain spatial correspondence. Using a limited number of driving scene image samples collected from the target domain, the response consistency of the target domain perception model after weighted connection rearrangement and connection adaptation is verified. When the difference between the forward response obtained from the verification and the distribution of the corresponding prototype in the distributed prototype memory is within a preset acceptable range, the weight value update is completed. The description of the range deviation between the distribution range of each channel response value of the target domain response tensor extracted from the cross-domain prototype matching association pair and the distribution scattering range of the matched source domain response distribution prototype, and the conversion of the range deviation description into prototype recoding instructions, includes: Extract the target domain response tensor after distribution normalization from the cross-domain prototype matching association pair, obtain the distribution density profile of the channel response value at all spatial locations for each channel, take the extended boundary of the distribution density profile as the single channel distribution range of the target domain, and gather the single channel distribution ranges of the target domain of all channels to form a set of target domain distribution ranges. Extract the single-channel distribution range of the source domain from the distribution scattering range of the matched source domain response distribution prototype, and perform boundary alignment comparison between the single-channel distribution range of the source domain of all channels and the single-channel distribution range of the target domain of the corresponding channel in the target domain distribution range set. Record the overflow channels and their overflow boundary segments where the single-channel distribution range of the target domain exceeds the single-channel distribution range of the source domain. For each overflow channel, the distribution pattern of response values ​​within its overflow boundary section is analyzed. The distribution pattern of response values ​​is decomposed into a concentrated area, a transition area, and a tailing area. The proportion and interval position of each area within the channel are obtained as overflow pattern decomposition information. Based on the overflow morphology decomposition information, determine the direction and extent of expansion required for the single-channel distribution range of the source domain corresponding to the overflow channel. Encode the expansion direction and extent as a single-channel adjustment segment of the overflow channel. The single-channel adjustment segments of all overflow channels form a channel-level adjustment segment set. Obtain the coupling constraint relationship between each channel in the matched source domain response distribution prototype. When the expansion amplitude indicated by the single-channel adjustment segment of a certain overflow channel violates the coupling constraint relationship between the overflow channel and the adjacent channel, a follow-up adjustment segment is also generated for the single-channel distribution range of the adjacent channel, and the follow-up adjustment segment is merged into the channel-level adjustment segment set. The channel-level adjustment fragment set is packaged with the semantic category identifier of the matched source domain response distribution prototype to generate a prototype recoding instruction.

10. A computer system comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 9.