Map POI knowledge graph task intelligent mining method based on large language model
Through the intelligent mining method of map POI knowledge graph tasks based on large language model, the problem that traditional methods are difficult to deal with multiple tasks of map POI data is solved, efficient and accurate data mining and analysis are achieved, and the performance and performance of the model are improved.
Patent Information
- Application Number
- CN202411630816.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-15
AI Technical Summary
Traditional machine learning methods are difficult to handle multiple tasks of map POI data simultaneously, and the representation and extraction of information become complicated due to the unstructured characteristics of the data.
The intelligent mining method of map POI knowledge graph task based on large language models is adopted. By obtaining map POI data, the finetune data set is constructed and data amplified, the large language model is used for pre-training and SFT retraining, combining reward learning and reinforcement learning to optimize the model.
A variety of tasks for processing map POI data are realized, such as father-son point mining, similarity point judgment, category judgment and place name address information extraction, which improves the efficiency and consistency of data processing and enhances the performance and performance of the model.
Smart Images

Figure CN119514663A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more specifically to a map POI knowledge graph task intelligent mining method based on a large language model. Background Art
[0002] In today's era of information explosion, unstructured data such as text, images and audio are increasing. Among them, map POI (Point of Interest) data, as an important type of unstructured data, contains a lot of valuable content such as geographic location, business information, scenic spot introduction, etc. However, due to the unstructured characteristics of POI data, the mining and utilization of its information has always faced huge challenges.
[0003] In the prior art, machine learning-based methods have achieved many successes in the fields of text, images, etc. However, due to the particularity of map POI data, traditional machine learning methods face a series of problems when processing such data. First, POI data has many types of tasks, such as parent-child point mining, similarity point discrimination, category judgment, and place name and address information extraction. Traditional machine learning methods are difficult to handle these diverse tasks at the same time. Second, the unstructured characteristics of POI data make the representation and extraction of its information complicated, requiring more advanced models to process.
[0004] Therefore, we need a new, large-model-based technical approach to process the unstructured data of map POIs to solve the problems existing in traditional methods. Summary of the invention
[0005] In view of this, the present invention provides a map POI knowledge graph task intelligent mining method based on a large language model, which can process the unstructured data of map POI and can process various tasks of map POI data.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A map POI knowledge graph task intelligent mining method based on a large language model, comprising:
[0008] Get map POI data;
[0009] Construct a finetune dataset based on map POI data and task type, and perform data augmentation on the finetune dataset;
[0010] After pre-training the large language model with the expanded data set, SFT is retrained and reward learning optimization is performed;
[0011] Reinforce learning of large language models based on the PPO algorithm;
[0012] Based on the trained large language model, map POI data is processed to perform knowledge graph task mining.
[0013] Preferably, the task types include mining parent and child points of POIs, identifying similar points of POIs, determining categories of POIs, and extracting place name and address information of POIs.
[0014] Preferably, for the parent-child point mining of POI, the objective function of the large language model is:
[0015]
[0016] Among them, θ represents the large model parameter, L text Represents the loss function between text description and parent-child point labels, L label is the loss function between parent and child point labels, α is the learning rate, N is the number of POI data samples, represents the label of the i-th parent node, Represents the label of the i-th child node.
[0017] Preferably, for the parent-child point mining of POI, the large language model SFT further includes the following steps before retraining:
[0018] Use the pre-trained large language model to encode the text description x to obtain the text representation z, where the POI data sample consists of the text description x and the corresponding parent-child point labels;
[0019] Use the softmax function to map the text representation z to the probability distribution of parent-child point labels;
[0020] P(y parent / x;θ)=softmax(W parent ·z+b parent );
[0021] P(y child / x;θ)=softmax(W child ·z+b child );
[0022] Among them, W parent 、b parent Represent the weight matrix and bias vector of the parent node label, W child 、b child Represent the weight matrix and bias vector of the child node labels respectively.
[0023] Preferably, in reward learning, the cumulative reward R is calculated as:
[0024]
[0025] Where T represents the number of interaction steps, r t represents the reward at step t;
[0026] Use rw algorithm to update gradient:
[0027] θ←θ+αΔθf(θ)R
[0028] Among them, α is the task weight hyperparameter, θ represents the large model parameter, and f(θ) represents the learning optimization objective function.
[0029] Preferably, in reinforcement learning, the update formula for defining the strategy network is:
[0030]
[0031] Among them, θ' is the updated model parameter, J(θ) represents the performance of the current policy network, max_kl represents a hyperparameter used to limit the update amplitude, and ε represents a positive number.
[0032] Preferably, the map POI data includes text and image unstructured information.
[0033] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a map POI knowledge graph task intelligent mining method based on a large language model, which has the following advantages:
[0034] Multi-task processing: It can handle multiple tasks of map POI data, such as parent-child point mining, similarity point identification, category judgment and place name and address information extraction, which improves the efficiency and consistency of data processing.
[0035] Large model application: The use of LLM large model can better learn the characteristics and rules of data, improving the performance and expression of the model.
[0036] Reward learning optimization: The introduction of reward learning model and RW algorithm can calculate the reward signal according to the task objective function, automatically optimize the model parameters, and improve the performance of knowledge graph tasks.
[0037] Further optimization of reinforcement learning: Using the PPO algorithm, the parameters of the policy network are continuously updated through interaction with the environment to further optimize the performance of knowledge graph mining.
[0038] Through the comprehensive application of the above technical means, efficient and accurate mining and analysis of map POI data can be achieved, providing better services for geographic information services, business recommendations, tourism navigation and other fields. At the same time, this method also has certain application potential in other unstructured data mining fields, and is expected to promote the wider application of large models in data mining and analysis.
[0039] In general, the present invention has important significance and practical value in solving the unstructured problem of map POI data, and is expected to achieve significant application effects in the fields of geographic information processing, business recommendations and intelligent navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0041] Figure 1 A flow chart of a map POI knowledge graph task intelligent mining method based on a large language model provided by the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] The embodiment of the present invention discloses a map POI knowledge graph task intelligent mining method based on a large language model, such as Figure 1 As shown, including:
[0044] Get map POI data;
[0045] Construct a finetune dataset based on map POI data and task type, and perform data augmentation on the finetune dataset;
[0046] After pre-training the large language model with the expanded data set, SFT is retrained and reward learning optimization is performed;
[0047] Reinforce learning of large language models based on the PPO algorithm;
[0048] Based on the trained large language model, map POI data is processed to perform knowledge graph task mining.
[0049] In this embodiment, the task types include mining parent and child points of POIs, identifying similar points of POIs, determining categories of POIs, and extracting place name and address information of POIs.
[0050] For example, specifically for the POI similarity task, the examples used to construct the finetune dataset may include POI pairs with similar geographic locations, business types, or other related attributes. For example, a sample may include two POIs, and the similarity labels between them indicate that they are similar in some aspects. This helps the model learn how to discriminate the similarity of POI pairs.
[0051] Data augmentation is performed on the fine-tuned dataset to improve the model's ability to generalize data so that it can still perform well in different scenarios and changes.
[0052] There are many methods for data augmentation. For text data, synonym replacement, random insertion or deletion of words can be performed to improve the model's robustness to text. Such data augmentation methods help improve the model's generalization ability, making it more robust in different situations, and can also solve the problem of insufficient training caused by scarce data.
[0053] In this embodiment, the core of the algorithm of the present invention is based on a large language model, and SFT (Soft Fine-Tuning) retraining is performed through a pre-trained model (such as glm-6b, etc.), and the instruct process is used to transform the various tasks of POI into a unified learning framework. Then, a reward learning model and a reinforcement learning process are used to optimize the performance of the model. Among them, the reward learning model uses the RW (Reward Weighting) algorithm, and the reinforcement learning process uses the PPO (Proximal Policy Optimization) algorithm. These training methods are all based on LoRA (Low-Rank Approximation).
[0054] First, a pre-trained large language model (such as glm-6b) is used as the base model, and SFT (SoftFine-Tuning) retraining is performed. In SFT retraining, the instruct process is used to convert the various tasks of poi into an instructional form to facilitate model learning.
[0055] For various tasks of map POI, they are transformed into semantic guidance tasks. Taking the parent-child point mining of POI as an example, there are N POI data samples, each of which consists of a text description x and the corresponding parent-child point labels. This task is transformed into a joint task of predicting text descriptions and parent-child point labels.
[0056] For the parent-child point mining of POI, the objective function of the large language model is:
[0057]
[0058] Among them, θ represents the large model parameter, Ltext Represents the loss function between text description and parent-child point labels, L label is the loss function between the parent and child point labels, α is the learning rate, which is used to balance the importance of the two loss functions, and N is the number of POI data samples. represents the label of the i-th parent node, Represents the label of the i-th child node.
[0059] In order to perform SFT retraining, the goal of the task needs to be represented as a soft label. For POI parent-child point mining, a pre-trained large language model is used to encode the text description x to obtain the text representation z, where the POI data sample consists of the text description x and the corresponding parent-child point labels;
[0060] Use the softmax function to map the text representation z to the probability distribution P(y) of the parent node label parent / x;θ) and the probability distribution P(y) of the child node labels child / x;θ);
[0061] P(y parent / x;θ)=softmax(W parent ·z+b parent );
[0062] P(y child / x;θ)=softmax(W child ·z+b child );
[0063] Among them, W parent 、b parent Represent the weight matrix and bias vector of the parent node label, W child 、b child Represent the weight matrix and bias vector of the child node labels respectively.
[0064] Based on the pre-trained model, labeled data is used to further adjust the model parameters to make it better suited to specific tasks.
[0065] In this embodiment, in order to optimize the performance of the model in the knowledge graph task, a reward learning model is introduced, and the rw algorithm (Reward-Weighted Regression) is used for training. The goal of the reward learning model is to maximize the cumulative reward through interaction with the environment. Specifically, based on the annotated data of the POI and the task objective function, the reward signal is calculated, and the model parameters are updated by the reward signal to improve the performance of the model in the task.
[0066] In the reward learning model, the cumulative reward R is defined as the sum of all rewards obtained from the interaction with the environment:
[0067]
[0068] Where T represents the number of interaction steps, r t represents the reward at step t;
[0069] In order to update the model parameters, the rw algorithm is used for gradient update. Assuming f(θ) is the learning optimization objective function of the model, θ represents the parameters of the model, then the model parameter update formula is:
[0070] θ←θ+αΔθf(θ)R
[0071] Among them, α is the learning rate and its value is 0.01.
[0072] In this embodiment, on the basis of the reward learning model, the PPO algorithm (Proximal Policy Optimization) is further used to carry out the reinforcement learning process to further optimize the performance of knowledge graph mining. In this process, through interaction with the environment, the parameters of the policy network are continuously updated to maximize the cumulative reward.
[0073] In reinforcement learning, the update formula for defining the large language model policy network is:
[0074]
[0075] Among them, θ' is the updated model parameter, J(θ) represents the performance of the current policy network, max_kl represents a hyperparameter used to limit the update amplitude, max__kl = 0.01, and ε represents a small positive number, ε = 0.1.
[0076] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0077] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A map POI knowledge graph task intelligent mining method based on a large language model, characterized in that: include: Get map POI data; Construct a finetune dataset based on map POI data and task type, and perform data augmentation on the finetune dataset; After pre-training the large language model with the expanded data set, SFT is retrained and reward learning optimization is performed; Reinforce learning of large language models based on the PPO algorithm; Based on the trained large language model, map POI data is processed to perform knowledge graph task mining.
2. According to claim 1, a map POI knowledge graph task intelligent mining method based on a large language model is characterized in that: The task types include POI parent-child point mining, POI similarity point identification, POI category judgment and POI place name and address information extraction.
3. According to claim 2, a map POI knowledge graph task intelligent mining method based on a large language model is characterized in that: For the parent-child point mining of POI, the objective function of the large language model is: Among them, θ represents the large model parameter, L text Represents the loss function between text description and parent-child point labels, L label is the loss function between parent and child point labels, α is the learning rate, N is the number of POI data samples, represents the label of the i-th parent node, Represents the label of the i-th child node.
4. According to claim 2, a map POI knowledge graph task intelligent mining method based on a large language model is characterized in that: For the parent-child point mining of POI, the large language model SFT also includes the following before retraining: Use the pre-trained large language model to encode the text description x to obtain the text representation z, where the POI data sample consists of the text description x and the corresponding parent-child point labels; Use the softmax function to map the text representation z to the probability distribution of parent-child point labels; P(y parent / x:θ)=softmax(W parent ·z+b parent ): P(y child / x:θ)=softmax(W child ·z+b child ): Among them, W parent , b parent Represent the weight matrix and bias vector of the parent node label, W child , b child Represent the weight matrix and bias vector of the child node label respectively, P(y parent / x; θ) is the probability distribution of the parent node label, P(y child / x; θ) is the probability distribution of child node labels.
5. According to claim 2, a map POI knowledge graph task intelligent mining method based on a large language model is characterized in that: In reward learning, the cumulative reward R is calculated as: Where T represents the number of interaction steps, r t represents the reward at step t; Use rw algorithm to update gradient: θ←θ+αΔθf(θ)R Among them, α is the learning rate, θ represents the large model parameters, and f(θ) represents the learning optimization objective function.
6. According to claim 2, a map POI knowledge graph task intelligent mining method based on a large language model is characterized in that: In reinforcement learning, the update formula for defining the policy network is: Among them, θ' is the updated model parameter, J(θ) represents the performance of the current policy network, max_kl represents a hyperparameter used to limit the update amplitude, and ε represents a positive number.
7. According to the method of intelligent mining of map POI knowledge graph tasks based on large language model in claim 1, it is characterized in that: Map POI data includes unstructured information such as text and images.
Citation Information
Patent Citations
Method and system for establishing POI parent-child point pairs
CN111881371A
Method and device for training generative large language model based on knowledge base feedback
CN117009490A
Map data validity verification method and device, electronic equipment and storage medium
CN117131954A
Knowledge graph mining method based on fusion of graph neural network and large language model
CN117350252A
Content recommendation method and system based on industry knowledge graph and reinforcement learning
CN117493687A