Definition method, device and storage medium of image extension region interaction

By constructing constraints and calculating extended pixel values, the problem of low interaction efficiency in image extension regions is solved, achieving an efficient and accurate image extension process that ensures visual consistency and boundary fusion.

CN122239998BActive Publication Date: 2026-07-21DONSON TIMES INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONSON TIMES INFORMATION TECH CO LTD
Filing Date
2026-05-22
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, the interaction efficiency of image expansion areas is low. Users need to manually drag and adjust the selection area to approach the target ratio, resulting in low interaction efficiency.

Method used

By responding to interactive operations in the image editing interface, constraints are constructed, the minimum expansion region is calculated, and the expansion reference range is aligned with the boundary of the original image to generate expansion pixel values. These values ​​are then input into the AI ​​image expansion model to obtain the target expansion region.

Benefits of technology

It improves the accuracy and visual consistency of image expansion, achieves efficient linkage between interactive operation and expansion generation, and ensures visual consistency and boundary fusion between the expanded area and the original image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122239998B_ABST
    Figure CN122239998B_ABST
Patent Text Reader

Abstract

The application discloses a definition method, device and storage medium of image expansion region interaction, relates to the technical field of image processing, and comprises the following steps: in response to an interaction operation, constructing constraint conditions corresponding to an image expansion scene according to interaction coordinate information corresponding to the interaction operation and canvas reference parameters; determining an expansion reference range according to an original image size, the constraint conditions and a target picture frame ratio; obtaining expansion pixel values according to geometric differences between the expansion reference range and the original image size; and inputting expansion pixel parameters converted through the expansion pixel values into an AI image expansion model to obtain a target expansion region. The application constructs expansion constraints by combining interaction coordinates and canvas references, determines an expansion reference range and converts expansion pixel parameters to input the AI image expansion model, solves the problem of low interaction efficiency of image expansion, improves image expansion accuracy and visual consistency, and realizes efficient and controllable intelligent expansion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus and storage medium for defining interactive extended regions of an image. Background Technology

[0002] In image extension applications based on generative artificial intelligence, the quality of the extended region definition and the efficiency of interaction directly affect the image generation effect, ease of operation, and system processing efficiency. Constraint mechanisms adapted to the image extension scenario, automated calculation methods, and the ability to synchronize front-end and back-end parameters in real time are the core foundations for achieving high-quality, high-efficiency image extension.

[0003] In related technologies, users typically adjust the size, position, and aspect ratio of the selection area by manually dragging and dropping to determine the generated range of the image expansion. This method requires users to manually drag and drop to continuously adjust the size of the selection area to approach the target aspect ratio, resulting in low interactive efficiency of image expansion.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a method, device, and storage medium for defining interactive regions of an image extension area, aiming to solve the technical problem of low efficiency in interactive regions of image extension.

[0006] To achieve the above objectives, this application proposes a method for defining interactive extended regions of an image, the method comprising: In response to interactive operations in the image editing interface, constraints corresponding to the image extension scene are constructed based on the interactive coordinate information and canvas reference parameters corresponding to the interactive operations. The original image size is matched and calculated according to the target frame ratio to obtain the minimum expansion area. The minimum expansion area is then calibrated according to the constraints to obtain the expansion reference range corresponding to the original image. The boundary coordinates of the extended reference range are mapped and aligned with the boundary coordinates of the original image, the geometric difference of each boundary is calculated, and the geometric difference is converted into the corresponding extended pixel value. The extended pixel parameters obtained by converting the extended pixel values ​​are input into the AI ​​image extension model to obtain the target extended region.

[0007] In one embodiment, the interactive environment corresponding to the original image is initialized based on the canvas reference parameters and the boundary information of the original image; The interactive operation in the image editing interface is detected by the interactive environment to determine the operation type and target of the interactive operation. Based on the operation type and the target object, and combined with the boundary information of the original image, the drag direction and extension intent of the interactive operation are parsed and obtained. Based on the drag direction and expansion intention of the interactive operation, the coordinate system of the original image and the canvas is normalized to generate an initial interactive coordinate set under a unified reference. Based on the boundary information of the original image and the semantic requirements of image expansion, invalid coordinates that cause the expanded region to intrude into the interior of the original image are removed, and the interaction coordinate information corresponding to the interaction operation is obtained.

[0008] In one embodiment, the canvas reference parameters are used as constraint references, and the interaction coordinate information is combined with the reference calibration process to obtain the interaction feature parameters. Based on the aforementioned constraint benchmarks and hard constraint rules, core constraint conditions are generated; The interactive feature parameters and the core constraints are matched with the user's extended adjustment requirements to construct a multi-dimensional constraint set; The multi-dimensional constraint set is logically integrated and conflict-resolved according to constraint priority to obtain the constraint conditions adapted to this image expansion.

[0009] In one embodiment, the original image size is matched and calculated according to the target frame ratio to obtain the minimum expansion area; Based on the minimum expansion region, and combined with the mandatory rule that the original image is completely contained in the constraint conditions, the minimum expansion region parameters are obtained; Based on the minimum expansion region parameters, and in conjunction with the alignment constraints, boundary limitation rules, and optimal minimum expansion rules in the constraints, the region position is calibrated to obtain the expansion reference range.

[0010] In one embodiment, the difference between the original image size and the size of the minimum expansion region is compared, and the minimum expansion increment value corresponding to each boundary is calculated by combining the minimum expansion region parameter; According to the alignment constraints and boundary limitation rules in the constraints, the minimum expansion increment values ​​corresponding to each boundary of the image are calibrated to obtain the target expansion region parameters. The target extended region parameters are matched with the canvas reference parameters corresponding to the original image using coordinate system matching, and the corresponding associated coordinate system parameters are used to generate the extended reference range.

[0011] In one embodiment, based on the extended reference range and the original image size, a pixel mapping reference between the extended region coordinates and the original pixel coordinates is constructed according to a coordinate mapping algorithm; Based on the pixel mapping reference, calculate the boundary offset and region overlap relationship between the extended reference range and the original image; The geometric difference between the extended reference range and the original image size is calculated using the boundary offset and the region overlap relationship. The geometric difference is normalized to pixel precision, and non-integer pixels and abnormal data that exceed the canvas range are removed to obtain the standardized difference parameter. The standardized difference parameters are transformed according to pixel-level coordinate mapping rules to obtain the extended pixel values ​​of the image extension.

[0012] In one embodiment, visual information corresponding to the original image is extracted, and combined with the extended pixel values, a visual association mapping table between the extended region and the original image is constructed; According to the model parameter output specification and parameter conversion rules, the extended pixel values ​​are converted into the extended pixel parameters; The extended pixel parameters and the visual association mapping table are synchronously input into the AI ​​image extension model to match the texture details and color tone of the original image, thereby expanding and obtaining extended candidate results; Based on the extended region quality verification standard, the extended candidate results are verified for quality, quality defects are corrected, and the target extended region is obtained.

[0013] In one embodiment, according to the display specifications of the image editing interface, the target extended region and the original image are layered and overlaid, and the boundary of the extended region and the extended pixel value corresponding to the target extended region are marked to obtain the visual display screen data; The visualization display data is output to the image editing interface to achieve an intuitive display of the target extended area and the extended pixel value; Detect user interaction feedback on the image editing interface and capture user instructions for adjusting the visual display content; The display screen data and the extended pixel value are updated according to the adjustment instructions to achieve real-time human-computer interaction.

[0014] Furthermore, to achieve the above objectives, this application also proposes an image extended region interaction definition device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image extended region interaction definition method as described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the image extended region interaction definition method as described above.

[0016] This application provides a method for defining interactive image expansion regions. The method involves responding to interactive operations in an image editing interface, constructing constraints for the image expansion scene based on the interactive coordinate information corresponding to the interactive operation and canvas reference parameters, determining the expansion reference range corresponding to the original image by combining the original image size, the constraints, and the target aspect ratio, obtaining the expansion pixel value based on the geometric difference between the expansion reference range and the original image size, and finally inputting the expansion pixel parameter obtained by converting the expansion pixel value into an artificial intelligence image expansion model to obtain the target expansion region. This method solves the technical problems of mismatch between interactive operations and expansion rules, inaccurate expansion range, abrupt visual connection between the expansion region and the original image, and the inability of users to intuitively participate in the expansion process in existing image expansion processes. It improves the accuracy and compliance of image expansion, ensures visual consistency and boundary fusion between the expansion region and the original image, and achieves efficient linkage between interactive operations and expansion generation, making the image expansion process more user-friendly and controllable.

[0017] In summary, this application solves the technical problem of low overall process efficiency by combining interactive coordinates and canvas reference to construct extension constraints, determine the extension reference range, and convert the extension pixel parameters into input AI image extension models. This improves the accuracy and visual consistency of image extension and achieves efficient and controllable intelligent extension. Attached Figure Description

[0018] 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.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the first embodiment of the method for defining image extended region interaction in this application; Figure 2 This is a schematic diagram illustrating the constraints of this application; Figure 3 This is a schematic diagram illustrating the extended scope of this application; Figure 4This is a flowchart illustrating the sixth embodiment of the method for defining image extension region interaction in this application; Figure 5 This is a flowchart illustrating the eighth embodiment of the method for defining image extension region interaction in this application; Figure 6 This is a schematic diagram of the structure of the device defining the image extension area interaction in this application.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] In related technologies, users typically adjust the size, position, and aspect ratio of the selection area by manually dragging and dropping to determine the generated range of the image expansion. This method requires users to manually drag and drop to continuously adjust the size of the selection area to approach the target aspect ratio, resulting in low interactive efficiency of image expansion.

[0024] This application provides a solution: First, in response to interactive operations in the image editing interface, constraints corresponding to the image expansion scene are constructed based on the interactive coordinate information and canvas reference parameters corresponding to the interactive operations. Then, the original image size is matched and calculated according to the target frame ratio to obtain the minimum expansion area. The minimum expansion area is calibrated according to the constraints to obtain the expansion reference range corresponding to the original image. The boundary coordinates of the expansion reference range are then mapped and aligned with the boundary coordinates of the original image to calculate the geometric difference of each boundary. The geometric difference is then converted into the corresponding expansion pixel value. Finally, the expansion pixel parameters obtained by converting the expansion pixel values ​​are input into the AI ​​image expansion model to obtain the target expansion area.

[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or an image extended region interaction definition device capable of realizing the above functions. The following description uses an image extended region interaction definition device as an example to illustrate this embodiment and the subsequent embodiments.

[0026] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0027] This application provides a method for defining interactive extended regions of an image, referring to... Figure 1 , Figure 1This is a flowchart illustrating the first embodiment of the method for defining interactive image extended regions in this application.

[0028] In this embodiment, the method for defining the interaction of the image extended region includes steps S10 to S40: Step S10: In response to the interactive operation in the image editing interface, construct the constraint conditions corresponding to the image extended scene based on the interactive coordinate information corresponding to the interactive operation and the canvas reference parameters.

[0029] Interactive operations are the core control commands that trigger image expansion tasks. Interactive coordinate information describes the position, trajectory, and behavioral characteristics of user interactions within the interface. Examples include the position of interactive control points, drag trajectory, boundary adjustment direction, and interaction pause position. Canvas baseline parameters are the basic configuration indicators describing the coordinate system, boundary range, and original image position of the image editing canvas. Examples include canvas coordinate system mapping rules, maximum canvas size boundary, the position of the original image within the canvas, and the boundary range of the original image. Constraints describe various limiting rules in the image expansion scenario. Examples include constraints on the complete inclusion of the original image, target aspect ratio constraints, alignment constraints, and canvas boundary constraints.

[0030] In this embodiment, the above-mentioned interactive operations can be triggered in six ways. First, drag-and-drop triggering: When the user drags the boundary control points of the original image, the system detects the dragging action and automatically generates an image expansion task, triggering the acquisition process of the interactive operation. Second, ratio preset triggering: When the user selects a preset target aspect ratio in the interface, the system receives the ratio selection instruction and automatically triggers an image expansion task, initiating the acquisition of interactive parameters. Third, canvas edge triggering: When the user drags the original image to the edge of the canvas, the system detects the risk of the image exceeding the canvas boundary and automatically triggers an image expansion task to complete the image content within the canvas. Fourth, one-click expansion triggering: When the user clicks the AI ​​one-click expansion button in the interface, the system receives the user's expansion request and automatically triggers an image expansion task, initiating the full-process expansion processing. Fifth, cropping and completion triggering: When the user performs a cropping operation on the original image, the system detects missing content in the cropped image and automatically triggers an image expansion task to complete the missing image content. Sixth, manual selection triggers the system. Users can manually select the area to be expanded through the interactive interface. After receiving the selection command, the system will automatically trigger the image expansion task and perform expansion processing on the selected area.

[0031] Once the image editing interface detects the interaction, it begins to collect the corresponding interaction coordinate information and canvas reference parameters.

