A picture fusion method and device based on scene configuration

By using a scene-based configuration approach, optical character recognition and a high-dimensional indexed tree data structure are used to analyze the differences between images and dynamically construct fusion parameters. This solves the problems of low image fusion efficiency and poor reusability in existing technologies, and achieves efficient image fusion and multi-scene adaptation.

CN122135158APending Publication Date: 2026-06-02CHINA MOBILE JIUTIAN ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE JIUTIAN ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
Filing Date
2026-02-24
Publication Date
2026-06-02

Smart Images

  • Figure CN122135158A_ABST
    Figure CN122135158A_ABST
Patent Text Reader

Abstract

This invention provides an image fusion method and apparatus based on scene configuration. The method includes: in response to an image fusion request carrying a scene identifier, acquiring a set of images to be fused associated with the scene identifier; performing feature analysis on the set of images to be fused to extract difference feature data representing the differences between images; classifying and analyzing the difference feature data to determine layout attributes suitable for the current scene, and constructing scene configuration data containing fusion parameters based on the layout attributes; and performing fusion processing on the set of images to be fused based on the scene configuration data. This achieves automated generation and scene-based reuse of image fusion parameters, effectively solving the problem of image fusion containing differences such as text and numbers, and significantly improving the processing efficiency, data reuse rate, and adaptability flexibility in multiple scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an image fusion method and apparatus based on scene configuration. Background Technology

[0002] With the rapid development of information technology, network applications have covered all aspects of people's lives. In order to better convey product concepts and showcase functions, images plus text, images plus numbers, and combinations of multiple images have become the mainstream display methods for web pages, mobile devices, and large-screen applications.

[0003] Currently, the main technical means to achieve the above display methods include: directly using HTML tags to import static images; processing images with text based on Cascading Style Sheets (CSS) style positioning technology; or using basic image fusion methods, that is, preprocessing images to obtain similar and different areas, and then synthesizing images based on fusion parameters.

[0004] However, existing technologies have a major technical problem: during the image fusion process, there is a lack of effective analysis and classification mechanisms for differential data (especially non-image content such as text and numbers). This results in the inability to reuse existing fusion parameters for the same or similar business scenarios, and the time-consuming image processing and fusion process still needs to be repeated, which seriously reduces the system's processing efficiency and reusability. Summary of the Invention

[0005] This invention provides a scene-configured image fusion method and apparatus to address the shortcomings of existing technologies, such as the lack of classification and processing of differential data generated during image fusion, which leads to repetitive execution of processing in the same or similar scenes, resulting in low efficiency and reusability.

[0006] This invention provides an image fusion method based on scene configuration, comprising: In response to an image fusion request carrying a scene identifier, obtain the set of images to be fused associated with the scene identifier; The image set to be fused is subjected to feature analysis to extract difference feature data representing the differences between the images; The difference feature data is classified and analyzed to determine the layout attributes suitable for the current scene, and scene configuration data containing fusion parameters is constructed based on the layout attributes. The set of images to be merged is fused according to the scene configuration data.

[0007] According to the method provided by the present invention, the step of performing feature parsing on the image set to be fused and extracting difference feature data representing the differences between the images includes: Read multiple images from the image set to be fused, compare and obtain the difference regions between the multiple images, and identify the data type of the difference regions; If the data type of the difference region is an image, obtain the image attribute information of the difference region; if the data type of the difference region is not an image, use optical character recognition technology to identify the difference region and obtain text attribute information including coordinates and size. The image attribute information and the text attribute information are summarized into the difference features.

[0008] According to the method provided by the present invention, the step of classifying and analyzing the difference feature data to determine the layout attributes suitable for the current scene includes: Transform the differential feature data into a multidimensional dataset; The multidimensional dataset is classified and retrieved according to a high-dimensional indexed tree data structure algorithm to determine the target scene to which the differential feature data belongs. The location information and layout rules corresponding to the target scene are determined as the layout attributes.

[0009] According to the method provided by the present invention, the step of performing scene classification retrieval on the multidimensional dataset based on a high-dimensional indexed tree data structure algorithm to determine the target scene to which the differential feature data belongs specifically includes: The data to be classified in the multidimensional dataset is used as target sampling points, and candidate points are determined by searching in a pre-built high-dimensional index tree. During the backtracking process, if the first distance between the node traversed in the high-dimensional index tree and the target sampling point is less than the second distance between the candidate point and the target sampling point, the candidate point is updated to the node traversed in the high-dimensional index tree. Set a preset distance threshold between the target sampling point and the candidate point; Determine whether the final distance between the candidate point and the target sampling point determined after the backtracking is less than or equal to the preset distance threshold: if yes, determine the scene to which the candidate point belongs as the target scene; if no, create a new scene based on the target sampling point and determine the new scene as the target scene.

[0010] According to the method provided by the present invention, the construction steps of the high-dimensional index tree include: preprocessing the multidimensional dataset, the preprocessing including missing value imputation and data deduplication; selecting a splitting coordinate axis and calculating the median of the multidimensional dataset on the splitting coordinate axis as the splitting point; dividing the current data region into sub-regions according to the splitting point; recursively executing the region division operation until each sub-region meets the preset termination condition, thereby completing the construction of the high-dimensional index tree.

[0011] According to the method provided by the present invention, after determining the target scene, the method further includes: setting a cache storage space; updating the cache storage space according to the least recently used algorithm, and storing the candidate points determined after the backtracking is completed and their corresponding target scenes in the cache storage space.

[0012] According to the method provided by the present invention, the image fusion request further includes an environmental identifier; Before the step of obtaining the set of images to be fused associated with the scene identifier, the method further includes: Based on the encryption algorithm, an encrypted identifier string is generated using the environment identifier and the scene identifier; Using the encrypted identifier string as a unique index, the corresponding set of images to be merged is searched and obtained in the preset image information management platform.

