A method and device for constructing a multi-scene personal sensitive information knowledge graph

By identifying and extracting the entities and scenario information of personal sensitive information in multiple scenarios, a multi-scenario personal sensitive information knowledge graph is constructed, which solves the problem of differences in information sensitivity in different scenarios and realizes the flexible application and privacy protection of knowledge graphs in multiple scenarios.

CN116304072BActive Publication Date: 2025-10-17CHINA CYBERSPACE ACAD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211595704.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-10-17
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively construct knowledge graphs of personal sensitive information in multiple scenarios, and are unable to adapt to the differences in sensitivity of information in different scenarios, resulting in insufficient protection of privacy data.

Method used

By collecting personal sensitive information from multiple scenarios, identifying entity and scenario information, extracting entity relationship attributes that integrate scenario information, and calculating entity similarity, we construct a knowledge graph of personal sensitive information from multiple scenarios, use open source NLP tools and specific domain models for entity and scenario recognition, and combine it with a pre-trained masked language model for relationship extraction.

Benefits of technology

The text scene recognition step has been added to build the association between knowledge and scenes, which facilitates the flexible application of knowledge graphs in different scenarios and supports knowledge query and entity profiling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116304072B_ABST
    Figure CN116304072B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-scene personal sensitive information knowledge graph construction methods, the method includes: S1, multi-scene personal sensitive information is collected, and the multi-scene personal sensitive information is preprocessed to obtain multi-scene personal sensitive information text;S2, entity information is identified from the multi-scene personal sensitive information text;S3, scene information is identified from the multi-scene personal sensitive information text;S4, carry out the entity relationship attribute extraction of fusion scene information;S5, the similarity between different entities is calculated, if the similarity of two entities exceeds pre-set threshold value, two entities are fused, and finally the construction of the multi-scene personal sensitive information knowledge graph is completed.Automatic multi-scene personal sensitive information knowledge graph can be constructed by using the application.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of knowledge graph, in particular to a multi-scene personal sensitive information knowledge graph construction method and device. BACKGROUND

[0002] In view of the problems of illegal acquisition, transaction and abuse of personal data, the personal sensitive information knowledge graph is becoming an important research direction of personal privacy data protection. However, unlike general knowledge graphs, the sensitivity of personal sensitive information knowledge graph and the information source scene usually have a very close dependence relationship. The sensitivity of information is different in different data source scenes. For example, in the financial scene and the network social scene, the sensitivity of personal portrait to users is different. Users are often more willing to actively display personal portrait information in the social scene, while in the financial lending scene, the portrait is an important privacy data, and users hope to protect it. Therefore, a multi-scene personal sensitive information knowledge graph construction method is urgently needed. SUMMARY

[0003] The present application provides a multi-scene personal sensitive information knowledge graph construction method and device for constructing a multi-scene personal sensitive information knowledge graph. The technical solution is as follows:

[0004] On the one hand, a multi-scene personal sensitive information knowledge graph construction method is provided, which comprises:

[0005] S1, collecting multi-scene personal sensitive information and preprocessing the multi-scene personal sensitive information to obtain multi-scene personal sensitive information text;

[0006] S2, identifying entity information from the multi-scene personal sensitive information text;

[0007] S3, identifying scene information from the multi-scene personal sensitive information text;

[0008] S4, performing entity relationship attribute extraction with fused scene information;

[0009] S5, calculating the similarity between different entities, if the similarity of two entities exceeds a pre-set threshold, fusing the two entities, and finally completing the construction of the multi-scene personal sensitive information knowledge graph.

[0010] Optionally, the S2 of identifying entity information from the multi-scene personal sensitive information text specifically comprises:

[0011] segmenting the text based on symbols;

[0012] performing word segmentation and identifying the entity information on the segmented text using an entity recognition model;

[0013] The entity recognition model comprises Hanlp, Jieba using an open source NLP tool, or a domain-specific customized entity recognition model.

[0014] Optionally, the S3 identifies scenario information from the multi-scenario personal sensitive information text, and specifically comprises:

[0015] Scenario labels are divided according to actual application;

[0016] A text classification technique is used to determine text scenario labels of the multi-scenario personal sensitive information text;

[0017] The text classification technique comprises a gated graph neural network, a text convolutional network, or a text classification method based on Bert.

[0018] Optionally, when the text classification technique is the gated graph neural network, the use of the text classification technique to determine the text scenario labels of the multi-scenario personal sensitive information text specifically comprises:

[0019] The segmented text is processed to obtain a word composition of the text;

[0020] A non-directed isomorphic graph between words is constructed based on a co-occurrence relationship of the words, and the non-directed isomorphic graph is stored in the form of an adjacency matrix;

[0021] Word node interaction update is performed using the gated graph neural network to obtain word embedding information;

[0022] After the word node is updated, text information is aggregated based on the word embedding information to obtain an aggregated representation h g of the text.

[0023] Based on the aggregated representation h g of the text, a Softmax function is used for text scenario classification prediction to obtain a text scenario label.

[0024] Optionally, the non-directed isomorphic graph between words is constructed based on a co-occurrence relationship of the words, and the non-directed isomorphic graph is stored in the form of an adjacency matrix, and specifically comprises:

[0025] A non-directed isomorphic graph between words is constructed based on a co-occurrence relationship of the words.

[0026] The co-occurrence relationship is processed using a fixed-size sliding window, and words in the same window have a direct co-occurrence relationship with each other, thereby obtaining a graph structure G=(V,R) of each text, where V represents a text word node, and an initialization feature of the node is a word embedding vector based on Word2Vec, and R represents a co-occurrence relationship between nodes.

[0027] The same configuration is stored in the form of an adjacency matrix.

[0028] Optionally, the S4 performs entity relationship attribute extraction of the fusion scene information, specifically including:

[0029] Based on the pre-trained mask language model chinese-bert-wwm-ext, the entity relationship attribute extraction of the fusion scene information is performed in the form of fill-in-the-blanks;

[0030] The extraction process is as follows:

[0031] The pre-trained mask language model chinese-bert-wwm-ext is used to train the fill-in-the-blank task;

[0032] The model is fine-tuned using a prompt template including scene information, so as to adapt to multiple scene personal sensitive information text scenes;

[0033] Based on the fine-tuned model, entity relationship attribute extraction is performed to obtain triple knowledge, which is represented as {sub, rel, obj, att_scene}, wherein sub, rel, obj, and att_scene represent the head node, relationship or attribute class, tail node, and source scene of the triple knowledge, respectively.

[0034] Optionally, the prompt template including scene information specifically includes:

[0035] For a text Text to be subjected to relationship attribute extraction, the text contains k entities, and for each time of judging the relationship attribute between two entities, a prompt template text T(x) is constructed as follows:

[0036] X in [scenelabel] scene, [MASK]1Entiyt s [MASK]2[MASK]3Entiyt o ;

[0037] Wherein X represents the text to be subjected to relationship attribute extraction, [scenelabel] represents the extracted text scene type, Entiyt s and Entiyt o represent the entities mentioned in the text, [MASK]1, [MASK]2, and [MASK]3 are the contents of the fill-in-the-blank performed by the pre-trained mask language model chinese-bert-wwm-ext, [MASK]1 is used to predict the entity type of Entiyt s , and [MASK]3 is used to predict Entiyt oentity type, [MASK]2 is used to predict the entity Entiyt s relationship attribute type of the entity Entiyt o relationship attribute type of the entity Entiyt

[0038] In another aspect, a multi-scene personal sensitive information knowledge graph construction device is provided, and the device comprises:

[0039] A collection preprocessing module is configured to collect multi-scene personal sensitive information, and to preprocess the multi-scene personal sensitive information to obtain multi-scene personal sensitive information text.

[0040] An entity information recognition module is configured to recognize entity information from the multi-scene personal sensitive information text.

[0041] A scene information recognition module is configured to recognize scene information from the multi-scene personal sensitive information text.

[0042] An entity relationship attribute extraction module is configured to extract entity relationship attributes in the context of the scene information.

[0043] A construction module is configured to calculate the similarity between different entities, to fuse two entities if the similarity between the two entities exceeds a pre-set threshold, and to finally complete the construction of the multi-scene personal sensitive information knowledge graph.

[0044] In another aspect, an electronic device is provided, and the electronic device comprises a processor and a memory, the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the multi-scene personal sensitive information knowledge graph construction method.

[0045] In another aspect, a computer readable storage medium is provided, and the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the multi-scene personal sensitive information knowledge graph construction method.

[0046] The technical solution provided by the present application has at least the following beneficial effects:

[0047] When constructing the multi-scene personal sensitive information knowledge graph, the present application adds a pre-step of text scene recognition, takes the scene information as part of the knowledge, constructs the association between the knowledge and the scene, and facilitates the subsequent downstream tasks of the knowledge graph in different scenes. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0049] Figure 1 is a flow chart of a method for constructing a multi-scene personal sensitive information knowledge graph provided by an embodiment of the present application.