[0032] For example, the acquisition of interactive coordinate information and canvas reference parameters, as well as the construction of constraints, include two methods. The first is synchronous acquisition and hierarchical constraint construction. Before the extended task officially starts, the canvas metadata is read to obtain the canvas coordinate system, boundary range, and original image position. Then, the user's interactive coordinates are read to obtain the control point position and drag direction. All interactive coordinate information and canvas reference parameters are collected and uniformly output to the constraint construction module after acquisition. Subsequently, three basic constraints are extracted: original image completeness constraint, target aspect ratio constraint, and alignment constraint. These three types of constraints are hierarchically sorted according to preset priority rules and integrated to form a hierarchical constraint set, thus completing the construction of constraints. This method has a simple and stable acquisition logic, is less prone to data loss or statistical errors, and can provide a comprehensive and reliable basis for constraint construction, adapting to common image extension scenarios.

[0033] The second approach involves streaming incremental asynchronous data acquisition and intent-aware constraint construction. During user interaction, incremental parameter acquisition is performed while detecting the user's dragging actions, collecting the user's interaction coordinates frame by frame, and accumulating and statistically analyzing the user's interaction trajectory. Once the user's interaction is complete, the complete interaction coordinate information is obtained. Simultaneously, the canvas's baseline parameters are asynchronously sampled at fixed time intervals, and the average value of these baseline parameters within the sampling period is taken as the canvas's baseline parameters. Subsequently, the user's interaction trajectory is analyzed in real time, extracting behavioral features such as dragging speed, pause position, and number of adjustments to identify the user's extended intent. Based on the identified user intent, the priority and limiting parameters of each constraint are dynamically adjusted to generate dynamic constraint conditions that fit the user's intent. This method executes synchronously with the user's interaction process, making full use of idle time periods during interaction to complete data acquisition, while also catering to the user's personalized extended needs and adapting to complex personalized image editing scenarios.

[0034] In an exemplary scheme for constructing constraints, a pre-set set of basic constraint templates is first loaded. This set includes four types of basic constraint templates: original image complete inclusion constraint, target aspect ratio constraint, alignment constraint, and canvas boundary constraint. Each template is pre-configured with a corresponding adaptation threshold and priority weight. Then, a preliminary screening of basic parameters is performed. The interactive coordinate information is compared with the original image boundary position in the canvas reference parameters, and the user-set target aspect ratio is compared with a pre-set aspect ratio threshold range to select basic constraint templates that fit the current interaction scenario. Next, for the original image complete inclusion constraint that passed the preliminary screening, it is verified whether the basic constraint template meets the rule that the extended area must not intrude into the original image, and whether it meets the mandatory requirement that the extended area completely includes the original image. For the target aspect ratio constraint that passed the preliminary screening, it is verified whether the basic constraint template is compatible with the aspect ratio of the current original image and whether it conforms to the canvas size limitations. For the alignment constraint that passed the preliminary screening, it is verified whether the basic constraint template matches the user's interactive operation intent and whether there are any constraint conflicts. For the canvas boundary constraints that pass the initial screening, the basic constraint template is verified to ensure it conforms to the maximum size limit of the current canvas and to eliminate any risk of exceeding the canvas's boundaries. Next, constraint conflict resolution is performed. All selected constraints are checked for conflicts; if conflicts exist, the parameters of lower-priority constraints are automatically adjusted according to their priority weights to resolve the conflicts. Finally, all constraints that pass verification and conflict resolution are summarized to generate the final constraint conditions corresponding to the image extension scene, which are used to determine the subsequent extension reference range.

[0035] Step S20: Match the original image size to the target frame ratio to obtain the minimum expansion area, and calibrate the minimum expansion area according to the constraint conditions to obtain the expansion reference range corresponding to the original image.

[0036] The minimum expansion area is the smallest image area that can fully contain the original image while adapting to the target aspect ratio. It is the basic carrier for subsequent parameter calibration and position adjustment.

[0037] In this embodiment, there are three ways to determine the expansion reference range. First, the optimal minimum expansion rule calculation: the original image size, constraints, and target aspect ratio are input into a preset optimal minimum expansion calculation model. The difference between the aspect ratio of the original image and the target aspect ratio is compared to determine the minimum expansion dimension. The minimum expansion region size that satisfies all constraints is calculated, ultimately obtaining the expansion reference range corresponding to the original image. This method minimizes the size of the expansion region while satisfying all constraints, reducing the computational load of the AI ​​model, improving the speed of expansion processing, and adapting to common image expansion scenarios. Second, user intent-adapted elastic expansion calculation: the user's expansion intent is first identified based on the user's interaction trajectory. If the user's dragging range exceeds a preset minimum expansion threshold, the size of the expansion region is flexibly adjusted according to the user's dragging range while ensuring all constraints are met, ultimately obtaining an elastic expansion reference range that fits the user's dragging intent. This method can flexibly adjust the expansion range according to the user's actual operational needs, is not limited to a fixed minimum expansion rule, and can fully meet the user's personalized expansion needs, adapting to scenarios where users have clear expansion range requirements. Thirdly, the limited expansion calculation for canvas boundary adaptation first detects the maximum size limit of the current canvas. If the expansion range calculated according to the optimal minimum expansion rule exceeds the maximum size of the canvas, the scale of the expansion range is automatically adjusted to limit the expansion range within the canvas boundary, while ensuring the complete inclusion of the original image and adaptation to the target image aspect ratio. This ultimately yields a limited expansion reference range for the canvas. This method is suitable for scenarios with limited canvas size, avoiding content loss caused by the expansion area exceeding the canvas limit, and is well-suited for image editing scenarios with limited canvas size.

[0038] In an exemplary scheme for determining the extended reference range, a pre-set set of extended calculation rules is first loaded. This set includes three basic types of calculation rules: optimal minimum extended rules, flexible extended rules, and restricted extended rules. Each rule is pre-configured with a corresponding adaptation threshold and calculation parameters. Next, scene determination is performed. First, it checks whether the user's dragging range exceeds the preset minimum extended threshold. Then, it checks whether the calculated extended range exceeds the maximum size of the current canvas to determine the appropriate calculation rule for the current scene. If the user's dragging range does not exceed the threshold and the extended range does not exceed the canvas, the optimal minimum extended rule is selected. If the user's dragging range exceeds the threshold, the flexible extended rule is selected. If the extended range exceeds the canvas, the restricted extended rule is selected. Next, parameter input is performed, inputting the original image size, constraints, and target aspect ratio into the selected calculation rule. Then, dimension determination is performed, comparing the difference between the aspect ratio of the original image and the target aspect ratio to determine the dimensional direction of the extended range. Finally, range calculation is performed, calculating the boundary position and size of the extended region that satisfies all constraints according to the selected rule, generating a preliminary extended reference range. Then, constraint verification is performed to check whether the initial extended reference range meets all constraint conditions. If any conditions are not met, the parameters are automatically adjusted and recalculated. Finally, the verified extended reference range is output for subsequent calculation of extended pixel values.

[0039] Step S30: Map and align the boundary coordinates of the extended reference range with the boundary coordinates of the original image, calculate the geometric difference of each boundary, and convert the geometric difference into the corresponding extended pixel value.

[0040] Geometric difference is a quantized difference metric that describes the boundary offset and regional differences between the expanded reference range and the original image size. Expanded pixel value is a quantized parameter describing the number of pixels required to fill each boundary for image expansion. Examples include the number of pixels expanded at the left boundary, right boundary, top boundary, and bottom boundary.

[0041] In this embodiment, there are three ways to calculate the geometric difference to obtain the extended pixel value. First, pixel-level coordinate mapping difference calculation: First, a mapping relationship is established between the canvas interactive coordinates and the actual pixel coordinates of the image. The boundary coordinates of the extended reference range are mapped and aligned with the boundary coordinates of the original image. The pixel-level offset between the two boundaries is calculated to obtain the geometric difference of each boundary. Then, the geometric difference is converted into the corresponding extended pixel value. This method has high calculation accuracy and can achieve precise pixel-level difference calculation, making it suitable for scenarios with high requirements for extended accuracy.

[0042] Secondly, the block-based incremental difference batch calculation first divides the original image and the extended reference range into multiple image blocks of the same size. The positional offset and size difference of each image block are calculated in batches, and the overall geometric difference is obtained by summing the results. Then, these differences are batch-converted into extended pixel values ​​for each boundary. This method can process image blocks in batches, has a fast calculation speed, and can significantly improve the efficiency of difference calculation, making it suitable for extended scenarios with large-size images.

[0043] Thirdly, edge-aligned difference compensation calculation first calculates the boundary offset between the extended reference range and the original image to obtain an initial geometric difference. Then, based on the edge pixel distribution characteristics of the original image, the edge difference is compensated and adjusted to avoid non-integer edge pixels, ensuring edge alignment accuracy. Finally, the compensated extended pixel value is obtained. This method can compensate for edge differences, improve edge alignment accuracy, avoid edge blurring, and is suitable for scenarios with high edge quality requirements.

[0044] In an exemplary scheme for calculating extended pixel values, a pre-set set of difference calculation rules is first loaded. This set includes three basic calculation rules: pixel-level coordinate mapping rules, block-based incremental calculation rules, and edge-aligned compensation rules. Each rule is pre-configured with corresponding adaptation thresholds and calculation parameters. Next, image size determination is performed. Based on the size of the original image, an appropriate difference calculation rule is selected. If the original image size is smaller than a preset large size threshold, a pixel-level coordinate mapping rule is selected; if the original image size is larger than the preset large size threshold, a block-based incremental calculation rule is selected; if the user has enabled the edge enhancement option, an edge-aligned compensation rule is selected. Coordinate mapping is then performed, aligning the boundary coordinates of the extended reference range with the boundary coordinates of the original image to obtain the aligned boundary positions. Difference calculation is then performed, calculating the geometric difference between the two boundaries according to the selected rule. If the edge-aligned compensation rule is selected, edge difference compensation is performed simultaneously. Finally, pixel normalization is performed, converting the geometric difference into integer pixel values ​​and removing abnormal non-integer pixel data. Finally, the normalized boundary pixel values ​​are summed to obtain the final extended pixel values, which are used for subsequent conversion of extended pixel parameters.

[0045] Step S40: Input the extended pixel parameters obtained by converting the extended pixel values ​​into the AI ​​image extension model to obtain the target extended region.

[0046] Extended pixel parameters are standardized input parameters obtained through extended pixel value transformation, adapted to the input specifications of the AI ​​image extension model. The AI ​​image extension model is a pre-trained artificial intelligence generative model used to generate extended region image content. The target extended region is the completed extended region content generated by the AI ​​model.

[0047] In this embodiment, there are three ways to obtain the target extended region from the input model. First, a hierarchical feature-associative input method is used. This involves extracting core visual features from the original image, such as edge texture, color distribution, and detail features, and constructing a visual feature association mapping between the extended region and the original image. Then, the extended pixel parameters and the visual feature association mapping are synchronously input into the AI ​​image extension model, guiding the model to generate extended region content that is visually consistent with the original image. This method ensures visual consistency between the extended region and the original image, avoiding issues such as edge discrepancies and color deviations, and is suitable for scenarios with high visual quality requirements.

[0048] Secondly, the input is segmented asynchronously. Based on the total size of the extended region determined by the extended pixel parameters and the boundary connection requirements of the original image, the extended region to be generated is uniformly divided into multiple image blocks of the same size, without spatial overlap, and with unique sequence numbers along the boundary direction connecting with the original image. At the same time, for the boundary regions connecting the original image and each extended block, the visual features such as texture details, color tone, and illumination distribution of the corresponding blocks are extracted synchronously, and a one-to-one binding relationship is established between the features of each extended block and the corresponding boundary block of the original image. Subsequently, following the sequence numbering of the blocks, the extended pixel sub-parameters corresponding to each block and the corresponding block features of the original image are asynchronously input into the AI ​​image expansion model. This allows for the initiation of the first block's generation calculation without waiting for all block parameters and features to be fully input. This achieves incremental asynchronous processing of block generation while inputting block data. Simultaneously, parameter standardization and feature extraction preprocessing for the next block are completed. After all the expanded content for all blocks has been generated, seamless stitching and consistency calibration are performed according to the block sequence number and boundary connection features, ultimately yielding the complete target expanded region. This method achieves full parallelization of the model generation and data preprocessing processes through block decomposition, reducing the overall processing time for large-size image expansion. Furthermore, by binding each block to the boundary features of the original image, visual consistency between the generated content of each block and the original image is ensured.

[0049] Third, multi-constraint guided input first converts the constraints into model-recognizable guiding parameters, then simultaneously inputs the extended pixel parameters and guiding parameters into the AI ​​image extension model. This guides the model to adhere to the constraints during the generation process, ensuring that the generated extended region meets all constraints. This method guides the model's generation process through constraints, preventing the model from generating content that does not conform to constraints, improving the compliance of the generated results, and making it suitable for extension scenarios with strict constraint requirements.

[0050] In the exemplary scheme for obtaining the target expanded region, the system first loads a pre-set set of model input rules. This set includes three basic input rules: hierarchical feature association input rules, incremental block asynchronous input rules, and multi-constraint guided input rules. Each rule is pre-configured with corresponding adaptation thresholds and input parameters. Then, scene determination is performed, selecting an appropriate input rule based on the size of the original image, the user's quality requirements, and the strictness of the constraints. If the user has enabled high-quality mode, the hierarchical feature association input rule is selected; if the original image size is larger than the preset large size threshold, the incremental block asynchronous input rule is selected; and if strict constraints exist, the multi-constraint guided input rule is selected. Next, parameter conversion is performed, converting the expanded pixel values ​​into expanded pixel parameters that adapt to the model input specifications. Then, feature extraction is performed, extracting visual features or constraint guidance parameters from the original image according to the selected rules. Next, model input is performed, synchronously inputting the expanded pixel parameters and extracted features or guidance parameters into the AI ​​image expansion model to initiate the model generation process. Finally, generation result verification is performed, conducting a full-dimensional quality check on the initial expanded region generated by the model and correcting any quality defects. Finally, the verified extended region is output to obtain the final target extended region.

