Film and television knowledge base construction method, device, equipment and medium

Through the method of building a film and television knowledge base, the problems of diverse text formats, low information density and lack of semantic understanding in the construction of knowledge base in the film and television field are solved, and efficient and intelligent knowledge base construction and management are achieved, improving user experience and application effects.

CN119740645APending Publication Date: 2025-04-01HANGZHOU HUACE FILM & TELEVISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411799359.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

When building a knowledge base, the film and television field faces the problems of diverse text formats, low long text information density, lack of semantic understanding of raw data, and frequent changes in business strategies, resulting in complex knowledge base management.

Method used

A method for building a film and television knowledge base is proposed. By analyzing the film and television knowledge base construction instructions, storing the pending film and television data in a structured manner, acquiring pre-configured knowledge base multi-strategy construction links, selecting the target link according to user demand data, slicing and feature extraction of structured data, constructing knowledge slice layers, knowledge feature layers and knowledge vector layers, and integrating these levels to obtain the film and television knowledge base.

Benefits of technology

It improves the information interactivity and intelligence of the film and television knowledge base, improves the practicality and reliability of the user experience and knowledge base, can adapt to business strategy changes more quickly, and reduces the complexity of knowledge base management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740645A_ABST
    Figure CN119740645A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and provides a film and television knowledge base construction method, device, equipment and medium, which can perform structured storage on processed film and television data to obtain structured data to form a unified data structure; pre-configure a knowledge base multi-strategy construction link to flexibly respond to changes in business strategies according to different user needs; construct a knowledge slicing layer according to a target link selected from the knowledge base multi-strategy construction link as a knowledge base base to facilitate the extraction of key information and features; construct a knowledge feature layer according to the target link as an upper layer of the knowledge base to enhance the data dimension; construct a knowledge vector layer based on the target link as an outer layer of the knowledge base to facilitate subsequent analysis and application; integrate the knowledge slicing layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base, thereby improving the practicality and reliability of the knowledge base, as well as the application effect of intelligent products in the vertical field of the film and television industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for constructing a film and television knowledge base. Background Art

[0002] In recent years, large language models have rapidly attracted widespread attention due to their excellent language understanding and generation capabilities, and have brought significant changes in many fields such as general, industrial, financial, scientific research, law, education, customer service, etc. AI (Artificial Intelligence) assistants based on large model capabilities have been widely used in various scenarios, such as question and answer, search, recommendation, writing, recognition and document parsing. These applications have greatly improved the work efficiency of enterprises and individuals.

[0003] The concept of knowledge base originated in the mid-20th century. As the foundation of intelligence, knowledge is indispensable. Intelligence was the development trend of computer technology in the 1990s, and knowledge base technology will make computer application systems more intelligent, so it has become the forefront of computer intelligence research. The knowledge base is the core part of the fifth-generation computer, and it is also the key component and foundation of the artificial intelligence system. Before 2023, this technology could only solve large-scale storage and reading, but could not achieve semantic understanding and natural language logic data extraction; until the birth of the big model at the end of 2022, it revolutionized the method of knowledge base construction, thereby changing the path of retrieval and user problem solving. In the context of a big model with strong generalization ability, it has improved the ability of vertical industries to solve real practical problems in people's work, and the industry vertical knowledge base has become an extremely important part of the artificial intelligence system.

[0004] However, in the field of film and television, due to the multifaceted nature of the content involved, there are still the following defects when building a knowledge base:

[0005] 1. Film and television creation involves a variety of specific text formats, and the working scenarios are different.

[0006] In film and television creation, there are many specific text formats involved, such as scripts, storyboards, character descriptions, etc. These text formats each have their own unique structure and requirements. First of all, different work scenarios have significantly different requirements for text formats. For example, scripts need to follow a specific format and language style to facilitate actors and directors to understand; while storyboards require more detailed visual descriptions to guide filming. Such diversity makes traditional knowledge bases face additional challenges when dealing with different text formats.

[0007] 2. The proportion of long texts is large, and the data information density is low.

[0008] First, long texts usually contain a lot of redundant information and background descriptions, which causes readers to spend more time looking for key information. This inefficiency in information retrieval makes it difficult for users to quickly obtain the core content they need, reducing the user experience of the knowledge base. Secondly, the scarcity of data information makes long texts lack sufficient operability. In many cases, users need concise and clear data and facts rather than lengthy narratives. When the information density is low, users may miss important data or key insights, limiting the effectiveness of decision-making. Finally, the structure of long texts is often not clear enough, resulting in confusing information presentation. Users are easily confused when dealing with complex information, which affects their understanding and memory. These deficiencies may lead to a reduction in the overall efficiency of the knowledge base and fail to meet the needs of quickly obtaining information. This seriously affects the practicality and efficiency of the knowledge base, and it is urgent to optimize information presentation and structural design to improve user experience.

[0009] 3. The original data has no semantic understanding capability.

[0010] In the film and television industry, the context and language of the knowledge base are particularly important. This makes it difficult for users to grasp the true meaning of data when interpreting it, and it is impossible to extract valuable information from it. Raw data without semantic understanding is prone to misunderstanding and misinterpretation. The unclear semantics of raw data limits the interactivity and intelligent application of information. When faced with this data, users cannot perform effective reasoning and analysis, resulting in the inability to tap the potential value of the data. Especially in complex decision-making scenarios, the lack of semantic understanding will affect the accuracy and efficiency of decision-making. Previously, the processing and analysis of raw data required a lot of manual intervention, which increased the workload and time cost. Data analysts need to spend a lot of time on data cleaning and semantic annotation to support subsequent analysis. This inefficient workflow not only reduces productivity, but also affects the timeliness of data-driven decision-making.

[0011] 4. Business strategies often change and the knowledge base is frequently updated.

[0012] The need for rapid updates makes the management of knowledge bases more complex. The maintenance team needs to invest a lot of time and resources to ensure that information is updated in a timely manner, which not only increases the workload, but may also lead to omissions or delays in the update process. In addition, trust in the knowledge base may decrease due to frequent changes. Finally, frequent updates may also cause the structure and organization of the knowledge base to become chaotic. As information is constantly added and modified, a knowledge base that lacks systematic management may become difficult to navigate and face difficulties in finding information, reducing the usability of the knowledge base.

[0013] In view of the above defects, it is necessary to provide a method for constructing a film and television knowledge base to meet various business needs in the film and television field. Summary of the invention

[0014] In view of the above, it is necessary to provide a method, device, equipment and medium for constructing a film and television knowledge base, aiming to solve the problem of lack of an effective knowledge base in the film and television field.

[0015] A method for constructing a film and television knowledge base, the method comprising:

[0016] In response to a film and television knowledge base construction instruction, parsing the film and television knowledge base construction instruction to obtain film and television data to be processed;

[0017] The to-be-processed film and television data is structured and stored to obtain structured data;

[0018] Acquire a pre-configured knowledge base multi-strategy construction link and user demand data, and acquire a target link from the knowledge base multi-strategy construction link according to the user demand data;

[0019] Slicing the structured data according to the target link to obtain slice data, and constructing a knowledge slice layer according to the slice data;

[0020] Extracting features from the slice data according to the target link to obtain feature data, and constructing a knowledge feature layer according to the feature data;

[0021] Based on the target link, construct a knowledge vector layer according to the slice data and the feature data;

[0022] The knowledge slice layer, the knowledge feature layer and the knowledge vector layer are integrated to obtain a film and television knowledge base.

[0023] According to a preferred embodiment of the present invention, the step of performing structured storage on the to-be-processed film and television data to obtain structured data includes:

[0024] The to-be-processed film and television data are stored using object storage technology; wherein the to-be-processed film and television data include a variety of file formats;

[0025] Performing text recognition and parsing on the to-be-processed film and television data based on the multiple file formats to obtain text data;

[0026] Extracting film and television characteristic keywords from the text data according to a configuration algorithm;

[0027] Based on the film and television characteristic keywords, the titles of the dramas in the text data are identified and unified according to the episode matching rules, and the constraint information in the text data is obtained through field analysis to obtain the target data;

[0028] Performing structured storage on the target data to obtain the structured data;

[0029] The constraint information includes field name, field type, and whether it is allowed to be empty.

[0030] According to a preferred embodiment of the present invention, before obtaining the pre-configured knowledge base multi-strategy construction link and user demand data, the method further includes:

[0031] Configure a slicing strategy set; wherein the slicing strategy set is used to store the correspondence between slicing strategies and application scenarios and data characteristics;

[0032] Configure model parameters, and configure prompts for each model corresponding to the model parameters;

[0033] A vectorized model pool is configured; wherein the vectorized model pool is used to store vectorized models adapted to the application scenario and the data characteristics.

[0034] According to a preferred embodiment of the present invention, slicing the structured data according to the target link to obtain slice data, and constructing a knowledge slice layer according to the slice data includes:

[0035] Determine a target segmentation strategy according to the target link; wherein the target segmentation strategy includes a slicing algorithm, a slicing coverage rate, and a slicing length;

[0036] Slicing the structured data according to the target segmentation strategy to obtain the sliced ​​data;

[0037] The slice data is structured and stored in Elasticsearch to construct the knowledge slice layer.

[0038] According to a preferred embodiment of the present invention, extracting features from the slice data according to the target link to obtain feature data, and constructing a knowledge feature layer according to the feature data includes:

[0039] Determine a target model and a target prompt corresponding to the target model according to the target link;

[0040] Based on the target prompt, extracting features from the slice data using the target model to obtain the feature data;

[0041] The feature data is stored in the Elasticsearch to construct the knowledge feature layer.

[0042] According to a preferred embodiment of the present invention, constructing a knowledge vector layer based on the target link and according to the slice data and the feature data includes:

[0043] Retrieving a target vectorized model from the vectorized model pool based on the target link;

[0044] Using the target vectorization model to vectorize the slice data and the feature data to obtain a target vector;

[0045] The target vector is stored in the Elasticsearch to construct the knowledge vector layer.

[0046] According to a preferred embodiment of the present invention, after obtaining the film and television knowledge base, the method further includes:

[0047] When an interaction request initiated to the large language model is received, and the interaction request is a film and television question, the film and television knowledge base is used as the knowledge base of the large language model to respond to the interaction request.

[0048] A device for constructing a film and television knowledge base, the device comprising:

[0049] A parsing unit, configured to respond to a film and television knowledge base construction instruction and parse the film and television knowledge base construction instruction to obtain film and television data to be processed;

[0050] A storage unit, used for performing structured storage on the to-be-processed film and television data to obtain structured data;

[0051] An acquisition unit, used to acquire a pre-configured knowledge base multi-strategy construction link and user demand data, and acquire a target link from the knowledge base multi-strategy construction link according to the user demand data;

[0052] A construction unit, configured to slice the structured data according to the target link to obtain slice data, and construct a knowledge slice layer according to the slice data;

[0053] The construction unit is further used to extract features from the slice data according to the target link to obtain feature data, and to construct a knowledge feature layer according to the feature data;

[0054] The construction unit is further used to construct a knowledge vector layer based on the target link and according to the slice data and the feature data;

[0055] The integration unit is used to integrate the knowledge slice layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base.

[0056] A computer device, comprising:

[0057] a memory storing at least one instruction; and

[0058] A processor executes instructions stored in the memory to implement the film and television knowledge base construction method.

[0059] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the film and television knowledge base construction method.

[0060] It can be seen from the above technical solutions that the present invention can perform structured storage on the processed film and television data to obtain structured data to form a unified data structure; pre-configure a knowledge base multi-strategy construction link to flexibly respond to changes in business strategies according to different user needs; slice the structured data according to the target link selected from the knowledge base multi-strategy construction link to obtain slice data, and construct a knowledge slice layer based on the slice data to serve as the knowledge base base for easy extraction of key information and features; extract features from the slice data according to the target link to obtain feature data, and construct a knowledge feature layer based on the feature data to serve as the upper layer of the knowledge base to enhance the data dimension; based on the target link, construct a knowledge vector layer based on the slice data and the feature data to serve as the outer layer of the knowledge base for easy subsequent analysis and application; integrate the knowledge slice layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base, thereby improving the practicality and reliability of the knowledge base and the application effect of intelligent products in the vertical film and television industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a flow chart of a preferred embodiment of the method for constructing a film and television knowledge base of the present invention.

