CN111581402A - Method and system for generating content test material, electronic equipment and storage medium - Google Patents

Method and system for generating content test material, electronic equipment and storage medium Download PDF

Info

Publication number
CN111581402A
CN111581402A CN201910117486.XA CN201910117486A CN111581402A CN 111581402 A CN111581402 A CN 111581402A CN 201910117486 A CN201910117486 A CN 201910117486A CN 111581402 A CN111581402 A CN 111581402A
Authority
CN
China
Prior art keywords
content test
generation
target
sample
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910117486.XA
Other languages
Chinese (zh)
Inventor
刘俊平
顾复
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910117486.XA priority Critical patent/CN111581402A/en
Publication of CN111581402A publication Critical patent/CN111581402A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a system for generating a content test material, electronic equipment and a storage medium. The generation method comprises the following steps: acquiring a generation request, wherein the generation request comprises a material type and a generation rule; selecting materials serving as sample materials in a material library according to the material types; generating a content test material according to the generation rule and the sample material; wherein the material library includes material of a plurality of material types. The method and the device can automatically select the sample material which meets the generation request from the material library based on the generation request for generating the content test material, and generate the content test material which meets the generation request based on the sample material, so that the content test material which meets the content test requirement can be quickly generated without depending on a professional material manufacturing team, and the production efficiency is high, flexible and convenient.

Description

