Text recognition method and device, equipment, medium and program product

Through similarity matching of text keywords and vocabulary label analysis, combined with the decision tree model and association relationship library, the problem of synonyms and meanings in text recognition in finance, medical care and other fields is solved, and the recognition accuracy and system reliability are improved .

CN119312800APending Publication Date: 2025-01-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410468136.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-18
Publication Date
2025-01-14

Smart Images

  • Figure CN119312800A_ABST
    Figure CN119312800A_ABST
Patent Text Reader

Abstract

The invention provides a text recognition method which can be applied to the technical fields of artificial intelligence, natural language processing and finance. The text recognition method comprises the steps of obtaining a target keyword of a target text and a reference keyword of a reference text; and performing similarity matching on the target keyword and the reference keyword to obtain a first recognition result. Under the condition that the first recognition result is lower than a word preset threshold value, obtaining a plurality of target vocabulary tags of the target keyword and a plurality of reference vocabulary tags of the reference keyword; the plurality of target vocabulary tags represent a plurality of features of the target keyword in different dimensions, and the plurality of reference vocabulary tags represent a plurality of features of the reference keyword in different dimensions. And performing similarity matching on the plurality of target vocabulary tags and the plurality of reference vocabulary tags to obtain a second recognition result. And determining a matching relationship between the target text and the reference text according to the second recognition result. The invention further provides a text recognition device and equipment, a medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to artificial intelligence, natural language processing and financial technology, and in particular to a text recognition method, device, equipment, medium and program product. Background Art

[0002] With the rapid development of information technology, a large amount of text data has emerged in various fields, especially in professional fields such as finance, medicine, and law. These text information are of great value for specific decisions and applications. However, due to the complexity, diversity, dynamics, and development of language, the same concept or information may be presented in many different ways, making it very difficult to identify synonyms. Summary of the invention

[0003] In view of the above problems, the present disclosure provides a text recognition method, apparatus, device, medium and program product.

[0004] According to a first aspect of the present disclosure, a text recognition method is provided, comprising: obtaining a target keyword of a target text and a reference keyword of a reference text, wherein the target keyword includes a key entity of the target text and the reference keyword includes a key entity of the reference text; performing similarity matching on the target keyword and the reference keyword to obtain a first recognition result; when the first recognition result is lower than a preset threshold of a word, obtaining a plurality of target vocabulary tags of the target keyword and a plurality of reference vocabulary tags of the reference keyword, wherein the plurality of target vocabulary tags represent a plurality of features of the target keyword in different dimensions and the plurality of reference vocabulary tags represent a plurality of features of the reference keyword in different dimensions; performing similarity matching on the plurality of target vocabulary tags and the plurality of reference vocabulary tags to obtain a second recognition result; and determining a matching relationship between the target text and the reference text according to the second recognition result.

[0005] According to an embodiment of the present disclosure, obtaining multiple target vocabulary tags for a target keyword and multiple reference vocabulary tags for a reference keyword includes: determining multiple target features of the target keyword in a predetermined dimension and multiple reference features of the reference keyword in a predetermined dimension; obtaining multiple target vocabulary tags based on the multiple target features of the target keyword, and obtaining multiple reference vocabulary tags based on the multiple features of the reference keyword.

[0006] According to an embodiment of the present disclosure, multiple target features of a target keyword in a predetermined dimension and multiple reference features of a reference keyword in a predetermined dimension are determined, including: determining a target part of speech of the target keyword based on a target text and determining a reference part of speech of the reference keyword based on a reference text; in the case where it is determined that the target part of speech and the reference part of speech are both predetermined parts of speech, determining a category of the target keyword based on the target text and determining a category of the reference keyword based on the reference text; determining multiple target features of the target keyword in a predetermined dimension based on the category of the target keyword and determining multiple reference features of the reference keyword in a predetermined dimension based on the category of the reference keyword.

[0007] According to an embodiment of the present disclosure, a plurality of target vocabulary tags and a plurality of reference vocabulary tags are matched for similarity to obtain a second recognition result, including: obtaining a matching success rate based on the number of successful matches between the target vocabulary tags and the reference vocabulary tags; and determining the second recognition result based on the matching success rate.

[0008] According to an embodiment of the present disclosure, the matching relationship between the target text and the reference text is determined based on the second recognition result, including: when the second recognition result is lower than the preset threshold of the label, obtaining multiple associated relationship words of the reference keyword, wherein the associated relationship words and the reference keyword have a containment or being contained relationship; matching the target keyword and the multiple associated relationship words respectively to obtain a third recognition result; and determining the matching relationship between the target text and the reference text based on the third recognition result.