[0051] Further, please refer to Figure 2 , Figure 2 This is a flowchart of the image expansion process for this application. In the image expansion region interaction definition system, the user-initiated image expansion interaction operation is first received through the user interface. The interaction capture module captures the interaction coordinate information and canvas reference parameters corresponding to the interaction operation in real time, and inputs the collected basic parameters into the multi-constraint solving engine to complete the construction and solution of multi-dimensional constraints in the image expansion scenario. Subsequently, the multi-constraint solving engine synchronously distributes the processed parameters to the intelligent region planning module and the parameter mapping conversion module. The intelligent region planning module combines the original image size, constraints, and target aspect ratio to complete the intelligent planning of the expansion reference range corresponding to the original image. The parameter mapping conversion module, based on the geometric difference between the expansion reference range and the original image size, completes the mapping conversion of the expansion pixel values ​​to the standardized expansion pixel parameters input to the adaptation model. After the parallel processing of the two modules is completed, the planned expansion range and the converted expansion pixel parameters are synchronously input into the visualization feedback module to complete the visualization display of the expansion region and the corresponding expansion pixel parameters, providing users with an intuitive preview of the expansion range and interactive feedback. Finally, the verified standardized expansion pixel parameters are input into the AI ​​image generation model to drive the model to intelligently generate the target expansion region.

[0052] Second Embodiment This embodiment provides an exemplary scheme for interactive coordinate preprocessing. In this example, the interactive environment is first initialized using canvas reference parameters and original image boundary information. Then, the interactive operation is detected and its drag direction and expansion intent are parsed using the initialized interactive environment. Subsequently, coordinate system normalization is performed based on the parsing results to generate an initial interactive coordinate set. Finally, invalid coordinates are processed through boundary and semantic constraints to obtain valid interactive coordinate information that can be directly used for subsequent constraint construction. Before step S10, steps A11 to A15 are also included: Step A11: Initialize the interactive environment corresponding to the original image based on the canvas reference parameters and the boundary information of the original image.

[0053] Step A12: Detect the interactive operation in the image editing interface through the interactive environment, and determine the operation type and target of the interactive operation.

[0054] Step A13: Based on the operation type and the target object, and combined with the boundary information of the original image, the drag direction and extension intent of the interactive operation are parsed and obtained.

[0055] Step A14: Based on the drag direction and expansion intention of the interactive operation, normalize the coordinate system of the original image and the canvas to generate an initial interactive coordinate set under a unified reference.

[0056] Step A15: According to the boundary information of the original image and the semantic requirements of image extension, invalid coordinates that cause the extended region to intrude into the interior of the original image are removed to obtain the interaction coordinate information corresponding to the interaction operation.

[0057] The interactive environment is the fundamental operational carrier that provides unified operational support, boundary detection rules, and coordinate system mapping standards for extending interactive functionality from the original image. It serves as a prerequisite for interactive operation detection and processing. The boundary information of the original image is a core foundational indicator describing the position, range, and non-intrusive properties of its own pixel boundaries. Examples include the left, right, top, and bottom boundary pixel coordinates of the original image, as well as the effective content boundary threshold of the original image.

[0058] In this example, when initializing the interactive environment based on the canvas baseline parameters and the boundary information of the original image, the parameter synchronous acquisition method can be used. Alternatively, an incremental parameter adaptation method can be adopted, where the dynamic change parameters of the canvas and the original image are read while the configuration rules of the interactive environment are updated, accumulating to complete the initialization of the interactive environment, thereby completing the pre-configuration of the interactive environment.

[0059] After completing the basic configuration of the interactive environment, the compliance verification process of the interactive environment is initiated. For the initialized interactive environment, the consistency of the coordinate system mapping rules, the adaptability of the boundary detection rules, and the rationality of the interactive response threshold are verified in sequence. After the verification is completed, a normal interactive environment is generated. In this way, through the pre-configuration and verification, the benchmark deviation of subsequent interactive operation detection is avoided, and the accuracy of interactive coordinate collection is guaranteed.

[0060] For example, there are two ways to initialize the interactive environment using canvas reference parameters and the boundary information of the original image. The first is a fixed template-based full initialization. Before the initialization task officially starts, a system-preset standardized interactive environment template is loaded. Based on the collected canvas reference parameters and the boundary information of the original image, fixed interaction response thresholds, boundary detection rules, coordinate system mapping rules, and abnormal operation interception rules are configured to complete the full initialization of the interactive environment corresponding to the original image. This method uses a template-locked, one-time configuration logic for all parameters. It completes the environment initialization through a standardized preset template. The configuration logic is simple and stable, the rules are unified and controllable, and configuration deviations are less likely to occur. It is suitable for common standardized image extension scenarios.

[0061] The second method is adaptive incremental initialization based on user habits. Before the initialization task officially starts, the user's historical interaction records are read to extract the user's common extended habits, interaction response preferences, boundary operation precision, and historical alignment rules. Then, based on the user's personalized habits, combined with the canvas baseline parameters and the boundary information of the original image, the response threshold, boundary detection sensitivity, coordinate system mapping rules, and abnormal operation handling rules of the interactive environment are incrementally adjusted to complete the adaptive initialization of the interactive environment that fits the user's habits. This method adopts user feature-driven incremental dynamic configuration logic. Through pre-analysis of user habits, it adapts to the user's personalized interaction preferences in advance, without relying on fixed standardized templates. This significantly improves the adaptability of the interactive environment and the smoothness of user operation, and is suitable for complex image editing scenarios with personalized interaction needs.

[0062] In this example, when detecting interactive operations in the image editing interface through the interactive environment, the timed polling acquisition method provided in the second embodiment can be used. Alternatively, an event-triggered asynchronous acquisition method can be used, where the acquisition and parsing of interactive operations are synchronously started when an interactive event is detected in the interactive environment, capturing all features of the interactive actions in real time, thereby completing the real-time detection of interactive operations.

[0063] After completing the basic data collection of interactive operations, the process of identifying the operation type and the target object is initiated. For the collected interactive actions, the core features such as the trigger location, action trajectory, and trigger control ID are extracted first. Then, the target object of the interactive operation is determined based on feature matching. The classification and determination of the operation type are completed simultaneously. Finally, the determined operation type and target object are output. In this way, the accuracy of operation recognition is improved through layered feature extraction and matching, and recognition deviations caused by insufficient action feature collection are avoided.

[0064] For example, there are two ways to detect interactive operations and determine the operation type and target through the interactive environment. The first is rule-matching full detection, which collects all interactive actions in the interface in real time through the interactive environment, extracts the core features of the interactive actions, and matches the extracted features with the system's preset operation rule library item by item to determine the operation type and target. For example, if a dragging action of the original image boundary control point is detected, it is determined to be a boundary dragging adjustment operation, and the target is the original image boundary control point. This method adopts a detection logic of direct feature-rule matching, which is intuitive and clear, has low computational load, fast execution response speed, and is suitable for conventional standardized image extension interaction scenarios.

[0065] The second method is intelligent recognition and detection based on behavioral trajectory perception. It collects the complete and continuous trajectory of user interaction actions within the interactive environment, extracting multi-dimensional behavioral features such as dragging speed, acceleration, dwell time, number of adjustments, and trajectory direction. These multi-dimensional features are input into a pre-trained interactive operation recognition model. Through feature fusion and inference, the model identifies the operation type and target of the interactive operation. It does not rely on a fixed rule base for matching and can identify implicit, non-standardized user interactions. This method employs a multi-feature fusion model inference logic, deeply mining user interaction behavior features through complete behavioral trajectory analysis. It can adapt to users' personalized operating habits, achieving higher recognition accuracy and effectively recognizing complex, non-standardized interactive actions, thus adapting to personalized and complex image editing scenarios.

[0066] The drag direction is the spatial orientation of the displacement trajectory corresponding to the user's interactive operation in a unified coordinate system, and it is the core basis for determining the direction of the expanded area generation. The expansion intent is the implicit core demand for image expansion and personalized adjustment goal conveyed by the user through interactive operations, and it is the core reference for constructing constraints. For example, center expansion that completely preserves the original image, unilateral expansion with a specified boundary, omnidirectional expansion that adapts to the canvas size, directional expansion with a specified alignment rule, and elastic expansion with a custom amplitude.

[0067] In this example, when parsing the drag direction and extended intent of the interactive operation, the multi-dimensional feature decomposition method provided in the second embodiment can be used. Alternatively, a real-time incremental parsing method can be adopted, collecting the user's interaction trajectory while simultaneously parsing the drag direction, accumulating and updating the user's extended intent, and outputting the final parsing result after the interaction is completed, thereby completing the real-time parsing of drag direction and extended intent.

[0068] After determining the operation type and target, the process of parsing the drag direction and extension intent is initiated. First, based on the displacement trajectory of the interactive operation, its spatial orientation in the coordinate system is calculated to determine the drag direction. Then, combined with the operation type, target, and boundary information of the original image, the user's core extension needs are parsed to obtain the corresponding extension intent. In this way, through layered trajectory calculation and demand parsing, the accuracy of extension intent recognition is improved, and subsequent extension ranges that do not meet user expectations due to deviations in demand parsing are avoided.

[0069] For example, there are two ways to parse the drag direction and extension intent of an interactive operation. The first is a rule-based mapping direct parsing. Based on the determined operation type and target, combined with the boundary information of the original image, the drag direction and default extension intent of the interactive operation are parsed using the system's preset operation-intent mapping rules. For example, if a drag operation to the left is detected at the left boundary of the original image, the drag direction is determined to be horizontal to the left, and the default extension intent is to extend unilaterally to the left boundary. This method uses a parsing logic with a fixed mapping between operation and intent. The parsing process is simple and direct, with low computational load, fast response speed, and adaptability to conventional standardized image extension scenarios.

[0070] The second approach involves multi-feature fusion for deep intent analysis. This method extracts multi-dimensional information, including operation type, target object, drag trajectory features, user's historical interaction habits, and original image content features. Through a pre-trained extended intent recognition model, it integrates multi-dimensional features for deep inference, revealing the precise drag direction of the interactive operation and the user's implicit personalized extension intent. For example, combining user historical habits, it reveals that the user's actual intent in dragging the left boundary is a left-aligned omnidirectional canvas adaptation extension. This method employs multi-dimensional feature fusion deep inference logic, is not limited to fixed mapping rules, and can deeply mine the user's implicit personalized extension needs. It achieves higher analysis accuracy, precisely matches the user's actual extension expectations, and adapts to complex personalized image extension scenarios.

[0071] Coordinate system normalization is a standardized process that eliminates the benchmark differences between the original image pixel coordinate system and the canvas interaction coordinate system, achieving unified alignment of the coordinate space. The initial interaction coordinate set is the complete set of coordinate points corresponding to user interaction operations, collected under a unified benchmark after coordinate system normalization. It serves as the foundational data source for subsequent effective coordinate filtering. Examples include the full coordinate points of the drag trajectory, the control point displacement coordinate sequence, the anchor point coordinates of click operations, and the boundary coordinate sequence of selection operations.

[0072] In this example, when normalizing the coordinate systems of the original image and the canvas, the full parameter synchronous transformation method provided in the second embodiment can be used. Alternatively, a streaming incremental coordinate transformation method can be used to simultaneously collect the user's interactive coordinate points and perform single-coordinate point normalization transformation, accumulating and generating an initial interactive coordinate set under a unified benchmark, thereby completing the real-time normalization of the coordinate system.

[0073] After parsing the drag direction and extension intent, the coordinate system normalization process is initiated. First, based on the parsed drag direction and extension intent, a reference anchor point for coordinate system alignment is determined. Then, a mapping relationship between the original image pixel coordinate system and the canvas interaction coordinate system is established. All collected interaction coordinate points are transformed to a unified reference to generate an initial interaction coordinate set. In this way, the reference difference between the two coordinate systems is eliminated through coordinate transformation adapted to the reference anchor point, ensuring the consistency of subsequent coordinate processing.

[0074] For example, there are two ways to normalize the coordinate systems of the original image and the canvas to generate the initial interactive coordinate set. The first is linear mapping fixed reference normalization, which establishes a fixed linear mapping relationship between the pixel coordinate system of the original image and the interactive coordinate system of the canvas. Using the center anchor point of the original image as a unified reference, the coordinates of the two coordinate systems are linearly transformed, and all collected interactive coordinate points are transformed to the unified reference to generate the initial interactive coordinate set. All extension intentions use the same fixed reference and mapping rules. This method uses a fixed reference linear mapping transformation logic, the transformation process is simple and stable, the calculation speed is fast, and it is suitable for conventional standardized image extension scenarios.

