Text information processing method, system and device, and non-volatile readable storage medium
By segmenting text information and analyzing content types, AIGC is used to generate corresponding pictures or videos, which solves the problem of low autonomous processing capabilities of AIGC, realizes automatic conversion and processing of text information, and improves the automation level of applications.
Patent Information
- Application Number
- PCT/CN2024/083376
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-24
- Filing Date
- 2024-03-22
- Publication Date
- 2024-10-03
AI Technical Summary
Existing AIGC technology has low autonomous processing capabilities and requires users to decide whether to convert text into images or videos, resulting in applications that rely on user operations and have poor processing capabilities.
By performing word segmentation on the text information to be processed, analyzing its content type, and automatically generating corresponding pictures or videos based on text-generated image models or video models, AIGC's autonomous processing capabilities are improved.
It realizes the automatic conversion of text information into pictures or videos without relying on user operations, improves AIGC's autonomous processing capabilities and enhances the automation level of its applications.
Smart Images

Figure CN2024083376_03102024_PF_FP_ABST
Abstract
Description
Text information processing method, system, device and non-volatile readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 24, 2023, with application number 202310294417.2, and entitled “A text information processing method, system, device and computer storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of AI-Generated Content (AIGC) technology, and in particular, to a text information processing method, system, device and non-volatile readable storage medium. Background Art
[0004] With the development of artificial intelligence theory and technology, AIGC can be used to generate paintings in a short period of time. For example, vivid pictures and videos can be added to text-based digital works (news, poetry, novels, copywriting, papers, patents, etc.), making the description of the work more vivid.
[0005] However, in the AIGC in the related art, it is the user who decides whether to convert a text into a picture or a video. That is, when the user decides to convert the text into a picture, the text-to-image model in the AIGC is applied to generate the picture corresponding to the text. When the user decides to convert the text into a video, the text-to-video model in the AIGC is applied to generate the video corresponding to the text. This makes the application of the existing AIGC inseparable from the user's operation, needs to rely on the user, and has poor autonomous processing capabilities.
[0006] In response to issues such as the low autonomous processing capabilities of AIGC in related technologies, no effective solutions have yet been proposed.
[0007] Summary of the Invention
[0008] The purpose of this application is to provide a text information processing method that can, to a certain extent, solve the technical problem of how to improve the autonomous processing capability of AIGC technology. This application also provides a text information processing system, device, and non-volatile readable storage medium.
[0009] In order to achieve the above objectives, this application provides the following technical solutions:
[0010] According to a first aspect, a text information processing method is provided, comprising:
[0011] Get the target text information to be processed;
[0012] Perform word segmentation on the target text information to obtain the target words;
[0013] Analyze the content type described by the target text information based on the target words;
[0014] If the content type is static content, a target image corresponding to the target text information is generated based on the text-to-image model;
[0015] If the content type is dynamic content, a target video corresponding to the target text information is generated based on the text-to-video model.
[0016] In an exemplary embodiment, parsing the content type described by the target text information based on the target word includes:
[0017] Predict the probability value of the target word belonging to each known word in the target dictionary;
[0018] Determine the content type described by the target text information based on the target part of speech and probability value of the known words;
[0019] The target part of speech includes known words corresponding to static content or known words corresponding to dynamic content.
[0020] In an exemplary embodiment, determining the content type described by the target text information based on the target part of speech and probability value of the known words includes:
[0021] Adding the probability values of the known words corresponding to the static content to obtain a first probability value;
[0022] Adding the probability values of the known words corresponding to the dynamic content to obtain a second probability value;
[0023] If the first probability value is greater than the second probability value, determining that the content type described by the target text information is static content;
[0024] If the first probability value is less than the second probability value, it is determined that the content type described by the target text information is dynamic content.
[0025] In an exemplary embodiment, determining the content type described by the target text information based on the target part of speech and probability value of the known words includes:
[0026] For each target word, the known word corresponding to the maximum probability value is determined as the selected word of the target word;
[0027] Determining a first quantity value of known words corresponding to the static content in the selected words;
[0028] determining a second quantity value of known words corresponding to the dynamic content in the selected words;
[0029] calculating a difference between the first quantity value and the second quantity value;
[0030] If the difference is greater than a first preset value, determining that the content type described by the target text information is static content;
[0031] If the difference is less than the first preset value, it is determined that the content type described by the target text information is dynamic content.
[0032] In an exemplary embodiment, determining the content type described by the target text information based on the target part of speech and probability value of the known words includes:
[0033] For each target word, the known word corresponding to the maximum probability value is determined as the selected word of the target word;
[0034] determining a second quantity value of known words corresponding to the dynamic content in the selected words;
[0035] If the second quantity value is less than a second preset value, determining that the content type described by the target text information is static content;
[0036] If the second quantity value is greater than the second preset value, it is determined that the content type described by the target text information is dynamic content.
[0037] In an exemplary embodiment, predicting the probability value of the target word belonging to each known word in the target dictionary, and determining the content type described by the target text information based on the target part of speech and the probability value of the known word, includes:
[0038] Input the target words into the pre-trained language neural network model;
[0039] Get the content type output by the language neural network model;
[0040] The language neural network model is used to predict the probability value of the target word belonging to each known word in the target dictionary library, and determine the content type described by the target text information based on the target part of speech and probability value of the known words.
[0041] In one exemplary embodiment, the type of language neural network model comprises a prompt learning model.
[0042] In an exemplary embodiment, obtaining target text information to be processed includes:
[0043] Get the initial text information to be processed;
[0044] Translating the initial text information to obtain translated text information;
[0045] Target text information is obtained based on the translated text information.
[0046] In an exemplary embodiment, obtaining target text information based on translated text information includes:
[0047] The translated text information is expanded to obtain the target text information.
[0048] In an exemplary embodiment, the translation text information is expanded to obtain the target text information, including:
[0049] Extract target keywords from translated text information;
[0050] Select target description words that meet similar conditions with target keywords from the preset content extension description knowledge base;
[0051] Target text information is generated based on the target description and the translated text information.
[0052] In an exemplary embodiment, generating target text information based on the target description and the translated text information includes:
[0053] Selecting a target qualifier corresponding to the target keyword from the preset image quality experience qualifiers;
[0054] Target text information is generated based on the target description, target qualifiers and translation text information.
[0055] In an exemplary embodiment, obtaining target text information to be processed includes:
[0056] Get the initial text information to be processed;
[0057] Splitting the initial text information to obtain split text information;
[0058] The target text information is obtained based on the split text information.
[0059] In an exemplary embodiment, the initial text information is split to obtain split text information, including:
[0060] The initial text information is split into equal lengths based on a natural language processing algorithm to obtain split text information.
[0061] In an exemplary embodiment, obtaining target text information based on the split text information includes:
[0062] For each split text information, generate a total semantic vector of the split text information, generate paragraph semantic vectors for each text paragraph in the split text information, calculate the similarity value between each paragraph semantic vector and the total semantic vector, and determine the text paragraph corresponding to the similarity value with the largest target number of values as the target text paragraph;
[0063] Generate target text information based on the target text paragraph.
[0064] In an exemplary embodiment, calculating the similarity between each paragraph semantic vector and the total semantic vector includes:
[0065] The similarity between the semantic vector of each paragraph and the total semantic vector is calculated based on the cosine similarity method.
[0066] In an exemplary embodiment, generating target text information based on a target text paragraph includes:
[0067] Extract target sentences from target text paragraphs;
[0068] The target sentence is used as the target text information.
[0069] In an exemplary embodiment, generating a total semantic vector of the split text information and generating a paragraph semantic vector of each text paragraph in the split text information includes:
[0070] The Sentence-BERT model is used to generate the total semantic vector of the split text information and the paragraph semantic vector of each text paragraph in the split text information.
[0071] According to a second aspect, a text information processing system is provided, comprising:
[0072] An acquisition module is configured to acquire target text information to be processed;
[0073] The processing module is configured to perform word segmentation processing on the target text information to obtain target words;
[0074] A parsing module configured to parse the content type described by the target text information based on the target word;
[0075] The generation module is configured to generate a target image corresponding to the target text information based on a text-to-image model if the content type is static content; and to generate a target video corresponding to the target text information based on a text-to-video model if the content type is dynamic content.
[0076] According to a third aspect, a text information processing device is provided, comprising:
[0077] a memory arranged to store a computer program;
[0078] The processor is configured to implement the steps of any of the above text information processing methods when executing a computer program.
[0079] According to a fourth aspect, a non-volatile readable storage medium is provided, in which a computer program is stored. The computer program is executed by a processor to implement the steps of any of the above text information processing methods.
[0080] The present application provides a method for processing text information, which includes obtaining target text information to be processed; performing word segmentation processing on the target text information to obtain target words; parsing the content type described by the target text information based on the target words; if the content type is static content, generating a target picture corresponding to the target text information based on a text-to-image model; and generating a target video corresponding to the target text information based on a text-to-video model. In the present application, the content type described by the target text information can be parsed based on the target words obtained by word segmentation of the target text information, and when the content type is static content, a target picture corresponding to the target text information can be generated based on AIGC, and when the content type is dynamic content, a target video corresponding to the target text information can be generated based on AIGC, thereby realizing the automatic application of AIGC to convert the target text information into a corresponding target picture or target video, thereby improving the autonomous processing capability of AIGC for text information. The present application provides a text information processing system, device, and non-volatile readable storage medium that also solve corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0082] FIG1 is a flowchart of a text information processing method provided by an embodiment of the present application;
[0083] FIG2 is another flow chart of a text information processing method provided in an embodiment of the present application;
[0084] FIG3 is another flow chart of a text information processing method provided in an embodiment of the present application;
[0085] FIG4 is a schematic diagram of the process of translating and expanding the initial text information in this application;
[0086] FIG5 is another flow chart of a text information processing method provided in an embodiment of the present application;
[0087] FIG6 is a schematic diagram of the structure of a text information processing system provided in an embodiment of the present application;
[0088] FIG7 is a schematic diagram of the structure of a text information processing device provided in an embodiment of the present application;
[0089] FIG8 is another structural diagram of a text information processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0090] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0091] Please refer to FIG1 , which is a flowchart of a text information processing method provided in an embodiment of the present application.
[0092] A text information processing method provided in an embodiment of the present application may include the following steps:
[0093] Step S101: Obtain target text information to be processed.
[0094] In actual applications, the target text information to be processed can be obtained first. The content and source of the target text information can be determined according to actual needs. For example, the target text information can be scene description information from the user client, real-time hot news from a newspaper, or an abstract from a book, etc. This application does not limit this.
[0095] Step S102: performing word segmentation processing on the target text information to obtain target words.
[0096] In actual applications, after obtaining the target text information to be processed, the target text information can be segmented to obtain the target words in the target text information. In optional application scenarios, the target text information can be segmented through natural language processing technology to obtain target words, etc. This application does not limit this.
[0097] Step S103: parsing the content type described by the target text information based on the target word.
[0098] In actual applications, after the target text information is segmented and the target words are obtained, the content type described by the target text information can be parsed based on the target words, that is, based on the target words, it can be analyzed whether the target text information describes static content or dynamic content, so that the target text information can be processed accordingly based on the content type.
[0099] Step S104: If the content type is static content, a target image corresponding to the target text information is generated based on the text-to-image model.
[0100] In actual applications, after parsing the content type described by the target text information based on the target words, and when the content type is static content, a target image corresponding to the target text information can be generated based on the text-to-image model in AIGC. Optionally, a stable diffusion model, DALL·E2 model, or Imagen model (a text-to-image diffusion model) in AIGC can be applied to generate a target image corresponding to the target text information. This application does not limit this.
[0101] Step S105: If the content type is dynamic content, a target video corresponding to the target text information is generated based on the text-to-video model.
[0102] In actual applications, after parsing the content type described by the target text information based on the target words, and when the content type is dynamic content, the target video corresponding to the target text information can be generated based on the text-to-video model in AIGC. Optionally, the CogVideo model in AIGC (a general-purpose text-to-video generation pre-training model) can be applied to generate the target video corresponding to the target text information. This application does not limit this.
[0103] It should be noted that in optional application scenarios, after generating the target picture or target video corresponding to the target text information based on AIGC, the target picture or target image can also be processed by style transfer, image enhancement, customization, etc., so that the target picture or target video can meet the user's usage needs.
[0104] The present application provides a method for processing text information, which includes obtaining target text information to be processed; performing word segmentation processing on the target text information to obtain target words; parsing the content type described by the target text information based on the target words; if the content type is static content, generating a target image corresponding to the target text information based on a text-to-image model; and generating a target video corresponding to the target text information based on a text-to-video model. In the present application, the content type described by the target text information can be parsed based on the target words obtained by word segmentation of the target text information, and when the content type is static content, a target image corresponding to the target text information can be generated based on AIGC, and when the content type is dynamic content, a target video corresponding to the target text information can be generated based on AIGC. This realizes the automatic application of AIGC to convert the target text information into a corresponding target image or target video, thereby improving AIGC's autonomous processing capability for text information.
[0105] Please refer to FIG. 2 , which is another flow chart of a text information processing method provided in an embodiment of the present application.
[0106] A text information processing method provided in an embodiment of the present application may include the following steps:
[0107] Step S201: Obtain target text information to be processed.
[0108] Step S202: performing word segmentation processing on the target text information to obtain target words.
[0109] Step S203: predicting the probability value of the target word belonging to each known word in the target dictionary;
[0110] Step S204: Determine the content type described by the target text information based on the target part of speech and probability value of the known words; wherein the target part of speech includes the known words corresponding to static content or the known words corresponding to dynamic content.
[0111] In actual applications, in the process of parsing the content type described by the target text information based on the target word, the content type described by the target text information can be parsed with the help of a preset target dictionary library for determining the content type described by the text information. Optionally, the probability value of the target word belonging to each known word in the target dictionary library can be predicted; the content type described by the target text information is determined based on the target part of speech and the probability value of the known word; wherein the target part of speech includes known words corresponding to static content or known words corresponding to dynamic content.
[0112] In an optional application scenario, in the process of determining the content type described by the target text information based on the target part of speech and probability value of known words, the content type described by the target text information can be evaluated as a whole based on the calculated probability value, that is, the probability values of the known words corresponding to the static content can be added to obtain a first probability value; the probability values of the known words corresponding to the dynamic content can be added to obtain a second probability value; if the first probability value is greater than the second probability value, the content type described by the target text information is determined to be static content; if the first probability value is less than the second probability value, the content type described by the target text information is determined to be dynamic content.
[0113] In an optional application scenario, in the process of determining the content type described by the target text information based on the target part of speech and probability value of the known words, the content type described by the text information can be evaluated only based on the corresponding words of the target words in the target dictionary library, that is, for each target word, the known word corresponding to the probability value with the largest value can be determined as the selected word of the target word; determine the first quantity value of the known words corresponding to the static content in the selected words; determine the second quantity value of the known words corresponding to the dynamic content in the selected words; calculate the difference between the first quantity value and the second quantity value; if the difference is greater than the first preset value, determine that the content type described by the target text information is static content; if the difference is less than the first preset value, determine that the content type described by the target text information is dynamic content. It should be noted that the numerical value of the first preset value can be determined according to the corresponding application scenario, and this application does not limit it here.
[0114] In an optional application scenario, in the process of determining the type of content described by the target text information based on the target part of speech and probability value of known words, when the number of words describing dynamic content contained in the target text information reaches a set value, it can be considered that the target text information describes dynamic content, that is, for each target word, the known word corresponding to the probability value with the largest value can be determined as the selected word of the target word; determine the second quantity value of the known words corresponding to the dynamic content in the selected words; if the second quantity value is less than the second preset value, determine that the type of content described by the target text information is static content; if the second quantity value is greater than the second preset value, determine that the type of content described by the target text information is dynamic content. It should be noted that the numerical value of the second preset value can be determined according to the corresponding application scenario, and this application does not limit it here.
[0115] In an optional application scenario, in the process of predicting the probability value of the target word belonging to each known word in the target dictionary library and determining the content type described by the target text information based on the target part of speech and probability value of the known words, a neural network model can be used to quickly predict the content type, that is, the target word is input into a pre-trained language neural network model; and the content type output by the language neural network model is obtained; wherein the language neural network model is used to: predict the probability value of the target word belonging to each known word in the target dictionary library, and determine the content type described by the target text information based on the target part of speech and probability value of the known words. It should be noted that the type of the language neural network model can be determined according to the corresponding application scenario. For example, the language neural network model can include a prompt learning model, and the prompt learning model can include an input layer, a multi-head self-attention layer connected to the input layer, a first additive normalization layer connected to the input layer and the multi-head self-attention layer, a forward network connected to the first additive normalization layer, a second additive normalization layer connected to the forward network and the first additive normalization layer, an output connected to the second additive normalization layer, etc. This application does not limit the architecture of the prompt learning model.
[0116] It should be noted that the content of the target dictionary library can be determined according to actual needs. For example, the words corresponding to the static content in the target dictionary library may include apple, fruit, mountain, scenery, animal, hotel, rabbit, kitten, rocket, puppy, house, building, water cup, starry sky, food, moon, sun, mountains and rivers, etc. The words corresponding to the dynamic content in the target dictionary library may include weaving, writing, running, investment, long jump, event, sports, attack, fly, fall, skiing, throwing, sword drawing, practice, occurrence, competition, punishment, blow up, reading, browsing, gesturing, clicking, galloping, jumping, modifying, rising, falling, sitting down, etc.
[0117] Step S205: If the content type is static content, a target image corresponding to the target text information is generated based on the text-to-image model.
[0118] Step S206: If the content type is dynamic content, a target video corresponding to the target text information is generated based on the text-to-video model.
[0119] Please refer to FIG3 , which is another flow chart of a text information processing method provided in an embodiment of the present application.
[0120] A text information processing method provided in an embodiment of the present application may include the following steps:
[0121] Step S301: Acquire initial text information to be processed.
[0122] Step S302: Translate the initial text information to obtain translated text information.
[0123] Step S303: Obtain target text information based on the translated text information.
[0124] In actual applications, due to the diversity of languages, text information has multiple language versions. To enable AIGC to process text information in different languages, in the process of obtaining target text information, it is possible to obtain initial text information to be processed; translate the initial text information to obtain translated text information, such as obtaining translated text information in Chinese; and obtain target text information based on the translated text information. It should be noted that the method for translating the initial text information can be determined according to actual needs. For example, the initial text information can be translated using a Transformer-based neural machine translation model to obtain translated text information.
[0125] In an optional application scenario, considering that the content of the initial text information to be processed is relatively simple, for example, the content of the initial text information is "a horse in armor", if a picture or video is generated based solely on this content, the content is simple and cannot meet user needs. In order to solve this problem, this application can expand the translated text information in the process of obtaining the target text information based on the translated text information to obtain the target text information. This process can be shown in Figure 4. Optionally, the target keywords in the translated text information can be extracted; the target descriptive terms that meet the similarity conditions with the target keywords are selected from the preset content extension description knowledge base; the target text information is generated based on the target description terms and the translated text information, and in the process of generating the target text information based on the target description terms and the translated text information, the target qualifiers corresponding to the target keywords can be selected from the preset image quality experience qualifiers. The target qualifiers can include 4k, 8k, comic style, realism, impressionism, Van Gogh's creation, etc.; the target text information is generated based on the target description terms, target qualifiers and translated text information. After being processed by this application, the initial text information with the content of "armored horse" can be expanded to the target text information with the content of "anthropomorphic majestic horse knight, portrait, exquisite armor, movie lighting, complex wire design, 4k, 8k, Unreal Engine, octane rendering", etc.; for example, the content of the initial text information is "a glowing purple lotus", then after being processed by the solution of this application, the content of the target text information can be "transparent high-definition CG, light purple and fiery purple lotus, lightning, lighting effects, 8K, ultra-high definition, Blizzard-style art trends, luminous fog and luminous light, volume light volumetric light - ar9:166", etc., and this application does not limit this.
[0126] Step S304: performing word segmentation processing on the target text information to obtain target words.
[0127] Step S305: parsing the content type described by the target text information based on the target word.
[0128] Step S306: If the content type is static content, a target image corresponding to the target text information is generated based on the text-to-image model.
[0129] Step S307: If the content type is dynamic content, a target video corresponding to the target text information is generated based on the text-to-video model.
[0130] Please refer to FIG. 5 , which is another flow chart of a text information processing method provided in an embodiment of the present application.
[0131] A text information processing method provided in an embodiment of the present application may include the following steps:
[0132] Step S401: Acquire initial text information to be processed.
[0133] Step S402: Split the initial text information to obtain split text information.
[0134] Step S403: Obtain target text information based on the split text information.
[0135] In actual applications, in the process of obtaining the target text information to be processed, considering that the content of the initial text information obtained is relatively large, and AIGC can only generate a picture of one frame or a video of several frames, that is, AIGC has weak processing capabilities for large text information. In order to solve this problem, after obtaining the initial text information to be processed, the initial text information can be automatically split to obtain split text information; and then the target text information is obtained based on the split text information.
[0136] In an optional application scenario, in the process of splitting the initial text information to obtain split text information, the initial text information can be split into equal lengths based on a natural language processing algorithm to obtain split text information. Of course, there may also be other splitting methods, such as splitting based on content continuity, etc. This application does not limit this.
[0137] In an optional application scenario, in the process of obtaining target text information based on split text information, for each split text information, a total semantic vector of the split text information can be generated, a paragraph semantic vector of each text paragraph in the split text information can be generated, the similarity value of each paragraph semantic vector and the total semantic vector is calculated, and the text paragraph corresponding to the similarity value with the largest target number of values is determined as the target text paragraph, so as to screen out the text paragraph that describes the core content of the split text information; and generate target text information based on all target text paragraphs.
[0138] In an optional application scenario, in the process of calculating the similarity value between each paragraph semantic vector and the total semantic vector, the similarity value between each paragraph semantic vector and the total semantic vector can be quickly calculated based on the cosine similarity method, etc. This application does not limit this.
[0139] In an optional application scenario, in the process of generating target text information based on a target text paragraph, the core sentence in the target text paragraph can be extracted as the target sentence, for example, the target text paragraph is extracted according to preset rules to obtain the target sentence; the target sentence is used as the target text information, so as to use the target sentence to simply and accurately describe the core content of the initial text information.
[0140] In optional application scenarios, in the process of generating the total semantic vector of the split text information and generating the paragraph semantic vectors of each text paragraph in the split text information, the Sentence-BERT (Bidirectional Encoder Representations from Transformer) model can be used to quickly generate the total semantic vector of the split text information and generate the paragraph semantic vectors of each text paragraph in the split text information.
[0141] Step S404: performing word segmentation processing on the target text information to obtain target words.
[0142] Step S405: parsing the content type described by the target text information based on the target word.
[0143] Step S406: If the content type is static content, a target image corresponding to the target text information is generated based on the text-to-image model.
[0144] Step S407: If the content type is dynamic content, a target video corresponding to the target text information is generated based on the text-to-video model.
[0145] It should be noted that in optional application scenarios, after obtaining the initial text information to be processed, it may be necessary to translate, expand, and split the initial text information to obtain the target text information. That is, the methods described in the embodiments of this application can be combined according to application requirements to obtain a text information processing method that meets user needs. This application does not limit its process here.
[0146] Please refer to FIG6 , which is a schematic diagram of the structure of a text information processing system provided in an embodiment of the present application.
[0147] An embodiment of the present application provides a text information processing system, which may include:
[0148] An acquisition module 101 is configured to acquire target text information to be processed;
[0149] The processing module 102 is configured to perform word segmentation processing on the target text information to obtain target words;
[0150] The parsing module 103 is configured to parse the content type described by the target text information based on the target word;
[0151] The generation module 104 is configured to generate a target image corresponding to the target text information based on a text-to-image model if the content type is static content; and to generate a target video corresponding to the target text information based on a text-to-video model if the content type is dynamic content.
[0152] In an embodiment of the present application, a text information processing system is provided, wherein the parsing module may include:
[0153] A prediction unit is configured to predict the probability value of the target word belonging to each known word in the target dictionary;
[0154] A determination unit is configured to determine a content type described by the target text information based on a target part of speech and a probability value of a known word;
[0155] The target part of speech includes known words corresponding to static content or known words corresponding to dynamic content.
[0156] In a text information processing system provided by an embodiment of the present application, a determination unit can be configured to: add the probability values of known words corresponding to static content to obtain a first probability value; add the probability values of known words corresponding to dynamic content to obtain a second probability value; if the first probability value is greater than the second probability value, determine that the content type described by the target text information is static content; if the first probability value is less than the second probability value, determine that the content type described by the target text information is dynamic content.
[0157] An embodiment of the present application provides a text information processing system, in which a determination unit can be configured to: for each target word, determine the known word corresponding to the largest probability value as the selected word of the target word; determine a first quantity value of the known words corresponding to static content in the selected words; determine a second quantity value of the known words corresponding to dynamic content in the selected words; calculate the difference between the first quantity value and the second quantity value; if the difference is greater than a first preset value, determine that the content type described by the target text information is static content; if the difference is less than the first preset value, determine that the content type described by the target text information is dynamic content.
[0158] In a text information processing system provided by an embodiment of the present application, a determination unit can be configured to: for each target word, determine the known word corresponding to the largest probability value as the selected word of the target word; determine a second quantity value of the known words corresponding to dynamic content in the selected words; if the second quantity value is less than a second preset value, determine that the content type described by the target text information is static content; if the second quantity value is greater than the second preset value, determine that the content type described by the target text information is dynamic content.
[0159] In a text information processing system provided by an embodiment of the present application, a parsing module can be configured to: input a target word into a pre-trained language neural network model; obtain the content type output by the language neural network model; wherein the language neural network model is used to: predict the probability value of the target word belonging to each known word in a target dictionary library, and determine the content type described by the target text information based on the target part of speech and probability value of the known word.
[0160] An embodiment of the present application provides a text information processing system, wherein the type of language neural network model includes a prompt learning model.
[0161] In an embodiment of the present application, a text information processing system is provided, wherein the acquisition module may include:
[0162] A first acquiring unit is configured to acquire initial text information to be processed;
[0163] A translation unit is configured to translate the initial text information to obtain translated text information;
[0164] The first processing unit is configured to obtain target text information based on the translated text information.
[0165] In a text information processing system provided by an embodiment of the present application, the first processing unit may be configured to expand the translated text information to obtain target text information.
[0166] In a text information processing system provided by an embodiment of the present application, the first processing unit can be configured to: extract target keywords from translated text information; select target descriptive terms that meet similarity conditions with the target keywords from a preset content extension description knowledge base; and generate target text information based on the target descriptive terms and the translated text information.
[0167] In a text information processing system provided by an embodiment of the present application, the first processing unit can be configured to: select a target qualifier corresponding to a target keyword from preset image quality experience qualifiers; and generate target text information based on the target description, target qualifier and translated text information.
[0168] In an embodiment of the present application, a text information processing system is provided, wherein the acquisition module may include:
[0169] A second acquiring unit is configured to acquire initial text information to be processed;
[0170] The splitting unit is configured to split the initial text information to obtain split text information;
[0171] The second processing unit is configured to obtain target text information based on the split text information.
[0172] In a text information processing system provided by an embodiment of the present application, the splitting unit can be configured to: split the initial text information into equal lengths based on a natural language processing algorithm to obtain split text information.
[0173] In a text information processing system provided by an embodiment of the present application, the second processing unit can be configured to: generate a total semantic vector of the split text information for each split text information, generate paragraph semantic vectors for each text paragraph in the split text information, calculate the similarity value between each paragraph semantic vector and the total semantic vector, and determine the text paragraph corresponding to the similarity value with the largest target number of values as the target text paragraph; and generate target text information based on the target text paragraph.
[0174] In a text information processing system provided by an embodiment of the present application, the second processing unit may be configured to calculate a similarity value between the semantic vector of each paragraph and the total semantic vector based on a cosine similarity method.
[0175] In a text information processing system provided by an embodiment of the present application, the second processing unit may be configured to: extract a target sentence from a target text paragraph; and use the target sentence as target text information.
[0176] In a text information processing system provided by an embodiment of the present application, the second processing unit can be configured to: generate a total semantic vector of the split text information through a Sentence-BERT model, and generate paragraph semantic vectors for each text paragraph in the split text information.
[0177] The present application also provides a text information processing device and a non-volatile readable storage medium, both of which have the corresponding effects of the text information processing method provided in the embodiment of the present application. Please refer to Figure 7, which is a structural diagram of a text information processing device provided in the embodiment of the present application.
[0178] An embodiment of the present application provides a text information processing device, including a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, the steps of the text information processing method described in any of the above embodiments are implemented.
[0179] Referring to FIG8 , another text information processing device provided in an embodiment of the present application may further include: an input port 203 connected to the processor 202, configured to transmit commands inputted from the outside to the processor 202; a display unit 204 connected to the processor 202, configured to display the processing results of the processor 202 to the outside world; and a communication module 205 connected to the processor 202, configured to enable communication between the text information processing device and the outside world. The display unit 204 may be a display panel, a laser scanning display, or the like; the communication methods used by the communication module 205 include, but are not limited to, mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless connection: wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.
[0180] An embodiment of the present application provides a non-volatile readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the text information processing method described in any of the above embodiments are implemented.
[0181] The non-volatile readable storage medium involved in this application includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of non-volatile readable storage medium known in the technical field.
[0182] For descriptions of the relevant portions of the text information processing system, device, and non-volatile readable storage medium provided in the embodiments of this application, please refer to the detailed descriptions of the corresponding portions of the text information processing method provided in the embodiments of this application, and will not be repeated here. In addition, portions of the above-mentioned technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the related art are not described in detail to avoid excessive elaboration.
[0183] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0184] The above description of the disclosed embodiments will enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A text information processing method, characterized in that: include: Obtain the target text information to be processed; Performing word segmentation processing on the target text information to obtain target words; parsing the content type described by the target text information based on the target word; If the content type is static content, generating a target image corresponding to the target text information based on a text-to-image model; If the content type is dynamic content, a target video corresponding to the target text information is generated based on a text-to-video model.
2. The text information processing method according to claim 1, characterized in that: The step of parsing the content type described by the target text information based on the target word includes: Predicting the probability value of the target word belonging to each known word in the target dictionary library; Determining the content type described by the target text information based on the target part of speech of the known words and the probability value; The target part of speech includes the known words corresponding to the static content or the known words corresponding to the dynamic content.
3. The text information processing method according to claim 2, characterized in that: The determining the content type described by the target text information based on the target part of speech of the known words and the probability value includes: Adding the probability values of the known words corresponding to the static content to obtain a first probability value; Adding the probability values of the known words corresponding to the dynamic content to obtain a second probability value; If the first probability value is greater than the second probability value, determining that the content type described by the target text information is the static content; If the first probability value is less than the second probability value, it is determined that the content type described by the target text information is the dynamic content.
4. The text information processing method according to claim 2, characterized in that: The determining the content type described by the target text information based on the target part of speech of the known words and the probability value includes: For each of the target words, determining the known word corresponding to the probability value with the largest value as the selected word of the target word; Determine a first quantity value of the known words corresponding to the static content in the selected words; Determine a second quantity value of the known words in the selected words that belong to the dynamic content; Calculating a difference between the first quantity value and the second quantity value; If the difference is greater than a first preset value, determining that the content type described by the target text information is the static content; If the difference is less than the first preset value, it is determined that the content type described by the target text information is the dynamic content.
5. The text information processing method according to claim 2, characterized in that: The determining the content type described by the target text information based on the target part of speech of the known words and the probability value includes: For each of the target words, determining the known word corresponding to the probability value with the largest value as the selected word of the target word; Determine a second quantity value of the known words in the selected words that belong to the dynamic content; If the second quantity value is less than a second preset value, determining that the content type described by the target text information is the static content; If the second quantity value is greater than the second preset value, it is determined that the content type described by the target text information is the dynamic content.
6. The text information processing method according to claim 2, characterized in that: The predicting the probability value of the target word belonging to each known word in the target dictionary library, and determining the content type described by the target text information based on the target part of speech of the known words and the probability value, includes: Inputting the target word into a pre-trained language neural network model; Obtaining the content type output by the language neural network model; The language neural network model is used to predict the probability value of the target word belonging to each of the known words in the target dictionary library, and determine the content type described by the target text information based on the target part of speech of the known words and the probability value.
7. The text information processing method according to claim 6, characterized in that: The types of language neural network models include prompt learning models.
8. The text information processing method according to claim 1, characterized in that: The step of obtaining the target text information to be processed includes: Get the initial text information to be processed; Translating the initial text information to obtain translated text information; The target text information is obtained based on the translated text information.
9. The text information processing method according to claim 8, characterized in that: The obtaining the target text information based on the translated text information includes: The translated text information is expanded to obtain the target text information.
10. The text information processing method according to claim 9, characterized in that: The step of expanding the translated text information to obtain the target text information includes: Extracting target keywords from the translated text information; Selecting a target description word that meets similar conditions with the target keyword from a preset content extension description knowledge base; The target text information is generated based on the target description and the translated text information.
11. The text information processing method according to claim 10, characterized in that: The generating the target text information based on the target description and the translated text information includes: Selecting a target qualifier corresponding to the target keyword from the preset image quality experience qualifiers; The target text information is generated based on the target descriptor, the target qualifier and the translated text information.
12. The text information processing method according to any one of claims 1 to 11, characterized in that: The step of obtaining the target text information to be processed includes: Get the initial text information to be processed; Splitting the initial text information to obtain split text information; The target text information is obtained based on the split text information.
13. The text information processing method according to claim 12, characterized in that: The step of splitting the initial text information to obtain split text information includes: The initial text information is split into equal lengths based on a natural language processing algorithm to obtain the split text information.
14. The text information processing method according to claim 12, characterized in that: The obtaining the target text information based on the split text information includes: For each of the split text information, a total semantic vector of the split text information is generated, a paragraph semantic vector of each text paragraph in the split text information is generated, a similarity value between each of the paragraph semantic vectors and the total semantic vector is calculated, and the text paragraph corresponding to the similarity value with the largest target number of values is determined as the target text paragraph; The target text information is generated based on the target text paragraph.
15. The text information processing method according to claim 14, characterized in that: The calculating the similarity value between each of the paragraph semantic vectors and the total semantic vector comprises: The similarity value between each of the paragraph semantic vectors and the total semantic vector is calculated based on the cosine similarity method.
16. The text information processing method according to claim 14, characterized in that: The generating the target text information based on the target text paragraph includes: Extracting a target sentence from the target text paragraph; The target sentence is used as the target text information.
17. The text information processing method according to claim 14, characterized in that: The generating of the total semantic vector of the split text information and the generating of the paragraph semantic vectors of each text paragraph in the split text information comprises: The total semantic vector of the split text information is generated through the Sentence-BERT model, and the paragraph semantic vector of each of the text paragraphs in the split text information is generated.
18. A text information processing system, characterized in that: include: An acquisition module is configured to acquire target text information to be processed; A processing module is configured to perform word segmentation processing on the target text information to obtain target words; A parsing module, configured to parse the content type described by the target text information based on the target word; The generation module is configured to generate a target image corresponding to the target text information based on a text-to-image model if the content type is static content; and to generate a target video corresponding to the target text information based on a text-to-video model if the content type is dynamic content.
19. A text information processing device, characterized in that: include: a memory arranged to store a computer program; A processor is configured to implement the steps of the text information processing method according to any one of claims 1 to 17 when executing the computer program.
20. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the text information processing method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Video generation method and device, storage medium and electronic equipment
CN112015949A
Comment video generation method and device
CN114938473A
Video generation method and device, electronic equipment and medium
CN115186133A
Text information processing method, system and equipment and computer storage medium
CN115994536A
Cited By
Civil track analysis method and system based on hybrid vector retrieval enhancement
CN119378690A
Content creation and multi-mode display platform based on AIGC
CN119538924A
Intelligent MV generation method, system and device based on AIGC and medium
CN119788886A
