Questionnaire identification method and device based on deep neural network

Through the questionnaire recognition method based on deep neural network, using IQL language and abstract syntax tree, the problems of difficulty in expression and proofreading during the electronic and automatic recognition of questionnaire are solved, and efficient questionnaire electronic and automated recognition are achieved.

CN119761353AActive Publication Date: 2025-04-04JINAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411694456.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-04-04
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

The prior art has problems of difficulty in expressing and proofreading in the process of electronic and automatic recognition of questionnaires, especially when setting correct regular expressions and implementing syntax verification.

Method used

The questionnaire recognition method based on deep neural network is adopted, and the questionnaire content is expressed in a structured manner through IQL language editing and multi-task learning, and the structured prediction output is used to realize the automatic recognition of the questionnaire.

Benefits of technology

It realizes user-friendly and convenient electronicization of questionnaires, automatically identify and structured output of questionnaires, improves the efficiency of electronicization of long questionnaires, and solves the problems of difficulty in expressing and proofreading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761353A_ABST
    Figure CN119761353A_ABST
Patent Text Reader

Abstract

The invention discloses a questionnaire recognition method and device based on a deep neural network. The method comprises the steps that in an IQL questionnaire editing environment, a user questionnaire is formatted, paragraph division is conducted on each question, modeling is conducted on each sentence in paragraphs, the modeled sentences are reconstructed, and a reconstructed text is obtained; performing type classification on the reconstructed text, and performing adaptive weight calculation to obtain the type of each question; performing information extraction on the reconstructed text according to the question type to obtain question information; constructing an abstract syntax tree based on an IQL language, inputting the question information into the abstract syntax tree in sequence, traversing the abstract syntax tree, combining the question information through a preset syntax rule, and generating a logic statement. According to the method, a plurality of different downstream tasks are executed through the abstract syntax tree based on the IQL language, and automatic and intelligent processing of questionnaire IQL electronization is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of questionnaire recognition, and specifically relates to a questionnaire recognition method and device based on a deep neural network. Background Art

[0002] At present, social research is one of the important means to understand society and economy. For research institutions and enterprises, using questionnaires to conduct social research is the most direct and popular form. By setting different types of questions and setting scores for corresponding types of questions according to certain rules, after the respondents complete the questionnaire, the statistical scores can well reflect the current research results.

[0003] Although the form of questionnaires has good expressive power, the large number of survey subjects and the large number of questionnaires that need to be distributed make the process of distributing and organizing questionnaires very cumbersome. In order to avoid the massive distribution and organization of questionnaires, it is particularly important to digitize and automatically identify the questionnaires. In addition, there are still pain points in the process of digitizing questionnaires into IQL language, such as difficulty in expression and proofreading. For example, if you want to set a question to only allow Chinese and numbers to be entered, you can't think of the correct regular expression; or if you want to verify the result of a question after asking it, you can't think of the correct syntax to achieve it. Therefore, a method of digitizing questionnaires that takes into account both expression and proofreading is urgently needed. Summary of the invention