[0075] The second method is non-linear dynamic reference normalization for intent adaptation. Based on the drag direction and expansion intent obtained from the parsing, it dynamically adjusts the reference anchor points and mapping rules of the coordinate system alignment. For example, for a single-sided expansion intent on the left boundary, a non-linear mapping with the left boundary of the original image as the alignment reference is used; for a centered expansion intent, a non-linear mapping with the center of the original image as the alignment reference is used; and for a canvas-adapted expansion intent, a non-linear mapping with the center of the canvas as the alignment reference is used. This transforms the interactive coordinate points to a unified reference that adapts to the user's intent, generating an initial interactive coordinate set that fits the expansion intent. This method uses intent-driven dynamic reference non-linear transformation logic to ensure that the transformed coordinate set is highly adapted to the user's expansion needs, improving the accuracy of subsequent coordinate processing and adapting to complex image expansion scenarios with personalized alignment requirements.

[0076] Image expansion semantic requirements are inviolable semantic constraints set based on business logic and core user needs in image expansion scenarios. For example, the expanded region must not intrude into the valid content of the original image, the expanded region must completely contain the entire content of the original image, and the expanded region must not exceed the maximum boundary of the canvas. Invalid coordinates are abnormal interactive coordinate points that trigger violations of image expansion semantic requirements, causing the expanded region to intrude into the original image. Interactive coordinate information is the set of valid interactive coordinates that meet the semantic requirements after invalid coordinate processing; it is the core input parameter for constructing subsequent constraints.

[0077] In this example, when processing the initial interactive coordinate set to remove invalid coordinates, the method of full data item-by-item verification provided in the second embodiment can be used. Alternatively, a streaming incremental verification method can be used to generate coordinate points in the initial interactive coordinate set while simultaneously performing compliance verification on individual coordinate points, removing invalid coordinates in real time, and accumulating valid interactive coordinate information to complete the real-time processing of invalid coordinates.

[0078] After generating the initial interactive coordinate set, the invalid coordinate processing process is initiated. First, based on the boundary information of the original image and the semantic requirements of image extension, a coordinate compliance judgment threshold is set. Then, all coordinate points in the initial interactive coordinate set are checked for compliance item by item. Invalid coordinates that cause the extended area to intrude into the original image are processed. Finally, interactive coordinate information that meets the semantic requirements is obtained. In this way, through the pre-construction semantic constraint verification, the subsequent constraint conditions that intrude into the original image are avoided, thus ensuring the compliance of the extension range.

[0079] For example, there are two ways to obtain interactive coordinate information by removing invalid coordinates. The first is direct removal based on threshold judgment. According to the boundary information of the original image and the semantic requirements of image expansion, a fixed boundary compliance threshold is set. All coordinate points in the initial interactive coordinate set are compared with the compliance threshold item by item. Invalid coordinates that exceed the threshold and would cause the expanded area to intrude into the original image are directly removed. The remaining compliant coordinate points are then summarized to obtain the interactive coordinate information corresponding to the interactive operation. This method uses a fixed threshold for item-by-item comparison and direct removal logic. The processing flow is simple and stable, the execution speed is fast, and it is suitable for conventional standardized image expansion scenarios.

[0080] The second method is semantically guided invalid coordinate correction. Based on the boundary information of the original image and the semantic requirements of image expansion, the coordinates in the initial interaction coordinate set are validated for compliance. Invalid coordinates that would cause the expanded area to intrude into the original image are not directly removed. Instead, based on the semantic requirements of image expansion, they are corrected to valid coordinates at the boundary of the original image, while preserving the user's drag direction and expansion intent. Finally, the valid coordinates and the corrected coordinates are combined to obtain the interaction coordinate information corresponding to the interaction operation. This method uses semantically guided abnormal coordinate correction logic, rather than directly discarding the user's operation data. It can preserve the user's interaction intent to the greatest extent possible without violating semantic requirements, avoiding the invalid discarding of user operations, improving the smoothness of user interaction and the error tolerance of operation, and adapting to personalized image editing scenarios where user operation precision is low.

[0081] Third Embodiment This embodiment provides an exemplary scheme for interactive coordinate preprocessing. In this example, to address the problem that interactive coordinates are easily affected by coordinate system differences and invalid operations in image expansion scenarios, the preprocessing flow of interactive coordinates is optimized. Using canvas reference parameters as constraint references, interactive feature parameters are obtained through benchmark calibration combined with interactive coordinate information. Core constraints are generated based on the constraint references and hard-limit rules. A multi-dimensional constraint set is constructed to match user expansion and adjustment needs. Finally, logical integration and conflict resolution are completed according to constraint priority to obtain constraint conditions suitable for this image expansion. Step S10 includes steps B11~B14: Step B11: Using the canvas reference parameters as constraint references, and combining them with the interactive coordinate information, perform reference calibration processing to obtain interactive feature parameters.

[0082] Step B12: Generate core constraints based on the constraint benchmarks and hard constraint rules.

[0083] Step B13: Match the interaction feature parameters and the core constraints with the user's extended adjustment requirements to construct a multi-dimensional constraint set.

[0084] Step B14: Logically integrate and resolve conflicts of the multi-dimensional constraint set according to constraint priority to obtain the constraint conditions adapted to this image expansion.

[0085] Interaction feature parameters are the core quantitative features of interactive behavior extracted after benchmarking and calibration, which can be directly used for constraint construction. They are core indicators representing users' extended needs. Examples include the amplitude of interactive drag displacement, drag direction vector, interaction boundary position, estimated range of extended area, and priority weight of interactive operation.

[0086] Hard constraint rules are mandatory, unchangeable, and fundamental rules that cannot be broken or adjusted in image expansion scenarios. They serve as the basis for generating core constraints and ensure the basic compliance of expansion operations. Core constraints are mandatory constraints generated based on constraint benchmarks and hard constraint rules, forming the core framework of a multi-dimensional constraint set. Examples include constraints such as the original image completely containing the image, the expanded region not intruding into the original image, the expanded region not exceeding the canvas boundary, and mandatory adaptation to the target aspect ratio.

[0087] User-defined adjustment requests are personalized adjustments made by users through interactive operations and parameter settings. They serve as a supplementary adaptation dimension to the multi-dimensional constraint set. Examples include requirements for alignment rules in expanded areas, flexible adjustments to the expansion range, content style requirements for expanded areas, and adjustments to boundary blending. The multi-dimensional constraint set is a comprehensive set of constraint rules that integrates core mandatory constraints, interactive feature constraints, and user-defined personalized requirement constraints. It serves as a preliminary integration carrier for the final constraint conditions.

[0088] Constraint priority is a pre-defined order of execution priority for different constraint rules, used to guide rule selection and adjustment during conflict resolution. For example, hard core constraints have the highest priority, interaction feature constraints have the second highest priority, and user personalization requirement constraints have the lowest priority. Conflict resolution is a process of adjusting and correcting constraint rules that have logical conflicts or boundary contradictions in a multi-dimensional constraint set, according to their priority, to eliminate conflicts.

[0089] In this example, when using the canvas reference parameters as a constraint reference and combining them with interactive coordinate information for benchmark calibration to obtain interactive feature parameters, the process can be performed synchronously with the coordinates. Alternatively, a streaming incremental calibration method can be used, where preprocessed interactive coordinate information is received while simultaneously performing benchmark calibration on a single coordinate point, extracting interactive features point by point, and accumulating to obtain complete interactive feature parameters, thereby completing the real-time extraction and calibration of interactive features.

[0090] After completing the calibration and extraction of interactive feature parameters, the core constraint generation process is initiated. First, based on the constraint benchmark, the mandatory requirements in the hard constraint rules are extracted, and the mandatory requirements are converted into quantifiable and executable constraint thresholds and judgment rules to generate core constraints. In this way, the compliance and executability of the core constraints are ensured through the rule transformation anchored to the underlying benchmark.

[0091] After generating the core constraints, the process of building a multi-dimensional constraint set is initiated. First, the interaction feature parameters are converted into corresponding interaction behavior constraint rules, and user extension and adjustment requirements are converted into personalized adaptation constraint rules. Then, the interaction behavior constraint rules, personalized adaptation constraint rules, and core constraints are integrated to build a multi-dimensional constraint set covering mandatory requirements, interaction behaviors, and personalized needs. This full-dimensional rule integration ensures that the constraint system comprehensively covers users' extended needs and underlying compliance requirements.

[0092] After constructing the multi-dimensional constraint set, the constraint integration and conflict resolution process is initiated. First, all constraint rules in the multi-dimensional constraint set are prioritized according to the preset constraint priority. Then, logical conflicts and boundary contradictions between constraint rules are detected. Low-priority constraints are adjusted and corrected according to priority to eliminate conflicts and complete logical integration. Finally, the constraint conditions adapted to this image expansion are obtained. In this way, the logical consistency and compliance of the final constraint conditions are ensured through priority-driven conflict resolution.

[0093] For example, there are two ways to logically integrate and resolve conflicts in a multi-dimensional constraint set according to constraint priority to obtain the final constraint conditions. The first is a priority-locked serial rule-by-rule verification and conflict resolution. According to the preset constraint priority, starting with the highest priority core constraint, each constraint rule in the multi-dimensional constraint set is checked for compliance. After each constraint rule is checked, it is simultaneously determined whether there is a logical conflict or boundary contradiction between the rule and the previously verified constraint rules. If there is no conflict, the rule is added to the compliant constraint set, and the verified compliant rules are continuously accumulated. If there is a conflict, the lower priority constraint rules are adjusted in terms of threshold or range according to the priority rules until the conflict is resolved and they are added to the compliant constraint set. If the conflict cannot be corrected, the lower priority constraint rule is directly removed. After all the constraint rules in the multi-dimensional constraint set have been checked and conflict resolved, all the rules in the compliant constraint set are logically integrated to obtain the constraint conditions adapted to this image expansion. This method employs a priority-locked sequential verification and dynamic correction processing logic. Through item-by-item verification and conflict handling from high to low, it strictly ensures that the core constraints of the highest priority are not breached, restoring the underlying compliance requirements of the constraint system and adapting to conventional standardized image extension scenarios.

[0094] The second approach involves dimensional hierarchical parallel clustering and global conflict resolution. This method performs a full read and hierarchical parsing of the multi-dimensional constraint set. Based on constraint priority and rule type, the constraint set is divided into three independent constraint dimension levels: a core mandatory constraint layer, an interactive behavior constraint layer, and a personalized requirement constraint layer. The rule boundaries and threshold ranges within each level are marked, generating multiple constraint dimension levels without internal dependencies. Then, compliance verification is simultaneously initiated for all divided constraint dimension levels. Within each constraint dimension level, the internal logical consistency of all constraint rules within the level is verified one by one, and the constraint rules that meet the compliance requirements are counted. After the parallel verification of all constraint dimension levels is completed, global conflict detection is performed to identify logical conflicts and boundary contradictions between different levels. Constraint rules at lower levels are adjusted and corrected in batches according to constraint priority to eliminate global conflicts. Finally, all compliant rules are globally logically integrated to obtain the constraint conditions suitable for this image expansion. This method employs a processing logic of dimensional hierarchical clustering and full-level parallel verification. By pre-defining the constraint dimensional hierarchy, the boundaries of constraint rules at different levels are locked in advance, reducing the number of invalid cross-rule conflict detections. At the same time, it can batch process constraint rules at the same level, improving the processing efficiency of constraint integration and conflict resolution, and is suitable for complex image expansion scenarios with large-size images and multiple constraint rules.

[0095] Further, please refer to Figure 2 , Figure 2This is a schematic diagram illustrating the constraints of this application. In the scenario of constructing multi-dimensional constraints for image expansion interaction, the canvas reference parameters are first used as the core constraint reference for this image expansion. Combined with the interactive coordinate information corresponding to the user's interactive operations in the image editing interface, a reference calibration process is completed, extracting core interactive feature parameters such as the amplitude of interactive drag displacement, the position of the action boundary, and the direction of operation. This provides a precise basis for the subsequent construction of the constraint system. Subsequently, based on the aforementioned constraint reference and combined with the insurmountable hard-limit rules in the image expansion scenario, core constraints are generated. These core constraints cover the C1 original image inclusion constraint and the C2 proportion constraint marked in the diagram. The C1 original image inclusion constraint is the highest priority mandatory rule, requiring that the final expanded area completely contains all the valid content of the original image, without any intrusion or cropping of the valid content of the original image. The C2 proportion constraint is a mandatory rule for aspect ratio adaptation, requiring that the overall aspect ratio of the expanded image match the target aspect ratio set by the user, without any aspect ratio deviation. Based on this, the calibrated interactive feature parameters and generated core constraints are precisely matched with the user's personalized expansion and adjustment needs, constructing a multi-dimensional constraint set covering all scenarios. This multi-dimensional constraint set, in addition to the core constraints, incorporates the C3 drag direction constraint and C4 alignment constraint marked in the diagram. The C3 drag direction constraint is a dynamic constraint rule adapted to user interaction behavior, limiting the core expansion direction and the allocation priority of each boundary expansion increment of the expansion area based on the displacement direction and boundary position of the user's drag operation. The C4 alignment constraint is a positional adaptation constraint rule used to limit the relative positional alignment rules between the expansion area and the original image and canvas, adapting to various alignment modes such as center alignment of the original image, single-sided boundary alignment, and canvas center alignment. Finally, according to the preset constraint priority, the multi-dimensional constraint set is logically integrated and conflict resolved. The constraint priority from high to low is as follows: C1 original image inclusion constraint, C2 proportion constraint, C3 drag direction constraint, and C4 alignment constraint. For rule items in the constraint set that have logical conflicts or boundary contradictions, the thresholds of low-priority constraints are adjusted and the ranges are corrected according to their priority. After completely eliminating constraint conflicts, the logical integration of all rules is completed, and finally, the compliant constraint conditions adapted to this image expansion are obtained, providing a full-dimensional judgment basis for the determination of the subsequent expansion reference range and the calculation of the expanded pixel values.

