Method and device for identifying relationship between organizations based on web text mining
By using Word2Vec to build the initial training set and fine-tune and incrementally train the large language model in the network text mining method, the accuracy of inter-organization relationship recognition in unstructured text is solved, and the recognition accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202411109002.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-13
AI Technical Summary
The prior art is difficult to accurately identify complex relationships between organizations when processing unstructured text, and the processing capability is insufficient, resulting in low recognition accuracy.
Using a method based on network text mining, the initial training set is constructed through Word2Vec technology, and the large language model is fine-tuned using the low-rank adaptation fine-tuning method, followed by incremental training to generate a second organizational relationship recognition model to improve the recognition accuracy .
Accurate identification of multiple types of relationships between different organizations in unstructured texts is achieved, which significantly improves the accuracy and efficiency of relationship recognition among organizations.
Smart Images

Figure CN119088978A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and device for identifying inter-organizational relationships based on network text mining. Background Art
[0002] Relationship identification is a key task in the field of natural language processing. It aims to automatically identify and extract entities and their relationships from unstructured text data. Each relationship is represented as a triple <entity a, relationship, entity b>. The relationships between organizations usually include various forms, such as cooperation, competition, affiliation, shareholding, mergers and acquisitions, etc. Organizational relationship identification has shown significant importance and broad application prospects in different application fields such as business intelligence, risk management, and policy making.
[0003] In the business field, organizational relationship identification helps companies understand market structure and competition. By analyzing public reports, business agreements, partnerships and other texts, companies can identify potential business partners and competitors, thereby formulating corresponding market strategies and effectively avoiding business risks. Government agencies and regulatory authorities can use organizational relationship identification technology to monitor and analyze interactions between different organizations in order to formulate effective policies and regulations. The application of organizational relationship identification is not limited to the above-mentioned fields, it can also be extended to many interdisciplinary fields such as supply chain management, crisis response, and cultural studies.
[0004] With the continuous improvement of computing power and the increasing abundance of data resources, large language models have developed rapidly. These models are pre-trained on large-scale corpora and capture rich language representations by learning language patterns, structures, and grammar, but existing organizational relationship recognition technologies still face some challenges. Due to the complexity of natural language, conventional deep learning models find it difficult to fully understand the nuances and complex relationships in the text. Different industries and different types of texts also have different requirements for the recognition of organizational relationships. The processing capabilities for unstructured data are insufficient.
[0005] In the prior art, there is a lack of an accurate and efficient method for identifying inter-organizational relationships for unstructured texts. Summary of the invention
[0006] In order to solve the technical problems of poor unstructured text processing capability and low accuracy in the prior art, the present invention provides a method and device for identifying inter-organizational relationships based on network text mining. The technical solution is as follows:
[0007] In one aspect, a method for identifying inter-organizational relationships based on network text mining is provided. The method is implemented by an inter-organizational relationship identification device, and the method includes:
[0008] Crawling text according to a preset list of organization names to obtain original network text; preprocessing the original network text to obtain processed text;
[0009] Based on Word2Vec technology, an initial training set is constructed according to a preset list of organization names, the processed text, preset training prompt words, and preset benchmark organization relationships;
[0010] According to the initial training set, a low-rank adaptation fine-tuning method is used to fine-tune the preset large language model to obtain a first organizational relationship recognition model;
[0011] Based on the first organizational relationship recognition model, constructing an incremental training set according to preset training prompt words and the processed text;
[0012] Based on a preset training round, using the incremental training set, incrementally training the first organizational relationship recognition model to obtain a second organizational relationship recognition model;
[0013] Obtain a list of organization names to be identified; perform text crawling and preprocessing based on the list of organization names to be identified to obtain network text to be identified; input the network text to be identified into the second organization relationship identification model to obtain organization identification relationships.
[0014] On the other hand, a device for identifying inter-organizational relationships based on network text mining is provided. The device is applied to a method for identifying inter-organizational relationships based on network text mining. The device includes:
[0015] A text acquisition module is used to crawl text according to a preset list of organization names to obtain original network text; pre-process the original network text to obtain processed text;
[0016] An initial training set construction module, used to construct an initial training set based on Word2Vec technology according to a preset list of organization names, the processed text, preset training prompt words and preset benchmark organization relationships;
[0017] A preliminary training module, used to fine-tune a preset large language model using a low-rank adaptation fine-tuning method according to the initial training set to obtain a first organizational relationship recognition model;
[0018] An incremental training set construction module, used to construct an incremental training set based on the first organizational relationship recognition model, according to preset training prompt words and the processed text;
[0019] An incremental training module, configured to perform incremental training on the first organizational relationship recognition model based on a preset training round and using the incremental training set to obtain a second organizational relationship recognition model;
[0020] The organization relationship identification module is used to obtain a list of organization names to be identified; perform text crawling and preprocessing based on the list of organization names to be identified to obtain network text to be identified; input the network text to be identified into the second organization relationship identification model to obtain organization identification relationships.
[0021] On the other hand, a device for identifying inter-organizational relationships is provided, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned methods for identifying inter-organizational relationships based on network text mining is implemented.
[0022] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned methods for identifying inter-organizational relationships based on network text mining.
[0023] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0024] The present invention proposes a method for identifying inter-organizational relationships based on network text mining, which captures rich language representations by learning the patterns, structures and grammar of the language through a large language model. The pre-trained large language model is fine-tuned using a relatively small data set related to a specific task so that it can better complete specific application tasks. The present invention can identify multiple types of relationships that may exist between different organizations from a large amount of irregular text, and effectively improve the accuracy of identifying inter-organizational relationships with the help of a large language model. The present invention is an accurate and efficient method for identifying inter-organizational relationships for unstructured text. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 It is a flow chart of a method for identifying inter-organizational relationships based on network text mining provided by an embodiment of the present invention;
[0027] Figure 2 It is a block diagram of an inter-organizational relationship identification device based on network text mining provided by an embodiment of the present invention;
[0028] Figure 3 It is a structural schematic diagram of an inter-organization relationship identification device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0030] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0031] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0032] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.
[0033] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0034] The embodiment of the present invention provides a method for identifying inter-organizational relationships based on network text mining. The method can be implemented by an inter-organizational relationship identification device, which can be a terminal or a server. Figure 1 The flowchart of the method for identifying inter-organizational relationships based on network text mining is shown. The processing flow of the method may include the following steps:
[0035] S1. crawl text according to a preset list of organization names to obtain original network text; pre-process the original network text to obtain processed text.
[0036] Optionally, the original network text is preprocessed to obtain processed text, including:
[0037] Process the missing values of the original network text to obtain the first text;
[0038] Performing data normalization processing on the first text to obtain a second text;
[0039] The second text is structured and organized using the JSON format and saved to obtain a processed text.
[0040] In a feasible implementation, the present invention searches the name of each organization in the list one by one through a search engine based on the pre-acquired list of organization names in a specific area, thereby obtaining network text data corresponding to the organization name. The data is then sorted into a CSV format, i.e., a row and column structure. Each row corresponds to an organization, and each row includes four columns, each of which represents the organization name, organization profile, organization directory, and organization details.
[0041] Perform data cleaning on the acquired network text data, including:
[0042] Since some organizations have incomplete information or are not even indexed on the Internet, some columns are missing in the organization description text retrieved by the search engine. Therefore, the rows that are missing both the organization profile and organization details are deleted.
[0043] Unnecessary spaces and special characters in the organization name, organization profile, organization directory, and organization details are deleted to ensure the standardization and neatness of the text.
[0044] The obtained detailed text of the organization is structured in JSON format to ensure a clear and explicit mapping relationship between the organization name and its text description. The constructed JSON format data is written into a file to achieve data persistence.
[0045] S2. Based on Word2Vec technology, an initial training set is constructed according to a preset list of organization names, processed text, preset training prompt words, and preset benchmark organization relationships.
[0046] Optionally, based on the Word2Vec technology, an initial training set is constructed according to a preset list of organization names, processed text, preset training prompt words, and preset benchmark organization relationships, including:
[0047] Get the organization name according to the preset organization name list;
[0048] According to the processed text and the organization name, a detailed text description corresponding to the organization name is obtained;
[0049] Based on Word2Vec technology, triples are constructed according to the organization name, the preset organization name list, the detailed text description, and the preset benchmark organization relationship to obtain the organization relationship triples;
[0050] Construct training triples based on organizational relationship triples, preset training prompt words and detailed text descriptions;
[0051] The training triplets are determined as the initial training set.
[0052] In a feasible implementation manner, the Word2Vec used in the present invention is a word embedding technology that maps words to a high-dimensional vector space through a neural network, which can capture the semantic and contextual relationships between words. Word2Vec converts each word into a vector of a fixed dimension, so that semantically similar words are closer in the vector space, thereby enabling more effective text analysis and processing.
[0053] Among them, the Skip-gram model is a model used to train Word2Vec word embeddings, and its goal is to predict its context words by a given central word. Specifically, the Skip-gram model learns the word embedding vector of the central word so that the vector can maximize the probability of occurrence of context words around the central word, thereby generating high-quality word embedding representations.
[0054] On this basis, the initial training set of the large language model is constructed based on the organizational relationship triples. Each piece of training data can be represented as a triplet <training prompt word, detailed text description, organizational relationship triplet>.
[0055] The "training prompt words" of the training triples can be set to "You are now an organizational relationship extraction model. Do you think there is an alias, affiliation, cooperation, competition, merger or shareholding relationship between the two organizations in the following text? If so, please output it in the form of triples. The triples are connected by ','. If it does not contain the above relationship, please output unknown."
[0056] Optionally, based on the Word2Vec technology, triples are constructed according to the organization name, a preset organization name list, a detailed text description, and a preset benchmark organization relationship to obtain an organization relationship triple, including:
[0057] Use natural language word segmentation tools to segment the detailed text description to obtain a noun set and a verb set;
[0058] Based on the preset list of organization names, synonyms are filtered in the noun set using Word2Vec technology to obtain the recognized organization names;
[0059] Based on the preset benchmark organizational relationship, in the verb set, synonym screening is performed using the Word2Vec technology to obtain the first recognition relationship;
[0060] A triple is constructed according to the organization name, the identification organization name and the first identification relationship to obtain an organization relationship triple.
[0061] In a feasible implementation, the present invention uses the common types of relationships between organizations determined by domain experts, including but not limited to cooperation, competition, mergers and acquisitions, shareholdings, aliases, and affiliations, as benchmark organizational relationships in organizational relationship identification tasks.
[0062] Based on the list of organization names in a certain area obtained in advance, the name of each organization in the search list is crawled on the Internet through web crawler technology to obtain the detailed text description corresponding to the organization name. The original network text is segmented using natural language word segmentation tools, and the noun set and verb set corresponding to each text segment are extracted.
[0063] Since the same organization may have multiple aliases in the original web text, and the same relationship may have multiple different expressions, we need to perform synonym analysis on the noun set and verb set in each web text. Using Word2Vec word embedding technology, the ordered word segmentation results of all crawled web texts are input into the model for training.
[0064] Through the Word2Vec model, the words in the noun set and verb set corresponding to each section of network text are converted into corresponding word embedding vectors. For the embedding vector of each noun in the noun set, the cosine similarity between it and the embedding vector of the organization name in the list of organization names obtained in advance is calculated. If the similarity is greater than a specific threshold, the two nouns are identified as the same organization; for each verb in the verb set, the cosine similarity between it and the embedding vector of the common relationship between organizations determined in advance is calculated. If the similarity is greater than a specific threshold, the two verbs are identified as the same relationship.
[0065] Usually a piece of network text corresponds to two organizations and one relationship. If more than two organizations or more than one relationship are initially identified, manual screening is required to ensure the correctness of the annotation.
[0066] S3. According to the initial training set, a low-rank adaptation fine-tuning method is used to fine-tune the preset large language model to obtain a first organizational relationship recognition model.
[0067] Optionally, according to the initial training set, a low-rank adaptation fine-tuning method is used to fine-tune the preset large language model to obtain a first organizational relationship recognition model, including:
[0068] According to the preset large language model, the original parameter matrix is obtained;
[0069] In the forward propagation process, the original parameter matrix is frozen, and the preset large language model is trained to obtain the updated gradient matrix A and the updated gradient matrix B;
[0070] Calculate according to the original parameter matrix, the updated gradient matrix A and the updated gradient matrix B to obtain the updated parameter matrix; the updated parameter matrix is the sum of the original parameter matrix and the gradient matrix; the gradient matrix includes the gradient matrix A and the gradient matrix B;
[0071] The updated parameter matrix is assigned to the preset large language model to obtain the first organizational relationship recognition model.
[0072] In a feasible implementation, the present invention adopts the open source model ChatGLM3-6B Base in the ChatGLM3 series, a new generation of conversation pre-training models jointly released by Zhipu AI and Tsinghua University KEG Laboratory. This model retains many excellent features of the previous two generations of models, such as smooth conversation and low deployment threshold, and also has a more powerful basic model, more complete functional support and a more comprehensive open source sequence.
[0073] Select appropriate model hyperparameters, such as model size, number of iterations, learning rate, batch size, decoding type, number of training rounds, etc., and use the training dataset to fine-tune the large language model so that the model can better adapt to the organizational relationship recognition task.
[0074] The present invention uses the Low-Rank Adaptation (LoRA) method to fine-tune the large language model. The optimization of LoRA's training process is mainly reflected in its strategy for updating model parameters. In traditional fine-tuning methods, all parameters of the model are updated according to the data of downstream tasks, which not only requires a lot of computing resources, but may also cause overfitting due to too many parameters. To solve this problem, LoRA proposes to add a low-rank decomposition matrix to the parameter matrix of the pre-trained model to approximate the parameter update of each layer, thereby reducing the parameters that need to be trained to adapt to downstream tasks. Given a parameter matrix , its update process can be generally expressed as follows:
[0075] (1)
[0076] in, is the original parameter matrix, is the updated gradient matrix.
[0077] The weight matrix of the pre-trained model, It is frozen during fine-tuning and does not directly participate in gradient updates. Instead, LoRA introduces a low-rank decomposition matrix for each weight matrix, that is, the update of the weight Two small matrices and It is approximated by the product of , where , , and J is much smaller than I. During the training process, only and The parameters in need to be trained and updated, while the original weight matrix Remain unchanged. During the forward propagation process, the original calculation intermediate state The formula is as follows (2):
[0078] (2)
[0079] After the training is completed, the original parameter matrix And the matrix obtained by training and matrix Merge to get the updated parameter matrix Therefore, the LoRA method not only significantly reduces the number of parameters that need to be updated during model training, but also reduces the model's demand for computing resources.
[0080] S4. Based on the first organizational relationship recognition model, an incremental training set is constructed according to preset training prompt words and processed text.
[0081] Optionally, based on the first organizational relationship recognition model, an incremental training set is constructed according to preset training prompt words and processed text, including:
[0082] Obtain unlabeled network text based on the processed text;
[0083] Using the first organizational relationship recognition model, the organizational relationship of the unlabeled network text is recognized to obtain a second recognition relationship;
[0084] Correcting the second identification relationship to obtain a third identification relationship;
[0085] constructing incremental triples according to the third recognition relation, the preset training prompt words and the processed text;
[0086] The incremental triplets are determined as the incremental training set.
[0087] In a feasible implementation, since the initial training set is constructed by combining the Word2Vec algorithm and manual verification, the size of the initial training set is relatively small, resulting in poor performance of the large language model for organizational relationship recognition after the first round of fine-tuning.
[0088] To overcome the above defects, the present invention performs incremental training on the large language model. The large language model is fine-tuned using the initial training set so that it achieves good recognition performance on the initial training set. The fine-tuned large language model is used to automatically recognize a portion of unlabeled text data, the recognition results are manually checked, the misclassified data are manually corrected, and the corrected samples are used as incremental training sets.
[0089] S5. Based on the preset training rounds, use the incremental training set to incrementally train the first organizational relationship recognition model to obtain a second organizational relationship recognition model.
[0090] In a feasible implementation, an incremental training set is used to perform incremental training on the first organizational relationship recognition model. The incremental training process is repeated. When the number of training rounds reaches a preset threshold, the training is stopped and the organizational relationship recognition model of that round is used as the second organizational relationship recognition model.
[0091] S6. Obtain a list of organization names to be identified; perform text crawling and preprocessing based on the list of organization names to be identified to obtain network text to be identified; input the network text to be identified into a second organization relationship identification model to obtain an organization identification relationship.
[0092] In a feasible implementation, the present invention uses a relatively small data set related to a specific task to fine-tune the pre-trained large language model so that it can better complete the specific application task. Applying the large language model to organizational relationship identification can effectively improve the accuracy of organizational relationship identification. The accuracy and efficiency of organizational relationship identification will directly affect the quality and effectiveness of decision-making in related fields, which is of great significance for promoting social progress and knowledge innovation.
[0093] The present invention proposes a method for identifying inter-organizational relationships based on network text mining, which captures rich language representations by learning the patterns, structures and grammar of the language through a large language model. The pre-trained large language model is fine-tuned using a relatively small data set related to a specific task so that it can better complete specific application tasks. The present invention can identify multiple types of relationships that may exist between different organizations from a large amount of irregular text, and effectively improve the accuracy of identifying inter-organizational relationships with the help of a large language model. The present invention is an accurate and efficient method for identifying inter-organizational relationships for unstructured text.
[0094] Figure 2 The present invention is a block diagram of an inter-organizational relationship identification device based on network text mining according to an exemplary embodiment. The device is used in an inter-organizational relationship identification method based on network text mining. Figure 2 The device includes a text acquisition module 210, an initial training set construction module 220, a preliminary training module 230, an incremental training set construction module 240, an incremental training module 250 and an organizational relationship identification module 260. Among them:
[0095] The text acquisition module 210 is used to crawl text according to a preset list of organization names to obtain original network texts; pre-process the original network texts to obtain processed texts;
[0096] An initial training set construction module 220 is used to construct an initial training set based on a preset organization name list, processed text, preset training prompt words and preset benchmark organization relationship based on Word2Vec technology;
[0097] A preliminary training module 230 is used to fine-tune the preset large language model using a low-rank adaptation fine-tuning method according to the initial training set to obtain a first organizational relationship recognition model;
[0098] An incremental training set construction module 240 is used to construct an incremental training set based on the first organizational relationship recognition model, according to preset training prompt words and processed text;
[0099] An incremental training module 250 is used to perform incremental training on the first organizational relationship recognition model based on a preset training round and using an incremental training set to obtain a second organizational relationship recognition model;
[0100] The organization relationship identification module 260 is used to obtain a list of organization names to be identified; perform text crawling and preprocessing based on the list of organization names to be identified to obtain network text to be identified; and input the network text to be identified into a second organization relationship identification model to obtain an organization identification relationship.
[0101] Optionally, the text acquisition module 210 is further used to:
[0102] Process the missing values of the original network text to obtain the first text;
[0103] Performing data normalization processing on the first text to obtain a second text;
[0104] The second text is structured and organized using the JSON format and saved to obtain a processed text.
[0105] Optionally, the initial training set construction module 220 is further used to:
[0106] Get the organization name according to the preset organization name list;
[0107] According to the processed text and the organization name, a detailed text description corresponding to the organization name is obtained;
[0108] Based on Word2Vec technology, triples are constructed according to the organization name, the preset organization name list, the detailed text description, and the preset benchmark organization relationship to obtain the organization relationship triples;
[0109] Construct training triples based on organizational relationship triples, preset training prompt words and detailed text descriptions;
[0110] The training triplets are determined as the initial training set.
[0111] Optionally, the initial training set construction module 220 is further used to:
[0112] Use natural language word segmentation tools to segment the detailed text description to obtain a noun set and a verb set;
[0113] Based on the preset list of organization names, synonyms are filtered in the noun set using Word2Vec technology to obtain the recognized organization names;
[0114] Based on the preset benchmark organizational relationship, in the verb set, synonym screening is performed using the Word2Vec technology to obtain the first recognition relationship;
[0115] A triple is constructed according to the organization name, the identification organization name and the first identification relationship to obtain an organization relationship triple.
[0116] Optionally, the preliminary training module 230 is further used to:
[0117] According to the preset large language model, the original parameter matrix is obtained;
[0118] In the forward propagation process, the original parameter matrix is frozen, and the preset large language model is trained to obtain the updated gradient matrix A and the updated gradient matrix B;
[0119] Calculate according to the original parameter matrix, the updated gradient matrix A and the updated gradient matrix B to obtain the updated parameter matrix; the updated parameter matrix is the sum of the original parameter matrix and the gradient matrix; the gradient matrix includes the gradient matrix A and the gradient matrix B;
[0120] The updated parameter matrix is assigned to the preset large language model to obtain the first organizational relationship recognition model.
[0121] Optionally, the incremental training set construction module 240 is further used to:
[0122] Obtain unlabeled network text based on the processed text;
[0123] Using the first organizational relationship recognition model, the organizational relationship of the unlabeled network text is recognized to obtain a second recognition relationship;
[0124] Correcting the second identification relationship to obtain a third identification relationship;
[0125] constructing incremental triples according to the third recognition relation, the preset training prompt words and the processed text;
[0126] The incremental triplets are determined as the incremental training set.
[0127] The present invention proposes a method for identifying inter-organizational relationships based on network text mining, which captures rich language representations by learning the patterns, structures and grammar of the language through a large language model. The pre-trained large language model is fine-tuned using a relatively small data set related to a specific task so that it can better complete specific application tasks. The present invention can identify multiple types of relationships that may exist between different organizations from a large amount of irregular text, and effectively improve the accuracy of identifying inter-organizational relationships with the help of a large language model. The present invention is an accurate and efficient method for identifying inter-organizational relationships for unstructured text.
[0128] Figure 3 is a schematic diagram of the structure of an inter-organization relationship identification device provided by an embodiment of the present invention, such as Figure 3 As shown, the inter-organizational relationship identification device may include the above Figure 2 The inter-organization relationship identification device based on network text mining is shown. Optionally, the inter-organization relationship identification device 310 may include a first processor 2001 .
[0129] Optionally, the inter-organization relationship identification device 310 may further include a memory 2002 and a transceiver 2003 .
[0130] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0131] Combine the following Figure 3 The components of the inter-organization relationship identification device 310 are specifically introduced as follows:
[0132] The first processor 2001 is the control center of the inter-organizational relationship identification device 310, and may be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).
[0133] Optionally, the first processor 2001 may execute various functions of the inter-organizational relationship identification device 310 by running or executing a software program stored in the memory 2002 , and calling data stored in the memory 2002 .
[0134] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in FIG.
[0135] In a specific implementation, as an embodiment, the inter-organization relationship identification device 310 may also include multiple processors, such as Figure 3 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0136] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0137] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be connected to the first processor 2001 through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0138] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0139] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 3 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0140] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and communicate with the first processor 2001 through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0141] It should be noted that Figure 3 The structure of the inter-organizational relationship identification device 310 shown in the figure does not constitute a limitation on the router, and the actual knowledge structure identification device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0142] In addition, the technical effects of the inter-organizational relationship identification device 310 can refer to the technical effects of the inter-organizational relationship identification method based on network text mining described in the above method embodiment, and will not be repeated here.
[0143] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0144] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0145] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0146] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0147] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0148] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0149] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0151] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0153] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0154] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0155] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for identifying inter-organizational relationships based on network text mining, characterized in that: The method comprises: Crawling text according to a preset list of organization names to obtain original network text; preprocessing the original network text to obtain processed text; Based on Word2Vec technology, an initial training set is constructed according to a preset list of organization names, the processed text, preset training prompt words, and preset benchmark organization relationships; According to the initial training set, a low-rank adaptation fine-tuning method is used to fine-tune the preset large language model to obtain a first organizational relationship recognition model; Based on the first organizational relationship recognition model, constructing an incremental training set according to preset training prompt words and the processed text; Based on a preset training round, using the incremental training set, incrementally training the first organizational relationship recognition model to obtain a second organizational relationship recognition model; Obtain a list of organization names to be identified; perform text crawling and preprocessing based on the list of organization names to be identified to obtain network text to be identified; input the network text to be identified into the second organization relationship identification model to obtain organization identification relationships.
2. The method for identifying inter-organizational relationships based on network text mining according to claim 1, characterized in that: The preprocessing of the original network text to obtain the processed text includes: Performing missing value processing on the original network text to obtain a first text; Performing data normalization processing on the first text to obtain a second text; The second text is structured and organized and saved using the JSON format to obtain a processed text.
3. The method for identifying inter-organizational relationships based on network text mining according to claim 1, characterized in that: The Word2Vec technology is used to construct an initial training set according to a preset list of organization names, the processed text, preset training prompt words, and preset benchmark organization relationships, including: Get the organization name according to the preset organization name list; According to the processed text and the organization name, obtaining a detailed text description corresponding to the organization name; Based on the Word2Vec technology, triples are constructed according to the organization name, the preset organization name list, the detailed text description and the preset benchmark organization relationship to obtain an organization relationship triple; Constructing a training triplet according to the organizational relationship triplet, the preset training prompt words and the detailed text description; The training triples are determined as an initial training set.
4. The method for identifying inter-organizational relationships based on network text mining according to claim 3 is characterized in that: The Word2Vec technology is used to construct triples according to the organization name, the preset organization name list, the detailed text description and the preset benchmark organization relationship to obtain the organization relationship triples, including: Using a natural language word segmentation tool, performing word segmentation processing on the detailed text description to obtain a noun set and a verb set; Based on a preset list of organization names, in the noun set, synonym screening is performed using the Word2Vec technology to obtain recognized organization names; Based on the preset benchmark organizational relationship, in the verb set, synonym screening is performed by using the Word2Vec technology to obtain a first recognition relationship; A triple is constructed according to the organization name, the identification organization name and the first identification relationship to obtain an organization relationship triple.
5. The method for identifying inter-organizational relationships based on network text mining according to claim 1, characterized in that: The method of fine-tuning the preset large language model using a low-rank adaptation fine-tuning method according to the initial training set to obtain a first organizational relationship recognition model includes: According to the preset large language model, the original parameter matrix is obtained; In the forward propagation process, the original parameter matrix is frozen, and the preset large language model is trained to obtain an updated gradient matrix A and an updated gradient matrix B; Calculate according to the original parameter matrix, the updated gradient matrix A and the updated gradient matrix B to obtain an updated parameter matrix; the updated parameter matrix is the sum of the original parameter matrix and the gradient matrix; the gradient matrix includes the gradient matrix A and the gradient matrix B; The updated parameter matrix is assigned to a preset large language model to obtain a first organizational relationship recognition model.
6. The method for identifying inter-organizational relationships based on network text mining according to claim 1, characterized in that: The step of constructing an incremental training set based on the first organizational relationship recognition model and according to preset training prompt words and the processed text includes: According to the processed text, obtaining unlabeled network text; Using the first organizational relationship recognition model, the unlabeled network text is subjected to organizational relationship recognition to obtain a second recognition relationship; Correcting the second identification relationship to obtain a third identification relationship; constructing an incremental triple according to the third recognition relationship, the preset training prompt word and the processed text; The incremental triples are determined as an incremental training set.
7. An inter-organizational relationship identification device based on network text mining, the inter-organizational relationship identification device based on network text mining is used to implement the inter-organizational relationship identification method based on network text mining as claimed in any one of claims 1 to 6, characterized in that: The device comprises: A text acquisition module is used to crawl text according to a preset list of organization names to obtain original network text; pre-process the original network text to obtain processed text; An initial training set construction module, used to construct an initial training set based on Word2Vec technology according to a preset list of organization names, the processed text, preset training prompt words and preset benchmark organization relationships; A preliminary training module, used to fine-tune a preset large language model using a low-rank adaptation fine-tuning method according to the initial training set to obtain a first organizational relationship recognition model; An incremental training set construction module, used to construct an incremental training set based on the first organizational relationship recognition model, according to preset training prompt words and the processed text; An incremental training module, configured to perform incremental training on the first organizational relationship recognition model based on a preset training round and using the incremental training set to obtain a second organizational relationship recognition model; The organization relationship identification module is used to obtain a list of organization names to be identified; perform text crawling and preprocessing based on the list of organization names to be identified to obtain network text to be identified; input the network text to be identified into the second organization relationship identification model to obtain organization identification relationships.
8. The device for identifying inter-organizational relationships based on network text mining according to claim 1, characterized in that: The preliminary training module is further used to: According to the preset large language model, the original parameter matrix is obtained; In the forward propagation process, the original parameter matrix is frozen, and the preset large language model is trained to obtain an updated gradient matrix A and an updated gradient matrix B; Calculate according to the original parameter matrix, the updated gradient matrix A and the updated gradient matrix B to obtain an updated parameter matrix; The updated parameter matrix is the sum of the original parameter matrix and the gradient matrix; the gradient matrix includes the gradient matrix A and the gradient matrix B; The updated parameter matrix is assigned to a preset large language model to obtain a first organizational relationship recognition model.
9. An inter-organizational relationship identification device, characterized in that: The inter-organization relationship identification device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Entity subordination relation extraction and identification method, system and device based on NLP and trigger and storage medium
CN114625885A
Multi-value chain data management aided decision-making model construction method based on knowledge graph
CN114911945A
Multi-clue map generation method and system based on motivation relationship
CN116501886A
Fine adjustment method, system and equipment based on large language model and medium
CN117290480A
Multi-modal reasoning method and device based on large language model and knowledge graph
CN118193684A