[0009] According to an embodiment of the present disclosure, multiple associated relationship words of a reference keyword are obtained, including: determining, based on the reference keyword, an associated relationship table corresponding to the reference keyword from a preset associated relationship library; querying the associated relationship words matching the target keyword based on the associated relationship table; wherein the associated relationship table is obtained based on the sample reference keyword and multiple sample associated relationship words of the sample reference keyword, and the associated relationship library is obtained based on multiple different associated relationship tables; and the sample reference keyword has a containment relationship or a contained relationship with the multiple sample associated relationship words.

[0010] According to an embodiment of the present disclosure, the matching relationship between the target text and the reference text is determined based on the second recognition result, including: when the second recognition result is lower than a preset threshold of the label, the target keyword and the reference keyword are input into a preset decision tree model to obtain a third recognition result, wherein the decision tree model is trained based on sample reference keywords, sample target keywords and labels, and the labels include the sample third recognition result; based on the third recognition result, the matching relationship between the target text and the reference text is determined.

[0011] A second aspect of the present disclosure provides a text recognition device, including: a first acquisition module, used to acquire target keywords of a target text and reference keywords of a reference text, wherein the target keywords include key entities of the target text, and the reference keywords include key entities of the reference text; a first calculation module, used to perform similarity matching on the target keywords and the reference keywords to obtain a first recognition result; a second acquisition module, used to acquire multiple target vocabulary tags of the target keywords and multiple reference vocabulary tags of the reference keywords when the first recognition result is lower than a preset threshold, wherein the multiple target vocabulary tags represent multiple features of the target keywords in different dimensions, and the multiple reference vocabulary tags represent multiple features of the reference keywords in different dimensions; a second calculation module, used to perform similarity matching on the multiple target vocabulary tags and the multiple reference vocabulary tags to obtain a second recognition result; and a determination module, used to determine the matching relationship between the target text and the reference text according to the second recognition result.

[0012] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0013] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.

[0014] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.

[0015] According to the text recognition method disclosed in the present invention, by first performing similarity matching on the target keyword and the reference keyword to obtain a first recognition result, it is possible to preliminarily determine whether the target text matches the reference text; when the first recognition result is lower than a preset threshold, by performing similarity matching on the target vocabulary label and the reference vocabulary label to compare the similarity of the target keyword and the reference keyword in various dimensions, it is possible to identify whether the target keyword and the reference keyword have the same meaning but different expressions, thereby improving the recognition accuracy of the target text. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0017] Figure 1 The following schematically shows an application scenario diagram of the text recognition method and device according to an embodiment of the present disclosure;

[0018] Figure 2 A flowchart of a text recognition method according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 3 Schematically shows a flow chart for determining target features and reference features according to an embodiment of the present disclosure;

[0020] Figure 4 A flowchart for determining a matching relationship between a target text and a reference text according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 5 A flowchart for performing text recognition according to an exemplary embodiment of the present disclosure is schematically shown;

[0022] Figure 6 A structural block diagram of a text recognition device according to an embodiment of the present disclosure is schematically shown; and

[0023] Figure 7 A block diagram of an electronic device suitable for implementing a text recognition method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0027] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0028] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0029] In the scenario where personal information is used for automated decision-making, the methods, devices, and systems provided in the embodiments of the present disclosure provide users with corresponding operation entrances for users to choose to agree or reject the automated decision results; if the user chooses to reject, the automated decision can be stopped.

[0030] The inventors have discovered that in the fields of finance, healthcare, and law, it may be necessary to verify the authenticity of the target object's information or background. For example, in the corporate credit business process, in order to understand the customer's true transaction background, it is necessary to verify the authenticity of the customer's business scope. Generally, the following method is used for verification: the manually entered business scope is compared with the business scope information provided by the official platform. If they are consistent, the business scope is considered to be authentic, otherwise the customer information is considered suspicious. Based on the manually entered comparison method, it is impossible to identify business scopes that "have the same meaning but different expressions" or "have an inclusion relationship" (for example: tomato planting and tomato planting, pure benzene and hazardous chemicals), which causes the system to mistakenly judge the information as suspicious.

[0031] Embodiments of the present disclosure provide a text recognition training method, apparatus, device, medium and program product. The text recognition method includes: obtaining a target keyword of a target text and a reference keyword of a reference text, wherein the target keyword includes a key entity of the target text, and the reference keyword includes a key entity of the reference text. Performing similarity matching on the target keyword and the reference keyword to obtain a first recognition result. When the first recognition result is lower than a preset word threshold, obtaining multiple target vocabulary tags of the target keyword and multiple reference vocabulary tags of the reference keyword. The multiple target vocabulary tags represent multiple features of the target keyword in different dimensions, and the multiple reference vocabulary tags represent multiple features of the reference keyword in different dimensions. Performing similarity matching on the multiple target vocabulary tags and the multiple reference vocabulary tags to obtain a second recognition result. And according to the second recognition result, determining the matching relationship between the target text and the reference text.