[0096] Fourth embodiment This embodiment provides an exemplary scheme for intelligently determining the image expansion reference range. In this example, the original image size is first matched and calculated according to the target aspect ratio set by the user to obtain the minimum expansion area that meets the aspect ratio adaptation requirements. Then, the mandatory rule of complete inclusion of the original image in the constraint conditions is combined to complete the full-dimensional compliance verification to obtain the standardized minimum expansion area parameters. Finally, based on the minimum expansion area parameters and combined with multi-dimensional constraint rules, the precise calibration of the area position is completed to obtain the expansion reference range adapted to this image expansion. Step S20 includes steps C11~C13: Step C11: Match and calculate the original image size according to the target frame ratio to obtain the minimum expansion area.

[0097] Step C12: Based on the minimum expanded region, and combined with the mandatory rule that the original image is completely contained in the constraint conditions, the minimum expanded region parameters are obtained.

[0098] Step C13: Based on the minimum expansion region parameters, and in conjunction with the alignment constraints, boundary limitation rules, and optimal minimum expansion rules in the constraints, calibrate the region position to obtain the expansion reference range.

[0099] The minimum expansion region parameters are standardized, quantifiable, full-dimensional configuration parameters of the minimum expansion region obtained after mandatory rule compliance verification. These are the core inputs for region location calibration. Examples include the total width, total height, aspect ratio, baseline boundary coordinates, total pixel size of the region, and the original image anchoring position. Boundary constraint rules are hard rules used to limit the boundary range of the expansion region, preventing it from exceeding the canvas boundary or intruding into the original image. Examples include the maximum canvas boundary constraint rule, the original image boundary non-intrusion rule, and the minimum boundary threshold rule for the expansion region. The optimal minimum expansion rule is the core optimization rule guiding the expansion region calculation. It requires minimizing the expansion region while satisfying all constraints, reducing the computational load and redundant content generated by subsequent AI.

[0100] In this example, when matching the original image size to the target aspect ratio to obtain the minimum expansion area, an incremental aspect ratio adaptation calculation method is used. While receiving the target aspect ratio adjusted by the user, aspect ratio matching and minimum boundary calculation are performed simultaneously, and the minimum expansion area is updated in real time to complete the dynamic calculation of the minimum expansion area.

[0101] After calculating the minimum expansion region, a mandatory rule compliance verification process is initiated. The calculated minimum expansion region is compared item by item with the mandatory rules in the constraints that ensure the original image is fully contained. The minimum expansion region is verified to ensure that it can fully contain all valid content of the original image. Region parameters that do not comply with the mandatory rules are removed. After the verification is completed, standardized minimum expansion region parameters are generated. In this way, the basic compliance of the expansion region is ensured through the mandatory rule verification, and violations such as cropping the original image are avoided.

[0102] After generating the minimum expansion region parameters, the region position calibration process is initiated. First, the alignment constraints, boundary limit rules, and optimal minimum expansion rules in the constraints are extracted. The extracted rules are then converted into quantifiable position calibration thresholds and judgment criteria. Based on the minimum expansion region parameters, the position calibration of the expansion region and the compliance verification of all constraints are completed to obtain the expansion reference range adapted to this image expansion. In this way, the accuracy and compliance of the expansion reference range are improved through multi-constraint linkage position calibration, avoiding subsequent expansion content that does not meet user expectations due to position deviation.

[0103] For example, there are two ways to obtain the extended reference range by completing the regional position calibration through the minimum extended region parameter. The first is the closed-loop minimum boundary anchoring calibration method. Using the optimal minimum expansion rule as the core anchor point, it first locks the reference anchor position of the original image within the extended region based on the minimum extended region parameter. Then, combined with alignment constraints, it calculates the relative positional offset between the extended region and the original image and the canvas, completing the initial position alignment of the extended region. Subsequently, based on boundary constraint rules, it checks whether the initially aligned extended region exceeds the maximum boundary of the canvas and whether there is a risk of intruding into the original image. If a violation exists, the position and boundary threshold of the extended region are adjusted synchronously until all boundary constraint requirements are met. After each position adjustment, it is synchronously checked whether it conforms to the optimal minimum expansion rule, ensuring that the adjusted extended region always maintains a minimum size. After all constraint rules have been verified, the extended reference range is generated. This method employs a closed-loop calculation logic of optimal rule anchoring, verification, adjustment, and re-verification. Through the full-constraint closed-loop verification after each adjustment step, it ensures that the extended region simultaneously meets the minimization requirement and full-constraint compliance, avoiding issues such as redundancy and boundary violations in the extended region. It restores the core requirement of minimizing the user's extension and is suitable for conventional standardized image extension scenarios.

[0104] The second method is an intent-driven, multi-constraint dynamic adaptation calibration method. First, based on the user's expansion intent and drag direction obtained from previous analysis, the core expansion direction and alignment benchmark of the expansion area are determined. Then, combined with the minimum expansion area parameter, the execution weights of alignment constraints are dynamically adjusted. For the target boundary of the user's drag, the priority of the corresponding single-sided alignment constraint is increased; for boundaries where the user has no operation, the default symmetrical alignment weight is maintained. Subsequently, based on the dynamically adjusted constraint weights, combined with boundary limitation rules and the optimal minimum expansion rule, the optimal calibration position of the expansion area is calculated. During the calibration process, the user's expansion intent is adapted simultaneously. Under the premise of satisfying all hard constraints, the method maximizes the fit with the user's drag operation and expansion needs. After all constraints pass verification, an expansion reference range that fits the user's intent is generated. This method uses a user intent-driven, constraint weight dynamic adaptation calibration logic, which is not limited to a fixed constraint execution order and alignment rules. It can dynamically adjust the calibration strategy according to the user's actual interaction operations, deeply fitting the user's personalized expansion needs while ensuring that hard constraints are not violated. This improves the matching degree between the expansion reference range and the user's expectations, and adapts to complex image editing scenarios with personalized expansion needs.

[0105] Fifth embodiment This embodiment provides an exemplary scheme for accurate calibration of extended reference range. In this example, the size difference between the original image and the minimum extended region is first compared. The minimum extended region parameters are then used to calculate the minimum extended increment value corresponding to each boundary of the image. Next, the region position of the minimum extended increment is calibrated according to the alignment constraints and boundary limitation rules in the constraints, resulting in the target extended region parameters. Finally, the target extended region parameters are matched with the canvas reference parameters to achieve coordinate system matching and parameter association, generating a compliant and accurate extended reference range. Step C13 includes steps D11 to D13: Step D11: Compare the size difference between the original image and the minimum expansion region, and calculate the minimum expansion increment value corresponding to each boundary by combining the minimum expansion region parameter.

[0106] Step D12: According to the alignment constraints and boundary limitation rules in the constraints, calibrate the region position of the minimum expansion increment value corresponding to each boundary of the image to obtain the target expansion region parameters.

[0107] Step D13: Perform coordinate system matching processing between the target extended region parameters and the canvas reference parameters corresponding to the original image, and generate the extended reference range by corresponding associated coordinate system parameters.

[0108] The target expansion region parameters are the standardized, full-dimensional configuration parameters of the expansion region obtained after incremental calibration and full-constraint compliance verification. These are the core inputs for coordinate system matching. Examples include the coordinates of the four boundaries of the calibrated expansion region, the final expansion increment values ​​for each boundary, the total size of the expansion region, the anchoring position of the original image within the expansion region, and the region's aspect ratio. Coordinate system matching eliminates the coordinate system reference differences between the target expansion region parameters and the canvas reference parameters, achieving a standardized process of unified coordinate space alignment and parameter binding. The expansion reference range is the compliant, accurate, and directly usable reference range for subsequent expansion calculations, obtained after full-constraint calibration and coordinate system matching. It is the core basis for subsequent expansion pixel value calculations.

[0109] In this example, when comparing the size difference between the original image size and the minimum expansion area and calculating the minimum expansion increment value, a streaming incremental dynamic calculation method is used. While receiving the target aspect ratio and constraint rules adjusted by the user, the size difference comparison and the increment calculation of each boundary are performed simultaneously to update the minimum expansion increment value, thereby completing the dynamic adaptation calculation of the expansion increment.

[0110] After calculating the minimum expansion increment values ​​for each boundary, the regional location calibration process is initiated. First, alignment constraints and boundary limitation rules are extracted from the constraints, and these rules are converted into quantifiable incremental allocation thresholds and location calibration standards. Then, based on the minimum expansion increment values ​​for each boundary, the allocation and adjustment of the expansion increment and regional location calibration are completed. The calibrated parameters are verified to ensure they meet all constraint requirements. After verification, the target expansion region parameters are generated. This multi-constraint-linked incremental calibration ensures the compliance and accuracy of the expansion region parameters, preventing expansion regions from failing to meet user expectations due to incremental allocation deviations.

[0111] After generating the target extended region parameters, the coordinate system matching process is initiated. First, a unified mapping relationship between the canvas interactive coordinate system and the image pixel coordinate system is established based on the canvas reference parameters. Then, the target extended region parameters are transformed to the unified canvas coordinate system, completing the association and binding between the extended region parameters and the canvas coordinate system parameters. An extended reference range adapted to the canvas reference is generated. In this way, through the unified matching of coordinate systems, the consistency of the coordinate reference for subsequent interactive operations and extended calculations is ensured, avoiding the problem of coordinate misalignment.

[0112] For example, there are two ways to obtain the target expanded region parameters by calibrating the region position using the minimum expansion increment value. The first is a closed-loop incremental symmetric calibration method with four boundaries anchored. Using the four boundaries of the original image as fixed, inviolable anchor points, the total horizontal and vertical expansion increments are calculated based on the difference between the minimum expanded region parameters and the original image size. Then, based on the symmetric expansion requirement in the alignment constraint, the total expansion increment is evenly distributed to the corresponding opposing boundaries of the original image, obtaining the initial minimum expansion increment values ​​for each boundary. A closed-loop verification process is then initiated, comparing the expanded region boundaries corresponding to the initial increments with the boundary constraint rules to check whether they exceed the maximum canvas boundary or pose a risk of intruding into the original image. If a violation is found, the increment distribution ratio of the opposing boundaries is adjusted synchronously. While maintaining the total expansion increment and ensuring the aspect ratio is compliant, the increment values ​​of each boundary are redistributed. Each time an increment adjustment is completed, the alignment constraint and the optimal minimum expansion rule are simultaneously verified until all constraint rules are verified. Finally, the calibrated increment values ​​of each boundary are locked, generating the target expanded region parameters. This method employs a computational logic of symmetrical incremental allocation and closed-loop verification and adjustment anchored to the original image boundary. By using symmetrical incremental allocation with fixed anchor points, the position of the original image within the extended region is ensured to be stable. At the same time, through full-constraint closed-loop verification, the extended region simultaneously meets the core requirements of image size adaptation, boundary compliance, and minimization, thus avoiding the problems of original image position offset and boundary violation, and adapting to conventional standardized symmetrical extension scenarios.

[0113] The second method is a user intent-driven asymmetric incremental dynamic adaptation and calibration method. First, based on the user's expansion intent, drag direction, and interaction characteristics obtained from previous analysis, core and non-core expansion boundaries are determined. For drag boundaries directly operated by the user, they are marked as core expansion boundaries, and the execution priority of their corresponding alignment constraints is increased. For boundaries without user operation, they are marked as non-core expansion boundaries, and minimum increment limits are applied. Then, based on the total expansion increment calculated using the minimum expansion area parameters, the expansion increments of each boundary are dynamically allocated according to priority. Priority is given to meeting the expansion range requirements of core expansion boundaries, while non-core expansion boundaries are allocated only the minimum increment required to meet the aspect ratio requirements, resulting in initial asymmetric expansion increment values ​​for each boundary. Next, combined with boundary limitation rules and alignment constraints, the initial increment values ​​are validated for compliance. If the increment of a core expansion boundary exceeds the canvas boundary limit, the increment allocation of non-core boundaries is adjusted simultaneously. While maintaining compliance with the total expansion increment and aspect ratio, the method maximizes the fit with the user's drag operation intent. After all constraint rules have passed validation, the calibrated increment values ​​of each boundary are locked, generating target expansion area parameters that fit the user's intent. This method employs a calibration logic driven by user intent, which dynamically adjusts the incremental allocation strategy and constraint execution priority based on the user's actual interaction. Under the premise of ensuring that hard constraints are not violated, it deeply matches the user's personalized expansion operation needs, improves the matching degree between the expansion region parameters and the user's expectations, and is suitable for personalized image editing scenarios with unilateral expansion and asymmetric expansion needs.

[0114] Further, please refer to Figure 3 , Figure 3This is a schematic diagram illustrating the extended reference range of this application. The image extended reference range generation method based on boundary incremental precise calibration is used to accurately calculate and generate an image extended reference range adapted to user needs while satisfying multi-dimensional constraints. First, the minimum extension increment calculation process is executed to obtain the actual size parameters of the original image, including the total pixel width, total height, and four boundary reference coordinates. Simultaneously, the size parameters of the minimum extended region adapted to the target image aspect ratio are obtained. The original image size and the size of the minimum extended region are compared across all dimensions. Combined with the reference anchoring parameters of the minimum extended region, the minimum extension increment values ​​corresponding to each boundary of the original image are calculated. In this visualization example, using the four boundaries of the original image as reference anchor points, after frame matching calculation, the minimum expansion increment value (left margin) corresponding to the left boundary is 200px (corresponding to Left: 200px in the image), the minimum expansion increment value (right margin) corresponding to the right boundary is 200px (corresponding to Right: 200px in the image), the minimum expansion increment value (top margin) corresponding to the top boundary is 80px (corresponding to Top: 80px in the image), and the minimum expansion increment value (bottom margin) corresponding to the bottom boundary is 80px (corresponding to Bottom: 80px in the image). This increment value is the minimum expansion range to meet the target frame ratio requirement. Under the premise of adapting to the frame ratio requirement, it can minimize the pixel scale of the expansion area and reduce the computational load of subsequent AI image generation.

[0115] Subsequently, the region location calibration process is performed. The constraints constructed in the preceding steps are retrieved, and the alignment constraints and boundary limitation rules are extracted. Based on the mandatory rule that the original image completely contains the region, the minimum expansion increment values ​​of each boundary of the previously calculated image are verified for compliance and the region location is calibrated. In this example, based on the original image's center alignment requirement in the alignment constraints, it is verified that the symmetrical increment allocation of 200px on the left and right boundaries and 80px on the top and bottom boundaries fully complies with the center alignment rule. Simultaneously, based on the boundary limitation rules, it is verified that the expansion region boundary corresponding to this increment does not exceed the maximum canvas size threshold and does not intrude into the original image. After confirming that all increment values ​​meet the full-dimensional constraint requirements, the core parameters such as the calibrated boundary expansion increments, the total size of the expansion region, and the four boundary reference coordinates are locked, generating standardized target expansion region parameters.

[0116] Finally, coordinate system matching and extended reference range generation are performed to obtain the canvas reference parameters corresponding to the original image, including the canvas coordinate system mapping rules, the canvas origin position, and the anchor coordinates of the original image in the canvas. The previously calibrated target extended region parameters and canvas reference parameters are matched with coordinate system parameters to establish a one-to-one mapping relationship between the extended region pixel coordinates and the canvas interaction coordinates. The association and binding between the target extended region parameters and the canvas coordinate system parameters are completed, and finally, a visualized extended reference range is generated, which is the extended region range that completely wraps the original image and is marked with a dashed box in this example figure. This extended reference range can be directly used for subsequent geometric difference calculation and extended pixel value solving.

[0117] Sixth Embodiment This embodiment provides an exemplary scheme for accurately solving image expansion pixel values. In this example, firstly, based on the expansion reference range and the original image size, a pixel mapping benchmark between the expansion region coordinates and the original pixel coordinates is constructed using a coordinate mapping algorithm. Then, based on the pixel mapping benchmark, the boundary offset and region overlap relationship between the expansion reference range and the original image are calculated. Subsequently, the geometric difference between the expansion reference range and the original image size is obtained through the boundary offset and region overlap relationship. Then, pixel precision normalization processing is performed on the geometric difference, and non-integer pixels and outliers exceeding the canvas range are removed to obtain standardized difference parameters. Finally, parameter transformation is completed according to pixel-level coordinate mapping rules to obtain the expanded pixel values ​​adapted to this image expansion task. Please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the sixth embodiment of the method for defining interactive image extended regions in this application. Step S30 includes steps E11-E15: Step E11: Based on the extended reference range and the original image size, construct a pixel mapping reference between the extended region coordinates and the original pixel coordinates according to the coordinate mapping algorithm.

[0118] Step E12: Calculate the boundary offset and region overlap relationship between the extended reference range and the original image based on the pixel mapping reference.

[0119] Step E13: Calculate the geometric difference between the extended reference range and the original image size using the boundary offset and the region overlap relationship.

[0120] Step E14: Perform pixel precision normalization on the geometric difference, remove non-integer pixels and abnormal data that exceed the canvas range, and obtain standardized difference parameters.

[0121] Step E15: Convert the standardized difference parameters according to the pixel-level coordinate mapping rules to obtain the extended pixel values ​​of the image extension.

[0122] Coordinate mapping algorithms are standardized algorithmic models used to establish a one-to-one correspondence between canvas interactive coordinates, extended region coordinates, and original image pixel coordinates. They are the core tools for achieving multi-coordinate system-wide transformations. Examples include anchor-point locking linear mapping algorithms, boundary alignment nonlinear mapping algorithms, multi-coordinate system-wide fusion algorithms, and sub-pixel precision mapping algorithms. Extended region coordinates are the set of position, boundary, and vertex coordinates of the extended reference range in the canvas interactive coordinate system; they are the target transformation object for pixel mapping. Examples include the four boundary canvas coordinates of the extended region, the center anchor point coordinates of the extended region, the four corner vertex coordinates of the extended region, and the alignment reference coordinates between the extended region and the original image.

[0123] The pixel mapping benchmark is a standardized transformation rule and correspondence matrix established after completing the multi-coordinate system-to-one mapping, between the extended region coordinates and the original pixel coordinates. It serves as the core unified benchmark for subsequent boundary offset calculations and geometric difference solutions. Examples include coordinate transformation matrices, pixel-to-pixel correspondence tables, multi-coordinate system-to-one mapping rules, boundary anchor point binding correspondences, and sub-pixel level precision transformation rules.

[0124] Boundary offset is a pixel-level displacement difference between the boundary of the extended region and the boundary of the original image, calculated based on a pixel mapping reference and in a unified pixel coordinate system. It is a core quantitative indicator characterizing the extent of boundary expansion. Examples include left boundary horizontal offset, right boundary horizontal offset, upper boundary vertical offset, lower boundary vertical offset, total horizontal offset, total vertical offset, and boundary anchor point displacement difference.

[0125] Regional overlap relationships, based on pixel mapping benchmarks, are the spatial location inclusion relationships, overlap ranges, overlap ratios, and non-overlapping region distribution characteristics between the expanded regions and the original image. These serve as the core spatial reference for geometric difference calculations. Examples include the complete inclusion relationship of the original image, the range of overlapping pixels, the overlap ratio, the distribution of non-overlapping expanded regions, and boundary coincidence indices.

[0126] Geometric differences are a set of full-dimensional size differences, boundary displacement differences, and spatial range differences calculated based on a unified pixel mapping benchmark between the extended reference range and the original image size. These are the core input parameters for subsequent normalization processing. Examples include the total horizontal size difference, the total vertical size difference, the pixel-level differences at each boundary, the total pixel difference in the extended region, the aspect ratio adaptation difference, and the pixel scale of non-overlapping regions.

[0127] Pixel-level coordinate mapping rules are standardized transformation rules based on pixel mapping benchmarks, used to convert standardized difference parameters into extended pixel values ​​that can be directly recognized by AI image extension models. They are the core basis for realizing the conversion from difference parameters to generation parameters.

[0128] In this example, when constructing a pixel mapping reference based on the extended reference range and the original image size, it can be done using a parameter-synchronized mapping method. Alternatively, it can be constructed using an anchor-locked dynamic mapping method. First, the diagonal reference anchor point of the original image is locked as a fixed, non-shiftable coordinate reference. While receiving the user-adjusted extended range parameters, the mapping relationship between the extended region coordinates and the original pixel coordinates is updated synchronously, dynamically constructing a pixel mapping reference that adapts to the extended range adjustment, thereby achieving real-time dynamic adaptation of the mapping reference.

[0129] After completing the construction of the pixel mapping benchmark, the calculation process of boundary offset and region overlap relationship is initiated. Based on the unified pixel mapping benchmark, the boundary coordinates of the extended range and the boundary coordinates of the original image are all transformed to the same pixel coordinate system. The pixel-level displacement difference between corresponding boundaries is calculated for each boundary to obtain the boundary offset of each boundary. At the same time, the spatial position distribution of the two regions is compared to determine the complete inclusion relationship of the extended region to the original image. The range and proportion of overlapping and non-overlapping regions are statistically analyzed to obtain the region overlap relationship between the extended region and the original image. In this way, the accuracy and spatial consistency of the calculation results are guaranteed through coordinate transformation of the unified benchmark.

[0130] After calculating the boundary offset and the region overlap relationship, the geometric difference solution process is initiated. Combining the quantized value of the boundary offset and the spatial characteristics of the region overlap relationship, the total size difference in the horizontal and vertical dimensions is first decomposed, and then the corresponding pixel-level displacement difference is solved for each boundary. At the same time, the compliance of the difference is verified in combination with the region overlap relationship to ensure that the difference will not cause the original image to be cropped. Finally, the full-dimensional geometric difference between the extended reference range and the original image size is obtained. In this way, the integrity, accuracy and compliance of the geometric difference are improved by multi-dimensional feature fusion calculation.

[0131] After calculating the geometric difference, a pixel precision normalization process is initiated. First, using a single physical pixel as the smallest unit, the geometric difference is converted to integer values, transforming non-integer pixel data into compliant integer pixel values. Then, combined with the canvas baseline parameters, it is verified whether the expansion boundary corresponding to the difference exceeds the maximum range of the canvas, and abnormal difference data that exceeds the canvas boundary is removed. At the same time, it is verified whether the difference conforms to the mandatory rule of complete inclusion of the original image, and invalid difference values ​​that would intrude into the original image are removed. After completing the entire process, standardized difference parameters are generated. In this way, through pixel-level normalization, the calculation deviation caused by abnormal data is eliminated, ensuring the compliance and usability of the output parameters.

[0132] After generating the standardized difference parameters, the conversion process of extended pixel values ​​is initiated. Based on pixel-level coordinate mapping rules, the standardized difference parameters are converted into extended pixel values ​​corresponding to each boundary that can be directly recognized by the AI ​​image extension model. At the same time, the standardized adaptation of parameter formats is completed to ensure that the converted extended pixel values ​​can be directly input into the AI ​​image extension model. In this way, through standardized rule conversion, a seamless connection from difference parameters to AI-generated parameters is achieved.

[0133] For example, there are two ways to calculate the expanded pixel values ​​of an image through the entire process. The first is a closed-loop pixel-level precise solution method using diagonal double anchor points. This method uses the top-left and bottom-right diagonal anchor points of the original image as fixed, unalterable reference anchor points throughout the entire process. Based on the constructed pixel mapping reference, the original pixel coordinates of the two diagonal anchor points are locked as fixed references, ensuring that the pixel coordinates of the original image do not shift during the entire calculation process, thus fundamentally avoiding the problems of cropping and boundary misalignment of the original image. Then, based on the locked reference anchor points, the boundary offset between the corresponding boundary of the expanded region and the boundary of the original image is calculated boundary by boundary. Simultaneously, the overlap between the expanded region and the original image is checked to ensure that the original image is completely contained within the expanded region without any intrusion or cropping. Based on the boundary offset and region overlap relationship, the geometric differences in all dimensions, both horizontally and vertically, are calculated. A closed-loop normalization verification process is then initiated, performing pixel-precision integerization on the geometric differences. After each integerization transformation, the converted differences are simultaneously verified to ensure they conform to canvas boundary constraints and the original image's complete containment rules. If any abnormal data is found, the difference values ​​are corrected until all difference data meet pixel precision requirements and all-dimensional constraints, generating standardized difference parameters. Finally, based on pixel-level coordinate mapping rules, the standardized difference parameters are converted to corresponding extended pixel values ​​boundary by boundary, ensuring that the converted pixel values ​​perfectly match the locked original image anchor point coordinates without any coordinate deviation. This method employs a closed-loop verification and correction calculation logic with full-process locking of the original image's diagonal dual anchor points. By fixing the reference anchor points, it completely avoids the core pain points of original image coordinate offset, boundary misalignment, and cropping of the original image during the calculation process. At the same time, through full-constraint closed-loop verification after each transformation step, it ensures pixel-level accuracy and compliance of the difference calculation, eliminating calculation deviations caused by non-integer pixels and out-of-boundary abnormal data. It is suitable for professional image editing and commercial design scenarios with extremely high requirements for extended accuracy and original image integrity.

[0134] The second approach is a user interaction intent-driven boundary differentiation adaptation solution. First, based on the previously analyzed user extension intent, drag direction, interaction boundaries, and operation features, the four boundaries of the original image are classified and labeled. Boundaries where the user directly drags are marked as core interaction boundaries, while boundaries where the user has no interaction are marked as auxiliary adaptation boundaries. Differentiated calculation precision, weight priority, and adaptation rules are set for different types of boundaries. Then, based on the constructed pixel mapping benchmark, the boundary offset of the core interaction boundaries is calculated first, using sub-pixel-level high-precision calculation rules to ensure that the calculation precision of the core boundaries perfectly matches the user's drag operation. For auxiliary adaptation boundaries, basic pixel-level calculation rules are used. Under the premise of satisfying hard constraints such as aspect ratio and boundary limitations, minimum numerical adaptation is performed to reduce unnecessary calculations. By combining the offsets of each boundary with the region overlap, the geometric difference is calculated for each boundary. For the geometric difference of the core interaction boundary, pixel precision normalization is prioritized to ensure that its value is completely consistent with the user's drag displacement. For the geometric difference of the auxiliary adaptation boundary, the optimal minimum value is automatically adapted while meeting the target aspect ratio and boundary constraint rules. Subsequently, abnormal data removal and compliance verification are completed for all boundaries, generating standardized difference parameters that are deeply adapted to the user's interaction intent. Finally, according to the pixel-level coordinate mapping rules of the boundary, the differentiated extended pixel values ​​corresponding to each boundary are obtained. This method adopts a user interaction intent-driven boundary differentiation calculation logic, which is not limited to a uniform fixed calculation rule for the entire boundary. It can dynamically adjust the calculation precision, priority, and adaptation rules of different boundaries according to the user's actual interaction operation. While ensuring compliance with hard constraints, it maximizes the fit with the user's personalized interaction operation needs. At the same time, through differentiated calculation rules, while ensuring the precision of the core interaction boundary, it reduces the overall computational load and improves the response speed of the difference calculation. It is suitable for image editing and social content creation scenarios with personalized unilateral expansion and precise drag adjustment needs.

[0135] Seventh Embodiment This embodiment provides an exemplary scheme for intelligent generation and quality verification of AI image extended regions. In this example, visual information corresponding to the original image is first extracted. A visual association mapping table between the extended region and the original image is constructed by combining the calculated extended pixel values. Then, the extended pixel values ​​are converted into extended pixel parameters adapted to the model according to the model parameter output specifications and parameter conversion rules. Subsequently, the extended pixel parameters and the visual association mapping table are synchronously input into the AI ​​image extended model. The model matches the texture details and color tone of the original image to generate extended candidate results. Finally, based on a preset extended region quality verification standard, a full-dimensional quality verification and defect correction are performed on the extended candidate results to obtain a compliant target extended region. Step S40 includes steps F11~F14: Step F11: Extract the visual information corresponding to the original image, and combine it with the extended pixel values ​​to construct a visual association mapping table between the extended region and the original image.

[0136] Step F12: Convert the extended pixel value into the extended pixel parameter according to the model parameter output specification and parameter conversion rules.

[0137] Step F13: Synchronously input the extended pixel parameters and the visual association mapping table into the AI ​​image extension model, match the texture details and color tone of the original image, and extend to obtain extended candidate results.

[0138] Step F14: Based on the extended region quality verification standard, perform quality verification on the extended candidate results, correct quality defects, and obtain the target extended region.

[0139] A visual association mapping table is a standardized set of mappings that establishes a one-to-one correspondence between the requirements for generating extended regions and the visual features of the original image. It serves as the core guiding parameter for AI models to generate content that fits the original image. Examples include boundary texture continuation mapping relationships, color tone matching mapping rules, illumination distribution alignment mapping tables, semantic content connection association rules, and style feature unification mapping relationships.

[0140] Texture details are high-frequency features of object edges, material textures, and overall image details in the original image. They are core matching elements that ensure a natural visual connection between the expanded area and the original image. Examples include object material textures, image graininess, edge line features, text stroke details, and light and shadow gradient details. Color tone refers to the overall color style, hue tendency, color gamut range, and brightness distribution of the original image. It is a core matching element that ensures color consistency between the expanded area and the original image. Examples include the overall color temperature, hue tendency, color gamut range, brightness contrast, and color saturation distribution.

[0141] Quality defects are anomalous content in the expanded candidate results that does not meet the quality verification standards and are issues that need to be corrected. Examples include blurred edges, color deviations, missing details, semantic conflicts, abrupt boundary transitions, and image distortion. The target expanded region is the expanded region content that meets all generation requirements and can be directly used for final image synthesis after full-dimensional quality verification and defect correction; it is the final output of this step.

[0142] In this example, when extracting visual information corresponding to the original image and constructing a visual association mapping table by combining extended pixel values, the edge-anchored incremental feature extraction method is used to first lock the boundary region connecting the original image and the extended region as the core feature extraction area. While reading the pixel content of the original image, the core visual features of texture, color, and lighting of the boundary region are incrementally extracted. Combined with the extended region range corresponding to the extended pixel values, a visual association mapping table between each block of the extended region and the corresponding boundary of the original image is dynamically constructed, thereby completing the dynamic adaptation and construction of the mapping table.

[0143] After completing the construction of the visual association mapping table, the conversion process of extended pixel parameters is initiated. First, the model parameter output specification corresponding to the AI ​​image extension model is retrieved, and the core requirements of parameter format, dimension, and numerical range are extracted. Then, according to the preset parameter conversion rules, the extended pixel values ​​are normalized, dimension adapted, and format encapsulated to convert them into extended pixel parameters that fully conform to the model input specification. In this way, through standardized parameter conversion, the complete adaptation between input parameters and model is ensured, and abnormal model generation caused by parameter format incompatibility is avoided.

[0144] After completing the conversion of the extended pixel parameters, the AI ​​model extension generation process is initiated. The converted extended pixel parameters and the constructed visual association mapping table are simultaneously input into the AI ​​image extension model. The visual association mapping table guides the model to accurately match the texture details and color tone of the original image during the generation process, ensuring the visual consistency between the extended area and the original image. After the generation is completed, the extended candidate results are output. In this way, the pre-guidance of visual association mapping improves the adaptability between the extended content and the original image from the generation source, reducing the cost of subsequent defect correction.

[0145] After obtaining the extended candidate results, the quality verification and defect correction process is initiated. First, the preset extended region quality verification standards are retrieved to perform full-dimensional quality verification on the extended candidate results, including visual consistency, boundary fusion, detail integrity, and color deviation, to identify quality defects. Then, based on the original image features in the visual association mapping table, the defective content is corrected in a targeted manner. After the correction is completed, the final target extended region is obtained. In this way, through full-dimensional quality verification and correction, it is ensured that the final output extended region fully meets the generation requirements.

[0146] For example, there are two ways to obtain the target extended region through the whole process. The first is the full-link visual consistency closed-loop generation method anchored by boundary features. The boundary features connecting the original image and the extended region are the core of the whole process anchoring. First, the texture, color, lighting and semantic core visual features of the boundary regions around the original image are extracted. Combined with the extension amplitude of each boundary corresponding to the extended pixel value, a one-to-one visual feature continuation mapping rule is established for the extended region of each boundary. A visual association mapping table covering the whole boundary is constructed to ensure that each extended block has a corresponding original image feature as a generation guide. Then, according to the parameter specification of the AI ​​model, the extended pixel value is converted into standardized extended pixel parameters. Then, the extended pixel parameters and the visual association mapping table are synchronously input into the AI ​​image extension model. In each step of the model's generation iteration, the generated content is verified in real time through the visual association mapping table. If the deviation between the generated content and the original image features exceeds the preset threshold, the model is guided to adjust the generation parameters synchronously, forming a closed-loop generation logic of generation, verification and adjustment, until the generation of the entire extended region is completed and the extended candidate result is output. Subsequently, based on the extended region quality verification standard, a final full-dimensional quality verification is performed on the extended candidate results. For any remaining minor quality defects, pixel-level corrections are made based on the original image features in the visual association mapping table, ultimately obtaining a target extended region that is highly visually consistent with the original image. This method employs a generation-verification closed-loop logic with boundary features anchored throughout the process. Visual consistency constraints are applied at every iteration of model generation, rather than just after generation. This fundamentally avoids core issues such as edge blurring, color deviation, and detail disconnection, solving the industry pain point of abrupt visual connection and poor consistency between the extended region and the original image. It improves the quality of generated extended content and is suitable for commercial photography and professional design scenarios with extremely high requirements for visual consistency and boundary blending.

[0147] The second method is a semantically aware hierarchical quality verification and defect repair generation method. First, full-image semantic segmentation is performed on the original image to identify content at different semantic levels, such as the main object, background environment, text content, and core texture. Visual features at each semantic level are extracted, and combined with the extended region range corresponding to the extended pixel values, a hierarchical visual association mapping table is constructed, clarifying the generation requirements and feature matching priorities for different semantic regions. Then, the extended pixel values ​​are converted to extended pixel parameters according to the model parameter specifications. The extended pixel parameters and the hierarchical visual association mapping table are simultaneously input into the AI ​​image extension model, guiding the model to prioritize the continuity of the main object's edges and core texture according to the priority of different semantic levels, then matching the background environment's color and lighting to generate extended candidate results. Subsequently, based on the extended region quality verification standard, hierarchical quality verification is performed. First, boundary fusion and detail integrity verification are performed on the highest priority main semantic boundary; then, color consistency and lighting continuity verification are performed on the background semantic region; finally, overall visual consistency verification of the entire image is performed, identifying corresponding quality defects layer by layer. For defects at different levels, corresponding repair strategies are adopted. Pixel-level feature alignment is used to repair defects at the subject boundary, global color mapping calibration is used to correct background color defects, and original image texture continuation is used to complete detail gaps. After correcting defects at all levels, the final target expanded area is obtained. This method employs a semantically layered differentiated generation, verification, and repair logic. Differential priorities and processing strategies are set according to the semantic level of the image content. While ensuring natural continuity of the core subject content, it also considers the overall consistency of the background content. This improves the accuracy of the generated content and reduces unnecessary computational overhead. Furthermore, it can specifically repair different types of quality defects, making it suitable for daily image editing and social content creation scenarios involving complex subjects and multiple scenes.

[0148] Eighth embodiment This embodiment provides an exemplary scheme for visual interactive feedback of image expansion areas. In this example, following the display specifications of the image editing interface, the generated target expansion area is first layered and overlaid with the original image. The expansion area boundaries and expansion pixel values ​​are simultaneously labeled to obtain visual display data. This data is then output to the image editing interface to intuitively display the target expansion area and expansion pixel values. Subsequently, user interaction feedback from the image editing interface is detected in real time, and user adjustment commands for the visual display content are captured. Finally, the display data and expansion pixel values ​​are updated synchronously based on the adjustment commands, achieving real-time human-computer interaction for image expansion. Please refer to... Figure 5 , Figure 5 This is a flowchart illustrating the eighth embodiment of the method for defining interactive image extended regions in this application. Following step S40, steps G11-G14 are also included: Step G11: According to the display specifications of the image editing interface, the target extended area and the original image are layered and overlaid, and the boundary of the extended area and the extended pixel value corresponding to the target extended area are marked to obtain the visual display screen data.

[0149] Step G12: Output the visualization display data to the image editing interface to achieve an intuitive display of the target extended area and the extended pixel value.

[0150] Step G13: Detect user interaction feedback on the image editing interface and capture user instructions for adjusting the visual display content.

[0151] Step G14: Update the display screen data and the extended pixel value according to the adjustment instruction to achieve real-time human-computer interaction.

[0152] The display specifications for image editing interfaces are pre-defined, standardized display rules for interface rendering, layer overlay, and information annotation, adapted to different terminal devices and application scenarios. These rules form the core compliance basis for layered overlay processing. Examples include multi-layer rendering specifications for PC-based AI creation platforms, screen adaptation specifications for mobile editing applications, extended boundary annotation style rules, extended pixel value display formats, multi-resolution adaptation rules, layer transparency configuration specifications, and batch material layer group management rules. Real-time human-computer interaction is a closed-loop interaction process between the user and the system based on visual feedback, involving real-time two-way interaction, synchronized parameter updates, and real-time preview of extended effects. This is the core objective of this embodiment.

[0153] In this example, when completing the layered overlay processing to obtain the visualized display data according to the display specifications of the image editing interface, the full parameter synchronous rendering method provided in the ninth embodiment can be used. Alternatively, a scene-adaptive incremental rendering method can be adopted. First, the current application scenario and terminal device type are identified. For the PC-based AI content creation platform scenario, a multi-layer batch rendering mode is enabled, creating an independent layer group for each material and synchronously overlaying the expanded area of ​​the batch materials with the original image. For the mobile intelligent image editing scenario, a lightweight interface adaptation rendering mode is enabled, simplifying the annotation style, enlarging the interactive hotspot and numerical font size to adapt to the limited screen space of the mobile device. For the AI ​​generation cost prediction optimization scenario, generation cost prediction data annotations are synchronously overlaid during the rendering process to complete incremental layered rendering and obtain visualized display data adapted to the current scenario, thereby completing the multi-scene adapted image rendering.

[0154] After generating the visualization display data, the interface display process is initiated, outputting the visualization display data to the corresponding image editing interface in real time. Different display modes are adapted for different scenarios. In the AI ​​content creation platform, layered display of batch expansion effects of multiple materials is realized, allowing designers to independently edit each expanded area. In the mobile editing application, the expanded area and expanded pixel value are highlighted and displayed, reducing the user's visual recognition cost. In the generation cost prediction scenario, cost prediction data such as the total number of expanded pixels, estimated generation time, and resource consumption are displayed simultaneously, allowing users to understand the generation cost before making adjustments, thus achieving an intuitive visualization display that adapts to multiple scenarios.

[0155] After the interface display is completed, a user interaction feedback detection process is initiated. Through the event detection mechanism of the image editing interface, various user interactions such as clicks, drags, zooms, and parameter modifications are detected in real time. Different detection strategies are set for different scenarios. In the AI ​​content creation platform, unified adjustment commands for batch materials and independent adjustment commands for single materials are detected simultaneously. In the mobile editing application, an intelligent anti-mistouch detection mechanism is enabled to automatically correct illegal drag operations and filter invalid commands generated by accidental touches. In the cost prediction scenario, the focus is on detecting user adjustment commands based on cost feedback to expand the scope of adjustments, accurately capturing valid adjustment commands from users to the visualized content, thus completing the full-scenario user interaction feedback detection.

[0156] After capturing the user's adjustment command, a real-time update process is initiated. Based on the type and parameters of the adjustment command, the extended pixel values ​​are updated synchronously, the extended area range is recalculated, and the visual display data is refreshed simultaneously to achieve a real-time preview of the adjustment effect. Simultaneously, adaptation optimizations are performed for different scenarios. In the AI ​​content creation platform, the extended parameters and preview effects of batch materials are updated synchronously. In the mobile editing application, illegal selections are corrected synchronously, and the boundaries and pixel value annotations of the extended area are updated. In the generation cost prediction scenario, the total number of extended pixels and the generation cost prediction data are updated synchronously, forming a real-time closed-loop interaction of display, interaction, adjustment, and update, thereby achieving efficient real-time human-computer interaction.

[0157] For example, there are two ways to achieve real-time human-computer interaction through end-to-end processing. The first is a full-link closed-loop layered interaction control method. For batch design scenarios on PC-based AI content creation platforms, this method focuses on a closed-loop process encompassing parameters, rendering, display, interaction, and updates. First, the interface display specifications of the AI ​​content creation platform are loaded, establishing a three-level layer architecture: a bottom layer for the original image, a middle layer for the target extended area, and a top layer for boundary and numerical annotations. The target extended area and the original image are then layered and overlaid according to layer priority. Simultaneously, the boundary outline, pixel values ​​of each boundary extension, and total number of extended pixels are annotated in the top layer. For batch-processed creative materials, an independent layer group is created for each material, with no interference between groups, resulting in batch visualization display data. The image data is then output to the editing canvas of the creation platform, enabling independent layered display of each material's extended effect. Designers can lock, hide, and independently edit individual layers. Next, full-time interaction detection is initiated to capture designers' adjustment commands for individual or batch materials in real time, including boundary dragging, aspect ratio modification, and batch proportion unification commands, while filtering out invalid or erroneous commands. Upon receiving a valid adjustment command, the system immediately updates the corresponding extended pixel values ​​of the material, recalculates the extended area, and simultaneously refreshes the rendering data and annotation information of the corresponding layer. This achieves millisecond-level real-time preview of the adjustment effect. Simultaneously, the input parameters of the backend AI-generated model are updated to ensure complete consistency between the final generated area and the interactive adjustment area. This method employs a three-level layer architecture with a closed-loop control logic, enabling layered and independent control of extended effects in batch material creation scenarios. It solves the problems of layer chaos, parameter asynchrony, and inconsistencies between interactive and generated results in batch extended editing. Furthermore, it achieves automatic generation of AI parameters, eliminating the need for manual input by designers and improving their work efficiency in AI content creation.

[0158] The second approach is a lightweight, real-time interactive optimization method that adapts to specific scenarios. Targeting mobile intelligent image editing and AI-powered cost prediction optimization, this method focuses on terminal adaptation and real-time cost feedback. First, it identifies the current terminal device type and application scenario. For mobile small-screen scenarios, it loads lightweight interface display specifications, simplifies the layer architecture, and overlays the target expansion area with the original image. Highlighted, thick lines mark the boundaries of the expansion area, and large-font numerical values ​​are used to annotate the expansion pixel values ​​at each boundary. Simultaneously, it optimizes the interactive hotspot range to adapt to mobile touch operation habits. For cost prediction scenarios, during rendering, it calculates cost data such as the total number of generated pixels, estimated generation time, and computing resource consumption in real time based on the expansion pixel values. This cost prediction information is simultaneously annotated on the screen, resulting in lightweight, visualized display data adapted to the current scenario. The display data is then output to the corresponding interface, adaptively scaling to the screen resolution in mobile scenarios to ensure clear and readable content. In cost prediction scenarios, the expansion effect and cost data are displayed simultaneously, allowing users to intuitively understand the generation costs. Next, scene-adaptive interaction detection is initiated. In mobile scenarios, an intelligent anti-mistouch mechanism is activated, automatically correcting illegal selections that intrude into the original image or exceed the canvas boundaries during user dragging, filtering invalid operations caused by accidental touches, and simultaneously capturing user dragging adjustment commands in real time. In cost prediction scenarios, the focus is on capturing user adjustment commands based on cost feedback, including commands such as selecting the optimal expansion scheme and reducing the expansion range. After capturing adjustment commands, the expansion pixel values ​​and visualization display are updated synchronously. In mobile scenarios, the expansion area is corrected and pixel value annotations are updated simultaneously, and the adjustment effect is previewed in real time. In cost prediction scenarios, cost prediction data is updated synchronously to recommend the optimal expansion scheme that balances image quality and production cost to the user, forming a lightweight real-time interactive closed loop. This method employs scene-adaptive lightweight rendering and interaction optimization logic, addressing the issues of limited screen space, high operational complexity, and susceptibility to accidental touches in mobile small-screen scenarios. It lowers the operational threshold for mobile image expansion and editing, and provides real-time visual feedback on generation costs for cost prediction scenarios, allowing users to make reasonable trade-offs between image quality and computational costs. Furthermore, it automatically corrects illegal operations during user adjustments, improving the smoothness and convenience of the interaction.

[0159] This application provides an image extended region interaction definition device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the image extended region interaction definition method in the above embodiment 1.

[0160] The following is for reference. Figure 6This diagram illustrates a structural schematic of a definition device suitable for implementing image extension region interaction in the embodiments of this application. The definition device for image extension region interaction in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, professional graphics workstations, tablet computers (PADs, Portable Application Descriptions), and smart mobile terminals with AI image extension capabilities, as well as fixed terminals such as multi-channel interactive projection fusion systems and interactive smart tablets. Figure 6 The illustrated device for defining the interaction of the extended image region is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0161] like Figure 6 As shown, the image extended area interaction defining device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the image extended area interaction defining device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the image extension area interaction definition device to wirelessly or wiredly communicate with other devices to exchange data. Although the figure shows image extension area interaction definition devices with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0162] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0163] The image extended region interaction definition device provided in this application, employing the image extended region interaction definition method in the above embodiments, can solve the technical problem of low interaction efficiency in image extension. Compared with the prior art, the beneficial effects of the image extended region interaction definition device provided in this application are the same as those of the image extended region interaction definition method provided in the above embodiments, and other technical features in this image extended region interaction definition device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0164] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0165] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0166] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the image extended region interaction definition method in the above embodiments.

[0167] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0168] The aforementioned computer-readable storage medium may be included in the defining device for image extended region interaction; or it may exist independently and not be assembled into the defining device for image extended region interaction.

[0169] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a device defining an image expansion region interaction, the device defines the image expansion region interaction as follows: In response to an interactive operation in the image editing interface, it constructs constraints corresponding to the image expansion scene based on the interactive coordinate information corresponding to the interactive operation and the canvas reference parameters; it matches and calculates the original image size according to the target aspect ratio to obtain the minimum expansion region, and calibrates the minimum expansion region according to the constraints to obtain the expansion reference range corresponding to the original image; it maps and aligns the boundary coordinates of the expansion reference range with the boundary coordinates of the original image, calculates the geometric difference of each boundary, and converts the geometric difference into the corresponding expansion pixel value; it inputs the expansion pixel parameter obtained by converting the expansion pixel value into an AI image expansion model to obtain the target expansion region.

[0170] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0171] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation that may be implemented in systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0172] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0173] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described method for defining image extension region interaction, thereby solving the technical problem of low interaction efficiency in image extension. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the image extension region interaction definition method provided in the above embodiments, and will not be repeated here.

[0174] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for defining interactive extended regions of an image, characterized in that, The method includes: Initialize the interactive environment corresponding to the original image based on the canvas reference parameters and the boundary information of the original image; The interactive operation in the image editing interface is detected by the interactive environment to determine the operation type and target of the interactive operation; Based on the operation type and the target object, and combined with the boundary information of the original image, the drag direction and extension intent of the interactive operation are parsed and obtained. Based on the drag direction and expansion intention of the interactive operation, the coordinate system of the original image and the canvas is normalized to generate an initial interactive coordinate set under a unified reference. Based on the boundary information of the original image and the semantic requirements of image expansion, invalid coordinates that cause the expanded region to intrude into the interior of the original image are removed, and the interactive coordinate information corresponding to the interactive operation is obtained. In response to interactive operations in the image editing interface, constraints corresponding to the image extension scene are constructed based on the interactive coordinate information and canvas reference parameters, including: Using the canvas reference parameters as the constraint reference, and combining them with the interactive coordinate information, a reference calibration process is performed to obtain the interactive feature parameters. Based on the aforementioned constraint benchmarks and hard constraint rules, core constraint conditions are generated; The interactive feature parameters and the core constraints are matched with the user's extended adjustment requirements to construct a multi-dimensional constraint set; The multi-dimensional constraint set is logically integrated and conflict-resolved according to constraint priority to obtain the constraint conditions adapted to this image expansion. The original image size is matched and calculated according to the target frame ratio to obtain the minimum expansion region. This minimum expansion region is then calibrated according to the constraints to obtain the expansion reference range corresponding to the original image, including: The original image size is matched and calculated according to the target frame ratio to obtain the minimum expansion area; Based on the minimum expansion region, and combined with the mandatory rule that the original image is completely contained in the constraint conditions, the minimum expansion region parameters are obtained; Based on the minimum expansion region parameters, and in conjunction with the alignment constraints, boundary limitation rules, and optimal minimum expansion rules in the constraints, the region position is calibrated to obtain the expansion reference range; The boundary coordinates of the extended reference range are mapped and aligned with the boundary coordinates of the original image. The geometric difference between each boundary is calculated, and the geometric difference is converted into the corresponding extended pixel value, including: Based on the extended reference range and the original image size, a pixel mapping reference between the extended region coordinates and the original pixel coordinates is constructed according to the coordinate mapping algorithm; Based on the pixel mapping reference, calculate the boundary offset and region overlap relationship between the extended reference range and the original image; The geometric difference between the extended reference range and the original image size is calculated using the boundary offset and the region overlap relationship. The geometric difference is normalized to pixel precision, and non-integer pixels and abnormal data that exceed the canvas range are removed to obtain the standardized difference parameter. The standardized difference parameters are transformed according to pixel-level coordinate mapping rules to obtain the extended pixel values ​​of the image extension; The extended pixel parameters obtained by converting the extended pixel values ​​are input into the AI ​​image extension model to obtain the target extended region.

2. The method for defining interactive image extended regions as described in claim 1, characterized in that, The step of calibrating the region position based on the minimum expansion region parameters, combined with the alignment constraints, boundary limiting rules, and optimal minimum expansion rules in the constraints, to obtain the expanded reference range includes: By comparing the size difference between the original image and the minimum expansion region, and combining the minimum expansion region parameters, the minimum expansion increment value corresponding to each boundary is calculated. According to the alignment constraints and boundary limitation rules in the constraints, the minimum expansion increment values ​​corresponding to each boundary of the image are calibrated to obtain the target expansion region parameters. The target extended region parameters are matched with the canvas reference parameters corresponding to the original image using coordinate system matching, and the corresponding associated coordinate system parameters are used to generate the extended reference range.

3. The method for defining interactive image extended regions as described in claim 1, characterized in that, The step of inputting the extended pixel parameters obtained by converting the extended pixel values ​​into the AI ​​image extension model to obtain the target extended region includes: Extract the visual information corresponding to the original image, and combine it with the extended pixel values ​​to construct a visual association mapping table between the extended region and the original image; According to the model parameter output specification and parameter conversion rules, the extended pixel values ​​are converted into the extended pixel parameters; The extended pixel parameters and the visual association mapping table are synchronously input into the AI ​​image extension model to match the texture details and color tone of the original image, thereby expanding and obtaining extended candidate results; Based on the extended region quality verification standard, the extended candidate results are verified for quality, quality defects are corrected, and the target extended region is obtained.

4. The method for defining interactive image extended regions as described in claim 1, characterized in that, After the step of inputting the extended pixel parameters obtained by converting the extended pixel values ​​into the AI ​​image extension model to obtain the target extended region, the method for defining the interactive image extended region further includes: According to the display specifications of the image editing interface, the target extended area and the original image are layered and overlaid, and the boundary of the extended area and the extended pixel value corresponding to the target extended area are marked to obtain the visual display screen data. The visualization display data is output to the image editing interface to achieve an intuitive display of the target extended area and the extended pixel value; Detect user interaction feedback on the image editing interface and capture user instructions for adjusting the visual display content; The display screen data and the extended pixel value are updated according to the adjustment instructions to achieve real-time human-computer interaction.

5. A device for defining interactive image extended regions, characterized in that, The image extended region interaction definition device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image extended region interaction definition method as described in any one of claims 1 to 4.

6. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the method for defining image extended region interaction as described in any one of claims 1 to 4.