A method and system for semantic combination of multiple information elements based on a large language model
By converting raw text into structured data, integrating information from different data sources, and utilizing knowledge base reasoning to statistically analyze the correlation between words or characters, the accuracy problem of large language models in personalized recommendations is solved, achieving efficient personalized content recommendation.
Patent Information
- Application Number
- CN202411646779.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In existing technologies, large language models cannot accurately and efficiently determine the similarity features of consecutively appearing words or characters when recommending personalized content, resulting in inaccurate recommendations.
By converting raw text content into structured data, integrating information from different data sources, extracting semantic features of words, and using logical and common sense knowledge bases for reasoning, the correlation and co-occurrence probability of consecutively occurring words or characters are statistically analyzed to improve the information retrieval results of search engines and achieve personalized recommendations.
It enables accurate and efficient recommendation of repeated words or characters in text information, improving the accuracy of personalized content recommendation.
Smart Images

Figure CN119599023B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of large language model technology, and specifically relates to a method and system for semantic combination of multiple information elements based on a large language model. Background Technology
[0002] Large language models are deep learning-based natural language processing models that are trained on large amounts of text data to understand and generate natural language. They are capable of handling complex language tasks such as text generation, translation, and question answering. Multi-information element semantic combination methods based on large language models involve integrating information elements from different data sources (such as text, data, images, etc.) into coherent semantic expressions.
[0003] Existing patent CN118093790A discloses a method for optimizing the generation of a large language model for retrieval enhancement. This method includes: acquiring a user's retrieval needs; obtaining multiple retrieval results based on the retrieval needs, where each retrieval result includes multiple textual information and multiple historical dialogues; obtaining the target semantic distance between each retrieval result and the retrieval needs based on each retrieval result and retrieval needs; sorting each target semantic distance to obtain an array of retrieval needs; and sequentially processing each element in the array byte-wise to obtain the contextual information of the large language model. The technology disclosed in this patent cannot accurately and efficiently determine the similarity features of consecutively appearing words or characters. Because it cannot determine similarity features, the personalized content recommendations are often inaccurate. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method and system for semantic combination of multiple information elements based on a large language model, in order to solve the technical problem of accurate personalized content recommendation.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution.
[0006] This invention first discloses a method for semantic combination of multiple information elements based on a large language model, which includes the following steps:
[0007] Step 1: Obtain the original text content and convert it into structured data containing entities, relationships, and events;
[0008] Step 2: Merge information from different data sources and multiple modalities to form fused information;
[0009] Step 3: Map the words in the fused information to a high-dimensional vector space and extract the semantic features of the words in the context;
[0010] Step 4: Combine the semantic features of all words into a unified embedding vector;
[0011] Step 5: Based on the known information, perform reasoning using the logic knowledge base and the common sense knowledge base respectively, and send the reasoned information to the text generation module to initialize the text generation result;
[0012] Step 6: Merge the fused information and the information of the unified expression embedding vector, calculate the probability that consecutively occurring words or characters in the merged information have the same characteristics, and provide the merged information to the search engine based on the probability to improve the search engine's information retrieval results.
[0013] Step 7: Generate personalized content recommendations based on the information retrieval results, and feed the personalized recommendations back to the text generation module to update the text generation results.
[0014] The present invention further includes the following preferred embodiments:
[0015] The step of obtaining the original text content and converting the original text content into structured data containing entities, relationships, and events further includes:
[0016] Entity recognition algorithms are used to identify entity names in the original text content;
[0017] The relationships between entities are determined using a relation extraction algorithm;
[0018] The event extraction algorithm is executed to identify events and their participants from the original text content.
[0019] The step of combining the semantic features of all words into a unified embedding vector further includes:
[0020] We use a weighted average of the embedding vectors of different information to form a comprehensive representation; we use an attention mechanism to dynamically adjust the influence of different information according to the context; and we use neural networks to combine and fuse different types of embedding vectors.
[0021] The probability that consecutively occurring words or characters in the merged statistical information have the same characteristics further includes:
[0022] Extract consecutive words or characters with the same features from the merged feature information, and calculate the probability W that consecutive words or characters have the same feature:
[0023]
[0024] m represents the causal correlation coefficient between consecutively occurring words or characters, h represents the degree of correlation between consecutively occurring words or characters, and c represents the ratio of the co-occurrence probability of a word or character to its individual occurrence probability.
[0025] The degree of association h of consecutively occurring words or characters is represented as:
[0026]
[0027] In the formula, 'a' represents whether the frequency of occurrence of a word or character can predict the probability of other words or characters by analyzing the frequency of occurrence of a word or character through a regression model.
[0028] This invention also discloses a multi-information element semantic combination system based on a large language model, utilizing the aforementioned multi-information element semantic combination method based on a large language model, comprising:
[0029] The data structuring module is used to acquire raw text content and convert the raw text content into structured data containing entities, relationships, and events;
[0030] The data fusion module is used to fuse information from different data sources and multiple modalities to form fused information;
[0031] The semantic feature extraction module is used to map the words in the fused information to a high-dimensional vector space and extract the semantic features of the words in the context.
[0032] The semantic feature combination module is used to combine the semantic features of all words into a unified embedding vector.
[0033] The data reasoning module is used to perform reasoning based on known information using both a logical knowledge base and a common sense knowledge base, and then sends the reasoned information to the text generation module to initialize the text generation result.
[0034] The information merging module is used to merge the fused information and the information of the unified expression embedding vector, calculate the probability that consecutively occurring words or characters in the merged information have the same characteristics, and provide the merged information to the search engine based on the probability to improve the information retrieval results of the search engine.
[0035] The personalized recommendation module is used to generate personalized content recommendations based on the information retrieval results, and then feeds these personalized recommendations back to the text generation module to update the text generation results.
[0036] Accordingly, this application also discloses a terminal, including a processor and a storage medium;
[0037] The storage medium is used to store instructions;
[0038] The processor is configured to operate according to the instructions to perform the steps of the aforementioned method for semantic combination of multiple information elements based on a large language model.
[0039] Accordingly, this application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the aforementioned method for semantic combination of multiple information elements based on a large language model.
[0040] The beneficial effect of this invention is that, compared with the prior art, this invention provides a method and system for semantic combination of multiple information elements based on a large language model. By determining whether repeated words or characters in text information have the same characteristics through the degree of association between consecutively occurring words or characters, the ratio of co-occurrence probability to individual occurrence probability, and the causal association coefficient between consecutively occurring words or characters, this invention accurately and efficiently achieves personalized content recommendation based on words or characters with the same characteristics. Attached Figure Description
[0041] Figure 1 This is a flowchart of the semantic combination method for multiple information elements based on a large language model in this invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0043] The embodiments described in this application are merely some, not all, embodiments of the present invention. Based on the spirit of the present invention, other embodiments obtained by those skilled in the art without inventive effort are all within the protection scope of the present invention.
[0044] To address the shortcomings of existing technologies, this invention proposes a multi-information element semantic combination method and system based on a large language model. By analyzing the correlation between consecutively occurring words or characters, the ratio of co-occurrence probability to individual occurrence probability, and the causal correlation coefficient between consecutively occurring words or characters, this method determines whether repeated words or characters in text information have the same characteristics. Based on these words or characters with the same characteristics, personalized content recommendations can be accurately and efficiently implemented.
[0045] See Figure 1 As shown, the semantic combination method for multiple information elements based on a large language model disclosed in this invention includes the following steps:
[0046] Step 1: Obtain the original text content and convert it into structured data containing entities, relationships, and events.
[0047] In a further embodiment, step 1 specifically includes entity recognition, relation extraction, and event extraction;
[0048] First, entity names in the text are identified using an entity recognition algorithm;
[0049] Secondly, the relationships between entities are determined through a relation extraction algorithm;
[0050] Finally, event extraction is performed to identify the events and their participants from the text.
[0051] Step 2: Integrate information from different data sources and multiple modalities to form integrated information.
[0052] In a further embodiment, step 2 specifically includes data fusion and multimodal fusion.
[0053] The output after fusion is:
[0054] Output=Concat(v1,v2,v3)*(W1v1+W2v2+W3v3)
[0055] In the formula, v1, v2, and v3 represent the entity names, relationships, events, and their participants from the identified text; W1, W2, and W3 are the corresponding weights.
[0056] The data fusion is used to merge data from different data sources into a unified information set;
[0057] The multimodal fusion is used to combine text, image, and audio information to obtain a more comprehensive understanding.
[0058] Step 3: Map the words in the fused information to a high-dimensional vector space and extract the semantic features of the words in the context.
[0059] Step 4: Combine the semantic features of all words into a unified embedding vector.
[0060] First, a weighted average is performed to combine the embedding vectors of different information to form a comprehensive representation. Then, an attention mechanism is used to dynamically adjust the influence of different information based on the context. Finally, a neural network is used to combine and fuse different types of embedding vectors.
[0061] In a further embodiment, step 4 specifically employs a weighted average mechanism to assign different weights to different elements to output the average value:
[0062]
[0063] x i It is the i-th element (entity name, relation, or event and its participants, and several specific constituent elements x). i );w i is the weight of the i-th element; n is the sum of the elements.
[0064] Step 5: Based on the known information, perform reasoning using the logic knowledge base and the common sense knowledge base respectively, and send the reasoned information to the text generation module to initialize the text generation result.
[0065] In a further embodiment, the text generation process also includes using neural networks to capture more complex language patterns and long-distance dependencies.
[0066] Step 6: Merge the fused information and the information of the unified expression embedding vector, calculate the probability that consecutively occurring words or characters in the merged information have the same characteristics, and provide the merged information to the search engine based on the probability to improve the search engine's information retrieval results.
[0067] In a further embodiment, in step 6, the information from steps 2 and 4 is merged, and words or characters with the same consecutive features are extracted from the merged feature information to improve the search engine results. The probability W of consecutively appearing words or characters having the same features is:
[0068]
[0069] In the formula, h represents the degree of association between consecutively occurring words or characters, c represents the ratio of the co-occurrence probability of a word or character to its individual occurrence probability, and m represents the causal association coefficient between consecutively occurring words or characters.
[0070] In a further embodiment, the degree of association h of the consecutively occurring words or characters is represented as:
[0071]
[0072] In the formula, m represents the causal correlation coefficient between consecutively occurring words or characters, and a represents whether the frequency of occurrence of a word or character can predict the probability of other words or characters by analyzing the frequency of occurrence of a word or character through a regression model.
[0073] In a further embodiment, when W≥75%, it indicates that consecutively appearing words or characters have the same characteristics and can be used for information retrieval to form personalized recommendations;
[0074] When W < 75%, it means that consecutively appearing words or characters do not have the same characteristics and cannot be used for information retrieval and personalized recommendations.
[0075] Step 7: Generate personalized content recommendations based on the information retrieval results, and feed the personalized recommendations back to the text generation module to update the text generation results.
[0076] For example, let's perform a probability analysis of the common features of two consecutively occurring words, "technology" and "literature." The ratio of the co-occurrence probability of a word or character to its individual occurrence probability is taken as c = 34%, the causal correlation coefficient between consecutively occurring words or characters is taken as m = 25%, and the regression model analysis of whether the frequency of a word or character can predict the probability of other words or characters is taken as a = 12%. Then:
[0077]
[0078] The above calculations show that the correlation between the two consecutive words "science and technology" and "literature" is h = 6.3%.
[0079] Therefore, the probability that the two consecutive words "technology" and "literature" share the same characteristics is:
[0080]
[0081] The above calculations show that the probability that the consecutively occurring words "technology" and "literature" share the same characteristics is W = 55.5%. This means that consecutively occurring words like "technology" and "literature" do not share the same characteristics and cannot be used for information retrieval and personalized recommendations.
[0082] The beneficial effect of this invention is that, compared with the prior art, this invention provides a method and system for semantic combination of multiple information elements based on a large language model. By determining whether repeated words or characters in text information have the same characteristics through the degree of association between consecutively occurring words or characters, the ratio of co-occurrence probability to individual occurrence probability, and the causal association coefficient between consecutively occurring words or characters, this invention accurately and efficiently achieves personalized content recommendation based on words or characters with the same characteristics.
[0083] This invention can be a system, method, and / or computer program product. This invention also discloses a multi-information element semantic combination system based on a large language model, based on the aforementioned method for multi-information element semantic combination using a large language model, comprising:
[0084] The data structuring module is used to acquire raw text content and convert the raw text content into structured data containing entities, relationships, and events;
[0085] The data fusion module is used to fuse information from different data sources and multiple modalities to form fused information;
[0086] The semantic feature extraction module is used to map the words in the fused information to a high-dimensional vector space and extract the semantic features of the words in the context.
[0087] The semantic feature combination module is used to combine the semantic features of all words into a unified embedding vector.
[0088] The data reasoning module is used to perform reasoning based on known information using both a logical knowledge base and a common sense knowledge base, and then sends the reasoned information to the text generation module to initialize the text generation result.
[0089] The information merging module is used to merge the fused information and the information of the unified expression embedding vector, calculate the probability that consecutively occurring words or characters in the merged information have the same characteristics, and provide the merged information to the search engine based on the probability to improve the information retrieval results of the search engine.
[0090] The personalized recommendation module is used to generate personalized content recommendations based on the information retrieval results, and then feeds these personalized recommendations back to the text generation module to update the text generation results.
[0091] Based on the spirit of this invention, those skilled in the art will readily conceive that a computer program product can be obtained based on the aforementioned method for semantic combination of multiple information elements based on a large language model. The computer program product may include a computer-readable storage medium on which computer-readable program instructions are loaded to enable a processor to implement various aspects of this disclosure. That is, this application also includes a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps according to the aforementioned method for semantic combination of multiple information elements based on a large language model.
[0092] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0093] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0094] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for semantic combination of multiple information elements based on a large language model, characterized in that, Includes the following steps: Step 1: Obtain the original text content and convert it into structured data containing entities, relationships, and events; Step 2: Merge information from different data sources and multiple modalities to form fused information; Step 3: Map the words in the fused information to a high-dimensional vector space and extract the semantic features of the words in the context; Step 4: Combine the semantic features of all words into a unified embedding vector; Step 5: Based on the known information, perform reasoning using the logic knowledge base and the common sense knowledge base respectively, and send the reasoned information to the text generation module to initialize the text generation result; Step 6: Merge the fused information and the information of the unified expression embedding vector, calculate the probability that consecutively occurring words or characters in the merged information have the same characteristics, and provide the merged information to the search engine based on the probability to improve the search engine's information retrieval results. Step 7: Generate personalized content recommendations based on the information retrieval results, and feed the personalized recommendations back to the text generation module to update the text generation results; The probability that consecutively occurring words or characters in the merged statistical information have the same characteristics further includes: Extract consecutive words or characters with the same features from the merged feature information, and calculate the probability W that consecutive words or characters have the same feature: m represents the causal correlation coefficient between consecutively occurring words or characters, h represents the degree of correlation between consecutively occurring words or characters, and c represents the ratio of the co-occurrence probability of a word or character to its individual occurrence probability. The degree of association h of consecutively occurring words or characters is represented as: In the formula, 'a' represents whether the frequency of occurrence of a word or character can predict the probability of other words or characters by analyzing the frequency of occurrence of a word or character through a regression model.
2. The method for semantic combination of multiple information elements based on a large language model according to claim 1, characterized in that, The step of obtaining the original text content and converting the original text content into structured data containing entities, relationships, and events further includes: Entity recognition algorithms are used to identify entity names in the original text content; The relationships between entities are determined using a relation extraction algorithm; The event extraction algorithm is executed to identify events and their participants from the original text content.
3. The method for semantic combination of multiple information elements based on a large language model according to claim 2, characterized in that, The step of combining the semantic features of all words into a unified embedding vector further includes: We use a weighted average of the embedding vectors of different information to form a comprehensive representation; we use an attention mechanism to dynamically adjust the influence of different information according to the context; and we use neural networks to combine and fuse different types of embedding vectors.
4. A semantic combination system for multiple information elements based on a large language model, characterized in that, include: The data structuring module is used to acquire raw text content and convert the raw text content into structured data containing entities, relationships, and events; The data fusion module is used to fuse information from different data sources and multiple modalities to form fused information; The semantic feature extraction module is used to map the words in the fused information to a high-dimensional vector space and extract the semantic features of the words in the context. The semantic feature combination module is used to combine the semantic features of all words into a unified embedding vector. The data reasoning module is used to perform reasoning based on known information using both a logical knowledge base and a common sense knowledge base, and then sends the reasoned information to the text generation module to initialize the text generation result. The information merging module is used to merge the fused information and the information of the unified expression embedding vector, calculate the probability that consecutively occurring words or characters in the merged information have the same characteristics, and provide the merged information to the search engine based on the probability to improve the information retrieval results of the search engine. The personalized recommendation module is used to generate personalized content recommendations based on the information retrieval results and feed the personalized recommendations back to the text generation module to update the text generation results; The information merging module is further used for: Extract consecutive words or characters with the same features from the merged feature information, and calculate the probability W that consecutive words or characters have the same feature: m represents the causal correlation coefficient between consecutively occurring words or characters, h represents the degree of correlation between consecutively occurring words or characters, and c represents the ratio of the co-occurrence probability of a word or character to its individual occurrence probability. The degree of association h of consecutively occurring words or characters is represented as: In the formula, 'a' represents whether the frequency of occurrence of a word or character can predict the probability of other words or characters by analyzing the frequency of occurrence of a word or character through a regression model.
5. The multi-information element semantic combination system based on a large language model according to claim 4, characterized in that, The data structuring module is further used for: Entity recognition algorithms are used to identify entity names in the original text content; The relationships between entities are determined using a relation extraction algorithm; The event extraction algorithm is executed to identify events and their participants from the original text content.
6. The multi-information element semantic combination system based on a large language model according to claim 5, characterized in that, The semantic feature combination module is further used for: We use a weighted average of the embedding vectors of different information to form a comprehensive representation; we use an attention mechanism to dynamically adjust the influence of different information according to the context; and we use neural networks to combine and fuse different types of embedding vectors.
7. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the multi-information element semantic combination method based on a large language model according to any one of claims 1-3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the semantic combination method for multi-information elements based on a large language model as described in any one of claims 1-3.
Citation Information
Patent Citations
Natural language processing method and system based on machine learning
CN117493491A
Retrieval enhancement generation method and system supporting multi-language knowledge base
CN118964533A