Semi-automatic construction method and system of music knowledge graph

Through the CNN-BiLSTM-Attention model and triple conversion technology, a semi-automatic construction system for music knowledge graphs was built, which solved the problems of low efficiency and unstable quality of traditional knowledge graph construction, and realized efficient extraction and visualization of data in the music field, improving the Build efficiency and quality.

CN114547330BActive Publication Date: 2024-12-27GUANGZHOU WECHAT COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210108955.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-28
Publication Date
2024-12-27
Estimated Expiration
2042-01-28

AI Technical Summary

Technical Problem

Traditional knowledge graph construction methods are inefficient and rely on manual annotation, which makes the construction process time-consuming and of uneven quality, and cannot meet the efficient and intelligent needs of professional fields.

Method used

The CNN-BiLSTM-Attention model is used for naming entity recognition, combined with triple conversion and relationship extraction, a semi-automatic construction system for music knowledge graphs is constructed, and the Neo4j graph database is used to realize the semi-automatic construction of knowledge graphs.

Benefits of technology

It improves the efficiency and quality of knowledge graph construction, reduces the need for manual participation, and realizes efficient extraction and visualization of data in the music field, solving the problems of low accuracy and time-consuming in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547330B_ABST
    Figure CN114547330B_ABST
Patent Text Reader

Abstract

The present invention discloses a semi-automatic construction method and system for a music knowledge graph, including: identifying named entities in a dataset in the field of Chinese music; converting the identified named entities into triples in the field of Chinese music; and constructing a knowledge graph in the field of Chinese music based on the triples in the field of Chinese music. With named entity recognition technology as the core, a named entity recognition system for the field of Chinese music is constructed using a multi-text CNN‑BiLSTM‑Attention model as the core. In the knowledge extraction link, the "nodes" and "edges" on the knowledge graph are constructed with the results of entity recognition and relationship extraction, and finally a semi-automatic construction system for a Chinese knowledge graph in the field of music is constructed. After crawling the original data, it is processed and saved in the form of triples with extended attributes to achieve semi-automatic knowledge graph construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of knowledge graph construction, and in particular to a method and system for semi-automatically constructing a music knowledge graph. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] Knowledge graph is a structured semantic knowledge base used to describe concepts and their relationships in the physical world in symbolic form. Its basic components are "entity-relationship-entity" triples, as well as entities and their related attribute-value pairs. Entities are connected to each other through relationships to form a network of knowledge structures. In recent years, as Internet giants have paid more attention to knowledge graphs in the field of knowledge graphs, knowledge graphs have also entered a stage of rapid development. Although the application of knowledge graphs is still in its infancy and has not been widely used, high-value applications have been achieved in some industries and fields, solving many problems in big data processing to a certain extent. Intelligent search, deep question and answer, social networks, personalized recommendations and vertical industry applications, such as the financial industry, medical industry, e-commerce industry and education industry, etc. Knowledge graphs provide a more effective way to express, organize, manage and utilize massive, heterogeneous and dynamic big data on the Internet, making the network more intelligent and closer to human cognitive thinking. In future research on knowledge graphs, key issues will also be solved by industry and academia, and then more new applications can be realized.

[0004] In terms of knowledge graph construction, traditional knowledge graphs have limitations. Traditional knowledge graphs do not have a deep knowledge structure and cannot solve professional business problems. Give professional domain knowledge to machines, let machines replace business personnel to perform simple knowledge work, and realize the intelligent process of repetitive and basic labor. At the same time, traditional domain knowledge graphs are mainly constructed by experts in a time-consuming and labor-intensive way, which is extremely costly and inefficient. Moreover, most high-quality knowledge graphs are based on crowdsourcing, which is limited by the experience and subjectivity of the annotators, affecting the effectiveness of the knowledge graph and its application in data applications. Therefore, a system that can automatically or semi-automatically construct a knowledge graph will greatly speed up this tedious process and improve the quality of the constructed graph. Now there is an urgent need for a tool to automatically and intelligently construct industry knowledge graphs. Summary of the invention

