A test question similarity detection method and device

CN122903591APending Publication Date: 2026-10-13BEIJING GUODIANTONG NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610933943.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

常规的试题相似度检测方法,可采用计算文本相似度、整题向量化的语义相似度衡量,无法有效区分题目中各字段对相似性判定的影响,易出现误判

Benefits of technology

[0015]从上面所述可以看出,本申请实施例提供的试题相似度检测方法及装置,包括:计算目标试题向量与至少一个待测试题向量的语义相似度,根据计算结果从各待测试题向量中选取候选试题;以目标试题的各字段为节点,字段间的依赖关系为依赖边,构造目标试题的目标图结构,以候选试题的各字段为节点,字段间的依赖关系为依赖边,构造候选试题的候选图结构;如果目标图结构与候选图结构的相应节点和依赖边能够对齐,根据对齐的两节点的语义相似性和对齐的两依赖边的一致性,确定检测结果。本申请能够提高相似度检测的精细度和准确性,有效降低误判。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903591A_ABST
    Figure CN122903591A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of test question similarity detection method and device, including: the semantic similarity of target test question vector and at least one test question vector to be tested is calculated, and candidate test question is selected from each test question vector to be tested according to the calculation result;With the field of each target test question as node, the dependent relationship between field is dependent edge, constructs the target graph structure of target test question, with the field of each candidate test question as node, the dependent relationship between field is dependent edge, constructs the candidate graph structure of candidate test question;If the corresponding node and dependent edge of target graph structure and candidate graph structure can be aligned, according to the semantic similarity of two nodes of alignment and the consistency of two dependent edges of alignment, determine detection result.The application can improve the fineness and accuracy of similarity detection, effectively reduce misjudgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for detecting the similarity of test questions. Background Technology

[0002] When using test question resources, similarity detection is necessary to avoid duplication of test points and repetition of content, ensuring the test paper's discrimination and effectiveness. Conventional test question similarity detection methods, such as calculating text similarity or semantic similarity measurement of the entire question vector, cannot effectively distinguish the influence of each field in the question on the similarity determination, and are prone to misjudgment. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a test question similarity detection method and apparatus.

[0004] To achieve the above objectives, this application provides a method for detecting test question similarity, including:

[0005] Calculate the semantic similarity between the target question vector and at least one question vector to be tested, and select candidate questions from each question vector to be tested based on the calculation results; Using each field of the target question as a node and the dependencies between fields as dependency edges, construct the target graph structure of the target question; using each field of the candidate question as a node and the dependencies between fields as dependency edges, construct the candidate graph structure of the candidate question. If the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure can be aligned, the detection result is determined based on the semantic similarity of the aligned two nodes and the consistency of the aligned two dependent edges.

[0006] Optionally, the node includes semantic nodes and inference nodes; determining the detection result based on the semantic similarity of the aligned two nodes and the consistency of the aligned two dependency edges includes: Semantic evidence is generated based on the semantic similarity of the two aligned semantic nodes; Logical evidence is generated based on the consistency between the two aligned derivation nodes and the two semantic nodes. Logical evidence is generated based on the consistency of the aligned dependency edges; Based on the semantic and logical evidence, determine whether the target test item is similar to the candidate test item.

[0007] Optionally, based on the semantic and logical evidence, determining whether the target test item is similar to the candidate test item includes: If both the semantic and logical evidence support repetition, the target question is determined to be similar to the candidate question. If there is a node with logical evidence against duplication, the node is used as the conflict node and propagated to the result node related to the answer. If the result node is conflicting, the target question and the candidate question are determined to be dissimilar; if the result node is not conflicting, the target question and the candidate question are determined to be possibly similar.

[0008] Optionally, when the conflicting node is a node corresponding to a unit, the conflict is resolved if the units are consistent after conversion. When the conflicting node is a node corresponding to a numerical value, if the numerical values ​​are consistent after normalization, the conflict is resolved. When the conflicting node is the node corresponding to the variable, the conflict is resolved if the variable can be transformed by an explicit relation.

[0009] Optionally, the method further includes: If the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure cannot be fully aligned, the target question and the candidate question are deemed to be similar.

[0010] This application also provides a test question similarity detection device, including: The filtering module is used to calculate the semantic similarity between the target question vector and at least one question vector to be tested, and select candidate questions from each question vector to be tested based on the calculation results. The construction module is used to construct the target graph structure of the target test question with each field of the target test question as a node and the dependencies between fields as dependency edges, and to construct the candidate graph structure of the candidate test questions with each field of the candidate test questions as a node and the dependencies between fields as dependency edges. The detection module is used to determine the detection result based on the semantic similarity of the aligned nodes and the consistency of the aligned dependent edges when it is determined that the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure can be aligned.

[0011] Optionally, the nodes include semantic nodes and derivation nodes; The detection module is used to generate semantic evidence based on the semantic similarity of two aligned semantic nodes; generate logical evidence based on the consistency of two aligned derivation nodes and two semantic nodes; generate logical evidence based on the consistency of aligned dependency edges; and determine whether the target question and the candidate question are similar based on the semantic evidence and the logical evidence.

[0012] Optionally, the detection module is configured to determine that the target question and the candidate question are similar when both the semantic evidence and the logical evidence support repetition; if there is a node with logical evidence opposing repetition, the node is used as the conflict node to propagate to the result node related to the answer; if the result node is conflicting, the target question and the candidate question are not similar; if the result node is not conflicting, the target question and the candidate question are suspected to be similar.

[0013] Optionally, the detection module is configured to resolve the conflict if the units are consistent after conversion when the conflicting node is a node corresponding to a unit; resolve the conflict if the values ​​are consistent after normalization when the conflicting node is a node corresponding to a value; and resolve the conflict if the variable can be transformed by an explicit relationship when the conflicting node is a node corresponding to a variable.

[0014] Optionally, the detection module is used to determine that the target question and the candidate question are suspected to be similar when the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure cannot be completely aligned.

[0015] As can be seen from the above description, the test question similarity detection method and apparatus provided in this application include: calculating the semantic similarity between a target test question vector and at least one test question vector; selecting candidate test questions from each test question vector based on the calculation result; constructing a target graph structure for the target test question using each field of the target test question as a node and the dependencies between fields as dependency edges; constructing a candidate graph structure for the candidate test questions using each field of the candidate test questions as a node and the dependencies between fields as dependency edges; and determining the detection result based on the semantic similarity of the aligned two nodes and the consistency of the aligned two dependency edges if the corresponding nodes and dependency edges of the target graph structure and the candidate graph structure can be aligned. This application can improve the precision and accuracy of similarity detection and effectively reduce false positives. Attached Figure Description

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

[0017] Figure 1 This is a schematic diagram of the method flow of an embodiment of this application; Figure 2 This is a block diagram of the device structure according to an embodiment of this application; Figure 3 This is a block diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0019] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0020] In related technologies, methods that use text similarity to detect test question similarity can only reflect the degree of overlap in literal words and words. They are difficult to understand the details such as the semantics of the test questions and the relationship between knowledge points, and cannot distinguish the logical relationship between the test questions. Using embedding models to vectorize the test questions and calculating the similarity between the whole question vector and the candidate question vector through cosine similarity does not distinguish the influence of each field such as the question stem, options, answers, explanations, formulas, and numerical conditions on the determination of repetition. When two questions are semantically similar in the whole but have different answer directions, formula conditions, numerical conditions, comparison relationships, etc., they may still be misjudged as repetitions.

[0021] In view of this, embodiments of this application provide a test question similarity detection method. Based on the initial screening of similar candidate test questions, the method performs conflict detection on the corresponding fields and answer derivation relationships between the target test question and the candidate test questions. Based on the detection results, it determines whether the target test question and the candidate test question are duplicated, which can improve the accuracy of similarity detection and effectively reduce false judgments.

[0022] like Figure 1 As shown in the embodiments of this application, the test question similarity detection method includes: S101: Calculate the semantic similarity between the target question vector and at least one question vector to be tested, and select candidate questions from each question vector to be tested based on the calculation results; In this embodiment, the target test question and the test question to be tested are converted into corresponding target test question vectors and test question vectors using an embedding model. The semantic similarity between the target test question vector and the test question vector is calculated using methods such as vector retrieval or cosine similarity. Based on the calculation results, a predetermined number of test question vectors with semantic similarity greater than the similarity threshold or with high semantic similarity are selected. The test questions corresponding to the selected test question vectors are used as candidate test questions for subsequent detection.

[0023] S102: Using each field of the target question as a node and the dependencies between fields as dependencies, construct the target graph structure of the target question; using each field of the candidate question as a node and the dependencies between fields as dependencies, construct the candidate graph structure of the candidate question. In this embodiment, the target test question is structured and divided into several fields, including the stem, options, answer, explanation, knowledge point, numerical value, unit, comparison relationship, negation relationship, qualifier, formula, variable, calculation target, question direction (including "correct", "incorrect", "find", "judgment", "proof", etc.), answer direction, and question type. Each field is used as a node, and a target graph structure consisting of nodes and dependent edges is constructed based on the dependencies between fields. A candidate graph structure is constructed in the same way.

[0024] Based on the type of field, nodes can be divided into semantic nodes, including question stems, options, answers, explanations, and knowledge points; conditional nodes, including numerical values, units, qualifiers, comparison relationships, and negation relationships; and derivation nodes, including formulas, variables, calculation targets, question directions, and answer directions. When there are abnormal situations such as missing fields, unparseable formulas, or unclear units, status nodes are created.

[0025] In some methods, each node in the graph structure includes attributes such as a unique identifier, node type, original question content, normalized content, source field, confidence level, and node status, as detailed in Table 1: Table 1 Node Attribute Information

[0026] Dependencies between fields include, for example, the condition in the question stem depends on the formula, the formula depends on the variable, the variable depends on the value, the value depends on the unit, the condition in the question stem depends on the answer direction, the answer direction depends on the answer option, and the knowledge point depends on the solution path. Correspondingly, there are dependency edges between the node corresponding to the question stem and the node corresponding to the formula, the node corresponding to the answer direction, the node corresponding to the formula and the node corresponding to the variable, the node corresponding to the variable and the node corresponding to the value, and the node corresponding to the answer direction and the node corresponding to the answer option. Starting from the question stem, the answer is gradually deduced by propagating along the dependency edges.

[0027] Based on the types of the two nodes connecting the dependent edges, the types of dependent edges can be classified, as detailed in Table 2: Table 2 Dependency Edge Types

[0028] In this embodiment, a graph structure with similarity determination function is constructed based on the test questions. The "correct items, incorrect items, solution objectives, comparison directions, unit conversions, formula variables, and answer directions" in the test questions are extracted from the test question text as constraining nodes. The dependencies such as "from question stem conditions to answer direction", "from option content to correctness judgment", and "from formula variables to calculation results" are extracted as propagable decision dependency edges. Support, opposition, and uncertain states are set for each node, so that the graph structure can participate in the subsequent separation of semantic and logical evidence, conflict propagation, and determination. Thus, refined similarity detection can be achieved based on the graph structure.

[0029] S103: If the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure can be aligned, the detection result is determined based on the semantic similarity of the aligned two nodes and the consistency of the aligned two dependent edges.

[0030] In this embodiment, after constructing the target graph structure and the candidate graph structure, the corresponding nodes and corresponding dependency edges of the target graph structure and the candidate graph structure are aligned respectively. For example, the nodes corresponding to the question stem, the nodes corresponding to the options, the nodes corresponding to the formulas, the nodes corresponding to the answers, the nodes corresponding to the units, and the nodes corresponding to the question direction are aligned, etc., and the dependency edges between the question stem and the formulas are aligned, etc.

[0031] In some approaches, if the answer conditions for a candidate question are found in the parsing or question stem, the answer node of the target question can be aligned with the parsing or question stem node of the candidate question. For questions with multiple sub-questions, a corresponding subgraph structure can be established based on each sub-question, and the corresponding nodes and dependent edges in the subgraph structure can be aligned according to question number, question objective, knowledge point, etc.

[0032] In some embodiments, the detection result is determined based on the semantic similarity of the aligned two nodes and the consistency of the aligned two dependent edges, including: Semantic evidence is generated based on the semantic similarity of the two aligned semantic nodes; Logical evidence is generated based on the consistency between the two aligned derivation nodes and the two semantic nodes. Logical evidence is generated based on the consistency of the aligned dependency edges; Based on semantic and logical evidence, determine whether the target test item is similar to the candidate test item.

[0033] In this embodiment, after the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure are aligned, the semantic similarity of the two aligned semantic nodes in textual semantics is determined, semantic evidence is generated based on semantic similarity, the consistency of the two aligned derivation nodes and the two semantic nodes in logical direction is determined, logical evidence is generated based on the consistency of the constraints of the derivation nodes and semantic nodes, the consistency of the aligned dependent edges in logic is determined, logical evidence is generated based on the consistency of the dependent edges, and then the similarity of the test questions is determined based on the semantic evidence and logical evidence.

[0034] In some methods, semantic evidence includes semantic similarity of the question stem, similarity of the option set, similarity of the answer text, similarity of the analysis content, and similarity of knowledge point names or knowledge levels. Logical evidence includes consistency in question direction, consistency in answer direction, consistency in formula structure, consistency in variable binding, consistency or equivalent conversion of numerical conditions, consistency or equivalent conversion of units, consistency in comparison relationship direction, and consistency in the scope of condition limitations.

[0035] In some methods, if the semantic similarity of the two aligned semantic nodes is similar, the semantic evidence is set to support repetition; if they are dissimilar, the semantic evidence is set to oppose repetition; if it is uncertain whether they are similar, the semantic evidence is set to unknowable. If the logical directions of the constraints of the two aligned derivation nodes and the two semantic nodes are consistent, the logical evidence is set to support repetition; if they are inconsistent, the logical evidence is set to oppose repetition; if it is uncertain whether they are consistent, the logical evidence is set to unknowable. If the two aligned dependency edges are logically consistent, the logical evidence is set to support repetition; if they are inconsistent, the logical evidence is set to oppose repetition; if it is uncertain whether they are consistent, the logical evidence is set to unknowable. See Table 3 for details.

[0036] Table 3 Evidence Setting Conditions

[0037] For example, the target question might be: Which of the following statements about the characteristics of mammals is correct? A. Breathes with gills B. Has a constant body temperature C. Has scales on its body surface D. Lays eggs Answer: B Knowledge point: Biology - Animal groups - Characteristics of mammals.

[0038] Analysis: Mammals generally have a constant body temperature, most are viviparous or lactating, and breathe with lungs.

[0039] The target test questions are transformed into a target graph structure, which includes: Semantic nodes: q_stem: a judgment about mammalian characteristics; q_option_A: breathing with gills; q_option_B: Constant body temperature; q_option_C: Body surface covered with scales; q_option_D: Oviparous; q_answer: B; q_knowledge: mammalian characteristics; q_explain: mammals have a constant body temperature, are viviparous and lactating, and breathe with lungs.

[0040] Derivation nodes: q_question_direction: Select the correct option; q_answer_direction: The correct option is B; q_key_constraint_1: Breathing mode = lung respiration; q_key_constraint_2: Body temperature = constant; q_key_constraint_3: Reproduction mode = viviparous. Dependency edge: q_stem -> q_question_direction; q_question_direction ->q_answer_direction; q_option_B ->q_key_constraint_2; q_key_constraint_2 ->q_answer_direction; q_knowledge ->q_key_constraint_1; q_knowledge ->q_key_constraint_2; q_knowledge ->q_key_constraint_3; q_explain->q_answer_direction.

[0041] Candidate Question 1 is: Which of the following is a typical characteristic of mammals? A. Gill respiration B. Homeothermic (warm to the touch) C. Body covered with scales D. Spawning and reproduction Answer: B Key point: Main characteristics of mammals.

[0042] Analysis: Mammals breathe with lungs, their body temperature is usually constant, and most of them have the characteristics of being viviparous and lactating.

[0043] Transform candidate question 1 into a candidate graph structure, which includes nodes: c_stem: Typical mammalian characteristics; c_option_A: Gill respiration; c_option_B: Homeothermic; c_option_C: Body covered with scales; c_option_D: Reproduction through egg laying; c_answer: B; c_knowledge: Main characteristics of mammals; c_explain: Mammals breathe with lungs, their body temperature is usually constant, and most are viviparous and lactating.