[0062] Figure 2 It is a functional module diagram of a preferred embodiment of the film and television knowledge base construction device of the present invention.

[0063] Figure 3 It is a structural schematic diagram of a computer device of a preferred embodiment of the method for constructing a film and television knowledge base of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] like Figure 1 FIG. 1 is a flowchart of a preferred embodiment of the method for constructing a film and television knowledge base of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0066] The film and television knowledge base construction method is applied to one or more computer devices, and the computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0067] The computer device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.

[0068] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.

[0069] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0070] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0071] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0072] The network where the computer device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0073] S10, in response to a film and television knowledge base construction instruction, parsing the film and television knowledge base construction instruction to obtain film and television data to be processed.

[0074] In this embodiment, the film and television knowledge base construction instruction can be triggered by relevant staff according to actual needs.

[0075] In this embodiment, the film and television data to be processed may include, but is not limited to: scripts, novels, storyboards, outlines and other files.

[0076] S11, storing the to-be-processed film and television data in a structured manner to obtain structured data.

[0077] In this embodiment, the structured storage of the to-be-processed film and television data to obtain the structured data includes:

[0078] The to-be-processed film and television data are stored using object storage technology; wherein the to-be-processed film and television data include a variety of file formats;

[0079] Performing text recognition and parsing on the to-be-processed film and television data based on the multiple file formats to obtain text data;

[0080] Extracting film and television characteristic keywords from the text data according to a configuration algorithm;

[0081] Based on the film and television characteristic keywords, the titles of the dramas in the text data are identified and unified according to the episode matching rules, and the constraint information in the text data is obtained through field analysis to obtain the target data;

[0082] Performing structured storage on the target data to obtain the structured data;

[0083] The constraint information includes field name, field type, and whether it is allowed to be empty.

[0084] For example, the multiple file formats may include, but are not limited to, Word, TXT, PDF (Portable Document Format), pictures and other file formats.

[0085] When the video data to be processed is a picture, the OCR (Optical Character Recognition) technology is first used to perform text recognition and extraction on the video data to be processed to ensure that all original data are effectively parsed.

[0086] Among them, the configuration algorithm may include a regularization algorithm, a BERT (Bidirectional Encoder Representations from Transformers, bidirectional encoding based on Transformer) algorithm, etc.

[0087] Before the target data is structured and stored, the target data may be further processed by redundancy elimination, normalization, screening, etc. to form a unified data structure.

[0088] Through the above embodiments, the object storage system can be used to save the original file to ensure the security and accessibility of the data. By unifying the drama title, the consistency and accuracy of the information can be ensured, providing a basis for subsequent analysis.

[0089] S12, obtaining a pre-configured knowledge base multi-strategy construction link and user demand data, and obtaining a target link from the knowledge base multi-strategy construction link according to the user demand data.

[0090] In this embodiment, before obtaining the pre-configured knowledge base multi-strategy construction link and user demand data, the method further includes:

[0091] Configure a slicing strategy set; wherein the slicing strategy set is used to store the correspondence between slicing strategies and application scenarios and data characteristics;

[0092] Configure model parameters, and configure prompts for each model corresponding to the model parameters;

[0093] A vectorized model pool is configured; wherein the vectorized model pool is used to store vectorized models adapted to the application scenario and the data characteristics.

[0094] This embodiment can also configure the calling frequency of different models to avoid affecting the model performance due to the abuse of the model.

[0095] Through the above embodiments, different slicing strategies can be configured according to different scenarios and data characteristics to adapt to different application scenarios and data characteristics; by configuring different model parameters and prompts, it can be ensured that the information and labels extracted using the large model under different model requirements accurately reflect the semantic content of the slices, thereby enhancing the availability of the data; different vectorization models are configured according to different scenarios and data characteristics to convert slice data into high-dimensional vectors, thereby improving the effect and efficiency of subsequent analysis.