[0005] In order to solve the deficiencies of the prior art, the present invention provides a semi-automatic construction method and system for music knowledge graphs; taking named entity recognition technology as the core, a named entity recognition system for the Chinese music field is constructed using a multi-text CNN-BiLSTM-Attention model as the core. In the knowledge extraction link, the "nodes" and "edges" on the knowledge graph are constructed with the results of entity recognition and relationship extraction, and finally a semi-automatic construction system for the Chinese knowledge graph for the music field is constructed. In this scheme, after crawling the original data, it is processed and saved in the form of triples with extended attributes to realize a semi-automatic knowledge graph construction system.

[0006] In a first aspect, the present invention provides a method for semi-automatically constructing a music knowledge graph;

[0007] A semi-automatic construction method of a music knowledge graph, including:

[0008] Identify named entities in Chinese music datasets;

[0009] Convert the identified named entities into triples in the Chinese music field;

[0010] Based on the triples in the Chinese music field, a knowledge graph in the Chinese music field is constructed.

[0011] In a second aspect, the present invention provides a semi-automatic construction system for a music knowledge graph;

[0012] The semi-automatic music knowledge graph construction system includes:

[0013] An entity recognition module, which is configured to: recognize named entities in a Chinese music domain dataset;

[0014] A triple conversion module is configured to: convert the identified named entities into triples in the field of Chinese music;

[0015] A graph construction module is configured to construct a knowledge graph in the field of Chinese music based on triples in the field of Chinese music.

[0016] In a third aspect, the present invention further provides an electronic device, comprising:

[0017] a memory for non-transitory storage of computer-readable instructions; and

[0018] a processor for executing the computer readable instructions,

[0019] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.

[0020] In a fourth aspect, the present invention further provides a storage medium that non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.

[0021] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.

[0022] Compared with the prior art, the present invention has the following beneficial effects:

[0023] (1) The framework in the present invention is based on a deep CNN layer, a combination of BiLSTM and a Self-attention layer with sequence labeling, which can learn to generate new nodes and identify edges between existing nodes according to predefined relationship type templates, and has better representation and performance.

[0024] (2) In order to avoid the shortcomings of the pre-trained model, the triple context framework proposed in this paper can achieve similar performance to RoBERTa (a pre-trained model, SOTA model proposed by (Liu et al., 2019)), but saves time, is lighter, and is easier to extract triples.

[0025] (3) Knowledge graph construction aims to extract information from a large number of unstructured sources, such as PDFs, texts, etc. in different fields. Once the unstructured information is stored in a graph structure format, applications can easily use previously inaccessible data, such as knowledge learning and knowledge query. The construction of the knowledge graph is mainly provided by field researchers, such as the model layer and the data layer. However, human interaction itself is a complex field. Due to the limitations of the annotator's experience and subjectivity, the quality of the labeled data varies, resulting in inaccurate and time-consuming knowledge graphs, which ultimately affects the effectiveness of the knowledge graph and its application in data applications. In view of such problems of low precision, long time consumption and a large amount of manual participation in the construction of the main knowledge graph, the present invention can solve the problem to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0027] Figure 1 It is a structural schematic diagram of the semi-automatic construction method of the music knowledge graph of the present invention;

[0028] Figure 2 Use Neo4j to build a visual display of the semi-automatic construction system of music knowledge graph;

[0029] Figure 3 Knowledge graph display of named entity recognition results in the music field. DETAILED DESCRIPTION

[0030] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0031] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0033] In this embodiment, all data is obtained in compliance with laws and regulations and based on the user's consent, and is used legally.

[0034] Knowledge graph, known as knowledge domain visualization or knowledge domain mapping map in the library and information industry, is a series of various graphics that show the development process and structural relationship of knowledge. It uses visualization technology to describe knowledge resources and their carriers, and mine, analyze, construct, draw and display knowledge and their mutual connections. At present, "relationship is the essence of data." is gradually becoming a consensus in the industry. Specifically, knowledge graph is the most specific tool for this concept, and has been widely used in many downstream fields such as information retrieval, intelligent question and answer, medical diagnosis, data visualization, etc. Knowledge graph construction is the process of filling the database with information from data such as PDF, text, image or video.

[0035] Chinese named entity recognition refers to identifying the boundaries and categories of entities in Chinese text. Named entity recognition is a basic technology in text processing and is widely used in natural language processing, recommendation systems, knowledge graphs and other fields, such as entity-based user profiling and entity-based recall in recommendation systems. The CNN-BiLSTM-Attention model is a widely used method for named entity recognition. The core idea is to focus on the key points, which is very suitable for application in the semi-automatic construction system of music knowledge graphs.

