Verification method and device, electronic equipment, readable storage medium and program product
By generating verification links with directed or undirected edges, the problems of high complexity and high storage cost in the verification process in existing technologies are solved, achieving the effects of accurate positioning and reduced storage costs.
Patent Information
- Application Number
- CN202210910586.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-07-29
Smart Images

Figure CN115238136B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of cloud technology and big data, in particular, the present application relates to a checking method and device, electronic equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] With the development of information technology, in various industries, there are more and more businesses that need to be checked (i.e. to be checked business). In the specific checking, usually the real business content corresponding string and the reference business content corresponding string are directly compared to determine, so as to obtain the checking result, the checking method is relatively single.
[0003] In addition, if a business has multiple reference business contents without order relationship, usually each reference business content is arranged and combined to generate multiple reference contents, and various reference contents are saved, which is relatively complicated and requires high storage cost. When the reference business content needs to be updated, it is difficult to accurately locate the content to be modified, that is, when the content is updated, the compatibility is poor, and it is difficult to meet the practical demand. SUMMARY
[0004] The present application provides a checking method, device, electronic equipment, computer readable storage medium and computer program product, which can solve the technical problem of how to reduce the generation complexity of the reference content of the business to be checked and reduce the storage cost.
[0005] According to an aspect of an embodiment of the present application, a checking method is provided, the method comprising:
[0006] obtaining the to-be-checked data of the to-be-checked business, the to-be-checked business including at least one object, the to-be-checked data including the to-be-checked content of each object, for each object, the object including at least one sub object, when the object includes at least two sub objects, the at least two sub objects in the object have an order relationship, and the to-be-checked content of the object includes the object content of each sub object in the object;
[0007] obtaining the checking link corresponding to the to-be-checked business, the creation method of the checking link comprising: obtaining the reference content of each sub object in the to-be-checked business, taking each sub object as a node, if the reference content of two adjacent sub objects of the same object has an order relationship, creating a directed edge between the nodes corresponding to the two adjacent sub objects; if the reference content of two sub objects of the same object does not have an order relationship, creating an undirected edge between the nodes corresponding to the two sub objects;
[0008] For each sub-object, if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, it is determined that the checking result of the sub-object is correct; if the object content of the sub-object does not match the reference content of the node corresponding to the sub-object, the checking result of the sub-object is determined according to the type of the edge connected to the node corresponding to the sub-object, wherein the type of the edge includes a directed edge or an undirected edge.
[0009] According to another aspect of the embodiments of the present application, a checking device is provided, which comprises:
[0010] A to-be-checked data obtaining module is configured to obtain to-be-checked data of a to-be-checked service, the to-be-checked service comprising at least one object, the to-be-checked data comprising to-be-checked content of each object, for each object, the object comprising at least one sub-object, when the object comprises at least two sub-objects, the at least two sub-objects in the object having an order, and the to-be-checked content of the object comprising object content of each sub-object in the object;
[0011] A checking link obtaining module is configured to obtain a checking link corresponding to the to-be-checked service, the checking link being created in the following manner: obtaining reference content of each sub-object in the to-be-checked service, taking each sub-object as a node, if the reference content of two adjacent sub-objects of the same object has an order, creating a directed edge between the nodes corresponding to the two adjacent sub-objects; if the reference content of two sub-objects of the same object does not have an order, creating an undirected edge between the nodes corresponding to the two sub-objects;
[0012] A checking result determining module is configured to, for each sub-object, if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, determine that the checking result of the sub-object is correct; if the object content of the sub-object does not match the reference content of the node corresponding to the sub-object, determine the checking result of the sub-object according to the type of the edge connected to the node corresponding to the sub-object, wherein the type of the edge includes a directed edge or an undirected edge.
[0013] According to still another aspect of the embodiments of the present application, an electronic device is provided, which comprises a memory, a processor and a computer program stored in the memory, the processor executing the computer program to implement the steps of the above method.
[0014] According to still another aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, the computer program being executed by a processor to implement the steps of the above method.
[0015] According to still another aspect of the embodiments of the present application, a computer program product is provided, which comprises a computer program, the computer program being executed by a processor to implement the steps of the above method.
[0016] The technical scheme provided by the embodiments of the present application has the beneficial effects that:
[0017] In the checking method provided by the embodiments of the present application, the business to be checked includes at least one object, each object includes at least one sub-object, and when one object includes at least two sub-objects, the sub-objects have an order relationship. By obtaining the reference content of each sub-object in the business to be checked, taking each sub-object as a node, and creating a checking link corresponding to the business to be checked based on the reference content of each sub-object and the order relationship between the reference content of each sub-object, accurate positioning of each sub-object in the checking link can be realized, which is more expandable and facilitates subsequent updating. For example, when the reference content of each sub-object needs to be updated, the reference content to be updated can be accurately updated, and other sub-objects will not be affected.
[0018] Specifically, when creating the checking link, if the reference content of two adjacent sub-objects of the same object has an order relationship, a directed edge is created between the nodes corresponding to the two adjacent sub-objects; if the reference content of two sub-objects of the same object does not have an order relationship, an undirected edge is created between the nodes corresponding to the two sub-objects. It is realized that whether the reference content of each sub-object in each object in the business to be checked has an order relationship, only one checking link needs to be established, that is, the reference content corresponding to each object only corresponds to one storage result, and each reference content of the object does not need to be enumerated. Correspondingly, the reference content corresponding to one business to be checked also only corresponds to one storage mode, which effectively saves storage space and reduces storage cost.
[0019] For each sub-object, since in the object to which the sub-object belongs, the reference content corresponding to each sub-object may not have an order relationship, that is, as long as the object content of each sub-object in the object can be matched with each reference content respectively, the order relationship between the object content of each sub-object does not need to be limited. When determining the checking result of each sub-object, the object content of the sub-object is matched with the reference content corresponding to the sub-object first, when they are matched, the checking result of the sub-object is directly determined as correct; when they are not matched, based on the type of the edge connected to the node corresponding to the sub-object (i.e. the order relationship between the object content of each sub-object), the checking result of the sub-object is further determined, which can accurately determine the checking result of the sub-object, and realizes the accurate checking process of the business to be checked. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced.
[0021] Figure 1 An implementation environment schematic diagram of a checking method provided by the embodiments of the present application is shown.
[0022] Figure 2 A schematic diagram of an implementation framework of a verification method provided by an embodiment of the present application is shown;
[0023] Figure 3 A schematic diagram of a verification link provided by an embodiment of the present application is shown;
[0024] Figure 4 A schematic diagram of another verification link provided by an embodiment of the present application is shown;
[0025] Figure 5 A schematic diagram of still another verification link provided by an embodiment of the present application is shown;
[0026] Figure 6 A schematic diagram of a verification result provided by an embodiment of the present application is shown;
[0027] Figure 7 A flowchart of a verification method provided by an embodiment of the present application is shown;
[0028] Figure 8 A schematic diagram of elements of a verification link provided by an embodiment of the present application is shown;
[0029] Figure 9 A schematic diagram of still another verification link provided by an embodiment of the present application is shown;
[0030] Figure 10 A schematic diagram of still another verification link provided by an embodiment of the present application is shown;
[0031] Figure 11 A flowchart of still another verification method provided by an embodiment of the present application is shown;
[0032] Figure 12 A schematic diagram of elements of still another verification link provided by an embodiment of the present application is shown;
[0033] Figure 13 A schematic diagram of still another verification link provided by an embodiment of the present application is shown;
[0034] Figure 14 A schematic diagram of a verification device provided by an embodiment of the present application is shown;
[0035] Figure 15 A schematic diagram of a structure of an electronic device to which an embodiment of the present application is applied is shown. DETAILED DESCRIPTION
[0036] The embodiments of the present application will be described below in conjunction with the drawings. It should be understood that the embodiments described below in conjunction with the drawings are exemplary descriptions of the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0037] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein include plural forms, unless specifically stated otherwise. It should be further understood that the terms "include" and "contain" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the present technology. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or can mean that the element and the other element establish a connection relationship through an intermediate element. In addition, "connection" or "coupling" used herein can include wireless connection or wireless coupling. The term "and / or" used herein indicates that at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".
[0038] In order to make the purposes, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below in conjunction with the drawings.
[0039] The terms and related technologies involved in the present application are described below:
[0040] Figure: composed of vertices (i.e. nodes) and edges (i.e. directed edges or undirected edges).
[0041] Path: in a graph, if a node can be reached from another node along the arrow direction of the edge between the two nodes, then the path from one of the two nodes to the other node formed by the edge between the two nodes is a path in the graph. Taking the question in the test as an example, if the two adjacent questions correspond to nodes A and B respectively, and if a node can be reached from another node along the arrow direction of the edge between the two nodes, then the path formed by the edge between the two nodes is a path, which can be represented as A->B.
[0042] Correction (i.e. checking): the process of comparing and judging the object content of an object with the reference content of the object. Taking the question in the test as an example, the process of comparing and judging the answer (i.e. the content to be checked, the actual answer) of the user to the question with the reference answer (i.e. the standard answer) of the question can be regarded as the correction process.
[0043] Directed & : For any two nodes, if there is a sequence between the reference contents of the two nodes (i.e. there is an order between the two nodes), the path formed by the two nodes and the directed & (symbolized as ->) can be connected. When the two nodes are connected by the directed &, the path (edge) formed can also be referred to as a directed edge. Taking the question in the test as an example, if the two adjacent questions correspond to nodes A and B respectively, and there is a sequence between the reference answer of node A and the reference answer of node B, the reference answer of node A is in front and the reference answer of node B is in back, the path formed by the two can be represented as A->B, i.e. there is a directed edge between A and B.
[0044] Undirected & : For any two nodes, if there is no sequence between the reference contents of the two nodes (i.e. there is no order between the two nodes), the path formed by the two nodes and the undirected & (symbolized as <=>, i.e. ) can be connected. When the two nodes are connected by the undirected &, the path (edge) formed can also be referred to as an undirected edge. Taking the question in the test as an example, if the two adjacent questions correspond to nodes A and B respectively, and there is no sequence between the reference answer of node A and the reference answer of node B, the path formed by the two can be represented as , i.e. A<=>B, i.e. there is an undirected edge between A and B.
[0045] Item: When an object corresponds to one reference content, the reference content of the object is represented as an item. When an object corresponds to two reference contents, each item of the reference content of the object is represented as an item. Taking the question in the test as an example, if the reference answer of question A is a and b, the reference answer of the question A includes two items.
[0046] Correction chain (i.e. check link): according to the relationship between the reference contents of an object, the reference contents of the object are connected in series to form a chain, which is a correction chain, also known as a correction diagram, a diagram link.
[0047] In correcting the test questions, based on the way of generating reference answers in related technologies, the reference answers of each question in the test questions are usually generated in an enumerated answer manner based on the question type of each question in the test questions. In correcting the answer of the test questions, a single string comparison method is usually used to compare each enumerated answer with the answer one by one, and the correction result is obtained based on the comparison result.
[0048] However, based on the above manner, when the reference answers of the questions in the test question are generated in the manner of enumerating answers, for the questions with multiple reference answers without order, multiple different answers are usually enumerated, and the complexity is relatively high when the answers are generated and stored, and higher human cost and storage cost are required. Moreover, due to the large number of enumerated answers, accurate correction cannot be realized, and it is difficult to locate the error content. When the existing reference answers in a question need to be adjusted, all the enumerated answers need to be modified, the compatibility is relatively low, and the actual demand cannot be met. In view of this, the embodiment of the present application provides a checking method, device, electronic equipment, computer readable storage medium and computer program product to solve the above problems.
[0049] The execution subject of the checking method provided in the embodiment of the present application can be a checking device. The checking device can be a terminal or a server, and the checking device can obtain a checking result of a to-be-checked service based on to-be-checked data of the to-be-checked service and a checking link corresponding to the to-be-checked service. The checking method can also be realized by a processor calling computer readable instructions stored in a memory.
[0050] The terminal (which can also be referred to as a user terminal or a user equipment (UE)) described above can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart voice interaction device (for example, a smart speaker), a wearable electronic device (for example, a smart watch), a vehicle-mounted terminal, a smart home appliance (for example, a smart television), an AR (Augmented Reality) device / Virtual Reality (VR) device, and the like.
[0051] The server described above can be a stand-alone physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server or a server cluster providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Networks), and basic cloud computing services such as big data and artificial intelligence platforms.
[0052] Those skilled in the art should understand that the terminal and the server described above are only examples, and other existing or future terminal or server, such as the terminal or server applicable to the present application, should also be included in the protection scope of the present application, and is hereby included by reference.
[0053] The data processing method provided in the embodiments of the present application can be implemented based on big data. The big data refers to a data set that cannot be captured, managed and processed by conventional software tools within a certain time range, and is a mass, high-growth and diversified information asset that needs new processing modes to have stronger decision-making, insight discovery and process optimization capabilities. With the advent of the cloud era, big data has attracted more and more attention, and big data needs special technology to effectively process a large amount of data over time. The technology suitable for big data includes a large-scale parallel processing database, data mining, a distributed file system, a distributed database, a cloud computing platform, the Internet and a scalable storage system.
[0054] The verification method provided in the embodiments of the present application can also be implemented based on cloud technology. For example, the creation process of the verification link and the process of obtaining the verification result of the to-be-verified service in the embodiments of the present application can be implemented by using cloud technology. The cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data.
[0055] Cloud storage is a new concept extended and developed on the basis of the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that cooperatively works together to provide data storage and service access functions by using functions such as cluster application, grid technology and distributed storage file system to collect a large number of storage devices (storage nodes) of various types in the network through application software or application interface. For example, the verification links for different to-be-verified services in the embodiments of the present application can be stored by using cloud storage technology.
[0056] The verification method provided in the embodiments of the present application can be applied to any application scenario that needs to verify the to-be-verified service, and the to-be-verified service is not limited in the embodiments of the present application, and can include but is not limited to services that need to be verified in industries such as tax, retail and education. For example, taking the education industry as an example, the to-be-verified service can be a test question.
[0057] It should be noted that in the optional embodiments of the present application, the data related to the object (for example, a user) involved in the to-be-verified service and the verification link needs to be authorized or agreed by the object when the above embodiments of the present application are applied to specific products or technologies, and the collection, use and processing of the related data need to comply with the relevant laws, regulations and standards of the country and region. That is, if the data related to the object is involved in the embodiments of the present application, these data need to be obtained under the condition that the object authorizes and agrees, and complies with the relevant laws, regulations and standards of the country and region.
[0058] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0059] To facilitate understanding of the application value of the verification method provided in this application embodiment, the verification method will be described below with reference to a specific application scenario embodiment.
[0060] Figure 1 This diagram illustrates an implementation environment for a verification method provided in an embodiment of this application. For example... Figure 1 As shown, the implementation environment includes a first terminal 101, a second terminal 102, and a server 103. The server 103 may be configured with a database storing reference content for each service to be verified, the relationships between the reference content for each service, and the verification link corresponding to each service. The first terminal 101 and the server 103, and the second terminal 102 and the server 103, can be directly or indirectly connected via wired or wireless communication, but are not limited thereto. The specific connection can be determined based on the actual application scenario requirements, and this embodiment does not impose any limitations.
[0061] This application embodiment does not limit the number of first terminals 101 and second terminals 102, and can determine them according to actual circumstances. Taking the final exam questions for class x as an example, when there are multiple subjects, the number of first terminals 101 can be the terminals corresponding to the teachers of each subject. The number of second terminals 102 can be the number of students in class x. That is, the first terminal 102 corresponding to each teacher and the second terminal 102 corresponding to each student can connect to the server 103.
[0062] In the specific implementation process, the first terminal 101 can obtain the reference content for each service to be verified and the correlation between the reference content of each service based on the first user's trigger operation on the submission control on the display interface of the first terminal 101. The first terminal 101 then sends the reference content for each service to be verified and the correlation between the reference content to each service to the server 103. This allows the server 103 to generate a verification link corresponding to each service to be verified based on the reference content for each service and the correlation between the reference content to each service. For example, taking the service to be verified as a test question, after the first user sets the reference content for each service to be verified and the correlation between the reference content to each service, they can trigger the submission control to start the creation process of the verification link for the current service to be verified.
[0063] The second terminal 102 can obtain the object content of each sub-object in each business to be verified based on the second user's trigger operation of the submission control on the display interface of the second terminal 102, and send the object content of each sub-object in each business to be verified to the server 103. The server 103 then obtains the verification link corresponding to the current business to be verified based on the object content of each sub-object in the current business to be verified, verifies the object content of each sub-object in the current business to be verified, and feeds back the verification result to the second terminal 102. For example, taking the business to be verified as a test question, after the second user completes the answering process for the test question, they can trigger the submission control to start the grading process for the test question and obtain the corresponding grading result.
[0064] Figure 2 A schematic diagram illustrating the implementation framework of a verification method provided in an embodiment of this application is shown. Wherein, Figure 2 This explanation uses the business items to be verified as test questions, and examines the process of verifying the user's answers as an example. For example... Figure 2 As shown, the implementation framework of the verification method mainly includes two parts: the generation of correction rules (i.e., verification link, graph link, correction link) and the path correction algorithm (i.e. verification process).
[0065] The step of generating grading rules includes the following steps:
[0066] A1: For each test question, user A (e.g., a teacher) edits the reference answer to the test question on their corresponding terminal and sets the relationship between the reference answers of each question in the test question.
[0067] A2: The server obtains the association relationship between the reference answer of the test question edited by user A and the reference answer set for each question, and generates the correction rule corresponding to the test question according to the association relationship between the reference answer of the test question and the reference answer of each question. The generation process of the correction rule corresponding to the test question specifically includes:
[0068] In each set of test questions, each question can include one blank or multiple blanks, and each blank corresponds to one or more reference answers. Each blank is regarded as a node, and when one blank corresponds to multiple reference answers, the reference answers corresponding to the blank can be connected by using logical symbols such as AND, OR, and NOT. The blanks can be connected by directed AND or undirected AND to form edges. Thus, the correction rule corresponding to the test question is constructed according to the reference answers corresponding to each blank and each connection symbol (i.e., the logical symbols, directed AND, or undirected AND).
[0069] For example, the first question is “The Four Great Inventions of China”, and there is no order among the Four Great Inventions of China, that is, there is no order relationship among the four blanks corresponding to the question. Based on the above method of constructing the correction rule, the following correction rule can be obtained: Figure 3 For example, the first question is “The Four Great Inventions of China”, and there is no order among the Four Great Inventions of China, that is, there is no order relationship among the four blanks corresponding to the question. Based on the above method of constructing the correction rule, the following correction rule can be obtained: Figure 4 wherein each blank corresponds to a position. The second question is “Order by time: yesterday, the day before yesterday, tomorrow, today”, and there is a time order among the four time words, that is, there is an order relationship among the four blanks corresponding to the question. Based on the above method of constructing the correction rule, the following correction rule can be obtained: Figure 5 wherein each blank corresponds to a position.
[0070] Step A3: The correction rules corresponding to each test question are serialized (for example, converted into a JSON (Java Script Object Notation, JS object notation) string or binary), and the serialized data is stored in the database.
[0071] The channel correction algorithm (i.e., the checking process) includes the following steps:
[0072] B1: The server obtains the actual answer (i.e., the answer to be checked) of user B (such as a student) to the test question (i.e., the target test question), and obtains the correction rule of the target test question from the database corresponding to the target test question based on the received identification of the target test question (which can be the name of the test question, for example, x class final exam test question).
[0073] B2: Based on the channel correction algorithm, the correction result corresponding to each blank in the test question is determined in sequence. Specifically:
[0074] For each blank in the target test question, if there is a reply answer for the blank, according to the identifier of the blank (which can be the position of the blank in the target test question, for example, the fifth question third blank), the node corresponding to the blank is found from the graph link. The reply answer of the blank and the reference answer of the node corresponding to the blank are matched, if they match, it indicates that the reply answer of the blank is correct. If they do not match, and the node corresponding to the blank is connected with a directed edge, the reply answer of the blank and the reference answer of the other node corresponding to the directed edge are matched, if they match, it indicates that the reply answer of the blank is correct.
[0075] If they do not match, and the other node is also connected with other directed edges except the directed edge, the above process is continued. If the reference answer of the node matching the reply answer of the blank is found, it indicates that the reply answer of the blank is correct. If the node connected with the directed edge is found based on the above process, and the reference answer of the node matching the reply answer of the blank is not found, it indicates that the reply answer of the blank is incorrect.
[0076] For the first question, the actual answer is obtained: "printing", "papermaking", "gunpowder", "compass". Figure 3 Taking the question shown as an example, the grading process of the question is:
[0077] Among them, in combination with Figure 4 The grading process for the first question is:
[0078] The actual answer of the first question is obtained: "printing", "papermaking", "gunpowder", "compass".
[0079] The grading method for the first blank: No. 1 position (corresponding node) starts to find, the actual answer "printing" of the first blank does not match the reference answer "papermaking" of No. 1 position, continue to find along the unordered arrow direction, it can be determined that the actual answer "printing" of the first blank matches the reference answer "printing" of No. 4 position, that is, the reference answer matching the actual answer of the first blank can be found at No. 4 position, indicating that the answer of the first blank is correct.
[0080] The grading method for the second blank: start from No. 2 position, the actual answer "papermaking" of the second blank does not match the reference answer "compass" of No. 2 position, continue to find along the unordered arrow direction, it can be determined that the actual answer "papermaking" of the second blank matches the reference answer "papermaking" of No. 1 position, that is, the reference answer matching the actual answer of the second blank can be found at No. 1 position, indicating that the answer of the second blank is correct.
[0081] The grading method for the third blank: start from No. 3 position, the actual answer "gunpowder" of the third blank matches the reference answer "gunpowder" of No. 3 position, indicating that the answer of the third blank is correct.
[0082] The fourth empty correction mode: starting from the 4th position, the actual answer "compass" of the fourth empty does not match the reference answer "printing" of the 4th position, continue to search along the disordered arrow direction, it can be determined that the actual answer "compass" of the fourth empty matches the reference answer "compass" of the 2nd position, that is, the reference answer consistent with the actual answer of the fourth empty can be found in the 2nd position, indicating that the answer of the fourth empty is correct.
[0083] In summary, the final correction result of the first question is correct.
[0084] Among them, in combination with Figure 5 The correction process for the second question is:
[0085] The actual answer of the second question is: "yesterday", "the day before yesterday", "today", "tomorrow"
[0086] The first empty correction mode: starting from the 1st position, the actual answer "yesterday" of the first empty does not match the reference answer "the day before yesterday" of the 1st position, there is no disordered arrow path, indicating that the answer of the first empty is wrong.
[0087] The second empty correction mode: starting from the 2nd position, the actual answer "the day before yesterday" of the second empty does not match the reference answer "yesterday" of the 2nd position, there is no disordered arrow path, indicating that the answer of the second empty is wrong.
[0088] The third empty correction mode: starting from the 3rd position, the actual answer "today" of the third empty matches the reference answer "today" of the 3rd position, and the actual answer matches, indicating that the answer of the third empty is correct.
[0089] The fourth empty correction mode: starting from the 4th position, the actual answer "tomorrow" of the fourth empty matches the reference answer "tomorrow" of the 4th position, indicating that the answer of the fourth empty is correct.
[0090] In summary, since the requirement of the second question is to sort according to the time sequence, one empty error indicates that the whole question is wrong, therefore, the final correction result of the second question is wrong.
[0091] The above-mentioned Figure 3 The correction process of the question shown in the program running diagram as Figure 6 .
[0092] It should be noted that for each empty in the target test question, if there is no reply answer for the empty, the reply answer for the empty is directly determined to be wrong.
[0093] Based on the above-mentioned mode, it can be determined whether the reply answer of each empty in the target test question is correct, and the correction process of the test question for the user is realized.
[0094] The number of correct empty answers of the reply answer can also be counted, and the reply score of the current user for the test question can be counted based on the score corresponding to each correct empty answer of the reply answer.
[0095] B3: The server sends the number of correct empty answers of the reply answer and the reply score to the terminal as the reply result of the user for the test question for display.
[0096] The technical solutions of the embodiments of the present application and the technical effects generated by the technical solutions of the present application will be described below through the description of several exemplary embodiments. It should be pointed out that the following embodiments can be mutually referenced, borrowed or combined, and the same terms, similar features and similar implementation steps in different embodiments will not be repeatedly described.
[0097] Figure 7 A flowchart of a checking method provided by an embodiment of the present application is shown. The checking method can be implemented based on the above checking device, as shown in the flowchart, the method comprises the following steps. Figure 7
[0098] Step S710: Obtain the to-be-checked data of the to-be-checked service, the to-be-checked service comprising at least one object, the to-be-checked data comprising the to-be-checked content of each object, for each object, the object comprising at least one sub-object, when the object comprises at least two sub-objects, the at least two sub-objects in the object having an order relationship, and the to-be-checked content of the object comprising the object content of each sub-object in the object.
[0099] Step S720: Obtain the checking link corresponding to the to-be-checked service, the checking link being created based on the reference content of each sub-object and the order relationship between the reference contents, and the creation manner comprising the following steps.
[0100] Obtain the reference content of each sub-object in the to-be-checked service, take each sub-object as a node, if the reference contents of two adjacent sub-objects of the same object have an order relationship, create a directed edge between the nodes corresponding to the two adjacent sub-objects; if the reference contents of two sub-objects of the same object do not have an order relationship, create an undirected edge between the nodes corresponding to the two sub-objects.
[0101] For each node, the reference content of the node can include one or more reference sub-contents, which can be determined according to actual conditions, and embodiments of the present application do not limit this. When the reference content of the node includes multiple reference contents, the reference sub-contents can be connected by a logical symbol, and the formed reference content can be regarded as a reference sub-content group, that is, the reference content of a node can be a reference sub-content or a reference sub-content group. The logical symbol can include, but is not limited to, symbols representing logical relationships such as and, or, and not. For example, taking a business to be processed as a set of test questions, the test questions include question A and question B, and question A and question B are an object respectively. The reference content of the node corresponding to question A can be represented as a1 and a2, and the reference content of the node corresponding to question B can be represented as (b1 or b2) and b3. For question A, the reference content of the node corresponding to the question A includes two items, which are a1 and a2 respectively.
[0102] For each node, the node corresponds to a matching identifier and a state identifier. The matching identifier represents that there is object content matching the reference content of the node or there is no object content matching the reference content of the node. The state identifier represents that the reference content of the node has been matched or has not been matched. In case of multiple sub-objects in an object, a matching confusion state may occur.
[0103] In this implementation, a directed edge is created between the nodes corresponding to two adjacent sub-objects, that is, the nodes corresponding to the two adjacent sub-objects are connected by a directed edge. An undirected edge is created between the nodes corresponding to two sub-objects, that is, the nodes corresponding to the two adjacent sub-objects are connected by an undirected edge. That is, the nodes are connected by a directed edge or an undirected edge. If there is also a logical relationship between the reference contents of the nodes in an object, the nodes in the object can also be connected by a logical symbol. Since each sub-object can be regarded as a node when an object includes multiple sub-objects, the object can be regarded as a node group.
[0104] Since there is often a sequence relationship between the objects in the to-be-checked business in general, a directed edge can be established between the objects in the checking link corresponding to the to-be-checked business.
[0105] And in combination with the above, one node (one object includes one sub-object) or one node group (i.e., one object includes at least two sub-objects, each sub-object corresponding to the node group formed by the combination) can be included on the checking link, and in each node group, the nodes are connected by directed and or undirected and. The reference content of each node corresponds to one reference sub-content (i.e., a single element) or multiple reference sub-contents (i.e., multiple elements), and when one node corresponds to multiple elements, the elements are connected by logical symbols, such as the reference answer (a1 and a2) of question A. Among them, each element corresponds to a value (i.e., the reference answer itself), a state identifier, a matching identifier, and in the case of an element including multiple values, the values can be connected by logical symbols. Based on this, it can be determined that each element in the checking link can be as Figure 8 shown.
[0106] For a clearer indication, an example can be combined for illustration, as Figure 9 shown, the reference answer of node H corresponds to element h1 and element h2, element h1 and element h2 are connected by logical symbols, the reference answer of node I corresponds to element i1, and the reference answer of node J corresponds to element j1, wherein node H and node I are connected by undirected and, and node I and node J are connected by directed and.
[0107] Taking questions A and B in the above set of test questions as an example, the checking link corresponding to the test question can be represented as (a1 and a2)->(b1 or b2)and b3.
[0108] As an example, in an object (such as the first question shown in Figure 3 to Figure 4 ), there are 4 sub-objects (i.e., 4 blanks), and each sub-object corresponds to a reference content (i.e., an element), so by taking each sub-object as a node and the reference content of each node as an element, we can get Figure 10 . Among them, the reference content of node x is element X, the reference content of node y is element Y, the reference content of node z is element Z, and the reference content of node u is element U. And node x is connected to node y, node z and node u by undirected edges, node y is also connected to node z and node u by undirected edges, and node z is also connected to node u by undirected edges.
[0109] As can be seen, when there are 4 corresponding reference answers in an object in the form of unordered sub-objects, if the exhaustive method is used, 24 reference answers need to be exhausted and stored. Based on the technical solution provided in the embodiments of the present application, the reference answer of the object can be represented by the ring link shown in Figure 10 , and only Figure 10The illustrated ring link is just fine. Obviously, the way of creating the checking link provided by the embodiments of the present application can not only greatly reduce the storage cost, but also make the reference answers of each object more intuitive and visual.
[0110] In the embodiments of the present application, the checking links corresponding to each to-be-checked service can be serialized, and the serialized data is stored in a preset storage space in association with the service identifier of each to-be-checked service. The serialization manner can include, but is not limited to, conversion into a JSON (Java Script Object Notation, JS object notation) string or binary, and the embodiments of the present application do not limit this. The preset storage space can be a local storage space or a cloud storage space, and the embodiments of the present application do not limit this. Regardless of the manner of the preset storage space, a mysql (a kind of database) or redis (a kind of database) can be used for storage.
[0111] Step S730: For each sub-object, if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, it is determined that the checking result of the sub-object is correct; if the object content of the sub-object does not match the reference content of the node corresponding to the sub-object, the checking result of the sub-object is determined according to the type of the edge connected to the node corresponding to the sub-object, wherein the type of the edge includes a directed edge or an undirected edge.
[0112] Taking the above subject A as an example, since a1 and a2 are connected by the logical symbol and (i.e., "and") in the reference content of the node corresponding to the subject A, it is indicated that only in the case that the answer (i.e., the object content) of the subject A is a1 and a2, it is indicated that the answer of the subject A matches the reference answer of the node corresponding to the subject A, and the answer of the subject A is correct.
[0113] In a possible implementation, for each sub-object, if the reference content of the node corresponding to the sub-object includes at least two reference sub-contents, and the at least two reference sub-contents are connected by a second logical symbol, the above-mentioned if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, it is determined that the checking result of the sub-object is correct, can include:
[0114] Based on the above-mentioned at least two sub-contents, the second logical symbol, and the object content of the sub-object, a matching result of the object content of the sub-object and the reference content of the node corresponding to the sub-object is determined; when the matching result is matching, it is indicated that the checking result of the sub-object is correct.
[0115] With the above example of question B, since in the reference content of the node corresponding to question B, bl and b2 are connected by the logical symbol or (i.e., "or"), either one of the two is sufficient, b3 is connected with (bl or b2) by the logical symbol and, which indicates that in the case that the answer (i.e., the object content) of the question B is any one of "bl and b3" or "b2 and b3", the answer of the question B can match the reference answer of the node of the question B, and the answer of the question B is correct.
[0116] In the above case where there are four unordered sub-objects corresponding to the reference answers in an object, in the process of determining the checking result of the sub-objects, the checking content of the object needs to be compared with the 24 reference answers generated by enumeration one by one until the reference answer identical to the checking content of the object is found in the 24 reference answers, and when there is only a sub-object with partial errors in the object, the position of the sub-object with errors cannot be accurately determined by the scheme. By using the scheme for determining the checking result provided in the embodiments of the present application, the checking process can be accelerated, and the specific position of the error can be accurately determined, which facilitates the subsequent modification process and realizes accurate checking of the business to be checked.
[0117] As described above for the second question Figure 3 , Figure 5 and Figure 6 , even if the overall correction result of the second question is incorrect, it can be accurately determined that the first blank and the second blank are incorrect, and the third blank and the fourth blank are correct during the correction process.
[0118] As can be seen, in the checking method provided in the embodiments of the present application, by creating the checking link corresponding to the business to be checked based on the reference content of each sub-object and the association relationship between each sub-object, each sub-object can be accurately positioned in the checking link, which has stronger scalability and facilitates subsequent updating. It is also achieved that whether the reference content of each sub-object in each object in the business to be checked is in order or not, only one checking link needs to be established, which effectively saves storage space and reduces storage cost. Moreover, by using the node comparison method to check the business to be checked, the checking process can be accelerated, and the specific position of the error can be accurately determined, which facilitates the subsequent modification process and realizes accurate checking of the business to be checked.
[0119] In a possible implementation manner, the above determining the checking result of the sub-object according to the type of the edge connected to the node corresponding to the sub-object can include:
[0120] If the edge connected to the node corresponding to the sub-object is a directed edge, the checking result of the sub-object is determined to be incorrect.
[0121] If the edge connected to the node corresponding to the sub-object is a directed edge, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of another node connected to the directed edge.
[0122] Since the reference contents of the sub-objects are unordered, i.e., the edges connected to the nodes corresponding to the sub-objects are undirected edges, when checking the object, it is only required to ensure that the object contents of the sub-objects in the object are consistent with the reference contents of the object itself, without limiting the order between the sub-objects. Since the reference contents of the sub-objects are ordered, i.e., the edges connected to the nodes corresponding to the sub-objects are directed edges, when checking the object, it is not only required to ensure that the object contents of the sub-objects in the object are consistent with the reference contents of the object itself, but also required to determine whether the order between the sub-objects is correct.
[0123] By setting that if the object content of a sub-object does not match the reference content of the node corresponding to the sub-object, and the edge connected to the node corresponding to the sub-object is a directed edge, the checking result of the sub-object is directly determined as incorrect, the sub-objects can be accurately corrected when the reference contents of the sub-objects are ordered.
[0124] By setting that if the object content of a sub-object does not match the reference content of the node corresponding to the sub-object, and the edge connected to the node corresponding to the sub-object is an undirected edge, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of another node connected to the undirected edge, the unordered nature between the sub-objects can be considered, and the object contents of the sub-objects can be more accurately checked, so as to avoid the case that the checking result of the sub-object is directly determined as incorrect when the object content of the sub-object does not match the reference content of the node corresponding to the sub-object.
[0125] In a possible implementation, the above determining the checking result of the sub-object according to the object content of the sub-object and the reference content of another node connected to the undirected edge can include:
[0126] If the node corresponding to the sub-object is connected to at least two undirected edges, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of another node connected to any of the at least two undirected edges.
[0127] By setting that if the object content of a sub-object does not match the reference content of the node corresponding to the sub-object, and the node corresponding to the sub-object is connected to at least two undirected edges, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of another node connected to each of the undirected edges, the object contents of the sub-objects can be more accurately checked.
[0128] In a possible implementation, the determining the checking result of the sub-object according to the object content of the sub-object and the reference content of another node connected by any of the at least two undirected edges can include the following steps.
[0129] For any of the at least two undirected edges, if the object content of the sub-object does not match the reference content of another node connected by the undirected edge, and the another node is connected by other undirected edges except the undirected edge, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of other nodes connected by the other undirected edges, and the other nodes are nodes connected by the other undirected edges except the another node.
[0130] By setting that the object content of a sub-object does not match the reference content of a node corresponding to the sub-object, and the object content of the sub-object does not match the reference content of another node connected by an undirected edge connected to the sub-object, the object content of the sub-object is matched with the reference content of other nodes connected by other undirected edges connected to the another node, that is, the object content of the sub-object is matched with the reference content of other nodes of the object to which the sub-object belongs in sequence, and the checking process of the object content of the sub-object is accurately implemented.
[0131] In a possible implementation, for each node, the node corresponds to a matching identifier and a state identifier, the matching identifier indicates that there is object content matching the reference content of the node or there is no object content matching the reference content of the node, and the state identifier indicates that the reference content of the node has been matched or has not been matched.
[0132] The determining the checking result of the sub-object according to the object content of the sub-object and the reference content of another node connected by the undirected edge can include the following steps.
[0133] If the matching identifier of the another node indicates that there is no object content matching the reference content of the another node, and the state identifier of the another node indicates that the reference content of the another node has not been matched, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of the another node.
[0134] In each of the corelation links, for the sub-corelation link corresponding to an object, if the match identifier of one of the nodes indicates that there is object content matching the reference content of the node, and the state identifier of the node indicates that the reference content of the node has been matched, then the reference content of the node is no longer matched with the object content of any sub-object. If the match identifier of one of the nodes indicates that there is no object content matching the reference content of the node, and the state identifier of the node indicates that the reference content of the node has not been matched, then the reference content of the node can be matched with the object content of other sub-objects.
[0135] In determining the corelation result of a sub-object, if in the sub-corelation link of the object to which the sub-object belongs, the match identifiers of all the nodes involved in the respective nodes corresponding to the respective undirected edges of the node indicate that there is no object content matching the reference content of the node, and the state identifiers of the nodes indicate that the reference content of the node has been matched, then the corelation result of the object content of the sub-object is directly determined as incorrect.
[0136] By setting the match identifier, the same reference sub-content can be avoided from being repeatedly matched, and problems such as an increase in the error rate of the matching result due to repeated matching can be avoided. By setting the state identifier, the state of each reference sub-content being matched in the process of matching a node can be determined, and problems such as repeatedly matching the object content of the sub-object corresponding to the node with the same reference content and falling into a dead loop can be avoided.
[0137] Based on the above method, the following will describe the path correction algorithm for correcting the to-be-corelated business by means of specific embodiments: Figure 11
[0138] Step C1: setting all the nodes on the corelation link corresponding to the to-be-corelated business to an unsearched state;
[0139] Step C2: determining the node corresponding to each sub-object, and matching the object content of each sub-object with the reference content of the node corresponding to the sub-object;
[0140] Step C3: if the matching result is match, setting the state identifier of the node to indicate that the reference content of the node has been matched, and performing an and-or-not operation on the basis of the respective reference sub-contents in the reference content of the node and the logical symbols between the respective reference sub-contents, to finally determine whether the node is correct (i.e., the corelation result of the sub-object is correct or incorrect);
[0141] Step C4: if the matching result is not match, searching for the nodes with paths (i.e., determining the other node in the undirected edge corresponding to the node, the other nodes in the other undirected edges, etc.) one by one along the unordered arrow direction to the left and right.
[0142] In the process of finding the nodes with existing paths one by one, each found node is taken as a node corresponding to the sub-object, the object content of each sub-object is matched with the reference content of the node corresponding to the sub-object, and the above process is repeated. If the two ends of the left and right edges to the correction chain (i.e., the nodes in each path are determined not to have nodes connected by undirected edges), it is determined that the check result of the sub-object is not found, and it is judged that the check result of the sub-object is incorrect.
[0143] In a possible implementation, for each object, if the object includes at least one sub-object pair, the two sub-objects in each sub-object pair have an order, and the two sub-objects in each sub-object pair correspond to nodes as a node group respectively, the creation manner of the check link can further include:
[0144] creating a directed edge between the two nodes in each node group;
[0145] If the object includes at least two sub-object pairs, the creation manner of the check link can further include:
[0146] creating an undirected edge between the node groups corresponding to the at least two sub-object pairs in the object respectively.
[0147] In the implementation, a sub-object pair indicates that the reference content of any sub-object in the sub-object pair is another sub-object outside the sub-object in the sub-object pair. Since each sub-object corresponds to a node, for each object, the object can be set as a node group. Since there is no order between any two sub-object pairs, an undirected edge can be created between any two sub-object pairs.
[0148] Taking a matching question with an object as an example, for example, the reference answer of the object is that 1 is connected with A and 2 is connected with B, and the reference answer of the object can be set as: node group (1->A)<=>(2->B).
[0149] In the above manner, the creation process of the check link corresponding to each object can be realized according to the type of each object.
[0150] In a possible implementation, for each node group, if the reference content of any node in the node group is realized by a first logical symbol and the reference content of another node in the node group, for the sub-object corresponding to the any node, the determination that the check result of the sub-object is correct if the object content of the sub-object and the reference content of the node corresponding to the sub-object are matched can include:
[0151] determining the reference content of the any node based on the first logical symbol and the reference content of the another node in the node group;
[0152] If the object content of the sub-object matches the reference content of the any node, it is determined that the checking result of the sub-object is correct.
[0153] In the implementation, the first logical symbol can include but is not limited to symbols representing logical relations such as and, or, and not, and the embodiments of the present application do not limit this.
[0154] When the reference content of any two nodes is in a logical relation, the two nodes are taken as a node group, and after the reference content of one node is determined, based on the logical relation between the reference content of the node and the reference content of another node, and the reference content of the node representing the reference content of another node, certain storage space can be saved.
[0155] When the reference content of any node in the node group is realized by the first logical symbol and the reference content of another node in the node group, the reference content of the node is first determined based on the first logical symbol and the reference content of another node, and based on the object content of the sub-object corresponding to the node and the determined reference content, the object content of the sub-object corresponding to the node can be accurately checked.
[0156] As an example, in the case of a large question to be checked, if there are four small questions in the large question, the first small question (object) has two blanks (sub-objects), the reference answer corresponding to the first blank is A, the reference answer corresponding to the second blank is B, and there is an order between the first blank and the second blank, from the first blank to the second blank. The second small question has only one blank, but the reference answer corresponding to the blank is any one of C and D, i.e. C or D. The reference answer of the third small question is E, and E and F are mutually exclusive in the reference answers of the third small question and the fourth small question, i.e. the answer of the fourth small question is non-E and F.
[0157] Based on the above question, as shown in the following table, the business to be checked is taken as a correction chain, each small question is taken as a node group, each blank is taken as a node, and each item of reference sub-content corresponding to each node is taken as an element, and a specific correction chain as shown in the following table can be constructed. Figure 12 Figure 13
[0158] As shown in the following table, the reference content of each node is determined based on the logical relation between the reference content of the node and the reference content of another node in the node group, and the reference content of the node representing the reference content of another node. Figure 13 As shown, the first sub-question corresponds to node group 1, the two blanks in the first sub-question correspond to node 1 and node 2 respectively, node 1 and node 2 are connected through a directed edge, the reference answer of node 1 is element A, and the reference answer of node 2 is element B. The second sub-question corresponds to node group 2, the blank in the second sub-question corresponds to node 3, and the reference answer of node 3 is element C or element D. The third sub-question corresponds to node group 3, the blank in the third sub-question corresponds to node 4, and the reference answer of node 4 is element E. The fourth sub-question corresponds to node group 4, the blank in the fourth sub-question corresponds to node 5, and the reference answer of node 5 is non-element E and element F. Node group 1 and node group 2 are connected through a directed edge, node group 2 and node group 3 are connected through a directed edge, and node group 3 and node group 4 are connected through an undirected edge.
[0159] Based on the same principle as the checking method provided in the embodiments of the present application, a checking device is also provided in the embodiments of the present application. Figure 14 A schematic diagram of a checking device provided in the embodiments of the present application is shown. As shown in the figure, the device 140 includes: Figure 14
[0160] A to-be-checked data obtaining module 141 is configured to obtain to-be-checked data of a to-be-checked service, the to-be-checked service including at least one object, the to-be-checked data including to-be-checked content of each object, for each object, the object including at least one sub-object, at least two sub-objects in the object having an order relationship, and the to-be-checked content of the object including object content of each sub-object in the object;
[0161] A checking link obtaining module 142 is configured to obtain a checking link corresponding to the to-be-checked service, the checking link being created in the following manner: obtaining reference content of each sub-object in the to-be-checked service, taking each sub-object as a node, creating a directed edge between nodes corresponding to two adjacent sub-objects of the same object if the reference content of the two adjacent sub-objects has an order relationship, and creating an undirected edge between nodes corresponding to two sub-objects of the same object if the reference content of the two sub-objects does not have an order relationship;
[0162] A checking result determining module 143 is configured to, for each sub-object, determine a checking result of the sub-object as correct if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, and determine the checking result of the sub-object according to a type of an edge connected to the node corresponding to the sub-object if the object content of the sub-object does not match the reference content of the node corresponding to the sub-object, wherein the type of the edge includes a directed edge or an undirected edge.
[0163] In a possible implementation, when determining the check result of the sub-object according to the type of the edge connected to the node corresponding to the sub-object, the check result determination module 143 can be specifically configured to:
[0164] If the edge connected to the node corresponding to the sub-object is a directed edge, the check result of the sub-object is determined as incorrect.
[0165] If the edge connected to the node corresponding to the sub-object is an undirected edge, the check result of the sub-object is determined according to the object content of the sub-object and the reference content of another node connected to the undirected edge.
[0166] In a possible implementation, for each object, if the object includes at least one sub-object pair, the two sub-objects in each sub-object pair have an order, and the two nodes corresponding to each sub-object pair are taken as a node group, the creation manner of the check link can further include:
[0167] A directed edge is created between the two nodes in each node group.
[0168] If the object includes at least two sub-object pairs, the creation manner of the check link can further include:
[0169] An undirected edge is created between the node groups corresponding to the at least two sub-object pairs in the object.
[0170] In a possible implementation, for each node group, if the reference content of any node in the node group is implemented by a first logical symbol and the reference content of another node in the node group, for the sub-object corresponding to the any node, when the object content of the sub-object matches the reference content of the node corresponding to the sub-object, the check result determination module 143 can be specifically configured to:
[0171] The reference content of the any node is determined based on the first logical symbol and the reference content of another node in the node group.
[0172] If the object content of the sub-object matches the reference content of the any node, the check result of the sub-object is determined as correct.
[0173] In a possible implementation, for each sub-object, if the reference content of the node corresponding to the sub-object includes at least two reference sub-contents, and the at least two reference sub-contents are connected by a second logical symbol, when the object content of the sub-object matches the reference content of the node corresponding to the sub-object, the check result determination module 143 can be specifically configured to:
[0174] determining a matching result of the object content of the sub-object and the reference content of the node corresponding to the sub-object based on the at least two sub-contents, the second logical symbol and the object content of the sub-object; and determining that the checking result of the sub-object is correct when the matching result is matched.
[0175] In a possible implementation, when determining the checking result of the sub-object based on the object content of the sub-object and the reference content of another node connected by the undirected edge, the checking result determining module 143 can be specifically configured to:
[0176] When the node corresponding to the sub-object is connected by at least two undirected edges, the checking result of the sub-object is determined based on the object content of the sub-object and the reference content of another node connected by any of the at least two undirected edges.
[0177] In a possible implementation, when determining the checking result of the sub-object based on the object content of the sub-object and the reference content of another node connected by any of the at least two undirected edges, the checking result determining module 143 can be specifically configured to:
[0178] For any of the at least two undirected edges, when the object content of the sub-object does not match the reference content of another node connected by the undirected edge, and the another node is connected by other undirected edges except the undirected edge, the checking result of the sub-object is determined based on the object content of the sub-object and the reference content of another node connected by the other undirected edge, the another node being a node connected by the other undirected edge except the another node.
[0179] In a possible implementation, for each node, the node corresponds to a matching identifier and a state identifier, the matching identifier indicating that there is object content matching the reference content of the node or there is no object content matching the reference content of the node, and the state identifier indicating that the reference content of the node has been matched or has not been matched;
[0180] In a possible implementation, when determining the checking result of the sub-object based on the object content of the sub-object and the reference content of another node connected by the undirected edge, the checking result determining module 143 can be specifically configured to:
[0181] When the matching identifier of the another node indicates that there is no object content matching the reference content of the another node, and the state identifier of the another node indicates that the reference content of the another node has not been matched, the checking result of the sub-object is determined based on the object content of the sub-object and the reference content of the another node.
[0182] The device provided in the embodiments of the present application can perform the method provided in the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of the embodiments of the present application are corresponding to the steps in the method of the embodiments of the present application. For the detailed function description of each module of the device, refer to the description of the corresponding method in the foregoing description, which will not be repeated here.
[0183] Based on the same principles as the checking method and device provided in the embodiments of the present application, the embodiments of the present application further provide an electronic device (such as a server), which can include a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of the present application.
[0184] Optionally, Figure 15 A structural schematic diagram of an electronic device to which the embodiments of the present application are applicable is shown, as shown in Figure 15 As shown, Figure 15 The electronic device 4000 shown includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 can also include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception, etc. It should be noted that the transceiver 4004 is not limited to one in actual application, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0185] The processor 4001 can be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor 4001 can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.
[0186] The bus 4002 can include a path that transmits information between the above-described components. The bus 4002 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For convenience of representation, Figure 15 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0187] The memory 4003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, a magnetic disk storage medium, other magnetic storage device, or any other medium that can be used to carry or store computer programs and that can be read by a computer, without limitation.
[0188] The memory 4003 is used to store a computer program for executing the embodiments of the present application, and is controlled by the processor 4001 to execute. The processor 4001 is used to execute the computer program stored in the memory 4003 to realize the steps shown in the foregoing method embodiments.
[0189] The embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to realize the steps and corresponding contents of the foregoing method embodiments.
[0190] The embodiments of the present application also provide a computer program product, and the computer program product includes a computer program. The computer program is executed by a processor to realize the steps and corresponding contents of the foregoing method embodiments.
[0191] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described.
[0192] It should be understood that, although each operation step in the flowchart of the embodiments of the present application is indicated by an arrow, the implementation order of the steps is not limited to the order indicated by the arrow. Unless otherwise specified herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders as required. In addition, part or all of the steps in each flowchart can include multiple sub-steps or multiple stages based on the actual implementation scenario. Part or all of these sub-steps or stages can be executed at the same time, and each of these sub-steps or stages can also be executed at different times. In the scenario where the execution times are different, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of the present application do not limit this.
[0193] The above is only an optional implementation of some implementation scenarios of the present application. It should be pointed out that, for ordinary skilled persons in the technical field, other similar implementation means based on the technical idea of the present application without departing from the technical concept of the present application also belong to the protection scope of the embodiments of the present application.
Claims
1. A collation method characterized by, The application relates to a method for checking a to-be-checked service, and comprises the following steps: acquiring to-be-checked data of a to-be-checked service, the to-be-checked service comprising at least one object, the to-be-checked data comprising to-be-checked content of each object, for each object, the object comprising at least one sub-object, when the object comprises at least two sub-objects, the at least two sub-objects having an order, and the to-be-checked content of the object comprising object content of each sub-object in the object; acquiring a checking link corresponding to the to-be-checked service, the checking link being created in the following manner: acquiring reference content of each sub-object in the to-be-checked service, taking each sub-object as a node, creating a directed edge between nodes corresponding to two adjacent sub-objects of the same object if the reference content of the two adjacent sub-objects has an order, and creating an undirected edge between nodes corresponding to two sub-objects of the same object if the reference content of the two sub-objects does not have an order; for each sub-object, if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, determining that the checking result of the sub-object is correct; if the object content of the sub-object does not match the reference content of the node corresponding to the sub-object, determining the checking result of the sub-object according to the type of the edge connected to the node corresponding to the sub-object, the type of the edge comprising a directed edge or an undirected edge.
2. The method of claim 1, wherein, The method for determining the checking result of the sub-object according to the type of the edge connected to the node corresponding to the sub-object comprises: if the edge connected to the node corresponding to the sub-object is a directed edge, determining that the checking result of the sub-object is incorrect; if the edge connected to the node corresponding to the sub-object is an undirected edge, determining the checking result of the sub-object according to the object content of the sub-object and the reference content of another node connected by the undirected edge.
3. The method of claim 1, wherein, for each object, if the object comprises at least one sub-object pair, two sub-objects in each sub-object pair having an order, taking two nodes corresponding to the two sub-objects in each sub-object pair as a node group, the method for creating the checking link further comprising: creating a directed edge between two nodes in each node group; if the object comprises at least two sub-object pairs, the method for creating the checking link further comprising: creating an undirected edge between node groups corresponding to the at least two sub-object pairs.
4. The method of claim 3, wherein, for each node group, if the reference content of any node in the node group is realized by a first logical symbol and the reference content of another node in the node group, for a sub-object corresponding to the any node, if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, determining that the checking result of the sub-object is correct, comprising: determining the reference content of the any node based on the first logical symbol and the reference content of another node in the node group; if the object content of the sub-object matches the reference content of the any node, determining that the checking result of the sub-object is correct.
5. The method of claim 1, wherein, For each of the sub-objects, if the reference content of the node corresponding to the sub-object comprises at least two items of reference sub-content, and the at least two items of reference sub-content are connected by a second logical symbol, and if the object content of the sub-object matches the reference content of the node corresponding to the sub-object, it is determined that the checking result of the sub-object is correct, comprising: determining a matching result of the object content of the sub-object and the reference content of the node corresponding to the sub-object based on the at least two items of reference sub-content, the second logical symbol and the object content of the sub-object; when the matching result is matching, it is represented that the checking result of the sub-object is correct.
6. The method of claim 2, wherein, The determination of the checking result of the sub-object according to the object content of the sub-object and the reference content of the other node connected by the undirected edge, comprising: If the node corresponding to the sub-object is connected with at least two undirected edges, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of the other node connected by any of the at least two undirected edges.
7. The method of claim 6, wherein, The determination of the checking result of the sub-object according to the object content of the sub-object and the reference content of the other node connected by any of the at least two undirected edges, comprising: For any of the at least two undirected edges, if the object content of the sub-object does not match the reference content of the other node connected by the undirected edge, and the other node is connected with other undirected edges except the undirected edge, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of the other node connected by the other undirected edge, the other node being a node connected by the other undirected edge except the other node.
8. The method of claim 1, 6 or 7, wherein, For each of the nodes, the node corresponds to a matching identifier and a state identifier, the matching identifier representing that there is object content matching the reference content of the node or there is no object content matching the reference content of the node, and the state identifier representing that the reference content of the node has been matched or not; The determination of the checking result of the sub-object according to the object content of the sub-object and the reference content of the other node connected by the undirected edge, comprising: If the matching identifier of the other node represents that there is no object content matching the reference content of the other node, and the state identifier of the other node represents that the reference content of the other node has not been matched, the checking result of the sub-object is determined according to the object content of the sub-object and the reference content of the other node.
9. A collating device characterized by comprising: Comprising: A to-be-checked data acquisition module is used for acquiring to-be-checked data of a to-be-checked service, the to-be-checked service comprising at least one object, the to-be-checked data comprising to-be-checked content of each of the objects, for each of the objects, the object comprising at least one sub-object, when the object comprises at least two sub-objects, the at least two sub-objects have an order, and the to-be-checked content of the object comprises object content of each sub-object in the object; The collation link acquisition module is configured to acquire a collation link corresponding to the to-be-collated service, and the collation link is created in the following manner: acquiring reference content of each sub-object in the to-be-collated service, taking each sub-object as a node, creating a directed edge between nodes corresponding to two adjacent sub-objects of the same object if the reference content of the two adjacent sub-objects has an order, and creating an undirected edge between nodes corresponding to two sub-objects of the same object if the reference content of the two sub-objects does not have an order; The collation result determination module is configured to, for each sub-object, determine a collation result of the sub-object as correct if object content of the sub-object matches the reference content of the node corresponding to the sub-object, and determine the collation result of the sub-object according to a type of an edge connected to the node corresponding to the sub-object if the object content of the sub-object does not match the reference content of the node corresponding to the sub-object, the type of the edge including a directed edge or an undirected edge.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, is arranged to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the method of any one of claims 1-8.
11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-8.
12. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-8.
Citation Information
Patent Citations
Relational network graph construction method and device, computer equipment and storage medium
CN110659395A
Information processing method and device, electronic equipment and storage medium
CN111723134A