Feature generation method, apparatus, device, medium, and product
By combining a hierarchical structure with a pre-defined generation model, the problems of detail loss and insufficient output control in existing feature generation methods are solved, achieving efficient utilization and precise and controllable generation of multi-scale features, and improving feature representation ability and task adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2026-01-28
- Publication Date
- 2026-06-02
AI Technical Summary
Existing feature generation methods are prone to losing key details in fine-grained recognition or small target detection, and lack flexible control over the content and quantity of output features, making it difficult to adapt to diverse downstream task requirements.
A multi-level feature matrix is obtained through a hierarchical feature extraction model, and each level of feature matrix is processed using a progressively advanced pre-defined generation model. The generation process is constrained by pre-defined qualifiers, thereby achieving multi-scale feature fusion and controllable generation of output features.
It significantly improves the richness and discriminative power of feature representation, enhances the versatility and information utilization efficiency of feature generation methods, and can seamlessly connect to various downstream tasks.
Smart Images

Figure CN122135128A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer vision and deep learning technology, and in particular to a feature generation method, apparatus, device, medium and product. Background Technology
[0002] In recent years, deep learning-based visual feature extraction techniques have made significant progress. Among them, the hierarchical visual Transformer model, represented by the Shifted Window Transformer (Swin Transformer), can extract multi-scale and multi-level feature representations from input image data by introducing a windowed self-attention mechanism and a patch merging structure.
[0003] In existing technologies, the Swin Transformer comprises four sequentially connected layers. Each layer is used to capture rich information from local details to global semantics, and it has been widely applied to downstream tasks such as image classification, object detection, and semantic segmentation. To improve feature utilization efficiency, existing solutions typically introduce learnable post-processing modules at the end of the backbone network (such as the output of the last layer). For example, a lightweight attention network is used to assign weights to each feature channel, and a Top-K selection strategy (i.e., retaining the top K feature elements with the highest confidence) is employed to filter the final features, thereby generating more discriminative fused features.
[0004] However, existing feature generation methods have low feature utilization rates, are prone to losing key details in scenarios such as fine-grained recognition or small target detection, and lack flexible control over the content and quantity of output features. Summary of the Invention
[0005] This application provides a feature generation method, apparatus, device, medium, and product, which obtains multi-level feature matrices through a hierarchical feature extraction model and processes the feature matrices at each level through multiple preset generation models that are progressively advanced. The generation process of the preset generation model corresponding to each level is constrained by corresponding preset qualifiers, thereby realizing multi-scale feature fusion and controllable generation of output features.
[0006] Firstly, this application provides a feature generation method, which includes:
[0007] Obtain the data to be processed;
[0008] The data to be processed is input into a hierarchical feature extraction model. Features are extracted layer by layer through each level and multiple corresponding feature matrices are output. The hierarchical feature extraction model includes multiple sequentially connected levels.
[0009] The first feature matrix output from the first level is input into the first preset generation model, and the first preset generation model generates a first feature representation that conforms to the preset content and preset quantity according to the corresponding preset qualifiers.
[0010] For each subsequent level, the feature representation generated by the previous level and the feature matrix output by the current level are input together into the corresponding preset generation model. The preset generation model generates the current feature representation that conforms to the preset content and preset number based on the corresponding preset qualifiers.
[0011] The feature representation generated at the last level is determined as the fused feature, and the fused feature is output.
[0012] In one possible implementation, the feature representation generated by the previous level and the feature matrix output by the current level are jointly input into the corresponding preset generation model, including:
[0013] The feature representation generated in the previous level is transformed in dimension to align with the channel dimension of the feature matrix output in the current level, thus obtaining the aligned feature representation of the previous level.
[0014] The aligned feature representation of the previous level is combined with the feature matrix output of the current level and used as the input of the corresponding preset generative model.
[0015] In one possible implementation, the feature representation generated in the previous level is dimensionally transformed to align with the channel dimensions of the feature matrix output in the current level, resulting in the aligned feature representation of the previous level, including:
[0016] Obtain the channel dimension of the feature representation generated by the previous level and the channel dimension of the feature matrix output by the current level;
[0017] If the channel dimension of the feature representation generated in the previous level is inconsistent with the channel dimension of the feature matrix output in the current level, then a linear mapping is performed on the feature representation generated in the previous level to adjust the channel dimension of the feature representation generated in the previous level to be the same as the channel dimension of the feature matrix output in the current level, thus obtaining the aligned feature representation of the previous level.
[0018] In one possible implementation, after obtaining the channel dimensions of the feature representation generated by the previous level and the channel dimensions of the feature matrix output by the current level, the method further includes:
[0019] If the channel dimension of the feature representation generated in the previous level is the same as the channel dimension of the feature matrix output in the current level, then the feature representation generated in the previous level will be used as the aligned feature representation of the previous level.
[0020] In one possible implementation, the data to be processed is input into a hierarchical feature extraction model, including:
[0021] Data augmentation is performed on the data to be processed to obtain augmented data. Data augmentation includes at least one of random cropping, color dithering, or image flipping.
[0022] The enhanced data is then input into a hierarchical feature extraction model.
[0023] In one possible implementation, after outputting the fused features, the following is also included:
[0024] Obtain the real labels corresponding to the data to be processed;
[0025] Calculate the loss function for downstream tasks based on the fusion features and the real labels;
[0026] The parameters of the hierarchical feature extraction model and each preset generation model are updated based on the loss function.
[0027] Secondly, this application provides a feature generation apparatus, the apparatus comprising:
[0028] The acquisition module is used to acquire data to be processed.
[0029] The data processing module is used to input the data to be processed into the hierarchical feature extraction model, extract features layer by layer and output multiple corresponding feature matrices. The hierarchical feature extraction model includes multiple sequentially connected layers.
[0030] The data processing module is also used to input the first feature matrix output from the first level into the first preset generation model, and the first preset generation model generates a first feature representation that conforms to the preset content and preset quantity according to the corresponding preset qualifiers;
[0031] The data processing module is also used to input the feature representation generated by the previous level and the feature matrix output by the current level into the corresponding preset generation model for each subsequent level. The preset generation model generates the current feature representation that conforms to the preset content and preset number based on the corresponding preset qualifiers.
[0032] The feature output module is used to determine the feature representation generated in the last level as the fused feature and output the fused feature.
[0033] In one possible implementation, the data processing module is further configured to perform a dimensional transformation on the feature representation generated in the previous level, so that it is aligned with the channel dimension of the feature matrix output in the current level, thereby obtaining the aligned feature representation of the previous level.
[0034] The data processing module is also used to combine the aligned feature representation of the previous level with the feature matrix output of the current level as input to the corresponding preset generation model.
[0035] In one possible implementation, the data processing module is further configured to obtain the channel dimension of the feature representation generated in the previous level and the channel dimension of the feature matrix output in the current level.
[0036] The data processing module is also used to perform linear mapping on the feature representation generated in the previous level if the channel dimension of the feature representation generated in the previous level is inconsistent with the channel dimension of the feature matrix output in the current level, so as to adjust the channel dimension of the feature representation generated in the previous level to be the same as the channel dimension of the feature matrix output in the current level, and obtain the aligned feature representation of the previous level.
[0037] In one possible implementation, the data processing module is further configured to use the feature representation generated in the previous level as the aligned feature representation of the previous level if the channel dimension of the feature representation generated in the previous level is consistent with the channel dimension of the feature matrix output in the current level.
[0038] In one possible implementation, the data processing module is further configured to perform data augmentation on the data to be processed to obtain augmented data. The data augmentation includes at least one of random cropping, color dithering, or image flipping.
[0039] The data processing module is also used to input the enhanced data into the hierarchical feature extraction model.
[0040] In one possible implementation, the device further includes: a model update module;
[0041] The model update module is used to obtain the real labels corresponding to the data to be processed;
[0042] The model update module is also used to calculate the loss function for downstream tasks based on the fused features and the real labels;
[0043] The model update module is also used to update the parameters of the hierarchical feature extraction model and each preset generation model according to the loss function.
[0044] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor.
[0045] The memory stores the instructions that the computer executes.
[0046] The processor executes computer execution instructions stored in memory to implement a feature generation method according to the first aspect of the invention.
[0047] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement a feature generation method according to the first aspect of the invention.
[0048] Fifthly, this application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement a feature generation method according to the first aspect of the invention.
[0049] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0050] This application provides a feature generation method, apparatus, device, medium, and product, comprising: first, acquiring data to be processed; then, inputting the data to be processed into a hierarchical feature extraction model, extracting features layer by layer and outputting multiple corresponding feature matrices, wherein the hierarchical feature extraction model includes multiple sequentially connected layers; next, inputting the first feature matrix output from the first layer into a first preset generation model, wherein the first preset generation model generates a first feature representation conforming to preset content and preset quantity based on corresponding preset qualifiers; then, for each subsequent layer, inputting the feature representation generated by the previous layer and the feature matrix output by the current layer into the corresponding preset generation model, wherein the preset generation model generates a current feature representation conforming to preset content and preset quantity based on corresponding preset qualifiers; finally, determining the feature representation generated by the last layer as the fused feature and outputting the fused feature. The following technical effects were achieved: By progressively inputting the feature representations generated in the previous layer and the feature matrix of the current layer into the corresponding preset generation model, full-scale visual information from low-level local details (such as texture and edges) to high-level global semantics (such as object category and scene context) was effectively integrated. This overcame the information loss problem caused by traditional methods relying solely on the last layer of features, significantly improving the richness and discriminative power of feature representation. By leveraging preset qualifiers (such as natural language instructions or structured prompts) that correspond one-to-one with the preset generation models at each level, the semantic content, vector dimension, and number of elements of the output features were explicitly constrained, making the generation process task-oriented and format customizable. This solved the shortcomings of existing feature fusion generation methods, which lack output control and are difficult to adapt to diverse downstream task requirements. Thus, through hierarchical progressive fusion and qualifier control, efficient utilization of multi-scale features and precise and controllable generation of output features were achieved, significantly improving feature representation capabilities, task adaptability, and information utilization efficiency. The generated fusion features not only contain multi-level semantics, but their structure and content can also be flexibly adjusted according to the corresponding preset qualifiers. They can be seamlessly connected to various downstream tasks such as image classification, object detection, instance segmentation, and image and text retrieval without the need to redesign feature post-processing modules for different tasks, thus improving the versatility of the feature generation method. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0053] Figure 1 A flowchart illustrating a feature generation method provided in this application embodiment. Figure 1 ;
[0054] Figure 2 This is a schematic diagram of the system architecture of a feature generation method provided in an embodiment of this application;
[0055] Figure 3 A flowchart illustrating a feature generation method provided in this application embodiment. Figure 2 ;
[0056] Figure 4 A flowchart illustrating a feature generation method provided in this application embodiment. Figure 3 ;
[0057] Figure 5 This is a schematic diagram of the structure of a feature generation device provided in an embodiment of this application;
[0058] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0059] Figure label:
[0060] 510 - Acquisition module; 520 - Data processing module; 530 - Feature output module; 610 - Processor; 620 - Memory; 630 - Communication component; 640 - Bus. Detailed Implementation
[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0062] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply difference. It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other embodiments or design schemes. Specifically, the use of "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner. In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more.
[0063] It should be noted that the phrase "at...time" in the embodiments of this application can refer to the instant at which a certain situation occurs, or to a period of time after the occurrence of a certain situation; the embodiments of this application do not specifically limit this. Furthermore, the feature generation method provided in the embodiments of this application is merely an example; a feature generation method may include more or fewer elements.
[0064] In recent years, deep learning-based visual feature extraction technology has developed rapidly and achieved remarkable progress. Among the many related models, the hierarchical visual Transformer model, represented by the Swin Transformer, stands out. With its unique windowed self-attention mechanism and progressive downsampling structure, the Swin Transformer has the ability to efficiently extract multi-scale, multi-level feature representations from input image data.
[0065] Typically, the Swin Transformer comprises four sequentially connected layers, each outputting a feature matrix with different spatial resolutions and levels of semantic abstraction. For example, the first layer captures local texture and edge details, the second and third layers encode part structure and contextual relationships, and the fourth layer focuses on global semantic information. This multi-scale characteristic enables it to exhibit excellent performance in downstream vision tasks such as image classification, object detection, and semantic segmentation.
[0066] To improve feature utilization efficiency, existing techniques typically introduce a learnable post-processing module at the output of the fourth layer. A lightweight network is used to assign weights to each feature channel, and the Top-K most important features are retained based on confidence level.
[0067] However, the above methods have significant drawbacks. On the one hand, relying solely on the high-level semantic features of the last layer completely ignores the rich low- and mid-level information contained in the first to third layers, resulting in low feature utilization and a tendency to lose crucial details in scenarios such as fine-grained recognition or small object detection. On the other hand, existing fusion mechanisms (such as weighting, concatenation, or Top-K filtering) lack explicit control over the content and quantity of output features. The generated feature format is implicitly determined by the SwinTransformer, making it difficult to adapt to the specific constraints of different downstream tasks on feature structures (such as requiring a fixed number of object descriptions or limiting vector dimensions), thus limiting the flexibility and generalization ability of the SwinTransformer.
[0068] Based on this, embodiments of this application propose a feature generation method, apparatus, device, medium, and product, which can be used in the fields of computer vision and deep learning technology, aiming to solve the above-mentioned technical problems of the prior art. A hierarchical feature extraction model is used to extract features from the data to be processed at multiple levels, obtaining feature matrices output at each level. A series of preset generation models are then used to progressively process the feature matrices output at each level, where each preset generation model explicitly constrains the generation process according to its corresponding preset qualifier. This effectively integrates full-scale features from local details to global semantics, improving feature utilization and achieving precise control over the content and quantity of fused features, significantly enhancing feature expressive power, task adaptability, and information utilization efficiency.
[0069] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0070] Figure 1 A flowchart illustrating a feature generation method provided in this application embodiment. Figure 1 The execution subject of this embodiment can be a data processing server or other devices with data processing capabilities, such as laptops, personal computers, tablets, etc. The data processing server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server, etc., without specific limitations. For ease of description, this application embodiment uniformly describes the execution subject of a feature generation method as a server. For example... Figure 1 As shown, the method includes:
[0071] S101. Obtain the data to be processed.
[0072] Specifically, the data to be processed is the raw image to be processed, such as a red-green-blue (RGB) format digital image from user uploads, camera captures, or database retrieval. The original size of the image may vary (e.g., 640 pixels × 480 pixels, 1920 pixels × 1080 pixels, 224 pixels × 224 pixels, etc.), and its content may include natural scenes, faces, medical images, remote sensing images, or industrial inspection objects, etc.
[0073] Specifically, the server can obtain the data to be processed from a data source. Data sources can be diverse; for example, in image recognition tasks, the data source could be an image database, and the data to be processed could be image files in various formats. The method of obtaining the data to be processed can be achieved through data reading interfaces, etc., depending on the type and storage method of the data source.
[0074] S102. Input the data to be processed into the hierarchical feature extraction model, extract features layer by layer and output the corresponding multiple feature matrices.
[0075] In this embodiment, the hierarchical feature extraction model includes multiple sequentially connected layers.
[0076] Specifically, the server first performs center cropping or aspect ratio-preserving scaling on the original image to align its short side with the target size. Then, the image is padded or cropped to a fixed resolution of 224 pixels × 224 pixels to conform to the input specifications of mainstream visual backbone networks. This size is the standard input specification for large-scale visual benchmark tasks such as ImageNet, which is beneficial for model compatibility and performance stability. The preprocessed image can then be used as standardized input for subsequent feature extraction.
[0077] The feature extraction model with a hierarchical structure can adopt the Swin Transformer model, which contains four sequentially connected layers (the first to the fourth layer). Each layer can achieve multi-scale feature extraction through windowed self-attention mechanism and Patch Merging operation.
[0078] Specifically, the first layer can receive the preprocessed image and divide the 224-pixel × 224-pixel input image into non-overlapping 4-pixel × 4-pixel image blocks (a total of 56 × 56 blocks). Each image block can be linearly embedded and mapped into a 96-dimensional vector, and then processed by several Swing Transformer Blocks to output a first feature matrix with a spatial resolution of 56 × 56 and 96 channels.
[0079] The second layer can perform a patch merging operation on the first feature matrix output by the first layer. Specifically, it concatenates the feature vectors corresponding to every 2×2 adjacent feature positions in the first feature matrix to obtain a first merged vector with four times the channel dimension. Then, it compresses the channel dimension of the first merged vector to 192 through a learnable linear mapping layer, thereby generating a second feature matrix with a spatial resolution of 28×28 and 192 channels.
[0080] The third and fourth levels follow the same pattern, outputting third and fourth feature matrices of 14×14×384 and 7×7×768 respectively. Specifically, the third level performs a patch merging operation on the second feature matrix output by the second level. This includes concatenating the feature vectors corresponding to every 2×2 adjacent feature positions in the second feature matrix to obtain a second merged vector with four times the channel dimension. Subsequently, a learnable linear mapping layer is used to compress the channel dimension of the second merged vector to 384, thereby generating a third feature matrix with a spatial resolution of 14×14 and 384 channels.
[0081] The fourth layer can perform a patch merging operation on the third feature matrix output by the third layer. Specifically, it concatenates the feature vectors corresponding to every 2×2 adjacent feature positions in the third feature matrix to obtain a third merged vector with four times the channel dimension. Then, it compresses the channel dimension of the third merged vector to 768 through a learnable linear mapping layer, thereby generating a fourth feature matrix with a spatial resolution of 7×7 and 768 channels.
[0082] The feature matrices corresponding to each level can collectively form a multi-scale feature representation from local details to global semantics. That is, the four feature matrices mentioned above can capture multi-level visual information from local texture details (first level) to component structure (second and third levels) and then to global semantics (fourth level), forming a complete multi-scale feature representation system.
[0083] S103. Input the first feature matrix output from the first level into the first preset generation model, and the first preset generation model generates a first feature representation that conforms to the preset content and preset quantity according to the corresponding preset qualifiers.
[0084] Specifically, the first pre-defined generative model can be a generative network based on a Large Language Model (LLM) architecture. Before input, the first feature matrix can be flattened and projected into a sequence of text embeddings (e.g., through a learnable linear mapping layer).
[0085] The corresponding preset qualifiers can be natural language instructions, used to specify the semantic content and number of elements of the output. For example, it can instruct the first preset generation model to generate a 5-dimensional semantic embedding vector, or a structured sequence containing 5 keywords. Specifically, it can be in the form of: "Please describe the local texture details in the image and output 5 keywords".
[0086] The first pre-defined generative model can receive the first feature matrix after flattening and linear projection as the input embedding sequence, and combine it with the corresponding pre-defined qualifiers to generate a structured first feature representation. For example, a vector sequence containing 5 keywords, or a 5-dimensional semantic embedding vector.
[0087] Figure 2 This is a schematic diagram of the system architecture of a feature generation method provided in an embodiment of this application. Figure 2 As shown, the system architecture of this method includes a hierarchical feature extraction model and four preset generation models. The hierarchical feature extraction model consists of four sequentially connected layers: a first layer, a second layer, a third layer, and a fourth layer. The four preset generation models are the first preset generation model, the second preset generation model, the third preset generation model, and the fourth preset generation model.
[0088] S104. For each subsequent level, the feature representation generated by the previous level and the feature matrix output by the current level are input together into the corresponding preset generation model. The preset generation model generates the current feature representation that conforms to the preset content and preset number based on the corresponding preset qualifiers.
[0089] Specifically, the second level can align the first feature representation (such as a 5-dimensional vector) output in step S103 with the second feature matrix (28×28×192) output in the second level by channel dimension alignment (e.g., expanding the 5-dimensional matrix to 192-dimensional matrix through 1×1 convolution), then concatenate or add them to form a joint input, and input it into the second preset generation model.
[0090] The preset qualifier for the second preset generation model can be: "Generate descriptions of 3 object components based on local details and mid-level structural information".
[0091] The second preset generation model can generate a second feature representation containing three component names (such as wheels, windows, and doors) based on the corresponding preset qualifiers.
[0092] Similarly, the third and fourth levels can use qualifiers such as "describe scene context" and "summarize overall semantic category" to generate more abstract and higher-level feature representations layer by layer. Specifically, the third level can align the channel dimensions of the second feature representation output by the second preset generation model (such as a structured vector containing three component names, which is 384-dimensional after embedding) with the third feature matrix (14×14×384) output by the third level (for example, by adjusting the dimension of the second feature representation to 384 dimensions through 1×1 convolution or linear projection), and then form a joint input by concatenation or element-wise addition, and feed it into the third preset generation model.
[0093] The preset qualifier for the third preset generation model can be: "Based on component composition and spatial layout, describe the context information of the current scene".
[0094] The third preset generation model can generate a third feature representation that conforms to the preset content and quantity based on the corresponding preset qualifiers. For example, it can output a structured vector containing two scene context descriptions, such as "city street" and "busy traffic during the day".
[0095] The fourth layer can align the third feature representation (such as a 2D scene description vector, which becomes 768-dimensional after embedding) output by the third preset generative model with the fourth feature matrix (7×7×768) output by the fourth layer in terms of channel dimensions (e.g., by extending it to 768 dimensions through a learnable linear mapping layer). Then, it forms a joint input by concatenation or attention-weighted fusion and inputs it into the fourth preset generative model.
[0096] The preset qualifier for the fourth preset generation model can be: "Combining all visual cues to summarize the overall semantic category of the image".
[0097] The fourth preset generation model can generate the final fourth feature representation based on the corresponding preset qualifiers. For example, it can output a structured result containing a global category label and its confidence, such as "car, confidence 0.96", or a 1000-dimensional ImageNet classification score (logits) vector.
[0098] S105. Determine the feature representation generated at the last level as the fused feature and output the fused feature.
[0099] Specifically, the fourth feature representation generated at the fourth level (e.g., a structured output containing one global category label and its corresponding confidence level) is determined as the final fused feature. This fused feature incorporates full-scale information from the first to the fourth level and strictly adheres to the constraints on content and quantity imposed by the preset qualifiers corresponding to each level.
[0100] The fused features can be directly used for downstream tasks, such as inputting them into a classification head to complete image classification; serving as prompts to guide object detection models to locate regions of interest; and performing cross-modal alignment with text queries to support image-text retrieval.
[0101] Optionally, during the training phase, the server can also obtain the real labels (such as category labels and bounding boxes) corresponding to the data to be processed, calculate the loss function (such as cross-entropy loss or contrastive loss) based on the fused features and the real labels, and jointly optimize the parameters of the hierarchical feature extraction model and each preset generation model accordingly to achieve end-to-end training.
[0102] Through the above implementation methods, this embodiment not only makes full use of the multi-scale features of the hierarchical feature extraction model, but also achieves precise control over the content, dimension and number of the output fused features through the corresponding preset qualifier-driven generation mechanism, which significantly improves the expressive power and task adaptability of the features.
[0103] This embodiment provides a feature generation method. First, data to be processed is acquired. Then, the data to be processed is input into a hierarchical feature extraction model, which extracts features layer by layer and outputs multiple corresponding feature matrices. The hierarchical feature extraction model includes multiple sequentially connected layers. Next, the first feature matrix output from the first layer is input into a first preset generation model, which generates a first feature representation that conforms to preset content and preset quantity based on the corresponding preset qualifiers. Then, for each subsequent layer, the feature representation generated by the previous layer and the feature matrix output by the current layer are input into the corresponding preset generation model, which generates a current feature representation that conforms to preset content and preset quantity based on the corresponding preset qualifiers. Finally, the feature representation generated by the last layer is determined as the fused feature, and the fused feature is output.
[0104] The following technical effects were achieved: By progressively inputting the feature representations generated in the previous layer and the feature matrix of the current layer into the corresponding preset generation model, full-scale visual information from low-level local details (such as texture and edges) to high-level global semantics (such as object category and scene context) was effectively integrated. This overcame the information loss problem caused by traditional methods relying solely on the last layer of features, significantly improving the richness and discriminative power of feature representation. By leveraging preset qualifiers (such as natural language instructions or structured prompts) that correspond one-to-one with the preset generation models at each level, the semantic content, vector dimension, and number of elements of the output features were explicitly constrained, making the generation process task-oriented and format customizable. This solved the shortcomings of existing feature fusion generation methods, which lack output control and are difficult to adapt to diverse downstream task requirements. Thus, through hierarchical progressive fusion and qualifier control, efficient utilization of multi-scale features and precise and controllable generation of output features were achieved, significantly improving feature representation capabilities, task adaptability, and information utilization efficiency. The generated fusion features not only contain multi-level semantics, but their structure and content can also be flexibly adjusted according to corresponding preset qualifiers. This allows for seamless integration with various downstream tasks such as image classification, object detection, instance segmentation, and image-text retrieval, eliminating the need to redesign feature post-processing modules for different tasks and improving the versatility of the feature generation method. During the training phase, the fusion features can be directly used to calculate the task loss and backpropagate to update the parameters of the hierarchical feature extraction model and each preset generation model, achieving end-to-end learning across the entire chain and further enhancing the consistency of feature transfer between layers and the generation quality.
[0105] Figure 3 A flowchart illustrating a feature generation method provided in this application embodiment. Figure 2 In one possible implementation, such as Figure 3 As shown, the feature representation generated by the previous level and the feature matrix output by the current level are jointly input into the corresponding preset generation model, including:
[0106] S301. Perform a dimensional transformation on the feature representation generated in the previous level to align it with the channel dimension of the feature matrix output in the current level, thus obtaining the aligned feature representation of the previous level.
[0107] S302. Combine the aligned feature representation of the previous level with the feature matrix output of the current level as the input of the corresponding preset generation model.
[0108] Specifically, the server can first obtain the feature representation generated by the previous layer and its channel dimension C. prev And the feature matrix and its channel dimension C of the current level output. curr The feature representation generated in the previous layer is usually a low-dimensional structured vector, while the feature matrix of the current layer has a higher channel dimension.
[0109] Secondly, determine C prev Is it equal to C? curr If the two are equal, no transformation is needed; the feature representation of the previous layer is directly used as the aligned feature. If they are not equal, a learnable dimensionality transformation operation is performed on the feature representation generated in the previous layer, mapping it to C. curr In the dimensional space, we obtain the aligned feature representation of the previous level.
[0110] Dimension transformation can be achieved in either of the following ways: when the current layer's features are represented as vectors, use a fully connected layer or a linear projection layer, with its output dimension set to C. curr Alternatively, to maintain spatial compatibility with convolutional features, the vector can be broadcast to the same spatial size as the current feature matrix (e.g., 28×28), and then channel-adjusted using a 1×1 convolutional layer to output C. curr Alignment feature map of the channel.
[0111] Subsequently, the aligned feature representation of the previous layer is combined with the feature matrix output from the current layer to form a joint input. Combination methods include, but are not limited to: channel concatenation, element-wise addition, and attention-weighted fusion.
[0112] Specifically, channel concatenation refers to concatenating two tensors along the channel dimension. Element-wise addition requires that the two tensors have the same spatial dimensions and can be used for residual fusion. Attention-weighted fusion can utilize lightweight attention modules to dynamically allocate weights, achieving adaptive fusion.
[0113] Finally, the server can use the above combined results as input to the corresponding preset generation model. The corresponding preset generation model, combined with its corresponding preset qualifiers (such as "generate 3 component descriptions"), generates the current feature representation that conforms to the preset content and preset number.
[0114] The above method effectively solves the fusion barrier caused by the inconsistency of feature dimensions at different levels, ensuring the stability and semantic consistency of cross-level information transmission. It is especially suitable for typical architectures where the number of backbone network channels increases layer by layer (such as the expansion of channels from 96, 192, 384 to 768 in SwinTransformer).
[0115] Figure 4 A flowchart illustrating a feature generation method provided in this application embodiment. Figure 3 In one possible implementation, such as Figure 4As shown in S301, the feature representation generated in the previous level is dimensionally transformed to align with the channel dimension of the feature matrix output in the current level, resulting in the aligned feature representation of the previous level, including:
[0116] S401. Obtain the channel dimension of the feature representation generated by the previous level and the channel dimension of the feature matrix output by the current level.
[0117] S402. If the channel dimension of the feature representation generated in the previous level is inconsistent with the channel dimension of the feature matrix output in the current level, then perform a linear mapping on the feature representation generated in the previous level to adjust the channel dimension of the feature representation generated in the previous level to be the same as the channel dimension of the feature matrix output in the current level, so as to obtain the aligned feature representation of the previous level.
[0118] Specifically, the server can parse the structure of the feature representation generated in the previous layer and extract its channel dimension C. prev Simultaneously, read the channel dimension C of the feature matrix output from the current level. curr The feature representation generated in the previous layer is typically a structured vector (e.g., a 5-dimensional semantic embedding or a 384-dimensional context description vector output by a pre-defined generation model), while the feature matrix of the current layer is a three-dimensional tensor with spatial layout (e.g., 28×28×192, 14×14×384, etc.), with a channel dimension C. curr This is determined by the architecture of hierarchical feature extraction models (such as the Swing Transformer).
[0119] Compare C prev With C curr Are they equal? If C prev =C curr If no transformation is required, the feature representation generated in the previous level will be directly used as the aligned feature representation of the previous level.
[0120] If C prev ≠C curr Then, the dimensionality transformation process begins. A learnable linear mapping module can be applied to the feature representation generated in the previous layer, transforming it from C... prev Mapping to C with dimension curr dimension.
[0121] The linear mapping module can employ fully connected layers, 1×1 convolutional layers, or lightweight multilayer perceptrons.
[0122] Specifically, a fully connected layer refers to a layer that connects features to a one-dimensional vector using a weight matrix W∈R. Ccurr×Cprev and bias term b∈R CcurrThe transformation is performed, and the output is y = Wx + b. Here, x is the feature representation of the previous level before linear mapping, and y is the feature representation of the previous level after alignment.
[0123] A 1×1 convolutional layer refers to a layer that, if spatial dimensions need to be preserved to match subsequent fusion operations, first broadcasts a one-dimensional vector to the same spatial size as the current feature matrix (e.g., 28×28), and then adjusts the channel dimensions through a 1×1 convolutional kernel.
[0124] The lightweight multilayer perceptron contains an intermediate hidden layer and an output layer, which are used to introduce nonlinearity and improve the expressive power of mapping.
[0125] The parameters of this linear mapping module can be jointly optimized with the overall network through backpropagation during the model training phase, ensuring that the transformed features not only match in dimension, but also maintain consistency with the features of the current layer in semantic space.
[0126] After the above linear mapping, the aligned feature representation of the previous level can be obtained, whose channel dimension is strictly equal to the channel dimension C of the current level feature matrix. curr It can be directly used for subsequent feature combination or fusion operations.
[0127] This dimension alignment operation effectively solves the feature fusion barrier caused by the mismatch between the output dimension of the preset generation model and the channel configuration of the feature extraction model in the hierarchical structure, ensuring the compatibility and stability of cross-level information transmission, and is especially suitable for typical hierarchical architectures where the number of channels increases exponentially layer by layer.
[0128] In one possible implementation, after obtaining the channel dimension of the feature representation generated by the previous level and the channel dimension of the feature matrix output by the current level, the method further includes: if the channel dimension of the feature representation generated by the previous level is consistent with the channel dimension of the feature matrix output by the current level, then the feature representation generated by the previous level is used as the aligned feature representation of the previous level.
[0129] Specifically, if the channel dimension of the feature representation generated in the previous level is the same as the channel dimension of the feature matrix output in the current level, i.e., C prev =C curr In this case, no additional dimensional transformation operation is required. The server can directly use the feature representation generated in the previous level as the aligned feature representation of the previous level for subsequent combination processing with the feature matrix of the current level.
[0130] By skipping unnecessary linear mapping or projection operations, computational overhead can be reduced, inference efficiency improved, and redundant calculations avoided. The original generated feature representations are not subjected to additional transformations, thus preserving their semantic information and maintaining feature integrity. In some hierarchical configurations (such as custom models or task-specific fine-tuning scenarios), the number of channels in preceding and following levels may be naturally aligned. This branch ensures that the feature generation method can run stably under various architectures, enhancing process stability.
[0131] Subsequently, the aligned feature representation of the previous level will be fused with the feature matrix output from the current level (e.g., through concatenation, addition, or attention weighting) and input together into the corresponding preset generative model to generate the feature representation for the next stage.
[0132] In one possible implementation, inputting the data to be processed into a hierarchical feature extraction model includes: performing data augmentation on the data to be processed to obtain augmented data, wherein the data augmentation includes at least one of random cropping, color dithering, or image flipping; and inputting the augmented data into the hierarchical feature extraction model.
[0133] Specifically, the data to be processed is typically digital images, such as natural images, medical images, or remote sensing images in RGB format. Data augmentation can improve the generalization ability of a model and prevent overfitting by introducing controlled random perturbations. Specific operations include at least one of random cropping, color jittering, and image flipping.
[0134] Specifically, random cropping refers to randomly selecting a sub-region from the original image and adjusting it to the target input size (e.g., 224 pixels × 224 pixels). The cropping ratio can be set within the range of [70%, 100%] of the original image area to preserve the main semantic information.
[0135] Color dithering refers to randomly perturbing the brightness, contrast, saturation, and hue of an image. For example, brightness adjustment factor ∈ [0.8, 1.2], contrast ∈ [0.8, 1.2], saturation ∈ [0.8, 1.2], and hue shift ∈ [−0.1π, 0.1π].
[0136] Image flipping refers to performing a horizontal flip on an image with a preset probability (such as 50%), and in some scenarios, it may also include a vertical flip.
[0137] The above enhancement operations can be used individually or combined in a preset order (e.g., cropping first, then color jittering, and finally flipping), and the intensity and probability of each operation can be flexibly adjusted in the training configuration.
[0138] The server can then input the augmented data into a hierarchical feature extraction model. Before input, the augmented image can also be standardized, for example, by subtracting the mean (e.g., [0.485, 0.456, 0.406]) and dividing by the standard deviation (e.g., [0.229, 0.224, 0.225]), to match the input distribution requirements of a backbone network pre-trained on a large-scale dataset (e.g., ImageNet).
[0139] This data augmentation method can be applied during the model training phase to increase the diversity of training samples. However, during the inference phase, only deterministic preprocessing (such as centering and standardization) is typically performed, without enabling random augmentation operations.
[0140] Through the above processing, the server can effectively improve the stability of the hierarchical feature extraction model to real-world disturbances such as illumination changes, scale differences, and perspective changes while keeping the original semantics unchanged.
[0141] In one possible implementation, after outputting the fused features, the method further includes: obtaining the real labels corresponding to the data to be processed; calculating the loss function of the downstream task based on the fused features and the real labels; and updating the parameters of the hierarchical feature extraction model and each preset generation model based on the loss function.
[0142] In this embodiment of the application, after outputting the fused features, a model optimization step during the training phase may also be included.
[0143] Specifically, the server can obtain the ground truth label corresponding to the data to be processed. This ground truth label can be determined based on the type of downstream task. For example, in image classification tasks, the ground truth label is a class index (such as integers 0-999 in ImageNet) or a one-hot encoded vector. In object detection tasks, the ground truth label includes the object bounding box coordinates and the corresponding class. In semantic segmentation tasks, the ground truth label is a pixel-level class map with the same resolution as the input image. In contrastive learning or image-text alignment tasks, the ground truth label can represent positive-negative sample pairs or cross-modal alignment relationships.
[0144] The real label serves as a supervisory signal and can be used to guide model learning.
[0145] Next, the server can calculate the loss function for downstream tasks based on the fused features and the real labels.
[0146] Specifically, the fused features can be input into a downstream task-specific prediction head (such as a fully connected classification layer, a detection head, or a projection head) to obtain the prediction results. Subsequently, the corresponding loss value is calculated based on the difference between the prediction results and the true labels.
[0147] In multi-task joint training scenarios, multiple loss terms can be weighted and summed to form a composite loss function.
[0148] Then, the server can calculate the gradient of the loss function with respect to the model parameters through the backpropagation algorithm, and use an optimizer to jointly update the parameters of the hierarchical feature extraction model (such as the weights of each layer of the Swing Transformer) and the preset generative model (such as a large language model or a lightweight generative network) corresponding to each layer.
[0149] This update process can be performed iteratively on the training dataset until the model converges. Through this end-to-end training mechanism, the feature extraction capabilities of the hierarchical feature extraction model and the controllable generation capabilities of each pre-defined generative model can be collaboratively optimized, guided by the task objective, thereby improving the semantic accuracy, structural rationality, and task adaptability of the final output fused features.
[0150] This application embodiment can divide an electronic device or main control device into functional modules according to the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional module. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.
[0151] Figure 5 This is a schematic diagram of a feature generation device provided in an embodiment of this application. Figure 5 As shown, the device includes: an acquisition module 510, a data processing module 520, and a feature output module 530.
[0152] The acquisition module 510 is used to acquire data to be processed;
[0153] The data processing module 520 is used to input the data to be processed into the hierarchical feature extraction model, extract features layer by layer through each level and output multiple corresponding feature matrices. The hierarchical feature extraction model includes multiple sequentially connected levels.
[0154] The data processing module 520 is also used to input the first feature matrix output from the first level into the first preset generation model, and the first preset generation model generates a first feature representation that conforms to the preset content and preset quantity according to the corresponding preset qualifiers;
[0155] The data processing module 520 is also used to input the feature representation generated by the previous level and the feature matrix output by the current level into the corresponding preset generation model for each subsequent level, so that the preset generation model can generate the current feature representation that conforms to the preset content and preset number according to the corresponding preset limiting words.
[0156] The feature output module 530 is used to determine the feature representation generated in the last level as the fused feature and output the fused feature.
[0157] In one possible implementation, the data processing module 520 is further configured to perform a dimensional transformation on the feature representation generated in the previous level, so that it is aligned with the channel dimension of the feature matrix output in the current level, thereby obtaining the aligned feature representation of the previous level.
[0158] The data processing module 520 is also used to combine the aligned feature representation of the previous level with the feature matrix output of the current level as input to the corresponding preset generation model.
[0159] In one possible implementation, the data processing module 520 is further configured to obtain the channel dimension of the feature representation generated in the previous level and the channel dimension of the feature matrix output in the current level.
[0160] The data processing module 520 is also used to perform linear mapping on the feature representation generated in the previous level if the channel dimension of the feature representation generated in the previous level is inconsistent with the channel dimension of the feature matrix output in the current level, so as to adjust the channel dimension of the feature representation generated in the previous level to be the same as the channel dimension of the feature matrix output in the current level, and obtain the aligned feature representation of the previous level.
[0161] In one possible implementation, the data processing module 520 is further configured to use the feature representation generated in the previous level as the aligned feature representation of the previous level if the channel dimension of the feature representation generated in the previous level is consistent with the channel dimension of the feature matrix output in the current level.
[0162] In one possible implementation, the data processing module 520 is further configured to perform data augmentation on the data to be processed to obtain augmented data. The data augmentation includes at least one of random cropping, color dithering, or image flipping.
[0163] The data processing module 520 is also used to input the enhanced data into the hierarchical feature extraction model.
[0164] In one possible implementation, the device further includes: a model update module;
[0165] The model update module is used to obtain the real labels corresponding to the data to be processed;
[0166] The model update module is also used to calculate the loss function for downstream tasks based on the fused features and the real labels;
[0167] The model update module is also used to update the parameters of the hierarchical feature extraction model and each preset generation model according to the loss function.
[0168] The feature generation apparatus provided in this embodiment can execute a feature generation method of the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0169] In a specific implementation of the aforementioned feature generation device, each module can be implemented as a processor. The processor can execute computer execution instructions stored in the memory, thereby enabling the processor to execute the aforementioned feature generation method.
[0170] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device includes at least one processor 610 and a memory 620. The electronic device also includes a communication component 630. The processor 610, memory 620, and communication component 630 are connected via a bus 640.
[0171] In the specific implementation process, at least one processor 610 executes computer execution instructions stored in memory 620, causing at least one processor 610 to execute a feature generation method as executed on the electronic device side as described above.
[0172] The specific implementation process of processor 610 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0173] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0174] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage.
[0175] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0176] The above description of the functions implemented by electronic devices and main control devices has introduced the solutions provided by the embodiments of the present invention. It is understood that, in order to implement the above functions, the electronic device or main control device includes hardware structures and / or software modules corresponding to the execution of each function. By combining the units and algorithm steps of the various examples described in the embodiments of the present invention, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present invention.
[0177] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the feature generation method described above.
[0178] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0179] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in an electronic device or a host device.
[0180] This application also provides a computer program product, which includes a computer program stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the solution provided in the above embodiments.
[0181] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.
[0182] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A feature generation method, characterized in that, include: Obtain the data to be processed; The data to be processed is input into a hierarchical feature extraction model, and features are extracted layer by layer through each level and multiple corresponding feature matrices are output. The hierarchical feature extraction model includes multiple sequentially connected levels. The first feature matrix output from the first level is input into the first preset generation model, and the first preset generation model generates a first feature representation that conforms to the preset content and preset quantity according to the corresponding preset qualifiers. For each subsequent level, the feature representation generated by the previous level and the feature matrix output by the current level are input together into the corresponding preset generation model. The preset generation model generates the current feature representation that conforms to the preset content and preset number according to the corresponding preset qualifiers. The feature representation generated at the last level is determined as the fused feature, and the fused feature is output.
2. The method according to claim 1, characterized in that, The step of inputting the feature representation generated by the previous level and the feature matrix output by the current level into the corresponding preset generation model includes: The feature representation generated in the previous level is subjected to dimensional transformation to align with the channel dimension of the feature matrix output in the current level, thus obtaining the aligned feature representation of the previous level. The aligned feature representation of the previous level is combined with the feature matrix output of the current level and used as the input of the corresponding preset generation model.
3. The feature generation method according to claim 2, characterized in that, The step of performing a dimensional transformation on the feature representation generated in the previous layer to align it with the channel dimension of the feature matrix output in the current layer, thereby obtaining the aligned feature representation of the previous layer, includes: Obtain the channel dimension of the feature representation generated by the previous level and the channel dimension of the feature matrix output by the current level; If the channel dimension of the feature representation generated in the previous level is inconsistent with the channel dimension of the feature matrix output in the current level, then a linear mapping is performed on the feature representation generated in the previous level to adjust the channel dimension of the feature representation generated in the previous level to be the same as the channel dimension of the feature matrix output in the current level, thereby obtaining the aligned feature representation of the previous level.
4. The feature generation method according to claim 3, characterized in that, After obtaining the channel dimensions of the feature representation generated by the previous layer and the channel dimensions of the feature matrix output by the current layer, the method further includes: If the channel dimension of the feature representation generated in the previous layer is consistent with the channel dimension of the feature matrix output in the current layer, then the feature representation generated in the previous layer is used as the aligned feature representation of the previous layer.
5. The method according to claim 1, characterized in that, The step of inputting the data to be processed into a hierarchical feature extraction model includes: The data to be processed is subjected to data augmentation processing to obtain enhanced data. The data augmentation processing includes at least one of random cropping, color dithering, or image flipping. The enhanced data is input into the feature extraction model of the hierarchical structure.
6. The method according to any one of claims 1 to 5, characterized in that, After outputting the fused features, the method further includes: Obtain the real labels corresponding to the data to be processed; The loss function for the downstream task is calculated based on the fusion features and the real labels; The parameters of the feature extraction model of the hierarchical structure and each of the preset generation models are updated according to the loss function.
7. A feature generation apparatus, characterized in that, include: The acquisition module is used to acquire data to be processed. The data processing module is used to input the data to be processed into the hierarchical feature extraction model, extract features layer by layer through each level and output multiple corresponding feature matrices. The hierarchical feature extraction model includes multiple sequentially connected levels. The data processing module is further configured to input the first feature matrix output from the first level into the first preset generation model, and the first preset generation model generates a first feature representation that conforms to the preset content and preset quantity according to the corresponding preset limiting words; The data processing module is also used to input the feature representation generated by the previous level and the feature matrix output by the current level into the corresponding preset generation model for each subsequent level, and the preset generation model generates the current feature representation that conforms to the preset content and preset number according to the corresponding preset qualifiers. The feature output module is used to determine the feature representation generated at the last level as the fused feature and output the fused feature.
8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.