Method for calculating patent relevancy based on large model
By cutting patents as both overall and local invention points based on generative large-scale models and calculating local similarity using multi-vector matching algorithms, the problem of local similarity not being considered in the prior art is solved, and the accuracy and retrieval efficiency of patent correlation calculation are improved.
Patent Information
- Application Number
- CN202510961750.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-07-14
AI Technical Summary
The prior art cannot effectively consider local similarity when calculating patent relevance, resulting in low accuracy of search results. Especially for patents containing multiple invention points, the overall similarity is low, resulting in missed inspection.
By constructing a patent invention point extraction algorithm based on a generative large model, the patent is cut into overall and local invention points, and the similarity of local invention points is calculated using a multi-vector matching algorithm, combining the patent text vectorization model to improve the quality of document vectorization and improve the accuracy of patent correlation calculation.
It realizes that local invention points are taken into account when calculating patent relevance, improves text vectorization quality and patent relevance calculation accuracy, and improves retrieval efficiency and recall rate.
Smart Images

Figure CN120470109A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of AI model technology, and in particular to a method for calculating patent relevance based on a large model. Background Art
[0002] Currently, when searching for patents, semantic engine technology can be used to sort search results by calculating patent relevance, prioritizing patents with high relevance. This method has indeed improved the efficiency of patent searches to a certain extent, especially for patents with more than 70% overall relevance. However, when comparing patents with partial relevance, the overall similarity is low, leading to inaccurate sorting, which can lead to missed detections and, in turn, low reliability in search results. Furthermore, a single invention can contain multiple inventive points. If only a single vector is used to represent a patent, even if two patents are partially related, the correlation may not be very high. Therefore, calculating patent relevance based on a large model is a very important issue.
[0003] Based on this, this specification provides a method for calculating patent relevance based on a large model. Summary of the Invention
[0004] In order to solve the technical problems that the existing technology cannot calculate the degree of association based on the local similarity of two patent documents and the quality of patent document vectorization is low, the present invention proposes a method for calculating patent relevance based on a large model. The patent is divided according to the invention point extraction algorithm constructed based on the generative large model to generate overall invention points and local invention points, and a multi-vector matching algorithm is used to calculate the similarity involving local invention points, so as to incorporate the local similarity of the two patent documents into the calculation of the patent correlation degree, and the large model of the patent text vectorization model is used to improve the quality of patent document vectorization, and ultimately improve the accuracy of patent relevance calculation.
[0005] This specification provides a method for calculating patent relevance based on a large model, including: S1: Extracting the overall and local invention points of the patent to be calculated: Obtain two patents to be calculated, build a patent invention point extraction algorithm based on the generative large model, and then segment each patent to be calculated based on the patent invention point extraction algorithm to obtain the overall invention point and local invention point corresponding to each patent to be calculated; S2: Invention point vectorization: Using the patent text vectorization model built based on the large model, the overall invention point and the local invention point of each patent to be calculated are vectorized respectively to obtain the overall feature vector and the local feature vector of each patent to be calculated, forming the feature vector set of each patent to be calculated; S3: Multi-vector matching and correlation calculation: Using a multi-vector matching algorithm, extract a feature vector from each of the two feature vector sets to form a matching pair, calculate the feature similarity of all the matching pairs of the two patents to be calculated, construct a feature similarity matrix, and determine the patent correlation of the two patents to be calculated based on the feature similarity matrix.
[0006] Optionally, in S1, based on the patent invention point extraction algorithm, each patent to be calculated is segmented to obtain the overall invention points and local invention points corresponding to each patent to be calculated, specifically including: S11: Extract key terms: Based on the pre-built patent knowledge graph, extract key terms that match the patent knowledge graph from each patent to be calculated; S12: Generate overall invention points: Use the first prompt word template to combine each patent to be calculated and the extracted key terms of each patent to be calculated, and input them into the first generative model to obtain the overall invention points corresponding to each patent to be calculated; S13: Generate local invention points: Determine the number of times the key terms of each patent to be calculated appear in each paragraph of each patent to be calculated, and determine the local invention points corresponding to each patent to be calculated based on the determined number of times corresponding to each paragraph and the weight corresponding to the key terms of each patent to be calculated.
[0007] Optionally, the nodes in the patent knowledge graph in S11 represent key terms, and the edges represent the relationships between the key terms.
[0008] Optionally, the step S13 of determining the local invention point corresponding to each patent to be calculated based on the determined number of occurrences of each paragraph and the weight corresponding to the key term of each patent to be calculated specifically includes: S131: Initializing the processing state corresponding to each paragraph of each patent to be calculated to a first state; S132: When the processing state of each paragraph of each patent to be calculated is the first state, determining the importance of each paragraph of each patent to be calculated according to the weight corresponding to the key term of each patent to be calculated and the number of times the key term of each patent to be calculated appears in each paragraph of each patent to be calculated; S133: Adjacent paragraphs are combined according to the importance corresponding to each paragraph of each patent to be calculated, and the shortest paragraph group of each patent to be calculated is determined as a patent fragment. The patent fragment is generated under the following conditions: the importance of the patent fragment of each patent to be calculated is greater than half of the sum of the weights of all key terms of each patent to be calculated; the importance of the patent fragment is generated by adding the importance corresponding to each paragraph in the patent fragment; S134: setting the processing state of the paragraphs in the shortest paragraph group of each patent to be calculated to the second state, and adjusting the weight values of the key terms hit in the shortest paragraph group of each patent to be calculated to half of the current weight; S135: Repeat steps S132-S134, and based on the weight values of the key terms adjusted in S134, recalculate the importance of each paragraph and determine the patent fragments of the current cycle, until the number of executions reaches the set threshold or new patent fragments cannot be generated, and then use the second generative large model based on the patent fragments of each patent to be calculated to determine the local invention points of each patent to be calculated.
[0009] Optionally, in S135, based on each patent fragment of each patent to be calculated, the second generative model is used to determine each local invention point of each patent to be calculated, specifically including: When the patent fragment of the patent to be calculated exceeds the specified length, the second prompt word template is spliced with the patent fragment and input into the second generative model to shorten the length of the patent fragment through the second generative model to obtain the local invention point corresponding to the patent fragment; When the patent segment of the patent to be calculated does not exceed the limited length, the patent segment is regarded as a local invention point.
[0010] Optionally, the first prompt word template in S12 includes first role information, first input requirement, first output requirement, a slot corresponding to the first input content, and a slot corresponding to the key term; the second prompt word template in S135 includes second role information, second output requirement, a slot corresponding to the second input content, and a slot corresponding to the key term.
[0011] Optionally, in the process of generating local invention points in S13, the first local invention point generated is the main invention point, and the local invention points other than the main invention point are secondary invention points.
[0012] Optionally, the patent text vectorization model in S2 may be one of a general text vectorization large model and a fine-tuned general text vectorization large model; The S2 specifically includes: Input the overall invention point and the local invention point of each patent to be calculated into the patent text vectorization model constructed based on the large model, respectively, to obtain the overall feature vector and the local feature vector of each patent to be calculated; A feature vector set of each patent to be calculated is constructed based on the overall feature vector and the local feature vector of each patent to be calculated.
[0013] Optionally, in S3, a multi-vector matching algorithm is used to extract a feature vector from each of the two feature vector sets to form a matching pair, and the feature similarity of the matching pairs of the two patents to be calculated is calculated. Constructing a feature similarity matrix specifically includes: S31: The two patents to be calculated are respectively used as a first patent to be calculated and a second patent to be calculated, and the overall feature vector and the local feature vector of the first patent to be calculated are used as first feature vectors, and the overall feature vector and the local feature vector of the second patent to be calculated are used as second feature vectors; S32: Combine each first eigenvector in the first eigenvector set of the patent to be calculated with each second eigenvector in the second eigenvector set of the patent to be calculated to obtain matching pairs, and calculate the feature similarity between the first eigenvector and the second eigenvector in each matching pair to construct a feature similarity matrix.
[0014] Optionally, determining the patent relevance of the two patents to be calculated according to the feature similarity matrix in S3 specifically includes: S33: Determine a similarity weight corresponding to each matching pair according to the weights corresponding to the first feature vector and the second feature vector in each matching pair; S34: determining the maximum feature similarity among the feature similarities of the matching pairs according to the feature similarity matrix, and determining a similarity weight corresponding to the maximum feature similarity, and using the similarity weight as the maximum similarity weight; S35: From the matching pairs, determining matching pairs that meet the target condition and using them as target matching pairs; each target matching pair includes a different first feature vector and a different second feature vector, and the sum of the feature similarities of the target matching pairs is the largest; S36: Calculate the patent relevance of the two patents to be calculated based on the maximum feature similarity, the maximum similarity weight, the feature similarity of each target matching pair, and the similarity weight of each target matching pair.
[0015] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects: The present invention proposes a method for calculating patent relevance based on a large model, which realizes the consideration of local invention points when calculating patent relevance, as well as the improvement of the quality of text vectorization. Specifically, each patent to be calculated can be cut separately by a patent invention point extraction algorithm constructed based on a generative large model to extract the overall invention points and local invention points of each patent to be calculated, and the overall invention points and local invention points of each patent to be calculated can be vectorized separately by a large model such as a patent text vectorization model to obtain the overall feature vector and local feature vector of each patent to be calculated, so as to improve the vectorization quality of patent documents through the patent text vectorization model. Then, a multi-vector matching algorithm is used to calculate the similarity involving local invention points, so as to incorporate the local invention points of two patent documents into the calculation of the degree of patent association. At the same time, the overall invention points and local invention points extracted are vectorized by a large model such as a patent text vectorization model to improve the vectorization quality of patent documents, and ultimately improve the accuracy of patent relevance calculation.
[0016] When obtaining the overall invention points and local invention points, the present invention can first extract key terms that match the patent knowledge graph from each patent to be calculated through the patent knowledge graph. The nodes in the patent knowledge graph represent key terms, and the edges represent the relationship between key terms. Since the patent knowledge graph contains a large amount of search information entered when searching patents, that is, it contains a large number of keywords (i.e., key terms) used when searching patents, the key terms of each patent to be calculated can be proposed through the patent knowledge graph, which helps to improve the accuracy of the overall invention points and local invention points determined subsequently.
[0017] When obtaining the overall invention point, the present invention can use a first prompt word template to concatenate each patent to be calculated and each key term of each patent to be calculated, and input this into the first generative model to obtain the overall invention point corresponding to each patent to be calculated. The first prompt word template and key terms prompt the first generative model to extract the overall invention point from each patent to be calculated, thereby improving the accuracy of determining the overall invention point. Furthermore, the first prompt word template includes role information, input requirements, output requirements, slots corresponding to the input content, and slots corresponding to the key terms. The structure of the first prompt word template can better prompt the first generative model on how to extract the overall invention point, and it also limits the output of the first generative model, making the output overall invention point more consistent with the requirements.
[0018] When obtaining local invention points, the present invention can calculate the shortest paragraph group of each patent to be calculated by the weight of the key terms of each patent to be calculated and the number of times the key terms appear in each paragraph of each patent to be calculated, and use it as a patent fragment to cover more key terms, improve the accuracy of the local invention points generated subsequently, and determine the local invention points of each patent to be calculated based on the patent fragment of each patent to be calculated. In addition, when determining local invention points based on patent fragments, when the patent fragment exceeds the specified length, the second prompt word template can be spliced with the patent fragment and input into the second generative model to reduce the length of the patent fragment through the second generative model to obtain the local invention points corresponding to the patent fragment, so that the length of the generated local invention points meets the input requirements of subsequent vectorization. The second prompt word template includes role information, output requirements, slots corresponding to the input content, and slots corresponding to key terms. The second prompt word template prompts the second generative model how to reduce the input patent fragment to ensure that the output local invention points meet the output requirements and do not lose any key information.
[0019] When determining the patent relevance of two patents to be calculated based on the calculated feature similarity, the present invention not only takes into account the feature similarity between each feature vector, but also takes into account the importance of each feature vector. That is, the patent relevance of the two patents to be calculated is determined based on the similarity weight of each matching pair and the feature similarity of each matching pair, so as to improve the accuracy of the determined patent relevance, solve the problem of local correlation between patents, improve the efficiency and recall rate of comparative design search, greatly improve the retrieval efficiency, and improve the quality of the retrieval results. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of a method for calculating patent relevance based on a large model provided in this specification; Figure 2 This is a schematic diagram of a method for calculating patent relevance based on a large model provided in this specification. DETAILED DESCRIPTION
[0021] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] This specification provides a method for calculating patent relevance based on a large model, specifically Figure 1 As shown, Figure 1 The following is a flow chart of a method for calculating patent relevance based on a large model provided in this specification, which specifically includes the following steps: S1: Extract the overall and local invention points of the patent to be calculated: obtain two patents to be calculated, build a patent invention point extraction algorithm based on the generative large model, and based on the patent invention point extraction algorithm, cut each patent to be calculated separately to obtain the overall invention point and local invention point corresponding to each patent to be calculated.
[0023] In this specification, the device used to calculate patent relevance can first extract the overall and local invention points of the patent to be calculated, that is, obtain two patents to be calculated, build a patent invention point extraction algorithm based on the generative large model, and then cut each patent to be calculated based on the patent invention point extraction algorithm to obtain the overall invention points and local invention points corresponding to each patent to be calculated. Among them, the device used to calculate patent relevance can be a server, a system, or an electronic device such as a desktop computer or a laptop computer. For the sake of ease of description, the following only uses the server as the execution body to illustrate a method for calculating patent relevance based on a large model provided in this specification. The type of the above-mentioned patent to be calculated can be an invention or a utility model, and this specification does not make specific restrictions.
[0024] Current attention-based models require the self-attention mechanism to attend to all other positions at each position, resulting in significant computational and storage costs for long text sequences. Consequently, they all impose a certain limit on text length, typically 512 characters. While this limit can be addressed through configuration and source code modifications, the cost-effectiveness is very low, significantly reducing training efficiency. Common strategies for processing long text sequences include chunking, truncation, and sliding windows, but these all lose contextual information. Assuming the model supports a sequence length that fully meets the required patent text length, for example, 100,000 characters, since correlations within patent texts are often local rather than global, vectorizing the entire patent is not an option. Instead, the patent should be segmented by invention point based on the characteristics of the patent text to fundamentally address local correlations. To address this issue, the server can first obtain two patents to be computed and construct a patent invention point extraction algorithm based on a generative large model. Using this algorithm, each patent to be computed is segmented to obtain the global and local invention points corresponding to each patent. Specifically, based on the patent invention point extraction algorithm, when each patent to be calculated is segmented to obtain the overall invention point and local invention point corresponding to each patent to be calculated, the server can execute the following steps: S11: Extract key terms: Based on the pre-built patent knowledge graph, extract key terms that match the patent knowledge graph from each patent to be calculated.
[0025] S12: Generate overall invention points: Use the first prompt word template to splice each patent to be calculated and the extracted key terms of each patent to be calculated, and input them into the first generative model to obtain the overall invention points corresponding to each patent to be calculated.
[0026] S13: Generate local invention points: Determine the number of times the key terms of each patent to be calculated appear in each paragraph of each patent to be calculated, and determine the local invention point corresponding to each patent to be calculated based on the determined number of times corresponding to each paragraph and the weight corresponding to the key terms of each patent to be calculated.
[0027] The patent knowledge graph in S11 is constructed based on the search log information of the patent search system. The nodes in the patent knowledge graph represent key terms, and the edges represent the relationships between key terms. The patent search system accumulates a large amount of search log information. In addition, to avoid the loss of search log information, the search log information in the patent search system can be regularly transferred every month. The search log information contains a large amount of valuable information, that is, the search log information includes a large amount of search information used when searching patents, that is, patent search formulas, such as (IC='F21V21 / 30' OR IC='F21V21 / 14') AND ('bracket' AND / SEN 'rod' AND / SEN 'base'), IC represents the International Patent Classification number, "F21V21 / 30" and "F21V21 / 14" represent the classification numbers respectively, for example, ((CPC='B28B11 / 245')) AND (('temperature control' OR 'temperature sensor') AND ('air cooler' OR 'chiller') AND 'cooling water pipe') AND (USE='reducing cracks in concrete structures'), CPC represents the cooperative patent classification, and "B28B11 / 245" represents the classification number. USE indicates the purpose or purpose of the technical solution described in the patent. The server can construct a patent knowledge graph based on the retrieval log information, and can extract key terms for the patent to be calculated based on the patent knowledge graph. Specifically, in the above S11, the server can extract key terms that match the nodes in the patent knowledge graph from each patent to be calculated based on the pre-built patent knowledge graph. The number of key terms that best express each patent to be calculated extracted from each patent to be calculated is no more than a preset number, and the preset number can be pre-set, such as 30. The above patent invention point extraction algorithm is constructed based on a generative large model, which at least includes the above-mentioned first generative large model, and of course can also include the following second generative large model.
[0028] In the above S12, the server may, for each patent to be calculated, concatenate the patent to be calculated and the extracted key terms of the patent to be calculated using a first prompt word template, and input the concatenation into the first generative large model to obtain the overall invention point corresponding to the patent to be calculated. The above first prompt word template may include first role information, first input requirements, first output requirements, a slot corresponding to the first input content, and a slot corresponding to the key terms. The first role information may be pre-set, and the first role information may be "You are now a professional patent examiner. You need to use your professional knowledge to read and understand the following long text patent and extract 3-6 invention points and implementation steps that best represent the novelty and creativity of this patent." The above first input requirements and first output requirements may also be pre-set, and the first input requirement may be "the input content is the patent text," and the first output requirement may be "filtering publicly known theories and technologies, the output content must be derived from the input content, and the output content should be centered around the given key terms as much as possible." Therefore, the first prompt word template mentioned above can be "Now you are a professional patent examiner. You need to use your professional knowledge to read and understand the following long text patent, and extract 3-6 invention points and implementation steps that best represent the novelty and creativity of this patent. However, please pay attention to the following 4 points: (1) Filter out publicly known theories and technologies; (2) The output content must be derived from the input content; (3) The output content should revolve around the given key terms as much as possible. The given key terms are: [Key terms]; (4) The output word count is about 500 words. The patent text you need to process is: [Patent text], and the extracted overall invention point is", where "[Key terms]" is the slot corresponding to the key terms, which is used to add the key terms corresponding to the patent to be calculated, and a maximum of a preset number of key terms, and "[Patent text]" is the slot corresponding to the first input content, which is used to add the patent text corresponding to the patent to be calculated. It should be noted that the aforementioned first character information, first input requirement, first output requirement, and first prompt word template can also contain other content. The first character information, first input requirement, first output requirement, and first prompt word template shown above are only examples, and this specification does not limit the specific content of the first character information, first input requirement, first output requirement, and first prompt word template. The aforementioned first generative macromodel can be an existing macromodel, such as the Kimi macromodel, or a macromodel that is a fine-tuned version of a general macromodel. This specification does not specifically limit this.
[0029] When determining the number of times a key term of each patent to be calculated appears in each paragraph of each patent to be calculated in S13, the server may determine the number of times the key term appears in each paragraph of each patent to be calculated. The paragraphs corresponding to each patent to be calculated may be the paragraphs corresponding to the specification of each patent to be calculated.
[0030] In the above S13, when determining the local invention point corresponding to each patent to be calculated based on the determined number of times corresponding to each paragraph and the weight corresponding to each key term of the patent to be calculated, the server may perform the following steps: S131: Initialize the processing state corresponding to each paragraph of each patent to be calculated to the first state.
[0031] S132: When the processing state of each paragraph of each patent to be calculated is the first state, the importance of each paragraph of each patent to be calculated is determined according to the weight corresponding to the key term of each patent to be calculated and the number of times the key term of each patent to be calculated appears in each paragraph of each patent to be calculated.
[0032] S133: Combine adjacent paragraphs according to the importance corresponding to each paragraph of each patent to be calculated, determine the shortest paragraph group of each patent to be calculated, and use it as the patent fragment. The conditions for generating patent fragments are: the importance of each patent fragment of each patent to be calculated is greater than half of the sum of the weights of all key terms of each patent to be calculated; the importance of the patent fragment is generated by superimposing the importance corresponding to each paragraph in the patent fragment.
[0033] S134: Setting the processing status of the paragraphs in the shortest paragraph group of each patent to be calculated to the second status, and adjusting the weight value of the key term hit in the shortest paragraph group of each patent to be calculated to half of the current weight.
[0034] S135: Repeat steps S132-S134, and based on the weight values of the key terms adjusted in S134, recalculate the importance of each paragraph and determine the patent judgment of the current cycle until the number of executions reaches the set threshold or new patent fragments cannot be generated. Based on the patent fragments of each patent to be calculated, the second generative large model is used to determine the local invention points of each patent to be calculated.
[0035] The first state in the above S131 can be preset, and the first state can be represented by 0, which can be specifically represented as , p represents the number of paragraphs, Specifically, the server may set the processing status of each paragraph of each patent to be calculated to the first state for each patent to be calculated, so as to initialize the processing status of each paragraph of the patent to be calculated.
[0036] In the above S132, for each patent to be calculated and for each paragraph of the patent to be calculated, when the processing status of the paragraph is the first state, the server can determine the importance of the paragraph according to the weight corresponding to the key term of the patent to be calculated and the number of times the key term appears in the paragraph. Then in the above S133, the server can combine the adjacent paragraphs in the patent to be calculated according to the importance corresponding to each paragraph of the patent to be calculated, determine the shortest paragraph group of the patent to be calculated, and use it as the patent fragment. Among them, each key term of the patent to be calculated has a preset weight (i.e., initial weight), i.e. , q represents the number of key terms, Represents the weight of key term j. When determining the importance of a paragraph based on the weight of the key term in the patent to be calculated and the number of times the key term appears in the paragraph, the following formula (1) can be used for calculation: (1) Among them, M i Indicates the importance of the paragraph, cnt ij Indicates the number of times the key term appears in paragraph i.
[0037] The aforementioned shortest paragraph group is composed of consecutive paragraphs, and the server may employ any pre-set algorithm to determine the consecutive shortest paragraph group for the patent to be calculated based on the importance of each paragraph in the patent to be calculated. Furthermore, the condition for generating the aforementioned patent fragments is that the importance of each patent fragment for the patent to be calculated is greater than half the sum of the weights of all key terms in each patent to be calculated. The importance of the aforementioned patent fragments is generated by summing the importance of each paragraph in the patent fragment.
[0038] In the above S134, the server may, for each patent to be calculated and for each paragraph of the patent to be calculated, after determining the shortest paragraph group of the patent to be calculated, set the processing status of the paragraphs in the shortest paragraph group of the patent to be calculated to the second state, and adjust the weight values of the key terms hit in the shortest paragraph group of the patent to be calculated to half of the current weight. Thereafter, in the above S135, the server may repeatedly execute steps S132 to S134, recalculate the importance corresponding to each paragraph and determine the patent fragment of the current cycle based on the weight values of the key terms adjusted in S134, until the number of executions reaches a set threshold or a new patent fragment cannot be generated, and then determine the local invention points of the patent to be calculated based on the patent fragments of the patent to be calculated. The above second state may be pre-set, and the second state may be represented by 1. Specifically, the server may update the processing status of each paragraph in the shortest paragraph group of the patent to be calculated from the first state to the second state. In addition, the server also needs to adjust the weight value of the key terms hit in the shortest paragraph group of the patent to be calculated, reducing it to half of the current weight. When the shortest paragraph group is the first shortest paragraph group generated, the current weight is the initial weight. Each paragraph in the above-mentioned recalculation of the importance corresponding to each paragraph refers to the paragraph included in each patent to be calculated, and is executed according to the process of the above-mentioned step S132. The above-mentioned determination of the patent fragment of the current cycle is executed according to the process of the above-mentioned step S133, and the current cycle refers to the current execution round. One cycle (i.e., one execution) represents the process of generating a patent fragment once, i.e., the process of executing steps S132 to S134. The above-mentioned set threshold is pre-set. In addition, the above-mentioned server cannot generate a new patent fragment, which means that the combined importance of all adjacent paragraphs is not greater than half of the sum of the weights of the key terms.
[0039] In the above S135, based on the patent fragments of each patent to be calculated, the second generative large model is used to determine the local invention points of each patent to be calculated. The server can use the patent fragments of each patent to be calculated as the local invention points of the patent to be calculated.
[0040] Furthermore, to prevent the length of the generated local invention point from exceeding the input length of the subsequent patent text vectorization model, when the patent fragment to be calculated exceeds the specified length, the server may concatenate the second prompt word template with the patent fragment (i.e., the patent fragment that exceeds the specified length) and input the concatenated information into the second generative model. The second generative model then reduces the length of the patent fragment to obtain the local invention point corresponding to the patent fragment. If the patent fragment to be calculated does not exceed the specified length, the patent fragment is used as the local invention point.
[0041] Specifically, for each patent to be calculated and for each patent fragment of the patent to be calculated, when the patent fragment exceeds the specified length, the server can splice the second prompt word template with the patent fragment and input it into the second generative large model to reduce the length of the patent fragment through the second generative large model to obtain the local invention point corresponding to the patent fragment. When the patent fragment does not exceed the specified length, the patent fragment is used as the local invention point. The above-mentioned specified length can be pre-set, and the specified length can be 512 characters. The above-mentioned second generative large model can be the above-mentioned first generative large model, or other general large models, or a large model after fine-tuning the general large model. This specification does not make specific restrictions. The second prompt word template is pre-set and includes second role information, second output requirements, slots corresponding to the second input content, and slots corresponding to key terms. The second role information can be pre-set and may include, for example, "You are a professional patent examiner. You need to use your expertise to read and understand the following long patent text and reduce it to 500 words or less." The second output requirement can also be pre-set and may include, for example, "The output content must be derived from the input content and contain the given key terms as much as possible." Furthermore, the second output requirement may include a word limit for the output content, such as "The output content must be within 500 words." Therefore, the second prompt word template mentioned above can be "Now you are a professional patent examiner. You need to use your professional knowledge to read and understand the following long text patent and reduce the text to less than 500 words, but be sure to pay attention to the following two points: (1) The output content must be derived from the input content; (2) The output content should contain the given key terms as much as possible. The given key terms are: [Key terms]. The patent fragment you need to process is: [Patent fragment], and the reduced local invention point is", where "[Key terms]" is the card slot corresponding to the key terms, which is used to add the key terms corresponding to the patent fragment, and a maximum of a preset number of key terms, and "[Patent judgment]" is the card slot corresponding to the second input content, which is used to add the patent fragment corresponding to the patent to be calculated. It should be noted that the above-mentioned second role information, second output requirements and second prompt word template can also be other content. The second role information, second output requirements and second prompt word template shown above are only an example. This specification does not limit the specific content of the second role information, second output requirements and second prompt word template.
[0042] S2: Vectorization of invention points: Use the patent text vectorization model constructed based on the large model to vectorize the overall invention points and the local invention points of each patent to be calculated respectively, and obtain the overall feature vector and local feature vector of each patent to be calculated, which constitute the feature vector set of each patent to be calculated.
[0043] In this specification, the server can vectorize the invention points, that is, use the patent text vectorization model built based on the large model to vectorize the overall invention points and local invention points of each patent to be calculated, respectively, to obtain the overall feature vector and local feature vector of each patent to be calculated, and construct a feature vector set for each patent to be calculated. Specifically, the overall invention point and local invention point of each patent to be calculated are respectively input into the patent text vectorization model built based on the large model to obtain the overall feature vector and local feature vector of each patent to be calculated. According to the overall feature vector and local feature vector of each patent to be calculated, a feature vector set for each patent to be calculated is constructed. Among them, the patent text vectorization model is built based on the large model, and the patent text vectorization model can be one of a general text vectorization large model and a fine-tuned general text vectorization large model, and the general text vectorization large model is a Transformer model based on the attention mechanism.
[0044] Furthermore, for each patent to be calculated, the server can input the overall invention point of the patent to be calculated into the patent text vectorization model constructed based on the large model to obtain an overall feature vector. Furthermore, the server can input the local invention point of the patent to be calculated into the patent text vectorization model constructed based on the large model to obtain a local feature vector. Subsequently, a feature vector set for the patent to be calculated is constructed based on the overall feature vector and the local feature vectors.
[0045] S3: Multi-vector matching and correlation calculation: Using a multi-vector matching algorithm, extract a feature vector from each of the two feature vector sets to form a matching pair, calculate the feature similarity of all the matching pairs of the two patents to be calculated, construct a feature similarity matrix, and determine the patent correlation of the two patents to be calculated based on the feature similarity matrix.
[0046] In this specification, the server can perform multi-vector matching and correlation calculation, that is, using a multi-vector matching algorithm, extract one feature vector from each of the two feature vector sets to form a matching pair, calculate the feature similarity of all matching pairs of the two patents to be calculated, construct a feature similarity matrix, and determine the patent correlation of the two patents to be calculated based on the feature similarity matrix. The two feature vector sets are the feature vector sets corresponding to the two patents to be calculated, and all matching pairs are composed of the overall feature vector and local feature vector of any one of the two patents to be calculated and the overall feature vector and local feature vector of the other patents to be calculated except for any one of the patents to be calculated.
[0047] Specifically, when using the multi-vector matching algorithm, extracting one feature vector from each of the two feature vector sets to form a matching pair, calculating the feature similarity of all matching pairs of the two patents to be calculated, and constructing the feature similarity matrix, the following steps can be followed: S31: The two patents to be calculated are respectively used as the first patent to be calculated and the second patent to be calculated, and the overall feature vector and the local feature vector of the first patent to be calculated are used as first feature vectors, and the overall feature vector and the local feature vector of the second patent to be calculated are used as second feature vectors.
[0048] S32: Combine each first eigenvector in the feature vector set of the first patent to be calculated with each second eigenvector in the feature vector set of the second patent to be calculated to obtain matching pairs, and calculate the feature similarity between the first eigenvector and the second eigenvector in each matching pair to construct a feature similarity matrix.
[0049] Each of the above-mentioned first feature vectors includes the overall feature vector and local feature vector of the first patent to be calculated, the feature vector set of the above-mentioned first patent to be calculated includes each first feature vector, each second feature vector includes the overall feature vector and local feature vector of the second patent to be calculated, and the feature vector set of the above-mentioned second patent to be calculated includes each second feature vector. Each of the above-mentioned matching pairs includes a first feature vector and a second feature vector. When obtaining each matching pair, the server can combine each first feature vector with each second feature vector to obtain each matching pair. For example, assuming there are 5 first feature vectors, namely V w , V m , V o1 , V o2 , V o3 and 4 second eigenvectors, namely U w , U m , U o1 , U o2 , so there are 20 matching pairs, namely V w and U w , V w and U m , V w and U o1 , V w and U o2 , V m and U w , V m and U m , V m and U o1 , V m and U o2 , V o1 and U w, V o1 and U m , V o1 and U o1 , V o1 and U o2 , V o2 and U w , V o2 and U m , V o2 and U o1 , V o2 and U o2 , V o3 and U w , V o3 and U m , V o3 and U o1 , V o3 and U o2 The feature similarity can be the cosine similarity between the first feature vector and the second feature vector. The server can calculate the feature similarity of each matching pair using a cosine similarity algorithm. Local invention points are also included in the similarity calculation, that is, local similarity affects the degree of patent association. The feature similarity matrix is composed of the feature similarities of each matching pair.
[0050] When determining the patent relevance of two patents to be calculated based on the feature similarity matrix, the server may perform the following steps: S33: Determine a similarity weight corresponding to each matching pair according to the weights corresponding to the first eigenvector and the second eigenvector in each matching pair.
[0051] S34: Determine the maximum feature similarity among the feature similarities of each matching pair according to the feature similarity matrix, and determine a similarity weight corresponding to the maximum feature similarity, and use it as the maximum similarity weight.
[0052] S35: From each matching pair, determine each matching pair that meets the target condition and use it as a target matching pair; the first feature vector and the second feature vector included in each target matching pair are different, and the sum of the feature similarities of each target matching pair is the largest.
[0053] S36: Calculate the patent relevance of the two patents to be calculated based on the maximum feature similarity, the maximum similarity weight, the feature similarity of each target matching pair, and the similarity weight of each target matching pair.
[0054] The weights corresponding to the first eigenvector and the second eigenvector in each matching pair are preset. For example, the weight of each first eigenvector can be W w , W m , W o1 , Wo2 , W o3 , the weight of each second eigenvector can be W w , W m , W o1 , W o2 , where W w =1.0, W m =0.9, W o1 = W o2 = W o3 =0.8. The feature similarity of each matching pair can be S1, S2, S3, ..., S 20 , the corresponding similarity weights can be W1, W2, W3, ..., W 20 When calculating the similarity weight, the calculation includes V w and U m For example, the similarity weight of the matching pair is .
[0055] The similarity weight of each matching pair is the product of the weights corresponding to the first feature vector and the second feature vector in each matching pair. Specifically, in the above S33, the server can use the product of the weight of the first feature vector and the weight of the second feature vector in each matching pair as the similarity weight of the matching pair. The above maximum feature similarity is the largest feature similarity of each matching pair, and the above maximum similarity weight is the similarity weight of the matching pair corresponding to the maximum feature similarity. The above maximum feature similarity can be used Indicates that the maximum similarity weight is available express.
[0056] The target condition in the above S35 may be pre-set, and the target condition may be that the first feature vector and the second feature vector included in each selected target matching pair are different, and the feature similarity of each selected target matching pair is the largest. That is, the server may first determine the first number of the first feature vectors of the first patent to be calculated, and determine the second number of the second feature vectors of the second patent to be calculated, compare the first number and the second number, and use the smaller number as the target number. Based on each matching pair, construct a combination group including the target number of matching pairs, and the first feature vector and the second feature vector of each matching pair in the constructed combination group are different. Calculate the sum of the feature similarities of each matching pair in each combination group, and use it as the total feature similarity. Use the combination group corresponding to the largest total feature similarity as the target combination group, and use each matching pair in the target combination group as the target matching pair that meets the target condition.
[0057] In the above S36, the server may first calculate the first weighted similarity of the two patents to be calculated based on the feature similarity of each target matching pair and the similarity weight of each target matching pair. Specifically, the following formula (2) may be used for calculation: (2) in, represents the first weighted similarity, Indicates the feature similarity of the target matching pair, WW k Represents the similarity weight corresponding to the target matching pair, represents the similarity weight sum of k target matching pairs, It represents the sum of the products of feature similarity and similarity weight of k target matching pairs, where k represents the number of targets.
[0058] After that, the product of the maximum feature similarity and the maximum similarity weight is calculated and used as the second weighted similarity. Then, based on the first weighted similarity and the second weighted similarity, the patent relevance of the two patents to be calculated is calculated. Specifically, the following formula (3) can be used for calculation: (3) Among them, S represents the patent relevance, represents the first weighted similarity, represents the maximum feature similarity, represents the maximum similarity weight, * represents the second weighted similarity, W1 represents the weight corresponding to the first weighted similarity, W2 represents the weight corresponding to the second weighted similarity, W1 and W2 are preset, W1 can be 0.3, and W2 can be 0.7.
[0059] In some embodiments of this specification, in the process of generating local invention points in S13, the first local invention point generated is the main invention point, and the local invention points other than the main invention point are secondary invention points. For invention patents, the number of secondary invention points is not more than three, and for utility model patents, the number of secondary invention points is zero. The overall feature vector corresponding to the overall invention point can be used V w Or U w The eigenvector corresponding to the main invention point can be represented by V m Or U m , the eigenvector corresponding to the secondary invention point can be expressed as V o1 , V o2 , V o3 Or U o1 , U o2 .
[0060] In some embodiments of this specification, Figure 2 As shown, Figure 2 This is a schematic diagram of a method for calculating patent relevance based on a large model provided in this specification. The two patents to be calculated are Figure 2 Patent 1 to be calculated (i.e., the first patent to be calculated) and Patent 2 to be calculated (i.e., the second patent to be calculated) in the example. The server can determine the overall invention points and local invention points of Patent 1 and Patent 2, respectively, based on the patent invention point extraction algorithm. Furthermore, based on the patent text vectorization model, the server can determine the first feature vectors (i.e., first feature vectors 1 to n) of Patent 1 and the second feature vectors (i.e., second feature vectors 1 to m) of Patent 2, respectively. Then, based on the first feature vectors and the second feature vectors, the server can determine matching pairs and calculate the feature similarity of each matching pair. Figure 2 In the above equation, D.1-1 to D.1-m, D.2-1 to D.2-m, D.3-1 to D.3-m, ..., Dn-1 to Dn-m represent the feature similarities of each matching pair. Dn-m represents the feature similarity between the nth first eigenvector and the mth second eigenvector. Figure 2 The "calculate best match" in the above code is to determine the target matching pairs that meet the target conditions from the matching pairs. Figure 2 The feature similarities corresponding to each target matching pair are shown as D.1-2, D.2-1, D.3-m...Dn-3, that is, Figure 2 The feature similarity of the matching pairs marked in gray in . Afterwards, the server can calculate the patent relevance between the patent to be calculated 1 and the patent to be calculated 2, that is, Figure 2 The "calculation of patent relevance" may be performed as described in steps S33 to S36.
[0061] In some embodiments of this specification, a test patent pair may be obtained, comprising a first patent and a second patent related to the first patent. A conventional patent search method is employed, based on a patent database, to search for the top 400 third patents related to the first patent in the test patent pair. Furthermore, the methods described in S1-S3 above are employed, based on the patent database, to search for the top 400 fourth patents related to the first patent in the test patent pair. It should be noted that the two patents to be calculated can be either the first patent or any patent in the patent database. When the patent correlation between the two patents to be calculated exceeds a threshold, the two patents to be calculated are related, and the other patent in the two patents to be calculated, excluding the first patent, is related to the first patent. Conversely, when the patent correlation between the two patents to be calculated does not exceed the threshold, the two patents to be calculated are unrelated, and the other patent in the two patents to be calculated, excluding the first patent, is unrelated to the first patent. The proportion of the third patent that matches the second patent is determined as a first proportion, which is approximately 50%. The proportion of the fourth patent that matches the second patent is determined as a second proportion, which is approximately 65%. Obviously, the test results using the methods shown in S1 to S3 above (i.e., the second ratio) are better than the test results using the traditional patent search method (i.e., the first ratio). This shows that the patent invention point extraction algorithm, the patent text vectorization model, and the multi-vector matching algorithm have improved the accuracy of patent relevance calculation.
[0062] It should be noted that the specific embodiments described above can enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although this specification has described the present invention in detail with reference to the drawings and embodiments, those skilled in the art should understand that the present invention can still be modified or replaced with equivalents. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be included in the scope of protection of the patent for the present invention.
Claims
1. A method for calculating patent relevance based on a large model, characterized in that: include: S1: Extracting the overall and local invention points of the patent to be calculated: Obtain two patents to be calculated, build a patent invention point extraction algorithm based on the generative large model, and then segment each patent to be calculated based on the patent invention point extraction algorithm to obtain the overall invention point and local invention point corresponding to each patent to be calculated; S2: Invention point vectorization: Using the patent text vectorization model built based on the large model, the overall invention point and the local invention point of each patent to be calculated are vectorized respectively to obtain the overall feature vector and the local feature vector of each patent to be calculated, forming the feature vector set of each patent to be calculated; S3: Multi-vector matching and correlation calculation: Using a multi-vector matching algorithm, extract a feature vector from each of the two feature vector sets to form a matching pair, calculate the feature similarity of all the matching pairs of the two patents to be calculated, construct a feature similarity matrix, and determine the patent correlation of the two patents to be calculated based on the feature similarity matrix.
2. The method for calculating patent relevance based on a large model according to claim 1, characterized in that: In S1, based on the patent invention point extraction algorithm, each patent to be calculated is segmented to obtain the overall invention points and local invention points corresponding to each patent to be calculated, specifically including: S11: Extract key terms: Based on the pre-built patent knowledge graph, extract key terms that match the patent knowledge graph from each patent to be calculated; S12: Generate overall invention points: Use the first prompt word template to combine each patent to be calculated and the extracted key terms of each patent to be calculated, and input them into the first generative model to obtain the overall invention points corresponding to each patent to be calculated; S13: Generate local invention points: Determine the number of times the key terms of each patent to be calculated appear in each paragraph of each patent to be calculated, and determine the local invention points corresponding to each patent to be calculated based on the determined number of times corresponding to each paragraph and the weight corresponding to the key terms of each patent to be calculated.
3. The method for calculating patent relevance based on a large model according to claim 2, characterized in that: The nodes in the patent knowledge graph in S11 represent key terms, and the edges represent the relationships between the key terms.
4. The method for calculating patent relevance based on a large model according to claim 2, characterized in that: The step S13 of determining the local invention point corresponding to each patent to be calculated according to the determined number of times corresponding to each paragraph and the weight corresponding to the key term of each patent to be calculated specifically includes: S131: Initializing the processing state corresponding to each paragraph of each patent to be calculated to a first state; S132: When the processing state of each paragraph of each patent to be calculated is the first state, determining the importance of each paragraph of each patent to be calculated according to the weight corresponding to the key term of each patent to be calculated and the number of times the key term of each patent to be calculated appears in each paragraph of each patent to be calculated; S133: Adjacent paragraphs are combined according to the importance corresponding to each paragraph of each patent to be calculated, and the shortest paragraph group of each patent to be calculated is determined as a patent fragment. The patent fragment is generated under the following conditions: the importance of the patent fragment of each patent to be calculated is greater than half of the sum of the weights of all key terms of each patent to be calculated; the importance of the patent fragment is generated by adding the importance corresponding to each paragraph in the patent fragment; S134: setting the processing state of the paragraphs in the shortest paragraph group of each patent to be calculated to the second state, and adjusting the weight values of the key terms hit in the shortest paragraph group of each patent to be calculated to half of the current weight; S135: Repeat steps S132-S134, and based on the weight values of the key terms adjusted in S134, recalculate the importance of each paragraph and determine the patent fragments of the current cycle, until the number of executions reaches the set threshold or new patent fragments cannot be generated, and then use the second generative large model based on the patent fragments of each patent to be calculated to determine the local invention points of each patent to be calculated.
5. The method for calculating patent relevance based on a large model according to claim 4, characterized in that: In S135, based on each patent fragment of each patent to be calculated, the second generative model is used to determine each local invention point of each patent to be calculated, which specifically includes: When the patent fragment of the patent to be calculated exceeds the specified length, the second prompt word template is spliced with the patent fragment and input into the second generative model to shorten the length of the patent fragment through the second generative model to obtain the local invention point corresponding to the patent fragment; When the patent segment of the patent to be calculated does not exceed the limited length, the patent segment is regarded as a local invention point.
6. The method for calculating patent relevance based on a large model according to claim 5, characterized in that: The first prompt word template in S12 includes first role information, first input requirement, first output requirement, a slot corresponding to the first input content, and a slot corresponding to the key term; the second prompt word template in S135 includes second role information, second output requirement, a slot corresponding to the second input content, and a slot corresponding to the key term.
7. The method for calculating patent relevance based on a large model according to claim 2, characterized in that: In the process of generating local invention points in S13, the first local invention point generated is the main invention point, and the local invention points other than the main invention point are secondary invention points.
8. The method for calculating patent relevance based on a large model according to claim 1, characterized in that: The patent text vectorization model in S2 may be one of a general text vectorization large model and a fine-tuned general text vectorization large model; The S2 specifically includes: Input the overall invention point and the local invention point of each patent to be calculated into the patent text vectorization model constructed based on the large model, respectively, to obtain the overall feature vector and the local feature vector of each patent to be calculated; A feature vector set of each patent to be calculated is constructed based on the overall feature vector and the local feature vector of each patent to be calculated.
9. The method for calculating patent relevance based on a large model according to claim 1, characterized in that: In S3, a multi-vector matching algorithm is used to extract a feature vector from each of the two feature vector sets to form a matching pair, and the feature similarity of the matching pairs of the two patents to be calculated is calculated. The feature similarity matrix is constructed specifically including: S31: The two patents to be calculated are respectively used as a first patent to be calculated and a second patent to be calculated, and the overall feature vector and the local feature vector of the first patent to be calculated are used as first feature vectors, and the overall feature vector and the local feature vector of the second patent to be calculated are used as second feature vectors; S32: Combine each first eigenvector in the first eigenvector set of the patent to be calculated with each second eigenvector in the second eigenvector set of the patent to be calculated to obtain matching pairs, and calculate the feature similarity between the first eigenvector and the second eigenvector in each matching pair to construct a feature similarity matrix.
10. The method for calculating patent relevance based on a large model according to claim 9, characterized in that: Determining the patent relevance of the two patents to be calculated according to the feature similarity matrix in S3 specifically includes: S33: Determine a similarity weight corresponding to each matching pair according to the weights corresponding to the first feature vector and the second feature vector in each matching pair; S34: determining the maximum feature similarity among the feature similarities of the matching pairs according to the feature similarity matrix, and determining a similarity weight corresponding to the maximum feature similarity, and using the similarity weight as the maximum similarity weight; S35: From the matching pairs, determining matching pairs that meet the target condition and using them as target matching pairs; each target matching pair includes a different first feature vector and a different second feature vector, and the sum of the feature similarities of the target matching pairs is the largest; S36: Calculate the patent relevance of the two patents to be calculated based on the maximum feature similarity, the maximum similarity weight, the feature similarity of each target matching pair, and the similarity weight of each target matching pair.
Citation Information
Patent Citations
Text similarity solution algorithm based on global optimization of keyword quality
CN106598940A
Efficient data vectorization calculation method for realizing intelligent retrieval service
CN118535621A
Technical scheme evaluation method and device, equipment, storage medium and product
CN119003702A
Method and apparatus for calculating similarity of face image, method and apparatus for retrieving face image, and method of synthesizing face image
US20080144891A1