Method and system for generating content test material, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for generating a content test material, electronic equipment and a storage medium.
Background
With the rise of content and socialization strategies, the internet industry has emerged a great number of content applications, which generally include content in the form of information articles, commodity recommendations, short videos, live broadcasts, and the like. Therefore, in the process of testing the functions of such application products, it is inevitably necessary to adopt various forms of content materials to check whether the application products are compatible with these forms of content. Currently, the acquisition modes of various forms of content materials include:
firstly, a professional material production team creates according to test requirements, and the method is limited by professional ability of the production team, low in efficiency and high in cost.
Secondly, the content materials are modified according to the test requirements on the basis of the existing content materials, the mode is also limited by the professional ability of a manufacturing team, and suitable content materials which can serve as the modification basis need to be found, so that more time is consumed, and the efficiency is still low.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method, a system, an electronic device, and a storage medium for generating a content test material, in order to overcome the defect of low generation efficiency of the content test material in the prior art.
The embodiment of the invention solves the technical problems through the following technical scheme:
a method for generating content test material, the method comprising:
acquiring a generation request, wherein the generation request comprises a material type and a generation rule;
selecting materials serving as sample materials in a material library according to the material types;
generating a content test material according to the generation rule and the sample material;
wherein the material library includes material of a plurality of material types.
Preferably, when the material type includes text, the generation rule includes a target text size;
the step of generating content test material comprises:
resizing the sample material to the target text size.
Preferably, when the material type includes a picture, the generation rule includes at least one of a target picture format, a target picture resolution, and a target picture size;
when the generation rule includes a target picture format, the step of generating the content test material includes:
converting the format of the sample material into the format of the target picture;
when the generation rule includes a target picture resolution, the step of generating the content test material includes:
adjusting the sample material to the target picture resolution;
when the generation rule includes a target picture size, the step of generating the content test material includes:
clipping or stitching the sample material to the target picture size.
Preferably, when the material type includes audio, the generation rule includes at least one of a target audio coding format and a target audio code rate;
when the generation rule includes a target audio encoding format, the step of generating content test material includes:
extracting the sample materials according to the target audio coding format;
when the generation rule includes a target audio code rate, the step of generating the content test material includes:
and extracting the sample material according to the target audio code rate.
Preferably, when the material type includes a video, the generation rule includes at least one of a target video encoding format, a target video resolution, and a target video frame rate;
when the generation rule includes a target video encoding format, the step of generating the content test material includes:
extracting the sample material according to the target video coding format;
when the generation rule includes a target video resolution, the step of generating the content test material includes:
adjusting the sample material to the target video resolution;
when the generation rule includes a target video frame rate, the step of generating the content test material includes:
and extracting the sample material according to the target video frame rate.
Preferably, after the step of obtaining the generation request, the generation method further includes:
judging whether the material library comprises materials meeting the generation request;
if yes, returning the material which accords with the generation request as a content test material;
and if not, executing the step of selecting the materials as the sample materials in the material library according to the material types.
Preferably, the step of returning the material conforming to the generation request as the content test material includes:
directly returning the content test material;
and/or, returning a link characterizing the content test material.
Preferably, after the step of generating the content test material, the generating method further comprises:
storing the generated content material in the material library.
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements any one of the above methods for generating content test material when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of any of the above-described methods for generating content test material.
A system for generating content test material, the system comprising:
the request acquisition module is used for acquiring a generation request, and the generation request comprises a material type and a generation rule;
the sample selection module is used for selecting materials serving as sample materials in a material library according to the material types;
the material generation module is used for generating a content test material according to the generation rule and the sample material;
wherein the material library includes material of a plurality of material types.
Preferably, when the material type includes text, the generation rule includes a target text size, and the material generation module includes:
and the text generation unit is used for adjusting the size of the sample material to the size of the target text.
Preferably, when the material type includes a picture, the generation rule includes at least one of a target picture format, a target picture resolution, and a target picture size;
when the generation rule includes a target picture format, the material generation module includes:
the picture format setting unit is used for converting the format of the sample material into the target picture format;
when the generation rule includes a target picture resolution, the material generation module includes:
the picture resolution setting unit is used for adjusting the sample material to the target picture resolution;
when the generation rule includes a target picture size, the material generation module includes:
and the picture size setting unit is used for cutting or splicing the sample material into the size of the target picture.
Preferably, when the material type includes audio, the generation rule includes at least one of a target audio coding format and a target audio code rate;
when the generation rule includes a target audio encoding format, the material generation module includes:
the audio format setting unit is used for extracting the sample material according to the target audio coding format;
when the generation rule includes a target audio code rate, the material generation module includes:
and the audio code rate setting unit is used for extracting the sample material according to the target audio code rate.
Preferably, when the material type includes a video, the generation rule includes at least one of a target video encoding format, a target video resolution, and a target video frame rate;
when the generation rule includes a target video encoding format, the material generation module includes:
the video format setting unit is used for extracting the sample material according to the target video coding format;
when the generation rule includes a target video resolution, the material generation module includes:
a video resolution setting unit for adjusting the sample material to the target video resolution;
when the generation rule includes a target video frame rate, the material generation module includes:
and the video frame rate setting unit is used for extracting the sample material according to the target video frame rate.
Preferably, the generating system further comprises:
the material judging module is used for judging whether the material library comprises materials meeting the generation request;
if yes, a material return module is called; if not, calling the sample selection module;
and the material returning module is used for returning the material which accords with the generation request as a content test material.
Preferably, the material return module includes:
the material returning unit is used for directly returning the content testing material;
and/or, a link returning unit for returning a link characterizing the content test material.
Preferably, the generating system further comprises:
and the material storage module is used for storing the generated content material in the material library.
The embodiment of the invention has the positive improvement effects that: the embodiment of the invention can automatically select the sample material which meets the generation request from the material library based on the generation request for generating the content test material, and generate the content test material which meets the generation request based on the sample material, thereby being capable of quickly generating the content test material which meets the content test requirement without depending on a professional material manufacturing team, and having high production efficiency, flexibility and convenience.
Drawings
Fig. 1 is a flowchart of a method of generating content test material according to embodiment 1 of the present invention.
Fig. 2 is a schematic diagram of a hardware structure of an electronic device according to embodiment 2 of the present invention.
Fig. 3 is a schematic block diagram of a content test material generation system according to embodiment 4 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The present embodiment provides a method for generating a content test material, and fig. 1 shows a flowchart of the present embodiment. Referring to fig. 1, the generation method of the present embodiment includes:
s101, acquiring a generation request.
In order to test whether the content application products can be normally compatible with certain specific content, it is necessary to generate specific content meeting certain rules in advance, that is, content test material in the embodiment, for the content application products to test.
In the present embodiment, a generation request for generating the content test material including the generation rule that the content test material should satisfy may be acquired first. In view of the differences between different types of material, more specifically, the generation request should include at least the type of material of the content test material requested to be generated and the generation rule that the content test material should satisfy.
S102, judging whether the material library comprises materials conforming to the generation request;
if yes, go to step S103; if not, go to step S104.
In the present embodiment, the material library may include materials of various material types such as text, picture, audio, video, and the like, for example, text having a text size of 2MB, picture having a resolution of 2048 × 2048 and a size of 2MB, audio in MP3 format having a size of 3MB, and video in MP4 format having a resolution of 720P and a size of 20 MB.
And S103, returning the material conforming to the generation request as a content test material.
When the material library comprises the material which accords with the generation request, the material is directly returned to be used as the content test material for testing the content application product, other materials which accord with the generation request do not need to be generated additionally, and the workload of additionally generating the content test material is avoided.
Specifically, in this embodiment, when the material conforming to the generation request is returned, that is, when the content test material is returned, the content test material may be directly returned, for example, text, picture, audio, video, or the like may be directly returned.
In addition, in order to reduce the space occupied by the material library, for the material with larger size, such as pictures, audio, video, etc., the material can be stored into the material library without being directly stored in the material library, and the link for representing the material can be stored into the material library. When the content test material is these larger sized materials, a link characterizing the content test material can be returned.
And S104, selecting the materials serving as the sample materials in the material library according to the material types.
And when the material library does not comprise the materials meeting the generation request, screening the materials meeting the material type in the generation request from the material library, and selecting the materials as sample materials from the materials. In order to improve the generation efficiency of the content test material, in this embodiment, a material close to the generation rule may be preferentially selected as the sample material, for example, a generation request is to generate a text (material type) with a text size of 3MB (generation rule), a material library includes a text with a text size of 2MB and a text with a text size of 3.2MB, and a text with a text size of 3.2MB may be preferentially selected as the sample material in this embodiment.
And S105, generating content test materials according to the generation rules and the sample materials.
In this embodiment, when the material type in the generation request includes text, the material type of the sample material may be text, the generation rule may include, but is not limited to, a target text size, and step S105 may include: and adjusting the size of the sample material to the size of the target text.
Specifically, in this embodiment, when the size of the target text is 0, that is, the content test material is an empty character string, the content of the sample material may be initialized to be empty, for example, making the sample material rawContxt ═ and then arbitrarily selecting a plurality of characters from a set of invisible characters such as a space, a line feed character, a tab character, and the like to assemble the content test material, so as to test whether the content application product can normally display the empty character string.
When the target text size is n KB (n is greater than 0), the content of the sample material may be initialized to null first, e.g., making the sample material rawContxt ═ and then including, e.g., kanji and a-zA-Z! @ # $% & () - + <: "? And randomly selecting a plurality of characters from the set of the equal visible characters for splicing, and using the characters as a content test material when the size of the spliced sample material is n KB for testing whether the content application product can normally display the character strings.
Or, the sample material rawContxt "< body >/body" ", and then the labels < h3> < h3>, < h2> < h2>, < h1> < h1>, < del >, < u >, < b >, < em >, < span > < tip >, < ul > < li >, < di > and < di > sytle > color: #00FF00" < p >, < di > and < br > may be arbitrarily selected from a plurality of labels and inserted into the middle of the < body >/ul, and then Chinese characters and a-zA-Z ^ are included! @ # $% & () - + <: "? And randomly selecting a plurality of characters from the set of the equal visible characters to fill the characters to the position of the star, and taking the characters as a content test material when the size of the filled sample material is n KB.
In addition, when the selected sample material is close to the generation rule, the sample material may not be initialized, and characters may be filled or deleted on the basis of the sample material until the size of the adjusted sample material is the target text size.
In this embodiment, when the material type in the generation request includes a picture, the material type of the sample material may be a picture, the generation rule may include, but is not limited to, a target picture format, a target picture resolution, and a target picture size, and accordingly, step S105 may include: the method comprises the steps of converting a sample material into a target picture format, adjusting to the resolution of a target picture, and cutting or splicing to the size of the target picture.
Specifically, in this embodiment, when the generation rule includes the target picture format, the target picture resolution and the target picture size, the sample material is recorded as P1The step of generating content test material may comprise first sampling material P1Converting into a target picture format to obtain a converted sample material P2Then, the sample material P is processed2Is adjusted to the target picture resolution, e.g. by lateral, longitudinal stretching (possibly from the sample material P)2Resolution of (d) and target picture resolution to calculate stretch ratio) of the sample material P2Obtaining adjusted sample material P3Then aligning the sampleMaterial P3And cutting or splicing to obtain a material with the size of the target picture as a content test material for testing whether the content application product can normally display the picture with the specific format, resolution and size.
In this embodiment, when the material type in the generation request includes audio, the material type of the sample material may be audio or video, the generation rule may include, but is not limited to, a target audio coding format and a target audio bitrate, and accordingly, step S105 may include: and extracting sample materials according to the target audio coding format and the target audio code rate.
Specifically, in this embodiment, when the generation rule includes a target audio coding format and a target audio code rate, and when the sample material is audio, it is assumed that the sample material is raw.mp3, the target audio coding format is AAC, and the target audio code rate is x, the step of generating the content test material a.aac may include extracting the sample material raw.mp3 according to the target audio coding format AAC and the target audio code rate x, for example, extracting the content test material according to the following statements: and ffmpeg-i raw.mp3-acodec aac-ab x a.aac for testing whether the content application product can normally play the audio with a specific format and code rate.
Further, when the sample material is a video, assuming that the sample material is raw.mp4, the target audio coding format is AAC, and the target audio bitrate is x, the step of generating the content test material b.aac may include extracting the sample material raw.mp4 according to the target audio coding format AAC and the target audio bitrate x, for example, the content test material may be extracted according to the following: mpmpeg-i raw.mp4-acodec aac-ab x-vn copy b.aac.
In this embodiment, when the material type in the generation request includes a video, the material type of the sample material may be a video, the generation rule may include, but is not limited to, a target video encoding format, a target video resolution, and a target video frame rate, and accordingly, step S105 may include: extracting sample materials according to a target video coding format; extracting sample materials according to the resolution of the target video; and extracting sample materials according to the target video frame rate.
Specifically, in this embodiment, when the generation rule includes the target video coding format, the target video resolution, and the target video frame rate, assuming that the sample material is raw.mp4, the target video coding format is FLV, the target video resolution is xx, and the target video frame rate is xxx, the step of generating the content test material c.flv may include extracting the sample material raw.mp4 according to the target video coding format FLV, the target video resolution xx, and the target video frame rate xxx, for example, extracting the content test material according to the following statements: the method is characterized by comprising the following steps of ffmpeg-i raw, mp4-vocodec copy-an-s xx-r xxx c.flv, and is used for testing whether a content application product can normally play videos with a specific format, a specific resolution and a specific frame rate or even live videos.
And S106, storing the generated content material in a material library.
Finally, the content test material generated by the embodiment can be stored in the material library to further enrich the material in the material library, so that various generation requests can be more flexibly responded, and the generation efficiency of the content test material is improved. The content test materials with larger sizes, such as pictures, audio, video and the like, can be stored in the material library instead of being directly stored in the material library, and the links representing the content test materials are stored in the material library, so that the occupation of space by the material library is reduced.
In the embodiment, based on the generation request for generating the content test material, the sample material meeting the generation request is automatically selected from the material library, and the content test material meeting the generation request is generated based on the sample material, so that a professional material manufacturing team is not required, the content test material meeting the content test requirement can be quickly generated, and the production efficiency is high, flexible and convenient.
Example 2
The present embodiment provides an electronic device, which can be represented in the form of a computing device (for example, a server device), including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor executes the computer program to implement the method for generating a content test material provided in embodiment 1.
Fig. 2 shows a schematic diagram of a hardware structure of the present embodiment, and as shown in fig. 2, the electronic device 9 specifically includes:
at least one processor 91, at least one memory 92, and a bus 93 for connecting the various system components (including the processor 91 and the memory 92), wherein:
the bus 93 includes a data bus, an address bus, and a control bus.
Memory 92 includes volatile memory, such as Random Access Memory (RAM)921 and/or cache memory 922, and can further include Read Only Memory (ROM) 923.
Memory 92 also includes a program/utility 925 having a set (at least one) of program modules 924, such program modules 924 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 91 executes various functional applications and data processing, such as a generation method of a content test material provided in embodiment 1 of the present invention, by executing the computer program stored in the memory 92.
The electronic device 9 may further communicate with one or more external devices 94 (e.g., a keyboard, a pointing device, etc.). Such communication may be through an input/output (I/O) interface 95. Also, the electronic device 9 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 96. The network adapter 96 communicates with the other modules of the electronic device 9 via the bus 93. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 9, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module, according to embodiments of the application. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 3
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the generation method of content test material provided in embodiment 1.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible embodiment, the present invention can also be implemented in the form of a program product including program code for causing a terminal device to execute the steps of implementing the method for generating a content test material in embodiment 1 when the program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
Example 4
The embodiment provides a system for generating a content test material, and fig. 3 shows a schematic block diagram of the embodiment. Referring to fig. 3, the generation system of the present embodiment includes:
a request obtaining module 1, configured to obtain a generation request.
In order to test whether the content application products can be normally compatible with certain specific content, it is necessary to generate specific content meeting certain rules in advance, that is, content test material in the embodiment, for the content application products to test.
In the present embodiment, a generation request for generating the content test material including the generation rule that the content test material should satisfy may be acquired first. In view of the differences between different types of material, more specifically, the generation request should include at least the type of material of the content test material requested to be generated and the generation rule that the content test material should satisfy.
The material judging module 2 is used for judging whether the material library comprises materials which accord with the generation request; if yes, the material return module 3 is called; if not, the sample selection module 4 is called.
In the present embodiment, the material library may include materials of various material types such as text, picture, audio, video, and the like, for example, text having a text size of 2MB, picture having a resolution of 2048 × 2048 and a size of 2MB, audio in MP3 format having a size of 3MB, and video in MP4 format having a resolution of 720P and a size of 20 MB.
The material returning module 3 is used for returning the material which accords with the generation request as the content test material.
When the material library comprises the material which accords with the generation request, the material is directly returned to be used as the content test material for testing the content application product, other materials which accord with the generation request do not need to be generated additionally, and the workload of additionally generating the content test material is avoided.
Specifically, in the present embodiment, referring to fig. 3, the material return module 3 may include a material return unit 31 and a link return unit 32.
When the material conforming to the generation request is returned, that is, when the content test material is returned, the material return unit 31 may be called to directly return the content test material, for example, directly return text, picture, audio, video, or the like.
In addition, in order to reduce the space occupied by the material library, for the material with larger size, such as pictures, audio, video, etc., the material can be stored into the material library without being directly stored in the material library, and the link for representing the material can be stored into the material library. When the content test material is such large sized material, the link return unit 32 may be invoked to return a link characterizing the content test material.
And the sample selection module 4 is used for selecting the materials serving as the sample materials in the material library according to the material types.
And when the material library does not comprise the materials meeting the generation request, screening the materials meeting the material type in the generation request from the material library, and selecting the materials as sample materials from the materials. In order to improve the generation efficiency of the content test material, in this embodiment, a material close to the generation rule may be preferentially selected as the sample material, for example, a generation request is to generate a text (material type) with a text size of 3MB (generation rule), a material library includes a text with a text size of 2MB and a text with a text size of 3.2MB, and a text with a text size of 3.2MB may be preferentially selected as the sample material in this embodiment.
And the material generation module 5 is used for generating content test materials according to the generation rules and the sample materials.
In this embodiment, when the material type in the generation request includes text, the material type of the sample material may be text, the generation rule may include, but is not limited to, a target text size, and the material generation module 5 may include a text generation unit 51 for adjusting the size of the sample material to the target text size.
Specifically, in this embodiment, when the size of the target text is 0, that is, the content test material is an empty character string, the text generating unit 51 may first initialize the content of the sample material to be empty, for example, make the sample material rawContxt ═ and then arbitrarily select a plurality of characters from a set of invisible characters such as a space, a line feed character, a tab character, etc. to assemble the content test material, so as to test whether the content application product can normally display the empty character string.
When the target text size is n KB (n is greater than 0), the text generation unit 51 may first initialize the content of the sample material as empty, for example, let the sample material rawContxt ″, and then start with a sample material including, for example, Kanji and a-zA-Z! @ # $% & () - + <: "? And randomly selecting a plurality of characters from the set of the equal visible characters for splicing, and using the characters as a content test material when the size of the spliced sample material is n KB for testing whether the content application product can normally display the character strings.
Alternatively, the text generating unit 51 may make the sample materials rawContxt ═ body "/body", and then insert a plurality of labels from the labels < h3> -3 >, < h2> -2 >, < h1> -1 >, < del >, < u >, < b >, < em >, < span > tip >, < ul >, < li >, < div system: < color: #00FF00 >, < p >/div >, < br > into the middle of the sample materials, and then insert the sample materials into the middle of the sample materials from the labels < h3> -3 >, < h2>, < h > tag >, < h1>, < ti >, < ul >, < li >, < di > and then insert the sample materials into the sample materials from the middle of the sample materials including Chinese characters and a-zA-Z- >. @ # $% & () - + <: "? And randomly selecting a plurality of characters from the set of the equal visible characters to fill the characters to the position of the star, and taking the characters as a content test material when the size of the filled sample material is n KB.
Further, when the selected sample material is close to the generation rule, the text generation unit 51 may fill or delete characters on the basis of the sample material without initializing the sample material until the size of the adjusted sample material is the target text size.
In this embodiment, when the material type in the generation request includes a picture, the material type of the sample material may be a picture, the generation rule may include, but is not limited to, a target picture format, a target picture resolution, and a target picture size, and accordingly, the material generation module 5 may include: a picture format setting unit 52 for converting the format of the sample material into a target picture format; a picture resolution setting unit 53, configured to adjust the sample material to a target picture resolution; a picture size setting unit 54 for clipping or splicing the sample material to a target picture size.
Specifically, in this embodiment, when the generation rule includes the target picture format, the target picture resolution and the target picture size, the sample material is recorded as P1First, the picture format setting unit 52 is called to set the sample material P1Converting into a target picture format to obtain a converted sample material P2Then, the picture resolution setting unit 53 is called to set the sample material P2Is adjusted to the target picture resolution, e.g. by lateral, longitudinal stretching (possibly from the sample material P)2Resolution of (d) and target picture resolution to calculate stretch ratio) of the sample material P2Obtaining adjusted sample material P3Then, the picture size setting unit 54 is called to set the sample material P3And cutting or splicing to obtain a material with the size of the target picture as a content test material for testing whether the content application product can normally display the picture with the specific format, resolution and size.
In this embodiment, when the material type in the generation request includes audio, the material type of the sample material may be audio or video, the generation rule may include, but is not limited to, a target audio coding format and a target audio bitrate, and accordingly, the material generation module 5 may include: an audio format setting unit 55, configured to extract sample material according to a target audio coding format; and the audio code rate setting unit 56 is configured to extract the sample material according to the target audio code rate.
Specifically, in this embodiment, when the generation rule includes the target audio coding format and the target audio code rate, the audio format setting unit 55 and the audio code rate setting unit 56 may be respectively invoked to extract the sample material according to the target audio coding format and the target audio code rate, so as to obtain a content test material that meets the generation rule, and is used for testing whether the content application product can normally play the audio with the specific format and code rate.
In this embodiment, when the material type in the generation request includes a video, the material type of the sample material may be a video, the generation rule may include, but is not limited to, a target video encoding format, a target video resolution, and a target video frame rate, and accordingly, the material generation module 5 may include: a video format setting unit 57, configured to extract a sample material according to a target video coding format; a video resolution setting unit 58 for adjusting the sample material to a target video resolution; and a video frame rate setting unit 59, configured to extract sample material according to the target video frame rate.
Specifically, in this embodiment, when the generation rule includes the target video encoding format, the target video resolution, and the target video frame rate, the video format setting unit 57, the video resolution setting unit 58, and the video frame rate setting unit 59 may be respectively invoked to extract the sample material according to the target video encoding format, the target video resolution, and the target video frame rate, so as to obtain a content test material that meets the generation rule, and is used to test whether the content application product can normally play the video with a specific format, resolution, and frame rate, or even live video.
And the material storage module 6 is used for storing the generated content materials in a material library.
Finally, the content test material generated by the embodiment can be stored in the material library to further enrich the material in the material library, so that various generation requests can be more flexibly responded, and the generation efficiency of the content test material is improved. The content test materials with larger sizes, such as pictures, audio, video and the like, can be stored in the material library instead of being directly stored in the material library, and the links representing the content test materials are stored in the material library, so that the occupation of space by the material library is reduced.
In the embodiment, based on the generation request for generating the content test material, the sample material meeting the generation request is automatically selected from the material library, and the content test material meeting the generation request is generated based on the sample material, so that a professional material manufacturing team is not required, the content test material meeting the content test requirement can be quickly generated, and the production efficiency is high, flexible and convenient.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (18)