[0036] The present invention constructs a semi-automatic construction system of Chinese music knowledge graph with CNN-BiLSTM-Attention model as the core by using Python programming language.

[0037] Embodiment 1

[0038] This embodiment provides a semi-automatic construction method of a music knowledge graph;

[0039] like Figure 1 As shown, the semi-automatic construction method of the music knowledge graph includes:

[0040] S101: Identify named entities in Chinese music datasets;

[0041] S102: converting the identified named entities into triples in the field of Chinese music;

[0042] S103: Based on the triples in the Chinese music field, construct a knowledge graph in the Chinese music field.

[0043] Furthermore, the method further comprises:

[0044] S104: Based on the knowledge graph in the field of Chinese music, personalized recommendation of music data or search of music data is realized.

[0045] Furthermore, the step S101: identifying named entities in a Chinese music field dataset specifically includes:

[0046] The trained neural network model is used to identify named entities in the Chinese music field dataset.

[0047] Furthermore, the neural network model, the specific network structure includes:

[0048] The convolutional neural network CNN, bidirectional long short word memory model BiLSTM (Bi-directional Long Short-Term Memory), self-attention mechanism layer Self-Attention and CRF layer are connected in sequence.

[0049] Furthermore, the training process of the trained neural network model includes:

[0050] Construct a training set; wherein the training set is a corpus of known named entities;

[0051] The training set is input into the neural network model, the model is trained, and a trained neural network model is obtained.

[0052] Exemplarily, the training set refers to the data set provided by the National Conference on Knowledge Graph and Semantic Computing (CCKS2018).

[0053] The dataset (provided by CCKS2018) is used to train the named entity recognition system model in the Chinese music field, and the dataset is used to construct the music knowledge graph.

[0054] This dataset mainly comes from real user request records in the music and non-music fields of human-computer interactive dialogue systems. In addition, the parsing results of the corpus given by the system have also been manually annotated. Different annotations will be performed to perform cross-validation. It includes 12k labeled training data, 3k labeled valuation data, and 2k unlabeled test corpus.

[0055] Furthermore, the trained neural network model is used to identify named entities in the Chinese music field dataset; the specific working principle includes:

[0056] S1011: Convert each dialogue in the Chinese music domain corpus into a vector matrix;

[0057] S1012: Use the convolutional neural network (CNN) to extract features from the vector matrix and obtain the essential features of each conversation;

[0058] S1013: Input the essential features of each conversation into the bidirectional long short word memory model BiLSTM, and output the word features containing the context feature representation;

[0059] S1014: Input the word features containing the context representation into the self-attention mechanism layer to filter out the key entities;

[0060] S1015: Input the filtered key entities into the CRF layer to obtain entity labels.

[0061] Furthermore, the method also includes: evaluating the trained neural network model, wherein the evaluation specifically evaluates the comprehensive performance of the model by calculating the accuracy and recall rate.

[0062] Furthermore, the step S1011: converting each dialogue in the Chinese music domain corpus into a vector matrix specifically includes:

[0063] Remove stop words for each dialogue;

[0064] Connect the disconnected sentences in each dialogue;

[0065] Remove the spaces between sentences in each dialogue;

[0066] Limit sentences in each conversation to a set length;

[0067] Each sentence in the conversation corresponds to an index vector;

[0068] Each word in each sentence in the conversation corresponds to a word vector;

[0069] Get the vector matrix corresponding to each dialogue.

[0070] Exemplarily, clean the conversation text data to remove useless stop words (including NLTK stop words, day names (Monday to Sunday), month names (January to December)), and connect the disconnected sentences together without spaces between sentences. Vectorize the data to the specified length of 200 (if the sentence length is less than 200, the specified symbol will be automatically filled in the back by default; in addition, if the sentence length is greater than 200, the redundant part will be cut off). After vectorization, each sentence is regarded as a joint index vector, and each index corresponds to a word vector. The conversation is described as a vector matrix.

[0071] Furthermore, S1012: using a convolutional neural network (CNN) to extract features from the vector matrix to obtain essential features of each conversation; using a convolutional neural network (CNN) to extract local features from the vector matrix, where the convolutional neural network (CNN) is a feedforward neural network used to extract local features. For each speech vector, the CNN layer compresses the input data to obtain the essential features, which can also simplify the complexity of network calculations.

