A reference picture management method for maintaining consistency of a comic character

By generating a dimensionless topological feature matrix and a two-dimensional spatial mapping function, the accuracy problem of character structural deviation detection in digital comics is solved, realizing automatic correction of character consistency and visual guidance, and supporting artists' efficient drawing operations.

CN122335922APending Publication Date: 2026-07-03JINAN YIZHU GUANGNIAN ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610709258.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-07-03

Smart Images

  • Figure CN122335922A_ABST
    Figure CN122335922A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of graphic processing, and discloses a reference graph management method for maintaining the consistency of a cartoon character, which comprises the following steps: obtaining absolute physical coordinates of proxy node layers in initial and iterative engineering files, respectively generating a benchmark and a current topology feature matrix through centralization and scaling processing; calculating a weighted absolute cumulative deviation between the two topology feature matrices according to weight values, and comparing the weighted absolute cumulative deviation with a tolerance threshold; when the deviation is greater than the tolerance threshold, constructing a two-dimensional space mapping function by using the two matrices; establishing a two-dimensional grid structure covering the whole canvas, performing spatial bending transformation on the two-dimensional grid structure by using the mapping function, and generating an inverse rectification grid image; and newly creating an independent layer in the iterative engineering file and importing the image into the independent layer. Through coordinate dimensionless processing and non-rigid space mapping technology, the character coordinate deviation is converted into a continuous global deformation field, so that a visual reference is provided for character structure adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graphics processing technology, specifically to a method for managing reference images to maintain consistency in comic book characters. Background Technology

[0002] In the process of creating digital comics, the same comic character needs to appear multiple times in different storyboards. Artists must maintain consistency in the character's proportions and physical features during the drawing process. The conventional approach is to use the original concept art or a finished draft from a previous project file as a reference image, importing it into the current drawing software's workspace for comparison.

[0003] This comparison method, relying on observation and layer overlay, is limited by the artist's subjective judgment and struggles to grasp the spatial topological relationships of key parts of a character. When a character shifts or scales across different scenes due to compositional needs, conventional layer overlay methods fail to reflect the amount of structural deformation. Existing graphic-aided comparison tools mostly use pixel-level image difference calculations to compare images. However, in comic book creation, characters undergo reasonable dynamic changes, and pixel-based difference calculations extract redundant comparison information, failing to accurately measure the topological deviations in the relative positions of key feature nodes. Furthermore, current drawing systems lack geometric deformation guidance mechanisms after determining that a character's structure has deformed beyond set limits. When adjusting image structure, artists often need to perform repeated modifications due to the lack of a quantified spatial deformation reference grid, limiting the auxiliary role of reference images in correcting deviations in character structural proportions. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a reference image management method for maintaining the consistency of comic characters. This method solves the problems in existing technologies where pixel comparison cannot accurately measure structural topological deviations during character translation or scaling, and where there is a lack of quantified spatial deformation reference meshes to assist artists in making adjustments.

[0005] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a method for managing reference images to maintain consistency in comic book characters, comprising the following steps: Obtain the absolute physical coordinates of the proxy node layer in the initial graphics project file, perform spatial centering and scaling on the absolute physical coordinates, and generate a dimensionless reference topological feature matrix. Obtain the current absolute physical coordinates of the proxy node layer in the iterative graphics project file, perform spatial centering and scale scaling on the current absolute physical coordinates, and generate the current topological feature matrix; Based on the weight values ​​corresponding to the obtained proxy node layers, calculate the weighted absolute cumulative deviation between the current topology feature matrix and the benchmark topology feature matrix, and compare the weighted absolute cumulative deviation with the preset tolerance threshold. If the weighted absolute cumulative deviation is less than or equal to the preset tolerance threshold, the data persistence storage of the iterative graphic engineering file is completed. If the weighted absolute cumulative deviation is greater than the preset tolerance threshold, a two-dimensional spatial mapping function is constructed using the current topological feature matrix and the reference topological feature matrix. A two-dimensional mesh is established, and a two-dimensional spatial mapping function is used to perform a spatial curvature transformation on the two-dimensional mesh to generate an inverse correction mesh image. Create a new independent layer in the iterative graphics project file, and import the reverse correction mesh image into the independent layer.

[0006] Furthermore, before obtaining the absolute physical coordinates of the proxy node layer in the initial graphics project file, the following steps are also included: Read the document object model tree structure of the initial graphics project file; The proxy node layers are named according to the preset naming mapping rules. The layer name field is set. The layer name field contains a type prefix for system verification and a function identifier for part mapping. The correspondence between discrete coordinate points and continuous skeleton topology is established by relying on the name field matching mechanism, and the unique identifier is used to locate the proxy node layer by relying on the layer group name field.

[0007] Furthermore, spatial centering and scaling are performed on the absolute physical coordinates to generate a dimensionless reference topological feature matrix, and spatial centering and scaling are performed on the current absolute physical coordinates to generate the current topological feature matrix, specifically including: Obtain all horizontal and vertical physical coordinate values ​​in the absolute physical coordinates of each proxy node layer. Then, sum all the horizontal and vertical physical coordinate values ​​and divide them by the total number of proxy node layers to calculate the horizontal and vertical coordinates of the geometric center. Calculate the root mean square distance from each proxy node layer to the geometric center to obtain the scale factor; The horizontal and vertical physical coordinate values ​​corresponding to each proxy node layer are center-shifted and divided by the scale factor to obtain normalized coordinate values ​​that include horizontal and vertical normalized coordinates. All horizontal and vertical normalized coordinates are arranged according to the node extraction sequence to construct a baseline topological feature matrix. Simultaneously, the current absolute physical coordinates are processed using the same mathematical model to calculate the current geometric center x-coordinate, current geometric center y-coordinate, and current scale factor. Subtract the current geometric center horizontal coordinate and the current geometric center vertical coordinate from the current horizontal and vertical physical coordinate values ​​corresponding to each proxy node layer, and divide the centered and translated coordinate values ​​by the current scale factor to calculate the current horizontal normalized coordinate and the current vertical normalized coordinate. Arrange the extracted node sequences to construct the current topological feature matrix.

[0008] Further, based on the weight values ​​corresponding to the obtained proxy node layers, the weighted absolute cumulative deviation between the current topological feature matrix and the baseline topological feature matrix is ​​calculated. Specific steps include:

[0009] Based on the preset layer name field mapping rules, read the function identifier in the metadata of each proxy node layer, look up the preset weight mapping configuration table in the system, divide the proxy node layer into static feature nodes and dynamic feature nodes according to the function identifier, assign corresponding weight values ​​to the proxy node layer, and construct the feature weight vector by combining and arranging according to the node extraction sequence. Calculate the Euclidean distance between the corresponding nodes in the current topological feature matrix and the reference topological feature matrix in the dimensionless metric space. Multiply the Euclidean distance by the corresponding weight value in the feature weight vector to obtain the single-point weighted deviation value of the corresponding node. Then, accumulate the single-point weighted deviation values ​​of all proxy node layers to obtain the weighted absolute cumulative deviation.

[0010] The preset tolerance threshold is used to define the maximum allowable deformation limit of the character structure. This value is set in the preset configuration file to match the complexity of the current character structure. The persistent storage of data for iterative graphical engineering files is completed, specifically including: Create a new version branch node in the version control database and write the file data of the iterative graphical project file and its corresponding file hash value into the new version branch node.

[0011] Furthermore, a two-dimensional spatial mapping function is constructed using the current topological feature matrix and the reference topological feature matrix, specifically including: Extract the current topological feature matrix as the source control point set, extract the reference topological feature matrix as the target control point set, and calculate and construct a two-dimensional spatial mapping function based on the thin-plate spline interpolation algorithm. The steps for obtaining the transverse non-rigid weight coefficients, longitudinal non-rigid weight coefficients, transverse polynomial affine parameters, and longitudinal polynomial affine parameters specifically include: Based on the current horizontal and vertical normalized coordinates of each proxy node layer, calculate the distance between any two proxy node layers and substitute them into the radial basis function to construct the distance kernel matrix; Extract the current normalized coordinates of each proxy node layer and add a constant term column to construct a polynomial coordinate matrix; The global coefficient matrix is ​​obtained by concatenating the distance kernel matrix, the polynomial coordinate matrix, the transpose of the polynomial coordinate matrix, and the zero matrix. Extract the normalized coordinates from the baseline topological feature matrix and add zero elements to the end of the array to construct the horizontal target vector and the vertical target vector respectively; Using the global coefficient matrix and the horizontal and vertical target vectors, respectively, establish horizontal linear equation systems and vertical linear equation systems. By solving the linear equation systems, calculate the horizontal non-rigid weight coefficients, vertical non-rigid weight coefficients, horizontal polynomial affine parameters, and vertical polynomial affine parameters. Use the above coefficients and parameters to construct a two-dimensional spatial mapping function, so that each source control point can be aligned with the corresponding target reference point after the mapping calculation.

[0012] Furthermore, a two-dimensional mesh is established, and a spatial curvature transformation is performed on the two-dimensional mesh using a two-dimensional spatial mapping function to render and generate an inverse correction mesh image. The specific steps include: The process involves obtaining the physical width and height of the canvas in the current iteration of the graphics project file, and constructing an orthogonal Cartesian grid covering the entire canvas in memory according to a preset pixel interval. The grid is then traversed to obtain the current physical x-coordinate and y-coordinate of each grid point. These coordinates are then converted to normalized x-coordinate and y-coordinate using the current geometric center x-coordinate, y-coordinate, and current scale factor. The normalized coordinates are substituted into a two-dimensional space mapping function for numerical calculation to obtain the normalized x-coordinate and y-coordinate of the target grid corresponding to the reference normalized space. These are then inversely magnified and translated using the scale factor and the geometric center x-coordinate and y-coordinate to calculate the target grid's physical x-coordinate and y-coordinate, establishing a two-dimensional mapping lookup table. Finally, all visible drawing layers in the current iteration of the graphics project file are extracted and rasterized and flattened in memory to obtain merged image pixel data. Based on the coordinate offset relationship recorded in the two-dimensional mapping lookup table, the graphics rendering module is called to perform spatial resampling processing on the merged image pixel data, extract the pixel matrix generated after resampling and assign it a set transparency channel value, and generate an inverse correction grid image with transparency channel attributes as a visual guidance layer.

[0013] Furthermore, a new independent layer is created in the iterative graphics project file, and the inverse correction mesh image is imported into the independent layer. The specific implementation method is as follows: By calling the underlying extended application programming interface of the host graphics editing software, a temporary virtual layer node is dynamically instantiated as an independent layer above the topmost node of the layer structure of the iterative graphics project file. The pixel matrix of the reverse-corrected mesh image is loaded into the texture buffer of the virtual layer node, and the origin coordinates of the virtual layer node are forcibly aligned with the origin coordinates of the canvas. Set the virtual layer node state to locked and transparent, so that cursor click and drag events received in the canvas area pass through the virtual layer node and act on the underlying source drawing layer. The opacity parameter in the configuration file is read and applied to the rendering blending configuration of the virtual layer node. During frame redraw, the pixels of the virtual layer node are blended with the pixels of the source drawing layer to obtain the final output pixel color value. After importing the inverse correction mesh image into a separate layer, the following control steps are also included: By intercepting the received secondary version submission command, the bounding box data of each proxy node layer is re-extracted, the physical center coordinates of the bounding box are obtained as the updated absolute physical coordinates, the serialized and packaged current topology feature matrix is ​​reconstructed after correction, and the new weighted absolute cumulative deviation is calculated. When the new weighted absolute cumulative deviation is less than or equal to the preset tolerance threshold, the virtual layer node residing in the running memory is destroyed, and the texture buffer resources allocated for the virtual layer node are cleared.

[0014] This invention provides a method for managing reference images to maintain consistency in comic book characters. It has the following beneficial effects: 1. This invention generates a normalized baseline topological feature matrix and a current topological feature matrix by centering and scaling the absolute physical coordinates of the proxy node layer, and then calculates the weighted absolute cumulative deviation based on these matrices. This coordinate processing method eliminates the coordinate value differences caused by the overall translation and scaling of the character in the canvas, enabling the system to map the character features from different versions to a unified dimensionless metric space for comparison, thus improving the objectivity of character structure consistency detection. 2. When the deviation exceeds the tolerance threshold, this invention utilizes a thin-plate spline interpolation algorithm and radial basis functions to construct a two-dimensional spatial mapping function, and performs spatial bending transformation on the two-dimensional mesh structure covering the entire canvas. This process transforms the local coordinate deviation of discrete nodes into a continuous global deformation field. The resulting inverse correction mesh image can quantitatively display the deformation trend of the character's parts, thus providing specific visual reference for the artist's layer modification operations. 3. This invention dynamically instantiates a locked and penetrated virtual layer node in the project file, and loads the reverse correction mesh image onto this node to provide visual guidance. This layer configuration method allows cursor click and drag events to pass through the reference mesh and act on the underlying source drawing layer without interfering with the artist's normal drawing input operations. Combined with a closed-loop control mechanism that intercepts secondary version submission commands, the system re-extracts coordinate data and recalculates deviations after modifications, ensuring the integrity of the reference image correction and status verification process. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the system architecture of the present invention; Figure 3 This is a comparison chart of the trend of weighted absolute cumulative deviation in multiple iterations of the present invention; Figure 4 This is a diagram verifying the convergence efficiency of the reverse deformation feedback and correction in this invention. Detailed Implementation

[0016] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Please see the appendix Figure 2 This invention provides a reference image management system for maintaining consistency in comic book characters, comprising: The client module is used to send the initial graphic project file containing proxy layer nodes and the iterative graphic project file, and to receive the reverse correction mesh image to import into the new layer. The server module is used for data transmission and instruction scheduling between modules, and to perform data entry or request blocking operations based on the deviation judgment results. The parsing normalization module is used to read the graphic project file, extract the node coordinates, and perform scale scaling to generate a dimensionless benchmark or current topological feature matrix. The storage module is used to associate and bind the topological feature matrix with the hash value of the corresponding file and persist it to the version control database. The deviation determination module is used to calculate the weighted absolute cumulative deviation between the current topological feature matrix and the reference topological feature matrix, and compare it with the tolerance threshold to generate a determination result. The deformation rendering module is used to construct a two-dimensional spatial mapping function based on the thin plate spline interpolation algorithm when the database entry request is blocked, and to render and generate an inverse correction mesh image with alpha channel properties for the client to correct and reference.

[0018] Please see the appendix Figure 1 This invention provides a reference image management method for maintaining consistency in comic characters, comprising the following steps: S1, the client module sends the initial graphic project file containing the proxy layer nodes to the server module, and the server module transmits the initial graphic project file to the parsing and normalization module; S2, the parsing normalization module reads the document object model tree structure of the initial graphic project file, obtains the absolute physical coordinates of the proxy layer nodes, performs spatial centering and scale scaling on the obtained absolute physical coordinates, and generates a dimensionless reference topological feature matrix. S3, the storage module receives the baseline topology feature matrix, associates and binds the baseline topology feature matrix with the hash value of the initial graphics project file, and writes it to the version control database; S4. During the multi-generation version iteration submission phase, the client module submits the modified iterative graphic project file to the server module. The parsing and normalization module reads the iterative graphic project file, extracts the coordinate data of the proxy layer nodes in the current iteration version, performs scale scaling processing, and generates the current topological feature matrix. S5, the server module transmits the current topology feature matrix to the deviation determination module. The deviation determination module retrieves the benchmark topology feature matrix from the storage module and calculates the weighted absolute cumulative deviation between the current topology feature matrix and the benchmark topology feature matrix. S6, the deviation determination module compares the weighted absolute cumulative deviation with the tolerance threshold to generate a determination result; S7, when the judgment result shows that the weighted absolute cumulative deviation is less than or equal to the tolerance threshold, the server module instructs the storage module to generate a new branch node in the version control database, complete the persistent storage of the iterative graphic project file data, and return a successful entry confirmation message to the client module. S8, when the judgment result shows that the weighted absolute cumulative deviation is greater than the tolerance threshold, the server module blocks the request to put the iterative graphic engineering file into the library and wakes up the deformation rendering module. The deformation rendering module extracts the current topological feature matrix as the source control point set, extracts the reference topological feature matrix as the target control point set, and calculates and constructs a two-dimensional spatial mapping function based on the thin plate spline interpolation algorithm. S9, the deformation rendering module establishes an orthogonal Cartesian mesh, uses a two-dimensional spatial mapping function to perform spatial bending transformation on the orthogonal Cartesian mesh, and renders a reverse-correction mesh image with alpha channel properties. S10, the server module sends the reverse correction mesh image and rejection command to the client module. The client module calls the application programming interface of the image editing software to create a new independent layer at the top layer of the layer structure of the iterative graphic project file and imports the reverse correction mesh image into the independent layer.

[0019] When creating the initial graphical project file, the proxy node specification setting operation is performed, and the topological space characteristics of the roles are solidified based on the document object model tree structure of the graphical project file.

[0020] The principle behind this operation is to transform the process of identifying topological features from extracting pixel features of the image appearance into directly reading values ​​from the underlying data structure of the project file. This method avoids the impact of image style variations on the accuracy of feature point extraction.

[0021] A proxy layer group is created at the top of the layer document object model tree structure in the initial graphics project file. The proxy layer group is uniquely identified by a defined layer group name field to ensure accurate tree node positioning during system parsing. The proxy layer group has anti-modification and anti-rendering properties. The anti-modification property is implemented by activating the layer object's data locking and position locking switches to prevent spatial coordinate offsets caused by mouse dragging during drawing operations. The anti-rendering property is implemented by setting the layer visibility parameter to hidden or setting the opacity parameter in the layer blending mode to zero, ensuring that elements within the proxy layer group do not participate in the final image pixel rendering output.

[0022] Generate within the proxy layer group A proxy node layer. The proxy node layer is used to indicate the two-dimensional spatial position of various parts of the character's body. The proxy node layer uses geometric shapes with no or very small area to achieve precise spatial positioning. Its specific lower-level features are single-pixel image markers, vector path anchors without fill attributes, or shape layers with zero size parameters. The proxy node layer does not contain complex texture pixel data; it only relies on its own center point coordinates in the canvas physical coordinate system to reflect the feature position. The canvas physical coordinate system uses the top-left corner of the canvas in the initial graphics project file as the origin. Parameters The value is preset by the user based on the complexity of the role, and is usually a positive integer between tens and hundreds.

[0023] The proxy node layers are named according to the preset naming mapping rules. The layer name field contains a type prefix for system verification and a function identifier for part mapping. The system relies on the name field matching mechanism to establish the correspondence between discrete coordinate points and the coherent skeleton topology.

[0024] Based on the layered document object model tree structure, a deterministic set of physical coordinates is formed in the initial graphics project file. Physical coordinate set The expression is: ; in, Represents the set of physical coordinates. Indicates the first The absolute physical coordinates of each proxy node layer in the canvas physical coordinate system. Expand as , Represents the horizontal physical coordinate value. Represents the vertical physical coordinate value. The range of values ​​is arrive positive integers, This indicates the total number of proxy node layers.

[0025] For the storage format encoding and byte stream extraction mechanism of layer document object model tree data in graphic engineering files, those skilled in the art can combine existing file parsing libraries to complete file node traversal and attribute acquisition. The basic binary file deserialization operation is a well-known technology in this field and will not be elaborated here.

[0026] Upon receiving the initial graphics project file, the server performs metadata parsing and raw physical coordinate extraction. This operation obtains the character's topological spatial characteristics by reading the underlying structure of the graphics project file. The principle behind this is that before being rendered into a visual image, the internal structure of the graphics file stores the positional parameters of each layer element in the form of an object tree and attribute fields. By parsing the file's underlying bytecode to extract these positional parameters, coordinate data unaffected by image display style can be obtained.

[0027] The server reads the underlying byte stream data of the initial graphics project file through a file parsing component. This file parsing component is a code execution module deployed within the server environment. It skips the loading and rendering of image pixel data segments and performs binary deserialization on the layer description sections of the initial graphics project file. After deserialization, the server constructs a layer document object model tree corresponding to the initial graphics project file in memory.

[0028] The server performs node traversal and search in the layer document object model tree. The server extracts the attribute information of each tree node, performs string matching between the obtained node name and the preset layer group name field, and locates the root node of the proxy layer group in the hierarchical structure of the layer document object model tree.

[0029] After locating the proxy layer group, the server continues to traverse down to all child nodes contained in that proxy layer group node, and retrieves them from there. Metadata for each proxy node layer. This indicates the total number of proxy node layers. The server reads and parses the spatial attribute fields of the obtained metadata to calculate the absolute physical coordinates of each proxy node layer in the canvas physical coordinate system.

[0030] Specifically, when the proxy node layer is a shape layer with a size parameter of zero or a single-pixel image marker, the server reads the bounding box data of the proxy node layer from the metadata, obtains the top-left and bottom-right corner points of the bounding box in the canvas physical coordinate system, and calculates the absolute physical coordinates through the geometric center. The underlying data of the graphics project file typically records the position span of layer elements in the form of rectangular bounding boxes. Therefore, by extracting the coordinates of the diagonal vertices of the bounding box and calculating the average, the coordinate system position of the geometric center of the graphic element can be obtained. The expression for calculating the absolute physical coordinates of the center point is: ; ; in, Represents the horizontal physical coordinate value. Represents the vertical physical coordinate value; Indicates the first The top-left horizontal coordinate of the bounding box of each proxy node layer. Indicates the first The bottom right horizontal coordinate of the bounding box of each proxy node layer; Indicates the first The top-left vertical coordinate of the bounding box of each proxy node layer. Indicates the first The vertical coordinate of the bottom right corner of the bounding box of each proxy node layer; The range of values ​​is arrive positive integers, This indicates the total number of proxy node layers, and the number 2 is a constant used to calculate the midpoint of the coordinates.

[0031] When the proxy node layer is a vector path anchor point with no fill attribute, the server reads the original defined coordinates of the anchor point from the path description field of the metadata and uses them as the horizontal physical coordinate value corresponding to the proxy node layer. With vertical physical coordinate value .

[0032] The server will store the horizontal physical coordinates of each proxy node layer. With vertical physical coordinate value Combined into absolute physical coordinates . Indicates the first The absolute physical coordinates of each proxy node layer in the canvas physical coordinate system. The server extracts all the absolute physical coordinates according to the order in which the proxy node layers are extracted. Summarized into a set of physical coordinates It is then output to the cache for use in subsequent steps. Represents the set of physical coordinates.

[0033] For the underlying byte stream reading and binary deserialization processing mechanism of graphic engineering files, those skilled in the art can use existing open-source file parsing libraries to write and integrate code. The parsing and data extraction of standard graphic file format structures are well-known technologies in this field and will not be elaborated here.

[0034] After extracting the physical coordinate set, the server performs spatial centering and scaling to generate a dimensionless baseline topological feature matrix. The principle behind this process is that during multi-generational collaborative image editing, canvas parameters can change due to cropping, overall scaling, or translation operations. Rigid transformations eliminate coordinate offsets caused by overall translation and scaling, mapping coordinate data at different resolutions to the same metric space, thus ensuring comparability.

[0035] The server retrieves all horizontal and vertical physical coordinate values ​​from the physical coordinate set. It then sums all the horizontal physical coordinate values ​​and divides the sum by the total number of proxy node layers to calculate the horizontal coordinate of the geometric center. Similarly, it sums all the vertical physical coordinate values ​​and divides the sum by the total number of proxy node layers to calculate the vertical coordinate of the geometric center.

[0036] The server calculates the scale factor based on the x-coordinate and y-coordinate of the geometric center. The scale factor represents the root mean square distance from each point to the geometric center and is used to measure the overall spatial distribution range of the point set. The expression for calculating the scale factor is: ; in, Indicates the scale factor; Indicates the total number of proxy node layers; The range of values ​​is arrive Positive integers; Indicates the horizontal physical coordinate value; Represents the vertical physical coordinate value; Represents the x-coordinate of the geometric center; Represents the ordinate of the geometric center.

[0037] After obtaining the scale factor, the server centers and translates the horizontal and vertical physical coordinate values ​​of each proxy node layer, then divides them by the scale factor to obtain normalized coordinate values. The calculation expression is: ; ; in, Indicates the first The horizontal normalized coordinates of each proxy node layer; Indicates the first The vertical normalized coordinates of each proxy node layer; Indicates the horizontal physical coordinate value; Represents the vertical physical coordinate value; Represents the x-coordinate of the geometric center; Represents the ordinate of the geometric center; Represents the scale factor.

[0038] The server arranges all horizontally and vertically normalized coordinates according to the node extraction sequence to construct a baseline topological feature matrix. This matrix records the relative spatial positions of the character structures after eliminating physical size differences. The baseline topological feature matrix is ​​denoted as... Its manifestation includes Action and The matrix structure consists of columns, with each row corresponding to the horizontal and vertical normalized coordinates of a proxy node layer.