1. A method for generating content test material, the method comprising:
acquiring a generation request, wherein the generation request comprises a material type and a generation rule;
selecting materials serving as sample materials in a material library according to the material types;
generating a content test material according to the generation rule and the sample material;
wherein the material library includes material of a plurality of material types.
2. The method of generating a content test material according to claim 1, wherein when the material type includes text, the generation rule includes a target text size;
the step of generating content test material comprises:
resizing the sample material to the target text size.
3. The method for generating a content test material according to claim 1, wherein when the material type includes a picture, the generation rule includes at least one of a target picture format, a target picture resolution, and a target picture size;
when the generation rule includes a target picture format, the step of generating the content test material includes:
converting the format of the sample material into the format of the target picture;
when the generation rule includes a target picture resolution, the step of generating the content test material includes:
adjusting the sample material to the target picture resolution;
when the generation rule includes a target picture size, the step of generating the content test material includes:
clipping or stitching the sample material to the target picture size.
4. The method for generating a content test material according to claim 1, wherein when the material type includes audio, the generation rule includes at least one of a target audio encoding format, a target audio coding rate;
when the generation rule includes a target audio encoding format, the step of generating content test material includes:
extracting the sample materials according to the target audio coding format;
when the generation rule includes a target audio code rate, the step of generating the content test material includes:
and extracting the sample material according to the target audio code rate.
5. The method of generating a content test material according to claim 1, wherein when the material type includes a video, the generation rule includes at least one of a target video encoding format, a target video resolution, a target video frame rate;
when the generation rule includes a target video encoding format, the step of generating the content test material includes:
extracting the sample material according to the target video coding format;
when the generation rule includes a target video resolution, the step of generating the content test material includes:
adjusting the sample material to the target video resolution;
when the generation rule includes a target video frame rate, the step of generating the content test material includes:
and extracting the sample material according to the target video frame rate.
6. The generation method of a content test material according to claim 1, wherein after the step of obtaining the generation request, the generation method further comprises:
judging whether the material library comprises materials meeting the generation request;
if yes, returning the material which accords with the generation request as a content test material;
and if not, executing the step of selecting the materials as the sample materials in the material library according to the material types.
7. The method for generating content test material according to claim 6, wherein the step of returning the material conforming to the generation request as the content test material includes:
directly returning the content test material;
and/or, returning a link characterizing the content test material.
8. The method for generating a content test material according to claim 1, wherein after the step of generating a content test material, the method for generating further comprises:
storing the generated content material in the material library.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of generating content test material according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for generating content test material according to any one of claims 1 to 8.
11. A system for generating content test material, the system comprising:
the request acquisition module is used for acquiring a generation request, and the generation request comprises a material type and a generation rule;
the sample selection module is used for selecting materials serving as sample materials in a material library according to the material types;
the material generation module is used for generating a content test material according to the generation rule and the sample material;
wherein the material library includes material of a plurality of material types.
12. The system for generating content test material according to claim 11, wherein when the material type includes text, the generation rule includes a target text size, the material generation module includes:
and the text generation unit is used for adjusting the size of the sample material to the size of the target text.
13. The generation system of content test material according to claim 11, wherein when the material type includes a picture, the generation rule includes at least one of a target picture format, a target picture resolution, a target picture size;
when the generation rule includes a target picture format, the material generation module includes:
the picture format setting unit is used for converting the format of the sample material into the target picture format;
when the generation rule includes a target picture resolution, the material generation module includes:
the picture resolution setting unit is used for adjusting the sample material to the target picture resolution;
when the generation rule includes a target picture size, the material generation module includes:
and the picture size setting unit is used for cutting or splicing the sample material into the size of the target picture.
14. The system for generating content test material according to claim 11, wherein when the material type includes audio, the generation rule includes at least one of a target audio encoding format, a target audio coding rate;
when the generation rule includes a target audio encoding format, the material generation module includes:
the audio format setting unit is used for extracting the sample material according to the target audio coding format;
when the generation rule includes a target audio code rate, the material generation module includes:
and the audio code rate setting unit is used for extracting the sample material according to the target audio code rate.
15. The system for generating content test material according to claim 11, wherein when the material type includes video, the generation rule includes at least one of a target video encoding format, a target video resolution, a target video frame rate;
when the generation rule includes a target video encoding format, the material generation module includes:
the video format setting unit is used for extracting the sample material according to the target video coding format;
when the generation rule includes a target video resolution, the material generation module includes:
a video resolution setting unit for adjusting the sample material to the target video resolution;
when the generation rule includes a target video frame rate, the material generation module includes:
and the video frame rate setting unit is used for extracting the sample material according to the target video frame rate.
16. The generation system of content test material according to claim 11, wherein the generation system further comprises:
the material judging module is used for judging whether the material library comprises materials meeting the generation request;
if yes, a material return module is called; if not, calling the sample selection module;
and the material returning module is used for returning the material which accords with the generation request as a content test material.
17. The system for generating content test material according to claim 16, wherein the material return module includes:
the material returning unit is used for directly returning the content testing material;
and/or, a link returning unit for returning a link characterizing the content test material.
18. The generation system of content test material according to claim 11, wherein the generation system further comprises:
and the material storage module is used for storing the generated content material in the material library.
CN201910117486.XA 2019-02-15 2019-02-15 Method and system for generating content test material, electronic equipment and storage medium Pending CN111581402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910117486.XA CN111581402A (en) 2019-02-15 2019-02-15 Method and system for generating content test material, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910117486.XA CN111581402A (en) 2019-02-15 2019-02-15 Method and system for generating content test material, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111581402A true CN111581402A (en) 2020-08-25