[0044] c_question_direction: Select the correct answer; c_answer_direction: The correct answer is B; c_key_constraint_1: Breathing mode = lung respiration; c_key_constraint_2: Body temperature = constant; c_key_constraint_3: Reproduction mode = viviparous.

[0045] Align the nodes of the target graph structure with the candidate graph structure to determine the semantic similarity and semantic evidence of the aligned semantic nodes: q_stem and c_stem are semantically similar, both pointing to mammalian features, and the state of semantic evidence is support; q_option_A is synonymous with c_option_A; q_option_B is synonymous with c_option_B; q_option_C is synonymous with c_option_C; q_option_D is near-synonymous with c_option_D; the four options have essentially the same semantics, and the semantic evidence status is support. The answer texts for both q_answer and c_answer are B, and the semantic evidence status is support; q_explain and c_explain: The parsed content is semantically similar, both including lung respiration, constant body temperature, viviparous birth and lactation, and the state of semantic evidence is support; q_knowledge and c_knowledge: The knowledge points are semantically similar, both belonging to mammalian features, and the state of semantic evidence is support; Determine the consistency and logical evidence of the two aligned derivation nodes and two semantic nodes: Both q_question_direction and c_question_direction ask questions with the option to select the correct answer, and the state of the logical evidence is support. The correct answer to both q_answer and c_answer is B, so the state of the logical evidence is support. q_key_constraint_2 and c_key_constraint_2 have the same constant body temperature constraint, and the state of the logical evidence is support; q_knowledge and c_knowledge: The knowledge points are at the same level or adjacent to each other, and the status of the logical evidence is support.

[0046] Candidate Question 2: Which of the following statements about the characteristics of mammals is incorrect? A. Breathes with gills B. Maintains a constant body temperature C. Breathes with lungs D. Live birth Answer: A Align the corresponding nodes of the target graph structure with the candidate graph structure of candidate question 2. Determine the semantic evidence as support for the two aligned question stem nodes, two knowledge point nodes, and two analysis nodes. The semantic evidence as support for some option nodes and opposition for some option nodes are also determined. The logical directions of the aligned question direction nodes are opposite, with one node indicating the selection of the correct option and the other indicating the selection of the incorrect option. The logical evidence state is opposition. The correct answer nodes are inconsistent, with one correct option being B and the other being A. The logical evidence state is opposition. The dependency edge from the question direction to the answer direction triggers the opposite derivation, and the logical evidence state is opposition.

[0047] In some embodiments, determining whether a target test item and a candidate test item are duplicates based on semantic and logical evidence includes: If both semantic and logical evidence support repetition, the target question is determined to be similar to the candidate question. If there is a node with logical evidence against duplication, the node is used as the conflict node and propagated to the result node related to the answer. If the result node is conflicting, the target question and the candidate question are determined to be dissimilar; if the result node is not conflicting, the target question and the candidate question are determined to be possibly similar.

[0048] In this embodiment, if both the semantic and logical evidence for the target question and the candidate question support duplication, it can be determined that the two questions are duplicates.

[0049] When a conflict is detected between two derivation nodes that align the target question and the candidate question, the two derivation nodes are considered conflict nodes, and the derivation continues along the answer derivation direction until the result node is reached. If the two result nodes are conflicting, it can be determined that the target question and the candidate question are dissimilar. In this case, the conflict between the two nodes can be considered a hard conflict. When the question directions are opposite, the answer directions are opposite, the comparison directions are opposite, or the core variables are different and cannot be converted, it will directly lead to different answers, and all of these can be classified as hard conflicts.

[0050] For example, if two questions have different directions of inquiry (one asks for the correct answer, the other for the incorrect answer), the conflict is propagated from the node indicating the direction of the inquiry to the node indicating the direction of the answer. If the answer directions are also different, the two questions are definitely different. If the variables in the formulas of two questions are different, the conflict is propagated from the node indicating the variables to the node indicating the formula derivation. If the derivation processes are different, the two questions are definitely different. If the units of measurement in the numerical values ​​of two questions are different, the conflict is propagated from the node indicating the numerical values ​​to the node indicating the calculation results. If the calculation results are also different, the two questions are definitely different. If the comparison relationships in two questions are different, the conflict is propagated from the node indicating the comparison relationships to the node indicating the conclusion. If the conclusions are also different, the two questions are definitely different. If the conditions in two questions are different, the conflict is propagated from the node indicating the conditions to the node indicating the knowledge points. If the scope of application of the knowledge points is also different, the two questions are definitely different.

[0051] If the two conflicting derivation nodes only affect local conditions, and the final result node does not conflict, it can be determined that the target question and the candidate question are suspected to be similar, and further verification is required. In this case, the conflict between the two nodes can be regarded as a soft conflict. When there are differences in numerical precision, differences in the context of knowledge points, or incomplete local conditions that do not directly change the answer, they can be classified as soft conflicts.

[0052] In some embodiments, when the conflicting node is a node corresponding to a unit, the conflict is resolved if the units are consistent after conversion; when the conflicting node is a node corresponding to a value, the conflict is resolved if the values ​​are consistent after normalization; when the conflicting node is a node corresponding to a variable, the conflict is resolved if the variable can be transformed by an explicit relationship.

[0053] In this embodiment, for two inconsistent unit nodes or two inconsistent numerical nodes, if the unit difference can be converted and the values ​​are consistent after normalization, the conflict can be resolved. For two inconsistent variable nodes, if the variables can be converted from a clear relationship, the conflict can be resolved. For example, if the units of two unit nodes are "meters per second" and "kilometers per hour" respectively, and can be converted to a unified unit, then the conflict between the two unit nodes can be resolved. After the unit conversion, it is further determined whether the two numerical nodes are consistent after the unit conversion. If the values ​​are inconsistent, then the two numerical nodes are considered conflict nodes and continue to propagate to the formula node and the answer node.

[0054] In some methods, when candidate questions obtained through image recognition are judged to be dissimilar, the conflict points can be further reviewed to determine whether the conflict can be resolved. For example, if "correct" is identified as "incorrect" due to an identification error, resulting in the candidate question and the target question being inconsistent in the questioning direction, after reviewing and confirming that the questioning direction is consistent, the two questions need to be re-checked for similarity.

[0055] In some approaches, if the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure cannot be fully aligned, for example, if the candidate question lacks key derivation nodes, it cannot be judged and propagated, and is judged as suspected similar or pending verification.

[0056] In some implementations, the similarity detection method can be based on a finite state machine to achieve detection through state transitions. The states of the finite state machine are set as follows: S0: Candidate question selection state; S1: Graph structure construction state; S2: Node and dependency edge alignment state; S3: Semantic evidence supports repetition state; S4: Logical evidence is consistent state; S5: Soft conflict awaiting verification state; S6: Hard conflict resolution state; S7: Output similarity state; S8: Output suspected similarity state; S9: Output dissimilarity state. The state transition process is shown in Table 4.

[0057] Table 4 State Transition Table

[0058] The test question similarity detection method provided in this application constructs a graph structure including nodes and answer derivation relationships based on several fields of the test question and the dependencies between fields. The graph structure of the target test question and the candidate test questions is aligned. Based on the aligned nodes and dependency edges, semantic evidence and logical evidence are determined. Based on the semantic evidence and logical evidence, it is determined whether the two test questions are similar in semantics and logic. This method can improve the precision and accuracy of similarity detection and reduce false positives.

[0059] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0060] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0061] like Figure 2 As shown in the figure, this application provides a test question similarity detection device, including: The filtering module is used to calculate the semantic similarity between the target question vector and at least one question vector to be tested, and select candidate questions from each question vector to be tested based on the calculation results. The construction module is used to construct the target graph structure of the target test question with each field of the target test question as a node and the dependencies between fields as dependency edges, and to construct the candidate graph structure of the candidate test questions with each field of the candidate test questions as a node and the dependencies between fields as dependency edges. The detection module is used to determine the detection result based on the semantic similarity of the aligned nodes and the consistency of the aligned dependent edges when it is determined that the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure can be aligned.

[0062] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware.

[0063] The apparatus described above is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0064] Figure 3 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0065] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0066] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0067] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0068] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0069] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0070] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0071] The electronic devices described above are used to implement the corresponding methods in the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0072] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0073] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.