[0072] It should be understood that the local features in the corpus are extracted using a convolutional neural network. The convolutional neural network obtains essential features by compressing the input data, which can speed up the processing, simplify the calculation, and improve the performance.

[0073] Furthermore, the S1013: inputs the essential features of each conversation into a bidirectional long-short word memory model BiLSTM, and outputs word features including context feature representation;

[0074] Among them, BiLSTM is input into gate x at time t t , unit state, hidden state, forget gate f t And output gate. By forgetting and remembering the information in the cell state, the necessary knowledge for subsequent calculations is passed, useless things are discarded, and the hidden state is recorded in each time step. The specific calculation process of the LSTM hidden layer output representation is as follows:

[0075] i t =σ(W i [h t-1 ,x t ]+b i ) (1)

[0076] f t =σ(W f [h t-1,x t ]+b f ) (2)

[0077] o t =σ(W o [h t-1 ,x t ]+b o ) (3)

[0078]

[0079]

[0080] h t =o t ×tanh(c t ) (6)

[0081] Among them, w xi is the weight matrix from the input layer to the hidden layer, b is the bias vector, c t The storage unit status. represents the state at time t, σ and tanh represent two different neuron activation functions, i t 、f t and t They represent the input gate, forget gate and output gate respectively. For a given sentence X=(x1,x2,…,x n ). Each word x i are all represented as a d-dimensional vector. Each LSTM obtains one side of the information, that is, the final output of the BiLSTM is connected by the left and right context representations of the word. Combining the past hidden information with the future hidden information is represented as in and They are the outputs of the forward LSTM and reverse LSTM at time t respectively.

[0082] By forgetting and remembering the information in the cell state, it is possible to transmit essential knowledge for subsequent computations while discarding the useless stuff and recording the hidden state at each time step.

[0083] Furthermore, the S1014: inputting the word features including the context representation into the self-attention mechanism layer to screen out the key entities; specifically includes:

[0084] Self-attention is used to screen key information. That is, when labeling words, the module assigns higher weights to entities and smaller weights to non-entities.

[0085] First, the weight between each word and other words in the sentence is calculated by similarity;

[0086] Secondly, the softmax function is used to normalize the weight values.

[0087] Finally, output the sum of the weight matrix.

[0088] The weight matrix a of the model t,j as follows:

[0089]

[0090] score(x t ,x j )=W a (x t x j ) T (x t x j ) (8)

[0091] Among them, W a is the weight matrix parameter of the model.

[0092] The weight a t,j and LSTM output h j Apply to Model C t superior:

[0093]

[0094] Where N represents the length of the sentence.

[0095] Use the tanh function as the output layer:

[0096] e t =tanh(W t [C t :h t ]) (10)

[0097] Furthermore, the implementation modules of the extraction system are shown in Table 1.

[0098] Table 1 Extraction module description

[0099]

[0100] Furthermore, the step S1015: inputting the selected key entities into the conditional random field (CRF) layer to obtain entity labels specifically includes:

[0101] The output vector of the feature extraction model is input into the CRF layer to decode the best label sequence and then detect the entity type. The CRF model can reasonably evaluate the relationship between the label sequences.

[0102] Assume that P represents the score matrix output by the BiLSTM network, X = (x1, x2, …, x n ) represents the input sequence, the size of P is n×k, k represents the number of labels, P i,j Corresponding to the relationship between the jth and i-th.

[0103] For the output sequence Y=(y1,y2,…,y n ),Score Where A is the transfer matrix.

[0104] The probability of softmax generating sequence Y over all possible label sequences is as follows:

[0105]

[0106] During training, the log probability of the correct label sequence is maximized:

[0107]

[0108] Among them, y X represents all possible tag sequences for the input sequence x (even those that do not validate the IOB format). By maximizing the logarithmic notation, we produce valid output tag sequences. Specifically, as a decoder, we predict the output sequence, using y as described in Equation (13) * The sequence with the highest score will become the output of the CRF structure.

[0109]

[0110] Furthermore, the sequence labeling implementation module is shown in Table 2.

[0111] Table 2 Description of sequence tagging modules

[0112]

[0113]

[0114] Since when using the system, the relationship between entities can be set according to the previous definition. For example, when we want to listen to "Rice Fragrance", the system can recognize that "Jay Chou" is the singer and "Rice Fragrance" is the song title. According to the predefined relationship domain, the system can conclude that they are in the relationship of singing and being sung. Therefore, the evaluation criteria are basically entity recognition.

[0115] The main evaluation criteria are P (precision), R (recall) and F1 (f-value).

[0116]

[0117]

[0118]

[0119] Generally speaking, the higher the precision and recall, the better the experimental effect. However, due to the interaction between P and R, the results are contradictory, that is, higher precision may lead to lower recall. Therefore, we need to consider the weighted harmonic mean comprehensively, that is, it is appropriate to use F value as the criterion.

[0120] Evaluate the model to determine its named entity recognition capability. Calculate the accuracy and recall to evaluate the overall performance of the system. Optimize the model and results based on different data sets and evaluation results. Evaluate the training set to obtain entity extraction results. This completes the semi-automatic construction of the music knowledge graph. Users can access the Neo4j server locally or remotely to view and operate the music knowledge graph.

[0121] Furthermore, the step S102: converting the identified named entities into triples in the field of Chinese music; specifically includes:

[0122] According to the predefined relationship template, the identified named entities are connected with relationships and converted into triples in the field of Chinese music.

[0123] Triples, for example: entity-relationship-entity.

[0124] Furthermore, the predefined relationship template includes: the relationship between the song title and the author, and the relationship between the song title and the lyrics.

[0125] Generation of music triples,The triplet generation module connects entities and relations,such as the formula (entity, relation, entity).

[0126] First, formalize meta-knowledge in the music domain;

[0127] Then, based on entity extraction and sequence labeling, the corresponding entities are instantiated using predefined relation templates.

[0128] For example, we have a corpus like "Jay Chou is a famous Asian musician". Jay Chou is a famous musician in Asia. I want to listen to his "Rice Fragrance". MusicIntentionNet can recognize that "Jay Chou" is the name of a singer, and "Rice Fragrance" is the name of a song, which is the name of the song sung by "Jay Chou". Therefore, this relationship can be bidirectional, that is, singing / being sung. Therefore, the model has an inspiration, that is, automatically defining the inspiration, automatically defining the relationship between two detected entities in a pre-defined class. In this study, the relationship template is defined in Table 3.

[0129] Table 3 Predefined template relationships

[0130]

[0131]

[0132] Furthermore, the identified named entities are converted into triples in the field of Chinese music, including:

[0133] Entities in each sentence are extracted, including singers, songs and lyrics; if the relationship between entities is defined in a predefined relationship library, a triple set [first entity, relationship, second entity] is finally returned.

[0134] Furthermore, the S103: constructing a knowledge graph in the field of Chinese music based on the triples in the field of Chinese music; specifically includes:

[0135] The music triples are put into the knowledge graph generation algorithm to automatically form a knowledge graph, and then linked to the graph database Neo4j to generate a visual knowledge graph.

[0136] The graph database Neo4j can be accessed both locally and remotely.

[0137] The "nodes" and "edges" on the knowledge graph are constructed with the results of entity recognition and relationship extraction, and the generated music triples are linked to the Neo4j server, and finally a knowledge graph is established in the graph database Neo4j. Figure 2 This is a visualization of a semi-automatic music knowledge graph construction system using Neo4j. The present invention automatically builds a knowledge graph with 6,000 nodes for 9,000 text data in the test set. Figure 3 As shown in the figure, 1 is a node without musical intent, 2 is a song node, 3 is a singer node, 4 is a genre node, 5 is a lyrics node, 6 is a randomly played node, and some other nodes, such as music scenes.

[0138] Furthermore, in the graph database Neo4j, each triple in the triple set is traversed, and two nodes are created with the first entity and the second entity by removing duplication using the cypher language, and the two nodes are connected using the cypher language using the relationship between the first entity and the second entity as an association; the constructed knowledge graph will be stored in the Neo4j database.

[0139] Furthermore, the modules that are linked to the Neo4j database and implement visualization are shown in Table 4.

[0140] Table 4 System visualization module description

[0141]

[0142] The triples in the music field are constructed into a music field knowledge graph and linked to the graph database Neo4j to visualize the music knowledge graph and store it in the database.

[0143] The semi-automatic construction method of the music knowledge graph is a semi-automatic Chinese music intention knowledge graph construction method based on efficient triple extraction and annotation. First, the context-based triple extraction framework of the present invention makes it easier and more efficient to extract information from the corpus and generate triples. The framework is based on a deep CNN layer, and BiLSTM is combined with a self-attention layer with sequence tags, which can learn to generate new nodes and identify edges between existing nodes according to predefined relationship type templates. The model of the present invention is effective and lighter than many SOTA models. Secondly, the present invention proposes an algorithm for generating a music intention knowledge graph, and instantiates and visualizes a set of generated triples based on Neo4j. The model of the present invention can also be referenced by other fields and can provide inspiration for the construction of knowledge graphs in other fields. Therefore, when the model is applied to other fields, the process must be adjusted, and the artificially constructed relationship templates cannot be completely avoided. The semi-automatic construction system of the music knowledge graph can greatly improve the construction speed of the knowledge graph in the music field, and to a certain extent solves the problems of low precision, long time consumption, and much manual participation in the knowledge graph construction process.

[0144] Table 5 Module description of model evaluation

[0145]

[0146] Table 6 A series of entity categories defined in the dataset

[0147] Fields explain album Album Title singer Singer's name style Genre field lyrics lyrics code Indicates RANDOM or No-music scene Scenario label Music Tags song Song title

[0148] Table 7

[0149]

[0150]

[0151] Embodiment 2

[0152] This embodiment provides a semi-automatic construction system for music knowledge graph;

[0153] The semi-automatic music knowledge graph construction system includes:

[0154] An entity recognition module, which is configured to: recognize named entities in a Chinese music domain dataset;

[0155] A triple conversion module is configured to: convert the identified named entities into triples in the field of Chinese music;

[0156] A graph construction module is configured to construct a knowledge graph in the field of Chinese music based on triples in the field of Chinese music.

[0157] It should be noted that the above-mentioned entity recognition module, triple conversion module and graph construction module correspond to steps S101 to S103 in Embodiment 1, and the examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0158] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0159] The proposed system can be implemented in other ways. For example, the system embodiment described above is only illustrative, and the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0160] Embodiment 3

[0161] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device executes the method described in the above embodiment one.

[0162] It should be understood that in this embodiment, the processor 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, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0163] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0164] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.

[0165] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0166] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment 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.

[0167] Embodiment 4

[0168] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is completed.

[0169] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for semi-automatically constructing a music knowledge graph, characterized in that: include: Identify named entities in Chinese music datasets; Convert the identified named entities into triples in the Chinese music field; Based on the triples in the Chinese music field, a knowledge graph in the Chinese music field is constructed; Identify named entities in Chinese music datasets; specifically: Use the trained neural network model to identify named entities in the Chinese music dataset; Neural network model, the specific network structure includes: The convolutional neural network CNN, the bidirectional long and short word memory model BiLSTM, the self-attention mechanism layer Self-Attention and the CRF layer are connected in sequence; The specific training process of the trained neural network model includes: Construct a training set; wherein the training set is a corpus of known named entities; Input the training set into the neural network model, train the model, and obtain the trained neural network model; Convert the identified named entities into triples in the Chinese music field, including: According to the predefined relationship template, the identified named entities are connected with the relationships between entities and converted into triples in the field of Chinese music; The predefined relationship templates include: the relationship between the song title and the singer, and the relationship between the song title and the lyrics; Generation of music triples,The triple generation module connects entities and relations together; based on entity extraction and sequence labeling,,the corresponding entities are instantiated using predefined relation templates; The identified named entities are converted into triples in the Chinese music field, including: Extract the entities in each sentence, including singers, songs and lyrics; if the relationship between entities is defined in a predefined relationship library, finally return a triple set [first entity, relationship, second entity]; Identify named entities in Chinese music datasets; the specific working principles include: Convert each dialogue in the Chinese music domain corpus into a vector matrix; Use convolutional neural network (CNN) to extract features from vector matrices and obtain the essential features of each conversation. The essential features of each conversation are input into the BiLSTM model, and the word features containing contextual feature representation are output; The word features containing context representation are input into the self-attention mechanism layer to filter out key entities; Input the selected key entities into the CRF layer to obtain entity labels; The filtered key entities are input into the conditional random field (CRF) layer to obtain entity labels; specifically, the following are included: The output vector of the feature extraction model is input into the CRF layer to decode the best label sequence and then detect the entity type; Based on the triples in the field of Chinese music, a knowledge graph in the field of Chinese music is constructed; specifically, it includes: Put the music triples into the knowledge graph generation algorithm to automatically form a knowledge graph, and link it to the graph database Neo4j to generate a visual knowledge graph; In the graph database Neo4j, each triple in the triple set is traversed, and two nodes are created with the first entity and the second entity by removing the duplication using the cypher language, and the two nodes are connected using the cypher language using the relationship between the first entity and the second entity as the association; the constructed knowledge graph will be stored in the Neo4j database.

