Ancient character recognition method and device based on graph structure and deep learning
By constructing outline and skeleton diagrams of ancient characters and using graph neural networks to learn their structured feature representations, the problem of low recognition accuracy in existing technologies has been solved, and efficient recognition of ancient characters has been achieved.
Patent Information
- Application Number
- CN202510989824.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, ancient character recognition methods based on deep learning suffer from problems such as low representation levels, which fail to directly reflect the structural composition and semantic information of the characters, resulting in low recognition accuracy.
Using a graph structure and deep learning-based approach, contour maps and skeleton maps are constructed from ancient Chinese character images. Graph neural networks are used to learn their structured feature representations, and a classification network is used to achieve recognition.
It improves the accuracy of ancient script recognition, effectively captures common features among different variants, and achieves accurate recognition of ancient scripts.
Smart Images

Figure CN120997848A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of character recognition technology, and in particular to a method and apparatus for ancient character recognition based on graph structure and deep learning. Background Technology
[0002] The study of ancient scripts is an important way to understand the development of ancient civilizations. The structure, writing style, and evolution of ancient characters contain rich historical and cultural information. Accurate identification of ancient characters is the foundation for studying the evolution of writing, historical dating, and cultural origins.
[0003] The task of ancient script recognition differs conceptually in terms of academic terminology and technical implementation: from the perspective of paleography research, this task is defined as "ancient script recognition," aiming to determine the known characters corresponding to unknown script forms; from the perspective of computer technology implementation, its core mechanism is a "classification method," which achieves the recognition goal by classifying unknown script forms into predefined character categories. Essentially, the computer performs the ancient script recognition task by mapping the input script form image to a character category space through a classification algorithm. With the development of digitization technology and the surge in unearthed materials, the demand for automatic recognition and classification of ancient scripts is increasing. However, ancient script forms have the following characteristics, posing challenges to automatic classification: 1. Complex structure: Ancient script forms often contain complex stroke combinations and spatial layouts; 2. Diverse variations: The same character presents different forms in different periods and by different writers; 3. Data scarcity: Compared to modern scripts, digitized samples of ancient scripts are relatively scarce; 4. Background interference: Ancient script carriers (such as stone carvings and bamboo slips) often contain noise and damage.
[0004] Existing technologies typically employ pixel-based representation methods based on deep learning, such as attention-based methods. These methods focus on key regions of the character shape through attention modules to improve classification performance, but are still affected by pixel noise and directly learn feature representations from pixel images. However, these methods suffer from a low representation level; pixel-based representations cannot directly reflect the structural composition and semantic information of the character shape, resulting in low accuracy in ancient character recognition. Summary of the Invention
[0005] To address the aforementioned shortcomings in existing technologies, this invention provides a method and apparatus for ancient character recognition based on graph structure and deep learning, thereby improving the accuracy of ancient character recognition.
[0006] In a first aspect, the present invention provides an ancient character recognition method based on graph structure and deep learning, the method comprising the following steps: A dual-graph structure representation is constructed for the input ancient character glyph image, the dual-graph structure representation including a contour map and a skeleton map; The dual-graph structure representation is input into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image; The structured feature representation is input into the classification network, which outputs the probability distribution of ancient character categories corresponding to the ancient character glyph image. Based on the probability distribution of ancient character categories, the target ancient character category of the ancient character glyph image is determined; each target ancient character category corresponds to a unique ancient character.
[0007] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, a contour map is constructed from the input ancient character glyph image, including: The Canny edge detection algorithm was used to extract the main contour lines of the ancient character glyph image; The Douglas-Peucker algorithm is used to simplify the main contour lines while retaining key inflection points, resulting in simplified contour lines. Identify the first node on the simplified contour line, and construct edge connections between the first nodes based on the adjacency relationship potential between the first node and the contour to obtain the contour map.
[0008] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, a skeleton graph is constructed from the input ancient character glyph image, including: The Zhang-Suen thinning algorithm was used to extract the central skeleton of the ancient character image and eliminate the jagged effect. Identify the second node in the central axis skeleton; the second node includes skeleton endpoints, intersections, and turning points; Based on skeleton connectivity, edge connections are constructed between the second nodes to obtain the skeleton graph.
[0009] According to the present invention, an ancient character recognition method based on graph structure and deep learning is provided, wherein the target graph neural network includes a first graph neural network and a second graph neural network; The step of inputting the dual-graph structure representation into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image includes: The contour map is input into the first graph neural network to obtain the structured feature representation corresponding to the contour map; The skeleton graph is input into the second graph neural network to obtain the structured feature representation corresponding to the skeleton graph; The structured feature representations corresponding to the contour map and the structured feature representations corresponding to the skeleton map are determined as the structured feature representations of the ancient character glyph image.
[0010] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, the step of inputting the dual-graph structure representation into a target graph neural network for feature learning to generate a structured feature representation of the ancient character image includes: The outline and the skeleton Figure 1 The target graph neural network is input to the same target graph, and the node features of the contour graph and the skeleton graph are sequentially subjected to feature alignment, attention fusion and gating fusion to obtain the structured feature representation of the ancient character image. The target graph neural network adopts any of the following architectures: graph convolutional network, graph attention network, and graph isomorphic network.
[0011] According to the present invention, an ancient character recognition method based on graph structure and deep learning is provided, wherein the classification network includes a graph pooling layer, a multilayer perceptron layer and a classification layer; the graph pooling layer adopts a global average pooling strategy, an attention pooling strategy or a hierarchical pooling strategy, and the classification loss function adopts cross-entropy loss or center loss; The step of inputting the structured feature representation into the classification network and outputting the probability distribution of ancient character categories corresponding to the ancient character glyph images includes: The structured features are converted into fixed-dimensional vectors through the graph pooling layer to obtain the converted structured features; the structured features are variable-length graph structures. The transformed structured features are mapped and abstracted through the multilayer perceptron layer to obtain the mapped structured features. Based on the mapped structured features, the classification layer outputs the probability distribution of the ancient script category.
[0012] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, the step of determining the target ancient character category of the ancient character image based on the probability distribution of the ancient character category includes: Determine the ancient script category corresponding to the highest probability value in the probability distribution of the ancient script categories; The ancient script category corresponding to the highest probability value is determined as the target ancient script category of the ancient script glyph image.
[0013] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, the step of inputting the dual-graph structure representation into a target graph neural network for feature learning to generate a structured feature representation of the ancient character image includes: For each node in the contour map and the skeleton map, a multidimensional feature set is generated for each node; wherein, the multidimensional feature set includes: geometric features, topological features, philological features, and document context features; the geometric features include node coordinates, local curvature, and tangent direction; the topological features include node degree and adjacency structure; the philological features include stroke type and component combination relationship; and the document context features are generated based on at least one of the co-occurring characters of the character in the document, document type, and historical context. The dual-graph structure representation and the multi-dimensional feature set of each node are input into the target graph neural network for feature learning to generate the structured feature representation.
[0014] Secondly, the present invention also provides an ancient script recognition device based on graph structure and deep learning, the device comprising the following modules: The graph structure representation construction module is used to construct a dual-graph structure representation for the input ancient character glyph image, wherein the dual-graph structure representation includes a contour graph and a skeleton graph; The feature representation module is used to input the dual-graph structure representation into the target graph neural network for feature learning, and generate the structured feature representation of the ancient character glyph image; The classification and recognition module is used to input the structured feature representation into the classification network, output the probability distribution of ancient character categories corresponding to the ancient character glyph image, and determine the target ancient character category of the ancient character glyph image based on the probability distribution of ancient character categories; each target ancient character category corresponds to a unique ancient character.
[0015] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the ancient character recognition method based on graph structure and deep learning as described above.
[0016] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the ancient character recognition method based on graph structure and deep learning as described above.
[0017] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the ancient character recognition method based on graph structure and deep learning as described above.
[0018] The ancient character recognition method and apparatus based on graph structure and deep learning provided by this invention first constructs a dual-graph structure representation for the input ancient character image, which includes a contour map and a skeleton map. Then, the dual-graph structure representation is input into a target graph neural network for feature learning to generate a structured feature representation of the ancient character image. Subsequently, the structured feature representation is input into a classification network to output the probability distribution of the ancient character category corresponding to the ancient character image. Based on the probability distribution of the ancient character category, the target ancient character category of the ancient character image is determined. Each target ancient character category corresponds to a unique ancient character.
[0019] This invention replaces traditional pixel representation with dual-graph structure representation. Dual-graph structure representation can directly model the geometric and topological structure of ancient characters, comprehensively describing the character features from two dimensions: external boundary and internal structure. This facilitates the effective capture of common features among different variants. Furthermore, the structured feature representation corresponding to the dual-graph structure representation is input into a classification network to achieve accurate recognition of ancient characters, thereby improving the accuracy of ancient character recognition. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 This is one of the flowcharts illustrating the ancient character recognition method based on graph structure and deep learning provided by this invention.
[0022] Figure 2 This is the second flowchart of the ancient character recognition method based on graph structure and deep learning provided by the present invention.
[0023] Figure 3 This is a schematic diagram of the ancient character recognition device based on graph structure and deep learning provided by the present invention.
[0024] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, a first node can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0027] To more clearly understand the various embodiments provided by the present invention, the technical content involved in the present invention will first be described as follows: Current ancient Chinese character recognition technologies also include the following two categories: 1. Similarity methods based on template matching These methods classify characters by calculating the similarity between their shapes. They include: Contour matching-based methods compare the similarity of character contours; computation is simple but sensitive to deformation. Hausdorff distance-based methods measure the maximum distance between two point sets; they are robust to noise but have poor generalization ability. Shape registration-based methods compare character similarity through deformation registration and can handle a certain degree of deformation. Elastic matching-based methods allow characters to undergo elastic deformation during the matching process, adapting to changes in writing. These methods are computationally intuitive but heavily rely on pixel matching and struggle to handle the essential structural differences in ancient character forms.
[0028] 2. Methods based on handcrafted features These methods rely on hand-designed feature descriptors for glyph representation. Typical examples include: Methods based on Histogram of Oriented Gradients (HOG) describe glyph features by statistically analyzing the distribution of pixel gradient directions, but are sensitive to glyph variations. Methods based on Scale-Invariant Feature Transform (SIFT) extract locally invariant feature points, suitable for partial occlusion, but struggle to represent the global structure. Methods based on shape context calculate shape context descriptors for contour points and are robust to deformation. Methods based on skeleton features extract the glyph skeleton and analyze its topological structure, reflecting stroke connections, but are sensitive to noise. A common problem with these methods is that feature design requires specialized knowledge and repeated debugging, their generalization ability is limited, and they are ill-suited to the diversity of ancient scripts.
[0029] The fundamental problem with existing technology: 1. The representation level is too low: pixel- or contour-based representations cannot directly reflect the structural composition and semantic information of the glyphs; 2. Difficulty in identifying variants: Lack of understanding of the essential structure of the characters makes it difficult to identify the same character in different writing styles; 3. Severe feature redundancy: Pixel representations contain a large amount of redundant information that is irrelevant to classification; 4. Significant semantic gap: There is a lack of effective bridge between low-level pixel features and high-level semantic concepts.
[0030] To address the aforementioned shortcomings, this invention provides a method and apparatus for ancient character recognition based on graph structure and deep learning. It unifies the contour and skeleton information of ancient characters into a graph structure representation, designs a rich set of node features, uses graph neural networks to learn the structured representation of characters, and then uses a classification network to achieve accurate ancient character recognition.
[0031] The following is combined with Figures 1-4 This invention describes an ancient character recognition method and apparatus based on graph structure and deep learning.
[0032] Figure 1 This is one of the flowcharts illustrating the ancient character recognition method based on graph structure and deep learning provided by this invention, such as... Figure 1 As shown, the method includes the following: Step 101: Construct a dual-image structural representation for the input ancient character glyph image. The dual-image structural representation includes a contour image and a skeleton image.
[0033] It should be noted that the subject of this invention is an electronic device, and this invention can achieve accurate ancient character recognition.
[0034] First, a dual-graph structure representation is constructed for the input ancient character glyph image, which includes a contour map and a skeleton map.
[0035] Contour mapping refers to a graph representation based on the topological structure of the external boundaries of Chinese characters. It transforms the continuous contour lines of ancient Chinese character images into a network composed of nodes (key points) and edges (contour segments), preserving the abstract structure of the character's geometric shape. Extracting contour maps can accurately capture the external morphology of characters (such as the thick strokes in bronze inscriptions) and is robust to differences in writing styles (the edge deformation of the same character can still be matched across different rubbings). Contour maps can effectively represent the external shape features and boundary variation patterns of Chinese characters.
[0036] A skeleton diagram refers to the central axis framework of ancient Chinese character strokes. Nodes represent key points of the skeleton (endpoints / intersections / turning points), and edges represent connecting paths between strokes, constructing a graph network that describes the internal topology. Both contour diagrams and skeleton diagrams contain nodes, edges, and corresponding feature information. Skeleton diagrams directly reflect the topological structure of the character and the connection relationships between strokes.
[0037] A dual-image structure representation is constructed for the input ancient character glyph image. That is, the contour map and skeleton map corresponding to the ancient character glyph image are extracted. The contour map is equivalent to the vector topology of the character shape (solving the "how the shape is"), and the skeleton map is equivalent to the digitization of the spatial relationship of the stroke structure (solving the "how the components are connected").
[0038] Subsequently, feature representation and glyph classification are performed based on the contour map and skeleton map to obtain the target ancient script category.
[0039] Step 102: Input the dual-graph structure representation into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image.
[0040] After obtaining the dual-graph structural representation (contour map and skeleton map), based on the constructed dual-graph structural representation, this invention uses a target graph neural network to learn the feature representation of the character shape and generate a structured feature representation of the ancient character shape image.
[0041] The target graph neural networks include Graph Convolution Networks (GCNs), Graph Convolution Networks (GATs), and Graph Transformers. The improvement of this invention lies in the addition of a class embedding layer. The class embedding layer maps discrete class identifiers to continuous feature vectors. This embedding layer constructs a lookup table of 2500 classes, with each class corresponding to a 512-dimensional embedding vector. The embedding parameters are optimized through end-to-end training using a backpropagation algorithm. The input class IDs undergo dimensionality checking and compression to ensure they are one-dimensional integer tensors, and then the corresponding feature vectors are looked up through the embedding layer. The generated class embedding vectors are concatenated and fused with graph features and node count embeddings to form a comprehensive graph representation.
[0042] Examples of the process by which various types of graph neural networks learn the feature representations of glyphs are as follows: Graph Convolutional Network: A four-layer network is constructed using graph convolutional layers, each containing feature transformations with a hidden dimension of 512. The network employs a layer-by-layer feature propagation mechanism, where the first layer receives the original node features as input, and subsequent layers receive the output features of the previous layer. Each graph convolutional layer includes three processes: linear feature transformation, aggregation of neighbor node information, and nonlinear transformation using the Rectified Linear Unit (ReLU) activation function.
[0043] Graph Attention Network: A four-layer network is constructed using graph attention convolutional layers, with eight attention heads configured in each layer. Each attention head has a dimension of 64, and the attention dropout regularization probability is set to 0.1. Multi-head attention is concatenated. Each layer of the network calculates the attention weights between nodes and dynamically aggregates neighbor node information to achieve adaptive graph feature extraction.
[0044] Graph Transformer: A four-layer graph transformer network is constructed using transformer convolutional layers, with each layer maintaining 512-dimensional hidden features. The transformer convolutional layers integrate global attention mechanisms for nodes, graph structure location encoding, attention computation enhanced by edge information, and self-attention mechanisms for 8 attention heads, enabling the capture of long-distance dependencies in the graph and achieving graph structure-aware feature learning.
[0045] Step 103: Input the structured feature representation into the classification network, output the probability distribution of ancient character categories corresponding to the ancient character glyph images, and determine the target ancient character category of the ancient character glyph images based on the ancient character category probability distribution; each target ancient character category corresponds to a unique ancient character.
[0046] Specifically, after learning the structured feature representation, the structured feature representation is further input into the classification network, which includes a graph pooling layer, a feature transformation layer, and a classification layer, to achieve ancient character classification and output the probability distribution of ancient character category corresponding to the ancient character glyph image.
[0047] Next, based on the probability distribution of ancient script categories, the target ancient script category of the ancient script glyph image is determined. For example, the ancient script category with the highest probability is selected as the target ancient script category of the ancient script glyph image.
[0048] It should be noted that each target ancient script category corresponds to a unique ancient script character. Once the target ancient script category is determined, a unique ancient script character can be found (such as the oracle bone script character for "sun" and the bronze script character for "moon"), thus achieving accurate ancient script recognition.
[0049] The method provided in this embodiment first constructs a dual-image structural representation for the input ancient character glyph image, which includes a contour image and a skeleton image. Then, the dual-image structural representation is input into a target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image. Subsequently, the structured feature representation is input into a classification network to output the probability distribution of the ancient character category corresponding to the ancient character glyph image. Based on the probability distribution of the ancient character category, the target ancient character category of the ancient character glyph image is determined. Each target ancient character category corresponds to a unique ancient character.
[0050] This invention replaces traditional pixel representation with dual-graph structure representation. Dual-graph structure representation can directly model the geometric and topological structure of ancient characters, comprehensively describing the character features from two dimensions: external boundary and internal structure. This facilitates the effective capture of common features among different variants. Furthermore, the structured feature representation corresponding to the dual-graph structure representation is input into a classification network to achieve accurate recognition of ancient characters, thereby improving the accuracy of ancient character recognition.
[0051] It should be noted that each implementation method of this application can be freely combined, rearranged, or executed individually, and does not need to rely on or depend on a fixed execution order.
[0052] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, a contour map is constructed from the input ancient character glyph image, including: The Canny edge detection algorithm was used to extract the main contour lines of the ancient Chinese character image. The Douglas-Peucker algorithm is used to simplify the main contour lines while retaining key inflection points, resulting in simplified contour lines. Identify the first node on the simplified contour line, and construct edge connections between the first nodes based on the adjacency relationship potential between the first nodes and the contour to obtain the contour map.
[0053] Specifically, in some embodiments, the process of constructing the contour graph structure representation in step 101 includes contour extraction and simplification, and graph structure construction. This can be achieved through the following steps: (1) Contour extraction and simplification: The Canny edge detection algorithm was used to extract the main contour lines of the ancient Chinese character image.
[0054] The Canny edge detection algorithm is a classic edge detection method in computer vision. It processes images through multiple steps to extract edges with high accuracy while suppressing noise. The core steps include: Gaussian filtering (denoising), calculating gradient magnitude and direction, non-maximum suppression (NMS), double threshold detection and hysteresis thresholding, and outputting an edge map (i.e., the main contour lines).
[0055] The Douglas-Peucker algorithm is used to simplify the main contour lines while retaining key inflection points, resulting in simplified contour lines.
[0056] The Douglas-Peucker algorithm is a classic algorithm for simplifying polyline or polygonal contours by reducing redundant points while preserving key shape features. The following are its core steps and details: 1. Algorithm Input and Initialization Input: an ordered set of points P ={ p 1, p 2,..., p n (e.g., pixel coordinates of the outline).
[0057] Initialization: Select starting point p 1 and the finish line p n As an initial key point, a simplified result set is added. Q .
[0058] 2. Recursive simplification process Step 1: Find the point of maximum deviation For the current line segment Calculate all intermediate points p i ( i ∈[2, n -1) perpendicular distance to the line segment d i Record the maximum distance d max and its corresponding points p max .
[0059] Step 2: Determine if segmentation is needed like d max > ϵ ( ϵ (For preset threshold): p max Add to key point set Q Recursively process two segments of broken lines: { p 1,..., p max}, { p max ,..., p n}; like d max ≤ ϵ Discard all intermediate points, only keep p 1 and pn .
[0060] 3. Termination Conditions When none of the sub-lines can find a value exceeding ϵ The recursion terminates when the deviation point is reached.
[0061] 4. Output simplified results Final Key Points Set Q Connect them in the original order to form a simplified outline.
[0062] Furthermore, after simplification, redundant points are removed while key inflection points are retained, contour breaks and noise are addressed to ensure the continuity and integrity of the contour.
[0063] (2) Graph structure construction: Identify the first node on the simplified contour line, and construct edge connections between the first nodes based on the adjacency relationship potential between the first nodes and the contour to obtain the contour map.
[0064] First nodes include, for example, corner points, turning points, connection points, and feature points. Different first nodes correspond to different attribute codes.
[0065] The method provided in this embodiment constructs a structured representation of ancient characters, obtaining contour maps and skeleton maps. It transforms traditional pixel representation into graph structures. The contour maps and skeleton maps of the characters contain rich geometric and topological information, which can provide a more reliable basis for character recognition tasks and improve the accuracy of character recognition tasks.
[0066] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, a skeleton graph is constructed from the input ancient character glyph image, including: The Zhang-Suen thinning algorithm was used to extract the central skeleton of the ancient Chinese character image and eliminate the jagged effect. Identify the second node in the central skeleton; the second node includes skeleton endpoints, intersections, and turning points. Based on skeleton connectivity, edge connections are constructed between the second nodes to obtain the skeleton graph.
[0067] Specifically, in some embodiments, step 101 is further implemented through the following steps: The Zhang-Suen thinning algorithm was used to extract the central skeleton of the ancient Chinese character image and eliminate the jagged effect. Identify the second node in the central skeleton; the second node includes skeleton endpoints, intersections, and turning points. Based on skeleton connectivity, edge connections are constructed between the second nodes to obtain the skeleton graph.
[0068] Specifically, in some embodiments, step 101, the construction of the structured representation (skeleton graph), includes skeleton extraction and graph structure construction steps, as follows: (1) Skeleton extraction: For example, the Zhang-Suen thinning algorithm is used to extract the central skeleton of damaged ancient text images and eliminate the jagged edges.
[0069] The Zhang-Suen thinning algorithm is a classic binary image skeleton extraction method, suitable for central axis reduction of complex shapes such as ancient characters. Its core idea is to iteratively delete boundary pixels that meet certain conditions, ultimately preserving a single-pixel-wide central axis skeleton.
[0070] Next, the skeleton is smoothed to eliminate the jagged effect introduced by the algorithm, so as to maintain the integrity of the topological structure of the glyphs and avoid skeleton breakage and pseudo-branches.
[0071] (2) Graph structure construction: First, identify the second node in the central skeleton, that is, identify the key points on the skeleton. The key points (second nodes) on the skeleton include the skeleton endpoints (the beginning and end of strokes), intersections (where strokes meet), and turning points (where the direction changes).
[0072] Then, based on the skeleton connectivity, edge connections between the second nodes are constructed to obtain the target skeleton graph, forming a complete graph structure representation, handling complex intersection cases, and ensuring the accuracy and consistency of the graph structure.
[0073] The method provided in this embodiment constructs a structured representation of ancient characters, obtaining contour maps and skeleton maps. It transforms traditional pixel representation into graph structures. The contour maps and skeleton maps of the characters contain rich geometric and topological information, which can provide a more reliable basis for character recognition tasks and improve the accuracy of character recognition tasks.
[0074] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, the target graph neural network includes a first graph neural network and a second graph neural network; The dual-graph structure representation is input into the target graph neural network for feature learning, generating a structured feature representation of the ancient Chinese character glyph image, including: The contour map is input into the first neural network to obtain the structured feature representation corresponding to the contour map; The skeleton graph is input into the second neural network to obtain the structured feature representation corresponding to the skeleton graph; The structured feature representations corresponding to the contour map and the skeleton map are used to determine the structured feature representations of the ancient Chinese character glyph images.
[0075] Specifically, in some embodiments, step 102 can be implemented by the following steps: This invention provides three modeling strategies, including single-graph modeling, dual-graph fusion modeling, and hierarchical modeling.
[0076] First, we introduce single-image modeling, that is, using graph neural networks to process either the contour image or the skeleton image. The specific process of generating structured feature representations of ancient character glyph images is as follows: The target graph neural network includes a first graph neural network and a second graph neural network, wherein the first graph neural network and the second graph neural network process the contour map and the skeleton map respectively, and learn the feature representation of a single graph structure respectively.
[0077] The contour image is input into the first neural network to obtain the structured feature representation corresponding to the contour image. The skeleton image is input into the second neural network to obtain the structured feature representation corresponding to the skeleton image. Furthermore, the structured feature representations corresponding to the contour image and the structured feature representations corresponding to the skeleton image are determined as the structured feature representations of the ancient character glyph image, thereby realizing the learning of the structured feature representations of the glyphs.
[0078] The method provided in this embodiment uses graph neural networks to process contour maps or skeleton maps respectively. It generates structured feature representations of ancient character glyph images, and then inputs these structured feature representations into a classification network for ancient character recognition, thereby improving the accuracy of ancient character recognition.
[0079] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, a dual-graph structure representation is input into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image, including: Contour and skeleton Figure 1 Using the same input target image neural network, feature alignment, attention fusion, and gating fusion are performed sequentially on the node features of the contour image and the skeleton image to obtain the structured feature representation of the ancient character image. The target graph neural network can adopt any of the following architectures: graph convolutional network, graph attention network, and graph isomorphic network.
[0080] In some embodiments, the modeling strategy for learning structured feature representations further includes dual-graph fusion modeling. The target graph neural network adopts any of the following architectures: graph convolutional network, graph attention network, and graph isomorphic network.
[0081] Specifically, the outline and skeleton Figure 1The target graph neural network is used to sequentially perform feature alignment, attention fusion, and gating fusion on the node features of the contour map and skeleton map to obtain a structured feature representation of the ancient character glyph image. That is, the contour map and skeleton map are processed simultaneously, and the information from the two graph structures is combined through feature alignment and fusion techniques. Several fusion strategies are designed, including feature concatenation, attention fusion, and gating fusion, to effectively integrate the information from the two graph structures. After fusion, a structured feature representation of the ancient character glyph image is learned.
[0082] Graph neural networks, through message passing mechanisms, enable each node to aggregate neighborhood information and progressively learn structural features from local to global perspectives. Through multi-layer graph convolution operations, the model can capture structural information at different scales.
[0083] The method provided in this embodiment processes contour maps and skeleton maps simultaneously through a target graph neural network. It combines the information of the two graph structures through feature alignment and fusion techniques to learn a structured feature representation. Then, the structured feature representation of the ancient character image is input into a classification network for ancient character recognition, thereby improving the accuracy of ancient character recognition.
[0084] Optionally, the structured feature representation of ancient character images in this invention also includes a third strategy: hierarchical modeling. Hierarchical modeling considers the hierarchical structural characteristics of the characters, designs a hierarchical graph neural network, first learns local structural features, and then aggregates them to obtain a global character representation.
[0085] According to the present invention, an ancient character recognition method based on graph structure and deep learning is provided. The classification network includes a graph pooling layer, a multilayer perceptron layer and a classification layer. The graph pooling layer adopts a global average pooling strategy, an attention pooling strategy or a hierarchical pooling strategy.
[0086] The structured feature representation is input into the classification network, and the output is the probability distribution of the ancient character category corresponding to the ancient character glyph image, including: The structured features are converted into fixed-dimensional vectors using graph pooling layers, resulting in the transformed structured features; the structured features are variable-length graph structures. Through a multi-layer perceptron, the transformed structured features are mapped and abstracted to obtain the mapped structured features; Through the classification layer, based on the mapped structured features, the probability distribution of ancient script categories is output.
[0087] Specifically, in some embodiments, the classification network includes a graph pooling layer, a multilayer perceptron layer, and a classification layer.
[0088] Graph pooling layers are used to compress variable-length graph structure representations (contour maps / skeleton maps) into fixed-dimensional global feature vectors, preserving key information about the glyph structure.
[0089] Multilayer Perceptron Layer (MLP Layer): Performs nonlinear transformations and abstractions on the pooled feature vectors to enhance feature discriminative power.
[0090] Classification Layer: Outputs the probability distribution of character categories based on higher-order features to complete the recognition decision.
[0091] The classification task (ancient script recognition) in step 103 is implemented through the following steps: First, the structured features are converted into fixed-dimensional vectors through a graph pooling layer, resulting in the transformed structured features, which are variable-length graph structures.
[0092] Graph pooling layers employ global average pooling, attention pooling, or hierarchical pooling strategies. Global average pooling calculates the average of features across all nodes. Attention pooling calculates the importance weights of nodes, facilitating the focus on key structures (such as distinctive strokes in inscriptions). Hierarchical pooling calculates recursively merging clusters of similar nodes: Step 1: Clustering adjacent nodes; Step 2: Aggregating features within clusters, preserving component hierarchy (such as the "radical-stroke" structure of Chinese characters).
[0093] Furthermore, through a multilayer perceptron layer, feature mapping and abstraction are performed on the transformed structured features to obtain the mapped structured features. The multilayer perceptron layer includes residual connections and Dropout.
[0094] Furthermore, through the classification layer, based on the mapped structured features, the probability distribution of ancient script categories is output. For example, the probability distribution of ancient script categories among multiple preset categories is obtained. That is, the decision from features to ancient script categories is realized.
[0095] The classification layer includes fully connected mapping, Softmax normalization, and a classification loss function, which uses either cross-entropy loss or center loss.
[0096] The training process employs end-to-end optimization to ensure that all modules, from graph structure extraction to classification decisions, work collaboratively. It supports multiple optimizers and learning rate scheduling strategies and integrates regularization techniques to prevent overfitting.
[0097] The method provided in this embodiment constructs a classification network based on the learned graph structure representation to achieve ancient character shape recognition. The classification network includes a graph pooling layer, a feature transformation layer, and a classification layer. The graph structure representation has good variant invariance and can identify the morphological changes of the same character under different writing styles, thereby improving the accuracy of ancient character recognition.
[0098] According to the present invention, an ancient character recognition method based on graph structure and deep learning determines the target ancient character category of an ancient character image based on the probability distribution of ancient character categories, including: Determine the ancient script category corresponding to the highest probability value in the probability distribution of ancient script categories; The ancient script category corresponding to the highest probability value is determined as the target ancient script category of the ancient script glyph image.
[0099] Specifically, in some embodiments, step 103, which determines the target ancient character category of the ancient character image based on the probability distribution of ancient character categories, includes the following steps: Determine the ancient character category corresponding to the highest probability value in the probability distribution of ancient character categories; determine the ancient character category corresponding to the highest probability value as the target ancient character category of the ancient character image.
[0100] For example, the probability distribution of ancient script categories is as follows: Category 1: 90% probability; Category 2: 95% probability; Category 3: 98% probability.
[0101] Therefore, category 3 is determined as the target ancient script category for the ancient script glyph image.
[0102] The method provided in this embodiment determines the target ancient character category of the ancient character image by identifying the ancient character category corresponding to the highest probability value, thus achieving accurate identification of ancient characters.
[0103] According to the ancient character recognition method based on graph structure and deep learning provided by the present invention, a dual-graph structure representation is input into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image, including: For each node in the contour map and skeleton map, a multidimensional feature set is generated for each node. The multidimensional feature set includes geometric features, topological features, philological features, and document context features. Geometric features include node coordinates, local curvature, and tangent direction. Topological features include node degree and adjacency structure. Philological features include stroke type and component combination relationship. Document context features are generated based on at least one of the co-occurring characters of the character in the document, document type, and historical background. The dual-graph structure representation and the multi-dimensional feature set of each node are input into the target graph neural network for feature learning to generate a structured feature representation.
[0104] Specifically, in some embodiments, the construction of the dual-graph structure representation also includes the design of node features. That is, in order to fully describe the structural information of ancient characters, this invention designs a multi-dimensional set of node features: geometric features, topological features, philological features, and textual context features.
[0105] Among them, geometric features are used to describe the geometric shape features of the glyphs, including the coordinate position of the nodes, local curvature, tangent direction and other geometric attributes.
[0106] Topological features: used to reflect the structural connection relationships of glyphs, including topological attributes such as node degree, adjacency structure, and connectivity.
[0107] Character shape information features: Combining knowledge of ancient Chinese characters, we designed a model that reflects the characteristics of ancient characters such as stroke type, component combination, and structural hierarchy, so as to enhance the model's (graph neural network) understanding of the structural rules of ancient characters.
[0108] Document context features: These reflect the contextual information of the character form in the document, including co-occurring characters, document type, historical background, etc., providing additional semantic clues for character form classification.
[0109] The method provided in this embodiment designs a multi-dimensional node feature set for the representation of dual-graph structures, integrating multi-level information such as geometry, topology, philology, and textual context, providing a more comprehensive feature description for character recognition and improving the accuracy of ancient character recognition.
[0110] Figure 2 This is the second flowchart illustrating the ancient character recognition method based on graph structure and deep learning provided by this invention, as shown below. Figure 2 As shown, the method includes: Based on ancient character images, contour maps and skeleton maps are constructed. Contour feature design is based on contour map, and skeleton feature design is based on skeleton map; Graph neural network modeling and dual-graph structure fusion are used to obtain structured feature representations based on contour feature design and skeleton feature design. Classification decision to obtain ancient script category recognition results: Input the structured feature representation into the classification network to obtain the ancient script category recognition results.
[0111] Compared with the prior art, the present invention has the following advantages: 1. Advantages of Structured Representation: By replacing pixel-based representation with graph structure representation, the geometric and topological structures of ancient characters can be directly modeled, effectively capturing common features among different variants. Graph structure representation has good variant invariance and can identify morphological changes of the same character under different writing styles.
[0112] 2. Multidimensional feature fusion: The designed multidimensional node feature set integrates multi-level information such as geometry, topology, philology and document context, providing a more comprehensive feature description for character recognition.
[0113] 3. Improved computational efficiency: Compared with high-resolution pixel images, graph structure representation has a lower data dimension, which significantly improves computational and storage efficiency.
[0114] 4. Enhanced interpretability: Graph structure representations have clear semantic meanings, facilitating expert understanding and analysis. By analyzing the importance of graph structure features, new insights into the structural rules of ancient characters can be gained.
[0115] 5. Improved generalization ability: The structural feature-based learning method has a better generalization ability to new glyph variants and writing styles, which helps to handle ancient script categories with few samples.
[0116] The ancient character recognition device based on graph structure and deep learning provided by the present invention will be described below. The ancient character recognition device based on graph structure and deep learning described below can be referred to in correspondence with the ancient character recognition method based on graph structure and deep learning described above.
[0117] Figure 3 This is a schematic diagram of the ancient character recognition device based on graph structure and deep learning provided by the present invention, as shown below. Figure 3 As shown, the ancient character recognition device 300 based on graph structure and deep learning includes the following modules: The graph structure representation construction module 310 is used to construct a dual-graph structure representation for the input ancient character glyph image, wherein the dual-graph structure representation includes a contour graph and a skeleton graph. Feature representation module 320 is used to input the dual-graph structure representation into the target graph neural network for feature learning, and generate a structured feature representation of the ancient character glyph image; The classification and recognition module 330 is used to input the structured feature representation into the classification network, output the probability distribution of ancient character categories corresponding to the ancient character glyph image, and determine the target ancient character category of the ancient character glyph image based on the probability distribution of ancient character categories; each target ancient character category corresponds to a unique ancient character.
[0118] The apparatus provided in this embodiment includes a graph structure representation construction module 310, a feature representation module 320, and a classification and recognition module 330. First, the graph structure representation construction module 310 is used to construct a dual-graph structure representation for the input ancient character glyph image. The dual-graph structure representation includes a contour map and a skeleton map. Then, the feature representation module 320 is used to input the dual-graph structure representation into a target graph neural network for feature learning, generating a structured feature representation of the ancient character glyph image. Furthermore, the classification and recognition module 330 is used to input the structured feature representation into a classification network, output the probability distribution of the ancient character category corresponding to the ancient character glyph image, and determine the target ancient character category of the ancient character glyph image based on the ancient character category probability distribution. Each target ancient character category corresponds to a unique ancient character.
[0119] This invention replaces pixel representation with dual-graph structural representation. Dual-graph structural representation can directly model the geometric and topological structure of ancient characters, comprehensively describing the character features from two dimensions: external boundary and internal structure. This facilitates the effective capture of common features among different variants. Furthermore, the structured feature representation corresponding to the dual-graph structural representation is input into a classification network to achieve accurate recognition of ancient characters, thereby improving the accuracy of ancient character recognition.
[0120] According to the present invention, an ancient character recognition device 300 based on graph structure and deep learning is provided, wherein the graph structure representation construction module 310 is specifically used for: The Canny edge detection algorithm was used to extract the main contour lines of the ancient character glyph image; The Douglas-Peucker algorithm is used to simplify the main contour lines while retaining key inflection points, resulting in simplified contour lines. Identify the first node on the simplified contour line, and construct edge connections between the first nodes based on the adjacency relationship potential between the first node and the contour to obtain the contour map.
[0121] According to the ancient character recognition device 300 based on graph structure and deep learning provided by the present invention, the graph structure representation construction module 310 is further used for: The Zhang-Suen thinning algorithm was used to extract the central skeleton of the ancient character image and eliminate the jagged effect. Identify the second node in the central axis skeleton; the second node includes skeleton endpoints, intersections, and turning points; Based on skeleton connectivity, edge connections are constructed between the second nodes to obtain the skeleton graph.
[0122] According to the present invention, an ancient character recognition device 300 based on graph structure and deep learning is provided, wherein the target graph neural network includes a first graph neural network and a second graph neural network; The feature representation module 320 is used for: The contour map is input into the first graph neural network to obtain the structured feature representation corresponding to the contour map; The skeleton graph is input into the second graph neural network to obtain the structured feature representation corresponding to the skeleton graph; The structured feature representations corresponding to the contour map and the structured feature representations corresponding to the skeleton map are determined as the structured feature representations of the ancient character glyph image.
[0123] According to the ancient character recognition device 300 based on graph structure and deep learning provided by the present invention, the feature representation module 320 is further used for: The outline and the skeleton Figure 1The target graph neural network is input to the same target graph, and the node features of the contour graph and the skeleton graph are sequentially subjected to feature alignment, attention fusion and gating fusion to obtain the structured feature representation of the ancient character image. The target graph neural network adopts any of the following architectures: graph convolutional network, graph attention network, and graph isomorphic network.
[0124] According to the present invention, an ancient character recognition device 300 based on graph structure and deep learning is provided. The classification network includes a graph pooling layer, a multilayer perceptron layer and a classification layer. The graph pooling layer adopts a global average pooling strategy, an attention pooling strategy or a hierarchical pooling strategy, and the classification loss function adopts cross-entropy loss or center loss. The classification and recognition module 330 is specifically used for: The structured features are converted into fixed-dimensional vectors through the graph pooling layer to obtain the converted structured features; the structured features are variable-length graph structures. The transformed structured features are mapped and abstracted through the multilayer perceptron layer to obtain the mapped structured features. Based on the mapped structured features, the classification layer outputs the probability distribution of the ancient script category.
[0125] According to the ancient character recognition device 300 based on graph structure and deep learning provided by the present invention, the classification and recognition module 330 is further used for: Determine the ancient script category corresponding to the highest probability value in the probability distribution of the ancient script categories; The ancient script category corresponding to the highest probability value is determined as the target ancient script category of the ancient script glyph image.
[0126] According to the ancient character recognition device 300 based on graph structure and deep learning provided by the present invention, the classification and recognition module 330 is further used for: For each node in the contour map and the skeleton map, a multidimensional feature set is generated for each node; wherein, the multidimensional feature set includes: geometric features, topological features, philological features, and document context features; the geometric features include node coordinates, local curvature, and tangent direction; the topological features include node degree and adjacency structure; the philological features include stroke type and component combination relationship; and the document context features are generated based on at least one of the co-occurring characters of the character in the document, document type, and historical context. The dual-graph structure representation and the multi-dimensional feature set of each node are input into the target graph neural network for feature learning to generate the structured feature representation.
[0127] Figure 4This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute an ancient character recognition method based on graph structure and deep learning, which includes: A dual-graph structure representation is constructed for the input ancient character glyph image, the dual-graph structure representation including a contour map and a skeleton map; The dual-graph structure representation is input into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image; The structured feature representation is input into the classification network, which outputs the probability distribution of ancient character categories corresponding to the ancient character glyph image. Based on the probability distribution of ancient character categories, the target ancient character category of the ancient character glyph image is determined; each target ancient character category corresponds to a unique ancient character.
[0128] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0129] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the ancient character recognition method based on graph structure and deep learning provided by the above methods, the method comprising: A dual-graph structure representation is constructed for the input ancient character glyph image, the dual-graph structure representation including a contour map and a skeleton map; The dual-graph structure representation is input into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image; The structured feature representation is input into the classification network, which outputs the probability distribution of ancient character categories corresponding to the ancient character glyph image. Based on the probability distribution of ancient character categories, the target ancient character category of the ancient character glyph image is determined; each target ancient character category corresponds to a unique ancient character.
[0130] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the ancient character recognition methods based on graph structure and deep learning provided by the above methods, the method comprising: A dual-graph structure representation is constructed for the input ancient character glyph image, the dual-graph structure representation including a contour map and a skeleton map; The dual-graph structure representation is input into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image; The structured feature representation is input into the classification network, which outputs the probability distribution of ancient character categories corresponding to the ancient character glyph image. Based on the probability distribution of ancient character categories, the target ancient character category of the ancient character glyph image is determined; each target ancient character category corresponds to a unique ancient character.
[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for ancient character recognition based on graph structure and deep learning, characterized in that, include: A dual-graph structure representation is constructed for the input ancient character glyph image, the dual-graph structure representation including a contour map and a skeleton map; The dual-graph structure representation is input into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image; The structured feature representation is input into the classification network, which outputs the probability distribution of ancient character categories corresponding to the ancient character glyph image. Based on the probability distribution of ancient character categories, the target ancient character category of the ancient character glyph image is determined; each target ancient character category corresponds to a unique ancient character.
2. The ancient character recognition method based on graph structure and deep learning according to claim 1, characterized in that, Constructing contour maps from input ancient character glyph images, including: The Canny edge detection algorithm was used to extract the main contour lines of the ancient character glyph image; The Douglas-Peucker algorithm is used to simplify the main contour lines while retaining key inflection points, resulting in simplified contour lines. Identify the first node on the simplified contour line, and construct edge connections between the first nodes based on the adjacency relationship potential between the first node and the contour to obtain the contour map.
3. The ancient character recognition method based on graph structure and deep learning according to claim 1, characterized in that, Constructing a skeleton diagram from the input ancient character glyph image, including: The Zhang-Suen thinning algorithm was used to extract the central skeleton of the ancient character image and eliminate the jagged effect. Identify the second node in the central axis skeleton; the second node includes skeleton endpoints, intersections, and turning points; Based on skeleton connectivity, edge connections are constructed between the second nodes to obtain the skeleton graph.
4. The ancient character recognition method based on graph structure and deep learning according to claim 1, characterized in that, The target graph neural network includes a first graph neural network and a second graph neural network; The step of inputting the dual-graph structure representation into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image includes: The contour map is input into the first graph neural network to obtain the structured feature representation corresponding to the contour map; The skeleton graph is input into the second graph neural network to obtain the structured feature representation corresponding to the skeleton graph; The structured feature representations corresponding to the contour map and the structured feature representations corresponding to the skeleton map are determined as the structured feature representations of the ancient character glyph image.
5. The ancient character recognition method based on graph structure and deep learning according to claim 1, characterized in that, The step of inputting the dual-graph structure representation into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image includes: The contour map and the skeleton map are input together into the target graph neural network. Feature alignment, attention fusion and gating fusion are performed on the node features of the contour map and the skeleton map in sequence to obtain the structured feature representation of the ancient character image. The target graph neural network adopts any of the following architectures: graph convolutional network, graph attention network, and graph isomorphic network.
6. The ancient character recognition method based on graph structure and deep learning according to claim 1, characterized in that, The classification network includes a graph pooling layer, a multilayer perceptron layer, and a classification layer; the graph pooling layer adopts a global average pooling strategy, an attention pooling strategy, or a hierarchical pooling strategy, and the classification loss function adopts cross-entropy loss or center loss; The step of inputting the structured feature representation into the classification network and outputting the probability distribution of ancient character categories corresponding to the ancient character glyph images includes: The structured features are converted into fixed-dimensional vectors through the graph pooling layer to obtain the converted structured features; the structured features are variable-length graph structures. The transformed structured features are mapped and abstracted through the multilayer perceptron layer to obtain the mapped structured features. Based on the mapped structured features, the classification layer outputs the probability distribution of the ancient script category.
7. The ancient character recognition method based on graph structure and deep learning according to claim 1, characterized in that, The step of determining the target ancient script category of the ancient script image based on the probability distribution of the ancient script category includes: Determine the ancient script category corresponding to the highest probability value in the probability distribution of the ancient script categories; The ancient script category corresponding to the highest probability value is determined as the target ancient script category of the ancient script glyph image.
8. The ancient character recognition method based on graph structure and deep learning according to any one of claims 1-7, characterized in that, The step of inputting the dual-graph structure representation into the target graph neural network for feature learning to generate a structured feature representation of the ancient character glyph image includes: For each node in the contour map and the skeleton map, a multidimensional feature set is generated for each node; wherein, the multidimensional feature set includes: geometric features, topological features, philological features, and document context features; the geometric features include node coordinates, local curvature, and tangent direction; the topological features include node degree and adjacency structure; the philological features include stroke type and component combination relationship; and the document context features are generated based on at least one of the co-occurring characters of the character in the document, document type, and historical context. The dual-graph structure representation and the multi-dimensional feature set of each node are input into the target graph neural network for feature learning to generate the structured feature representation.
9. An ancient script recognition device based on graph structure and deep learning, characterized in that, include: The graph structure representation construction module is used to construct a dual-graph structure representation for the input ancient character glyph image, wherein the dual-graph structure representation includes a contour graph and a skeleton graph; The feature representation module is used to input the dual-graph structure representation into the target graph neural network for feature learning, and generate the structured feature representation of the ancient character glyph image; The classification and recognition module is used to input the structured feature representation into the classification network, output the probability distribution of ancient character categories corresponding to the ancient character glyph image, and determine the target ancient character category of the ancient character glyph image based on the probability distribution of ancient character categories; each target ancient character category corresponds to a unique ancient character.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the ancient character recognition method based on graph structure and deep learning as described in any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the ancient character recognition method based on graph structure and deep learning as described in any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the ancient character recognition method based on graph structure and deep learning as described in any one of claims 1 to 8.