Text comparison method and device, storage medium and electronic equipment
The recognition of non-coined segments through semantic search and retrieval-based construction templates solves the problem of low text accuracy in the prior art, and achieves more efficient text comparison results.
Patent Information
- Application Number
- CN202510548983.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-30
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-08
AI Technical Summary
The existing text comparison methods fail to effectively combine common content and semantic classification information in their fields, resulting in low accuracy of comparison.
By semantic search of the comparison text, obtain the target classification number and similar text, determine the non-public keyword set that is not included in the similar keyword set, and construct the template and non-similar keyword set through the preset search method, identify the non-coined segments, and finally determine the comparison result based on the number of unique technical segments.
It improves the accuracy of text comparison, can more accurately identify the novelty and creativity of text, and enhances the comprehensiveness and accuracy of comparison.
Smart Images

Figure CN120448520A_ABST
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 30, 2024, with application number 202410541822.4 and invention name “Text comparison method, device, storage medium and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of text processing, and in particular to a text comparison method, device, storage medium, and electronic device. Background Art
[0003] With the development of computer technology, a variety of texts have emerged. In the field of patent applications, to facilitate others' understanding of technical solutions or products, people often record the content of their technical solutions or products in the form of text. It is usually necessary to compare the text with other relevant texts to determine whether the text is identical or similar to other relevant texts, thereby providing a basis for evaluating the novelty of the technical solution or product.
[0004] However, most text comparison methods only consider the similarity between the text to be compared and the publicly available text, and fail to make a comprehensive judgment based on other information such as common content in the field, semantic classification, etc., resulting in low text comparison accuracy.
[0005] Therefore, providing a text comparison method with high accuracy is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0006] In order to overcome the problems existing in the related art, the present application provides a text comparison method, device, storage and electronic device, which have the effect of high comparison accuracy.
[0007] According to a first aspect of an embodiment of the present application, a text comparison method is provided, comprising the following steps: Perform semantic retrieval on the obtained text to be compared to obtain the target classification number and several similar texts; Comparing the keyword set to be compared with the similar keyword set, and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared; wherein the keyword set to be compared is a keyword set corresponding to a plurality of segments to be compared in the text to be compared; and the similar keyword set is a keyword set corresponding to a plurality of similar segments in the similar text; Comparing the non-public keyword set with a regular keyword set corresponding to the text to be compared, and determining a plurality of non-similar keyword sets not included in the regular keyword set from the plurality of non-public keyword sets; the regular keyword set is determined based on the number of occurrences of each keyword in a similar text corresponding to the text to be compared; Constructing a search formula based on a preset search formula construction template, the target classification number, and the non-similar keyword set; determining non-overlapping segments from the segments where the non-similar keywords are located based on similarity values between the text retrieved by the search formula and the segments where the non-similar keyword set is located; Determine non-overlapping segments where the number of times the similar text appears is less than a preset threshold as unique technical segments; The text comparison result is determined based on the number of the unique technical segments.
[0008] According to a second aspect of an embodiment of the present application, a text comparison device is provided, comprising: The text determination module is used to perform semantic retrieval on the obtained text to be compared, and obtain the target classification number and several similar texts; a non-public keyword set determination module, configured to compare a keyword set to be compared with a similar keyword set, and determine, from among the plurality of keyword sets to be compared, a plurality of non-public keyword sets that are not included in the similar keyword set; wherein the keyword set to be compared is a keyword set corresponding to a plurality of segments to be compared in the text to be compared; and the similar keyword set is a keyword set corresponding to a plurality of similar segments in the similar text; a non-similar keyword set determination module, configured to compare the non-public keyword set with a conventional keyword set corresponding to the text to be compared, and determine, from the plurality of non-public keyword sets, a plurality of non-similar keyword sets not included in the conventional keyword set; the conventional keyword set is determined based on the number of occurrences of each keyword in a similar text corresponding to the text to be compared; a non-overlapping segment determination module, configured to construct a search formula based on a preset search formula construction template, the target classification number, and the non-similar keyword set; and determine non-overlapping segments from the segments containing a plurality of non-similar keywords based on similarity values between the text retrieved by the search formula and the segments containing the non-similar keyword set; A unique technical segment determination module, configured to determine non-overlapping segments that appear in the similar text less than a preset number threshold as unique technical segments; The text comparison result determination module is used to determine the text comparison result according to the number of the unique technical segments.
[0009] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a memory; the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the text comparison method as described above.
[0010] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the text comparison method as described above is implemented.
[0011] The embodiment of the present application performs semantic retrieval on the acquired text to be compared to obtain a target classification number and several similar texts; compares the keyword set to be compared with the similar keyword set, and determines several non-public keyword sets that are not included in the similar keyword set from the several keyword sets to be compared; compares the non-public keyword set with the regular keyword set corresponding to the text to be compared, and determines several non-similar keyword sets that are not included in the regular keyword set from the several non-public keyword sets; constructs a search formula based on a preset search formula construction template, the target classification number and the non-similar keyword set; determines non-overlapping segments from the segments where the several non-similar keywords are located based on the similarity values between the text retrieved by the search formula and the segment where the non-similar keyword set is located; determines non-overlapping segments where the number of similar text appearances is less than a preset number threshold as unique technical segments; determines the text comparison results based on the number of unique technical segments, thereby comprehensively comparing the publicly available text, common content in the field, and semantic classification information to improve the accuracy of the text comparison.
[0012] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0013] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0015] Figure 1 A flowchart of a text comparison method shown as an embodiment of the present application; Figure 2 A flow chart of a method for determining a non-public keyword set according to an embodiment of the present application; Figure 3A flowchart of a method for determining a conventional keyword set is shown as an embodiment of the present application; Figure 4 A schematic block diagram of a text comparison device according to an embodiment of the present application; Figure 5 This is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] To make the objectives, technical solutions, and advantages of this application more clear, the embodiments of this application will be further described in detail below with reference to the accompanying drawings. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.
[0017] It should be understood that the embodiments described in the following examples do not represent all embodiments consistent with this application. Rather, they are merely examples of devices and methods consistent with certain aspects of this application, as detailed in the appended claims. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this application without inventive effort are intended to fall within the scope of protection of this application.
[0018] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates otherwise. In addition, in the description of this application, unless otherwise stated, "a plurality" refers to two or more. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0019] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, this information should not be limited to these terms. Moreover, these terms are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood to indicate or imply relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances. Depending on the context, the words "if" / "if" used in this application can be interpreted as "at the time of" or "when" or "in response to determining".
[0020] With the development of computer technology, a variety of texts have emerged. In the field of patent applications, to facilitate others' understanding of technical solutions or products, people often record the content of their technical solutions or products in the form of text. It is usually necessary to compare the text with other relevant texts to determine whether the text is identical or similar to other relevant texts, thereby providing a basis for evaluating the novelty of the technical solution or product.
[0021] However, most text comparison methods only consider the similarity between the text to be compared and the publicly available text, and fail to make a comprehensive judgment based on other information such as common content in the field, semantic classification, etc., resulting in low text comparison accuracy.
[0022] Therefore, providing a text comparison method with high comparison accuracy is a technical problem that needs to be solved urgently by those skilled in the art.
[0023] The text comparison method of the embodiments of the present application can be executed by a text comparison device. The text comparison device can be implemented through software and / or hardware. The text comparison device can be composed of two or more physical entities or a single physical entity. The hardware referred to by the text comparison device is essentially a computer device. For example, the text comparison device can be a computer, a mobile phone, a tablet, or an intelligent device such as an interactive tablet.
[0024] The following will be combined with the Figures 1 to 3 , the text comparison method provided in the embodiments of this application is introduced in detail.
[0025] See also Figure 1 The text comparison method provided in the embodiment of the present application includes the following steps: Step S101: Perform semantic retrieval on the acquired text to be compared to obtain a target classification number and several similar texts.
[0026] The texts to be compared include, but are not limited to, patent application documents, paper documents, and self-media texts. The texts to be compared can be either encrypted or unencrypted. A patent application document is a document that records the technical solution or product content. A patent application document can be a document submitted in accordance with the patent application format requirements. A patent application document can also be a technical document that records a product or solution.
[0027] When receiving the encrypted text to be compared, the text comparison device can receive all the encrypted text to be compared by the user at one time; the text comparison device can also receive several encrypted fragment files uploaded by the user based on the encrypted file to be compared, decrypt the several encrypted fragment files, obtain several decrypted fragment files, perform document parsing and document merging on the several decrypted fragment files, and obtain the final text to be compared.
[0028] In an embodiment of the present application, when the text to be compared is the text of a patent application to be submitted, the text of the patent application to be submitted is input into a patent database or a scientific text database for semantic retrieval to obtain all texts that are semantically similar to the text of the patent application to be submitted, the similarity values corresponding to all texts, and the classification numbers corresponding to all texts.
[0029] Count the number of texts corresponding to each classification number, sort the number from large to small, and use the classification number before the preset position as the target classification number.
[0030] Arrange all texts by similarity value from large to small, and take several texts within a preset similarity threshold as several similar texts; or arrange all texts by similarity value from large to small, and take several texts before a preset position as several similar texts.
[0031] The classification code may include a patent search classification code, such as an IPC classification code; the classification code may also include a scientific text classification code. Correspondingly, the text database may be a patent database, and the similar texts obtained are patent texts; the text database may also be a scientific text database, and the similar texts obtained are scientific paper texts, etc.
[0032] Step S102: Compare the keyword set to be compared with the similar keyword set, and determine several non-public keyword sets that are not included in the similar keyword set from the several keyword sets to be compared; wherein the keyword set to be compared is the keyword set corresponding to several segments to be compared in the text to be compared; and the similar keyword set is the keyword set corresponding to several similar segments in similar texts.
[0033] In an optional embodiment, before comparing the keyword set to be compared with the similar keyword set in step S102 and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared, the following steps are included: Step S1211: segment the text to be compared according to the punctuation marks in each text to be compared.
[0034] Step S1212: removing stop words and blocked words from the segmented text to be compared, and obtaining a plurality of segments to be compared.
[0035] Step S1213: extract keywords from each segment to be compared to obtain a set of keywords to be compared for each segment to be compared.
[0036] In one optional embodiment, each segment to be compared is input into a keyword extraction model to obtain a set of keywords to be compared for each segment to be compared. In another optional embodiment, each segment to be compared is extracted using a keyword extraction algorithm to obtain a set of keywords to be compared for each segment to be compared.
[0037] As shown in the following example, several segments to be compared of the text to be compared are A1, A2, A3...A7; g1, g2, g3...g17 are keywords, then keyword feature extraction is performed on segment A1 to be compared to obtain keyword g1 and keyword g2, which are used as the keyword set to be compared for segment A1; keyword feature extraction is performed on segment A2 to be compared to obtain g1, g3, g4 and g5..., which are used as the keyword set to be compared for segment A2, thereby obtaining the keyword set to be compared for each segment to be compared.
[0038] A1=(g1,g2); A2=(g1,g3,g4,g5); A3=(g1,g6,g7,g8,g12); A4=(g10,g11); A5=(g12,g13,g7); A6=(g14,g15,g16); A7=(g1,g17).
[0039] The embodiment of the present application segments each text to be compared according to the punctuation marks to obtain a number of segments to be compared, and then determines a keyword set based on the several comparison segments, which can improve the accuracy of subsequent text comparison.
[0040] In an optional embodiment, before comparing the keyword set to be compared with the similar keyword set in step S102 and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared, the following steps are included: Step S1221: Divide the preset content of each similar text into natural paragraphs.
[0041] Step S1222: Remove stop words and blocked words from each similar text after division to obtain a plurality of first segments.
[0042] Step S1223: extract keywords from each first segment to obtain a similar keyword set for each first segment.
[0043] Step S1224: The first segment whose similarity value with the text to be compared is within a preset range is determined as a similar segment, and a similar keyword set of the similar segment is obtained.
[0044] Among them, the similar texts extracted based on the patent database are all patent texts, and the patent text has already provided detailed descriptions of the entire patent in the specification and abstract. Therefore, in order to reduce repeated comparisons, the preset content of the similar text in the embodiment of this application is the specification and abstract content in the patent text.
[0045] In an optional embodiment, each similar segment is input into a keyword extraction model to obtain a similar keyword set for each similar segment. In another optional embodiment, each similar segment is extracted by a keyword extraction algorithm to obtain a similar keyword set for each similar segment.
[0046] As shown in the following example, similar segments are P1, P2, P3...Pn; g1, g2, g3...gn are keywords, then similar keywords obtained by performing keyword feature extraction on similar segment P1 include g1, g3, g4..., and a similar keyword set of similar segment P1 is obtained; similar keywords obtained by performing keyword feature extraction on similar segment P2 include g1, g3, g4..., and a similar keyword set of similar segment P1 is obtained, thereby obtaining similar keyword sets of each similar segment.
[0047] P1=(g1, g3, g4....) P2=(g1,g3,g4....) P3=(g1,g6,g8....) .... Pn=....
[0048] The embodiment of the present application divides the preset content of each similar text into natural paragraphs to obtain several first segments, and only determines the similar keyword set based on the segments whose similarity values with the text to be compared are within a preset range, which can improve the efficiency of subsequent text comparison.
[0049] In an optional embodiment, the step of determining the first segment having a similarity value with the text to be compared within a preset range as a similar segment and obtaining a similar keyword set of the similar segment in step S1224 includes: Step S1241: performing vectorization processing on each first segment and the text to be compared respectively.
[0050] Step S1242: Determine the cosine value of the angle between each vectorized first segment and the text to be compared as the similarity value between each first segment and the text to be compared.
[0051] Step S1243: Arrange the similarity values between each first segment and the text to be compared from large to small, determine the first segment arranged before the preset position as a similar segment, and obtain a similar keyword set of the similar segment.
[0052] In the embodiment of the present application, the cosine value of the angle between each first segment and the text to be compared is determined as the similarity value between each first segment and the text to be compared, and the first segment arranged before the preset position is determined as the similar segment, so that the similar keyword set of the similar segment can be quickly and accurately determined.
[0053] Step S103: Compare the non-public keyword set with the regular keyword set corresponding to the text to be compared, and determine several non-similar keyword sets that are not included in the regular keyword set from the several non-public keyword sets; the regular keyword set is determined based on the number of occurrences of each keyword in the similar text corresponding to the text to be compared.
[0054] It is understandable that if there is no keyword in the non-public keyword set that is different from all keywords in the regular keyword set, it means that the content of the non-public segment where the non-public keyword set is located is regular technical content, and the non-public segment can be considered as regular content.
[0055] If there are keywords in the non-public keyword set that are different from all keywords in the regular keyword set, it means that the content of the non-public segment where the non-public keyword set is located is not entirely regular technical content, and the corresponding non-public keyword set is determined to be a non-similar keyword set.
[0056] Step S104: Based on the preset search formula construction template, target classification number and non-similar keyword set, a search formula is constructed, and based on the similarity value between the text retrieved by the search formula and the segment where the non-similar keyword set is located, non-overlapping segments are determined from the segments where several non-similar keyword sets are located.
[0057] All non-similar keywords in one of the non-similar keyword sets are selected as search segmentation information, and a search formula is constructed based on a preset search formula construction template, search segmentation information, and target classification number. The search formula is input into a text search database for retrieval. If the number of retrieved texts is less than a preset number threshold, one non-similar keyword is reduced from the selected non-similar keywords and re-used as search segmentation information. The search formula is then re-constructed based on the search formula construction template, search segmentation information, and innovation subject information for retrieval. The re-constructed search formula is re-input into the text search database for retrieval until the number of retrieved texts is greater than or equal to the preset number threshold. The similarity value between the retrieved text and the segment where the corresponding non-similar keyword set is located is then determined, and whether the segment where the non-similar keyword is located is a non-overlapping segment is determined. In this way, all non-similar keywords in the remaining other non-similar keyword set are selected as search segmentation information, and a search formula is constructed based on the preset search formula construction template, search segmentation information, and target classification number. The search formula is input into a text search database for retrieval until it is determined whether the segments where all non-similar keyword sets are located are non-overlapping segments.
[0058] In the patent text comparison of this embodiment, the scope of the searched documents covers the abstract, claims, and specifications. When searching based on the search segmentation information, the search is to see whether the content of the abstract, claims, and specifications contains all the keywords in the search segmentation information. Specifically, the search can be performed first from the abstract, then from the claims, and finally from the specifications. Based on this principle, when constructing a search formula, it can be constructed according to the search formula construction rules of the text search database, and there is no specific limitation.
[0059] Specifically, if the search rules commonly used in existing patent search databases are used, those skilled in the art will understand that the characteristic segmentations should be combined in an "and" relationship. For example, if the search segmentation information contains n non-similar keywords, the search formula formed by the search segmentation information is "non-similar keyword 1 and non-similar keyword 2 and non-similar keyword 3....and non-similar keyword n". Furthermore, in combination with the scope of the search documents, such as the abstract, claims, and specification, and the scope of the subject of innovation, the search formula may be "(abstract = non-similar keyword 1 and non-similar keyword 2 and non-similar keyword 3....and non-similar keyword n) or (claims = non-similar keyword 1 and non-similar keyword 2 and non-similar keyword 3....and non-similar keyword n) or (specification = non-similar keyword 1 and non-similar keyword 2 and non-similar keyword 3....and non-similar keyword n) and (classification number = target classification number)". Based on this principle, those skilled in the art will understand that the search formula construction method mentioned in this embodiment is mainly for auxiliary explanation, and the specific means of constructing the search formula in the embodiments of this application can be set according to specific circumstances.
[0060] In an optional embodiment, the step of determining non-overlapping segments from the segments containing a plurality of non-similar keywords based on similarity values between the text retrieved by the search formula and the segments containing the non-similar keyword set in step S104 includes: Step S1041: If the similarity between the retrieved text and the segment where the non-similar keyword set is located is less than a preset similarity threshold, the segment where the corresponding non-similar keyword set is located is determined as a non-overlapping segment.
[0061] The embodiment of the present application obtains the similarity value between the text retrieved by the search formula and the segment where the non-similar keyword set is located. If the highest similarity value is less than the preset similarity threshold, it means that there is no content similar or identical to the segment where the non-similar keyword is located, and the segments where several non-similar keywords are located are determined to be non-overlapping segments; if the highest similarity value is greater than or equal to the preset similarity threshold, it means that there is content similar or identical to the segment where the non-similar keyword is located, and the segments where several non-similar keywords are located are determined to be overlapping segments, thereby further excluding segments that are similar or identical to those in the relevant text and improving the accuracy of text comparison.
[0062] Step S105: determining non-overlapping segments in which the number of similar texts that appear is less than a preset threshold as unique technical segments.
[0063] Obtain the number of times each non-overlapping segment appears in all similar texts. If the number is less than the preset threshold, it means that the corresponding non-overlapping segment is used very rarely, and it can be indirectly determined that there is no segment that is identical or similar to the non-overlapping segment, and the non-overlapping segment is a unique technical segment; if the number is less than the preset threshold, it means that the corresponding non-overlapping segment is used a lot, and it can be indirectly determined that there is a segment that is identical or similar to the non-overlapping segment.
[0064] Step S106: Determine the text comparison result based on the number of unique technical segments.
[0065] In an optional embodiment, the number of target segments is compared with a preset number threshold; if the number of target segments is greater than or equal to the preset number threshold, the text comparison result is determined to be a first text comparison result; if the number of target segments is less than the preset number threshold, the text comparison result is determined to be a second text comparison result. The first text comparison result is used to indicate that the text to be compared is not identical or similar to the relevant text. The second text comparison result is used to indicate that the text to be compared is identical or similar to the relevant text.
[0066] The embodiment of the present application performs semantic retrieval on the acquired text to be compared to obtain a target classification number and several similar texts; compares the keyword set to be compared with the similar keyword set, and determines several non-public keyword sets that are not included in the similar keyword set from the several keyword sets to be compared; compares the non-public keyword set with the regular keyword set corresponding to the text to be compared, and determines several non-similar keyword sets that are not included in the regular keyword set from the several non-public keyword sets; constructs a search formula based on a preset search formula construction template, the target classification number and the non-similar keyword set; determines non-overlapping segments from the segments where the several non-similar keywords are located based on the similarity values between the text retrieved by the search formula and the segments where the non-similar keyword set is located; determines non-overlapping segments where the number of similar text appearances is less than a preset number threshold as unique technical segments; determines the text comparison result based on the number of unique technical segments, and performs text comparison based on the comprehensive disclosure of the text, common content in the field, and semantic classification information to improve the accuracy of the text comparison.
[0067] See also Figure 2 In an optional embodiment, the step of comparing the keyword set to be compared with the similar keyword set in step S102 and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared includes: Step S1021: Determine a similar segment whose similarity value with the text to be compared is within a preset range as a target segment, and obtain a target keyword set of the target segment.
[0068] Step S1022: determining a keyword set to be compared having keywords that are different from all keywords in the target keyword set from among the plurality of keyword sets to be compared, and determining the corresponding keyword set to be compared as a non-public keyword set.
[0069] It can be understood that if there is no keyword in the keyword set to be compared that is different from all the keywords in the target keyword set, it means that there is text or paragraph that is the same or similar to the segment to be compared, and further indicates that the content of the segment to be compared where the keyword set to be compared is located is all disclosed by similar text, then the segment to be compared can be considered a public segment.
[0070] If there are keywords in the keyword set to be compared that are different from all the keywords in the target keyword set, it means that there is no text or paragraph that is identical or similar to the segment to be compared, which further means that the content of the segment to be compared where the keyword set to be compared is located is not fully disclosed by similar texts. In this case, the corresponding keyword set to be compared is determined to be a non-public keyword set, and the segment to be compared is an undisclosed segment.
[0071] As shown in the following example, if the target keyword set of the target segment is the following set: P1=(g1,g2,g3,g4,g5,g6,g10,g11,g17); P2=(g1,g2,g10,g11,g12,g13,g17); P3=(g1,g6,g7,g8,g9,g10,g11); .... P20=(.....) Then all the keywords of A1, A2, A4, A7 in the to-be-compared segments are in P1, P2...P20, the keyword set corresponding to A1, A2, A4, A7 in the to-be-compared segments is the public keyword set, and the segment corresponding to A1, A2, A4, A7 is the public segment; if there are keywords in A3, A5, A6 in the to-be-compared segments that are not in P1, P2...P20, then A3, A5, A6 in the to-be-compared segments are the non-public keyword set, and A3, A5, A6 in the to-be-compared segments are the non-public segment.
[0072] In the embodiment of the present application, a keyword set to be compared in which all keywords are different from those in the target keyword set is determined as a non-public keyword set, which can improve the efficiency of identifying the non-public keyword set.
[0073] In an optional embodiment, step S103 compares the non-public keyword set with the regular keyword set corresponding to the text to be compared, and determines, from the plurality of non-keyword sets, a plurality of non-similar keyword sets that are not included in the regular keyword set, including: Step S1031: determining that there is a non-public keyword set whose keywords are different from all keywords in the regular keyword set, and determining the corresponding non-public keyword set as a non-similar keyword set.
[0074] In the embodiment of the present application, a non-public keyword set having keywords that are different from all keywords in a regular keyword set is determined as a non-similar keyword set, which can improve the efficiency of identifying non-similar keyword sets.
[0075] See also Figure 3 ,In an optional embodiment, the text comparison method further includes step S131: determining a set of regular keywords; ,Step S131 : determining a set of regular keywords includes; Step S1311: performing keyword extraction processing on the preset contents of all similar texts to obtain a number of target keywords, the total number of occurrences of each target keyword in all similar texts, and the number of similar texts in which each target keyword appears; Step S1312: If the number of similar texts containing the target keyword is greater than a first preset ratio of the number of all similar texts, and the total number of occurrences of the target keyword in all similar texts is greater than a second preset ratio of the number of similar texts containing the target keyword, the target keyword is determined as a candidate keyword; Step S1313: Obtain the ratio of the total number of times each candidate keyword appears in all similar texts to the number of similar texts containing the corresponding candidate keyword, arrange the ratios from large to small, determine the candidate keywords ranked before the preset position as regular keywords, and obtain a regular keyword set.
[0076] Among them, the first preset ratio value, the second preset ratio value and the preset position can be limited according to actual needs, and this application does not impose any restrictions.
[0077] The embodiment of the present application determines the target keyword based on the total number of occurrences of the keyword in the file to be compared and the number of similar texts in which the keyword is located, thereby improving the accuracy of target keyword extraction.
[0078] In order to comprehensively and objectively test the effectiveness and reliability of the text comparison method of the present application, the embodiments of the present application prepare test data, and use the text comparison method provided in the embodiments of the present application to detect the test data, so as to determine whether the text is identical or similar to other related texts, so as to provide a basis for evaluating the novelty and creativity of the text.
[0079] (1) Test data Collect 50 patent application texts covering different fields (such as computers, mechanical engineering, electronic information, biomedicine, etc.) and different types. These text samples should be representative and cover all possible text contents and structural features to ensure that the test results have wide applicability.
[0080] Construct or utilize a database containing a vast amount of publicly available texts as a reference search library during the text comparison process. In this example, a mature commercial patent database is used. This database should cover texts in the same field as the text samples to be compared, and the number of texts should exceed 100 million. This ensures sufficient data for comparative analysis in the actual comparison, thereby more accurately assessing the novelty and inventiveness (hereinafter referred to as novelty) of the compared texts.
[0081] (2) Test cases: The following test cases were designed to test the test data to comprehensively evaluate the performance of the text comparison method in the embodiment of the present application: Use case 1: Normal application text Test objective: To verify whether the text comparison method of the embodiment of this application can accurately identify unique technical segments and determine the novelty of the text when processing patent application text with novelty.
[0082] Test data: Collect 20 authorized patent texts of different fields and types from the patent database, and use these 20 authorized patent texts as normal application texts.
[0083] Use case 2: Abnormal application text Test objective: To verify whether the text comparison method of the embodiment of this application can accurately identify the parts similar to the existing text when processing the patent application text that does not have novelty, and determine whether the text is insufficiently novel.
[0084] Test data: 30 patent application texts from different fields and types that were rejected due to lack of novelty were collected from the patent database.
[0085] (3) Test results Test results for use case 1 The test was conducted based on 20 normal application texts. During the test, the text comparison range of the normal application texts in the patent database was the texts disclosed before the application date of each patent. The final test result was that these 20 normal application texts were all judged to be highly novel. At this time, it can be considered that the test results of the 20 normal application texts are consistent with the actual results, proving that this method has a high accuracy rate when processing texts with novelty.
[0086] Test results for use case 2 Based on 30 abnormal application texts that were rejected for lack of novelty, the text comparison range of the abnormal application texts in the patent database during the test was the texts disclosed before the application date of each patent. The final test result was that 27 samples of these 30 abnormal application texts were judged to have low novelty, and 3 were judged to have medium novelty. In addition, the method found more identical technical paragraphs than the paragraphs in the examination opinion documents, and about 70% of the paragraphs in the examination opinion documents existed in the identical paragraphs found by this method, indicating that the test results of the 30 abnormal application texts by this method are consistent with the actual results.
[0087] (4) Test conclusion In summary, through testing and evaluation of test data, the text comparison method of the present invention has demonstrated significant performance advantages in identifying unique technical segmentation of text and judging the novelty of text, effectively improving the accuracy of text comparison results, and showing good adaptability and stability in different types of text processing scenarios.
[0088] Therefore, the text comparison method of the present invention is an efficient, accurate and reliable text comparison technology, which has broad application prospects and practical application value.
[0089] See also Figure 4 , which is a schematic diagram of the structure of the text comparison device provided in the second embodiment of the present application. The device 200 includes: The text determination module 201 is used to perform semantic retrieval on the acquired text to be compared, and obtain a target classification number and a number of similar texts; The non-public keyword set determination module 202 is configured to compare the keyword set to be compared with the similar keyword set, and determine a number of non-public keyword sets that are not included in the similar keyword set from the plurality of keyword sets to be compared; wherein the keyword set to be compared is a keyword set corresponding to a plurality of segments to be compared in the text to be compared; and the similar keyword set is a keyword set corresponding to a plurality of similar segments in similar texts; The non-similar keyword set determination module 203 is configured to compare the non-public keyword set with the regular keyword set corresponding to the text to be compared, and determine, from the plurality of non-public keyword sets, a plurality of non-similar keyword sets that are not included in the regular keyword set; the regular keyword set is determined based on the number of occurrences of each keyword in the similar text corresponding to the text to be compared; The non-overlapping segment determination module 204 is configured to construct a search formula based on a preset search formula construction template, a target classification number, and a non-similar keyword set; and to determine non-overlapping segments from the segments containing a plurality of non-similar keywords based on similarity values between the text retrieved by the search formula and the segments containing the non-similar keyword set; A unique technical segment determination module 205 is configured to determine non-overlapping segments in which the number of similar text occurrences is less than a preset number threshold as unique technical segments; The text comparison result determination module 206 is configured to determine the text comparison result based on the number of unique technical segments.
[0090] It should be noted that the text comparison device provided in the second embodiment of the present application only uses the division of the above-mentioned functional modules as an example when executing the text comparison method. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the text comparison device provided in the second embodiment of the present application and the text comparison method of the first embodiment of the present application are of the same concept. The implementation process thereof is detailed in the method embodiment and will not be repeated here.
[0091] The embodiment of the text comparison device of the second embodiment of the present application can be applied to a computer device, and the embodiment of the device can be implemented by software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the file processing in which it is located reading the corresponding computer program instructions in the memory and running them. From the hardware level, the computer device in which it is located may include a processor and a memory, and the processor and the memory are connected via a data bus or other well-known methods.
[0092] See also Figure 5 , is a schematic diagram of the structure of the electronic device provided in the third embodiment of the present application. Figure 5 As shown, the electronic device 300 can be specifically a computer, a mobile phone, a tablet computer, an interactive tablet, etc. The electronic device 300 can include: at least one processor 310, at least one memory 320, at least one display 330, at least one network interface 340, a user interface 350 and at least one communication bus 360.
[0093] The communication bus 360 is used to implement the connection and communication between these components.
[0094] The user interface 350 may include a display screen and a camera; the user interface 350 may also include a standard wired interface and a wireless interface.
[0095] The network interface 340 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0096] The processor 310 may include one or more processing cores. The processor 310 utilizes various interfaces and circuits to connect various components within the electronic device 300. It executes instructions, programs, code sets, or instruction sets stored in the memory 320, and accesses data stored in the memory 320 to perform various functions and process data within the electronic device 300. Optionally, the processor 310 may be implemented in hardware using at least one of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 310 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display layer; and the modem handles wireless communications. It is understood that the modem may also be implemented as a separate chip, rather than integrated into the processor 310.
[0097] Among them, the memory 320 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 320 includes a non-transitory computer-readable storage medium. The memory 320 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 320 may also be optionally at least one storage device located away from the aforementioned processor 310. As Figure 5 As shown, the memory 320 as a computer storage medium may include an operating system, a network communication module, and a user.
[0098] exist Figure 5In the electronic device 300 shown, the user interface 350 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 310 can be used to call the operating application of the text comparison method stored in the memory 320, for example: an entry program based on the text comparison method; and execute the relevant operations of any text comparison method in the above embodiments, with corresponding functions and beneficial effects.
[0099] A fourth embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, with instructions suitable for being loaded by a processor and executing the steps of the text comparison method described above. The specific execution process can be referred to the specific description of the embodiment and is not described here in detail. The device where the storage medium resides can be a personal computer, laptop computer, smartphone, tablet computer, or other electronic device.
[0100] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separated, and the parts shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0101] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.
[0104] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0105] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0106] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0107] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0108] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A text comparison method, characterized in that: The steps include: Perform semantic retrieval on the obtained text to be compared to obtain the target classification number and several similar texts; Comparing the keyword set to be compared with the similar keyword set, and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared; wherein the keyword set to be compared is a keyword set corresponding to a plurality of segments to be compared in the text to be compared; and the similar keyword set is a keyword set corresponding to a plurality of similar segments in the similar text; Comparing the non-public keyword set with a regular keyword set corresponding to the text to be compared, and determining a plurality of non-similar keyword sets not included in the regular keyword set from the plurality of non-public keyword sets; the regular keyword set is determined based on the number of occurrences of each keyword in a similar text corresponding to the text to be compared; Constructing a search formula based on a preset search formula construction template, the target classification number, and the non-similar keyword set; determining non-overlapping segments from the segments where the non-similar keywords are located based on similarity values between the text retrieved by the search formula and the segments where the non-similar keyword set is located; Determine non-overlapping segments where the number of times the similar text appears is less than a preset threshold as unique technical segments; The text comparison result is determined based on the number of the unique technical segments.
2. The text comparison method according to claim 1, wherein: The step of comparing the keyword set to be compared with the similar keyword set and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared includes: Determine a similar segment whose similarity value with the text to be compared is within a preset range as a target segment, and obtain a target keyword set of the target segment; From a plurality of keyword sets to be compared, a keyword set to be compared having keywords that are different from all keywords in the target keyword set is determined, and the corresponding keyword set to be compared is determined as a non-public keyword set.
3. The text comparison method according to claim 1, wherein: The step of comparing the non-public keyword set with the regular keyword set corresponding to the text to be compared, and determining a plurality of non-similar keyword sets not included in the regular keyword set from the plurality of non-keyword sets, comprises: It is determined that there is a non-public keyword set whose keywords are different from all the keywords in the regular keyword set, and the corresponding non-public keyword set is determined as a non-similar keyword set.
4. The text comparison method according to claim 1, wherein: The method further includes determining a set of conventional keywords; the step of determining the conventional keywords includes: Perform keyword extraction processing on the preset contents of all similar texts to obtain a number of target keywords, the total number of occurrences of each target keyword in all similar texts, and the number of similar texts in which each target keyword appears; If the number of similar texts containing the target keyword is greater than a first preset ratio value of the number of all similar texts, and the total number of occurrences of the target keyword in all similar texts is greater than a second preset ratio value of the number of similar texts containing the target keyword, the target keyword is determined as a candidate keyword; Obtain the ratio of the total number of occurrences of each candidate keyword in all similar texts to the number of similar texts containing the corresponding candidate keyword, arrange the ratios from large to small, determine the candidate keywords before the preset position as regular keywords, and obtain a regular keyword set.
5. The text comparison method according to claim 1, wherein: The step of determining non-overlapping segments from the segments where the non-similar keywords are located based on the similarity values between the text retrieved by the search formula and the segments where the non-similar keyword set is located comprises: If the similarity value between the retrieved text and the segment where the non-similar keyword set is located is less than a preset similarity threshold, the segment where the corresponding non-similar keyword set is located is determined as a non-overlapping segment.
6. The text comparison method according to any one of claims 1 to 5, characterized in that: Before the step of comparing the keyword set to be compared with the similar keyword set and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared, the method includes: Segmenting the text to be compared according to the punctuation marks of each text to be compared; The segmented text to be compared is processed by removing stop words and blocked words to obtain a plurality of segments to be compared; Keyword extraction is performed on each of the segments to be compared to obtain a set of keywords to be compared for each of the segments to be compared.
7. The text comparison method according to any one of claims 1 to 5, characterized in that: Before the step of comparing the keyword set to be compared with the similar keyword set and determining a plurality of non-public keyword sets not included in the similar keyword set from the plurality of keyword sets to be compared, the method includes: Divide the preset content of each similar text into natural paragraphs; Removing stop words and blocked words from each of the divided similar texts to obtain a plurality of first segments; Perform keyword extraction on each of the first segments to obtain a similar keyword set for each of the first segments; The first segment having a similarity value with the text to be compared within a preset range is determined as a similar segment, and a similar keyword set of the similar segment is obtained.
8. A text comparison device, characterized in that: include: The text determination module is used to perform semantic retrieval on the obtained text to be compared, and obtain the target classification number and several similar texts; a non-public keyword set determination module, configured to compare a keyword set to be compared with a similar keyword set, and determine, from among the plurality of keyword sets to be compared, a plurality of non-public keyword sets that are not included in the similar keyword set; wherein the keyword set to be compared is a keyword set corresponding to a plurality of segments to be compared in the text to be compared; and the similar keyword set is a keyword set corresponding to a plurality of similar segments in the similar text; a non-similar keyword set determination module, configured to compare the non-public keyword set with a conventional keyword set corresponding to the text to be compared, and determine, from the plurality of non-public keyword sets, a plurality of non-similar keyword sets not included in the conventional keyword set; the conventional keyword set is determined based on the number of occurrences of each keyword in a similar text corresponding to the text to be compared; a non-overlapping segment determination module, configured to construct a search formula based on a preset search formula construction template, the target classification number, and the non-similar keyword set; and determine non-overlapping segments from the segments containing a plurality of non-similar keywords based on similarity values between the text retrieved by the search formula and the segments containing the non-similar keyword set; A unique technical segment determination module, configured to determine non-overlapping segments that appear in the similar text less than a preset number threshold as unique technical segments; The text comparison result determination module is used to determine the text comparison result according to the number of the unique technical segments.
9. An electronic device comprising a processor and a memory; characterized in that: The memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the text comparison method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the text comparison method according to any one of claims 1 to 7 is implemented.