[0032] Figure 1 The application scenario diagram of the text recognition method and device according to the embodiments of the present disclosure is schematically shown.

[0033] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, and a third terminal device 103. A network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and a server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0034] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0035] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0036] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0037] It should be noted that the text recognition method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the text recognition device provided in the embodiment of the present disclosure can generally be set in the server 105. The text recognition method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the text recognition device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0039] The following will be based on Figure 1 The scene described by Figure 2 to Figure 5 The text recognition method of the disclosed embodiment is described in detail.

[0040] Figure 2 The flowchart of the text recognition method according to the embodiment of the present disclosure is schematically shown.

[0041] like Figure 2 As shown, the text recognition method of this embodiment includes operations S210 to S250.

[0042] In operation S210, a target keyword of a target text and a reference keyword of a reference text are acquired.

[0043] According to an embodiment of the present disclosure, the target text may be the text to be recognized, and the reference text may be a comparison text or background text for comparison of the determined information, and may be close to the semantics of the target text or similar to the target text. For example, in the scenario of verifying the business scope of an enterprise, the target text may be the text of the actual business scope of the enterprise, and the reference text may be the business scope text provided by the enterprise on the official platform.

[0044] According to an embodiment of the present disclosure, the target keyword may include a key entity of the target text, and the reference keyword may include a key entity of the reference text. The key entity represents an entity or object with importance or specific meaning in the text. It may be a concrete or abstract noun or noun phrase, verb, etc.

[0045] According to the embodiments of the present disclosure, the target keywords and reference keywords can be obtained by selecting nouns or verbs as keywords based on the part of speech of each word in the text. The target keywords and reference keywords can also be obtained by cleaning the vocabulary of the text and removing unimportant or meaningless conjunctions, adverbs, prepositions, auxiliary words, and interjections. Keywords related to a specific topic or field can also be screened out based on an existing dictionary or field knowledge base.

[0046] In operation S220, similarity matching is performed on the target keyword and the reference keyword to obtain a first recognition result.

[0047] According to an embodiment of the present disclosure, similarity matching is performed on the target keyword and the reference keyword, and the similarity can be determined based on whether the target keyword and the reference keyword contain the same characters, words, and the order of characters and words. However, it is not limited to this. Vector similarity matching can also be performed on the word vector of the target keyword and the word vector of the reference keyword to obtain the similarity between the target keyword and the reference keyword.

[0048] According to an embodiment of the present disclosure, the first recognition result includes that the target keyword does not match the reference keyword, or the target keyword matches the reference keyword. The judgment can be made by setting a word preset threshold, for example, the word preset threshold can be 90% or 95%. If the similarity is higher than the word preset threshold, the target keyword matches the reference keyword. If the similarity is lower than the word preset threshold, the target keyword does not match the reference keyword.

[0049] In operation S230, when the first recognition result is lower than a word preset threshold, a plurality of target vocabulary tags of the target keyword and a plurality of reference vocabulary tags of the reference keyword are acquired.

[0050] According to an embodiment of the present disclosure, a plurality of target vocabulary tags represent a plurality of features of a target keyword in different dimensions, and a plurality of reference vocabulary tags represent a plurality of features of a reference keyword in different dimensions.

[0051] According to an embodiment of the present disclosure, when the first recognition result is greater than or equal to the word preset threshold, it can be determined that the target keyword matches the reference keyword, and the target text matches the reference text. When the first recognition result is lower than the word preset threshold, it is necessary to further determine whether the target keyword and the reference keyword have the same meaning but different expressions.

[0052] In operation S240, similarity matching is performed on the plurality of target vocabulary tags and the plurality of reference vocabulary tags to obtain a second recognition result.

[0053] According to an embodiment of the present disclosure, different dimensions may be used to evaluate and analyze different aspects or attributes involved in the target keyword and the reference keyword. For example, the target keyword and the reference keyword are tomato and tomato, respectively, and their different dimensions may be shape, color, taste, season, way of eating, etc. Multiple features may be specific descriptions and expressions of the target keyword and the reference keyword in these dimensions. For example, multiple features of tomato and tomato in different dimensions may be marked as "red, spherical, sweet and sour, raw or cooked", etc. Features may be identified using vocabulary tags.

[0054] According to an embodiment of the present disclosure, the target vocabulary tags and the reference vocabulary tags can be compared one by one for similarity. The second recognition result is determined by the result of the familiarity comparison. The second recognition result includes the vocabulary tag comparison passing or failing. If the vocabulary tag comparison fails, the target text and the reference text do not match. If the vocabulary tag comparison passes, the target text and the reference text match.