[0050] Figure 2 is an example schematic diagram of an actual application scene provided by an embodiment of the present application.

[0051] Figure 3 is a flow chart of another method for constructing a multi-scene personal sensitive information knowledge graph provided by an embodiment of the present application.

[0052] Figure 4 is a block diagram of a device for constructing a multi-scene personal sensitive information knowledge graph provided by an embodiment of the present application.

[0053] Figure 5 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0054] As shown in Figure 1 , an embodiment of the present application provides a method for constructing a multi-scene personal sensitive information knowledge graph, which comprises the following steps:

[0055] S1, collecting multi-scene personal sensitive information, and pre-processing the multi-scene personal sensitive information to obtain multi-scene personal sensitive information text;

[0056] S2, identifying entity information from the multi-scene personal sensitive information text;

[0057] S3, identifying scene information from the multi-scene personal sensitive information text;

[0058] S4, performing entity relationship attribute extraction of fused scene information;

[0059] S5, calculating the similarity between different entities, if the similarity of two entities exceeds a pre-set threshold, fusing the two entities, and finally completing the construction of the multi-scene personal sensitive information knowledge graph.

[0060] The following will be described in detail in combination with Figures 2-3 , a method for constructing a multi-scene personal sensitive information knowledge graph.

[0061] As shown in Figure 2As shown, the actual application scene is an example of the practical application of the embodiment of the application. In the actual application scene, based on the collected multi-scene personal sensitive information and after preprocessing, the multi-scene personal sensitive information knowledge graph is constructed as the original data of the multi-scene personal sensitive information knowledge graph construction. Further, in the downstream task, in addition to the scene applicable to the conventional knowledge graph, the knowledge graph reconstruction, knowledge query, and entity portrait based on the specific scene can be supported.

[0062] As shown, the multi-scene personal sensitive information knowledge graph construction method of the embodiment of the application comprises: Figure 3

[0063] S1, collect multi-scene personal sensitive information, and preprocess the multi-scene personal sensitive information to obtain multi-scene personal sensitive information text;

[0064] The personal sensitive information is collected from the massive web page data on the Internet, and through preprocessing such as web page text extraction, data deduplication, and text classification screening, the multi-scene personal sensitive information text is obtained, which is used as the original data for knowledge graph construction.

[0065] S2, identify entity information from the multi-scene personal sensitive information text;

[0066] Optionally, the S2 of identifying entity information from the multi-scene personal sensitive information text specifically comprises:

[0067] performing sentence segmentation on the text based on symbols;

[0068] performing word segmentation and identifying the entity information on the segmented text using an entity recognition model;

[0069] The entity recognition model comprises: Hanlp and Jieba using an open source NLP tool, or a specific domain customized entity recognition model.

[0070] The symbol is a punctuation symbol or the like.

[0071] The entity information comprises a person, a place, a time, an organization name, a company name, a product name, a position, a numerical sequence, an email, an ID, and the like.

[0072] S3, identify scene information from the multi-scene personal sensitive information text;

[0073] Optionally, the S3 of identifying scene information from the multi-scene personal sensitive information text specifically comprises:

[0074] dividing scene labels according to actual application;

[0075] ​For example, the following scenario labels can be defined: industry, telecommunications, finance, transportation, health, education.

[0076] The text classification technology includes a gated graph neural network, a text convolution network, or a text classification method based on Bert.

[0077] The text classification technology includes a gated graph neural network, a text convolution network, or a text classification method based on Bert.

[0078] Optionally, when the text classification technology is the gated graph neural network, the text classification technology is used to determine the text scenario label of the multi-scene personal sensitive information text, specifically including:

[0079] The text after segmentation is processed to obtain the word composition of the text.

[0080] For example, the segmented text can be subjected to standard text processing operations such as stop word removal, and all words in the text are de-duplicated to obtain the word composition of the text.

[0081] A non-directed isomorphic graph between words is constructed based on the co-occurrence relationship of the words, and the non-directed isomorphic graph is stored in the form of an adjacency matrix.

[0082] Optionally, the non-directed isomorphic graph between words is constructed based on the co-occurrence relationship of the words, and the non-directed isomorphic graph is stored in the form of an adjacency matrix, specifically including:

[0083] A non-directed isomorphic graph between words is constructed based on the co-occurrence relationship of the words.

[0084] The co-occurrence relationship is processed using a fixed-size sliding window, for example, the fixed size can be set to 3, and the words in the same window have a direct co-occurrence relationship with each other, thereby obtaining the graph structure G=(V,R) of each text, where V represents the text word node, and the initialization feature of the node is a word embedding vector based on Word2Vec, and R represents the co-occurrence relationship between nodes.

[0085] The non-directed isomorphic graph is stored in the form of an adjacency matrix.

[0086] The gated graph neural network is used to update the interaction between word nodes to obtain word embedding information.

[0087] Each word node receives information from its adjacent neighbor nodes, and then merges with its own representation for updating, and this process is stacked for t steps, thereby realizing high-order feature interaction of word nodes.

[0088] The specific node interaction update is shown in formulas (1)-(5):

[0089] a t= Ah t-1 W a (1)

[0090] z t = σ(W Z a t + U z h t-1 + b z ) (2)

[0091] rt= σ(W r a t + U r h t-1 + b r ) (3)

[0092]

[0093]

[0094] where A denotes the adjacency matrix between word nodes, σ denotes the Sigmoid activation function, all W, U, b denote trainable weight parameters and biases, z and r denote update gate and reset gate, denotes the Hadamard product of the calculation matrix, h t is the final updated network state.

[0095] After updating the word nodes, the text information is aggregated based on the word embedding information to obtain the aggregated representation h g of the text.

[0096] The aggregation process uses the method of formulas (6)-(7):

[0097]

[0098]

[0099] where f1 and f2 are multi-layer linear perception, h v denotes the final state information of the vth node, denotes the state information of the vth node at time t, σ denotes the Sigmoid activation function, tanh denotes the tanh activation function, Maxpooling denotes the maximum pooling function, V denotes all word nodes in the document, h g denotes the aggregated representation of the text.

[0100] Based on the aggregated representation h g of the text, a Softmax function is used for text scene classification prediction to obtain the text scene label.

[0101] Optionally, based on the aggregated representation h gThe Softmax function is used for text scene classification prediction, a part of samples and scene labels are used for model training, a category cross entropy is used as a loss function, a trained model is used for text scene classification, and a text scene label is obtained.

[0102] S4, performing entity relation attribute extraction of fusion scene information;

[0103] Optionally, the S4 of performing entity relation attribute extraction of fusion scene information specifically comprises:

[0104] Based on the pre-trained mask language model chinese-bert-wwm-ext, the entity relation attribute extraction of fusion scene information is performed in the way of fill-in-the-blank;

[0105] The extraction process is as follows:

[0106] The pre-trained mask language model chinese-bert-wwm-ext is used to train the fill-in-the-blank task;

[0107] The model is fine-tuned using a prompt template including scene information, so as to adapt to the text scene of personal sensitive information in multiple scenes;

[0108] Optionally, the prompt template including scene information specifically comprises:

[0109] For a text Text to be subjected to relation attribute extraction, the text contains k entities, and for each time of judging the relation attribute between two entities, a prompt template text T(x) is constructed as follows:

[0110] X in [scenelabel] scene, [MASK]1Entiyt s [MASK]2[MASK]3Entiyt o ;

[0111] Wherein X represents the text to be subjected to relation attribute extraction, [scenelabel] represents the extracted text scene type, Entiyt s and Entiyt o represent the entities mentioned in the text, [MASK]1, [MASK]2 and [MASK]3 are the contents of fill-in-the-blank performed by the pre-trained mask language model chinese-bert-wwm-ext, [MASK]1 is used to predict the entity type of Entiyt s , [MASK]3 is used to predict the entity type of Entiyt o , and [MASK]2 is used to predict the relation between the entity Entiyt s and the entity Entiyt oa relationship attribute type.

[0112] The prompt template text T(x) can also adopt other template texts similar to the above-mentioned template texts, and embodiments of the present application do not limit the specific prompt template text, and all are within the protection scope of the embodiments of the present application.

[0113] Optionally, the pre-trained mask language model chinese-bert-wwm-ext is fine-tuned based on the above-mentioned prompt template using the Transformers toolkit HuggingfaceTransforms, and the fine-tuning process hyperparameter settings are as follows: the optimizer is Adam, the initial learning rate is 3e-5, the epoch is 5, and the batch_size is 64.

[0114] Based on the fine-tuned model, entity relationship attribute extraction is performed to obtain triple knowledge, and the triple knowledge is represented as {sub, rel, obj, att_scene}, wherein sub, rel, obj, and att_scene represent the head node, relationship or attribute class, tail node, and source scene of the knowledge of the triple, respectively.

[0115] By additionally adding an additional scene attribute in the triple knowledge, knowledge in different scenes can be quickly screened to support knowledge reasoning and mining in different scenes.

[0116] S5, calculate the similarity between different entities, if the similarity of two entities exceeds a pre-set threshold, fuse the two entities, and finally complete the construction of the multi-scene personal sensitive information knowledge graph.

[0117] Since the fusion object of the multi-scene personal sensitive information knowledge graph is mainly a person entity, the similarity between subject and object in the triple, and the similarity of the context where the entity is located are calculated, and linear fusion is performed: if the similarity of two entities exceeds a pre-set threshold, the two entities are fused, and then other entities are also added, and finally the construction of the multi-scene personal sensitive information knowledge graph is completed.

[0118] As shown in Figure 4 The embodiments of the present application also provide a multi-scene personal sensitive information knowledge graph construction device, the device comprises:

[0119] The acquisition and preprocessing module 410 is used for acquiring multi-scene personal sensitive information, and preprocessing the multi-scene personal sensitive information to obtain multi-scene personal sensitive information text;

[0120] The entity information recognition module 420 is used for recognizing entity information from the multi-scene personal sensitive information text;

[0121] The scene information recognition module 430 is configured to recognize scene information from the multi-scene personal sensitive information text.

[0122] The entity relation attribute extraction module 440 is configured to perform entity relation attribute extraction with the scene information fused.

[0123] The construction module 450 is configured to calculate the similarity between different entities, fuse two entities if the similarity between the two entities exceeds a preset threshold, and finally complete construction of the multi-scene personal sensitive information knowledge graph.

[0124] The construction device for the multi-scene personal sensitive information knowledge graph provided by the embodiment of the present application corresponds to the construction method for the multi-scene personal sensitive information knowledge graph provided by the embodiment of the present application in terms of function structure, and thus will not be described here.

[0125] Figure 5 FIG. 5 is a structural schematic diagram of an electronic device 500 provided by the embodiment of the present application. The electronic device 500 can have relatively large differences due to different configurations or performances, and can include one or more processors (central processing units, CPUs) 501 and one or more memories 502. The memory 502 stores at least one instruction, which is loaded and executed by the processor 501 to implement the steps of the construction method for the multi-scene personal sensitive information knowledge graph.

[0126] In the exemplary embodiment, a computer readable storage medium, such as a memory including instructions, is also provided. The instructions can be executed by a processor in a terminal to complete the construction method for the multi-scene personal sensitive information knowledge graph. For example, the computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0127] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing related hardware, and the program can be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk or an optical disk.

[0128] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for constructing a multi-scenario personal sensitive information knowledge graph, characterized in that: The method comprises: S1. Collecting multi-scenario personal sensitive information and pre-processing the multi-scenario personal sensitive information to obtain multi-scenario personal sensitive information text; S2. Identify entity information from the multi-scenario personal sensitive information text; S3. Identifying scenario information from the multi-scenario personal sensitive information text; S4, extracting entity relationship attributes of fused scene information; S5. Calculate the similarity between different entities. If the similarity between two entities exceeds a preset threshold, merge the two entities, and finally complete the construction of the multi-scenario personal sensitive information knowledge graph. The extraction of entity relationship attributes of the fused scene information in S4 specifically includes: Based on the pre-trained masked language model Chinese-BERT-WWM-EXT, entity relationship attributes of the fused scene information are extracted through cloze test. The extraction process is as follows: Use the pre-trained masked language model chinese-bert-wwm-ext to train the cloze task; Fine-tune the model using prompt templates that include context information to adapt it to multi-scenario personal sensitive information text scenarios; Entity relationship attributes are extracted based on the fine-tuned model to obtain triple knowledge, which is represented as {sub, rel, obj, att_scene}, where sub, rel, obj, and att_scene represent the head node, relationship or attribute class, tail node, and source scene of the triple, respectively.

2. The method according to claim 1, characterized in that The step S2 of identifying entity information from the multi-scenario personal sensitive information text specifically includes: Sentence the text based on symbols; Use the entity recognition model to segment the text after sentence segmentation and identify the entity information; The entity recognition model includes: using open source NLP tools such as Hanlp and Jieba, or using an entity recognition model customized for a specific field.

3. The method according to claim 2, characterized in that The step S3 of identifying scenario information from the multi-scenario personal sensitive information text specifically includes: Divide scene labels according to actual applications; Using text classification technology to determine text scene labels for the multi-scenario personal sensitive information texts; The text classification technology includes: gated graph neural network, text convolutional network or BERT-based text classification method.

4. The method according to claim 3, characterized in that When the text classification technology is the gated graph neural network, the text classification technology is used to determine the text scene labels of the multi-scene personal sensitive information text, specifically including: Process the text after word segmentation to obtain the word composition of the text; Constructing an undirected isomorphism graph between words based on the co-occurrence relationship of the words, and storing the undirected isomorphism graph in the form of an adjacency matrix; Use the gated graph neural network to interactively update word nodes and obtain word embedding information; After updating the word nodes, the text information is aggregated based on the word embedding information to obtain the aggregated representation h of the text g ; Based on the aggregate representation h of the text g , use the Softmax function to perform text scene classification prediction and obtain the text scene label.

5. The method according to claim 4, characterized in that The method of constructing an undirected isomorphism graph between words based on the co-occurrence relationship of the words and storing the undirected isomorphism graph in the form of an adjacency matrix specifically includes: Construct an undirected isomorphism graph between words based on their co-occurrence relationships; The co-occurrence relationship is processed using a sliding window of fixed size. Words in the same window directly co-occur with each other, thereby obtaining a graph structure G = (V, R) for each text, where V represents the text word node, the node initialization feature is the word embedding vector based on Word2Vec, and R represents the co-occurrence relationship between nodes. The undirected isomorphic graph is stored in the form of an adjacency matrix.

6. The method according to claim 1, characterized in that The prompt template including scene information specifically includes: For the text Text to be extracted for relational attributes, the text contains k entities. Each time the relational attributes between two entities are determined, the following prompt template text T(x) is constructed: X in the [scenelabel] scene, [MASK] 1Entiyt s [MASK]2[MASK]3Entiyt o ; Where X represents the text to be extracted for relational attributes, [scenelabel] represents the extracted text scene type, and Entiyt s and Entiyt o Represents the entities mentioned in the text, [MASK]1, [MASK]2[MASK]3 are the contents of the cloze test performed by the pre-trained masked language model chinese-bert-wwm-ext, and [MASK]1 is used to predict Entiyt s Entity type, [MASK]3 is used to predict Entiyt o Entity type, [MASK]2 is used to predict the entity Entiyt s With Entity o The relationship attribute type.

7. A device for constructing a multi-scenario personal sensitive information knowledge graph, characterized in that: The device comprises: A collection and preprocessing module is used to collect multi-scenario personal sensitive information and preprocess the multi-scenario personal sensitive information to obtain multi-scenario personal sensitive information text; An entity information identification module, configured to identify entity information from the multi-scenario personal sensitive information text; A scene information identification module, configured to identify scene information from the multi-scene personal sensitive information text; Entity relationship attribute extraction module, used to extract entity relationship attributes from fused scene information; A construction module is used to calculate the similarity between different entities. If the similarity between two entities exceeds a preset threshold, the two entities are merged, and finally the construction of the multi-scenario personal sensitive information knowledge graph is completed; Entity relationship attribute extraction module, specifically used for: Based on the pre-trained masked language model Chinese-BERT-WWM-EXT, entity relationship attributes of the fused scene information are extracted through cloze test. The extraction process is as follows: Use the pre-trained masked language model chinese-bert-wwm-ext to train the cloze task; Fine-tune the model using prompt templates that include context information to adapt it to multi-scenario personal sensitive information text scenarios; Entity relationship attributes are extracted based on the fine-tuned model to obtain triple knowledge, which is represented as {sub, rel, obj, att_scene}, where sub, rel, obj, and att_scene represent the head node, relationship or attribute class, tail node, and source scene of the triple, respectively.

8. An electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, characterized in that: The at least one instruction is loaded and executed by the processor to implement the method for constructing a multi-scenario personal sensitive information knowledge graph as described in any one of claims 1-6.

9. A computer-readable storage medium, wherein at least one instruction is stored in the storage medium, characterized in that: The at least one instruction is loaded and executed by the processor to implement the method for constructing a multi-scenario personal sensitive information knowledge graph as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Scene spectrum vectorization method based on Horn logic and graph neural network

    CN109753570A

  • Entity matching method and device

    CN111400507A