[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a questionnaire recognition method and device based on a deep neural network. By editing the IQL language and performing multi-task learning on the questionnaire content, each question in the questionnaire can be expressed in a structured manner, and structured prediction output can be performed through an abstract syntax tree based on the IQL language, thereby realizing automatic questionnaire recognition.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a questionnaire recognition method based on a deep neural network, comprising the following steps: Format the user questionnaire in the IQL questionnaire editing environment, divide each question into paragraphs, model each sentence in the paragraph, reconstruct the sentence after modeling, and obtain the reconstructed text; Classify the reconstructed text into different types and perform adaptive weight calculation to obtain the type of each question; Extract information from the reconstructed text according to the topic type to obtain topic information; An abstract syntax tree based on the IQL language is constructed, question information is input into the abstract syntax tree based on the IQL language in sequence, the abstract syntax tree based on the IQL language is traversed, the question information is combined according to preset grammar rules, and a logical statement is generated. The abstract syntax tree based on the IQL language includes grammar rules and an execution unit. The grammar rules are used to specify rules for question generation, and the execution unit is used to generate a currently recognized question according to the grammar rules and the question information.

[0006] As a preferred technical solution, the user questionnaire is formatted in the IQL questionnaire editing environment, each question is divided into paragraphs, each sentence in the paragraph is modeled, and the sentence after modeling is reconstructed to obtain the reconstructed text, including: Convert the user questionnaire into HTML format. If the user questionnaire has multiple lines of sentences, use the minimum p tag to mark each line of sentences. Divide a question in the user questionnaire into a paragraph, use a deep neural network to semantically identify the minimum p label of each sentence and perform classification training, obtain the paragraph structure representation, and model each question according to the paragraph structure representation; the deep neural network includes a maximum pooling layer, an average pooling layer, and a fully connected layer, and the paragraph structure representation includes the beginning part, the middle part, and other parts; Reconstruct the sentence according to the paragraph structure representation to obtain the reconstructed text.

[0007] As a preferred technical solution, the classification training is specifically: The minimum p label of each sentence in each question is input into the deep neural network according to the order of the sentences in the question. The hidden state of each token in the sentence is pooled using the maximum pooling layer and the average pooling layer. The fully connected layer outputs the paragraph structure representation. As a preferred technical solution, the type classification of the reconstructed text and the adaptive weight calculation include: Classify according to the structure of the reconstructed text and obtain the classification label; Calculate the sample frequency of each classification label and adjust the classification training weight according to the sample frequency; The cross entropy loss function is used to perform gradient training on the classification labels. After the training is completed, the final classification label of each question is obtained.

[0008] As a preferred technical solution, the information extraction from the reconstructed text according to the topic type includes: Multi-task learning is used to predict multiple types of topic information within the same topic, including the following situations: When the question is a multiple-choice question, the extracted question information includes the question number, title, option number, option content, and logic-related statements; the logic-related statements are used to limit the appearance logic of the question or the verification logic of the answer to the question; When the question is a question-and-answer question, the extracted question information includes the question number, title, and logically related sentences; When the question is a true or false question, the extracted question information includes the question number, title, and logically related sentences; After extracting the title information of each question, merge the title information.

[0009] As a preferred technical solution, the grammar rule has multiple execution units, the first execution unit outputs corresponding fields or symbols according to the type of the current grammar rule, and the other execution units are set according to the type of the current grammar rule.

[0010] As a preferred technical solution, the type of the current question is predicted based on the input question information, the generation rules of the current question are defined using grammar rules, and the type of the grammar rules are output; other execution units are set according to the grammar rules, the first execution unit is used to output the field or symbol of the type of the grammar rule, and other execution units are used to output them in sequence, and the execution is looped until all questions are output.

[0011] In a second aspect, the present invention further provides a questionnaire recognition system based on a deep neural network, which is applied to the questionnaire recognition method based on a deep neural network, and includes a text reconstruction module, a type recognition module, an information extraction module, and a recognition output module; The text reconstruction module is used to format the user questionnaire in the IQL questionnaire editing environment, divide each question into paragraphs, model each sentence in the paragraph, reconstruct the sentence after modeling, and obtain the reconstructed text; Type recognition module, used to classify the reconstructed text and perform adaptive weight calculation to obtain the type of each topic; An information extraction module is used to extract information from the reconstructed text according to the topic type to obtain topic information; The recognition output module is used to build an abstract syntax tree based on the IQL language, input the question information into the abstract syntax tree in sequence, traverse the abstract syntax tree, combine the question information according to preset grammar rules, and generate logical statements.

[0012] In a third aspect, the present invention provides an electronic device, the electronic device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the questionnaire recognition method based on deep neural network.

[0013] In a fourth aspect, the present invention provides a computer-readable storage medium storing a program, which, when executed by a processor, implements the questionnaire recognition method based on a deep neural network.

[0014] Compared with the prior art, the present invention has the following advantages and beneficial effects: (1) The present invention utilizes multi-task learning on the questionnaire content to express each question in a structured manner, and finally outputs a natural language to express a questionnaire, thereby realizing user-friendly and convenient electronic questionnaire.

[0015] (2) The present invention uses an abstract syntax tree based on the IQL language to perform structured prediction output. Users no longer need to repeatedly copy and paste the text content of a word questionnaire or a PDF questionnaire into the IQL questionnaire editor. The questionnaire can be automatically identified and structured for output, thereby improving the efficiency of electronicization of long questionnaires. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 This is a flowchart of a questionnaire recognition method based on a deep neural network according to an embodiment of the present invention; Figure 2 A schematic diagram of information extraction according to an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a conventional abstract syntax tree according to an embodiment of the present invention; Figure 4 It is a schematic diagram of the structure of an abstract syntax tree based on the IQL language according to an embodiment of the present invention; Figure 5 It is a schematic diagram of the structure of a questionnaire recognition system based on a deep neural network according to an embodiment of the present invention; Figure 6 4 is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0019] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0020] IQL (Iesr-Questionnaire-Language) is a self-developed questionnaire programming language that is easy to learn, easy to input, has rich question types, powerful logical functions, and easy to debug and preview. It is used to solve the problems of previous questionnaire systems, such as single question types, weak logical functions, low flexibility, high learning cost, inability to preview instantly, and lack of powerful IDE tool support.