[0055] In operation S250, a matching relationship between the target text and the reference text is determined according to the second recognition result.

[0056] According to an embodiment of the present disclosure, the matching relationship between the target text and the reference text may be that the target text and the reference text have the same meaning, or that the target text and the reference text have a containing or being contained relationship. According to the second recognition result, the matching relationship between the target text and the reference text may be determined.

[0057] For example, in a scenario where the business scope of an enterprise is to be verified, it can be determined based on the second identification result whether the actual business scope of the enterprise is consistent with the business scope provided on the official platform.

[0058] By first matching the target keyword with the reference keyword for similarity, a first recognition result is obtained, so that it is possible to preliminarily determine whether the target text matches the reference text; when the first recognition result is lower than a preset threshold, by matching the target vocabulary label with the reference vocabulary label for similarity, the similarity between the target keyword and the reference keyword in various dimensions is compared, so that it is possible to identify whether the target keyword and the reference keyword have the same meaning but different expressions, thereby improving the recognition accuracy of the target text.

[0059] According to an embodiment of the present disclosure, obtaining multiple target vocabulary tags of a target keyword and multiple reference vocabulary tags of a reference keyword includes: determining multiple target features of the target keyword in a predetermined dimension and multiple reference features of the reference keyword in a predetermined dimension. Obtaining multiple target vocabulary tags based on the multiple target features of the target keyword, and obtaining multiple reference vocabulary tags based on the multiple reference features of the reference keyword.

[0060] According to the embodiments of the present disclosure, the predetermined dimensions may be multiple dimensions pre-set according to actual needs, and the predetermined dimensions may be dimensions that can represent important attribute information of the target keyword and the reference keyword. For example, if the target keyword is food, the predetermined dimensions may be multiple dimensions such as shape, color, taste, season, and eating method; if the target keyword is chemicals, the predetermined dimensions may be multiple dimensions such as physical state, chemical structure, properties, and use.

[0061] According to the embodiments of the present disclosure, based on the different keywords, corresponding predetermined dimensions can be set according to actual conditions. By determining multiple features of the target keyword and the reference keyword from the predetermined dimensions, the target keyword and the reference keyword can be accurately described from various aspects or attributes, thereby improving the relevance of the target vocabulary label and the target keyword, and thus improving the accuracy of text recognition.

[0062] Figure 3 The flowchart of determining target features and reference features according to an embodiment of the present disclosure is schematically shown.

[0063] like Figure 3 As shown, determining the target feature and the reference feature includes: operations S310-S330.

[0064] In operation S310 , a target part of speech of a target keyword is determined based on a target text and a reference part of speech of a reference keyword is determined based on a reference text.

[0065] In operation S320 , when it is determined that both the target part of speech and the reference part of speech are predetermined parts of speech, a category of the target keyword is determined based on the target text and a category of the reference keyword is determined based on the reference text.

[0066] In operation S330 : a plurality of target features of the target keyword in a predetermined dimension are determined based on the category of the target keyword, and a plurality of reference features of the reference keyword in a predetermined dimension are determined based on the category of the reference keyword.

[0067] According to an embodiment of the present disclosure, when determining the predetermined dimensions of target keywords and reference keywords, the parts of speech of the target keywords and reference keywords in the text, such as verbs, names, etc., can be determined first. For words that can be both verbs and nouns, when determining the parts of speech in the text, they can be distinguished based on the contextual relationship or semantic relationship of the text content. For example, service can be used as a noun to represent a type of activity that provides convenience to each other among members of society, or it can be used as a verb to represent other people doing things. Therefore, it is necessary to determine whether the target keywords and reference keywords are of the predetermined parts of speech in combination with the context of the text.

[0068] According to the embodiments of the present disclosure, in the technology of determining that the target keyword and the reference keyword are predetermined parts of speech, the categories of the target keyword and the reference keyword can be further determined. For example, when the part of speech of the keyword is a noun, it can be further determined whether the noun belongs to a person, time, place, abstract concept, food, chemical or other types of items.

[0069] According to the embodiments of the present disclosure, when determining the category in the text, it is possible to distinguish whether the target keyword and the reference keyword have multiple meanings according to the contextual relationship or semantic relationship of the text content. For example, apple can represent a food category or a mobile phone category. Therefore, it is necessary to distinguish the category to which the target keyword and the reference keyword specifically belong in combination with the context of the text.

[0070] By first determining the parts of speech of the target keywords and reference keywords based on the text content, and then further determining the categories of the target keywords and reference keywords based on the determined parts of speech, and then determining the predetermined dimensions according to the categories, and obtaining multiple target features according to the predetermined dimensions, we can deeply and accurately describe the keywords in the target text and reference text and their features in different dimensions, so as to more accurately understand the content and structure of the text and improve the recognition accuracy.

