Test paper structure acquisition method based on artificial intelligence and graph attention neural network
By introducing graph attention neural networks into the structure analysis of the test paper, combining convolutional neural networks and Gabor transformations, the problem of insufficient dependence on global structure and noise adaptability in the existing technology is solved, and the automatic and precise extraction and generalization capabilities of the test paper structure are improved.
Patent Information
- Application Number
- CN202510018727.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2045-01-07
AI Technical Summary
The existing test paper structure analysis methods are difficult to deal with global structure dependence, lack of generalization ability, and poor adaptability to noise and complex typesetting.
The test paper structure acquisition method based on artificial intelligence and graph attention neural network is adopted. By obtaining answer sheet pictures, processing them in chunks, using convolutional neural network transformation and Gabor transformation to extract feature information, label node feature maps, and training the graph attention model to automatically extract global structure information.
It realizes automatic and accurate extraction of the global structure information of the test paper, improves generalization ability, is suitable for the processing of various categories of test papers, and enhances the ability to adapt to noise and complex typesetting.
Smart Images

Figure CN119418139B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent information extraction, and in particular to a method for acquiring test paper structure based on artificial intelligence and graph attention neural network. Background Art
[0002] Existing test paper structure analysis methods are usually based on traditional image processing or a single deep learning model. The extraction of structural information such as question area, question number, and question type in the test paper has the following shortcomings: traditional methods have poor adaptability to noise and complex layout; deep learning models are good at local feature extraction, but have difficulty in handling global structural dependencies, such as the order of questions; charts, formulas, and mixed layouts in the test paper place high demands on the generalization ability of the model. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method for acquiring test paper structure based on artificial intelligence and graph attention neural network, so as to solve the problems that the existing test paper structure analysis methods are difficult to handle global structural dependencies, have insufficient generalization ability, and have poor adaptability to noise and complex typesetting.
[0004] In a first aspect, an embodiment of the present application provides a method for acquiring a test paper structure based on artificial intelligence and a graph attention neural network, the method comprising:
[0005] Get a set number of answer sheet images;
[0006] The answer sheet images are divided into blocks based on the set block rules to obtain the block results;
[0007] The set vector obtained by the convolutional neural network transformation of the block result is normalized to obtain a node feature map;
[0008] After labeling the node feature graph according to the set division area, a labeling result is obtained; wherein the labeling result includes the division area label information of each node;
[0009] Based on the set answer sheet construction rules and combined with the annotation results, the graph attention model is trained;
[0010] Use the trained graph attention model to predict new answers.
[0011] In the above implementation process, a set number of answer sheet images are obtained; the answer sheet images are divided into blocks based on the set block rules to obtain block results; the set vectors obtained by transforming the block results through the convolutional neural network are normalized to obtain a node feature map; the node feature map is labeled according to the set division area to obtain the labeling result; wherein the labeling result includes the division area label information of each node; based on the set answer sheet construction rules and combined with the labeling results, a graph attention model is trained to obtain the new answer sheet; the trained graph attention model is used to predict the new answer sheet; the training graph attention model does not need to label a large amount of category information, and the global structure information on the answer sheet is automatically and accurately extracted. At the same time, it is suitable for the subsequent processing of various categories of test papers, which improves the generalization ability and has strong adaptability to noise and complex layout.
[0012] Furthermore, the answer sheet image is divided into blocks based on the set block rules to obtain the block results, including:
[0013] Obtain feature information of each answer sheet image at different scales and directions in the frequency domain through Gabor transformation; wherein the feature information includes text lines;
[0014] Cut each answer sheet image into blocks and adjust the corresponding area images to the same size;
[0015] According to the relative position of the first answer sheet image, the position of each line of text corresponding to all answer sheet images is obtained, and each line of text is regarded as a node; wherein each node includes: the characteristic information of the Gabor transform of each answer sheet image, the difference between the Gabor transform of the first answer sheet image and the second answer sheet image, and the difference between the Gabor transform of the first answer sheet image and the third answer sheet image.
[0016] In the above implementation process, the global structural information of the test paper is automatically and accurately extracted, and the answer sheet images are divided into blocks for easy node processing.
[0017] Furthermore, the feature information of each answer sheet image in different scales and directions in the frequency domain is obtained by Gabor transformation, including:
[0018] The first answer sheet image is processed using a Gabor filter with a specific scale and specific direction to extract feature values and obtain a set number of feature images;
[0019] Selecting a feature image of a first scale and a first direction, dividing the feature image into blocks by a projection method, and performing vertical projection and normalization processing on the divided feature image;
[0020] According to the result of the normalization processing, the feature image is divided into blocks along the second direction and then binarized;
[0021] According to the result of the binarization processing, the feature image is cut into blocks along the first direction, and the region detection algorithm is called to process each block to obtain the text line of each block;
[0022] After the same processing is performed on the remaining feature images, the text lines of all feature images of the first answer sheet image are obtained;
[0023] After the same processing is performed on the remaining answer sheet images, text lines of different scales and directions in the frequency domain are obtained for each answer sheet image.
[0024] In the above implementation process, the Gabor filter can capture the local texture and edge information of the image, has characteristic stability, and has strong adaptability to noise and complex layout.
[0025] Furthermore, the setting vector obtained by transforming the block result through the convolutional neural network is normalized to obtain a node feature graph, including:
[0026] The regional images of the first answer sheet picture are combined as inputs of set dimensions, transformed into set vectors through CNN convolutional neural network transformation, and the information of the same node of each answer sheet picture is normalized and then all nodes are spliced to obtain a node feature map.
[0027] In the above implementation process, the node features are normalized to obtain a node feature map with high accuracy for labeling training.
[0028] Furthermore, after labeling the node feature graph according to the set division area, the labeling result is obtained, including:
[0029] According to the question area, answer area and fill-in area, each node of the node feature graph is labeled to obtain the divided area label information of each node.
[0030] In the above implementation process, the node feature map is divided into regions according to needs to facilitate the training of the graph attention model.
[0031] Furthermore, the graph attention model is trained based on the set answer sheet construction rules and the annotation results, including:
[0032] Parse and load all answer sheet construction files, where the answer sheet construction files include: files for storing edge relationships of nodes with the same spatial frequency, regional images to which nodes belong, serial numbers of regional images, node division region label information, and node attribute features;
[0033] Allocate nodes to different regional images according to the regional images to which the nodes belong;
[0034] Constructing a graph structure based on a file for storing edge relationships of nodes with the same spatial frequency;
[0035] Select the graph neural network module according to the set task type;
[0036] Use node attribute features and graph structure as input to train the graph attention model;
[0037] Use graph labels to perform graph-level supervised learning on the graph attention model;
[0038] The nodes are spliced to fuse information of different spatial frequencies;
[0039] Use the trained graph attention model to predict unknown answer sheet images;
[0040] Based on the prediction results, determine whether it is a feature graph that meets the requirements;
[0041] If so, the graph attention model is used to predict subsequent answer sheet images.
[0042] In the above implementation process, the graph attention model is trained to facilitate the subsequent marking of test papers and can automatically and accurately extract the global structural information of the test papers.
[0043] In a second aspect, the embodiment of the present application further provides a test paper structure acquisition device based on artificial intelligence and graph attention neural network, the device comprising:
[0044] Answer sheet acquisition module, used to acquire a set number of answer sheet images;
[0045] A block processing module is used to block the answer sheet image based on the set block rules to obtain the block results;
[0046] The node processing module is used to normalize the set vector obtained by the block result through the convolutional neural network transformation to obtain a node feature map;
[0047] A result labeling module is used to label the node feature graph according to the set division area to obtain the labeling result; wherein the labeling result includes the division area label information of each node;
[0048] The model training module is used to build rules based on the set answer sheet and train the graph attention model based on the annotation results;
[0049] The model prediction module is used to predict new answer sheets using the trained graph attention model.
[0050] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0051] A processor, a memory and a bus, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the test paper structure acquisition method based on artificial intelligence and graph attention neural network as described above.
[0052] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a server, implements the test paper structure acquisition method based on artificial intelligence and graph attention neural network as described above.
[0053] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes instructions, and when the instructions are executed by a computer, the computer implements the test paper structure acquisition method based on artificial intelligence and graph attention neural network as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flowchart of a method for obtaining test paper structure based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of 12 characteristic images after Gabor transformation of a test paper structure acquisition method based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of a feature image after segmentation of a method for acquiring test paper structure based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of a feature image after vertical projection and normalization processing of a test paper structure acquisition method based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of a feature image in the left area of a method for acquiring a test paper structure based on artificial intelligence and a graph attention neural network provided in an embodiment of the present application;
[0060] Figure 6A schematic diagram of the vertical cutting area of the feature image in the left area of a test paper structure acquisition method based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0061] Figure 7 A method for acquiring test paper structure based on artificial intelligence and graph attention neural network provided in an embodiment of the present application is a schematic diagram of a cut area after a feature image is cut in a vertical direction;
[0062] Figure 8 A schematic diagram of text lines in a cut area of a method for acquiring test paper structure based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0063] Fig. 9 A schematic diagram of node features of a method for acquiring test paper structure based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0064] Fig.10 A schematic diagram of a flow chart of a test paper structure acquisition device based on artificial intelligence and graph attention neural network provided in an embodiment of the present application;
[0065] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0067] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0068] Please see Figure 1 , Figure 1 A flow chart of a method for obtaining a test paper structure based on artificial intelligence and a graph attention neural network provided in an embodiment of the present application. The method for obtaining a test paper structure based on artificial intelligence and a graph attention neural network includes:
[0069] 100. Get a set number of answer sheet images.
[0070] Optionally, if the answer sheet is submitted through an online questionnaire or examination platform, the answer sheet will be downloaded or screenshoted directly on the platform. If the answer sheet is in paper form, a scanner or camera will be used to convert it into a digital image and store it. All answer sheet images will be downloaded, and a set number of answer sheet images of the same set of test papers will be taken. By way of example, the embodiment of the present application takes the answer sheets of three people from the same set of test papers.
[0071] 200. Based on the set block rules, the answer sheet images are divided into blocks to obtain block results.
[0072] 210. Obtain feature information of each answer sheet image at different scales and directions in the frequency domain through Gabor transformation; wherein the feature information includes text lines.
[0073] It should be noted that Gabor wavelet is a multi-scale, multi-directional filter that can capture local texture and edge information of an image. It is particularly suitable for describing features with strong directionality (such as lines, edges, textures, etc.) and has feature stability.
[0074] Specifically, Gabor transform is used to obtain the relevant feature information of the image at different scales and directions in the frequency domain, which has a good effect on the recognition of text, which is close to texture images. Please refer to Figure 2 , is the information extracted in 3 spatial frequencies and 4 directions through 2D Gabor transform, where the 4 directions include horizontal and vertical directions, thus obtaining 12 feature images in total. Then the information extracted in vertical and horizontal directions is used to divide the test paper into blocks.
[0075] 211. The first answer sheet image is processed using a Gabor filter with a specific scale and specific direction to extract eigenvalues and obtain a set number of feature images.
[0076] Specifically, the first answer sheet image is processed by two-dimensional Gabor transformation, and feature images are extracted at three spatial frequencies and four directions to obtain 12 feature images. For example, please refer to Figure 2 , the original image original image is the initial image, scale1 and Dir1 of the first feature image represent the first scale and the first direction, scale1 and Dir2 of the second feature image represent the first scale and the second direction, and so on. For example, scale2 and Dir3 of the seventh feature image represent the second scale and the third direction. In this embodiment of the application, the first direction Dir1 is set to the vertical direction (vertical direction), and the fourth direction Dir4 is set to the horizontal direction (horizontal direction).
[0077] 212. Select a feature image of a first scale and a first direction, divide the feature image into blocks by a projection method, and perform vertical projection and normalization processing on the divided feature image.
[0078] For example, scale1 and Dir1 of the first feature image are selected to obtain the Gabor feature value in the vertical direction, and the first feature image is divided into blocks by a projection method to obtain Figure 3 It should be noted that the answer sheet illustration in the embodiment of the present application is only for showing the various areas of the answer sheet, and the specific content of the answer sheet is not limited by the present application.
[0079] Exemplarily, the first feature image after segmentation is vertically projected and then normalized to obtain Figure 4 The feature image after vertical projection and normalization.
[0080] 213. According to the result of the normalization processing, the feature image is divided into blocks along the second direction and then binarized.
[0081] For example, the feature image obtained after normalization of the first feature image is divided into two horizontal regions, namely, the left and right regions, according to the region with the highest value. Figure 5 , which is the feature image of the left area, and is binarized; after binarization, the vertical projection value is divided into vertical areas according to the set projection value. Optionally, the projection value is set to 255*image height*0.5, please refer to Figure 6 , cut the feature image into 4 vertical blocks.
[0082] 214. According to the result of the binarization processing, the feature image is cut into blocks along the first direction, and a region detection algorithm is called to process each block to obtain a text line of each block.
[0083] For example, please refer to Figure 7 , is a cut area after the feature image is cut along the vertical direction, and then the MSER algorithm is called to get the text line, please refer to Figure 8 , a text line of a cut area.
[0084] 215. After performing the same processing on the remaining feature images, the text lines of all feature images of the first answer sheet image are obtained.
[0085] Specifically, the remaining 11 feature images are processed in the same way to obtain the text lines of all feature images of the first answer sheet image. Exemplarily, scale1 and Dir4 of the fourth feature image are selected to obtain the vertical Gabor feature value, and then the first feature image scale1 and Dir1 are processed in the same way, and the horizontal projection and cutting are performed in the above manner to obtain the text lines.
[0086] 216. After the same processing is performed on the remaining answer sheet images, text lines of different scales and directions in the frequency domain are obtained for each answer sheet image.
[0087] Exemplarily, after the second answer sheet image and the third answer sheet image are processed in the same way as the first answer sheet image, text lines of different scales and directions in the frequency domain are obtained for each answer sheet image.
[0088] 220. Cut each answer sheet image into blocks and adjust the corresponding area images to the same size.
[0089] It can be understood that the three answer sheet images are cut into blocks respectively, and the corresponding areas of the three answer sheet images are adjusted to the same size after cutting.
[0090] 230. Obtain the position of each line of text corresponding to all answer sheet images according to the relative position of the first answer sheet image, and take each line of text as a node; wherein each node includes: feature information of Gabor transform of each answer sheet image, difference between Gabor transform of the first answer sheet image and the second answer sheet image, difference between Gabor transform of the first answer sheet image and the third answer sheet image.
[0091] It can be understood that the position of each line of text corresponding to the three answer sheet images is obtained according to the relative position of the three answer sheet images, and each line of text is used as a node. Exemplarily, each node contains the following information: feature information of 12 feature images corresponding to Gabor transformation of each answer sheet image at the corresponding position; the difference between the 12 feature images of Gabor transformation of the first answer sheet image and the second answer sheet image (operating the feature images with the same spatial frequency and direction); the difference between the 12 feature images of Gabor transformation of the first answer sheet image and the third answer sheet image (operating the feature images with the same spatial frequency and direction).
[0092] Therefore, the embodiment of the present application automatically and accurately extracts the global structural information of the test paper and divides the answer sheet images into blocks to facilitate node processing.
[0093] 300. The set vector obtained by transforming the block result through the convolutional neural network is normalized to obtain a node feature map.
[0094] Specifically, the regional images of the first answer sheet picture are combined as inputs of set dimensions, transformed into set vectors through CNN convolutional neural network transformation, and the information of the same node of each answer sheet picture is normalized and then all nodes are spliced to obtain a node feature map.
[0095] For example, the regional images of the first answer sheet picture are combined into n*width*height inputs, where n is the number of pictures, and width and height are the width and height of each picture respectively; then they are transformed into 1*1024 vectors through CNN convolutional neural network transformation, and the information of the same node of each answer sheet picture is normalized and then all nodes are spliced to obtain the node feature map, please refer to Fig. 9 , is the node feature graph.
[0096] 400. After labeling the node feature graph according to the set division area, a labeling result is obtained; wherein the labeling result includes the division area label information of each node.
[0097] Specifically, each node of the node feature graph is labeled according to the question area (printed part), the answer area (handwritten part), and the fill-in area (student number, multiple-choice question, absence mark) to obtain the divided area label information of each node; optionally, each node of the node feature graph can be labeled automatically or manually.
[0098] 500. Based on the set answer sheet construction rules and combined with the annotation results, the graph attention model is trained.
[0099] Specifically, all answer sheet construction files are parsed and loaded, wherein the answer sheet construction files include: files for storing edge relationships of nodes of the same spatial frequency, regional images to which nodes belong, serial numbers of regional images, node division region label information, and node attribute features.
[0100] Among them, the file DS_A.txt is used to store the edge relationship of nodes with the same spatial frequency. It is used to store the node-edge relationship in the form of Pair pairs. Nodes with different spatial frequencies have no edge relationship, and nodes with the same spatial frequency have edge Pair pairs. In this way, different spatial frequencies can be calculated separately at the beginning; when predicting the node information at the end, the different spatial frequency information will be concat fused for the final prediction.
[0101] Among them, the regional image to which the node belongs: DS_graph_indicator.txt, indicates which graph the node belongs to, as shown in the figure, the serial number is from 1 to X.
[0102] Among them, the serial number of the regional image: DS_graph_labels.txt, represents the serial number of the graph, such as the serial number from 1 to X in the figure.
[0103] Among them, the node division area label information: DS_node_labels.txt, represents the label of the node in the graph and the category number of the node.
[0104] Among them, the attribute characteristics of the node: DS_node_attributes.txt, represents the attribute characteristics of the node.
[0105] Specifically, nodes are assigned to different regional images according to the regional images to which the nodes belong; a graph structure is constructed according to a file used to store edge relationships of nodes with the same spatial frequency; a graph neural network module is selected according to the set task type; a graph attention model is trained using node attribute features and graph structure as input; graph labels are used to perform graph-level supervised learning on the graph attention model; and nodes are spliced to fuse information of different spatial frequencies.
[0106] Furthermore, the trained graph attention model is used to predict unknown answer sheet images; based on the prediction results, it is determined whether it is a feature map that meets the requirements; if so, the graph attention model is used to predict subsequent answer sheet images; if not, the graph attention model is retrained.
[0107] Thus, the graph attention model is trained to facilitate the subsequent marking of test papers and can automatically and accurately extract the global structural information of the test papers.
[0108] 600. Use the trained graph attention model to predict new answers.
[0109] As described above, the embodiment of the present application obtains a set number of answer sheet images; based on the set blocking rules, the answer sheet images are blocked respectively to obtain blocking results; the set vectors obtained by the blocking results through convolutional neural network transformation are normalized to obtain a node feature map; according to the set division area, the node feature map is labeled to obtain a labeling result; wherein the labeling result includes the division area label information of each node; based on the set answer sheet construction rules and combined with the labeling results, a graph attention model is trained to obtain the new answer sheet; the trained graph attention model is used to predict the new answer sheet; the graph attention model is trained, and there is no need to label a large amount of category information, and the global structural information on the answer sheet is automatically and accurately extracted. At the same time, it is suitable for the subsequent processing of various categories of test papers, which improves the generalization ability and has strong adaptability to noise and complex typesetting.
[0110] The embodiment of the present application realizes accurate extraction of key information such as the test question area (printed part), answer area (handwritten part), and fill-in area (student number, multiple-choice questions, and absence mark) through multi-modal feature fusion and global relationship modeling of multi-layer block division of images, extracts the question area based on these position information, produces the test paper template content, provides point positioning information for subsequent identification of the same test paper, and assists in the correction of feature area information as basic information for test paper correction.
[0111] The embodiment of the present application combines the advantages of Gabor transform and graph neural network (GNN) to automatically and accurately extract the global structural information of the test paper, providing a basis for subsequent test paper analysis and intelligent evaluation. There is no need to label a large amount of category information, and it is suitable for the subsequent processing of various categories of test papers, thereby improving the generalization ability.
[0112] The above steps are not to be performed in a strict order as described in the numbers, but should be understood as an overall solution.
[0113] In the second aspect, based on the above embodiments, the present application also provides a test paper structure acquisition device based on artificial intelligence and graph attention neural network, referring to Fig.10 The test paper structure acquisition device based on artificial intelligence and graph attention neural network provided in this embodiment specifically includes: an answer sheet acquisition module 201, a block processing module 202, a node processing module 203, a result marking module 204, a model training module 205 and a model prediction module 206.
[0114] Among them, the answer sheet acquisition module 201 is used to obtain a set number of answer sheet images; the block processing module 202 is used to block the answer sheet images based on the set block rules to obtain block results; the node processing module 203 is used to normalize the set vector obtained by the block result through convolutional neural network transformation to obtain a node feature map; the result labeling module 204 is used to label the node feature map according to the set division area to obtain the labeling result; wherein the labeling result includes the division area label information of each node; the model training module 205 is used to train the graph attention model based on the set answer sheet construction rules and the labeling results; the model prediction module 206 is used to use the trained graph attention model to predict the new answer sheet.
[0115] As described above, the embodiment of the present application obtains a set number of answer sheet images; based on the set blocking rules, the answer sheet images are blocked respectively to obtain blocking results; the set vectors obtained by the blocking results through convolutional neural network transformation are normalized to obtain a node feature map; according to the set division area, the node feature map is labeled to obtain a labeling result; wherein the labeling result includes the division area label information of each node; based on the set answer sheet construction rules and combined with the labeling results, a graph attention model is trained to obtain the new answer sheet; the trained graph attention model is used to predict the new answer sheet; the graph attention model is trained, and there is no need to label a large amount of category information, and the global structural information on the answer sheet is automatically and accurately extracted. At the same time, it is suitable for the subsequent processing of various categories of test papers, which improves the generalization ability and has strong adaptability to noise and complex typesetting.
[0116] On the third aspect, the embodiments of the present application also provide an electronic device, which can integrate the test paper structure acquisition device based on artificial intelligence and graph attention neural network with the user-state polling mechanism provided in the embodiments of the present application. Fig.11 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Fig.11 The electronic device includes: an input device 43, an output device 44, a memory 42 and one or more processors 41; the memory 42 is used to store one or more programs; when the one or more programs are executed by the one or more processors 41, the one or more processors 41 implement the test paper structure acquisition method based on artificial intelligence and graph attention neural network in the user-mode polling mechanism provided in the above embodiment. The input device 43, the output device 44, the memory 42 and the processor 41 can be connected by a bus or other means, Fig.11 The example of connecting through bus is taken in the following.
[0117] The processor 41 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 42, that is, the test paper structure acquisition method based on artificial intelligence and graph attention neural network of the above-mentioned user-mode polling mechanism is realized.
[0118] The electronic device provided above can be used to execute the test paper structure acquisition method based on artificial intelligence and graph attention neural network of the user-state polling mechanism provided in the above embodiment, and has corresponding functions and beneficial effects.
[0119] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the test paper structure acquisition method based on artificial intelligence and graph attention neural network as described above, and can achieve the same beneficial effects.
[0120] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the test paper structure acquisition method based on artificial intelligence and graph attention neural network as described above, can also execute related operations in the test paper structure acquisition method based on artificial intelligence and graph attention neural network provided in any embodiment of the present application.
[0121] In a fifth aspect, the embodiments of the present application also provide a computer program product, and the methods described in the various embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the processes or functions described in the various embodiments of the present application are executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM (Open Application Model) or other programmable device.
[0122] The computer program or instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0123] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0125] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0126] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0127] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0128] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A test paper structure acquisition method based on artificial intelligence and graph attention neural network, characterized in that: The method comprises: Get a set number of answer sheet images; The answer sheet images are divided into blocks based on the set block rules to obtain the block results; The set vector obtained by transforming the block result through the convolutional neural network is normalized to obtain a node feature map; After labeling the node feature graph according to the set division area, a labeling result is obtained; wherein the labeling result includes the division area label information of each node; Based on the set answer sheet construction rules and combined with the annotation results, the graph attention model is trained; Use the trained graph attention model to predict new answers; The step of dividing the answer sheet image into blocks based on the set block rules to obtain the block results includes: Obtain feature information of each answer sheet image at different scales and directions in the frequency domain through Gabor transformation; wherein the feature information includes text lines; Cut each answer sheet image into blocks and adjust the corresponding area images to the same size; According to the relative position of the first answer sheet image, the position of each line of text corresponding to all answer sheet images is obtained, and each line of text is regarded as a node; wherein each node includes: the characteristic information of the Gabor transform of each answer sheet image, the difference between the Gabor transform of the first answer sheet image and the second answer sheet image, and the difference between the Gabor transform of the first answer sheet image and the third answer sheet image.
2. The test paper structure acquisition method based on artificial intelligence and graph attention neural network according to claim 1 is characterized in that: The Gabor transform is used to obtain feature information of each answer sheet image at different scales and directions in the frequency domain, including: The first answer sheet image is processed using a Gabor filter with a specific scale and specific direction to extract feature values and obtain a set number of feature images; Selecting a feature image of a first scale and a first direction, dividing the feature image into blocks by a projection method, and performing vertical projection and normalization processing on the divided feature image; According to the result of the normalization processing, the feature image is divided into blocks along the second direction and then binarized; According to the result of the binarization processing, the feature image is cut into blocks along the first direction, and the region detection algorithm is called to process each block to obtain the text line of each block; After the same processing is performed on the remaining feature images, the text lines of all feature images of the first answer sheet image are obtained; After the same processing is performed on the remaining answer sheet images, text lines of different scales and directions in the frequency domain are obtained for each answer sheet image.
3. The test paper structure acquisition method based on artificial intelligence and graph attention neural network according to claim 1 is characterized in that: The setting vector obtained by transforming the block result through the convolutional neural network is normalized to obtain a node feature graph, including: The regional images of the first answer sheet picture are combined as inputs of set dimensions, transformed into set vectors through CNN convolutional neural network transformation, and the information of the same node of each answer sheet picture is normalized and then all nodes are spliced to obtain a node feature map.
4. The test paper structure acquisition method based on artificial intelligence and graph attention neural network according to claim 1 is characterized in that: After labeling the node feature graph according to the set division area, the labeling result is obtained, including: According to the question area, answer area and fill-in area, each node of the node feature graph is labeled to obtain the divided area label information of each node.
5. The test paper structure acquisition method based on artificial intelligence and graph attention neural network according to claim 4 is characterized in that: The graph attention model is trained based on the set answer sheet construction rules and the annotation results, including: Parse and load all answer sheet construction files, where the answer sheet construction files include: files for storing edge relationships of nodes with the same spatial frequency, regional images to which nodes belong, serial numbers of regional images, node division region label information, and node attribute features; Allocate nodes to different regional images according to the regional images to which the nodes belong; Constructing a graph structure based on a file for storing edge relationships of nodes with the same spatial frequency; Select the graph neural network module according to the set task type; Use node attribute features and graph structure as input to train the graph attention model; Use graph labels to perform graph-level supervised learning on the graph attention model; The nodes are spliced to fuse information of different spatial frequencies; Use the trained graph attention model to predict unknown answer sheet images; Based on the prediction results, determine whether it is a feature graph that meets the requirements; If so, the graph attention model is used to predict subsequent answer sheet images.
6. A test paper structure acquisition device based on artificial intelligence and graph attention neural network, characterized in that: The device comprises: Answer sheet acquisition module, used to acquire a set number of answer sheet images; A block processing module is used to block the answer sheet image based on the set block rules to obtain the block results; The node processing module is used to normalize the set vector obtained by the block result through the convolutional neural network transformation to obtain a node feature map; A result labeling module is used to label the node feature graph according to the set division area to obtain the labeling result; wherein the labeling result includes the division area label information of each node; The model training module is used to build rules based on the set answer sheet and train the graph attention model based on the annotation results; The model prediction module is used to predict new answers using the trained graph attention model; The step of dividing the answer sheet image into blocks based on the set block rules to obtain the block results includes: Obtain feature information of each answer sheet image at different scales and directions in the frequency domain through Gabor transformation; wherein the feature information includes text lines; Cut each answer sheet image into blocks and adjust the corresponding area images to the same size; According to the relative position of the first answer sheet image, the position of each line of text corresponding to all answer sheet images is obtained, and each line of text is regarded as a node; wherein each node includes: the characteristic information of the Gabor transform of each answer sheet image, the difference between the Gabor transform of the first answer sheet image and the second answer sheet image, and the difference between the Gabor transform of the first answer sheet image and the third answer sheet image.
7. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the test paper structure acquisition method based on artificial intelligence and graph attention neural network as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a server, implements a test paper structure acquisition method based on artificial intelligence and graph attention neural network as described in any one of claims 1-5.
9. A computer program product, characterized in that The computer program product comprises instructions which, when executed by a computer, cause the computer to implement the method according to any one of claims 1-5.
Citation Information
Patent Citations
Unsupervised cross-library micro-expression recognition method
CN113095270A
Question set data processing method and device based on artificial intelligence, and computer equipment
CN113761217A