[0021] See also Figure 1 ,This embodiment provides a questionnaire recognition method based on deep neural network.

[0022] This example uses the PaddlePaddle deep learning development platform as the platform for model training and deployment, and uses the Wenxin model ERNIE3.0 as a pre-trained model to save training and data costs. Considering the balance between processing accuracy and speed, it is specifically divided into the following stages: Step 1: Format the user questionnaire in the IQL questionnaire editing environment, divide each question into paragraphs, model each sentence in the paragraph, reconstruct the sentence after modeling, and obtain the reconstructed text.

[0023] First, the user's questionnaire is identified as a text in HTML format and processed uniformly. The user questionnaire is converted into HTML format. Assume that the user questionnaire has multiple lines of sentences, and each line of sentences is annotated with a minimum P tag; the text of each minimum P tag is regarded as a sentence as the input of the following steps.

[0024] Secondly, if Figure 2As shown, a question in the user questionnaire is divided into a paragraph, and a deep neural network is used to semantically identify the minimum p label of each sentence and perform classification training to obtain a paragraph structure representation, and each question is modeled according to the paragraph structure representation; the deep neural network includes a maximum pooling layer, an average pooling layer, and a fully connected layer, and the paragraph structure representation includes a starting part B, a middle part I, and other parts O.

[0025] Furthermore, in this stage of modeling, the number of texts contained in each line of sentence is uncertain, and the traditional truncation method will lose some semantics and lead to loss of precision. Therefore, in this embodiment, the minimum p labels of each sentence in each question are input into the deep neural network according to the order of the sentences in the question, and the hidden state of each token of the sentence is pooled using the maximum pooling layer and the average pooling layer, and the fully connected layer outputs the paragraph structure representation. See again Figure 2 , S1-S4 represent the content of a minimum p label respectively. A grid represents a hidden state, and three grids stacked together represent a token with three hidden states. For example, S1 is the content of the p label of 3 tokens. Then the upward arrow indicates that after the max and mean pooling operations, it enters a fully connected layer, and then the output labels are shown above.

[0026] Finally, the sentences are reconstructed according to the order and paragraph structure representation of the original questionnaire to obtain the reconstructed text.

[0027] At this time, the reconstructed text is a long sequence, which consists of the beginning part B, the middle part I and the other part O. When the title needs to be identified, it can be represented by identifying the structural representations of each paragraph. These three representations are a variant of the sequence labeling task based on the pre-trained model. The conventional one is to predict the type of token. Here, the type of text of each minimum p label is predicted.

[0028] Step 2: Classify the reconstructed text and perform adaptive weight calculation to obtain the type of each question.