[0071] According to an embodiment of the present disclosure, a plurality of target vocabulary tags and a plurality of reference vocabulary tags are matched for similarity to obtain a second recognition result, including: obtaining a matching success rate based on the number of successful matches between the target vocabulary tags and the reference vocabulary tags; and determining the second recognition result based on the matching success rate.

[0072] According to an embodiment of the present disclosure, the determined predetermined dimension can be identified, for example, the predetermined dimension can be identified by numbers or letters. Based on the multiple target features and reference features of the identified predetermined dimension, the obtained multiple target vocabulary tags and multiple reference vocabulary tags also have corresponding identifications.

[0073] The target vocabulary tag and the reference vocabulary tag with the same identifier are matched for similarity respectively. The matching method can be to determine the similarity based on whether the target vocabulary tag and the reference vocabulary tag with the same identifier contain the same characters, words, and the order of characters and words. The word vector of the target vocabulary tag and the word vector of the reference vocabulary tag can also be matched for vector similarity to obtain the similarity between the target vocabulary tag and the reference vocabulary tag with the same identifier. However, it is not limited to this.

[0074] When the matching degree is higher than the preset threshold, it is marked as 1, and when the matching degree is lower than the preset threshold, it is marked as 0; the matching success rate is obtained by calculating the ratio of the number marked as 1 to the total number of marks 1 and 0.

[0075] The tag preset threshold can be set according to actual needs, and the second recognition result is determined according to the matching success rate and the tag preset threshold. If the matching success rate is higher than the preset threshold, it can be indicated that the target keyword and the reference keyword have the same semantics. If the matching success rate is lower than the preset threshold, it can be indicated that the target keyword and the reference keyword do not have the same semantics.

[0076] By performing similarity matching on the target vocabulary tags and the reference vocabulary tags, the target keywords and the reference keywords can be compared in various dimensions, and the semantics of the target keywords and the reference keywords can be more comprehensively compared. By quantifying the matching success rate, the results are made more intuitive and easier, and the recognition accuracy is improved.

[0077] Figure 4 The flowchart of determining the matching relationship between the target text and the reference text according to an embodiment of the present disclosure is schematically shown.

[0078] like Figure 4 As shown, operation S250 also includes: operations S410-S430.

[0079] Operation S410: when the second recognition result is lower than a preset threshold of the tag, a plurality of associated relationship words of the reference keyword are obtained, wherein the associated relationship words and the reference keyword have a containment or being contained relationship.

[0080] Operation S420: Match the target keyword and the multiple related words respectively to obtain a third recognition result.

[0081] Operation S430: Determine a matching relationship between the target text and the reference text according to the third recognition result.

[0082] According to the embodiments of the present disclosure, the associated relationship words may be preset, and the multiple associated relationship words may have a containment relationship or a peer relationship. It is possible to determine whether the target keyword and the reference keyword have a containment relationship based on the matching results of the target keyword and the associated relationship words; and then determine whether the target text and the reference text have a containment relationship.

[0083] For example, in the scenario of verifying the authenticity of a chemical business scope, the target keyword is pure benzene and the reference keyword is organic matter; the associated words of chemicals can be obtained, such as benzene series, aromatic hydrocarbons, alkanes, pure benzene, styrene, etc. By matching the target keyword and the reference keyword, pure benzene can be matched in the associated words of organic matter, so it can be determined that pure benzene and organic matter have an inclusion relationship.

[0084] By obtaining the associated words of the reference keyword and comparing them with the target keyword, it is possible to determine whether there is an inclusion relationship between the reference keyword and the target keyword, thereby accurately identifying the further matching relationship between the target text and the reference text, improving the richness of the text recognition results, and helping users make appropriate decisions.

[0085] According to an embodiment of the present disclosure, obtaining multiple associated relationship words of a reference keyword includes: determining an associated relationship table corresponding to the reference keyword from a preset associated relationship library according to the reference keyword. Querying the associated relationship words matching the target keyword according to the associated relationship table. The associated relationship table is obtained based on the sample reference keyword and multiple sample associated relationship words of the sample reference keyword, and the associated relationship library is obtained based on multiple different associated relationship tables; the sample reference keyword and the multiple sample associated relationship words have a containment relationship or a contained relationship.

[0086] According to an embodiment of the present disclosure, the association relationship table can be constructed based on historical data. These sample data include sample reference keywords and multiple sample association relationship words associated with the sample keywords. In the association relationship table, the sample reference keywords and the sample association relationship words can be stored in layers based on the inclusion relationship or peer relationship between them.