[0096] This embodiment supports configuration of multiple strategies according to business requirements, ensuring that the knowledge base can flexibly respond to changes in business strategies.

[0097] S13, slicing the structured data according to the target link to obtain slice data, and constructing a knowledge slice layer according to the slice data.

[0098] In this embodiment, slicing the structured data according to the target link to obtain slice data, and constructing a knowledge slice layer according to the slice data includes:

[0099] Determine a target segmentation strategy according to the target link; wherein the target segmentation strategy includes a slicing algorithm, a slicing coverage rate, and a slicing length;

[0100] Slicing the structured data according to the target segmentation strategy to obtain the sliced ​​data;

[0101] The slice data is structured and stored in Elasticsearch to construct the knowledge slice layer.

[0102] Among them, the BERT model can be pre-trained to handle tasks such as storyboards, outlines, chapters, and word segmentation, thereby improving segmentation accuracy.

[0103] Among them, the data granularity and text semantics can be controlled by configuring the slicing algorithm, slicing coverage, and slicing length.

[0104] Among them, corresponding slice libraries are established for slice data of different strategies, and are structured and stored in Elasticsearch (ES) to facilitate efficient retrieval and query, providing diversified basic support for subsequent data processing and analysis.

[0105] In order to ensure the integrity and consistency of the slice data, the data can also be verified before entering Elasticsearch to avoid information redundancy and errors.

[0106] S14, extracting features from the slice data according to the target link to obtain feature data, and constructing a knowledge feature layer according to the feature data.

[0107] In this embodiment, extracting features from the slice data according to the target link to obtain feature data, and constructing a knowledge feature layer according to the feature data includes:

[0108] Determine a target model and a target prompt corresponding to the target model according to the target link;

[0109] Based on the target prompt, extracting features from the slice data using the target model to obtain the feature data;

[0110] The feature data is stored in the Elasticsearch to construct the knowledge feature layer.

[0111] Among them, the target model can be a large language model. Before use, the text feature data can be annotated according to the actual situation of the film and television business to fine-tune the large language model, thereby improving the ability of the large language model to extract features and labels.

[0112] Among them, by using a large language model with corresponding model parameters and the corresponding prompt to analyze the sliced ​​data and extract key information and features from it, the semantic understanding ability of the data is enhanced, ensuring that the information density of long film and television texts and important plots, lines, emotions, etc. is enhanced, and important words related to the topic are identified and relevant tags are extracted, thereby enhancing the dimension and search ability of the data.

[0113] The extracted feature data is stored in the Elasticsearch to support subsequent query and data analysis, thereby improving the efficiency of overall data processing.

[0114] S15, based on the target link, construct a knowledge vector layer according to the slice data and the feature data.

[0115] In this embodiment, constructing a knowledge vector layer based on the target link and according to the slice data and the feature data includes:

[0116] Retrieving a target vectorized model from the vectorized model pool based on the target link;

[0117] Using the target vectorization model to vectorize the slice data and the feature data to obtain a target vector;

[0118] The target vector is stored in the Elasticsearch to construct the knowledge vector layer.

[0119] Among them, through vectorization processing, slice content, various key information and labels can be converted into high-dimensional vectors to facilitate semantic understanding and similarity matching.

[0120] The target vector is stored in the Elasticsearch to support fast retrieval and efficient analysis, thereby improving data processing performance.

[0121] S16, integrating the knowledge slice layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base.

[0122] In this embodiment, after obtaining the film and television knowledge base, the method further includes:

[0123] When an interaction request initiated to the large language model is received, and the interaction request is a film and television question, the film and television knowledge base is used as the knowledge base of the large language model to respond to the interaction request.

[0124] Through the above embodiments, a reasonable knowledge base can be provided for the large language model, making the output of the large language model more accurate.

[0125] This embodiment has the ability to efficiently process diverse text formats. Through systematic data collation and parsing, it can process a variety of specific text formats, such as scripts, storyboards, outlines, etc. With the help of built-in segmentation rules and data processing scripts, it can automatically identify text structures for different work scenarios to ensure the accuracy and consistency of information. This flexibility significantly improves the adaptability of the knowledge base in different text formats and can solve the problems of traditional knowledge bases in processing diverse texts.

[0126] This embodiment improves the ability of semantic understanding. By introducing the big model technology, the ability of semantic understanding of data is enhanced. The built-in fine-tuned big model is used to conduct in-depth analysis and information extraction of data, making the context and meaning of the original data clearer, and key information and labels can be obtained more accurately to avoid misunderstandings caused by unclear semantics. This semantic enhancement function greatly improves the information interactivity and intelligence of the knowledge base.

[0127] This embodiment supports efficient information processing and retrieval. Feature vectorization is used to convert lengthy text into structured, easily retrievable information. This method not only preserves the semantics and context of the data, but also enables fast retrieval by storing sliced ​​data in Elasticsearch, significantly improving the efficiency of finding information and improving the user experience.

[0128] This embodiment supports flexible construction links. The slicing strategy is dynamically adjusted according to actual business needs, providing a high degree of flexibility. Since the knowledge slice layer is built based on different needs, there is no need to build the slice layer again when the feature changes. This customizable construction link enables the knowledge base to quickly adapt to the changing business environment and reduces the management complexity caused by frequent updates.

[0129] This embodiment can also display the progress of various processing items (such as the progress of vectorization processing, etc.) on a designated user interaction interface, so that the user can intuitively see the task execution status.

[0130] It can be seen from the above technical solutions that the present invention can perform structured storage on the processed film and television data to obtain structured data to form a unified data structure; pre-configure a knowledge base multi-strategy construction link to flexibly respond to changes in business strategies according to different user needs; slice the structured data according to the target link selected from the knowledge base multi-strategy construction link to obtain slice data, and construct a knowledge slice layer based on the slice data to serve as the knowledge base base for easy extraction of key information and features; extract features from the slice data according to the target link to obtain feature data, and construct a knowledge feature layer based on the feature data to serve as the upper layer of the knowledge base to enhance the data dimension; based on the target link, construct a knowledge vector layer based on the slice data and the feature data to serve as the outer layer of the knowledge base for easy subsequent analysis and application; integrate the knowledge slice layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base, thereby improving the practicality and reliability of the knowledge base and the application effect of intelligent products in the vertical film and television industry.

[0131] like Figure 2 , which is a functional module diagram of a preferred embodiment of the film and television knowledge base construction device of the present invention. The film and television knowledge base construction device 11 includes a parsing unit 110, a storage unit 111, an acquisition unit 112, a construction unit 113, and an integration unit 114. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by a processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0132] The parsing unit 110 is used to respond to the film and television knowledge base construction instruction and parse the film and television knowledge base construction instruction to obtain the film and television data to be processed;

[0133] The storage unit 111 is used to perform structured storage on the to-be-processed film and television data to obtain structured data;

[0134] The acquisition unit 112 is used to acquire a pre-configured knowledge base multi-strategy construction link and user demand data, and acquire a target link from the knowledge base multi-strategy construction link according to the user demand data;

[0135] The construction unit 113 is used to slice the structured data according to the target link to obtain slice data, and construct a knowledge slice layer according to the slice data;

[0136] The construction unit 113 is further used to extract features from the slice data according to the target link to obtain feature data, and to construct a knowledge feature layer according to the feature data;

[0137] The construction unit 113 is further configured to construct a knowledge vector layer based on the target link, according to the slice data and the feature data;

[0138] The integration unit 114 is used to integrate the knowledge slice layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base.

[0139] It can be seen from the above technical solutions that the present invention can perform structured storage on the processed film and television data to obtain structured data to form a unified data structure; pre-configure a knowledge base multi-strategy construction link to flexibly respond to changes in business strategies according to different user needs; slice the structured data according to the target link selected from the knowledge base multi-strategy construction link to obtain slice data, and construct a knowledge slice layer based on the slice data to serve as the knowledge base base for easy extraction of key information and features; extract features from the slice data according to the target link to obtain feature data, and construct a knowledge feature layer based on the feature data to serve as the upper layer of the knowledge base to enhance the data dimension; based on the target link, construct a knowledge vector layer based on the slice data and the feature data to serve as the outer layer of the knowledge base for easy subsequent analysis and application; integrate the knowledge slice layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base, thereby improving the practicality and reliability of the knowledge base and the application effect of intelligent products in the vertical film and television industry.

[0140] like Figure 3 The figure is a schematic diagram of the structure of a computer device of a preferred embodiment of the method for constructing a film and television knowledge base according to the present invention.

[0141] The computer device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a film and television knowledge base construction program.

[0142] Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 may be a bus-type structure or a star-type structure. The computer device 1 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the computer device 1 may also include input and output devices, network access devices, etc.

[0143] It should be noted that the computer device 1 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.

[0144] The memory 12 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 12 may be an internal storage unit of the computer device 1, such as a mobile hard disk of the computer device 1. In other embodiments, the memory 12 may also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Further, the memory 12 may also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 may not only be used to store application software and various types of data installed in the computer device 1, such as the code of the film and television knowledge base construction program, but also be used to temporarily store data that has been output or is to be output.

[0145] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (Control Unit) of the computer device 1, and uses various interfaces and lines to connect various components of the entire computer device 1, and executes or executes programs or modules stored in the memory 12 (for example, executing a film and television knowledge base construction program, etc.), and calls data stored in the memory 12 to execute various functions of the computer device 1 and process data.

[0146] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned film and television knowledge base construction method embodiments, for example Figure 1 Steps shown.

[0147] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a parsing unit 110, a storage unit 111, an acquisition unit 112, a construction unit 113, and an integration unit 114.

[0148] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute the part of the film and television knowledge base construction method described in each embodiment of the present invention.

[0149] If the module / unit integrated in the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented.

[0150] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.

[0151] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0152] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0153] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by only one straight line, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.

[0154] Although not shown, the computer device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 13 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The computer device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0155] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.

[0156] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device 1 and to display a visual user interface.

[0157] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0158] It can be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0159] Combination Figure 1 The memory 12 in the computer device 1 stores a plurality of instructions to implement a method for constructing a film and television knowledge base, and the processor 13 can execute the plurality of instructions to implement:

[0160] In response to a film and television knowledge base construction instruction, parsing the film and television knowledge base construction instruction to obtain film and television data to be processed;

[0161] The to-be-processed film and television data is structured and stored to obtain structured data;

[0162] Acquire a pre-configured knowledge base multi-strategy construction link and user demand data, and acquire a target link from the knowledge base multi-strategy construction link according to the user demand data;

[0163] Slicing the structured data according to the target link to obtain slice data, and constructing a knowledge slice layer according to the slice data;

[0164] Extracting features from the slice data according to the target link to obtain feature data, and constructing a knowledge feature layer according to the feature data;

[0165] Based on the target link, construct a knowledge vector layer according to the slice data and the feature data;

[0166] The knowledge slice layer, the knowledge feature layer and the knowledge vector layer are integrated to obtain a film and television knowledge base.

[0167] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0168] It should be noted that the data involved in this case were all obtained legally.

[0169] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0170] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0171] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0172] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0173] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0174] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0175] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for constructing a film and television knowledge base, characterized in that: The film and television knowledge base construction method comprises: In response to a film and television knowledge base construction instruction, parsing the film and television knowledge base construction instruction to obtain film and television data to be processed; The to-be-processed film and television data is structured and stored to obtain structured data; Acquire a pre-configured knowledge base multi-strategy construction link and user demand data, and acquire a target link from the knowledge base multi-strategy construction link according to the user demand data; Slicing the structured data according to the target link to obtain slice data, and constructing a knowledge slice layer according to the slice data; Extracting features from the slice data according to the target link to obtain feature data, and constructing a knowledge feature layer according to the feature data; Based on the target link, construct a knowledge vector layer according to the slice data and the feature data; The knowledge slice layer, the knowledge feature layer and the knowledge vector layer are integrated to obtain a film and television knowledge base.