[0039] After the baseline topology feature matrix is ​​constructed, the server performs a baseline registration operation. The server calls the hash algorithm module to calculate the file hash value of the initial graphics project file. The file hash value is used to identify the status of the initial graphics project file. The server associates and binds the baseline topology feature matrix with this file hash value and writes the bound data record to the version control database, completing the persistent storage of the baseline version topology data. Subsequent iterations will use this persistent baseline topology feature matrix as the reference benchmark for consistency comparison.

[0040] For the calculation of file hash values ​​and database writing operations, those skilled in the art can use existing secure hash algorithms combined with relational database operation instructions. The calculation of hash values ​​and data storage are well-known technologies in this field and will not be elaborated here.

[0041] During the collaborative process of multiple version iterations, after the artist modifies the character, the client submits the iterative graphics project file to the server. Upon receiving the iterative graphics project file, the server performs the dynamic iterative topological feature matrix generation operation.

[0042] The principle behind this operation is that although the character's appearance pixels change continuously during multiple iterations, the underlying data structure of the graphics file remains consistent with the initial version due to the anti-modification and anti-rendering properties of the proxy layer group. The server parses and iterates the graphics project file using the same underlying extraction logic to obtain the current structural data under a dimensionless reference system that is completely identical to the baseline state, thus providing a unified data format for subsequent structural deviation measurements.

[0043] The server invokes a file parsing component to read the underlying byte stream data of the iterative graphics project file, constructing the corresponding layer document object model tree in memory. The server matches the defined layer group name field within the layer document object model tree, locating the root node of the proxy layer group. The server then traverses the child nodes within the proxy layer group to obtain... The metadata of each proxy node layer is analyzed and its spatial attribute fields are parsed. This indicates the total number of proxy node layers.

[0044] The server calculates the current absolute physical coordinates of each proxy node layer in the canvas physical coordinate system based on the values ​​of the spatial attribute fields. The server then separates the current horizontal and vertical physical coordinate values ​​from the current absolute physical coordinates.

[0045] The server processes the coordinate data using the same rigid transformation mathematical model as the baseline registration process. The server sums all current horizontal physical coordinate values ​​and divides them by the total number of proxy node layers to calculate the current geometric center horizontal coordinate. Similarly, the server sums all current vertical physical coordinate values ​​and divides them by the total number of proxy node layers to calculate the current geometric center vertical coordinate.

[0046] The server calculates the root mean square distance from each proxy node layer to the geometric center. The server then uses the current horizontal and vertical physical coordinates, as well as the current x-coordinate and y-coordinate of the geometric center, to calculate the current scale factor. This current scale factor reflects the spatial span of the character's overall structure in the iterative version.

[0047] The server performs a center-shift operation on the current horizontal and vertical physical coordinates of each proxy node layer, specifically by subtracting the current geometric center's horizontal and vertical coordinates respectively. The server then divides the shifted coordinates by the current scale factor to calculate the current normalized horizontal and vertical coordinates. This process eliminates coordinate value fluctuations in the iterative graphics project file caused by canvas clipping or overall layer scaling.

[0048] The server arranges all current horizontal and vertical normalized coordinates according to the extraction sequence of the proxy node layer to construct the current topological feature matrix. This current topological feature matrix records the spatial relative positions of the character structures in the iterative graphics project file. The current topological feature matrix is ​​denoted as... , The matrix representation is as follows: ; in, Represents the current topological feature matrix; Indicates the first The current horizontal normalized coordinates of each proxy node layer; Indicates the first The current vertical normalized coordinates of each proxy node layer; The range of values ​​is arrive Positive integers; This indicates the total number of proxy node layers.

[0049] Once the structure is complete, the server outputs the current topology feature matrix to the memory cache.

[0050] After obtaining the current topology feature matrix, the server performs feature weight allocation and weighted absolute cumulative deviation measurement operations.

[0051] The principle behind this operation lies in the fact that different body parts of a graphic character possess different deformation attributes. For example, core skeletal structures such as the skull and torso's central axis exhibit relatively small spatial positional changes across multiple iterations; while peripheral structures such as limbs or hair allow for a certain range of pose variations during iterations. If a uniform standard is applied to all nodes for deviation calculation, it would trigger blocking controls when peripheral structures undergo motion changes. By introducing a weighting mechanism to distinguish between these two types of nodes, the comparison logic aligns with the actual operational rules of graphic editing.

[0052] The server reads the function identifiers from the metadata of each proxy node layer according to the set layer name field mapping rules. The server then searches the pre-set weight mapping configuration table in the backend, divides the proxy node layers into static feature nodes and dynamic feature nodes based on the function identifiers, and assigns them corresponding weight values. Specifically, the server assigns higher weight values ​​to static feature nodes representing the skull, facial features, or the midline of the torso, with values ​​ranging from 0.8 to 1.0; and assigns lower weight values ​​to dynamic feature nodes representing the wrist, ankle, clothing, or hair edges, with values ​​ranging from 0.1 to 0.5.

[0053] The server combines and arranges the weight values ​​of each proxy node layer according to the extraction sequence of the nodes to construct a feature weight vector. The feature weight vector is denoted as... Its expression is .

[0054] The server retrieves the baseline topology feature matrix persistently stored in the version control database. The server then extracts the coordinates of nodes with corresponding sequence numbers from both the current and baseline topology feature matrices. The server calculates the Euclidean distance between corresponding nodes in the dimensionless metric space. Finally, the server compares this Euclidean distance with the corresponding weight values. The values ​​are multiplied to obtain the single-point weighted deviation value for that node. The server then sums the single-point weighted deviation values ​​for all proxy node layers to calculate the weighted absolute cumulative deviation. This value reflects the overall offset of the current iteration version relative to the initial baseline version in the core skeleton structure.

[0055] The formula for calculating the weighted absolute cumulative deviation is: ; in, This represents the weighted absolute cumulative deviation. Indicates the total number of proxy node layers; The range of values ​​is arrive Positive integers; Represents the feature weight vector The Middle The weight values ​​of each proxy node layer; Indicates the first The current horizontal normalized coordinates of each proxy node layer; Indicates the first The current vertical normalized coordinates of each proxy node layer; Indicates the first The horizontal normalized coordinates of each proxy node layer; Indicates the first The vertical normalized coordinates of each proxy node layer.

[0056] After calculating the weighted absolute cumulative deviation, the server performs tolerance threshold comparison and dual-branch interception control operations. The principle behind this operation is that in multi-generational collaborative image editing, the artist's drawing operations introduce minute coordinate shifts. The system needs to use numerical judgment to distinguish between minute shifts within the tolerance range and cumulative errors that would cause character structure collapse, deciding whether to allow the current version's data to be imported into the database.

[0057] The server compares the weighted absolute cumulative deviation with the tolerance threshold. The tolerance threshold is denoted as... Since the weighted absolute cumulative deviation is calculated in a dimensionless normalized space, the tolerance threshold is also set to a dimensionless constant. The tolerance threshold defines the maximum allowable deformation limit of the role's structure. The specific value of the tolerance threshold is preset in the backend configuration file by the system user based on historical project experience or the current structural complexity of the role, and is a constant greater than zero. The mathematical logic of the comparison process is to judge the weighted absolute cumulative deviation. With tolerance threshold The magnitude relationship is determined, and two different control flow branches are generated based on the magnitude of the values.

[0058] When the determination result indicates that the weighted absolute cumulative deviation is less than or equal to the tolerance threshold, i.e. At this point, the server determines that the current iteration's graphics project file meets the consistency requirements of the role structure and triggers a data entry control flow branch. The server instructs the storage module to create a new version branch node in the version control database. The server writes the file data of the current iteration's graphics project file and its corresponding file hash value into this branch node, completing the persistent data storage. After storage is complete, the server returns a successful entry confirmation message to the client via a network interface, unlocking the client's file and allowing the artist to continue drawing based on the current version.

[0059] When the judgment result indicates that the weighted absolute cumulative deviation is greater than the tolerance threshold, i.e. When the server determines that the current iteration's graphical project file has generated structural deformations exceeding the allowable range, it triggers an interception of the control flow branch. The server blocks data import requests for this iteration's graphical project file, refusing to write data with structural deviations to the version control database to prevent erroneous structures from entering the project's main branch. The server then starts a reverse deformation correction calculation module in memory, inputting the current topological feature matrix and the baseline topological feature matrix into this module to provide basic data support for subsequent deformation correction calculations.

[0060] For the generation of branch nodes and the blocking of network ingestion requests in version control databases, those skilled in the art can write code by combining the existing state machine mechanism of distributed version control systems. The underlying data flow control and node read / write operations are well-known technologies in the field and will not be described in detail here.