[0087] According to an embodiment of the present disclosure, the association relationship library is a collection of multiple different association relationship tables, each of which can be obtained based on different sample data or different algorithms.

[0088] According to the embodiments of the present disclosure, by using the reference keyword, the association relationship table corresponding to the reference keyword can be quickly found in the preset association relationship library; after the association relationship table is determined, the association relationship table can be hierarchically queried to see whether there is an association relationship word matching the target keyword in the association relationship table. If the matching association relationship word can be found, the target keyword and the reference keyword have an inclusion relationship; if the association relationship word cannot be found, the target keyword and the reference keyword do not have an inclusion relationship.

[0089] Through the preset association relationship library and association relationship table, it is possible to quickly query the association relationship words related to the target keyword to improve the recognition efficiency.

[0090] According to another embodiment of the present disclosure, the matching relationship between the target text and the reference text is determined based on the second recognition result, including: when the second recognition result is lower than a preset threshold of the label, the target keyword and the reference keyword are input into a preset decision tree model to obtain a third recognition result, wherein the decision tree model is trained based on sample reference keywords, sample target keywords and labels, and the labels include the sample third recognition result.

[0091] According to an embodiment of the present disclosure, the third recognition result characterizes whether there is a containment relationship between the sample reference keyword and the sample target keyword. By analyzing the sample reference keyword, the sample target keyword and the label, the decision tree model can learn the association rules between the sample reference keyword and the sample target keyword, thereby identifying whether there is a containment relationship between the target keyword and the reference keyword.

[0092] When the second recognition result is lower than the preset threshold, the third recognition result is obtained by further using the decision tree model, which can further improve the accuracy and reliability of the matching relationship between the target text and the reference text. In addition, the decision tree model can adaptively learn the association rules between keywords, making it more suitable for actual application scenarios.

[0093] Figure 5 The flowchart of performing text recognition according to an exemplary embodiment of the present disclosure is schematically shown.

[0094] like Figure 5 As shown, the text recognition process includes: operations S510-S590.

[0095] In operation S510, the target keyword and the reference keyword are matched for similarity, and then, in operation S520, it is determined whether the similarity is greater than the word preset threshold. If the similarity is greater than the word preset threshold, in operation S530, the result target text and the reference text are matched, and if the familiarity is lower than the word preset threshold, operation S540 is performed. In operation S540, multiple target vocabulary tags and multiple reference vocabulary tags are obtained. After obtaining, operation S550 is performed, and in operation S550, multiple target vocabulary tags and multiple reference vocabulary tags are matched for similarity. In operation S560, it is determined whether the similarity is greater than the tag preset threshold. If the similarity is greater than the tag preset threshold, in operation S570, the result target text and the reference text are matched, and if the familiarity is lower than the word preset threshold, operation S580 is performed. In operation S580, the target keyword and the reference keyword are input into a decision tree model or an association relationship library, and in operation S590, the inclusion relationship between the target keyword and the reference keyword is output.

[0096] Based on the above method, the matching relationship between the target text and the reference text can be accurately identified. For target texts and reference texts with "same meaning but different expressions" or "inclusion relationships", they can be identified more accurately. For example, in the scenario of verifying the transaction background, based on the above method, the level of authenticity verification of customer transaction background can be improved, labor costs can be reduced, and it is of great significance to optimize resource allocation and improve efficiency. At the same time, by establishing a vocabulary tag library and an association relationship library, the digital assets of the enterprise can be accumulated, providing underlying support for expanding data dimensions, in-depth mining and analysis, and comprehensive operational analysis.

[0097] Based on the above text recognition method, the present disclosure also provides a text recognition device. Figure 6 The device is described in detail.

[0098] Figure 6 The structural block diagram of the text recognition device according to an embodiment of the present disclosure is schematically shown.

[0099] like Figure 6 As shown, the text recognition device 600 of this embodiment includes a first acquisition module 610 , a first calculation module 620 , a second acquisition module 630 , a second calculation module 640 and a determination module 650 .

[0100] The first acquisition module 610 is used to acquire target keywords of the target text and reference keywords of the reference text, wherein the target keywords include key entities of the target text and the reference keywords include key entities of the reference text. In one embodiment, the first acquisition module 610 can be used to perform the operation S210 described above, which will not be repeated here.

[0101] The first calculation module 620 is used to perform similarity matching on the target keyword and the reference keyword to obtain a first recognition result. In one embodiment, the first calculation module 620 can be used to perform the operation S220 described above, which will not be described in detail here.

