Knowledge base construction method, device and system, computing equipment and readable storage medium
By extracting and generating description text to build the user's knowledge base, it solves the problem of data integration and analysis in different modalities, improves the efficiency and accuracy of data query acquisition, and achieves comprehensive and personalized analysis of user data.
Patent Information
- Application Number
- CN202410515478.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-09-03
AI Technical Summary
Existing technology is difficult to effectively integrate and analyze user data in different modalities, resulting in insufficient comprehensiveness and accuracy of data processing analysis, affecting the efficiency and accuracy of users in obtaining required information.
By obtaining user data of target users in different modalities, extracting their characteristic information and generating description text, building the user's knowledge base based on these description texts, achieving overall analysis and query acquisition of data in different modalities.
It improves the efficiency and accuracy of data query acquisition, simplifies the data processing process, and ensures comprehensive and personalized analysis of user data.
Smart Images

Figure CN118586485A
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a knowledge base construction method; they also relate to a knowledge base construction apparatus, a knowledge base construction system, a computing device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of computer technology, various data are increasing. Even for a single user, the personal data is very large. Analyzing user data can help users obtain the information they need more accurately and conveniently.
[0003] Usually, different data comes from different sources and exists in different formats. User data needs to be divided according to data types (such as text, audio, and image types), and different data processing software is used to analyze different types of data.
[0004] Since each data processing software can usually only analyze a small amount of user data, the analysis of user data is less comprehensive, and therefore the accuracy and convenience of determining the information required by the user based on the analysis results are also poor. Summary of the invention
[0005] The embodiments of this specification provide a knowledge base construction method, which can improve the efficiency and accuracy of data query acquisition. One or more embodiments of this specification also relate to a knowledge base construction device, a computing device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of an embodiment of this specification, a method for constructing a knowledge base is provided, the method comprising:
[0007] Obtain user data of target users in different modes;
[0008] Extracting characteristic information of each user data, and generating a description text of each user data based on the characteristic information of each user data;
[0009] Based on the description text of each user data, a knowledge base of the target user is constructed.
[0010] According to another aspect of an embodiment of the present specification, a knowledge base construction device is provided, including:
[0011] The acquisition module is used to obtain the user data of the target user in different modes;
[0012] A processing module, used to extract characteristic information of each user data, and generate a description text of each user data based on the characteristic information of each user data;
[0013] A construction module is used to construct a knowledge base of the target user based on the description text of each user data.
[0014] According to another aspect of the embodiments of this specification, there is provided a knowledge base construction system, including a terminal and a server;
[0015] The server is used to execute the above method to build the knowledge base of the target user;
[0016] The terminal is used to send a data processing request to the server;
[0017] The server is also used to perform data processing based on the knowledge base in response to the data processing request and send the queried data to the terminal.
[0018] According to another aspect of the embodiments of this specification, there is provided a computing device, including: a memory and a processor;
[0019] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the programs / instructions are executed by the processor, the steps of the above method are implemented.
[0020] According to another aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by a processor.
[0021] According to another aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, and when the computer program / instruction in the computer program product is executed by a processor, the steps of the above method are implemented.
[0022] In one embodiment of the present specification, feature information of the target user's user data in different modes can be extracted, and a description text of each user data can be generated based on the feature information, and then a knowledge base of the target user can be constructed based on the description text. In this way, the data of the target user in different modes can be directly analyzed as a whole, ensuring the comprehensiveness of the analysis of the user data. In addition, the description text is generated to generate the knowledge base. Since the query text is usually input to query and obtain the required data, the user data can be directly queried and obtained based on the text information of the same form, which can simplify the data query and acquisition process and improve the efficiency and accuracy of data query and acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a structural diagram of a knowledge base construction system provided in an embodiment of this specification;
[0024] Figure 2 is a flow chart of a knowledge base construction method provided in an embodiment of this specification;
[0025] Figure 3 It is a structural diagram of a knowledge base construction device provided in an embodiment of this specification;
[0026] Figure 4 It is a schematic diagram of the structure of another knowledge base construction device provided in an embodiment of this specification;
[0027] Figure 5 It is a structural block diagram of a computing device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0028] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0029] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items. The term "at least one" in one or more embodiments of this specification refers to "one or more", and "multiple" refers to "two or more". The term "including" is an open description and should be understood as "including but not limited to", and may include other content on the basis of the content already described.
[0030] It should be understood that although the terms "first", "second", etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, "first" may also be referred to as "second", and similarly, "second" may also be referred to as "first". Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0031] In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant standards and requirements, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0032] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.
[0033] In actual application, the large model only needs a small amount of samples to fine-tune the pre-trained model and can be applied to different tasks. The large model can be widely used in natural language processing (Natural Language Processing, referred to as NLP), computer vision and other fields, and can be specifically applied to computer vision tasks such as visual question answering (Visual Question Answering, referred to as VQA), image description (Image Caption, referred to as IC), image generation, and text-based sentiment classification, text summary generation, machine translation and other natural language processing tasks. The main application scenarios of the large model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc. The model involved in the embodiments of this specification includes but is not limited to the above-mentioned large model, which can be any type of machine learning model. For example, it can be a convolutional neural network (CNN, convolutional neural network) model, a Transformer model, etc.
[0034] With the development of computer technology and information digitization, various data are increasing, and the collection and analysis of user personal data has become increasingly important. User personal data can include a large amount of multimodal data generated in the user's daily life, such as photos, videos, texts and other modal data. These data can include data on the user's social media activities, online shopping habits, and personal interests. These data can reflect the user's behavior patterns, preferences, and social network conditions, and can help users quickly query and obtain the required data. They are of great value in providing personalized services to users and improving user experience for various services provided by computers. For example, a digital representation of the user (i.e., a digital avatar) can be constructed based on the user's personal data, and the user can use his digital avatar to move in a virtualized environment. However, since much of the user's personal data is non-standardized data, the format is diverse and the content is relatively complex, which brings great difficulties to the processing and analysis of the data. How to effectively integrate and utilize these non-standardized data has become an urgent problem to be solved.
[0035] In terms of processing non-standardized data, relevant technologies mainly focus on using data mining and machine learning methods. For example, text data is analyzed through natural language processing (NLP) technology, and photo and video content is analyzed through image recognition technology. These technologies can extract useful information from non-standardized data, such as emotional tendencies, points of interest, and social relationships. However, using these methods often requires a lot of data preprocessing work, and the effect of integrating data from different sources still needs to be improved.
[0036] In the related art, there are solutions that use image recognition and machine learning technology to automatically organize users' photos and videos. This solution can provide personalized information summaries based on the user's search history, calendar events, and location information. It can also identify and classify people appearing in the pictures, and users can annotate the names of people appearing in the photos. Although this solution integrates and utilizes personal data, it mainly focuses on specific types of standardized data and only analyzes a relatively single dimension. The comprehensiveness of the analysis of user personal data still needs to be improved.
[0037] The embodiments of this specification provide a method for constructing a knowledge base, which can analyze and integrate user data of different modes to construct a personal knowledge base (Personal Knowledge Base) that fully reflects the personalized characteristics and living habits of users. A personal knowledge base is a comprehensive information management system that aims to collect, organize, store and reuse personal knowledge and information, including but not limited to personal experience, interests, learning materials, work records and other important personal information. Based on this knowledge base, it can help users effectively manage their knowledge assets, enable users to efficiently and accurately obtain the data they need, and can also provide users with personalized services and decisions that meet their needs. The embodiments of this specification also relate to a knowledge base construction device, a knowledge base construction system, a computing device, a computer-readable storage medium and a computer program product. The knowledge base construction device and the computing device can be a server-side device, or can also be a terminal device with relatively powerful computing power.
[0038] Figure 1 is a schematic diagram of a knowledge base construction system provided in an embodiment of this specification, such as Figure 1 As shown, the knowledge base construction system 10 may include a server 101 and a terminal 102, and the terminal 102 may establish a communication connection with the server 101. For example, the server 101 may be a cloud server or a server cluster, and the terminal 102 may be a smart phone, a desktop computer, a laptop computer, a tablet computer, or a smart wearable device.
[0039] The knowledge base construction method provided in this specification can be applied to the server 101. The terminal 102 can interact with the server 101, such as sending data to the server 101, or obtaining data from the server 101. For example, the terminal 102 can send the user's personal data stored therein to the server 101, and the server 101 can process the received user's personal data, such as executing the knowledge base construction method provided in the embodiment of this specification.
[0040] The terminal 102 may also send a data processing request to the server 101, and the server 101 may perform data processing based on the data processing request and feedback the queried data to the terminal 102. For example, the user may control the terminal 102 to send a natural sentence to the server 101 in a dialogue manner, and the server 101 may understand the natural sentence using a language model and feedback the answer corresponding to the natural sentence to the terminal 102 based on the user's knowledge base, and the answer may be more in line with the user's needs.
[0041] In some implementations, if the computing capability of the terminal 102 is relatively strong, the terminal 102 may not be connected to the server 101 , and the terminal 102 may directly execute the knowledge base construction method provided in the embodiments of this specification.
[0042] Figure 2 1 is a flow chart of a knowledge base construction method provided in an embodiment of this specification. The following describes the method applied to a construction device, and the construction device is described as a server. Figure 2 As shown, the method may include the following steps:
[0043] Step 202: Obtain user data of the target user in different modes.
[0044] Data modalities may include modes such as video, picture, audio, and text. Construction means may obtain user data of the target user in different modes. For example, construction means may obtain user data of the target user from a terminal, such as an application for data collation or cloud storage installed in the terminal, and construction means may be a background server of the application. The terminal may upload local user data to the construction means using the application, and the upload may be actively triggered by the terminal, or may be triggered by the construction means. The user data may include files such as photos, videos, notes, documents, and music stored in the terminal, and each user data described in the embodiments of this specification may correspond to a file. These files may be generated by user editing (such as photos taken by the user, recorded videos and music, etc.), or may be downloaded from the Internet by the terminal (such as downloaded movies).
[0045] Optionally, the construction device can filter the data in the process of obtaining data from the terminal. For example, the construction device can realize automatic data collection and screening through plug-ins compatible with various cloud storage application programming interfaces (APIs) and local hard disk scanning tools. The construction device can intelligently identify and automatically filter files in the terminal under the user's authorization scope, and can transmit data based on an efficient data transmission protocol to ensure the integrity and security of the data. The terminal can adopt an intuitive user interface design, allowing the user to easily set the data that the construction device is allowed to collect from the terminal, including data types, size restrictions, and the selection of specific directories.
[0046] The user data acquired by the construction device may carry information about its data modality, and the construction device directly learns the modality of the user data after acquiring the user data. In some embodiments, the data of the target user acquired by the construction device may not carry information about the data modality, and the construction device may perform format analysis on the acquired data to determine the data modality of each data and obtain the user data of the target user in different modalities. For example, data of different modalities usually correspond to different file extensions and file features, such as the file extensions corresponding to audio may include mp3, mav, etc., the file extensions corresponding to video may include mp4, and the file extensions corresponding to text files may include doc, docx, pdf, txt, etc. The construction device may identify the extensions of the acquired files and the binary features of the data header to implement format analysis of the data and determine the data modality.
[0047] Optionally, the target user's data acquired by the construction device may also include other invalid data other than the above data modalities, and the construction device may not be able to identify the invalid data when parsing the target user's data. For these invalid data, only their file names and meaningful metadata may be retained, and subsequent processing procedures will no longer be performed for these invalid data.
[0048] Step 204: extract characteristic information of each user data, and generate description text of each user data based on the characteristic information of each user data.
[0049] The construction device may extract feature information for user data in different modes. Optionally, the construction device may extract feature information in a unified format for each user data. The unified format may include at least one of a picture format and a text format. For example, feature information in picture format and feature information in text format are extracted from video data, feature information in text format is extracted from audio data, picture feature information is extracted from picture data, and text feature information is extracted from text data.
[0050] In the embodiments of this specification, the construction device can use a multimodal model to extract feature information for user data. The multimodal model layer adopts a deep learning framework that integrates multiple modal processing capabilities. This framework can process and understand multiple data modalities at the same time, and can convert data features of different modalities into a unified representation through an internal conversion mechanism, thereby realizing cross-modal information fusion and understanding. For example, the user data of different modalities determined in step 202 can be diverted to different processing flows of the multimodal model, so as to realize the extraction of feature information in a unified format for user data of different modalities through the processing methods corresponding to each modality.
[0051] After extracting the corresponding feature information from the user data, the construction device can analyze the user data based on the feature information to generate a description text for the user data, and the description text is used to describe the content of the user data. For example, the construction device can use the multimodal model to generate the description text of the user data. The construction device can perform the step of generating the description text for each user data after extracting the corresponding feature information for each user data; or, the construction device can also generate the corresponding description text for each user data after extracting the corresponding feature information for the user data. The description text is a natural language text.
[0052] The construction device can generate a first description text describing the profile content of the user data for each user data based on the feature information of the user data. For example, the construction device can use a generative model (such as a generative pre-trained model GPT based on Transformer) to generate the first description text. In this process, the generative model can understand the semantic information and internal connections of the user data, and convert it into a description text that can be understood by humans. The internal connection may refer to the connection between different user data. Different user data (such as user data of different modalities) can correspond to the same event, then the different user data have an internal connection. After embedding, the user data will be mapped in the same vector space. The cosine distance in the vector space represents the semantic similarity of the user data. Different user data corresponding to the same event have a closer cosine distance in the vector space.
[0053] For example, if a picture p1 and a video p2 both correspond to the event "A is playing ball", the first description text generated by the generation model for the picture p1 and the video p2 can include the text "A is playing ball". The first description text of the picture p1 can also carry information related to the content of the video p2, and the first description text of the video p2 can also carry information related to the content of the picture p1, so that the first description text also describes the internal connection between the user data.
[0054] In the embodiment of this specification, the construction device may only generate a first description text describing the profile content of the user data, and perform subsequent step 206 based on the first description text. In some implementations, the construction device may further analyze the user data, generate a more detailed second description text, and then perform step 206 based on the second description text. The generation method of the second description text will be described in detail later, and will not be expanded here.
[0055] Step 206: Build a knowledge base of the target user based on the description text of each user data.
[0056] The construction device can integrate the user data of the target user according to the relationship between the user data based on the description text of each user data of the target user to construct a knowledge base of the target user. The knowledge base can serve the large language model and provide the large language model with refined and effective user information, which is convenient for the large language model to retrieve data, understand and make decisions on the output information.
[0057] The construction device can integrate the description texts for the same event based on the description texts of each user data, and associate the user data corresponding to the same event to build a knowledge base for the target user. The construction device can determine whether the events described in each description text are the same or have a correlation relationship based on the description texts of each user data, from the aspects of the characters, scenes, time, place, events, etc. described in the description texts. If the events described in two description texts occur at a close time, it can be considered that the events described in the two description texts are related. The construction device can integrate the description texts for the same event, and establish an association relationship for the user data corresponding to the same event. It can also establish an association relationship between the user data corresponding to the events with an associated relationship, so as to realize the integration of multimodal data and then realize the construction of a knowledge base.
[0058] In some implementations, after extracting the characteristic information of each user data, the construction device may also extract meta information of various set types of each user data based on the characteristic information of each user data. Accordingly, in step 206, a knowledge base of the target user may be constructed based on the description text and meta information of each user data.
[0059] The multiple setting types may include types such as person, place, time, and event. The construction device may analyze the characteristic information of each user data to extract the meta-information of the setting type from the characteristic information. The user data itself may carry some meta-information, and the construction device may also extract the meta-information of the setting type in combination with the meta-information carried by the user data itself. The construction device may combine the description text and meta-information of the user data to determine the user data corresponding to the same event, and whether there is a correlation between the user data, and then build a knowledge base for the target user. Optionally, the construction device may establish a correspondence between the description text and meta-information of the user data, so that the knowledge base can be used in combination with the description text and the corresponding meta-information in the future.
[0060] The construction device integrates the structured data (i.e., meta-information) corresponding to the user data with the unstructured text (i.e., description text), and performs data concatenation to build a unique personal knowledge base for the user, thereby enriching the context of the information and facilitating language model retrieval, understanding, and decision-making. For example, a photo of playing tennis, a video of tennis, and a diary recording playing tennis today are actually describing the same thing. The construction device can supplement the cross-information based on these multimodal data to fully describe an event.
[0061] For example, the description text of video A shows a scene of a family party being held. The description text expresses some recognized characters and the communication and actions that occurred. In the extraction of meta-information, the recording time of the video can be used to assist in determining the recording location, recording device, and recording time of the video. When building a knowledge base, the following description can be given: a family party was held at a certain time and place, who were the members of the party, and what interesting things happened to them.
[0062] The knowledge base may be a vector database, which may be expressed in a tree structure, wherein the root node of the tree structure corresponds to a general description of an event, and the child nodes correspond to the description text of the user data related to the event, and the meta information of the user data related to the event.
[0063] After the knowledge base is built, the construction device can perform data processing based on the knowledge base and feedback the data processing results to the terminal when receiving the data processing request sent by the terminal. For example, the data processing request can be a query or acquisition request for user data. The construction device can quickly locate the data required by the user based on the description text of each user data in the knowledge base, avoid complex identification of each user data, and can correspondingly improve the query acquisition efficiency and accuracy of user data. In addition, the processing request sent by the user through the terminal is usually expressed in natural language, and each user data in the knowledge base also corresponds to a description text in natural language form. In this way, querying based on information in a unified form can also improve query efficiency. Optionally, the data processing request can also be a request for other processing based on user data. Since the construction device can quickly obtain the data to be processed that meets the user's needs, it can improve data processing efficiency.
[0064] In summary, in the knowledge base construction method provided in the embodiment of this specification, the characteristic information of the user data of the target user in different modes can be extracted, and the description text of each user data is generated based on the characteristic information, and then the knowledge base of the target user is constructed based on the description text. In this way, the data of different modes of the target user can be directly analyzed as a whole, ensuring the comprehensiveness of the analysis of the user data. And the description text is generated to generate the knowledge base. Since the query text is usually input to query and obtain the required data, the user data can be directly queried and obtained based on the text information of the same form, which can simplify the data query and acquisition process and improve the data query and acquisition efficiency and accuracy.
[0065] In some implementations, after the construction device generates the first description text describing the general content of the user data in step 204, the user data may be further processed to generate a more detailed second description text, and then the knowledge base may be constructed based on the second description text. For example, the construction device may filter the target data obtained from the user records in each user data based on the first description text of each user data; analyze the detailed content of the target data, and generate a second description text describing the detailed content of the target data.
[0066] The first description text of the user data can roughly describe the content of the user data. The construction device can determine whether the user data is data recorded by the user himself or a publicly released work directly obtained from the Internet based on the first description text of each user data. In the embodiment of this specification, the data recorded by the user himself is referred to as target data. The construction device can filter the target data from each user data, such as using a large language model to identify and filter each user data based on the first description text. Optionally, the user data itself can carry certain meta-information, and the construction device can combine the first description text of the user data and its own meta-information to identify whether the user data belongs to the target data.
[0067] Since the knowledge base is constructed to analyze the personal characteristics of users, and the target data is recorded by the target user himself, it can better reflect the habits and preferences of the target user and other personal characteristics, so the construction device can mainly analyze the target data in detail. For example, the construction device further analyzes the details of the target data and generates a second description text that describes the details. The construction device can analyze the details of the user data from aspects such as character behavior, scene events, emotional tendencies, and style characteristics. For example, the target data includes a photo of the target user playing ball. The first description text generated for the photo can be "the user took a photo of playing ball at xx time", and the second description text generated can be "the user played ball with XX happily at xx time and took an abstract style photo".
[0068] For works published on the Internet, the construction device may only record the first description text and construct the knowledge base based on the first description text. For example, if the user data of the target user includes a movie file, then only the first description text "user xxx has stored a movie, the movie name is xxxx" may be generated for the movie file.
[0069] In some implementations, after analyzing the detailed content of the target data, the construction device may generate a second description text describing the detailed content of the target data according to a set description format.
[0070] The construction device can output the information obtained by analyzing the target data in a standardized format, that is, in a set description format, to obtain a second description text. The set description format can include the organization format of information such as person, time, place and event description. In this way, based on the standardized description text, it is convenient to compare the content of each user data, facilitate knowledge concatenation, and integrate each description text and corresponding user data. Optionally, the first description text can also be generated based on the set description format.
[0071] The following describes the process of analyzing the details of the target data. The construction device can divert the first description text and source files of the target data to different processing systems for in-depth data analysis for target data of different modalities.
[0072] For the target data in the image modality, the construction device can use the image understanding module to perform three parallel processing steps, namely, character recognition, scene recognition, and image style recognition of the image to generate a second description text. The construction device can perform these three recognitions through proprietary models in different directions to maximize information extraction. Character recognition is to recognize the character information in the image, including character characteristics, activities, emotional state, etc. Scene recognition is to analyze the scene information in the image background, such as indoor and outdoor environment, geographical location, time, etc. Image style recognition is to recognize the style and artistic characteristics of the image, such as abstraction, realism, impressionism, etc.
[0073] For target data in audio modality, the construction device can use the audio understanding module to perform automatic speech recognition (ASR) and music / emotion recognition to extract available information in the audio and generate a second description text. ASR can be used to convert the language content in the audio into text, providing a basis for subsequent semantic understanding and information extraction. For music / emotion recognition, a specialized model can be used to identify the type of music, style, and possible emotional tendencies expressed in the audio to understand the content and context of the audio. Optionally, before performing ASR and music / emotion recognition, the target data can also be preprocessed, including audio noise reduction and enhancement, to improve the accuracy and efficiency of subsequent recognition.
[0074] For target data in video mode, the construction device may perform the following steps:
[0075] S2. Decompose the target data into multiple frames of images and audio streams.
[0076] The construction device can perform video slicing processing on the target data of the video modality, decomposing the video into a series of static picture frames and continuous audio streams, which is convenient for subsequent analysis and processing, and helps to reduce the consumption of computing resources. This process can be a preparation and preprocessing process for the target data.
[0077] S4. Perform image feature recognition on the image to obtain a first recognition result, wherein the image feature includes at least one of a person, an object, a scene, and a image style.
[0078] The construction device can use the above-mentioned image understanding module to analyze each image frame (i.e., image feature recognition), such as applying computer vision technology to recognize information such as people, objects, scenes, and image styles, to obtain a first recognition result. The construction device can also generate a natural language description text corresponding to each image frame, based on which a more detailed natural language description text for the video is obtained. The construction device also performs scene concatenation for each image frame, analyzes the changes and continuity of the image frame sequence, understands the dynamic content and scene transitions of the video, and provides a more coherent and comprehensive description of the video story line.
[0079] S6. Perform speech recognition and audio feature recognition on the audio stream to obtain a second recognition result, wherein the audio feature includes: at least one of an audio type, an audio style, and an emotional expression type.
[0080] The construction device also uses the above-mentioned audio understanding module to analyze the audio stream to determine whether the audio stream belongs to music, language or other types of audio. And using the above-mentioned audio understanding module, speech recognition and audio feature recognition are performed on the audio stream to obtain a second recognition result. For the processing of the audio using the audio understanding module, please refer to the above introduction to the audio understanding module, which will not be repeated here. Optionally, pre-processing such as noise reduction and enhancement can also be performed on the audio stream.
[0081] S8. Merge the first recognition result and the second recognition result according to the timeline to generate a second description text that describes the details of the target data.
[0082] The construction device can merge the picture frame analysis results and the audio analysis results, merge them according to the unified timeline of the two, and generate a second description text, ensuring that the description text of the video contains both visual elements and audio elements, providing a complete multimodal information interpretation. The second description text may include but is not limited to character behavior, scene events, emotional tendencies, style characteristics, etc.
[0083] Optionally, in the embodiments of the present specification, the construction device may extract key meta-information of the target data based on the analysis results after performing an in-depth analysis on the target data, and then generate a knowledge base based on the second description text and the meta-information.
[0084] Figure 3 is a schematic diagram of a knowledge base construction device provided in an embodiment of the present specification, and Figure 3 The arrows in correspond to the execution flow in the knowledge base construction device. Figure 3 As shown, the knowledge base construction device may include a data parsing and adaptation layer, a multimodal model understanding layer, a large language model data screening layer, a data analysis layer, a formatted information extraction layer, and a personal knowledge base construction layer.
[0085] The knowledge base construction device can obtain user data in the cloud from the network disk, or it can obtain user data from the local hard disk of the terminal. For example, the acquisition of the user data is achieved through a plug-in compatible with the mainstream cloud storage API and a local hard disk scanning tool. The acquired user data can be input into the data parsing and adaptation layer, which can adapt to common multimedia data formats in computers, including audio file formats, picture file formats, video file formats, etc. The data parsing and adaptation layer can identify the specific format under each modality (such as mp3 or wav under the audio modality) through the file extension and binary features of the data header, and refine data of different formats under the same modality into information in a unified format. For invalid data that cannot be identified, only the file name and the meaningful metadata of the file are retained, and the file will not be analyzed further. Afterwards, files of different modalities can be diverted to the corresponding processing flow in the multimodal model.
[0086] The multimodal model understanding layer can read and understand data in multiple modes, including video slices, pictures, audio, and text. The multimodal model understanding layer can understand the content of the received files and generate corresponding natural language description texts in a unified format for each file (ie, user data) (such as the first description text mentioned above). The large language model data screening layer can combine the natural language description texts of all files and the meta information of the files themselves to identify whether the files are target data recorded by the user.
[0087] The natural language description text and source files of the target data can be input into the data analysis layer. The data analysis layer can use the video understanding module, the image understanding module and the audio understanding module to analyze the data of each user. For the specific analysis process, please refer to the above introduction and will not be repeated here. The formatted information extraction layer can generate a detailed natural language description text (such as the aforementioned second description text) based on the analysis results of each user data obtained by the data analysis layer, and can also extract the key meta information of the user data based on the analysis results, and then output the extracted information in a standardized format. Afterwards, the construction layer of the personal database can perform data concatenation, integrate structured data (meta information) with unstructured text (natural language description text), and generate a unique personal knowledge base for each user.
[0088] In an embodiment of the present specification, the construction device can perform data query and search in combination with the description text and meta information of the user data. For example, the description text may correspond to a corresponding meta information tag, and both the description text and the corresponding meta information tag can be used as objects to be retrieved. The meta information tag may be visible or hidden to the user, but the construction device can search for the meta information tag. For example, the description text of a user note is "Reviewed the quarterly budget", and the note has hidden tags [Date: 2024-03-15], [Subject: Budget Review], and [Participants: Finance Team].
[0089] The construction device may allow the user to ask questions in natural language, and the construction device may convert the questions into meta information for searching. For example, if the natural language of the question is "When was the last time I met John?", the construction device may search for the most recent date tag related to John's meeting. The construction device may allow a hybrid search method, combining a keyword search method and a meta information filtering method. For example, a search for "budget report" can filter and refine the data to be searched by adding a date range or a specific participant as meta information.
[0090] The build device can also generate documents or conversation summaries containing meta information of user data. For example, a conversation about a project deadline can be summarized as: "Discussed the upcoming project milestone, expected to be completed in the second quarter", with a link to a detailed project plan (the link corresponds to the meta information of the conversation).
[0091] The construction device can also construct a knowledge graph based on the meta information and description text of the user data to perform data query in combination with the knowledge graph. For example, the construction device can create a knowledge graph in which nodes represent concepts or entities and edges represent the relationship between them. Both meta information and natural language description text can be nodes in the knowledge graph. For example, entity nodes in the knowledge graph can create nodes for key metadata entities such as people, places, and dates; descriptive nodes can be nodes described in natural language, encapsulating context or content related to the entity; edges can connect entities with descriptive nodes to show the relationship between them, such as attendance, discussion topics, or results.
[0092] In the embodiments of this specification, the construction of the knowledge base by the construction device can cover the processing and analysis of a single data type, and can widely accept a large amount of non-standardized user data, integrate non-standardized data from different sources (including photos, videos, texts, etc.), and build a knowledge base that fully reflects the personalized characteristics and living habits of users. The knowledge base can be used to generate a digital avatar of the user. The embodiments of this specification can convert non-standardized data into a standardized format through data collation, standardization technology, and artificial intelligence algorithms, while retaining the personalized characteristics of the data, which is convenient for further analysis and application. The construction device can also screen and determine the value of data and utilize the data, summarize and summarize information between different data, fully extract information such as related people, events, and items, and realize a comprehensive analysis of user data, providing users with a more personalized and in-depth user experience.
[0093] In summary, in the knowledge base construction method provided in the embodiment of this specification, the characteristic information of the user data of the target user in different modes can be extracted, and the description text of each user data is generated based on the characteristic information, and then the knowledge base of the target user is constructed based on the description text. In this way, the data of different modes of the target user can be directly analyzed as a whole, ensuring the comprehensiveness of the analysis of the user data. And the description text is generated to generate the knowledge base. Since the query text is usually input to query and obtain the required data, the user data can be directly queried and obtained based on the text information of the same form, which can simplify the data query and acquisition process and improve the data query and acquisition efficiency and accuracy.
[0094] Corresponding to the above method embodiment, this specification also provides a knowledge base construction device embodiment, and the knowledge base construction device can be a server. Figure 4 FIG. 1 is a schematic diagram of another knowledge base construction device provided in an embodiment of this specification. Figure 4 As shown, the knowledge base construction device includes:
[0095] An acquisition module 402 is used to acquire user data of a target user in different modes;
[0096] The processing module 404 is used to extract characteristic information of each user data, and generate a description text of each user data based on the characteristic information of each user data;
[0097] The construction module 406 is used to construct a knowledge base of the target user based on the description text of each user data.
[0098] Optionally, the processing module 404 is used to:
[0099] For each user data, based on the characteristic information of the user data, a first description text describing the general content of the user data is generated.
[0100] Optionally, the knowledge base construction device provided in the embodiment of this specification further includes:
[0101] A screening module, configured to screen target data obtained from user records in each user data based on the first description text of each user data after generating the first description text describing the profile content of the user data;
[0102] The analysis module is used to analyze the detailed content of the target data and generate a second description text describing the detailed content of the target data.
[0103] Optionally, the analysis module is used to:
[0104] The detailed content of the target data is analyzed, and a second description text describing the detailed content of the target data is generated according to a set description format.
[0105] Optionally, the analysis module is used to:
[0106] For the target data of the video mode, decompose the target data into multiple frames of pictures and audio streams;
[0107] Performing image feature recognition on the image to obtain a first recognition result, wherein the image feature includes: at least one of a person, an object, a scene, and an image style;
[0108] Performing speech recognition and audio feature recognition on the audio stream to obtain a second recognition result, wherein the audio feature includes: at least one of an audio type, an audio style, and an emotional expression type;
[0109] The first recognition result and the second recognition result are combined according to the timeline to generate a second description text that describes the detailed content of the target data.
[0110] Optionally, the construction module 406 is used to:
[0111] Based on the description text of each user data, the description text for the same event is integrated, and the user data corresponding to the same event are associated to build a knowledge base of the target user.
[0112] Optionally, the knowledge base construction device provided in the embodiment of this specification further includes:
[0113] An extraction module, used for extracting meta information of various set types of each user data based on the characteristic information of each user data;
[0114] Building block 406 is used to:
[0115] Based on the description text and meta information of each user's data, a knowledge base of the target user is constructed.
[0116] Optionally, the acquisition module 402 is used to:
[0117] The acquired data of the target user is formatted and the user data of the target user in different modes is determined.
[0118] Optionally, the processing module 404 is used to:
[0119] Extract feature information in a unified format for each user's data.
[0120] In summary, in the knowledge base construction device provided by the embodiment of this specification, the acquisition module can extract the characteristic information of the user data of the target user in different modes, and generate a description text of each user data based on the characteristic information, and the construction module can build the knowledge base of the target user based on the description text. In this way, the data of different modes of the target user can be directly analyzed as a whole, ensuring the comprehensiveness of the analysis of the user data. And the description text is generated to generate the knowledge base. Since the query text is usually input to query and obtain the required data, the user data can be directly queried and obtained based on the text information of the same form, which can simplify the data query and acquisition process and improve the data query and acquisition efficiency and accuracy.
[0121] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the knowledge base construction device, since it is basically similar to the knowledge base construction method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the knowledge base construction method embodiment.
[0122] Figure 5 5 is a block diagram of a computing device provided in an embodiment of the present specification. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0123] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0124] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0125] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.
[0126] The processor 520 is used to execute computer programs / instructions, which implement the steps in the above-mentioned knowledge base construction method when executed by the processor.
[0127] As for the computing device embodiment, since it is basically similar to the knowledge base construction method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the knowledge base construction method embodiment.
[0128] One embodiment of the present specification also provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by the processor, the steps of the above-mentioned knowledge base construction method are implemented. The computer instructions include computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0129] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned knowledge base construction method when the computer program / instruction is executed in a processor.
[0130] As for the computer-readable storage medium embodiment and the computer program product embodiment, since they are basically similar to the knowledge base construction method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the knowledge base construction method embodiment.
[0131] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0132] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present specification.
[0133] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0134] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well.
Claims
1. A method for constructing a knowledge base, characterized in that: The method comprises: Obtain user data of target users in different modes; Extracting characteristic information of each user data, and generating a description text of each user data based on the characteristic information of each user data; Based on the description text of each user data, a knowledge base of the target user is constructed.
2. The method according to claim 1, characterized in that The generating a description text of each user data based on the characteristic information of each user data includes: For each user data, a first description text describing the general content of the user data is generated based on the characteristic information of the user data.
3. The method according to claim 2, characterized in that After generating a first description text describing the profile content of the user data, the method further includes: Based on the first description text of each user data, filtering the target data obtained from the user record in each user data; Analyze the detailed content of the target data and generate a second description text describing the detailed content of the target data.
4. The method according to claim 3, characterized in that The analyzing the detailed content of the target data to generate a second description text describing the detailed content of the target data includes: Analyze the detailed content of the target data, and generate a second description text describing the detailed content of the target data according to a set description format.
5. The method according to claim 3, characterized in that: The analyzing the detailed content of the target data to generate a second description text describing the detailed content of the target data includes: For target data in a video mode, decomposing the target data into multiple frames of pictures and an audio stream; Performing image feature recognition on the image to obtain a first recognition result, wherein the image feature includes: at least one of a person, an object, a scene, and an image style; Performing speech recognition and audio feature recognition on the audio stream to obtain a second recognition result, wherein the audio feature includes: at least one of an audio type, an audio style, and an emotional expression type; The first recognition result and the second recognition result are combined according to the timeline to generate a second description text that describes the detailed content of the target data.
6. The method according to any one of claims 1 to 5, characterized in that: The step of constructing the target user's knowledge base based on the description text of each user data includes: Based on the description texts of the user data, the description texts for the same event are integrated, and the user data corresponding to the same event are associated to build a knowledge base of the target user.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Based on the characteristic information of each user data, extracting meta information of multiple set types of each user data; The step of constructing the target user's knowledge base based on the description text of each user data includes: Based on the description text and meta information of each user data, a knowledge base of the target user is constructed.
8. The method according to any one of claims 1 to 5, characterized in that: The obtaining of user data of the target user in different modes includes: The acquired data of the target user is format parsed to determine the user data of the target user in different modes.
9. The method according to any one of claims 1 to 5, characterized in that: The extracting characteristic information of each user data includes: Extract feature information in a unified format for each user's data.
10. A knowledge base construction device, characterized in that: The knowledge base construction device comprises: The acquisition module is used to obtain the user data of the target user in different modes; A processing module, used to extract characteristic information of each user data, and generate a description text of each user data based on the characteristic information of each user data; A construction module is used to construct a knowledge base of the target user based on the description text of each user data.
11. A knowledge base construction system, characterized in that: Including terminal and server; The server is used to execute the method described in any one of claims 1 to 9 to build a knowledge base of the target user; The terminal is used to send a data processing request to the server; The server is also used to perform data processing based on the knowledge base in response to the data processing request and send the queried data to the terminal.
12. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the programs / instructions are executed by the processor, the method according to any one of claims 1 to 9 is implemented.
13. A computer-readable storage medium, characterized in that: A computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
14. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction in the computer program product is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