[0061] After the control flow is intercepted, the server executes the reverse mapping logic definition and boundary condition setting operations. The principle behind this operation is that when the current iterative graphic project file is determined to have an excessive structural offset, the system needs to generate a spatial mapping relationship to correct the offset. By introducing a thin-plate spline interpolation algorithm, a mathematical transformation field is established to revert from the currently offset topological coordinate system to the initially correct reference coordinate system, thus providing a mathematical model for subsequent full-layer pixel correction. The thin-plate spline interpolation algorithm can simulate the bending deformation of a physical metal sheet under point constraints. Because the algorithm follows the principle of minimizing bending energy during calculation, the generated mapping field exhibits high smoothness and continuity in space, preventing local pixel tearing or folding during the reverse correction distortion process.

[0062] The server uses the coordinate data in the current topological feature matrix as the source control points and the coordinate data in the reference topological feature matrix as the target reference points. The server establishes independent thin-plate spline spatial mapping functions for both the horizontal and vertical spatial dimensions. These spatial mapping functions are used to calculate the new coordinate position of any point in the dimensionless coordinate system after non-rigid deformation.

[0063] The server defines horizontal and vertical mapping functions. Both horizontal and vertical mapping functions are composed of a polynomial affine transformation part and a non-rigid deformation part based on radial basis functions. The computational expression for the spatial mapping function is: ; ; in, This represents the horizontal mapping output value of any coordinate point in the normalized space. This represents the vertical mapping output value of any coordinate point in the normalized space. This represents the horizontal input value of any coordinate point in the normalized space. This represents the vertical input value of any coordinate point in the normalized space. , , Represents the affine parameters of the transverse polynomial; , , Represents the affine parameters of the longitudinal polynomial; Indicates the total number of proxy node layers; The range of values ​​is arrive Positive integers; Indicates the first The horizontal non-rigid weight coefficient of each proxy node layer; Indicates the first Vertical non-rigid weight coefficients of each proxy node layer; Represents radial basis functions; Indicates the input coordinates of the point and the first... The Euclidean distance between the current coordinates of each proxy node layer.

[0064] The server defines the calculation relationship between the radial basis function and the Euclidean distance. The radial basis function measures the deformation influence of each proxy node layer on the surrounding spatial region; its strength changes non-linearly with distance. The expressions for the radial basis function and the Euclidean distance are: ; ; in, Represents radial basis functions; Indicates the input coordinates of the point and the first... The Euclidean distance between the current coordinates of each proxy node layer; This represents a smoothing constant to prevent the logarithmic function from having computational singularities; it is configured by the system to be a positive real number approaching zero. This represents the horizontal input value of any coordinate point in the normalized space. This represents the vertical input value of any coordinate point in the normalized space. Indicates the first The current horizontal normalized coordinates of each proxy node layer; Indicates the first The current vertical normalized coordinates of each proxy node layer.

[0065] After defining the spatial mapping function, the server sets the interpolation constraints and boundary conditions required to solve the function. The interpolation constraints require that each control point be aligned to the target reference point after the mapping field calculation. Specifically, this means that the first... After the current horizontally normalized coordinates of the proxy node layer are input into the horizontal mapping function, the result of the function calculation must be equal to the first... The horizontal normalized coordinates of the proxy node layer; after inputting its current vertical normalized coordinates into the vertical mapping function, the result of the function calculation is required to be equal to the first... The vertical normalized coordinates of each proxy node layer. The mathematical expression for the interpolation constraint is: ; ; in, Indicates the first The calculation result of inputting the current horizontal normalized coordinates and current vertical normalized coordinates of each proxy node layer into the horizontal mapping function; Indicates the first The calculation result of inputting the current horizontal normalized coordinates and current vertical normalized coordinates of each proxy node layer into the vertical mapping function; Indicates the first The current horizontal normalized coordinates of each proxy node layer; Indicates the first The current vertical normalized coordinates of each proxy node layer; Indicates the first The horizontal normalized coordinates of each proxy node layer; Indicates the first The vertical normalized coordinates of each proxy node layer; The range of values ​​is arrive Positive integers; This indicates the total number of proxy node layers.

[0066] To ensure a unique solution for the desired horizontal and vertical non-rigid weight coefficients, the server sets boundary conditions for the thin-plate spline. The mathematical logic of these boundary conditions requires that the sum of the non-rigid weight coefficients of all proxy node layers be zero, and that the cumulative sum of the products of the non-rigid weight coefficients of each proxy node layer and its current normalized coordinates also equal zero. The mathematical expression for the boundary conditions is: ; ; in, Indicates the total number of proxy node layers; The range of values ​​is arrive Positive integers; Indicates the first The horizontal non-rigid weight coefficient of each proxy node layer; Indicates the first Vertical non-rigid weight coefficients of each proxy node layer; Indicates the first The current horizontal normalized coordinates of each proxy node layer; Indicates the first The current vertical normalized coordinates of each proxy node layer. The boundary conditions ensure that the deformation of the spatial mapping field gradually flattens out and transitions into a simple affine transformation in the edge region far from the control points.

[0067] For the construction of large linear equation systems and the matrixing of boundary conditions involved in solving spatial mapping functions, those skilled in the art can use existing numerical linear algebra libraries to complete the code writing and calculation. The underlying matrix inversion operation is a well-known technology in this field and will not be elaborated here.

[0068] After setting interpolation constraints and boundary conditions, the server executes the linear equations solution operation for the thin-plate spline interpolation function. The principle of this operation is to transform discrete mathematical constraint equations into a large linear equation system in matrix form. It can use matrix inversion algorithms in numerical linear algebra to calculate the unknown polynomial parameters and non-rigid weight coefficients in the mapping function, thereby materializing the mathematical definition into an executable spatial mapping field.

[0069] The server calculates the distance between any two proxy node layers based on their current horizontal and vertical normalized coordinates and substitutes this distance into the radial basis function to construct a distance kernel matrix. The server then extracts the current horizontal and vertical normalized coordinates of each proxy node layer, adds a constant term column, and constructs a polynomial coordinate matrix. Finally, the server concatenates the distance kernel matrix, the polynomial coordinate matrix, the transpose of the polynomial coordinate matrix, and the zero matrix to obtain the global coefficient matrix. This global coefficient matrix reflects the topological relationships between all proxy node layers in the current iteration.

[0070] The expression for assembling and calculating the global coefficient matrix is ​​as follows: ; in, Represents the global coefficient matrix; Denotes the distance kernel matrix, which contains OK The square matrix of columns, the innermost column Line 1 The element of the column is the first The agent node layer and the first Calculated radial basis functions between layers of proxy nodes; Denotes a polynomial coordinate matrix, which is a polynomial coordinate matrix containing A matrix with 3 rows and 3 columns, the innermost... Behavior ; The transpose of a polynomial coordinate matrix; The zero matrix is ​​a matrix consisting of 3 rows and 3 columns, with all elements being zero. Indicates the total number of proxy node layers; and The range of values ​​is arrive Positive integers; Indicates the first The current horizontal normalized coordinates of each proxy node layer; Indicates the first The current vertical normalized coordinates of each proxy node layer.

[0071] The server extracts all horizontally normalized coordinates from the baseline topological feature matrix and adds three zero elements to the end of the array to construct the horizontal target vector. The server also extracts all vertically normalized coordinates from the baseline topological feature matrix and adds three zero elements to the end of the array to construct the vertical target vector.

[0072] The server uses the constructed global coefficient matrix and the horizontal target vector to establish a system of horizontal linear equations, and uses the global coefficient matrix and the vertical target vector to establish a system of vertical linear equations. The core solution expression for this system of linear equations is: ; ; in, Represents a vector of unknown horizontal parameters; Represents a vector of unknown parameters along the vertical axis; This represents the inverse of the global coefficient matrix; Represents the lateral target vector; This represents the vertical target vector.

[0073] Horizontal unknown parameter vector Specifically includes Each horizontal non-rigid weighting coefficient and three transverse polynomial affine parameters , , Its vector expression is Vertical unknown parameter vector Specifically includes Vertical non-rigid weighting coefficients and three longitudinal polynomial affine parameters , , Its vector expression is . Indicates the total number of proxy node layers; The value range is 1 to Positive integers; Indicates the first The horizontal non-rigid weight coefficient of each proxy node layer; Indicates the first Vertical non-rigid weight coefficients of each proxy node layer; , , Represents the affine parameters of the transverse polynomial; , , Represents the affine parameters of the longitudinal polynomial. Specifically by Horizontal normalized coordinates It is formed by concatenating three zero elements in sequence, and its vector expression is: Vertical target vector Specifically by Each vertical normalized coordinate It is formed by concatenating three zero elements in sequence, and its vector expression is: . Indicates the first The horizontal normalized coordinates of each proxy node layer; Indicates the first The vertical normalized coordinates of each proxy node layer.