[0029] In this embodiment, step 2 involves a multi-classification text classification problem, that is, it is necessary to classify the paragraph structure representations in the reconstructed text into different topic types, and then obtain their respective classification labels. In addition, because the topic types of the training data set are inevitably unbalanced, and the traditional fixed weight method cannot be adjusted according to the dynamic changes in the training process and is prone to introduce deviations, when calculating the loss function, an adaptive weight calculation is specifically introduced here, and the sample frequency of each category is calculated before the training starts, and then the weight is adjusted according to this frequency.

[0030] Specifically, the steps are as follows: S21, classify according to the structure of the reconstructed text and obtain classification labels; S22, calculating the sample frequency of each classification label, and adjusting the classification training weight according to the sample frequency; S23. Use the cross entropy loss function to perform gradient training on the classification labels. After the training is completed, the final classification label of each question is obtained.

[0031] Step 3: Extract information from the reconstructed text according to the topic type to obtain topic information.

[0032] In step 2, the questions in the questionnaire have been classified. In the next step S3, the attributes of the classified questions need to be extracted respectively, that is, the question information is extracted according to the category. Specifically, this embodiment can identify the following question types, including single choice, multiple choice, sorting questions, single fill-in-the-blank, multiple fill-in-the-blank, matrix fill-in-the-blank, matrix scale, matrix single choice, matrix multiple choice, matrix slider, matrix drop-down, matrix value, matrix text, matrix combination, matrix NPS scale, file upload, rating scale question, NPS scale question, first-level drop-down list, multi-level drop-down box, province, city and county drop-down, weight question, slider, name, gender, mobile phone number, email address, date, time, date and time, map, college selection, province drop-down, province and city drop-down, province, city and county drop-down, signature, paragraph description, paging, informed consent, etc. However, the basic components of the question are question number, title, subtitle, option number, option content and logically related statements. .

[0033] In order to extract the above-mentioned topic information, this embodiment adopts multi-task learning. Each task is responsible for predicting a topic attribute, and finally the results of each task are merged. When calculating the loss rate, a small network is introduced to dynamically adjust the task weight. The input of this network is the loss value of each task, and the output is the weight of the task. The steps are as follows: When the question is a multiple-choice question, the extracted question information includes the question number, title, option number, option content, and logically related sentences; When the question is a question-and-answer question, the extracted question information includes the question number, title, and logically related sentences; When the question is a true or false question, the extracted question information includes the question number, title, and logically related sentences; After extracting the title information of each question, merge the title information.

[0034] It is trained jointly with the main task and the parameters of the weight network are dynamically adjusted through back-propagation.

[0035] Furthermore, the process of extracting question information is a sequence labeling task based on a pre-trained model, and its main task is the sequence labeling task that needs to be processed. It inputs the reconstructed text and outputs the type of each token or character in the text (BIO labeling). For example, the composition of the question is the question number, title, options and logical statements. Here, B-question number (the beginning of the question number), I-question number (the middle part of the question number), B-title, I-title, B-logic, I-logic and O (other parts) are constructed. After obtaining the output of the model, the tokens are combined according to the output type. For example, the pseudo code for extracting the question number information is as follows: for i in range(token sequence length): token_type = the type of the i-th token if token_type == B-question number: / / Start from i+1 and iterate until you encounter a token_type that is not I-question number for j in range(i+1,token sequence length): If the type of the jth token != I-question number: break The question number of the question = token sequence [i: j].

[0036] The tasks are: 1. Identify where each minimum p tag starts, in the middle or elsewhere in the question text. Then combine the results into question texts; 2. Predict the question type based on the question text; 3. Based on the question text, extract the question number, title, subtitle, options and logical statements; 4. Generate logical statements based on the question text and the position of this text in the original text.

[0037] It is also necessary to explain that the above logic-related statements mainly describe the logic of the appearance of questions or the verification logic of the answers to questions, etc. For example: a certain question is only allowed to be answered by respondents over 18 years old, or after answering question A12, jump to A20.