2. The method for semi-automatically constructing a music knowledge graph as claimed in claim 1, characterized in that: The method further comprises: Based on the knowledge graph in the field of Chinese music, personalized recommendation or search of music data can be achieved.

3. The semi-automatic construction method of the music knowledge graph according to claim 1, characterized in that: Convert each dialogue in the Chinese music corpus into a vector matrix; specifically: Remove stop words for each dialogue; Connect the disconnected sentences in each dialogue; Remove the spaces between sentences in each dialogue; Limit sentences in each conversation to a set length; Each sentence in the conversation corresponds to an index vector; Each word in each sentence in the conversation corresponds to a word vector; Get the vector matrix corresponding to each dialogue.

4. A semi-automatic music knowledge graph construction system, characterized in that: include: An entity recognition module, which is configured to: recognize named entities in a Chinese music domain dataset; Use the trained neural network model to identify named entities in the Chinese music dataset; Neural network model, the specific network structure includes: The convolutional neural network CNN, the bidirectional long and short word memory model BiLSTM, the self-attention mechanism layer Self-Attention and the CRF layer are connected in sequence; The specific training process of the trained neural network model includes: Construct a training set; wherein the training set is a corpus of known named entities; Input the training set into the neural network model, train the model, and obtain the trained neural network model; A triple conversion module is configured to: convert the identified named entities into triples in the field of Chinese music; According to the predefined relationship template, the identified named entities are connected with the relationships between entities and converted into triples in the field of Chinese music; The predefined relationship templates include: the relationship between the song title and the singer, and the relationship between the song title and the lyrics; Generation of music triples,The triple generation module connects entities and relations together; based on entity extraction and sequence labeling,,the corresponding entities are instantiated using predefined relation templates; The identified named entities are converted into triples in the Chinese music field, including: Extract the entities in each sentence, including singers, songs and lyrics; if the relationship between entities is defined in a predefined relationship library, finally return a triple set [first entity, relationship, second entity]; Identify named entities in Chinese music datasets; the specific working principles include: Convert each dialogue in the Chinese music domain corpus into a vector matrix; Use convolutional neural network (CNN) to extract features from vector matrices and obtain the essential features of each conversation. The essential features of each conversation are input into the BiLSTM model, and the word features containing contextual feature representation are output; The word features containing context representation are input into the self-attention mechanism layer to filter out key entities; Input the selected key entities into the CRF layer to obtain entity labels; The filtered key entities are input into the conditional random field (CRF) layer to obtain entity labels; specifically, the following are included: The output vector of the feature extraction model is input into the CRF layer to decode the best label sequence and then detect the entity type; The graph construction module is configured to: construct a knowledge graph in the field of Chinese music based on triples in the field of Chinese music; specifically includes: Put the music triples into the knowledge graph generation algorithm to automatically form a knowledge graph, and link it to the graph database Neo4j to generate a visual knowledge graph; In the graph database Neo4j, each triple in the triple set is traversed, and two nodes are created with the first entity and the second entity by removing the duplication using the cypher language, and the two nodes are connected using the cypher language using the relationship between the first entity and the second entity as the association; the constructed knowledge graph will be stored in the Neo4j database.

5. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; as well as a processor for executing the computer readable instructions, Wherein, when the computer-readable instructions are executed by the processor, the method described in any one of claims 1 to 3 is executed.

6. A storage medium, characterized in that it non-temporarily stores computer-readable instructions, wherein: When the non-transitory computer-readable instructions are executed by a computer, the instructions of the method according to any one of claims 1 to 3 are executed.