[0013] According to the method provided by the present invention, the scene configuration data adopts a preset text exchange format, and the fusion parameters include general fusion parameters and dynamic fusion parameters; The step of performing fusion processing on the set of images to be fused based on the scene configuration data includes: parsing the scene configuration data, extracting the general fusion parameters and dynamic fusion parameters including position coordinates, layout style, and text content; calling the web page graphics drawing interface, drawing the background according to the general fusion parameters, and drawing the difference content according to the dynamic fusion parameters, and synthesizing to generate a new image.

[0014] The present invention also provides an image fusion device based on scene configuration, comprising: The request processing module is used to respond to an image fusion request carrying a scene identifier and obtain a set of images to be fused associated with the scene identifier; The feature parsing module is used to perform feature parsing on the set of images to be fused and extract difference feature data that characterizes the differences between the images. The scene analysis module is used to classify and analyze the difference feature data, determine the layout attributes that are suitable for the current scene, and construct scene configuration data containing fusion parameters based on the layout attributes. The image synthesis module is used to perform fusion processing on the set of images to be fused according to the scene configuration data.

[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the scene-configuration-based image fusion method as described above.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the scene-configuration-based image fusion method as described above.

[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the scene-configuration-based image fusion method as described above.

[0018] This invention provides an image fusion method and apparatus based on scene configuration. By performing feature analysis on a set of images to be fused to obtain differential feature data, and classifying and analyzing the differential feature data to determine layout attributes, scene configuration data containing fusion parameters can be dynamically constructed based on the analysis results. This achieves automated generation and scene-based reuse of image fusion parameters, effectively solving the problem of image fusion containing differential content such as text and numbers, and significantly improving the processing efficiency, data reuse rate, and adaptability in multiple scenes. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this 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 this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the scene-configuration-based image fusion method provided by the present invention.

[0021] Figure 2 This is a schematic diagram of the organizational structure of the image information management platform provided by the present invention.

[0022] Figure 3 This is a schematic diagram of the entire image fusion processing process provided by the present invention.

[0023] Figure 4 This is a schematic diagram of the image fusion device based on scene configuration provided by the present invention.

[0024] Figure 5This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0026] In addition to the aforementioned problem of low efficiency in reusing differentiated data, existing technologies also have several deep-seated technical shortcomings in practical applications: Firstly, regarding multi-device adaptation, current mainstream web and mobile display solutions heavily rely on Cascading Style Sheets (CSS) positioning technology. Due to significant differences in screen resolution and browser engines across different devices, developers must define a large amount of adaptation code for each device. This not only results in extremely complex code logic but also causes maintenance costs and compatibility testing workloads to increase exponentially when business logic changes or new device types are added later. Furthermore, simple style positioning struggles to handle complex image compositing requirements, easily leading to layout errors and other problems.

[0027] Secondly, existing image fusion solutions have limitations in terms of the types of data they can handle. Traditional fusion techniques mainly focus on pixel-level overlay or region stitching between two or more plain images, lacking effective means of recognizing and fusion non-image scenes such as embedded text and dynamic numbers. When business scenarios involve dynamically generated real-time data (such as price tags and personalized copy), existing solutions often require real-time rendering on the front end or pre-generating massive amounts of static image materials. This not only consumes a large amount of network bandwidth and storage resources but also fails to guarantee rendering efficiency in high-concurrency scenarios.

[0028] Furthermore, existing technologies lack robust management mechanisms for environments and scenarios. Throughout the software development lifecycle, multiple environments typically exist, including development, testing, pre-release, and production. The same business scenario often requires different image materials or configuration parameters in different environments. Current management methods lack a unique verification mechanism that can simultaneously associate environment and scenario identifiers, leading to chaotic resource scheduling. Moreover, in similar scenarios, time-consuming image preprocessing and fusion processes must be repeatedly executed, resulting in significant waste of computational resources and extremely low data reuse rates.

[0029] The technical solution of this invention effectively isolates and accurately manages image resources in multiple environments by introducing a unique encrypted index mechanism that combines environment identifiers and scene identifiers, thus solving the problem of resource misalignment. In its core processing logic, this application no longer relies solely on static style positioning, but instead utilizes feature parsing technology (including OCR) to automatically identify and extract differentiated content (including text and numbers) in images, and combines this with a high-dimensional indexed tree data structure (KD-Tree) algorithm to intelligently classify and analyze these differentiated features. This mechanism can transform unstructured image differences into standardized scene layout attributes, thereby dynamically constructing scene configuration data containing both general and dynamic parameters. By prioritizing the retrieval and reuse of this configuration data, this invention not only avoids repetitive and time-consuming image preprocessing processes, significantly improving fusion efficiency and data reuse rate, but also achieves automated adaptation and batch production for complex business scenarios such as images + text and images + numbers.

[0030] Before describing the technical solutions of the embodiments of the present invention, the terms and concepts involved in the embodiments of the present invention will be explained illustratively.

[0031] Image fusion request: refers to the instruction or message that triggers image fusion processing. It usually carries a scene identifier to identify a specific business scenario, and may also include an environment identifier to distinguish different operating environments (such as development, testing, and production).

[0032] Image set to be merged: refers to a set of original image resources that need to be merged or overlaid, obtained from the image information management platform based on the scene identifier (and optional environment identifier) ​​in the image fusion request.

[0033] Differential feature data: refers to the set of information extracted by performing feature analysis and comparison on the set of images to be fused, which can represent the different content between multiple images. It may include the location coordinates, size, content type (image or text) of the difference region, and, if it is text, the identified text, numbers and their style attributes.

[0034] Layout attributes: These refer to the visual arrangement rules applicable to the current business scenario, determined after classifying and analyzing the difference feature data. These rules include, but are not limited to, the position coordinates, layout style, font size, color, and hierarchical relationship of the difference content in the composite image.

[0035] Scene configuration data: refers to structured data built on the aforementioned layout attributes, containing all parameters required for image fusion. It is usually stored in text exchange formats such as JSON and may include general fusion parameters applicable to all images (such as background image and canvas size) and dynamic fusion parameters dynamically determined for different content (such as text position and style).

[0036] Cascading style sheets (CSS) are a style sheet language used to describe the appearance and layout of web pages or application interfaces. In this invention, CSS positioning technology was used to overlay text on images, but this method suffered from poor compatibility and high maintenance costs.

[0037] Optical Character Recognition (OCR): a technology that converts text or symbols in an image into editable and searchable text data. In this invention, it is used to identify text and numerical content in areas of difference in an image and obtain its coordinates, size, and other attributes.

[0038] Application Programming Interface (API): A set of predefined functions, protocols, or tools used for communication and data exchange between different software components. In this invention, it is used for data reading and writing, configuration synchronization, and other operations between the image information management platform and the fusion processing system.

[0039] A high-dimensional indexed tree (K-dimensional tree, KD-Tree) is a data structure used to organize point data in a k-dimensional space. It accelerates operations such as nearest neighbor search and range queries by recursively partitioning the space. In this invention, it is optimized for efficient scene classification and retrieval of differential feature data (considered as high-dimensional data).

[0040] Least Recently Used (LRU) algorithm: A commonly used cache eviction strategy that prioritizes removing the least recently accessed data when cache space is insufficient. In this invention, it is used to manage the nearest neighbor cache generated during scene classification, thereby improving classification retrieval efficiency.

[0041] Real-time image generation tag (Canvas): A graphics drawing API provided by HTML5, allowing dynamic rendering of bitmap images on a webpage via JavaScript. In this invention, as a technical means to ultimately perform image fusion and synthesis, a new image is drawn and generated based on the fusion parameters in the scene configuration data.

[0042] Image Information Management Platform: A visual management platform supporting multiple environments and scenarios, used to store and manage the original image sets to be merged and their associated scene configuration data. Image resources are uniquely indexed using encrypted identifier strings.

[0043] Encrypted Identifier String: A unique code generated using a specific encryption algorithm based on environment and scene identifiers. It is used as a key to index and retrieve corresponding image sets and configuration data in the image information management platform.

[0044] Dynamic fusion parameters: These are the fusion parameters determined in the scene configuration data for differences in content between images (such as changed text, numbers, or icons). They include the type, position, style, and text content of the images and will be dynamically adjusted as the business scenario changes.

[0045] General fusion parameters: These refer to fixed or basic parameters in the scene configuration data that are applicable to all image fusion operations in the current scene, such as background image, canvas width and height, etc., and are usually kept stable under the same scene.

[0046] The scene-configurable image fusion method and apparatus provided in this application can be implemented on electronic devices including, but not limited to, servers, workstations, and personal computers (PCs). This electronic device, as the core carrier for data processing and control, can be logically considered as a system composed of hardware units for input, processing, storage, and output.

[0047] Specifically, this hardware environment includes at least the following core components: Central Processing Unit (CPU): As the brain of electronic devices, it is responsible for executing operating system and image fusion-related application code, including calling the OCR engine for character recognition, executing the KD-Tree classification algorithm, and processing Canvas graphics drawing instructions, among other high-density computing tasks.

[0048] Memory: This includes high-speed random access memory (RAM) and non-volatile memory (such as hard disks and SSDs). RAM is used to temporarily store intermediate data during runtime (such as image pixel matrices and nearest neighbor cache lists), while non-volatile memory is used to persistently store scene configuration databases, image material libraries, OCR model files, and the operating system.

[0049] Network interface: Used for communication between electronic devices and external networks (such as the Internet and local area networks) to realize functions such as data synchronization between the image information management platform and the database, receiving image fusion requests sent by clients, and calling remote API interfaces.

[0050] Furthermore, in scenarios involving large-scale concurrent processing or deep learning models (such as high-performance OCR recognition), this hardware environment can be further expanded by equipping it with a graphics processing unit (GPU) to provide parallel computing acceleration capabilities, thereby significantly improving the real-time performance of image feature parsing and fusion processing. The entire hardware environment connects its components via a system bus, ensuring high-speed data transmission and collaborative operation between different modules, providing the physical foundation for the execution of embodiments of the present invention.

[0051] Figure 1 This is a flowchart illustrating an image fusion method based on scene configuration provided in an embodiment of the present invention. The method includes: Step 101: In response to the image fusion request carrying the scene identifier, obtain the set of images to be fused associated with the scene identifier.

[0052] Image fusion is typically initiated by external business systems, front-end applications, or large-scale model production platforms. When business logic requires the generation of a composite image (e.g., personalized marketing posters or dynamic status cards generated in real-time based on user behavior), the caller sends a structured image fusion request to the system's server. This request contains a core scene identifier, which is a logical label predefined in the system backend to uniquely identify the business scope to which the current fusion task belongs.

[0053] Upon receiving a request, the system first parses the data packet using a request processor to extract the scene identifier. Then, the system uses this scene identifier as an index key to retrieve the relevant resource mapping table or image information management platform. This mapping relationship defines the binding between a specific scene identifier and a set of original image assets. For example, in an order completion scenario, the scene identifier would point to the image resource path containing the background template, decorative icons, and placeholder layers.

[0054] The process of acquiring the image set to be merged is not limited to reading from the local file system. In a distributed deployment environment, the system can retrieve the raw image data from ObjectStorage or a Content Delivery Network (CDN) via a high-speed network interface based on the retrieved resource locator (URL). The acquired image set is typically loaded into a temporary buffer in memory as a bitmap matrix or byte stream. At this point, the system also performs a preliminary check on the integrity and format consistency of the image set to ensure that all necessary image materials are ready.

[0055] Through this scene-based automated acquisition mechanism, the system can achieve deep decoupling between business logic and visual materials, providing standardized and structured data input for subsequent automated parsing and fusion processing.

[0056] Step 102: Perform feature analysis on the set of images to be fused to extract difference feature data representing the differences between the images.

[0057] During feature parsing, the system first preprocesses each image sample in the image set to be fused to unify the benchmark for subsequent comparisons. By performing lateral verification of the pixel distribution of the image set in the spatial dimension, the system can accurately locate specific regions with visual deviations. These regions not only include visual pattern changes but also variations in symbols, values, and other information.

[0058] The system then numerically represents these variable areas, transforming them into a multi-dimensional feature set including spatial coordinates, geometric dimensions, and content category attributes. Essentially, this step transforms raw pixel data into structured feature information, enabling the computer system to recognize previously disordered visual differences as calculable and comparable differential feature data. The data acquired during the analysis precisely records the occupancy and physical attributes of the differential content within the overall image view, constituting the core elements describing the image's features. Through this analysis method, the system can eliminate redundant background information, focusing on key variables that distinguish different scenes, laying the foundation for subsequent precise classification analysis using algorithms.

[0059] Step 103: Classify and analyze the difference feature data to determine the layout attributes that are suitable for the current scene, and construct scene configuration data containing fusion parameters based on the layout attributes.

[0060] After acquiring the difference feature data, the system enters the classification analysis and configuration construction phase. First, the extracted difference feature data is input into the analysis module, where computational logic quantifies and evaluates the data's distribution patterns, content attributes, and spatial relationships. Based on the evaluation results, the current difference content is assigned to specific layout rules, thereby determining layout attributes that match the current scene. These layout attributes reflect how the difference content is organized within the image, including its relative coordinates, size, and presentation style.

[0061] After determining the layout attributes, the system further transforms these attributes into a standardized data structure, thereby constructing scene configuration data containing fusion parameters. This scene configuration data not only carries descriptive information about the differences in features but also contains control instructions guiding subsequent image fusion. By integrating scattered feature data into structured configuration information, the system can establish a set of directly callable parameter logic for each specific scene. This configurable processing approach allows the system to generate corresponding fusion schemes for different input requirements, ensuring that the differences in content can be accurately integrated into the image materials according to predefined layout rules, providing a complete data basis for the final automated image fusion.

[0062] Step 104: Perform fusion processing on the set of images to be fused according to the scene configuration data.

[0063] When performing fusion processing on the image set to be merged based on the scene configuration data, the system first parses the constructed scene configuration data to obtain various technical parameters used to control image synthesis. Based on the instructions in the parameters, the system determines the overlay level and corresponding spatial layout information of each image in the image set to be merged. According to the coordinate values ​​in the layout information, the system aligns the background image and the image representing the differentiating content within the virtual canvas space.

[0064] After spatial alignment, the system uses graphics processing technology to overlay and calculate the pixel data of materials at each level. Based on the display rules defined in the scene configuration data, the system uniformly adjusts the image size, aspect ratio, and transparency to ensure a smooth visual transition between the different content and the background image. The system executes pixel fusion instructions, integrating the image information from multiple images into a single image stream and generating the final new image according to a preset file format. The entire process requires no manual layout intervention, achieving precise compositing and real-time output of different materials through a data-driven approach.

[0065] The scene-configuration-based image fusion method provided in this invention obtains differential feature data by performing feature parsing on the image set to be fused, and classifies and analyzes the differential feature data to determine layout attributes. Thus, scene configuration data containing fusion parameters can be dynamically constructed based on the analysis results, realizing the automated generation and scene-based reuse of image fusion parameters. This effectively solves the problem of image fusion containing differential content such as text and numbers, and significantly improves the processing efficiency, data reuse rate, and adaptability flexibility in multiple scenes.

[0066] Furthermore, to meet the needs of refined management and isolation of image resources under multi-environment deployment, the embodiments of the present invention further extend the resource location mechanism. Specifically, in addition to including a scene identifier, the image fusion request received by the system can optionally carry an environment identifier. This environment identifier is used to explicitly specify the specific runtime environment instance corresponding to the current operation, such as development, staging, production-asian-region, etc., so that the same set of business logic can adapt to multiple parallel environments in development, testing, production, and even different regions or customers.

[0067] Before the system performs the core operation of acquiring the image set to be merged, it prioritizes processing the environment identifier information. The system calls a predefined, collision-resistant cryptographic hash function (such as SHA-256) to concatenate or combine the environment identifier string and the scene identifier string according to predetermined rules. This combined string is then used as input to generate a fixed-length, unique cryptographic identifier string. This identifier string serves as the cryptographic digest of the environment-scene tuple. Its characteristics ensure that different combinations of environments or scenes will inevitably produce different digest values, while the same combination will always generate the same digest value. This naturally constitutes a globally unique resource key from which the original identifier cannot be reversed.

[0068] Subsequently, the system uses the generated encrypted identifier string as an absolutely unique query key to initiate a resource retrieval request to the pre-built image information management platform. In the backend storage design of this image information management platform, all uploaded image resource files or their metadata records are organized and stored using the encrypted identifier string corresponding to their respective environment and scene as the primary index key. Therefore, when the system queries using this encrypted identifier string, the platform can directly and accurately locate and return the set of image material files strictly bound to that specific environment and scene. This design fundamentally eliminates the misreference or confusion of image resources between different environments, achieving precise resource isolation and secure access, while providing a clear and reliable resource mapping foundation for dynamic and ever-changing operational needs.

[0069] The image information management platform provided in this invention is a visualized image resource and configuration management center for multiple applications, environments, and scenarios. This platform uses scenarios as the core management granularity, providing unified resource access and configuration management services for the system to achieve scenario-based image fusion. The organizational structure of the image information management platform is as follows: Figure 2 As shown.

[0070] After logging in, users can create or manage different applications, such as marketing campaign systems and data dashboard systems. Each application is an independent resource management unit.

[0071] Within each application, users can create and manage multiple scenarios. Each scenario corresponds to a specific business display template or page, such as a "Double Eleven Promotion Banner" or a "Monthly Report Cover." Scenarios are the core logical unit for resource organization.

[0072] Crucially, the platform introduces the concept of environment configuration. When creating or managing a scenario, it must be associated with one or more environments, such as "development environment," "test environment," "production environment," or "North American environment." This means that the same scenario (such as a "Double Eleven promotion banner") can be associated with and use completely different image resources and configuration data in different environments, thus achieving strict environment isolation of resources.

[0073] In each scenario, manage two core elements: Image sets: Users can upload, delete, or associate all original image materials required for a specific scene and environment through the platform interface, such as background images, logos, icons, etc. These image resources are managed in list format (e.g., image 1... image n).

[0074] Configuration data: The platform also manages the structured scene configuration data for this scenario within this environment. This data is typically stored in formats such as JSON and includes general and dynamic parameter templates required for image fusion in this scenario.

[0075] The platform employs a unified identification mechanism for all resources. For each "environment-scene" pair, the system generates a unique encrypted identifier string using an encryption algorithm. This encrypted string serves as the sole key for indexing and retrieving image sets and configuration data within the platform, ensuring the accuracy and security of resource location.

[0076] In summary, this image information management platform constructs a structured, isolated, and easily maintainable image fusion resource foundation through a multi-level "application-scenario-environment" model and unified management of image sets and scene configuration data. When an image fusion process initiates a request, it only needs to include an environment identifier and a scene identifier. The system can then use the generated encrypted identifier string to accurately obtain the corresponding image set to be fused and scene configuration data within the platform, thereby driving subsequent automated fusion processing.

[0077] After acquiring the image set to be fused, the system performs a feature parsing step to extract differential feature data. This process first reads multiple images from the set and loads them into memory for pixel-by-pixel or feature-based depth comparison. Through algorithmic analysis, the system identifies regions in these images that are visually identical and defines them as a common background; simultaneously, it accurately locates those parts where there are variations in pixel values, shapes, or content between different images, and these parts are marked as differential regions to be processed.

[0078] For each identified discrepancy region, the system needs to further determine the data type of its content. This determination is based on pixel distribution features within the region, edge information, or a pre-trained model. If the content within the region is determined to be an image type, such as an icon, pattern, or photographic fragment, the system extracts the image attribute information for that region. This information typically includes the precise coordinates of the region's location within its original image, as well as the region's own dimensions, such as width and height.

[0079] If the content within the discrepancy area is determined to be non-image type, such as readable text, numbers, or specific symbols, the system uses optical character recognition (OCR) technology for processing. This technology first preprocesses the region image to optimize recognition conditions, then analyzes the character shapes and converts them into corresponding computer-encoded text. During this process, the system not only records the recognized text content but also simultaneously acquires key geometric attributes such as the text region's position coordinates in the original image, and the width and height of the region's border. This information collectively constitutes the text attribute information.

[0080] Finally, the system aggregates, organizes, and formats all the image and text attribute information obtained in the above steps. This information together constitutes a complete set of structured differential feature data. This dataset accurately describes the content essence, spatial location, and size of all variable elements in the image set to be fused, providing a solid and detailed data basis for subsequent scene-based logical classification and parametric fusion.

[0081] After extracting the differential feature data, the system performs a classification analysis step to determine the final layout attributes. First, the system performs a structured transformation on this feature data. For each specific feature instance, such as an icon located at a specific coordinate or a piece of text with a specific size, its multiple attribute values ​​(such as x-coordinate, y-coordinate, width, height, font size, etc.) are combined to form a multidimensional data point representing that instance. All the instance points to be processed together constitute a multidimensional dataset for scene analysis.

[0082] Subsequently, the system employs an efficient high-dimensional spatial indexing and search method to analyze the dataset. This method relies on a tree-like index structure pre-built using historical scene data. The system inputs the current multidimensional dataset and performs rapid retrieval and comparison within this index structure to find the most similar historical patterns in the attribute space for this new data. By calculating the distance or similarity between data points, the system can determine which known business scenario's feature template best matches the current feature combination, thus classifying it into that scenario category, i.e., identifying the target scenario.

[0083] Once the target scene is determined, the system extracts the visual design specifications bound to that scene from a pre-defined scene rule base. These specifications define the positions, alignment relationships, stacking order, and style details such as font and color of various elements (such as icons and text) in the composite image within that scene. The system then identifies these specific specifications extracted from the rule base as the layout attributes that must be followed in this image fusion process, thereby transforming the data feature classification results into operational instructions that can directly guide image fusion.

[0084] Furthermore, in the step of scene classification retrieval based on the high-dimensional index tree data structure algorithm, the specific implementation process is as follows: The system treats the differential feature data (i.e., the data to be classified) that needs to be classified as a target sampling point in a high-dimensional space. The algorithm then initiates a search in a pre-constructed high-dimensional index tree. The search starts from the root node of the tree, recursively traversing downwards to a leaf node by comparing the values ​​of the target sampling point in each dimension with the values ​​of the split points in the tree node. A data point within the area of ​​that leaf node is initially identified as a candidate point, i.e., the historical point currently considered most similar to the target point.

[0085] The search process doesn't end there; the algorithm immediately performs a precise backtracking. Starting from the leaf node just reached, the algorithm returns upwards along the search path, checking every tree node that might have been overlooked along the way. During the backtracking, the algorithm calculates the actual distance between the currently checked tree node and the target sampling point (called the first distance). If this first distance is less than the distance between the currently recorded candidate point and the target sampling point (called the second distance), it means a closer similar point has been found, and the system immediately updates the candidate point to this newly discovered node.

[0086] To intelligently determine the classification results, the system introduces a preset distance threshold. This threshold defines the upper limit of similarity for judging whether two data points are sufficiently similar to belong to the same scene. After the backtracking process is completed, the algorithm calculates the final distance between the final candidate point and the target sampling point.

[0087] At this point, the system makes a crucial judgment: if the final distance is less than or equal to a preset distance threshold, it indicates that the target sampling point and the found candidate points are sufficiently similar, and they can be considered to belong to the same pattern. Therefore, the system identifies the historical business scenario associated with the candidate point as the target scenario.

[0088] Conversely, if the final distance exceeds a preset threshold, it means that the differences between the known historical data points in the existing index tree and the current target sampling point are too large, and there are no sufficiently matching templates in the existing scenario library. In this case, the system will dynamically create a completely new business scenario category based on the feature combination represented by this target sampling point, and designate this newly created scenario as the target scenario. This mechanism ensures that the system can automatically adapt to new business patterns, realizing the dynamic expansion of scenario classification capabilities.

[0089] In scenario classification processing, the construction of the high-dimensional index tree is a crucial data preparation process, and its implementation is specific and orderly. The system first collects differential feature data accumulated from historical business scenarios to form an initial multidimensional dataset. The first step in the construction process is to preprocess this dataset to ensure data quality. Preprocessing mainly includes two operations: first, missing value imputation, where the system fills in null or outlier values ​​that may exist in certain feature dimensions according to preset rules (such as using the mean, median, or a default value of that dimension) to ensure data integrity; second, data deduplication, where the system identifies and removes completely duplicate data points in the multidimensional space to avoid introducing redundant nodes into the tree structure, thereby improving the efficiency and accuracy of subsequent retrieval.

[0090] After preprocessing, the system begins recursively building a high-dimensional index tree. In each recursive partition, the system first needs to select a partitioning axis for the current data region to be partitioned. The selection strategy can be to select each dimension sequentially in turn, or to select the dimension with the widest distribution of the current data (i.e., the largest variance) as the partitioning axis, in order to strive to evenly divide the data space in each partition.

[0091] After selecting the splitting axis, the system calculates the values ​​of the data points in the current dataset along that axis and finds the median. This median is then used as the splitting point for this partitioning. Next, based on this splitting point, the system precisely divides the current data region into two sub-regions: data points with values ​​less than or equal to the splitting point are assigned to the left sub-region, and data points with values ​​greater than the splitting point are assigned to the right sub-region. This splitting point itself becomes a node in the index tree, recording the partitioning rules.

[0092] The above partitioning operation will continue recursively. The system uses the newly generated left and right sub-regions as input objects for the next recursive processing, repeatedly executing the process of "selecting the partition axis - calculating the partition point - partitioning the region". The termination condition of the recursion is preset, usually when the number of data points in the sub-region decreases below a certain threshold, or when the spatial range of the sub-region is smaller than the preset minimum granularity. When all sub-regions meet these termination conditions, the recursive process ends, and the high-dimensional index tree is completed. This tree structure lays the data organization foundation for subsequent scene similarity retrieval and classification, and is closely connected with the aforementioned dynamic scene update mechanism.

[0093] After identifying the target scenario, the system establishes and maintains a dedicated cache storage space. This cache space is allocated in system memory and is used to temporarily store the mapping relationships of results obtained from recent scenario classification searches. Its core purpose is to improve the response efficiency to requests with duplicate or similar features.

[0094] Specifically, each time the system completes a full backtracking search and determines the final candidate point corresponding to a target sampling point and its associated target scene, a record is generated. This record uses the feature summary or unique identifier of the candidate point as the key and its corresponding target scene identifier as the value, forming a key-value pair.

[0095] The system employs a Least Recently Used (LRU) algorithm to manage this cache space. This algorithm maintains an access timestamp for each record in the cache. When the cache space is full and a new record needs to be added, the algorithm prioritizes evicting the record with the oldest timestamp, i.e., the one that has not been accessed for the longest time. Subsequently, the new key-value pair will be stored in the cache, and its access time will be updated to the current time. Similarly, if subsequent retrieval requests can directly find the corresponding target scenario in the cache through key-value matching, the access time of that record will also be updated to the latest time.

[0096] By introducing this caching mechanism, when faced with image fusion requests that have the same or highly similar features, the system can avoid repeatedly performing time-consuming tree structure traversal and backtracking calculations, and instead directly read existing scene classification results from the cache. This significantly reduces the average processing latency, improves the overall throughput of the system, and works in conjunction with the preceding dynamic scene classification and update process to form a highly efficient and adaptive image fusion processing system.

[0097] After constructing or acquiring the scene configuration data, the system enters the final fusion processing stage. This scene configuration data is defined using a structured text exchange format, in which the fusion parameters are clearly divided into two main categories: general fusion parameters and dynamic fusion parameters.

[0098] The system first parses the scene configuration data. During parsing, the system extracts general blending parameters, which typically define the global, fundamental attributes of the composite image, such as the image resource referenced as the canvas background, and the overall width and height of the canvas. Simultaneously, the system also extracts dynamic blending parameters, which detail the specific specifications of each difference content that needs to be added or changed on the canvas, including its precise position coordinates, set layout styles (such as font, color, and alignment), and the specific text content to be presented.

[0099] After the parameters are parsed, the system calls the web page graphics drawing interface to perform the actual image compositing. The compositing process follows the order of background first, then foreground. The system first draws the specified background image onto a newly created canvas according to the general blending parameters, establishing the base of the composite image.

[0100] Subsequently, the system draws each difference on the canvas one by one according to the detailed instructions given by the dynamic fusion parameters. For image-type differences that need to be pasted, the system will draw them to the corresponding positions according to the coordinates and dimensions specified in the parameters; for text or numbers that need to be generated, the system will call the corresponding text drawing functions for rendering according to the position, style and text content defined in the parameters.

[0101] Once all layers have been drawn according to the scene configuration data, a new image incorporating the background and various dynamic elements is complete. The system can then output the image's data stream or file for subsequent display, storage, or transmission. The entire process automates and configurates the image fusion workflow by parsing structured configuration data to drive the graphics interface.

[0102] To further understand the technical solutions of the embodiments of the present invention, Figure 3 This demonstrates a complete image fusion processing workflow. The entire process uses the image information management platform as the data interaction hub, achieving closed-loop control from configuration retrieval to dynamic updates, and finally to image compositing.

[0103] First, during system initialization or operation, basic configuration data is retrieved from the image information management platform to build a built-in scene configuration database. This data is typically trained and extracted based on features from a large number of historical target images, forming reusable configuration assets. When the system receives a specific image fusion request, the core judgment logic is immediately activated: based on the scene identifier in the request, the system quickly searches its local built-in library to see if corresponding configuration data exists. This hit detection mechanism is key to improving efficiency; if the search is successful, the system will skip the tedious image analysis steps and directly extract the existing fusion parameters, proceeding to the final rendering stage.

[0104] However, when faced with entirely new business scenarios or missed requests (i.e., a negative result), the system initiates a dynamic processing loop. First, based on the environment and scene identifiers, the system precisely retrieves the corresponding target image set from the platform. Then, the image processing module intervenes, extracting common fusion parameters such as background and size through commonality analysis of the image set; secondly, it uses OCR and image recognition technologies to perform in-depth analysis of the discrepancies. The analyzed data is then sent to the difference data analysis and scene classification processing module, which uses classification algorithms (such as an optimized KD-Tree) to summarize discrete difference features into structured scene information.

[0105] Based on this, the system further executes new scenario determination logic. If the analysis results indicate that the current scenario is new, the system will trigger a configuration update mechanism: assembling the general fusion parameters extracted in the previous step with the newly generated scenario information to construct entirely new scenario configuration data. This new data will not only be immediately written to the system's local configuration for current use, but will also be synchronously updated to the image information management platform's database, thereby continuously enriching the system's knowledge base and ensuring that it can be directly reused when encountering the same scenario in the future.

[0106] Finally, regardless of whether the configuration information is obtained through direct retrieval or generated through real-time calculation and updates, it will be uniformly parsed into specific fusion parameters (including image layers, text coordinates, style attributes, etc.). The system calls the Canvas graphics interface and strictly follows these parameter instructions to accurately draw the background image, difference images, and dynamic text on the canvas, ultimately outputting the composited new image. This process, through a dynamic update strategy that checks for omissions and fills in gaps, enables the image fusion system to continuously evolve in terms of processing efficiency and scene coverage.

[0107] The image fusion method and apparatus based on scene configuration provided in this invention have achieved significant and multifaceted technical effects in practical applications by constructing a complete technical solution with scene-based configuration as the core and combining intelligent analysis and autonomous learning capabilities. These effects are specifically reflected in the following aspects: First, it significantly improves the processing efficiency and system performance of image fusion.

[0108] By introducing a scenario configuration data mechanism, the system can directly reuse pre-trained and stored fusion parameters for previously processed identical or highly similar business scenarios, completely avoiding time-consuming operations such as repeated image parsing, feature comparison, and classification calculations. This configuration-as-you-go mode significantly shortens response time and reduces computational resource consumption. Simultaneously, in conjunction with caching mechanisms (such as LRU) to accelerate frequently accessed scenario mapping relationships, the overall throughput and real-time performance of the system are further improved.

[0109] Second, it achieves intelligent and highly accurate integration processes.

[0110] This invention integrates OCR technology into the image feature analysis process, effectively solving the problem of insufficient processing capabilities of traditional methods for non-image difference content such as text and numbers in images, and can accurately identify and extract their content and attributes. Furthermore, by optimizing the traditional KD-Tree algorithm, a dynamic distance threshold judgment and scene creation mechanism are introduced, making the scene classification process not only fast but also adaptive. It can accurately distinguish similar scenes and intelligently create new scenes when encountering entirely new feature combinations, thereby continuously improving the accuracy of classification and the coverage of the system.

[0111] Third, it enhances the system's adaptability and maintainability in multiple environments and scenarios.

[0112] By designing an image information management platform that supports multiple environments and scenarios, and employing a mechanism that generates encrypted indexes based on environment and scenario identifiers, strict environment isolation and precise location of image resources and configuration data are achieved. This allows the same business logic to seamlessly adapt to different environments such as development, testing, and production, as well as diverse business scenario requirements. Simultaneously, the visual management platform and structured configuration data (such as JSON format) greatly reduce the complexity of configuration maintenance, improving the system's manageability and scalability.

[0113] Fourth, it has promoted the effective reuse of business resources and the accumulation of knowledge.

[0114] This invention transforms the parameters determined from a successful image fusion process into persistent scene configuration data and stores it in a knowledge base. This not only reduces development and maintenance costs, but more importantly, it transforms discrete image processing experience into structured knowledge that the system can share and reuse. As the system continues to operate and the knowledge base is continuously enriched, the overall processing capability and intelligence level of the system also continuously evolve, forming a virtuous cycle of self-reinforcing growth.

[0115] This invention successfully constructs an efficient, accurate, flexible, and self-learning image fusion system by organically combining technologies such as configurable management, intelligent feature recognition, dynamic scene classification, and efficient image synthesis. It effectively overcomes key shortcomings of existing technologies, such as high development and maintenance costs, poor scene adaptability, low processing efficiency, and lack of resource reuse, providing strong technical support for various applications requiring dynamic and personalized image generation.

[0116] The following describes the scene-configuration-based image fusion apparatus provided by the embodiments of the present invention. The scene-configuration-based image fusion apparatus described below and the scene-configuration-based image fusion method described above can be referred to in correspondence with each other.

[0117] This invention provides an image fusion device based on scene configuration, see [link to relevant documentation]. Figure 4 ,include: The request processing module 410 is used to respond to an image fusion request carrying a scene identifier and obtain a set of images to be fused associated with the scene identifier; Feature parsing module 420 is used to perform feature parsing on the set of images to be fused and extract difference feature data that characterizes the differences between the images; The scene analysis module 430 is used to classify and analyze the difference feature data, determine the layout attributes that are suitable for the current scene, and construct scene configuration data containing fusion parameters based on the layout attributes. The image synthesis module 440 is used to perform fusion processing on the set of images to be fused according to the scene configuration data.

[0118] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can invoke logical instructions in the memory 830 to execute a scene-configured image fusion method. This method includes: in response to an image fusion request carrying a scene identifier, acquiring a set of images to be fused associated with the scene identifier; performing feature parsing on the set of images to be fused to extract difference feature data representing the differences between images; performing classification analysis on the difference feature data to determine layout attributes suitable for the current scene; constructing scene configuration data containing fusion parameters based on the layout attributes; and performing fusion processing on the set of images to be fused based on the scene configuration data.

[0119] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0120] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the scene-configuration-based image fusion method provided by the above methods. The method includes: in response to an image fusion request carrying a scene identifier, obtaining a set of images to be fused associated with the scene identifier; performing feature parsing on the set of images to be fused to extract difference feature data representing the differences between the images; performing classification analysis on the difference feature data to determine layout attributes suitable for the current scene; constructing scene configuration data containing fusion parameters based on the layout attributes; and performing fusion processing on the set of images to be fused based on the scene configuration data.