[0038] Step 4: construct an abstract syntax tree based on the IQL language, input the question information into the abstract syntax tree based on the IQL language in order, traverse the abstract syntax tree based on the IQL language, combine the question information through preset grammar rules, and generate logical statements.

[0039] After completing the text structuring of steps 1-3, this implementation will construct an abstract syntax tree based on the IQL language, which can realize the generation of logical statements. In order to better improve the recognition output efficiency, an intermediate language IQL-ASDL is used as prior knowledge to improve the traditional Transformer generation model based on the encoder-decoder structure. This intermediate language IQL-ASDL can be used to guide the model to select features, optimize the architecture and improve interpretability. Figure 3 and Figure 4 As shown, the abstract syntax tree generated by the traditional sequence generation model only outputs code and lacks grammatical constraints. However, after adding the intermediate language IQL-ASDL, the present application can constrain the grammar of the question sequence by defining grammatical rules as a hint, thereby improving the accuracy of question sequence recognition and output.

[0040] Specifically, if Figure 4 As shown, this intermediate language IQL-ASDL includes grammar rules and execution units, wherein the grammar rules are used to define the rules for generating questions, and the execution units are used to generate the currently recognized questions according to the grammar rules and question information; the grammar rules have multiple execution units, and the first execution unit outputs the corresponding fields or symbols according to the type of the current grammar rule, and the other execution units are set according to the type of the current grammar rule. The question type of the current question is predicted according to the input question information, the generation rules of the current question are defined using the grammar rules, and the type of the grammar rules is output; the other execution units are set according to the grammar rules, the fields or symbols of the type of the grammar rules are output using the first execution unit, and the other execution units are output in sequence, and the execution is cyclically executed until all questions are output.

[0041] Finally, the output logic statement is the logic statement of the identified questionnaire.

[0042] In order to better explain step S4, this embodiment sets the grammar rule as a question-answering rule, including a definition statement and a question statement. The former is used to define the execution unit of how to output the question of the current question type based on the current rule, and the latter is the type selection of the specific question.

[0043] like Figure 4 As shown in , a random request is made to the abstract syntax tree to output a type of question. The first step t1 predicts the question information to the question type of step t2 according to the question order. The second step t2 sets the corresponding execution unit according to the question type prediction, such as t3, t5, t7 and t9. Then, according to the principle of depth first and from left to right, DeclareType is processed first until it is completed before starting the next Action. This cycle continues until the end, and finally outputs the code that conforms to the grammatical rules. The pseudo code is as follows: inputs = information about the questions and the order of the questions pre_results = the results of the previous step pre_rule = Rule of the previous step nodes = the Rule and Action that need to be processed currently def step(inputs,pre_results,pre_rule,nodes) if not nodes: return for node in nodes: if node is Rule: # Under the current Rule, give the next possible Rule and Action based on the syntax tree next_nodes = IQL-ASDL.next(rule) # Based on the current state, the result of the previous step and the possible result of the next step, #Give the next step Rule and Action next_nodes = Predict(inputs,pre_results,pre_rule,next_nodes) pre_results.append(step(inputs,pre_results,rule,next_nodes)) else if node is Action: pre_results.append(GenToken(inputs,pre_results,pre_rule,action)).

[0044] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.

[0045] Based on the same idea as the questionnaire recognition method based on a deep neural network in the above-mentioned embodiment, the present invention also provides a questionnaire recognition system based on a deep neural network, which can be used to execute the above-mentioned questionnaire recognition method based on a deep neural network. For ease of explanation, the structural diagram of the embodiment of the questionnaire recognition system based on a deep neural network only shows the parts related to the embodiment of the present invention. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown in the diagram, or combine certain components, or arrange the components differently.