[0074] The server calls the linear algebra calculation module to perform matrix inversion on the global coefficient matrix, obtaining the corresponding inverse matrix. The server then performs matrix multiplication on this inverse matrix with the horizontal and vertical target vectors respectively, calculating all parameter values ​​in the horizontal and vertical unknown parameter vectors.

[0075] The server substitutes the calculated horizontal non-rigid weight coefficients, vertical non-rigid weight coefficients, horizontal polynomial affine parameters, and vertical polynomial affine parameters back into the predefined horizontal and vertical mapping functions. At this point, the server has completed the construction of the inverse deformation field, establishing a mathematical transformation model mapping from the current normalized space to the reference normalized space.

[0076] For the inversion of the global coefficient matrix and matrix multiplication, those skilled in the art can use existing numerical calculation methods to implement the code. The underlying matrix operations are well-known technologies in this field and will not be elaborated here.

[0077] After constructing the inverse deformation field, the server performs spatial mesh transformation and visual guidance layer rendering operations. The principle behind this operation is to extend the mathematical mapping relationship calculated based on discrete proxy node layers to the entire image canvas space. Since performing complex thin-plate spline function calculations pixel-by-pixel consumes significant computational resources, the system establishes a discrete two-dimensional spatial mesh, performs precise spatial mapping of the mesh vertices, and then generates a reference image to assist in manual correction through inverse resampling of global pixel coordinates.

[0078] The server retrieves the physical width and height of the canvas from the current iteration of the graphics project file. It then constructs a 2D mesh data structure covering the entire canvas in memory according to a preset pixel interval. The preset pixel interval is set to a positive integer between 1 and 8 pixels, used to balance deformation smoothness and computational overhead. The server iterates through the 2D mesh data structure, obtaining the current physical x-coordinate and y-coordinate of each grid point.

[0079] The server uses the current geometric center x-coordinate, current geometric center y-coordinate, and current scale factor obtained in the previous steps to convert the current grid physical x-coordinate and current grid physical y-coordinate into dimensionless current grid normalized x-coordinate and current grid normalized y-coordinate. The server then uses the current grid normalized x-coordinate and current grid normalized y-coordinate as input parameters, substitutes them into the horizontal mapping function and vertical mapping function for numerical calculation, and calculates the target grid normalized x-coordinate and target grid normalized y-coordinate corresponding to the reference normalized space.

[0080] The server retrieves the scale factor, geometric center x-coordinate, and geometric center y-coordinate, which are persistently stored during the baseline registration phase, from the version control database via a database access interface. Using these three baseline parameters, the server performs inverse scaling and translation on the normalized x-coordinate and y-coordinate of the target mesh, calculating the physical x-coordinate and y-coordinate of the target mesh in the baseline canvas physical coordinate system. The mathematical expression for the inverse calculation is: ; ; in, Represents the physical x-coordinate of the target mesh; Represents the physical ordinate of the target mesh; Represents the normalized x-coordinate of the target grid; Represents the normalized ordinate of the target grid; Indicates the scale factor; Represents the x-coordinate of the geometric center; Represents the ordinate of the geometric center.

[0081] Through the above calculation process of forward normalization, spatial field mapping and inverse physical size restoration, the server establishes a two-dimensional mapping lookup table between the current canvas pixel position and the reference canvas pixel position.

[0082] The server extracts all visible drawing layers from the current iteration's graphics project file, performs rasterization and flattening merging on these layers in memory, and obtains merged image pixel data. Based on the coordinate offset relationships recorded in a two-dimensional lookup table, the server calls the graphics rendering module to perform pixel-level spatial resampling on the merged image pixel data. The server extracts the pixel matrix generated after resampling and assigns it a set transparency channel value to generate a visual guidance layer. Visually, the visual guidance layer appears as a semi-transparent image reference layer corrected to the original, correct skeletal structure.

[0083] The server packages the data from the visual guidance layer and sends it to the client. Upon receiving the data, the client creates a new, top-mounted layer object in the current editing interface and overlays the visual guidance layer onto it. Based on the structural outlines presented in the visual guidance layer, the artist drags or redraws the misaligned areas of the image to correct the character's structural deviations.

[0084] For spatial resampling of image pixel data and overlay rendering of semi-transparent layers, those skilled in the art can use existing bilinear interpolation algorithms and graphics processing application programming interfaces to implement it. The underlying pixel matrix operations and graphics pipeline calls are well-known technologies in the field and will not be described in detail here.

[0085] After receiving the visual guidance layer data packet from the server, the client performs application programming interface interception and non-destructive layer injection operations. The principle behind this operation is that the system needs to display a correction reference image to the artist, but to prevent the reference image from contaminating the original project file being edited by the artist, it cannot be directly written to the graphics project file on disk. The system intercepts the rendering pipeline in the memory runtime of the graphics editing software, overlaying the image as virtual nodes to ensure that the entire guidance process does not permanently damage the underlying project source file structure.

[0086] The client-side network communication component parses the visual guidance layer data packets and extracts the pixel matrix. The client runs as a built-in plugin of the host graphics editing software, calling the host software's underlying extended application programming interface through the plugin development kit. The client obtains the handle of the currently active canvas and the corresponding document object model tree instance from the graphics editing software.

[0087] The client dynamically instantiates a temporary virtual layer node above the top-level node of the Document Object Model (DOM) tree instance. This virtual layer node resides in the graphics editing software's runtime memory and is not bound to any disk serialization or saving operations. Since the preceding steps generated an image covering the entire canvas dimension, the client loads the extracted pixel matrix into the texture buffer of this virtual layer node and forcibly aligns the origin coordinates of this virtual layer node with the canvas origin coordinates of the graphics editing software to ensure that the visual guidance layer is precisely aligned with the underlying source drawing layer in the canvas physical coordinate system.

[0088] To ensure unimpeded editing by the artist, the client modifies the interactive properties of the virtual layer node via an application programming interface (API). The client sets the virtual layer node to a locked and transparent state. In the transparent state, cursor clicks and drags performed by the artist within the canvas area will pass directly through the virtual layer node and act on the underlying source drawing layer.

[0089] The client reads the opacity parameter from the local configuration file and applies it to the rendering blending configuration of the virtual layer node. When performing frame redraw, the graphics editing software's rendering engine performs blending calculations on the pixels of the virtual layer node and the pixels of the underlying source drawing layer according to the set opacity parameter. The mathematical expression for the blending calculation is: ; in, This represents the final pixel color value output to the screen after the mixing calculation; This represents the opacity parameter, which is a real number between 0 and 1, usually set between 0.3 and 0.5. The specific value is adjusted by the artist through the user interface of the client, and is used to adjust the visual occlusion of the reference image. This represents the pixel color value at the corresponding coordinate position in the visual guidance layer; This represents the pixel color value at the corresponding coordinate position in the underlying source drawing layer.

[0090] The artist observes a visual guide layer with a semi-transparent, correctly structured skeleton on the display device. Using the structural boundaries presented by the visual guide layer as a reference, the artist uses the built-in deformation or brush tools of the graphics editing software to drag, scale, or redraw the deformed image areas in the source drawing layer, thus correcting the character's structural alignment. Due to the non-destructive nature of virtual layer nodes, the data of the visual guide layer is not written to the local disk when the artist completes the correction and saves the file, ensuring the purity of the iterative graphics project file.

[0091] For the interception of application programming interfaces of graphic editing software and the instantiation of tree nodes of memory document object model, those skilled in the art can use existing host program hooking technology or plug-in development toolkits to write code. The underlying memory pointer reading and writing and event penetration distribution mechanism are well-known technologies in the field and will not be described in detail here.

[0092] After the artist completes image corrections on the client side based on the visual guidance layer, the system performs visual guidance correction and proxy node state synchronization. The principle behind this operation is that when the artist adjusts pixels on the underlying source drawing layer, the physical position data within the graphics project file changes. The system needs to synchronize the coordinate state of the proxy nodes with the corrected image state and resend a verification request to the server, forming a closed-loop control flow. This closed-loop control flow ensures that each version of data entering the main branch undergoes strict structural consistency verification, preventing the accumulation of errors caused by incomplete structural corrections during manual modifications.

[0093] The client intercepts the artist's secondary version submission command by registering an event listener at the underlying layer of the host graphics editing software. The client reads the currently edited iterative graphics project file. Because the proxy node layer is grouped and bound to the corresponding drawing layer in the layer hierarchy of the graphics editing software, when the artist performs displacement or deformation operations on the drawing layer, the physical coordinates of the proxy node layer undergo a proportional spatial transformation.

[0094] The client traverses the Document Object Model (DOM) tree instance, re-extracts the layer bounding box data of each proxy node layer, and obtains the updated physical center x-coordinate and physical center y-coordinate. The client extracts, serializes, and packages the updated physical center x-coordinate and physical center y-coordinate of all proxy node layers, and reconstructs the corrected topology feature matrix.

[0095] The client sends the corrected topology feature matrix as a secondary verification data packet to the server via a network communication component. Upon receiving the secondary verification data packet, the server retrieves the baseline topology feature matrix from the version control database. Using the corrected topology feature matrix and the baseline topology feature matrix, the server recalculates the new weighted absolute cumulative deviation according to the previously set distance calculation and weight multiplication / addition rules.

[0096] The server compares the new weighted absolute cumulative deviation with the tolerance threshold. The mathematical logic expression for this comparison operation is: ; in, This represents the newly calculated weighted absolute cumulative deviation. This represents the tolerance threshold.

[0097] When the comparison result satisfies the above expression, i.e., the new weighted absolute cumulative deviation is less than or equal to the tolerance threshold, the server determines that the corrected iterative graphic project file has met the database entry standard for role structure consistency. The server triggers a data entry control flow branch, instructing the storage module to write the file data and file hash value of the corrected iterative graphic project file into the version control database, establishing a new version branch node. After the write is completed, the server returns a successful entry confirmation message to the client via the network interface.

[0098] After receiving the successful import confirmation, the client performs memory resource cleanup. The client calls the node deletion method of the Document Object Model (DOM) tree instance via the application programming interface to destroy the virtual layer nodes residing in runtime memory. The client clears the texture buffer resources allocated for the visual guidance layer and releases the interception of the host graphics editing software's rendering pipeline. The graphics editing software's viewport removes the semi-transparent reference image, restoring normal drawing operations. If the comparison result is still greater than the tolerance threshold, i.e. At this time, the server will repeat the previous steps of deformation field construction and visual guidance layer distribution until the artist's correction results meet the judgment conditions, forming a continuous correction feedback control loop.

[0099] For the event listener registration and garbage collection of the host graphics editing software, those skilled in the art can call the existing system low-level application programming interface to implement the code. The underlying memory resource release and event callback mechanism are well known technologies in the field and will not be described in detail here.

[0100] Specific application examples: To verify the practical effectiveness of the character consistency management method based on anti-cumulative error and reverse deformation feedback provided in this invention, a comparative experiment was designed and conducted. The experiment used a complex character from a commercial comic project as the test object, and the total number of proxy node layers was set in the initial graphic project file. Weights are assigned to static feature nodes representing the skull and trunk midline based on their physiological structural attributes. Assign weights to dynamic feature nodes such as the extremities. The system's set tolerance threshold .

[0101] Verification of anti-cumulative error performance in multiple version iterations (see attached document) Figure 3 The experiment simulated 20 generations of collaborative drawing iterations. Traditional methods rely solely on the artist's visual estimation and image semi-transparent overlay for alignment; this system introduces a weighted absolute cumulative deviation. The measurement mechanism and entry blocking logic are described. Experimental data shows that, under the traditional management method (without control flow blocking), as the number of iterations increases, the deviation tends to rise due to slight deviations caused by canvas scaling, cropping, and the artist's personal drawing habits, exceeding the tolerance threshold by the 6th generation. Finally, in the 20th generation When the ratio reaches 0.16 or higher, a structural imbalance in the roles occurs. However, by adopting the management method of this invention (rigid node constraints and blocking), the data submitted in each generation must undergo [further processing / processing]. The calculation is performed. When the deviation exceeds the threshold, the system triggers a control flow interception. Therefore, throughout the entire 20-generation iteration cycle, the weighted absolute cumulative deviation of this invention group is always constrained to the tolerance threshold. The following measures reduce the intergenerational propagation and accumulation of errors, ensuring the integrity of the topological characteristic matrix. Consistent with the baseline state.

[0102] Verification of Convergence Efficiency of Inverse Deformation Feedback and Correction (see attached document) Figure 4 The experiment selected an iterative data insertion request that was blocked by the system (its initial evaluation) greater than The system automatically calculates and solves for the inverse of the global coefficient matrix. The obtained weight parameters are then substituted back into the lateral mapping function. With vertical mapping function In the process, a visual guidance layer based on the thin-plate spline algorithm is generated and sent to the client. The number of revisions made by the illustrator with the assistance of the visual guidance layer and the updated deviation are statistically analyzed. Data shows that in blind tuning without visual guidance, it typically takes 5 to 8 attempts to adjust the structure to the threshold range; In this system, the radial basis function is used. Under visual guidance of inverse mesh resampling calculation, and after the first and second rounds of local drag-and-drop correction, It then decreased to 0.041 and 0.018, and further decreased to 0.009 during the third round of correction feedback, thus meeting the requirements. The conditions for warehousing.

[0103] As attached Figure 4 As shown, the data bars that initially exceed the limit are distinguished by dark gray, while the subsequent data bars that fall within the threshold safety line are all light gray. This proves that the two-dimensional spatial mapping field of the present invention can provide a corresponding geometric backtracking path, reducing the trial and error cost for artists and improving workflow efficiency.

Claims

1. A method for managing reference images to maintain consistency in comic book characters, characterized in that, Includes the following steps: Obtain the absolute physical coordinates of the proxy node layer in the initial graphics project file, perform spatial centering and scaling on the absolute physical coordinates, and generate a dimensionless reference topological feature matrix. Obtain the current absolute physical coordinates of the proxy node layer in the iterative graphics project file, perform spatial centering and scale scaling on the current absolute physical coordinates, and generate the current topological feature matrix; Based on the weight values ​​corresponding to the obtained proxy node layers, calculate the weighted absolute cumulative deviation between the current topology feature matrix and the benchmark topology feature matrix, and compare the weighted absolute cumulative deviation with a preset tolerance threshold. If the weighted absolute cumulative deviation is less than or equal to the preset tolerance threshold, the data persistence storage of the iterative graphic engineering file is completed. If the weighted absolute cumulative deviation is greater than the preset tolerance threshold, a two-dimensional spatial mapping function is constructed using the current topological feature matrix and the reference topological feature matrix; A two-dimensional mesh is established, and the two-dimensional spatial mapping function is used to perform spatial curvature transformation on the two-dimensional mesh to render and generate an inverse correction mesh image; Create a new independent layer in the iterative graphics project file, and import the reverse correction mesh image into the independent layer.

2. The reference image management method for maintaining consistency of comic characters according to claim 1, characterized in that, The preset tolerance threshold is used to define the maximum allowable deformation limit of the character structure, and the preset tolerance threshold is a value set in the preset configuration file that matches the structural complexity of the current character. The persistent storage of the data for the completed iterative graphical engineering file specifically includes: A new version branch node is created in the version control database, and the file data of the iterative graphic project file and its corresponding file hash value are written into the new version branch node.

3. The reference image management method for maintaining consistency of comic characters according to claim 1, characterized in that, Before obtaining the absolute physical coordinates of the proxy node layer in the initial graphics project file, the method further includes: Read the document object model tree structure of the initial graphic project file; The proxy node layer is named according to the preset naming mapping rules. The layer name field is set. The layer name field contains a type prefix for system verification and a function identifier for part mapping. The correspondence between discrete coordinate points and continuous skeleton topology is established by relying on the name field matching mechanism. The layer group name field is used as a unique identifier to locate the proxy node layer.

4. The reference image management method for maintaining consistency of comic characters according to claim 1, characterized in that, The process of performing spatial centering and scaling on the absolute physical coordinates to generate a dimensionless reference topological feature matrix, and the process of performing spatial centering and scaling on the current absolute physical coordinates to generate a current topological feature matrix, specifically include: Obtain all horizontal and vertical physical coordinate values ​​in the absolute physical coordinates of each of the proxy node layers. Then, sum all the horizontal and vertical physical coordinate values ​​and divide them by the total number of proxy node layers to calculate the horizontal and vertical coordinates of the geometric center. Calculate the root mean square distance from each of the proxy node layers to the geometric center to obtain the scale factor; The horizontal and vertical physical coordinate values ​​corresponding to each of the proxy node layers are center-shifted and divided by the scale factor to obtain normalized coordinate values, which include horizontal normalized coordinates and vertical normalized coordinates. Arrange all the horizontal and vertical normalized coordinates according to the node extraction sequence to construct the baseline topological feature matrix; When processing the current absolute physical coordinates, the current absolute physical coordinates are processed according to the same mathematical model as when processing the absolute physical coordinates, and the current geometric center x-coordinate, current geometric center y-coordinate and current scale factor are calculated. Obtain the current horizontal physical coordinate value and the current vertical physical coordinate value corresponding to the current absolute physical coordinate; The current horizontal physical coordinate value and the current vertical physical coordinate value corresponding to each of the proxy node layers are subjected to a centering translation operation. Specifically, the current geometric center horizontal coordinate and the current geometric center vertical coordinate are subtracted respectively, and the centering translation coordinate value is divided by the current scale factor to calculate the current horizontal normalized coordinate and the current vertical normalized coordinate of the proxy node layer. The current topological feature matrix is ​​constructed by arranging the extracted sequence of the proxy node layers.

5. The reference image management method for maintaining consistency of comic characters according to claim 4, characterized in that, The step of calculating the weighted absolute cumulative deviation between the current topological feature matrix and the reference topological feature matrix based on the obtained weight values ​​corresponding to the proxy node layer includes the following steps: According to the preset layer name field mapping rules, the function identifier in the metadata of each proxy node layer is read, the weight mapping configuration table preset in the system is searched, the proxy node layer is divided into static feature nodes and dynamic feature nodes according to the function identifier, and the corresponding weight values ​​are assigned to the proxy node layer. The nodes are combined and arranged according to the extraction sequence of the nodes to construct the feature weight vector. Calculate the Euclidean distance between the current topological feature matrix and the corresponding node in the reference topological feature matrix in the dimensionless metric space; The Euclidean distance is multiplied by the corresponding weight value in the feature weight vector to obtain the single-point weighted deviation value of the corresponding node. The single-point weighted deviation values ​​of all the proxy node layers are then summed to calculate the weighted absolute cumulative deviation.

6. The reference image management method for maintaining consistency of comic characters according to claim 4, characterized in that, The construction of a two-dimensional space mapping function using the current topological feature matrix and the reference topological feature matrix specifically includes: Extract the current topological feature matrix as the source control point set, extract the reference topological feature matrix as the target control point set, and calculate and construct the two-dimensional spatial mapping function based on the thin plate spline interpolation algorithm; The coordinate data in the source control point set is used as the source control points, and the coordinate data in the target control point set is used as the target reference points. Obtain the horizontal non-rigid weighting coefficients, the vertical non-rigid weighting coefficients, and the horizontal polynomial affine parameters and the vertical polynomial affine parameters; Using the horizontal non-rigid weight coefficients, the vertical non-rigid weight coefficients, and the horizontal polynomial affine parameters, the two-dimensional spatial mapping function is constructed and generated, so that each source control point can achieve coordinate alignment with the corresponding target reference point after the mapping calculation of the two-dimensional spatial mapping function.

7. The reference image management method for maintaining consistency of comic characters according to claim 6, characterized in that, The steps for obtaining the horizontal non-rigid weighting coefficients, the vertical non-rigid weighting coefficients, and the horizontal and vertical polynomial affine parameters specifically include: Based on the current horizontal and vertical normalized coordinates of each proxy node layer, calculate the distance between any two proxy node layers and substitute them into the radial basis function to construct a distance kernel matrix. Extract the current horizontal and vertical normalized coordinates of each proxy node layer, add a constant term column, and construct a polynomial coordinate matrix. The global coefficient matrix is ​​obtained by concatenating the distance kernel matrix, the polynomial coordinate matrix, the transpose of the polynomial coordinate matrix, and the zero matrix. Extract all horizontally normalized coordinates from the baseline topological feature matrix and add three zero elements to the end of the array to construct the horizontal target vector; Extract all vertical normalized coordinates from the baseline topological feature matrix and add three zero elements to the end of the array to construct the vertical target vector; A system of horizontal linear equations is established using the global coefficient matrix and the horizontal target vector, and a system of vertical linear equations is established using the global coefficient matrix and the vertical target vector. By solving the system of horizontal linear equations and the system of vertical linear equations, the horizontal non-rigid weight coefficients, the vertical non-rigid weight coefficients, the horizontal polynomial affine parameters, and the vertical polynomial affine parameters are calculated.

8. The reference image management method for maintaining consistency of comic characters according to claim 4, characterized in that, The steps of establishing a two-dimensional mesh, performing a spatial curvature transformation on the two-dimensional mesh using the two-dimensional spatial mapping function, and rendering a reverse-correction mesh image include: Obtain the physical width and height of the canvas in the current iteration of the graphics project file. Construct an orthogonal Cartesian grid covering the entire canvas in memory according to a preset pixel interval as the two-dimensional grid. Traverse the orthogonal Cartesian grid and obtain the physical x-coordinate and y-coordinate of the current grid corresponding to each grid point. Then, use the current geometric center x-coordinate, current geometric center y-coordinate, and current scale factor to convert them into dimensionless normalized x-coordinate and y-coordinate of the current grid. The normalized abscissa and ordinate of the current grid are used as input parameters and substituted into the horizontal and vertical mapping functions in the two-dimensional space mapping function for numerical calculation to obtain the normalized abscissa and ordinate of the target grid corresponding to the reference normalized space. Using the scale factor, the geometric center x-coordinate, and the geometric center y-coordinate, the normalized x-coordinate and y-coordinate of the target mesh are inversely magnified and translated to calculate the physical x-coordinate and y-coordinate of the target mesh in the reference canvas physical coordinate system. A two-dimensional mapping lookup table is then established between the current mesh physical x-coordinate, the current mesh physical y-coordinate, the target mesh physical x-coordinate, and the target mesh physical y-coordinate. Extract all visible drawing layers from the current iteration graphics project file, perform rasterization and flattening merging processing on these layers in memory to obtain merged image pixel data, and call the graphics rendering module to perform pixel-level spatial resampling processing on the merged image pixel data according to the coordinate offset relationship recorded in the two-dimensional mapping lookup table, extract the pixel matrix generated after resampling, and assign a set transparency channel value to generate a visual guidance layer as the inverse correction mesh image with transparency channel attributes.

9. The reference image management method for maintaining consistency of comic characters according to claim 1, characterized in that, The step of creating a new independent layer in the iterative graphics project file and importing the reverse correction mesh image into the independent layer is specifically implemented as follows: By calling the underlying extended application programming interface of the host graphics editing software, a temporary virtual layer node is dynamically instantiated as the independent layer above the topmost node of the layer structure of the iterative graphics project file. The pixel matrix of the reverse correction mesh image is loaded into the texture buffer of the virtual layer node, and the origin coordinates of the virtual layer node are forcibly aligned with the origin coordinates of the canvas of the graphics editing software. Set the state of the virtual layer node to locked and penetrate, so that cursor click and drag events received in the canvas area will directly pass through the virtual layer node and act on the source drawing layer at the bottom of the iterative graphic project file; Read the opacity parameter from the local configuration file and apply the opacity parameter to the rendering blending configuration of the virtual layer node; During frame redrawing, the pixels of the virtual layer node and the pixels of the underlying source drawing layer are mixed and calculated according to the set opacity parameters to obtain the final pixel color value output to the screen after the mixing calculation.

10. The reference image management method for maintaining consistency of comic characters according to claim 9, characterized in that, After importing the reverse correction mesh image into the independent layer, the following control steps are also included: By intercepting the received secondary version submission command, the layer bounding box data of each of the agent node layers is extracted again to obtain the updated absolute physical coordinates, which are the horizontal and vertical coordinates of the physical center of the bounding box. The updated absolute physical coordinates of all the proxy node layers are extracted, serialized, and packaged to reconstruct the current topological feature matrix after correction. Using the corrected current topology feature matrix and the reference topology feature matrix, a new weighted absolute cumulative deviation is recalculated, and the new weighted absolute cumulative deviation is numerically compared with the preset tolerance threshold. When the new weighted absolute cumulative deviation is less than or equal to the preset tolerance threshold, the virtual layer node residing in the running memory is destroyed, and the texture buffer resources allocated to the virtual layer node are cleared.