Family

ID=72125986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910117486.XA Pending CN111581402A (en) 2019-02-15 2019-02-15 Method and system for generating content test material, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111581402A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113011909A (en) * 2021-01-08 2021-06-22 腾讯科技(深圳)有限公司 Content delivery method, device, server and storage medium
CN113805937A (en) * 2021-09-22 2021-12-17 深圳市绿联科技股份有限公司 File generation method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101014994A (en) * 2004-09-16 2007-08-08 索尼株式会社 Content creating device and content creating method
CN103095995A (en) * 2013-01-09 2013-05-08 上海思华科技股份有限公司 Method and system for automatic technical inspection of media files
CN107729361A (en) * 2017-09-04 2018-02-23 广州品唯软件有限公司 It is automatically synthesized picture method for pushing, device and storage medium
US20180063602A1 (en) * 2014-05-22 2018-03-01 Idomoo Ltd. System and method to generate a video on-the-fly

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101014994A (en) * 2004-09-16 2007-08-08 索尼株式会社 Content creating device and content creating method
CN103095995A (en) * 2013-01-09 2013-05-08 上海思华科技股份有限公司 Method and system for automatic technical inspection of media files
US20180063602A1 (en) * 2014-05-22 2018-03-01 Idomoo Ltd. System and method to generate a video on-the-fly
CN107729361A (en) * 2017-09-04 2018-02-23 广州品唯软件有限公司 It is automatically synthesized picture method for pushing, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113011909A (en) * 2021-01-08 2021-06-22 腾讯科技(深圳)有限公司 Content delivery method, device, server and storage medium
CN113805937A (en) * 2021-09-22 2021-12-17 深圳市绿联科技股份有限公司 File generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108495192B (en) Page editing processing method and device
US9507480B1 (en) Interface optimization application
US20060059414A1 (en) Common charting using shapes
CN109445775B (en) One-key active embedded code method, device and computer readable storage medium
US8656055B2 (en) Protocol wrapper and serializer/deserializer for facilitating data exchanges
US20210279400A1 (en) Memory-efficient document processing
CN113158101A (en) Visual page rendering method, device, equipment and storage medium
CN111581402A (en) Method and system for generating content test material, electronic equipment and storage medium
CN115731313A (en) SVG format picture processing method, device, equipment, medium and product
US10567472B2 (en) Manipulation of PDF files using HTML authoring tools
US8930808B2 (en) Processing rich text data for storing as legacy data records in a data storage system
CN110708423A (en) Message content display method and device and storage medium
US9113198B2 (en) Computer-implemented method, computer program product and embedded system for displaying overlaid data on an image based on string frequency
CN102065338A (en) Digital television interaction service tag language resolution method and system
CN109614592B (en) Text processing method and device, storage medium and electronic equipment
CN116578795A (en) Webpage generation method and device, storage medium and electronic equipment
CN114866801B (en) Video data processing method, device, equipment and computer readable storage medium
CN111325012A (en) word report generation method and system
CN109240660B (en) Access method of advertisement data, storage medium, electronic device and system
CN113342450B (en) Page processing method, device, electronic equipment and computer readable medium
US20180090174A1 (en) Video generation of project revision history
CN113656041A (en) Data processing method, device, equipment and storage medium
CN111915705B (en) Picture visual editing method, device, equipment and medium
CN105760354B (en) Method and device for relocating note data in electronic book
CN112995711B (en) Frame segmentation and picture processing synthesis method and system for web front-end video

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination