Patent data analysis method based on dynamic context window
By adopting a dynamic context window management method in patent data analysis, combined with Query2doc and semantic chunking technology, the problems of incomplete information and poor analysis results in existing analysis methods are solved, and more efficient and accurate patent data analysis is achieved.
Patent Information
- Application Number
- CN202411914555.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing patent data analysis methods based on context windows have problems such as incomplete capture of information, affecting patent infringement analysis, reducing patent portfolio analysis effects, restricting technical trend recognition and reducing semantic understanding and reasoning capabilities.
A patent data analysis method based on dynamic context window is adopted to generate pseudo-documents through Query2doc, combining semantic chunking and soft clustering technology to realize dynamic context window management, solving the efficiency problem in multi-patent document processing and improving the quality and reliability of search results.
Through dynamic management context windows, technical information in patent documents can be captured more comprehensively, the accuracy of patent infringement analysis can be improved, the effect of patent portfolio analysis can be enhanced, technical trends can be identified in a timely and accurate manner, and semantic understanding and reasoning capabilities can be improved.
Smart Images

Figure CN119760117A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text data analysis, and in particular to a patent data analysis method based on a dynamic context window. Background Art
[0002] In the current era of information explosion, the number and complexity of patent documents are increasing. Therefore, a method based on context windows has emerged to analyze the huge amount of patent data. However, the existing analysis method has the following shortcomings: 1. Incomplete capture of technical information: Patent documents usually include detailed technical descriptions, claims, and background descriptions, which are closely related. A limited context window may not be able to fully capture this information, resulting in incomplete analysis, especially when identifying the novelty and creativity of patents. 2. Impact on patent infringement analysis: When conducting patent infringement analysis, analysts need to compare patent claims with other documents and products in detail. If the window length is not long enough, the comparison information will be incomplete, which will affect the accuracy of the analysis and the correctness of the legal judgment. 3. Reduce the effect of patent portfolio analysis: Companies often need to analyze a patent portfolio consisting of a series of related patents to formulate R&D strategies or evaluate the technical strength of competitors. Limited context windows make it difficult for the analysis to cover all relevant patents, resulting in insufficient strategic basis. 4. Constraints on technology trend identification: In technology trend analysis, researchers need to extract the direction and key areas of technology development from a large amount of patent data. Context window restrictions may result in too coarse analysis granularity, and it is impossible to predict and identify industry trends in a timely and accurate manner. 5. Reduced semantic understanding and reasoning capabilities: For complex patent documents, the limited window leads to the truncation of deep semantic information and implicit reasoning chains within the document, affecting the reasoning capabilities of analysis tools, such as the identification of creativity and the assessment of patent value.
[0003] In summary, the existing method of analyzing patent data based on context windows has poor analysis results due to the problem of upper and lower window limitations. Summary of the invention
[0004] In order to overcome the defects of the prior art, the present invention provides a patent data analysis method based on a dynamic context window to solve the above problems.
[0005] The technical solution adopted by the present invention to solve the technical problem is: a patent data analysis method based on a dynamic context window, comprising the following steps: S1: In Query2doc, the technical features, technical fields and innovations of the analysis target are obtained, and the field features are extracted in combination with the patent classification number to obtain the query volume q; based on the similarity between patent document d and the query volume q, the patent document d is sorted, the meta information is recorded, and a pseudo document is generated; S2: Use a recursive chunking algorithm to split the patent document into the smallest semantic units in sorted order, assign a unique number to each chunk and record it in the metadata; then use a local alignment algorithm and a hierarchical reduction algorithm to maintain the document structure; S3: Combine the patent domain word vector model to extract semantic features based on text content; combine the feature weights of the technical field and the technical relevance to perform soft clustering; calculate and store the technical association probability between fragments; S4: Number the metadata injected with the document ID and chunk position; establish a fast retrieval tree based on the constructed numbering; S5: core fragments are obtained in sequence according to the importance of the documents, and the context window size of the obtained core fragments is dynamically adjusted in sequence, and then the context is expanded.
[0006] It is worth noting that in step S1, the text similarity and technical relevance are obtained by combining the coarse-grained and fine-grained levels, and evaluation data is constructed to obtain the similarity between the patent document d and the query q.
[0007] Preferably, the step S1 comprises: S11: Calculate the text similarity between the query q and the patent document d: ; and are all fusion weight parameters, where ; ; ; is the text coarse-grainedness of the query q, is the text coarse-grainedness of patent document d, is the text granularity of the query volume q, is the text fine-grainedness of patent document d; N is the number of fine-grained units, qi is the i-th fine-grained unit in the query q, di is the i-th fine-grained unit in patent document d, sim() is the similarity function, and cos() represents the cosine similarity; S12: Calculate the technical similarity between the query q and the patent document d: ; and are all fusion weight parameters, where ; ; is the technical coarse-grainedness of the query quantity q, is the technical coarse-grainedness of patent document d, is the technical granularity of the query quantity q, is the technical granularity of patent document d; M is the number of fine-grained units, qi is the i-th fine-grained unit in the query q, di is the i-th fine-grained unit in patent document d, sim() is the similarity function; cos() represents the cosine similarity; S13: Calculate the overall relevance between the query volume q and the patent document d ; and are all fusion weight parameters, where ; Among them, the automatic weight adjustment mechanism is used to update the fusion weight parameters: in is the partial derivative of the loss function, is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is the learning rate; is the threshold, which is used to judge the limit value of correlation; is the mean adjustment coefficient, which is used to control the influence of the mean value; is the mean function, which is used to calculate the average of the predicted scores; is the standard deviation adjustment coefficient, which is used to control the impact of the fluctuation range; is the standard deviation function, used to calculate the standard deviation of the predicted scores; S14: Calculate the similarity between patent document d and query q based on the overall relevance: First, construct the evaluation data: ; qi is the query volume, di is the patent document, yi is the real relevance, and yi is the overall relevance obtained in step S13 ; Then calculate the predicted relevance score: ; is a text coarse-grained vector, used to represent the text coarse-grainedness of the query q and the patent document d; is a text fine-grained vector, used to represent the text fine-grainedness of the query q and the patent document d; is the technical coarse-grained vector, which is used to represent the technical coarse-grainedness of the query volume q and the patent document d; is a technical fine-grained vector, which is used to represent the technical fine-grainedness of the query volume q and the patent document d; Calculate mean square error , the mean square error is used as the similarity between patent document d and query q; N represents the evaluation data set The number of samples, i.e., the fine-grained partitioning of query-document pairs; is the predicted relevance score corresponding to the i-th query q and patent document d.
[0008] Optionally, in step S2, the local alignment algorithm is a Smith-Waterman algorithm, and the local alignment algorithm includes: Obtain a set of blocks from a recursive block algorithm; Calculate the word vector similarity of each pair of fragments in the block set and construct a similarity matrix; use the local alignment algorithm to find the optimal subsequence alignment path in the similarity matrix and identify the local optimal alignment fragment; use the scoring function to reflect the similarity strength and matching position of each pair of fragments; The best alignment path is output to reflect the local sequence matching obtained by the alignment operation in the similarity matrix; the alignment score is output to measure the matching quality and similarity between the fragments in each pair of fragments.
[0009] Specifically, in step S2, the hierarchical reduction algorithm is a Hierarchical Reduction algorithm, and the hierarchical reduction algorithm includes: Obtain a block set from the recursive block algorithm, use the block set as a leaf node of the hierarchical construction, and construct an initial tree hierarchy; Through the alignment result of the local alignment algorithm or the similarity between the patent document d and the query q obtained in step S1, the similarity between adjacent segments is identified, and similar blocks are merged layer by layer to form a parent node; Output a tree structure, where each node represents a different document level, and higher-level nodes represent larger concepts or paragraphs.
[0010] It is worth noting that in step S3, the technical field feature weights ; is the domain relevance score, with a value range of [0,1]; is the correlation of technology categories, with a value range of [0,1]; is the correlation of patent classification number, with a value range of [0,1]; is the domain relevance, is the relevance of the technology category, is the classification number relevance, ; t is a term; In step S3, the technical relevance between segment s1 and segment s2 ;in , is the vector representation of the fragment; is the weight of term t; is the word vector of term t; is the cosine similarity; is the domain similarity; is the vector similarity weight, with a value range of [0,1]; is the domain similarity weight.
[0011] Preferably, in step S3, the technical association probability between segment s1 and segment s2 is ; is the domain relevance, is the relevance of the technology category, is the classification number relevance, ; Semantic similarity probability between segments s1 and s2 ; is the KL divergence of the GMM distribution of the two fragments s1 and s2; P1 is the probability distribution of fragment s1 in the GMM model; P2 is the probability distribution of fragment s2 in the GMM model; Probability of similarity of technical features between fragments s1 and s2 ; wk is the weight of the kth technical feature; is the kth technical feature of segment s1; is the kth technical feature of segment s2; N is the total number of features; Match() is the feature matching function; The domain relevance probability between segments s1 and s2 ; is the IPC classification number similarity; The degree of overlap in technical fields.
[0012] Optionally, in step S4, the constructed number ,in is the document ID, which is the unique identifier of the document. The chunk position is the identifier of the chunk position within the document. Code the technology classification; serial number Position mapping relationship ; is the physical storage location offset, is the content length of the block, For metadata information.
[0013] It is worth noting that in step S4, the multi-level hash index in the quick search tree includes a primary index, a secondary index and a tertiary index; The primary index , , where N1 is the number of cached documents, X is the total number of documents; P() represents the probability function, and hit| represents the hit condition in the conditional probability; The secondary index , , where N2 is the number of cache blocks and M is the total number of blocks; The three-level index , ;in Classify the technology The collection of all document IDs under; For computing technology classification The proportion of documents covered; The retrieval probability model of the obtained fast retrieval tree ;in Statistics from visits to the technology category TechClass, ; ;in is the access time complexity, A Boolean value indicating whether the index is hit. is the time complexity of hitting, is the time complexity when the target misses. is the total number of documents, and Both are conditional operators.
[0014] Preferably, in step S2, when a recursive block algorithm is used to assign a unique number to each block, the technical features, technical fields and innovations of the analysis target are first obtained in Query2doc, and the field features are extracted in combination with the patent classification number to obtain the query quantity q; the blocks are sorted based on the similarity between the blocks and the query quantity q, and then the blocks are numbered according to the sorting; In step S5, the document importance is obtained according to the order of the blocks.
[0015] The beneficial effects of the present invention are as follows: the patent data analysis method based on dynamic context windows generates pseudo documents through Query2doc, combines semantic segmentation and soft clustering technology, realizes dynamic context window management, solves the efficiency problem in multi-patent document processing, and improves the quality and reliability of retrieval results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is a flowchart of a patent data analysis method based on a dynamic context window in one embodiment of the present invention. DETAILED DESCRIPTION
[0017] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0018] like Figure 1 As shown, a patent data analysis method based on a dynamic context window includes the following steps: S1: In Query2doc, obtain the technical features, technical fields and innovations of the analysis target, extract the field features in combination with the patent classification number (IPC / CPC), and obtain the query volume q; sort the patent document d based on the similarity between the patent document d and the query volume q, record the meta information, and generate a pseudo document; the meta information includes the basic attribute information of the patent document; In step S1, a dual-view retrieval paradigm is used to obtain text similarity and technical relevance by combining the coarse-grained and fine-grained levels, and the similarity between the patent document d and the query q is obtained by fine-tuning the data construction pipeline; The step S1 comprises: S11: Calculate the text similarity between the query q and the patent document d: ; and are all fusion weight parameters, where ; The preferred value range is 0.3-0.4. When the document structure is complete and the integrity is strong, it can be appropriately increased. The value of can be slightly reduced when processing short documents. The value of The preferred value range is 0.6-0.7. The more detailed the technical feature description is, The higher the value, the better the accuracy when an exact match is required. The value of ; ; is the text coarse-grainedness of the query q, is the text coarse-grainedness of patent document d, is the text granularity of the query volume q, is the text fine-grainedness of patent document d; N is the number of fine-grained units, qi is the i-th fine-grained unit in the query volume q, and di is the i-th fine-grained unit in the patent document d. In this embodiment, the fine-grained unit of the query volume q represents specific technical parameters, specific technical implementation methods and key technical components, and the fine-grained unit of the patent document d represents the specific technical features of the independent claim, the additional features of the dependent claim and the specific steps of the technical solution; sim() is a similarity function, cos() represents cosine similarity, and cos() is an indicator used to measure the similarity between two vectors. ,in represents the vector dot product, and represents the Euclidean norm (length) of the vector, is the angle between two vectors; In this embodiment, the text in the text similarity represents the text description of technical features, technical fields and innovations; S12: Calculate the technical similarity between the query q and the patent document d: ; and are all fusion weight parameters, where ; The preferred value range is 0.4-0.5, and its influencing factors are the overall classification of the technical field and the IPC / CPC classification level; The preferred value range is 0.5-0.6, and its influencing factors are the description depth of the technical features and the specific implementation details of the innovation points; ; ; is the technical coarse-grainedness of the query quantity q, is the technical coarse-grainedness of patent document d, is the technical granularity of the query quantity q, is the technical granularity of patent document d; M is the number of fine-grained units, qi is the i-th fine-grained unit in the query q, di is the i-th fine-grained unit in patent document d, sim() is the similarity function; cos() represents the cosine similarity; S13: Calculate the overall relevance between the query volume q and the patent document d ; and are all fusion weight parameters, where ; S14: Calculate the similarity between patent document d and query q after constructing an automated evaluation pipeline based on the overall relevance: First, construct the evaluation data: ; qi is the query: a description of the query target, usually input by the user, including descriptive information such as technical features, technical fields, and innovations, which is the core content used to calculate the relevance of patent documents; di is the patent document: a specific document in the patent database, usually the patent text to be evaluated, including patent claims, abstracts, instructions, and classification numbers (IPC / CPC) and other information; yi is the ground truth relevance: a label indicating the ground truth relevance between the query qi and the patent document di. , is the overall correlation obtained in step S13 .
[0019] Then calculate the predicted relevance score: ; is a text coarse-grained vector, which is the overall text description of technical features, technical fields and innovations, and is used to represent the text coarse-grainedness of the query volume q and the patent document d; is a text fine-grained vector, is a technical feature description fragment, and is used to represent the text fine-grainedness of the query volume q and the patent document d; is the technical coarse-grained vector, which represents the main classification information of the IPC / CPC classification number and is used to represent the technical coarse-grainedness of the query volume q and the patent document d; is the technical fine-grained vector, which is the detailed classification information of IPC / CPC and is used to represent the technical fine-grainedness of the query volume q and the patent document d; Calculate mean square error ; The mean square error is used as the similarity between patent document d and query q; N represents the evaluation data set The number of samples, i.e., the fine-grained partitioning of query-document pairs; is the predicted relevance score corresponding to the i-th query q and patent document d; The automatic weight adjustment mechanism is used to update the fusion weight parameters: in is the partial derivative of the loss function, is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is the learning rate; is the threshold, which is used to judge the limit value of correlation; is the mean adjustment coefficient, which is used to control the influence of the mean value; is the mean function, which is used to calculate the average of the predicted scores; is the standard deviation adjustment coefficient, which is used to control the impact of the fluctuation range; is the standard deviation function, used to calculate the standard deviation of the predicted scores; S2: Use a recursive block algorithm to split the patent document into the smallest semantic units in the sorted order to maintain the integrity of the technical features, and assign a unique number to each block in the split stage, which is recorded in the metadata. The number is used to establish the contextual reference relationship between blocks, where the metadata contains structured information in the block processing process; then use the local alignment algorithm and the hierarchical reduction algorithm to maintain the document structure; realize the semantic block processing of patent documents; In step S2, the recursive block algorithm includes: in, For patent documents, and for sub-documents of is the maximum block size, For block, and is the weight coefficient, Score the chunks, Indicates coherence; In this embodiment, the local alignment algorithm uses Smith-Waterman to find the best local similarity segment between two sequences (where the two sequences here represent adjacent text segments after block processing), and calculates the optimal alignment solution through a dynamic programming matrix. The local alignment algorithm includes: Core formula: Scoring function: Match score: ; Mismatch Penalty: ; Vacancy penalty: ; In step S2, the local alignment algorithm is the Smith-Waterman algorithm, and the local alignment algorithm includes: Get the block set from the recursive block algorithm ,When local alignment is performed by the local alignment algorithm, the fragment pairs that need to be compared in detail can be selected for alignment; Calculate each pair of fragments in the chunk collection The word vector similarity is used to construct a similarity matrix as the basis for alignment; the local alignment algorithm is used to find the optimal subsequence alignment path in the similarity matrix and identify the local optimal alignment fragment; the scoring function is used to reflect the similarity strength and matching position of each pair of fragments; The best alignment path is output to reflect the local sequence matching obtained by the alignment operation in the similarity matrix; the alignment score is output to measure the matching quality and similarity between the fragments in each pair of fragments.
[0020] In this embodiment, the hierarchical reduction algorithm uses a Hierarchical Reduction algorithm, which includes: Hierarchy definition: Hierarchy Level ; Documentation Blocks ; Hierarchical properties for each block: ; Reduction rules: Adjacent block merging conditions: Similarity calculation: In step S2, the hierarchical reduction algorithm is a Hierarchical Reduction algorithm, and the hierarchical reduction algorithm includes: Initial hierarchy: Obtaining a set of chunks from a recursive chunking algorithm , taking the block set as the leaf node of the hierarchical construction, constructing the initial tree hierarchy; Hierarchical aggregation: through the alignment results of the local alignment algorithm and the similarity between the patent document d and the query q obtained in step S1, the similarity between adjacent blocks is identified, and similar blocks are merged layer by layer to form parent nodes until the required simplification degree is met; adjacent blocks with content similarity ≥ 0.70, technical feature similarity ≥ 0.80, structural similarity ≥ 0.65 and comprehensive similarity ≥ 0.75 are similar blocks; Semantic clustering: The alignment results of the local alignment algorithm are used to guide the merging of similar blocks with high similarity to preserve semantic integrity; the guidance method is to ensure that the alignment path is continuous, the matching mode is consistent, the boundary points are complete, and the semantic unit association is greater than 0.7; Output data: Output a tree structure, where each node represents a different document level, and the higher the level, the larger the concept or paragraph. Simplify document representation: Finally, provide a high-level overview of the document by compressing redundancy and merging similar content.
[0021] S3: Extract semantic features based on text content in combination with the patent domain word vector model; perform soft clustering in combination with feature weights and technical relevance in the technical field, where the end domain feature is a feature based on the patent classification system; calculate and store the technical association probability between fragments; in this embodiment, the patent domain word vector model is the Tencent AI Lab patent word vector model; In step S3, the technical field feature weights ; is the domain relevance score, which reflects the relevance of the term t in a specific domain, and its value range is [0,1]; is the technical category relevance, reflecting the technical category to which term t belongs, and its value range is [0,1]; is the relevance of patent classification number, reflecting the importance of term t in international patent classification (such as IPC / CPC), and the value range is [0,1]; is the domain relevance, is the relevance of the technology category, is the classification number relevance, ; t is a term.
[0022] In step S3, the technical relevance between segment s1 and segment s2 ;in , is the vector representation of the fragment, It is the overall representation of the fragment in the semantic space, which is used to measure the similarity and relevance between fragments; is the weight of term t; is the word vector of term t; is the cosine similarity; is the domain similarity; is the vector similarity weight, with a value range of [0,1]; is the domain similarity weight; in this embodiment, , =0.3, =0.3, =0.7, =0.3.
[0023] In this embodiment, the weight W(t) of term t is used to quantify the importance of the term to the information expression in the current segment. ; is the word frequency, which indicates the frequency of occurrence of word t in a specific segment; is the inverse document frequency, which indicates the rarity of term t in the entire patent document set; is the technical field feature weight coefficient, which reflects the technical field relevance of term t.
[0024] The word vector of term t It is a high-dimensional vector that represents the semantic features of a term. The word vector of each term t covers both the basic meaning of the term and the relationship between terms in other technical fields. Patent field-specific vocabulary (such as common patent terms, technical terms, etc.) is used as input elements and input into the pre-trained word vector model. The pre-trained word vector model is pre-trained to reflect the semantic features of the technical field. Word2Vec, GloVe or domain-defined word vectors can be used to finally obtain the word vector WordVector(t) of term t.
[0025] In step S3, the technical association probability between segment s1 and segment s2 is ; is the domain relevance, is the relevance of the technology category, is the classification number relevance, ; Semantic similarity probability between segments s1 and s2 ; is the KL divergence of the GMM distribution of the two fragments s1 and s2; P1 is the probability distribution of fragment s1 in the GMM model; P2 is the probability distribution of fragment s2 in the GMM model; Probability of similarity of technical features between fragments s1 and s2 ; is the weight of the kth technical feature; is the kth technical feature of segment s1; is the kth technical feature of segment s2; is the total number of features; is the feature matching function; The domain relevance probability between segments s1 and s2 ; is the IPC classification number similarity; The degree of overlap in technical fields.
[0026] In step S3, the probability storage structure of the technical association probability between segments s1 and s2 is sparse matrix storage, using key values to store non-zero probabilities, the key format is (segment_id1, segment_id2), and the value includes the probability value, timestamp and update number.
[0027] S4: Number the metadata injected with the document ID and chunk location; establish a fast retrieval tree based on the constructed numbering to achieve The context positioning of time complexity forms a hierarchical numbering index system. In this embodiment, the document ID is the patent publication number of the patent document, the chunk position is the position of the chunk, and a unique number is assigned to each chunk in the recursive chunking algorithm and recorded in the metadata to form the chunk position. The technical classification is the IPC / CPC classification number.
[0028] In step S4, a composite numbering structure is used to construct the numbering , where FileID is the document ID, which is the unique identifier of the document, ChunkID is the chunk position, which is the identifier of the chunk position within the document, and TechClass is the technology classification code; Number CompositeID location mapping relationship is the physical storage location offset, is the content length of the chunk, For metadata information, is a number built based on the position of the block, corresponding to The mapping relationship is also the positioning information for a specific block.
[0029] In the step S4, the multi-level hash index in the quick retrieval tree includes a primary index (document level), a secondary index (block level) and a tertiary index (classification level); The primary index , ,in is the number of cached documents, is the total number of documents; represents the probability function (Probability), represents the hit condition in conditional probability; The secondary index , ,in is the number of cache blocks, is the total number of blocks; The three-level index , ,in Classify the technology The collection of all document IDs under; For computing technology classification The proportion of documents covered; The retrieval probability model of the obtained fast retrieval tree ;in Statistics from visits to the technology category TechClass, ; ;in e is the access time complexity, A Boolean value (true / false) indicating whether the index is hit. is the time complexity of hitting (constant time), is the time complexity when the target misses (logarithmic time), is the total number of documents, and Both are conditional operators; In step S4, the context retrieval mechanism of the quick retrieval tree is as follows: Window Definition , to realize context retrieval in the fast retrieval tree, that is, to obtain the surrounding of the current block; w is the window size, ChunkID is the current block position, and i is used to obtain the current block ChunkID and the contents of the w blocks before and after it to form a context window; S5: Obtain core fragments in order of importance of the blocks, and dynamically adjust the context window size of the obtained core fragments in turn. According to the context window size of the blocks, retrieve the corresponding blocks from small to large, and then expand the context of the block according to the corresponding context window size (that is, use the "document retrieval from small to large" method, first retrieve small fragments and then expand the context), implement the intelligent routing layer, and then use the retrieval-enhanced KV cache to reduce repeated calculations.
[0030] In step S2, when a recursive block algorithm is used to assign a unique number to each block, the technical features, technical fields and innovations of the analysis target are first obtained in Query2doc, and the domain features are extracted in combination with the patent classification number (IPC / CPC) to obtain the query volume q; the blocks are sorted based on the similarity between the blocks and the query volume q, and then numbered according to the sorting of the blocks. In this embodiment, the method of sorting the blocks based on the similarity between the blocks and the query volume q is similar to the method of sorting the patent document d based on the similarity between the patent document d and the query volume q in step S1, that is, the patent document d in step S1 is replaced with the blocks; in step S5, the document importance is obtained according to the sorting of the blocks; the higher the similarity between the block and the query volume q, the higher the document importance, and the higher the document importance, the higher the priority of dynamically adjusting the context window size.
[0031] In step S5, the algorithm for dynamically adjusting the context window size includes: Initial window determination: ; ; Where Sc is the core fragment, and neighbors (Sc) are the neighboring fragments of the core fragment; Window boundary Window_Size constraints: ; ; Calculation of the extended step size Step_Size(t): ; ; Window update rules: ; Q_threshold represents the quality threshold; Evaluate contextual coherence: ; Where P(Si|Si-1) is the conditional probability of adjacent fragments; Evaluate technology coverage: ; Tech_Features() is the extracted technical feature set; Dynamically adjust the probability threshold: ;in ; Dynamically adjust quality thresholds: ; Termination determination Stop_Condition condition: Best_Window selection rule: ; ; Where base_size is the base window size, which is the benchmark value for initial window calculation; P(Sc,Si) is the association probability between the core fragment Sc and the fragment Si, which is used to calculate Core_Score; Neighbors(Sc) is the set of neighboring blocks of the core fragment Sc and the surrounding fragments directly related to the core fragment; MIN_WINDOW is the minimum window size; MAX_WINDOW is the maximum window size; Indicates that the window boundary Window_Size must be a power of 2; In the above, W(t) represents the window at time t, Si and Sj are any two segments in the window W(t); Tech_Features_Total is the total set of all technical features, which is used as the benchmark for calculating technical coverage; New_Segments(t) is the set of segments added at time t; base_threshold is the basic probability threshold, which is the benchmark value for dynamic threshold calculation; min_quality is the minimum quality threshold, which is the lower limit of quality assessment; For dynamic adjustment of quality thresholds, is the time decay factor, is the time step; is the difference between the maximum and minimum quality in the range of quality threshold; Quality(W(t)) is the quality score of the window at time t; middle, represents the time step, Indicates the maximum number of time steps, which is used to define the time range of the evaluation; Size(W(t)) is the size of the window at time t, which is used to determine the window size constraint; When in use, input Core_Segment and P_Matrix, determine the initial window Initial_Window by calculating the initial Core_Score, and then initialize the quality threshold Q_threshold(t), you can get the window Initial_Window after adjusting the context window size; Core_Segment is the core segment, that is, the main technical segment that needs to be processed currently, which serves as the center point of context expansion; P_Matrix is the probability matrix between segments, which stores the association probability between all segment pairs.
[0032] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.
Claims
1. A patent data analysis method based on dynamic context window, characterized in that: The following steps are involved: S1: In Query2doc, the technical features, technical fields and innovations of the analysis target are obtained, and the field features are extracted in combination with the patent classification number to obtain the query volume q; based on the similarity between patent document d and the query volume q, the patent document d is sorted, the meta information is recorded, and a pseudo document is generated; S2: Use a recursive chunking algorithm to split the patent document into the smallest semantic units in sorted order, assign a unique number to each chunk and record it in the metadata; then use a local alignment algorithm and a hierarchical reduction algorithm to maintain the document structure; S3: Combine the patent domain word vector model to extract semantic features based on text content; combine the feature weights of the technical field and the technical relevance to perform soft clustering; calculate and store the technical association probability between fragments; S4: Number the metadata injected with the document ID and chunk position; establish a fast retrieval tree based on the constructed numbering; S5: core fragments are obtained in sequence according to the importance of the documents, and the context window size of the obtained core fragments is dynamically adjusted in sequence, and then the context is expanded.
2. A patent data analysis method based on dynamic context window according to claim 1, characterized in that: In step S1, the text similarity and technical relevance are obtained by combining the coarse-grained and fine-grained levels, and evaluation data is constructed to obtain the similarity between the patent document d and the query q.
3. The patent data analysis method based on dynamic context window according to claim 2 is characterized in that: The step S1 comprises: S11: Calculate the text similarity between the query q and the patent document d: ; and are all fusion weight parameters, where ; ; ; is the text coarse-grainedness of the query q, is the text coarse-grainedness of patent document d, is the text granularity of the query volume q, is the text fine-grainedness of patent document d; N is the number of fine-grained units, qi is the i-th fine-grained unit in the query q, di is the i-th fine-grained unit in patent document d, sim() is the similarity function, and cos() represents the cosine similarity; S12: Calculate the technical similarity between the query q and the patent document d: ; and are all fusion weight parameters, where ; ; is the technical coarse-grainedness of the query quantity q, is the technical coarse-grainedness of patent document d, is the technical granularity of the query quantity q, is the technical granularity of patent document d; M is the number of fine-grained units, qi is the i-th fine-grained unit in the query q, di is the i-th fine-grained unit in patent document d, sim() is the similarity function; cos() represents the cosine similarity; S13: Calculate the overall relevance between the query volume q and the patent document d ; and are all fusion weight parameters, where ; Among them, the automatic weight adjustment mechanism is used to update the fusion weight parameters: in is the partial derivative of the loss function, is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is relative to the fusion weight parameter The amount of change, is the fusion weight parameter in the current iteration step The value of is the updated fusion weight parameter The value of is the learning rate; is the threshold, which is used to judge the limit value of correlation; is the mean adjustment coefficient, which is used to control the influence of the mean value; is the mean function, which is used to calculate the average of the predicted scores; is the standard deviation adjustment coefficient, which is used to control the impact of the fluctuation range; is the standard deviation function, used to calculate the standard deviation of the predicted scores; S14: Calculate the similarity between patent document d and query q based on the overall relevance: First, construct the evaluation data: ; qi is the query volume, di is the patent document, yi is the real relevance, and yi is the overall relevance obtained in step S13 ; Then calculate the predicted relevance score: ; is a text coarse-grained vector, used to represent the text coarse-grainedness of the query q and the patent document d; is a text fine-grained vector, used to represent the text fine-grainedness of the query q and the patent document d; is the technical coarse-grained vector, which is used to represent the technical coarse-grainedness of the query volume q and the patent document d; is a technical fine-grained vector, which is used to represent the technical fine-grainedness of the query volume q and the patent document d; Calculate mean square error , the mean square error is used as the similarity between patent document d and query q; N represents the evaluation data set The number of samples, i.e., the fine-grained partitioning of query-document pairs; is the predicted relevance score corresponding to the i-th query q and patent document d.
4. According to claim 3, a patent data analysis method based on a dynamic context window is characterized in that: In step S2, the local alignment algorithm is the Smith-Waterman algorithm, and the local alignment algorithm includes: Obtain a set of blocks from a recursive block algorithm; Calculate the word vector similarity of each pair of fragments in the block set and construct a similarity matrix; use the local alignment algorithm to find the optimal subsequence alignment path in the similarity matrix and identify the local optimal alignment fragment; use the scoring function to reflect the similarity strength and matching position of each pair of fragments; The best alignment path is output to reflect the local sequence matching obtained by the alignment operation in the similarity matrix; the alignment score is output to measure the matching quality and similarity between the fragments in each pair of fragments.
5. The patent data analysis method based on dynamic context window according to claim 4 is characterized in that: In step S2, the hierarchical reduction algorithm is a Hierarchical Reduction algorithm, and the hierarchical reduction algorithm includes: Obtain a block set from the recursive block algorithm, use the block set as a leaf node of the hierarchical construction, and construct an initial tree hierarchy; Through the alignment result of the local alignment algorithm or the similarity between the patent document d and the query q obtained in step S1, the similarity between adjacent fragments is identified, and similar blocks are merged layer by layer to form a parent node; Output a tree structure, where each node represents a different document level, and higher-level nodes represent larger concepts or paragraphs.
6. The patent data analysis method based on dynamic context window according to claim 5 is characterized in that: In step S3, the technical field feature weights ; is the domain relevance score, with a value range of [0,1]; is the correlation of technology categories, with a value range of [0,1]; is the correlation of patent classification number, with a value range of [0,1]; is the domain relevance, is the relevance of the technology category, is the classification number relevance, ; t is a term; In step S3, the technical relevance between segment s1 and segment s2 ;in , is the vector representation of the fragment; is the weight of term t; is the word vector of term t; is the cosine similarity; is the domain similarity; is the vector similarity weight, with a value range of [0,1]; is the domain similarity weight.
7. The patent data analysis method based on dynamic context window according to claim 6 is characterized in that: In step S3, the technical association probability between segment s1 and segment s2 is ; is the domain relevance, is the relevance of the technology category, is the classification number relevance, ; Semantic similarity probability between segments s1 and s2 ; is the KL divergence of the GMM distribution of the two fragments s1 and s2; P1 is the probability distribution of fragment s1 in the GMM model; P2 is the probability distribution of fragment s2 in the GMM model; Probability of similarity of technical features between fragments s1 and s2 ; wk is the weight of the kth technical feature; is the kth technical feature of segment s1; is the kth technical feature of segment s2; N is the total number of features; Match() is the feature matching function; The domain relevance probability between segments s1 and s2 ; is the IPC classification number similarity; The degree of overlap in technical fields.
8. The patent data analysis method based on dynamic context window according to claim 7 is characterized in that: In step S4, the number of constructed ,in is the document ID, which is the unique identifier of the document. The chunk position is the identifier of the chunk position within the document. Code the technology classification; serial number Position mapping relationship ; is the physical storage location offset, is the content length of the block, For metadata information.
9. The patent data analysis method based on dynamic context window according to claim 8 is characterized in that: In step S4, the multi-level hash index in the quick search tree includes a primary index, a secondary index and a tertiary index; The primary index , , where N1 is the number of cached documents, X is the total number of documents; P() represents the probability function, and hit| represents the hit condition in the conditional probability; The secondary index , , where N2 is the number of cache blocks and M is the total number of blocks; The three-level index , ;in Classify the technology The collection of all document IDs under; For computing technology classification The proportion of documents covered; The retrieval probability model of the obtained fast retrieval tree ;in Statistics from visits to the technology category TechClass. ; ;in is the access time complexity, A Boolean value indicating whether the index is hit. is the time complexity of hitting, is the time complexity when the target misses. is the total number of documents, and Both are conditional operators.
10. A patent data analysis method based on dynamic context window according to claim 9, characterized in that: In step S2, when a recursive block algorithm is used to assign a unique number to each block, the technical features, technical fields and innovations of the analysis target are first obtained in Query2doc, and the field features are extracted in combination with the patent classification number to obtain the query quantity q; the blocks are sorted based on the similarity between the blocks and the query quantity q, and then the blocks are numbered according to the sorting; In step S5, the document importance is obtained according to the order of the blocks.
Citation Information
Cited By
Text semantic partitioning method and device, equipment, medium and product
CN120031046A
Book archive updating method based on reader demands
CN120277254A
Knowledge slice analysis processing method and system based on context window semantic clustering
CN121009195A
Knowledge slicing analysis processing method and system based on context window semantic clustering
CN121009195B