[0046] See also Figure 5 In another embodiment of the present application, a questionnaire recognition system 10 based on a deep neural network is provided, the system comprising a text reconstruction module 11, a type recognition module 12, an information extraction module 13 and a recognition output module 14; The text reconstruction module 11 is used to format the user questionnaire in the IQL questionnaire editing environment, divide each question into paragraphs, model each sentence in the paragraph, reconstruct the sentence after modeling, and obtain the reconstructed text; The type identification module 12 is used to classify the reconstructed text and perform adaptive weight calculation to obtain the type of each topic; An information extraction module 13 is used to extract information from the reconstructed text according to the topic type to obtain topic information; The recognition output module 14 is used to construct an abstract syntax tree based on the IQL language, input the topic information into the abstract syntax tree in sequence, traverse the abstract syntax tree, combine the topic information according to preset grammar rules, and generate logical statements.

[0047] It should be noted that the questionnaire recognition system based on deep neural network of the present invention corresponds one-to-one to the questionnaire recognition method based on deep neural network of the present invention. The technical features and beneficial effects described in the embodiment of the questionnaire recognition method based on deep neural network are applicable to the embodiment of the questionnaire recognition method based on deep neural network. For specific contents, please refer to the description in the embodiment of the method of the present invention, which will not be repeated here. This is hereby declared.

[0048] In addition, in the implementation of the questionnaire recognition system based on deep neural network in the above-mentioned embodiment, the logical division of each program module is only an example. In actual application, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the questionnaire recognition system based on deep neural network is divided into different program modules to complete all or part of the functions described above.

[0049] See also Figure 6In one embodiment, an electronic device for implementing a questionnaire recognition method based on a deep neural network is provided. The electronic device 20 may include a first processor 21, a first memory 22 and a bus, and may also include a computer program stored in the first memory 22 and executable on the first processor 21, such as a questionnaire recognition program 23 based on a deep neural network.

[0050] Among them, the first memory 22 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the first memory 22 can be an internal storage unit of the electronic device 20, such as a mobile hard disk of the electronic device 20. In other embodiments, the first memory 22 can also be an external storage device of the electronic device 20, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 20. Further, the first memory 22 can also include both an internal storage unit of the electronic device 20 and an external storage device. The first memory 22 can not only be used to store application software and various types of data installed in the electronic device 20, such as the code of the questionnaire recognition program 23 based on the deep neural network, but also can be used to temporarily store data that has been output or is to be output.

[0051] In some embodiments, the first processor 21 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The first processor 21 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device 20 by running or executing programs or modules stored in the first memory 22, and calling data stored in the first memory 22.

[0052] Figure 6 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the electronic device 20 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0053] The questionnaire recognition program 23 based on a deep neural network stored in the first memory 22 of the electronic device 20 is a combination of multiple instructions. When running in the first processor 21, it can achieve: Format the user questionnaire, divide each question into paragraphs, model each sentence in the paragraph, reconstruct the sentence after modeling, and obtain the reconstructed text; The type of each question is obtained by classifying the reconstructed text and performing adaptive weight calculation; Extract information from the reconstructed text according to the topic type to obtain topic information; Construct an abstract syntax tree, input the topic information into the abstract syntax tree in order, traverse the abstract syntax tree, combine the topic information according to preset syntax rules, and generate logical statements. Furthermore, if the module / unit integrated in the electronic device 20 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0054] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0055] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0056] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A questionnaire recognition method based on deep neural network, characterized in that: The steps include: Format the user questionnaire in the IQL questionnaire editing environment, divide each question into paragraphs, model each sentence in the paragraph, reconstruct the sentence after modeling, and obtain the reconstructed text; Classify the reconstructed text into different types and perform adaptive weight calculation to obtain the type of each question; Extract information from the reconstructed text according to the topic type to obtain topic information; An abstract syntax tree based on the IQL language is constructed, question information is input into the abstract syntax tree based on the IQL language in sequence, the abstract syntax tree based on the IQL language is traversed, the question information is combined according to preset grammar rules, and a logical statement is generated. The abstract syntax tree based on the IQL language includes grammar rules and an execution unit. The grammar rules are used to specify rules for question generation, and the execution unit is used to generate a currently recognized question according to the grammar rules and the question information.