[0102] The second acquisition module 630 is used to acquire multiple target vocabulary tags of the target keyword and multiple reference vocabulary tags of the reference keyword when the first recognition result is lower than a preset threshold, wherein the multiple target vocabulary tags represent multiple features of the target keyword in different dimensions, and the multiple reference vocabulary tags represent multiple features of the reference keyword in different dimensions. In one embodiment, the second acquisition module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0103] The second calculation module 640 is used to perform similarity matching on multiple target vocabulary tags and multiple reference vocabulary tags to obtain a second recognition result. In one embodiment, the second calculation module 640 can be used to perform the operation S240 described above, which will not be described in detail here.

[0104] The determination module 650 is used to determine the matching relationship between the target text and the reference text according to the second recognition result. The determination module 650 can be used to perform the operation S250 described above, which will not be described in detail here.

[0105] According to an embodiment of the present disclosure, the second acquisition module 630 includes: a first determination submodule and a second determination submodule.

[0106] The first determination submodule is used to determine a plurality of target features of a target keyword in a predetermined dimension and a plurality of reference features of a reference keyword in a predetermined dimension.

[0107] The second determination submodule is used to obtain a plurality of target vocabulary tags according to a plurality of target features of the target keyword, and to obtain a plurality of reference vocabulary tags according to a plurality of reference features of the reference keyword.

[0108] According to an embodiment of the present disclosure, the first determination submodule includes: a part-of-speech determination unit, a category determination unit, and a dimension determination unit.

[0109] The part-of-speech determination unit is used to determine a target part-of-speech of a target keyword based on a target text and to determine a reference part-of-speech of a reference keyword based on a reference text.

[0110] The category determination unit is used to determine the category of the target keyword based on the target text and the category of the reference keyword based on the reference text when it is determined that the target part of speech and the reference part of speech are both predetermined parts of speech.

[0111] The dimension determination unit is used to determine a plurality of target features of the target keyword in a predetermined dimension based on the category of the target keyword and to determine a plurality of reference features of the reference keyword in a predetermined dimension based on the category of the reference keyword.

[0112] According to an embodiment of the present disclosure, the second calculation module 640 includes: a matching rate calculation unit and a second recognition result determination unit.

[0113] The matching rate calculation unit is used to obtain the matching success rate according to the number of successful matches between the target vocabulary tags and the reference vocabulary tags.

[0114] The second recognition result determination unit is used to determine the second recognition result according to the matching success rate.

[0115] According to an embodiment of the present disclosure, the determination module 650 includes: a first acquisition submodule, a first calculation submodule and a third determination submodule.

[0116] The first acquisition submodule is used to acquire a plurality of associated words of the reference keyword when the second recognition result is lower than a preset threshold of the tag, wherein the associated words and the reference keyword have a containment or being contained relationship.

[0117] The first calculation submodule is used to match the target keyword and multiple related words respectively to obtain a third recognition result.

[0118] The third determination submodule is used to determine the matching relationship between the target text and the reference text according to the third recognition result.

[0119] According to an embodiment of the present disclosure, the first acquisition submodule includes: a relationship table determination unit and a relationship word query unit.

[0120] A relationship table determination unit is used to determine, based on the reference keyword, an association table corresponding to the reference keyword from a preset association library; wherein the association table is obtained based on the sample reference keyword and multiple sample association words of the sample reference keyword, and the association library is obtained based on multiple different association tables; and the sample reference keyword has a containment relationship or a contained relationship with the multiple sample association words.

[0121] The relation word query unit is used to query the relation words matching the target keyword according to the relation table.

[0122] According to an embodiment of the present disclosure, the determination module 650 further includes: an input unit and an output unit.

[0123] An input unit is used to input the target keyword and the reference keyword into a preset decision tree model to obtain a third recognition result when the second recognition result is lower than a preset threshold of the label, wherein the decision tree model is trained based on sample reference keywords, sample target keywords and labels, and the labels include the sample third recognition result.

[0124] The output unit is used to determine the matching relationship between the target text and the reference text according to the third recognition result.

[0125] According to an embodiment of the present disclosure, any multiple modules among the first acquisition module 610, the first calculation module 620, the second acquisition module 630, the second calculation module 640 and the determination module 650 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.

[0126] According to an embodiment of the present disclosure, at least one of the first acquisition module 610, the first calculation module 620, the second acquisition module 630, the second calculation module 640 and the determination module 650 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by an appropriate combination of any of them. Alternatively, at least one of the first acquisition module 610, the first calculation module 620, the second acquisition module 630, the second calculation module 640 and the determination module 650 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0127] Figure 7 A block diagram of an electronic device suitable for implementing a text recognition method according to an embodiment of the present disclosure is schematically shown.

[0128] like Figure 5As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0129] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.

[0130] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0131] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0132] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.

[0133] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the text recognition method provided by the embodiment of the present disclosure.

[0134] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0135] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0136] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0137] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0138] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0139] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0140] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A text recognition method, characterized in that: The method comprises: Acquire target keywords of a target text and reference keywords of a reference text, wherein the target keywords include key entities of the target text and the reference keywords include key entities of the reference text; Performing similarity matching on the target keyword and the reference keyword to obtain a first recognition result; When the first recognition result is lower than a preset word threshold, a plurality of target vocabulary tags of the target keyword and a plurality of reference vocabulary tags of the reference keyword are obtained, wherein the plurality of target vocabulary tags represent a plurality of features of the target keyword in different dimensions, and the plurality of reference vocabulary tags represent a plurality of features of the reference keyword in different dimensions; performing similarity matching on the plurality of target vocabulary tags and the plurality of reference vocabulary tags to obtain a second recognition result; and A matching relationship between the target text and the reference text is determined according to the second recognition result.

2. The method according to claim 1, characterized in that The acquiring of a plurality of target vocabulary tags of the target keyword and a plurality of reference vocabulary tags of the reference keyword comprises: Determining a plurality of target features of the target keyword in a predetermined dimension and a plurality of reference features of the reference keyword in the predetermined dimension; A plurality of target vocabulary tags are obtained according to a plurality of target features of the target keyword, and a plurality of reference vocabulary tags are obtained according to a plurality of reference features of the reference keyword.

3. The method according to claim 2, characterized in that: The determining of a plurality of target features of the target keyword in a predetermined dimension and a plurality of reference features of the reference keyword in the predetermined dimension includes: Determine a target part of speech of the target keyword based on the target text and determine a reference part of speech of the reference keyword based on the reference text; In the case where it is determined that the target part of speech and the reference part of speech are both predetermined parts of speech, determining the category of the target keyword based on the target text and determining the category of the reference keyword based on the reference text; A plurality of target features of the target keyword in the predetermined dimension are determined based on the category of the target keyword, and a plurality of reference features of the reference keyword in the predetermined dimension are determined based on the category of the reference keyword.

4. The method according to claim 1, characterized in that: The performing similarity matching on the plurality of target vocabulary tags and the plurality of reference vocabulary tags to obtain a second recognition result includes: Obtaining a matching success rate according to the number of successful matches between the target vocabulary tag and the reference vocabulary tag; and The second recognition result is determined according to the matching success rate.

5. The method according to claim 1, characterized in that Determining the matching relationship between the target text and the reference text according to the second recognition result includes: When the second recognition result is lower than a preset threshold of the tag, a plurality of associated words of the reference keyword are obtained, wherein the associated words and the reference keyword have a containing or being contained relationship; Matching the target keyword and the plurality of associated words respectively to obtain a third recognition result; and According to the third recognition result, a matching relationship between the target text and the reference text is determined.

6. The method according to claim 5, characterized in that The step of obtaining a plurality of associated words of the reference keyword includes: According to the reference keyword, determining an association relationship table corresponding to the reference keyword from a preset association relationship library; Querying the associated relationship words matching the target keyword according to the associated relationship table; Among them, the association relationship table is obtained based on the sample reference keyword and multiple sample association relationship words of the sample reference keyword, and the association relationship library is obtained based on multiple different association relationship tables; the sample reference keyword and the multiple sample association relationship words have an inclusion relationship or a being included relationship.

7. The method according to claim 1, characterized in that Determining the matching relationship between the target text and the reference text according to the second recognition result includes: In the case where the second recognition result is lower than a preset threshold of the label, the target keyword and the reference keyword are input into a preset decision tree model to obtain a third recognition result, wherein the decision tree model is trained based on the sample reference keyword, the sample target keyword and the label, and the label includes the sample third recognition result; According to the third recognition result, a matching relationship between the target text and the reference text is determined.

8. A text recognition device, characterized in that: The device comprises: A first acquisition module, configured to acquire a target keyword of a target text and a reference keyword of a reference text, wherein the target keyword includes a key entity of the target text, and the reference keyword includes a key entity of the reference text; A first calculation module, used for performing similarity matching between the target keyword and the reference keyword to obtain a first recognition result; A second acquisition module is used to acquire a plurality of target vocabulary tags of the target keyword and a plurality of reference vocabulary tags of the reference keyword when the first recognition result is lower than a preset threshold, wherein the plurality of target vocabulary tags represent a plurality of features of the target keyword in different dimensions, and the plurality of reference vocabulary tags represent a plurality of features of the reference keyword in different dimensions; A second calculation module is used to perform similarity matching on the plurality of target vocabulary tags and the plurality of reference vocabulary tags to obtain a second recognition result; and A determination module is used to determine a matching relationship between the target text and the reference text according to the second recognition result.

9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.