2. The method for constructing a film and television knowledge base according to claim 1, characterized in that: The step of performing structured storage on the to-be-processed film and television data to obtain structured data includes: The to-be-processed film and television data are stored using object storage technology; wherein the to-be-processed film and television data include a variety of file formats; Performing text recognition and parsing on the to-be-processed film and television data based on the multiple file formats to obtain text data; Extracting film and television characteristic keywords from the text data according to a configuration algorithm; Based on the film and television characteristic keywords, the titles of the dramas in the text data are identified and unified according to the episode matching rules, and the constraint information in the text data is obtained through field analysis to obtain the target data; Performing structured storage on the target data to obtain the structured data; The constraint information includes field name, field type, and whether it is allowed to be empty.

3. The method for constructing a film and television knowledge base according to claim 1, characterized in that: Before obtaining the pre-configured knowledge base multi-strategy construction link and user demand data, the method further includes: Configure a slicing strategy set; wherein the slicing strategy set is used to store the correspondence between slicing strategies and application scenarios and data characteristics; Configure model parameters, and configure prompts for each model corresponding to the model parameters; A vectorized model pool is configured; wherein the vectorized model pool is used to store vectorized models adapted to the application scenario and the data characteristics.

4. The method for constructing a film and television knowledge base according to claim 3, characterized in that: The slicing of the structured data according to the target link to obtain slice data, and constructing a knowledge slice layer according to the slice data includes: Determine a target segmentation strategy according to the target link; wherein the target segmentation strategy includes a slicing algorithm, a slicing coverage rate, and a slicing length; Slicing the structured data according to the target segmentation strategy to obtain the sliced ​​data; The slice data is structured and stored in Elasticsearch to construct the knowledge slice layer.

5. The method for constructing a film and television knowledge base according to claim 4, characterized in that: The step of extracting features from the slice data according to the target link to obtain feature data, and constructing a knowledge feature layer according to the feature data includes: Determine a target model and a target prompt corresponding to the target model according to the target link; Based on the target prompt, extracting features from the slice data using the target model to obtain the feature data; The feature data is stored in the Elasticsearch to construct the knowledge feature layer.

6. The method for constructing a film and television knowledge base according to claim 4, characterized in that: The step of constructing a knowledge vector layer based on the target link and according to the slice data and the feature data includes: Retrieving a target vectorized model from the vectorized model pool based on the target link; Using the target vectorization model to vectorize the slice data and the feature data to obtain a target vector; The target vector is stored in the Elasticsearch to construct the knowledge vector layer.

7. The method for constructing a film and television knowledge base according to claim 1, characterized in that: After obtaining the film and television knowledge base, the method further includes: When an interaction request initiated to the large language model is received, and the interaction request is a film and television question, the film and television knowledge base is used as the knowledge base of the large language model to respond to the interaction request.

8. A device for constructing a film and television knowledge base, characterized in that: The film and television knowledge base construction device comprises: A parsing unit, configured to respond to a film and television knowledge base construction instruction and parse the film and television knowledge base construction instruction to obtain film and television data to be processed; A storage unit, used for performing structured storage on the to-be-processed film and television data to obtain structured data; An acquisition unit, used to acquire a pre-configured knowledge base multi-strategy construction link and user demand data, and acquire a target link from the knowledge base multi-strategy construction link according to the user demand data; A construction unit, configured to slice the structured data according to the target link to obtain slice data, and construct a knowledge slice layer according to the slice data; The construction unit is further used to extract features from the slice data according to the target link to obtain feature data, and to construct a knowledge feature layer according to the feature data; The construction unit is further used to construct a knowledge vector layer based on the target link and according to the slice data and the feature data; The integration unit is used to integrate the knowledge slice layer, the knowledge feature layer and the knowledge vector layer to obtain a film and television knowledge base.

9. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the method for constructing a film and television knowledge base as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the method for constructing a film and television knowledge base as described in any one of claims 1 to 7.