2. The questionnaire recognition method based on deep neural network according to claim 1 is characterized in that: The method of formatting the user questionnaire in the IQL questionnaire editing environment, dividing each question into paragraphs, modeling each sentence in the paragraph, reconstructing the sentence after modeling, and obtaining the reconstructed text includes: Convert the user questionnaire into HTML format. If the user questionnaire has multiple lines of sentences, use the minimum p tag to mark each line of sentences. Divide a question in the user questionnaire into a paragraph, use a deep neural network to semantically identify the minimum p label of each sentence and perform classification training, obtain the paragraph structure representation, and model each question according to the paragraph structure representation; the deep neural network includes a maximum pooling layer, an average pooling layer, and a fully connected layer, and the paragraph structure representation includes the beginning part, the middle part, and other parts; Reconstruct the sentence according to the paragraph structure representation to obtain the reconstructed text.

3. The questionnaire recognition method based on deep neural network according to claim 2 is characterized in that: The classification training is specifically as follows: The minimum p label of each sentence in each question is input into the deep neural network according to the order of the sentences in the question. The maximum pooling layer and the average pooling layer are used to perform pooling operations on the hidden state of each token in the sentence, and the fully connected layer outputs the paragraph structure representation.

4. The questionnaire recognition method based on deep neural network according to claim 1 is characterized in that: The type classification of the reconstructed text and the adaptive weight calculation include: Classify according to the structure of the reconstructed text and obtain the classification label; Calculate the sample frequency of each classification label and adjust the classification training weight according to the sample frequency; The cross entropy loss function is used to perform gradient training on the classification labels. After the training is completed, the final classification label of each question is obtained.

5. The questionnaire recognition method based on deep neural network according to claim 1 is characterized in that: The extracting information from the reconstructed text according to the topic type includes: Multi-task learning is used to predict multiple types of topic information within the same topic, including the following situations: When the question is a multiple-choice question, the extracted question information includes the question number, title, option number, option content, and logic-related statements; the logic-related statements are used to limit the appearance logic of the question or the verification logic of the answer to the question; When the question is a question-and-answer question, the extracted question information includes the question number, title, and logically related sentences; When the question is a true or false question, the extracted question information includes the question number, title, and logically related sentences; After extracting the title information of each question, merge the title information.

6. The questionnaire recognition method based on deep neural network according to claim 1 is characterized in that: The grammar rule has multiple execution units, the first execution unit outputs corresponding fields or symbols according to the type of the current grammar rule, and the other execution units are set according to the type of the current grammar rule.

7. The questionnaire recognition method based on deep neural network according to claim 6 is characterized in that: Predict the type of the current question based on the input question information, use grammar rules to define the generation rules of the current question, and output the type of the grammar rules; set other execution units according to the grammar rules, use the first execution unit to output the field or symbol of the type of the grammar rule, use other execution units to output in sequence, and execute in a loop until all questions are output.

8. A questionnaire recognition system based on deep neural network, characterized in that: A questionnaire recognition method based on a deep neural network applied to any one of claims 1 to 7, comprising a text reconstruction module, a type recognition module, an information extraction module, and a recognition output module; The text reconstruction module is used to format the user questionnaire in the IQL questionnaire editing environment, divide each question into paragraphs, model each sentence in the paragraph, reconstruct the sentence after modeling, and obtain the reconstructed text; Type recognition module, used to classify the reconstructed text and perform adaptive weight calculation to obtain the type of each topic; An information extraction module is used to extract information from the reconstructed text according to the topic type to obtain topic information; The recognition output module is used to build an abstract syntax tree based on the IQL language, input the question information into the abstract syntax tree in sequence, traverse the abstract syntax tree, combine the question information according to preset grammar rules, and generate logical statements.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the questionnaire recognition method based on deep neural network as described in any one of claims 1-7.

10. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the questionnaire recognition method based on a deep neural network described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Graphical questionnaire generation method and graphical questionnaire generation system

    CN104572136A

  • Questionnaire generation method and device and storage medium

    CN113033157A