[0121] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the scene-configuration-based image fusion method provided by the above methods. The method includes: in response to an image fusion request carrying a scene identifier, obtaining a set of images to be fused associated with the scene identifier; performing feature parsing on the set of images to be fused to extract difference feature data characterizing the differences between the images; performing classification analysis on the difference feature data to determine layout attributes suitable for the current scene; constructing scene configuration data containing fusion parameters based on the layout attributes; and performing fusion processing on the set of images to be fused based on the scene configuration data.

[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

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

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image fusion method based on scene configuration, characterized in that, include: In response to an image fusion request carrying a scene identifier, obtain the set of images to be fused associated with the scene identifier; The image set to be fused is subjected to feature analysis to extract difference feature data representing the differences between the images; The difference feature data is classified and analyzed to determine the layout attributes suitable for the current scene, and scene configuration data containing fusion parameters is constructed based on the layout attributes. The set of images to be merged is fused according to the scene configuration data.

2. The method according to claim 1, characterized in that, The step of performing feature analysis on the image set to be fused and extracting difference feature data representing the differences between images includes: Read multiple images from the image set to be fused, and compare them to obtain the difference regions between the multiple images; Identify the data type of the differing regions; If the data type of the difference region is an image, obtain the image attribute information of the difference region; If the data type of the difference region is not an image type, optical character recognition technology is used to identify the difference region and obtain text attribute information including coordinates and size; The image attribute information and the text attribute information are summarized into the difference features.

3. The method according to claim 1, characterized in that, The step of classifying and analyzing the difference feature data to determine the layout attributes suitable for the current scene includes: Transform the differential feature data into a multidimensional dataset; The multidimensional dataset is classified and retrieved according to a high-dimensional indexed tree data structure algorithm to determine the target scene to which the differential feature data belongs. The location information and layout rules corresponding to the target scene are determined as the layout attributes.

4. The method according to claim 3, characterized in that, The step of performing scene classification retrieval on the multidimensional dataset based on the high-dimensional indexed tree data structure algorithm to determine the target scene to which the differential feature data belongs specifically includes: The data to be classified in the multidimensional dataset is used as target sampling points, and candidate points are determined by searching in a pre-built high-dimensional index tree. During the backtracking process, if the first distance between the node traversed in the high-dimensional index tree and the target sampling point is less than the second distance between the candidate point and the target sampling point, the candidate point is updated to the node traversed in the high-dimensional index tree. Set a preset distance threshold between the target sampling point and the candidate point; Determine whether the final distance between the candidate point and the target sampling point determined after the backtracking is less than or equal to the preset distance threshold: If so, the scene to which the candidate point belongs is determined as the target scene; If not, create a new scene based on the target sampling point, and determine the new scene as the target scene.

5. The method according to claim 4, characterized in that, The steps for constructing the high-dimensional index tree include: The multidimensional dataset is preprocessed, including missing value imputation and data deduplication. Select a segmentation coordinate axis and calculate the median of the cube on the segmentation coordinate axis as the segmentation point; The current data region is divided into sub-regions based on the aforementioned dividing points; The region partitioning operation is executed recursively until each sub-region meets the preset termination condition, thus completing the construction of the high-dimensional index tree.

6. The method according to claim 4, characterized in that, After determining the target scene, the method further includes: Configure cache storage space; The cache storage space is updated according to the Least Recently Used algorithm, and the candidate points determined after the backtracking is completed and their corresponding target scenes are associated and stored in the cache storage space.

7. The method according to claim 1, characterized in that, The image fusion request also includes an environment identifier; Before the step of obtaining the set of images to be fused associated with the scene identifier, the method further includes: Based on the encryption algorithm, an encrypted identifier string is generated using the environment identifier and the scene identifier; Using the encrypted identifier string as a unique index, the corresponding set of images to be merged is searched and obtained in the preset image information management platform.

8. The method according to claim 1, characterized in that, The scene configuration data adopts a preset text exchange format, and the fusion parameters include general fusion parameters and dynamic fusion parameters; The step of performing fusion processing on the set of images to be fused based on the scene configuration data includes: Parse the scene configuration data to extract the general fusion parameters and dynamic fusion parameters, including position coordinates, layout style, and text content; The web page graphics drawing interface is called to draw the background according to the general fusion parameters, and the difference content is drawn according to the dynamic fusion parameters to synthesize and generate a new image.

9. An image fusion device based on scene configuration, characterized in that, include: The request processing module is used to respond to an image fusion request carrying a scene identifier and obtain a set of images to be fused associated with the scene identifier; The feature parsing module is used to perform feature parsing on the set of images to be fused and extract difference feature data that characterizes the differences between the images. The scene analysis module is used to classify and analyze the difference feature data, determine the layout attributes that are suitable for the current scene, and construct scene configuration data containing fusion parameters based on the layout attributes. The image synthesis module is used to perform fusion processing on the set of images to be fused according to the scene configuration data.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the scene-configuration-based image fusion method as described in any one of claims 1 to 8.