[0074] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0075] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0076] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this disclosure.

Claims

1. A method for detecting the similarity of test questions, characterized in that, include: Calculate the semantic similarity between the target question vector and at least one question vector to be tested, and select candidate questions from each question vector to be tested based on the calculation results; Using each field of the target question as a node and the dependencies between fields as dependency edges, construct the target graph structure of the target question; using each field of the candidate question as a node and the dependencies between fields as dependency edges, construct the candidate graph structure of the candidate question. If the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure can be aligned, the detection result is determined based on the semantic similarity of the aligned two nodes and the consistency of the aligned two dependent edges.

2. The method according to claim 1, characterized in that, The nodes include semantic nodes and inference nodes; determining the detection result based on the semantic similarity of the aligned two nodes and the consistency of the aligned two dependency edges includes: Semantic evidence is generated based on the semantic similarity of the two aligned semantic nodes; Logical evidence is generated based on the consistency between the two aligned derivation nodes and the two semantic nodes. Logical evidence is generated based on the consistency of the aligned dependency edges; Based on the semantic and logical evidence, determine whether the target test item is similar to the candidate test item.

3. The method according to claim 2, characterized in that, Based on the semantic and logical evidence, determine whether the target test item and the candidate test item are similar, including: If both the semantic and logical evidence support repetition, the target question is determined to be similar to the candidate question. If there is a node with logical evidence against duplication, the node is used as the conflict node and propagated to the result node related to the answer. If the result node is conflicting, the target question and the candidate question are determined to be dissimilar; if the result node is not conflicting, the target question and the candidate question are determined to be possibly similar.

4. The method according to claim 3, characterized in that, When the conflicting node is a node corresponding to a unit, the conflict is resolved if the units are consistent after conversion. When the conflicting node is a node corresponding to a numerical value, if the numerical values ​​are consistent after normalization, the conflict is resolved. When the conflicting node is the node corresponding to the variable, the conflict is resolved if the variable can be transformed by an explicit relation.

5. The method according to claim 1, characterized in that, Also includes: If the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure cannot be fully aligned, the target question and the candidate question are deemed to be similar.

6. A test question similarity detection device, characterized in that, include: The filtering module is used to calculate the semantic similarity between the target question vector and at least one question vector to be tested, and select candidate questions from each question vector to be tested based on the calculation results. The construction module is used to construct the target graph structure of the target test question with each field of the target test question as a node and the dependencies between fields as dependency edges, and to construct the candidate graph structure of the candidate test questions with each field of the candidate test questions as a node and the dependencies between fields as dependency edges. The detection module is used to determine the detection result based on the semantic similarity of the aligned nodes and the consistency of the aligned dependent edges when it is determined that the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure can be aligned.

7. The apparatus according to claim 6, characterized in that, The nodes include semantic nodes and derivation nodes; The detection module is used to generate semantic evidence based on the semantic similarity of two aligned semantic nodes; generate logical evidence based on the consistency of two aligned derivation nodes and two semantic nodes; generate logical evidence based on the consistency of aligned dependency edges; and determine whether the target question and the candidate question are similar based on the semantic evidence and the logical evidence.

8. The apparatus according to claim 7, characterized in that, The detection module is used to determine that the target question and the candidate question are similar when both the semantic evidence and the logical evidence support repetition; if there is a node with logical evidence against repetition, the node is used as the conflict node to propagate to the result node related to the answer; if the result node is conflicting, the target question and the candidate question are not similar. If the result node is non-conflicting, the target question and the candidate question are suspected to be similar.

9. The apparatus according to claim 8, characterized in that, The detection module is configured to resolve conflicts when the conflicting node is a unit-corresponding node, if the units are consistent after conversion; resolve conflicts when the conflicting node is a value-corresponding node, if the values ​​are consistent after normalization; and resolve conflicts when the conflicting node is a variable-corresponding node, if the variable can be transformed by a clear relationship.

10. The apparatus according to claim 6, characterized in that, The detection module is used to determine that the target question and the candidate question are suspected to be similar when the corresponding nodes and dependent edges of the target graph structure and the candidate graph structure cannot be completely aligned.