Media data generation method and device, electronic equipment, storage medium and program product
By receiving the first media data containing the intended presentation of the target media data, determining the second media data, and generating the target media data based on the second media data using the media data generation model, the problem of poor control of text data length in the prior art is solved, and efficient media data generation is achieved.
Patent Information
- Application Number
- CN202510147557.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, when generating text data through pre-trained machine learning models, there is a lack of precise control over the length of text data, resulting in the generated text data not meeting expectations, increasing the workload of subsequent modification and adjustment, and reducing the efficiency of media data generation.
By receiving the first media data containing the intended presentation of the target media data, the second media data is determined, and the target media data is generated based on the second media data using the media data generation model. The second media data includes second data description information for the target media data, and includes at least second length description information corresponding to the first length description information to provide richer and more accurate length information.
It realizes precise control of the generated text data length, meets the differentiated media data generation needs, improves the generation effect of media data generation models, and reduces the workload of subsequent modifications and adjustments.
Smart Images

Figure CN120068813A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer processing technologies, and in particular, to a method, apparatus, electronic device, storage medium, and program product for generating media data. Background Art
[0002] With the development of the Internet, digital content production has received increasing attention. In many practical application scenarios, such as student compositions, news reports, advertising copywriting, etc., there are often strict requirements on the length of text data. These requirements may be considered based on various factors such as typesetting, reading experience, information transmission efficiency, etc. Therefore, a solution is needed to ensure that the generated text data can meet these specific length requirements.
[0003] In related technologies, machine learning models pre-trained are used to generate text data, but these models lack precise control over the length of the text data, resulting in the generated text data not meeting expectations. This will increase the workload of subsequent modification and adjustment and reduce the generation efficiency of media data. Summary of the Invention
[0004] The present disclosure provides a method, apparatus, electronic device, storage medium, and program product for generating media data to solve the technical problem that the presentation effect of the text data generated by the model does not meet expectations.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating media data, the method including:
[0006] Receiving first media data; wherein, the first media data includes first data description information of target media data to be presented as expected; the target media data includes text data; the first data description information includes content description information of the text data and first length description information;
[0007] Determining second media data according to the first media data, generating the target media data according to the second media data and a media data generation model, and displaying the target media data; wherein, the second media data includes second data description information of the target media data; the second data description information at least includes second length description information corresponding to the first length description information.
[0008] In a second aspect, an embodiment of the present disclosure further provides a device for generating media data, the device including:
[0009] A media data receiving module, configured to receive first media data; wherein, the first media data includes first data description information of target media data to be presented; the target media data includes text data; and the first data description information includes content description information of the text data and first length description information.
[0010] A media data generating module, configured to determine second media data according to the first media data, generate the target media data according to the second media data and a media data generation model, and display the target media data; wherein, the second media data includes second data description information of the target media data; and the second data description information at least includes second length description information corresponding to the first length description information.
[0011] In a third aspect, an embodiment of the present disclosure further provides an electronic device, which includes:
[0012] One or more processors;
[0013] A storage device, configured to store one or more programs,
[0014] When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for generating media data according to any one of the embodiments of the present disclosure.
[0015] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the method for generating media data according to any one of the embodiments of the present disclosure when executed by a computer processor.
[0016] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, and the computer program implements the method for generating media data according to any one of the embodiments of the present disclosure when executed by a processor.
[0017] The technical solution of the embodiment of the present disclosure can flexibly set the first media data by receiving the first media data. Since the first media data includes the first data description information of the target media data to be presented, and the target media data includes text data, the first data description information specifically further includes the content description information and the first length description information of the text data, which can clearly describe the length information of the text data in the generated target media data to meet the differentiated media data generation requirements. By determining the second media data according to the first media data, since the second media data includes the second data description information of the target media data and can be generated according to the first media data, and at least the second length description information corresponding to the first length description information is included in the second data description information, the second data description information can be automatically generated to further describe the first length description information through the second length description information. Furthermore, by generating the target media data according to the second media data and the media data generation model and displaying the target media data, the second media data can provide more abundant and accurate length information hints for the media generation model, so that the text data in the determined second media data presents the expected length, and the generation effect of the media data generation model on the media data is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.
[0019] Figure 1 It is a schematic flowchart of a method for generating media data provided by an embodiment of the present disclosure;
[0020] Figure 2 It is a schematic diagram of an interactive interface that can receive the first media data for the method for generating media data provided by an embodiment of the present disclosure;
[0021] Figure 3 It is a schematic diagram of the styles of the first media data and the second media data for the method for generating media data provided by an embodiment of the present disclosure;
[0022] Figure 4 It is a schematic flowchart of another method for generating media data provided by an embodiment of the present disclosure;
[0023] Figure 5 It is a schematic flowchart of an optional example of the method for generating media data provided by an embodiment of the present disclosure;
[0024] Figure 6 A structural schematic diagram of a media data generation device provided by an embodiment of the present disclosure;
[0025] Figure 7 A structural schematic diagram of an electronic device for implementing an embodiment of the present disclosure provided by an embodiment of the present disclosure. Specific embodiments
[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0027] It should be understood that the various steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0028] The terms "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions executed by these devices, modules or units or their interdependent relationships.
[0030] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0033] For example, when a user's active request is received, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the present disclosure's technical solution based on the prompt message.
[0034] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving the user's active request may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0035] It can be understood that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation manner of the present disclosure. Other manners that comply with relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0036] It can be understood that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.
[0037] Figure 1 It is a schematic flowchart of a method for generating media data provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to scenarios where media data of an expected length needs to be generated. This method can be executed by a media data generation device, and the device can be implemented in the form of software and / or hardware. Optionally, it is implemented by an electronic device, and the electronic device can be a mobile terminal, a PC terminal or a server, etc. As Figure 1 shown, the method of this embodiment may specifically include:
[0038] S110. Receive first media data; wherein, the first media data includes first data description information of target media data to be presented as expected; the target media data includes text data; the first data description information includes content description information of the text data and first length description information.
[0039] In the embodiments of the present disclosure, the media data may include, but is not limited to, at least one of data types such as text data, image data, audio data, video data, animation data, and interactive data. The first media data may be understood as the media data on which the target media data depends for generation. The target media data may be understood as the media data expected to be generated and the finally presented media data. The target media data may include, but is not limited to, text data, and may also include, for example, at least one of the aforementioned image data, audio data, video data, and animation data. Exemplarily, the first media data may include first image data (or pictures) and first text data, and the target media data may include one or more second image data obtained by processing the first image data and second text data.
[0040] The first data description information may be understood as the information for describing the target media data expected to be presented. The first data description information at least includes the content description information of the text data and the first length description information. Among them, the content description information may be configured as the information for describing the content described by the text data. For example, it may include at least one of information such as the theme of the content, the background associated with the content, and the details closely related to the text content. Exemplarily, the details closely related to the text content may include at least one of information such as the author information, creation time, and text type (such as news report, academic paper, novel, etc.) closely related to the text content. The first length description information may be understood as the information in the first data description information for describing the expected presentation length of the text data. Specifically, the first length description information includes the description information of the first expected length of the text data included in the second media data. Optionally, the first data description information further includes the description information of the data type included in the media data and / or the description information of the presentation style of the text data, etc.
[0041] As an optional implementation manner of the embodiments of the present disclosure, the receiving the first media data includes: receiving a media data input operation and obtaining the first media data. Specifically, receiving the media data input operation may include: displaying a target interface and receiving a media input operation through the target interface. Optionally, the target interface includes a media data editing control for inputting the first media data. Exemplarily, the media data editing control may include a selection-type control and / or an input-type control (writing control), etc. On this basis, the receiving the media input operation through the target interface may include: receiving the media data input operation through the data input control in the target interface and obtaining the first media data according to the data input operation. In short, the first media data may be the media data custom-input by the user.
[0042] It should be noted that in the embodiments of the present disclosure, the first media data can be obtained through one or more data input operations or data setting operations. Specifically, the first media data can be obtained through the editing operations of one or more media data editing controls displayed in the target interface. Different media data editing controls can be used to edit different types and / or different contents of media data.
[0043] Taking the composition generation scenario as an example, as Figure 2 shown, the target interface can be displayed, and then the first media data can be obtained through the interaction operations in the target interface. Exemplarily, the target interface may include a data input box for inputting composition requirements. The user can input the requirement data for the expected generated composition data in this data input box. The composition requirement data may include at least one of text data, image data, and voice data. Specifically, a "take photo" control and a "voice" control can be displayed in the data input box. The "take photo" control can be used to take pictures and / or upload images. The "voice" control can be used to record voice data. Further, the target interface may further include a "word count" setting control for setting the number of words included in the expected generated composition, such as 300 - 400 words. The target interface may also include a "style" setting control for setting the style of the expected generated composition, such as, it may include at least one of styles such as narrative, argumentative, prose, novel, poetry, drama, and practical writing. At this time, the first media data includes the data set through the data input box, the "take photo" control, the "voice" control, the "word count" setting control, and the "style" setting control displayed in the data input box. In addition, the target interface may further include a "writing idea" control and a "writing sample" control for setting whether the specific type of the composition is a writing idea or a writing sample.
[0044] S120. Determine the second media data according to the first media data, generate the target media data according to the second media data and the media data generation model, and display the target media data; wherein, the second media data includes the second data description information of the target media data; at least the second length description information corresponding to the first length description information is included in the second data description information.
[0045] In the embodiments of the present disclosure, the second media data is different from the first media data and is the second media data generated based on the first media data. The second media data at least includes the second length description information corresponding to the text data of the target media data. The media data generation model can be a machine learning model that can be pre-trained to generate new media data according to the input media data. The media data generation model can be obtained by training a pre-established machine learning model based on the first sample media data and the expected media data corresponding to the first sample media data.
[0046] In the embodiments of the present disclosure, as described above, the first length description information includes description information of the first expected length of the text data included in the target media data, and the second length description information includes description information of the second expected length corresponding to the first expected length; the second expected length is greater than the first expected length. For example, the target media data includes "generate a composition of 300-400 words", that is, the first length description information, and the first expected length is 300-400 words. At this time, the second expected length included in the second length description information may be 350-450 words.
[0047] In an alternative embodiment of the embodiments of the present disclosure, the second length description information may include description information of adding length marking information to the text data included in the target media data. That is, the second length description information is used to describe how to add length marking information to the text part of the target media data. Among them, the length marking information can be understood as information for marking the length of the text data generated by the media data generation model, or in other words, information for marking the length of the text data output by the media data generation model. The length of the text data can be determined by the number of preset characters included in the text data, or by the number of structural parts such as paragraphs or chapters included in the text data. Specifically, marks can be added to the text data output by the media data generation model to facilitate the statistics of the total length of the text data output by the media data generation model. Exemplarily, the characters in the text data output by the media data generation model can be numbered. To facilitate the distinction between the text data output by the media data generation model and the length marking information, the presentation mode of the length marking information can be set differently from the presentation mode of the characters in the text data. Exemplarily, the length marking information can be a combination of one or more preset symbols and numbers. For example, the length marking information can be {n} or {$*n*$}, etc. By adopting this technical solution, the media data generation model can effectively perceive the length of the text data in the media data it generates, so that the text data output by the media data generation model meets the expected length requirements.
[0048] In some embodiments, the second length description information may specifically include description information of the information addition method for adding length marking information to the text data included in the target media data. That is, it is used to describe how to actually add the length marking information to the text data. For example, at which positions in the text data to insert what kind of marks. By adopting this technical solution, the media data generation model can be prompted to add standardized length marking information to the text data according to a unified rule, so as to remove the length marking information in the text data in a relatively general way subsequently.
[0049] In some embodiments, the second length description information may further include description information about the expected attribute value of the length marking information to be presented. Among them, the expected attribute value may be the length marking value to be presented. Exemplarily, the expected attribute value may be an attribute value that restricts the maximum value and / or minimum value of the length of the text data. For example, the last length marking information in the text data is not less than a preset value. For example, the second length description information may be "the number in the parentheses after the last character is x+". By adopting this technical solution, the length of the text data generated by the media data generation model can be restricted within the expected length range, making the length of the text data more in line with expectations.
[0050] In other embodiments, the second length description information further includes example information of the preset media data with the length marking information added, that is, it includes a piece of media data with length marking information. By adopting this technical solution, it is possible to describe more clearly and accurately how to add length marking information to the text data, making it easier for the media data generation model to understand the way of adding length marking information to the text data, so that the length marking information added to the text data is more in line with expectations. For example, it can be the example information of the preset media data with the length marking information added: "I {1} love {2} my {3} motherland {4}, the motherland {5} is {6} the {7} most {8} sacred {9} word {10} in {11} my {12} heart {13}, it {14} bears {15} the {16} weight {17} of {18} history {19}..."
[0051] As an alternative technical solution of the embodiments of the present disclosure, determining the second media data according to the first media data may include: generating the second media data according to the first length description information and a preset description data template. Among them, the description data template is a template preset for the description information including the first length description information. The description data template may include preset fixed fields and editable fields, and can be replaced or filled according to specific description information. Specifically, the editable field is a preset field that can be replaced with a field generated according to the first length description information. The description data template is configured as predefined structured data for specifying the description method of the second media data and the presentation method of the description content. The description data template includes preset description information for prompting the media data generation model to pay attention to the text length. By adopting this technical solution, the second media data can be generated simply and quickly, and the second media data can be associated with the first length description information to improve the presentation effect of the generated target media data in terms of text length.
[0052] Optionally, generating second media data according to the first length description information and a preset description data template includes: adding at least part of the content in the first length description information to the preset description data template to obtain the second media data; or, replacing the preset content (part of the content in the description data template) in the preset description data template with at least part of the content in the first length description information to obtain the second media data. Exemplarily, when the first length description information includes the description information of the first expected length of the text data included in the second media data, generating the second media data according to the first length description information and the preset description data template includes: adding the first expected length to the preset description data template to obtain the second media data; or, adding the first expected length after increasing it by a preset value to the preset description data template to obtain the second media data. By adopting this technical solution, the second media data can be generated simply, quickly and conveniently, the generation efficiency of the second media data is improved, and further the generation efficiency of the target media data is enhanced.
[0053] Specifically, the first length description information can be parsed to obtain a first field corresponding to the first length description information. Further, the first field can be filled in a preset position in the description data template, or the second field in the description data template can be replaced. This ensures that the information in the template is up-to-date, accurate, and consistent with the first length description information. Specific preset description information is added to the description data template to prompt the media data generation model to pay attention to the text length when generating data. This can be a simple text marker, annotation, or instruction for indicating that the model should consider length limitations or perform length adjustment when processing the text. Further, the filled and modified description data template can be used as an input to call the media data generation model to generate the target media data. During the generation process of the target media data, the media data generation model will follow the instructions and description information in the description data template, especially those regarding the text length, to ensure that the generated media data meets the expected format and length requirements.
[0054] Continuing with the composition generation scenario in the previous example, such as Figure 3As shown, the first media data can be "Write a short composition for me with the title <****>, and the number of words must be around 200". The description data template can specifically be: "1. Use {n} after each word in the generated content to indicate which word it is; 2. Example: I{1} love{2} my{3} motherland{4}, motherland{5} is{6} the{7} most{8} sacred{9} word{10} in{11} my{12} heart{13}, it{14} bears{15} the{16} weight{17} of{18} history{19}...; 3. Note, the number of words in the article must be around X, that is, the number in the parentheses after the last word is X+;...". At this time, the first length description information is "the number of words must be around 200". Extract the key information "200" from the first length information and add it to the description data template to obtain the second length description information, that is, "1. Use {n} after each word in the generated content to indicate which word it is; 2. Example: I{1} love{2} my{3} motherland{4}, motherland{5} is{6} the{7} most{8} sacred{9} word{10} in{11} my{12} heart{13}, it{14} bears{15} the{16} weight{17} of{18} history{19}...; 3. Note, the number of words in the article must be around 200, that is, the number in the parentheses after the last word is 200+;...".
[0055] As described above, the first length description information may include description information of the first expected length of the text data included in the second media data; the second length description information may include description information of the second expected length corresponding to the first expected length; the second expected length is greater than the first expected length. In this scenario, as an optional technical solution of an embodiment of the present disclosure, determining the second media data according to the first media data may specifically include: adjusting the first expected length in the first media data to the second expected length to obtain the second media data, or adjusting the first length description information in the first media data to the second length description information to obtain the second media data. Among them, the manner of adjusting the first length description information to the second length description information can be preset according to actual needs. By adopting this technical solution, the second media data can be obtained by adjusting the first media data, with simple operation and improved generation efficiency of the second media data.
[0056] As an alternative technical solution of an embodiment of the present disclosure, determining the second media data according to the first media data may specifically include: inputting the first length description information of the first media data into a description data generation model to obtain the second media data. Wherein, the description data generation model may be a machine learning model trained based on sample length description information and expected media data corresponding to the sample length description information. The expected media data corresponding to the sample length description information includes second length description information expected to be presented and corresponding to the first length description information. By adopting this technical solution, the second media data can be automatically generated according to the first length description information of the first media data, improving the generation efficiency of the second media data.
[0057] As an alternative technical solution of an embodiment of the present disclosure, generating the target media data according to the second media data and the media data generation model includes: inputting the second media data into the media data generation model to obtain the target media data.
[0058] In the technical solution of the embodiment of the present disclosure, by receiving the first media data, since the first media data includes the first data description information of the target media data expected to be presented, and the target media data includes text data, the first data description information specifically further includes the content description information and the first length description information of the text data, it is possible to flexibly set the first media data and clearly describe the length information of the text data in the generated target media data to meet the differentiated media data generation requirements; by determining the second media data according to the first media data, since the second media data includes the second data description information of the target media data, the second media data can be generated according to the first media data; at least the second length description information corresponding to the first length description information is included in the second data description information, and the second data description information can be automatically generated to further describe the first length description information through the second length description information. Furthermore, by generating the target media data according to the second media data and the media data generation model and displaying the target media data, more abundant and accurate length information prompts can be provided for the media generation model through the second media data, so that the text data in the determined second media data presents the expected length, improving the generation effect of the media data generation model on the media data.
[0059] Figure 4The flowchart of another method for generating media data provided by an embodiment of the present disclosure. Based on the technical solution of the above embodiment, the specific generation method of the second media data is further refined. Optionally, when the second length description information includes description information for adding length marking information to the text data included in the target media data, generating the second media data according to the first media data, the second media data, and the media data generation model includes: inputting the first media data and the second media data into the media data generation model to obtain third media data with length marking information added, and filtering out the length marking information in the third media data to obtain the target media data. For the specific implementation, refer to the description of this embodiment. Among them, the technical features that are the same as or similar to the foregoing embodiments will not be described in detail again. As Figure 4 shown, the method of this embodiment may specifically include:
[0060] S410. Receive the first media data; wherein, the first media data includes first data description information of the target media data to be presented as expected; the target media data includes text data; the first data description information includes content description information of the text data and first length description information.
[0061] S420. Determine the second media data according to the first media data, wherein the second media data includes second data description information of the target media data; the second data description information at least includes second length description information corresponding to the first length description information, and the second length description information includes description information for adding length marking information to the text data included in the target media data.
[0062] S430. Input the first media data and the second media data into the media data generation model to obtain third media data with length marking information added, and filter out the length marking information in the third media data to obtain the target media data.
[0063] In an embodiment of the present disclosure, after generating the second media data, in order to fully ensure the matching degree between the generated target media data and the first media data, the two sets of media data, i.e., the first media data and the second media data, can be input into the media data generation model, so that the media data generation model can combine the first media data and the second media data, fully pay attention to the output length of the text data, and better meet the data output expectation described in the first media data. The media data generation model processes the input first media data and the second media data to generate a new media data, i.e., the third media data. Since the second length description information of the second media data includes a description of adding length marking information to the text data of the target media data, when the media data generation model generates media data, it can add length marking information to the text data of the generated media data, that is, the third media data carries length marking information. Next, these length marking information are filtered out from the third media data to remove the additional information for processing or marking, and only the pure media content is retained. After filtering out the length marking information, the obtained media data is the target media data. This is the final processing result, which only contains the original media content and does not contain any additional information for processing or marking. By adding and then filtering out the length marking information, the effective processing and management of media data can be realized without changing the original media content, ensuring the integrity and accuracy of media data, improving the processing efficiency of media data, and without manual intervention during the processing, enhancing the automation and intelligence degree of media data processing.
[0064] Optionally, filtering out the length marking information in the third media data to obtain the target media data includes: according to the expression mode of the preset length marking information, using the method of regular expression to identify and remove these length marking information from the third media data to obtain the target media data; or, filtering out the length marking information in the third media data through a pre-trained information processing model to obtain the target media data, etc. Specifically, the third media data is input into a pre-trained information processing model to obtain the target media data, where the information processing model is trained on a machine learning model based on the second sample media data and the expected media data corresponding to the second sample media data, and the expected media data corresponding to the second sample media data is obtained by filtering out the length marking information in the second sample media data.
[0065] In the technical solution of the embodiment of the present disclosure, by inputting the first media data and the second media data into a media data generation model to obtain third media data with length marking information added, the media data generation model can effectively perceive the text length of the output media data, improve the robustness of the media data generation model. Furthermore, by filtering the length marking information in the third media data, automatic processing of the third media data can be achieved without the user's awareness, presenting clean target media data that conforms to the reading habit, thereby improving the display effect of the target media data.
[0066] Figure 5 It is a schematic flowchart of an optional example of a media data generation method provided for an embodiment of the present disclosure. As Figure 5 shown, the method of this embodiment may specifically include: First, receive media data A input by the user, including length requirement data (first length description information) for the text data in the expected generated media data D. Second, input the length requirement data of media data A into a description data template to obtain media data B, and media data B includes description information of length marking data for the text data of the generated media data D. Third, input media data A and media data B into a media data generation model to obtain media data C containing length marking data. Finally, filter the length marking data in media data C by means of regular matching to obtain the output media data D. For example, if the length marking data is "{n}", the content in the form of "{n}" in media data C can be filtered by means of regular matching.
[0067] By adopting the technical solution of the embodiment of the present disclosure, the existing media data processing method is optimized. Without the user performing additional interaction operations, the target media data generated by the media data generation model can not only meet the expectation of the content of the generated target media data in the first media data, but also meet the expectation of the length of the text data in the generated target media data in the first media data, thereby improving the presentation effect of the target media data.
[0068] Figure 6 It is a schematic structural diagram of a media data generation device provided for an embodiment of the present disclosure, as Figure 6As shown, the generating device of the media data includes a media data receiving module 610 and a media data generating module 620. Among them, the media data receiving module 610 is configured to receive first media data; among them, the first media data includes first data description information about target media data to be presented; the target media data includes text data; the first data description information includes content description information about the text data and first length description information; the media data generating module 620 is configured to determine second media data according to the first media data, generate the target media data according to the second media data and a media data generation model, and display the target media data; among them, the second media data includes second data description information about the target media data; the second data description information at least includes second length description information corresponding to the first length description information.
[0069] In the technical solution of the embodiment of the present disclosure, the media data receiving module 610 receives the first media data. Since the first media data includes first data description information about the target media data to be presented, and the target media data includes text data, the first data description information specifically further includes content description information about the text data and first length description information, which can flexibly set the first media data and clearly describe the length information of the text data in the generated target media data to meet the differentiated media data generation requirements; the media data generating module 620 determines the second media data according to the first media data. Since the second media data includes second data description information about the target media data, the second media data can be generated according to the first media data; the second data description information at least includes second length description information corresponding to the first length description information, which can automatically generate the second data description information to further describe the first length description information through the second length description information. Furthermore, by generating the target media data according to the second media data and the media data generation model and displaying the target media data, the second media data can provide richer and more accurate length information prompts for the media generation model, so that the text data in the determined second media data presents the expected length, and the generation effect of the media data generation model on the media data is improved.
[0070] Based on any optional technical solution in the embodiment of the present disclosure, optionally, the second length description information includes description information about adding length marking information to the text data included in the target media data.
[0071] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the media data generation module 620 is specifically configured to input the first media data and the second media data into a media data generation model to obtain third media data with length marking information added, and filter out the length marking information in the third media data to obtain target media data.
[0072] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the second length description information includes description information about the information addition method for adding length marking information to the text data included in the target media data and description information about the expected attribute values of the expected length marking information to be presented.
[0073] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the second length description information further includes example information of preset media data with the length marking information added.
[0074] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the media data generation module 620 is specifically configured to generate second media data according to the first length description information and a preset description data template.
[0075] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the first length description information includes description information about the first expected length of the text data included in the second media data; further, the media data generation module may include a first data generation unit and / or a second data generation unit. Among them, the first data generation unit may be configured to add the first expected length to a preset description data template to obtain second media data; the second data generation unit is configured to add the first expected length after increasing it by a preset value to a preset description data template to obtain second media data.
[0076] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the first length description information includes description information about the first expected length of the text data included in the second media data; the second length description information includes description information about the second expected length corresponding to the first expected length; the second expected length is greater than the first expected length.
[0077] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the media data generation module 620 is specifically configured to input the second media data into a media data generation model to obtain target media data.
[0078] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the media data generation module 620 includes a third data generation unit. The third data generation unit is specifically configured to input the first length description information of the first media data into a description data generation model to obtain second media data.
[0079] The media data generation device provided by the embodiments of the present disclosure can execute the media data generation method provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution of the media data generation method.
[0080] It should be noted that the various units and modules included in the above device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present disclosure.
[0081] Next, refer to Figure 7 , which shows a schematic structural diagram of an electronic device (such as a terminal device or a server) 700 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0082] As Figure 7 shown, the electronic device 700 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0083] Typically, the following devices can be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and a communication device 709. The communication device 709 can allow the electronic device 700 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 7 the electronic device 700 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices can be implemented or had.
[0084] Specifically, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the methods of the embodiments of the present disclosure are executed.
[0085] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0086] The electronic device provided in the embodiments of the present disclosure and the method for generating media data provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in the embodiments of the present disclosure can be referred to the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0087] The embodiments of the present disclosure provide a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for generating media data provided in the above embodiments is implemented.
[0088] It should be noted that the above computer-readable medium in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0089] According to one or more embodiments of the present disclosure, [Example 1] provides a method for generating media data, including: receiving first media data; wherein, the first media data includes first data description information about target media data to be presented; the target media data includes text data; the first data description information includes content description information and first length description information about the text data; determining second media data according to the first media data, generating the target media data according to the second media data and a media data generation model, and displaying the target media data; wherein, the second media data includes second data description information about the target media data; the second data description information at least includes second length description information corresponding to the first length description information.
[0090] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further including: optionally, the second length description information includes description information about adding length marking information to the text data included in the target media data.
[0091] According to one or more embodiments of the present disclosure, [Example Three] provides the method of [Example Two], further comprising: Optionally, generating the target media data according to the first media data, the second media data, and the media data generation model includes: inputting the first media data and the second media data into the media data generation model to obtain third media data with length marking information added, and filtering the length marking information in the third media data to obtain the target media data.
[0092] According to one or more embodiments of the present disclosure, [Example Four] provides the method of [Example Two], further comprising: Optionally, the second length description information includes description information about the information addition method for adding length marking information to the text data included in the target media data and description information about the expected attribute value of the expected length marking information.
[0093] According to one or more embodiments of the present disclosure, [Example Five] provides the method of [Example Four], further comprising: Optionally, the second length description information further includes example information of preset media data with the length marking information added.
[0094] According to one or more embodiments of the present disclosure, [Example Six] provides the method of [Example Two], further comprising: Optionally, determining the second media data according to the first media data includes: generating the second media data according to the first length description information and a preset description data template.
[0095] According to one or more embodiments of the present disclosure, [Example Seven] provides the method of [Example Six], further comprising: Optionally, the first length description information includes description information about the first expected length of the text data included in the second media data; generating the second media data according to the first length description information and a preset description data template includes: adding the first expected length to the preset description data template to obtain the second media data; or adding the first expected length plus a preset value to the preset description data template to obtain the second media data.
[0096] According to one or more embodiments of the present disclosure, [Example Eight] provides the method of [Example One], further comprising: Optionally, the first length description information includes description information about the first expected length of the text data included in the second media data; the second length description information includes description information about the second expected length corresponding to the first expected length; and the second expected length is greater than the first expected length.
[0097] According to one or more embodiments of the present disclosure, [Example Nine] provides the method of [Example Eight], further including: Optionally, generating the target media data according to the second media data and the media data generation model includes: inputting the second media data into the media data generation model to obtain the target media data.
[0098] According to one or more embodiments of the present disclosure, [Example Ten] provides the method of [Example One], further including: Optionally, determining the second media data according to the first media data includes: inputting the first length description information of the first media data into the description data generation model to obtain the second media data.
[0099] According to one or more embodiments of the present disclosure, [Example Eleven] provides a media data generation device, including: a media data receiving module, configured to receive the first media data; wherein, the first media data includes first data description information of target media data to be presented; the target media data includes text data; the first data description information includes content description information and first length description information of the text data; a media data generation module, configured to determine the second media data according to the first media data, generate the target media data according to the second media data and the media data generation model, and display the target media data; wherein, the second media data includes second data description information of the target media data; the second data description information at least includes second length description information corresponding to the first length description information.
[0100] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0101] The above computer-readable medium may be included in the above electronic device; or may exist separately without being assembled into the electronic device.
[0102] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: receive first media data; wherein the first media data includes first data description information about target media data to be presented; the target media data includes text data; the first data description information includes content description information and first length description information about the text data; determine second media data according to the first media data, generate the target media data according to the second media data and a media data generation model, and display the target media data; wherein the second media data includes second data description information about the target media data; and the second data description information at least includes second length description information corresponding to the first length description information.
[0103] Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0105] The units involved in the embodiments of the present disclosure can be implemented in software or in hardware. Among them, the name of a unit does not constitute a limitation on the unit itself in some cases. For example, the first data generation unit can also be described as "the unit that adds the first expected length to a preset description data template".
[0106] The functions described above herein can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGA), Application Specific Integrated Circuits (ASIC), Application Specific Standard Products (ASSP), System on Chip (SOC), Complex Programmable Logic Devices (CPLD), and so on.
[0107] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM or Flash Memory), an optical fiber, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] The above description is only for the preferred embodiments of the present disclosure and the description of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in the present disclosure.
[0109] Moreover, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the foregoing discussion, these should not be construed as limitations on the scope of the present disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0110] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for generating media data, characterized in that: include: Receive first media data; wherein the first media data includes first data description information of target media data to be presented; the target media data includes text data; the first data description information includes content description information and first length description information of the text data; Determine the second media data according to the first media data, generate the target media data according to the second media data and a media data generation model, and display the target media data; wherein the second media data includes second data description information for the target media data; and the second data description information includes at least second length description information corresponding to the first length description information.
2. The method for generating media data according to claim 1, characterized in that: The second length description information includes description information of adding length mark information to the text data included in the target media data.
3. The method for generating media data according to claim 2, characterized in that: The determining the second media data according to the first media data, the second media data and the media data generation model includes: The first media data and the second media data are input into a media data generation model to obtain third media data with length mark information added thereto, and the length mark information in the third media data is filtered out to obtain target media data.
4. The method for generating media data according to claim 2, characterized in that: The second length description information includes description information of a manner of adding length mark information to text data included in the target media data and description information of an expected attribute value of the length mark information that is expected to be presented.
5. The method for generating media data according to claim 4, characterized in that: The second length description information also includes example information of the preset media data added with the length mark information.
6. The method for generating media data according to claim 2, characterized in that: The determining the second media data according to the first media data includes: Generate second media data according to the first length description information and a preset description data template.
7. The method for generating media data according to claim 6, characterized in that: The first length description information includes description information of a first expected length of the text data included in the second media data; and generating the second media data according to the first length description information and a preset description data template includes: Adding the first expected length to a preset description data template to obtain second media data; or, The first expected length is increased by a preset value and then added to a preset description data template to obtain second media data.
8. The method for generating media data according to claim 1, characterized in that: The first length description information includes description information of a first expected length of the text data included in the second media data; the second length description information includes description information of a second expected length corresponding to the first expected length; and the second expected length is greater than the first expected length.
9. The method for generating media data according to claim 8, characterized in that: The generating the target media data according to the second media data and the media data generation model includes: The second media data is input into a media data generation model to obtain target media data.
10. The method for generating media data according to claim 1, characterized in that: The determining the second media data according to the first media data includes: The first length description information of the first media data is input into a description data generation model to obtain second media data.
11. A device for generating media data, characterized in that: include: A media data receiving module, configured to receive first media data; wherein the first media data includes first data description information of target media data to be presented; the target media data includes text data; the first data description information includes content description information and first length description information of the text data; A media data generation module is used to determine second media data based on the first media data, determine target media data based on the second media data and a media data generation model, and display the target media data; wherein the second media data includes second data description information for the target media data; and the second data description information includes at least second length description information corresponding to the first length description information.
12. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating media data as described in any one of claims 1-11.
13. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the method for generating media data as described in any one of claims 1 to 10.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method for generating media data according to any one of claims 1 to 10.