Template quality determination method and device and terminal equipment

By automatically generating and comparing video images using terminal devices, the problem of low efficiency in template quality testing is solved, enabling fast and accurate template quality assessment.

CN122073609APending Publication Date: 2026-05-22BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-11-21
Publication Date
2026-05-22

Smart Images

  • Figure CN122073609A_ABST
    Figure CN122073609A_ABST
Patent Text Reader

Abstract

The invention provides a template quality determination method and device and terminal equipment, and the method comprises the steps: obtaining a first video and a template, the first video being a video generated based on a to-be-tested editing function, and the template being a template for generating the first video; generating a second video based on the template; and determining the quality of the template based on the first video and the second video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of multimedia technology, and in particular to a method, apparatus and terminal device for determining template quality. Background Technology

[0002] Templates can improve the efficiency of users' video editing. In order to ensure the quality of the templates, it is necessary to test the editing functions involved in the templates.

[0003] Currently, the editing functions of a template can be tested through manual comparison. For example, a user can add text to a template using a preset font, and the user can manually identify whether the final font displayed for that text is the preset font. Based on the result of this manual identification, a test result for the preset font can be obtained. However, manual testing is time-consuming, resulting in low efficiency in determining template quality. Summary of the Invention

[0004] This disclosure provides a template quality determination method, apparatus, and terminal device to solve the technical problems of the prior art.

[0005] In a first aspect, embodiments of this disclosure provide a method for determining template quality, the method comprising:

[0006] Obtain a first video and a template, wherein the first video is a video generated based on the editing function to be tested, and the template is a template used to generate the first video;

[0007] A second video is generated based on the template;

[0008] The quality of the template is determined based on the first video and the second video.

[0009] Secondly, embodiments of this disclosure provide a template quality determination apparatus, which includes an acquisition module, a generation module, and a determination module, wherein:

[0010] The acquisition module is used to acquire a first video and a template, wherein the first video is a video generated based on the editing function to be tested, and the template is a template for generating the first video;

[0011] The generation module is used to generate a second video based on the template;

[0012] The determining module is used to determine the quality of the template based on the first video and the second video.

[0013] Thirdly, embodiments of this disclosure provide a terminal device including: a processor and a memory;

[0014] The memory stores computer-executed instructions;

[0015] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the template quality determination method as described in the first aspect above and various possible aspects of the first aspect.

[0016] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the template quality determination method described in the first aspect above and various possible aspects of the first aspect.

[0017] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the template quality determination method described in the first aspect above and various possible aspects of the first aspect.

[0018] This disclosure provides a method, apparatus, and terminal device for determining template quality. The terminal device can acquire a first video and a template. The first video is a video generated based on the editing function to be tested, and the template is the template used to generate the first video. The terminal device can generate a second video based on the template and determine the quality of the template based on the first and second videos. In the above method, since the first video is the production video of the template and the second video is the consumption video of the template, the terminal device can quickly test the editing function to be tested based on the first and second videos, improving the testing efficiency of the editing function and the efficiency of determining the template quality. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0021] Figure 2 A flowchart illustrating a template quality determination method provided in this embodiment of the disclosure;

[0022] Figure 3 A schematic diagram illustrating the acquisition of a first image and a second image according to an embodiment of this disclosure;

[0023] Figure 4 This is a schematic diagram illustrating another method for acquiring a first image and a second image, provided as an embodiment of this disclosure.

[0024] Figure 5 This is a schematic diagram illustrating a method for determining the degree of difference provided in an embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram of a differential region provided in an embodiment of this disclosure;

[0026] Figure 7 A schematic diagram illustrating a process for determining a region of difference, provided in an embodiment of this disclosure;

[0027] Figure 8 A schematic diagram illustrating the determination of a first sub-image and a second sub-image according to an embodiment of this disclosure;

[0028] Figure 9 This is a schematic diagram of the structure of a template quality determination device provided in an embodiment of the present disclosure;

[0029] Figure 10 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Detailed Implementation

[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0031] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0032] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the terminal device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0033] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the terminal device.

[0034] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0035] For ease of understanding, the concepts involved in the embodiments of this disclosure will be explained below.

[0036] Terminal device: A device with wireless transceiver capabilities. Terminal devices can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted. These terminal devices can be mobile phones, tablet computers, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, vehicle-mounted terminal devices, wireless terminals in self-driving vehicles, wireless terminal devices in remote medical care, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, wireless terminal devices in smart homes, wearable terminal devices, etc. The terminal equipment involved in the embodiments of this disclosure may also be referred to as a terminal, user equipment (UE), access terminal equipment, vehicle-mounted terminal, industrial control terminal, UE unit, UE station, mobile station, mobile station, remote station, remote terminal equipment, mobile device, UE terminal equipment, wireless communication equipment, UE agent, or UE device, etc. The terminal equipment may also be fixed or mobile.

[0037] In related technologies, templates can improve the efficiency of video editing for users. For example, templates can include pre-designed video production frameworks, and can include elements such as text, images, audio, and animation. Users can input video materials into the template and obtain videos that match the template style. To ensure the effectiveness of the templates, the platform providing the templates needs to test the editing functions involved in the templates. For example, the editing functions involved in the templates can include font and text style editing, filter and special effects editing, transition effect editing, etc. Before the template is launched, the platform needs to ensure that the template effect is the same on each type of terminal device. Currently, the editing functions involved in the templates can be tested based on manual comparison. For example, users can add a piece of text to the template using a preset font, and manually identify whether the font of the text finally displayed is the preset font. If the font of the text is the preset font, the use of the preset font is determined to have passed the test; if the font of the text is not the preset font, the use of the preset font is determined to have failed the test. However, manual testing is time-consuming, resulting in low testing efficiency.

[0038] To address the technical problems in related technologies, this disclosure provides a method for determining template quality. A terminal device can acquire a first video and a template used in the first video, and generate a second video based on the template. The terminal device can then determine a first image and a second image based on the first and second videos, where the first image is an image from the first video and the second image is an image from the second video. Based on the first and second images, the terminal device can determine the quality of the template. In this method, since the first video is the production video of the template and the second video is the consumption video of the template, the terminal device can quickly determine the display effect of the template on the terminal device based on the difference between the first and second images. This eliminates the need for manual identification and allows for testing of the editing functions to be tested, improving the efficiency of testing editing functions and determining template quality.

[0039] Below, in conjunction with Figure 1 The application scenarios involved in the embodiments of this disclosure will be described.

[0040] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure. Please refer to [link / reference]. Figure 1The system includes terminal device 1, terminal device 2, and a server. Terminal device 1 can send video A to the server. The server can determine the template corresponding to video A and generate the URL of the template used by video A. The server can send video A and the URL to terminal device 2. Terminal device 2 can download the template based on the URL and generate video B based on the template. The terminal devices can determine whether the template effects of videos A and B are the same. If they are the same, the editing function under test has passed the test, and the template quality is high; if they are different, the editing function under test has failed the test, and the template quality is low. In this way, the terminal devices can automatically test the template editing function, improving testing efficiency and thus improving the efficiency of determining template quality.

[0041] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.

[0042] Figure 2 This is a flowchart illustrating a template quality determination method provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 2 The method process includes:

[0043] S201. Obtain the first video and template.

[0044] The execution entity of this disclosure embodiment can be a terminal device or a template quality determination device installed in the terminal device. The template quality determination device can be implemented in software, or it can be implemented using a combination of software and hardware; this disclosure embodiment does not limit this approach.

[0045] The first video is generated based on the editing functions to be tested. Video editing operations can be associated with editing functions. For example, if the video editing operation is adding text, it is associated with font and text style editing functions; if the video editing operation is adding filters, it is associated with filter and effects editing functions.

[0046] For example, if the video editing operation is to add text of font A, then the first video may include text of font A; if the video editing operation is to add filter B, then the first video may include filter B; if the video editing operation is to add sticker C, then the first video may include sticker C.

[0047] Optionally, the terminal device can receive a first video sent by other devices. For example, the terminal device can receive a first video sent by a server. For instance, the server may include multiple first videos, each associated with an editing function. The terminal device can obtain the first video from the server based on the editing function to be tested. For example, the server may include video A and video B, where video A includes filters and video B includes text. If the terminal device needs to test the editing functions of filters and effects, it can request video A from the server; if it needs to test the editing functions of fonts and text styles, it can request video B from the server.

[0048] Optionally, the server may include multiple first videos. For example, terminal device A can generate video 1 (e.g., based on Deeplink triggering the client to save the video of automated production), terminal device B can generate video 2, terminal device A can send video 1 to the server, and terminal device B can send video 2 to the server. In this way, the server can include video 1 and video 2, and terminal device C can retrieve video 1 and video 2 from the server.

[0049] The template is used to generate the first video. For example, if the first video includes text in font A, the template can include video editing operations for adding text in font A; if the first video includes filter B, the template can include video editing operations for adding filter B; if the first video includes filter C, the template can include video editing operations for adding filter C.

[0050] The template may include the editing functions to be tested. For example, if the template includes video editing operations for adding fonts, then the template may include editing functions for fonts and text styles; if the template includes video editing operations for adding filters, then the template may include editing functions for filters and effects.

[0051] The terminal device can obtain the first video and template using the following feasible implementation: receiving the first video and the template's Uniform Resource Locator (URL) sent by the server, and downloading the template based on the template's URL. For example, the server can receive the first video sent by other devices, determine the template used by the first video based on it, and generate the corresponding URL. The terminal device can then download the template based on this URL. In this way, any terminal device can obtain the template and test the editing function to be tested, improving testing efficiency.

[0052] S202. Generate a second video based on the template.

[0053] The second video can be a video automatically generated by the terminal device based on a template. For example, after obtaining a template, the terminal device can trigger a client through Deeplink to consume the template and automatically generate and save the corresponding second video. For example, the terminal device can automatically select video footage and add that video footage to the template to obtain the second video.

[0054] Optionally, both the first and second videos are generated based on a template. The first video can be a production video generated from the template, and the second video can be a consumption video generated from the template. For example, the first and second videos can be generated using the template on different types of terminal devices. For instance, terminal device 1 and terminal device 2 have different device types. Terminal device 1 can generate the first video, and terminal device 2 can generate the second video based on the template of the first video. In this way, terminal device 2 can determine whether the effect of the template changes on terminal device 2 based on the first and second videos, thereby improving the efficiency and accuracy of the test.

[0055] Optionally, after generating a second video based on the template, the terminal device can store the second video. For example, the terminal device can store the second video based on a preset path.

[0056] Optionally, the terminal device can automatically generate a first video and send it to the server. For example, the terminal device can obtain test requirements, which may include the editing function to be tested and related materials (such as added text content, added filter icons, etc.). Based on the test requirements, the terminal device can generate a first video. For example, if the test requirements include Song typeface icons and the text "ABCD", the terminal device can automatically select an image (which can be a blank image) and add Song typeface "ABCD" to that image to obtain the first video.

[0057] S203. Determine the quality of the template based on the first video and the second video.

[0058] The terminal device can determine the quality of the template based on the following feasible implementation: determining the first image and the second image based on the first video and the second video, and determining the quality of the template based on the first image and the second image.

[0059] The first image can be an image from the first video. For example, the first image can be any image from the first video. For example, the first video may include image 1, image 2, and image 3, and the first image can be image 1 from the first video, or it can be image 2 and image 3 from the first video.

[0060] The second image can be an image from the second video. For example, the first image can be any image from the second video. For example, the second video can include image 1, image 2, and image 3, and the second image can be image 1 from the second video, or it can be images 1, 2, and 3 from the second video.

[0061] Optionally, the terminal device may determine a first image in a first video and, based on the first image, determine a second image in a second video. For example, the first video may include 10 images, and the second video may also include 10 images. If the first image is the third image in the first video, then the second image may also be the third image in the second video. If the first image is the tenth image in the first video, then the second image may also be the tenth image in the second video.

[0062] Optionally, the terminal device may also determine the second image in the second video and determine the first image in the first video based on the second image. For example, if the second image is the third image in the second video, then the first image may also be the third image in the first video.

[0063] Optionally, the terminal device may acquire a first image and a second image from the first video and the second video based on a preset strategy. For example, if the preset strategy is to acquire images at equal intervals, the terminal device may acquire the first image in the first video at equal intervals and the second image in the second video at equal intervals.

[0064] Below, in conjunction with Figures 3-4 The process of acquiring the first and second images is explained.

[0065] Figure 3 This is a schematic diagram illustrating the acquisition of a first image and a second image, provided as an embodiment of this disclosure. Please refer to [link / reference]. Figure 3 This includes: a first video and a second video. The first video (9 frames) includes image 1, image 2, ..., image 9, and the second video (9 frames) includes image a, image b, ..., image i. If the terminal device ( Figure 3 (Not shown) If the first images are determined to be image 1 (frame 1) and image 9 (frame 9) in the first video, the terminal device can acquire frames 1 and 9 in the second video to obtain the second image. The second image may include image a and image i. This allows the terminal device to flexibly acquire both the first and second images, improving the flexibility of the test.

[0066] Figure 4 This is a schematic diagram illustrating another method for acquiring a first image and a second image, provided as an embodiment of this disclosure. Please refer to [link / reference]. Figure 4This includes: a first video and a second video. The first video (9 frames) includes image 1, image 2, ..., image 9, and the second video (9 frames) includes image a, image b, ..., image i. If the terminal device ( Figure 4 (Not shown) By extracting one image every frame, the terminal device can obtain frames 1, 3, 5, 7, and 9 from the first video to obtain the first image. The first image may include image 1, image 3, image 5, image 7, and image 9. The terminal device can also extract frames 1, 3, 5, 7, and 9 from the second video to obtain the second image. The second image may include image a, image c, image e, image g, and image i. In this way, the terminal device can quickly obtain the first and second images from the first and second videos based on a preset strategy, improving testing efficiency.

[0067] Optionally, the terminal device can determine the quality of the template based on the first image and the second image. Specifically, this can involve determining the degree of difference between the first image and the second image, and then determining the quality of the template based on the degree of difference. In this way, the terminal device can accurately test the editing function based on the degree of difference.

[0068] The difference degree can be used to indicate the similarity between the first image and the second image. For example, the greater the difference degree, the lower the similarity between the first image and the second image; the smaller the difference degree, the higher the similarity between the first image and the second image.

[0069] Optionally, if the difference between the first image and the second image is greater than a preset difference, the terminal device can determine that the editing function to be tested has failed the test; if the difference between the first image and the second image is less than or equal to the preset difference, the terminal device can determine that the editing function to be tested has passed the test.

[0070] For example, if the difference between the first image and the second image is greater than the preset difference, it means that the effect of applying the template to the first video and the second video is inconsistent. Therefore, the terminal device can determine that the editing function to be tested has failed the test. If the difference between the first image and the second image is less than or equal to the preset difference, it means that the effect of applying the template to the first video and the second video is consistent. Therefore, the terminal device can determine that the editing function to be tested has passed the test.

[0071] Optionally, when the number of first and second images is greater than one, the terminal device needs to determine the degree of difference between each group of first and second images, and determine the quality of the template based on multiple degree of difference. For example, the terminal device can acquire five groups of first and second images. If the degree of difference between each group of first and second images is less than or equal to a preset degree of difference, the terminal device can determine that the template's editing function has passed the test and the template quality is high. If the degree of difference between any group of first and second images is greater than the preset degree of difference, the terminal device can determine that the template's editing function has failed the test and the template quality is low.

[0072] It should be noted that the terminal device can group first images and second images that are in the same position together as a set of images. For example, if first image 1 is the first frame of the first video, first image 2 is the second frame of the first video, second image 3 is the first frame of the second video, and second image 4 is the second frame of the second video, the terminal device can group first image 1 and second image 3 together as a set of images, and first image 2 and second image 4 together as a set of images.

[0073] It should be noted that the preset difference degree can be any threshold such as 1%, 2%, 3%, etc., and this embodiment does not limit it.

[0074] This disclosure provides a method for determining template quality. A terminal device can receive a first video and a template URL sent by a server, download the template based on the template URL, generate a second video based on the template, and determine a first image and a second image based on the first and second videos. The terminal device can determine the degree of difference between the first and second images and determine the template quality based on this degree of difference. If the degree of difference is greater than a preset degree of difference, the terminal device can determine that the editing function under test has failed the test, and the template quality is low. If the degree of difference is less than or equal to the preset degree of difference, the terminal device can determine that the editing function under test has passed the test, and the template quality is high. In this way, the terminal device can quickly and accurately determine whether the effect of applying the template to the first and second videos is consistent, thereby improving the testing efficiency and accuracy of the editing function and increasing the efficiency of determining template quality.

[0075] exist Figure 2 Based on the embodiments shown, the following, in conjunction with Figure 5 The method for determining the difference between the first image and the second image in the above template quality determination method is explained in detail.

[0076] Figure 5 This diagram illustrates a method for determining the degree of difference according to an embodiment of this disclosure. Please refer to [link / reference]. Figure 5 The method process includes:

[0077] S501. Based on the first image and the second image, determine the difference region between the first image and the second image.

[0078] The difference region can be the area where the first image and the second image differ. For example, if the content of the first image and the second image differs in region 1, the terminal device can determine the difference region as region 1; if the content of the first image and the second image differs in region 2, the terminal device can determine the difference region as region 2.

[0079] Below, in conjunction with Figure 6 The differences in the regions are explained.

[0080] Figure 6 This is a schematic diagram of a differential region provided for an embodiment of this disclosure. Please refer to [link / reference]. Figure 6 This includes: a first image and a second image. The first image may include the text "ABCD", and the second image may also include the text "ABCD". Because the positions of "ABCD" in the first image and the second image are different, the terminal device ( Figure 6 (Not shown) The regions including “ABCD” in the first image and “ABCD” in the second image can be identified as the difference regions.

[0081] exist Figure 6 In the illustrated embodiment, if the angles of "ABCD" are different, there will also be a difference area between the first image and the second image.

[0082] The terminal device can determine the difference region based on the following feasible implementation: subtracting the first image from the second image to obtain the third image, performing noise reduction processing on the third image to obtain the fourth image, and determining the difference region in the fourth image. In this way, since the terminal device can perform noise reduction processing on the third image, interference can be reduced and the accuracy of the difference region can be improved.

[0083] The third image can be a difference map between the first and second images. For example, the terminal device can subtract the pixel values ​​of the first image from the pixel values ​​of the second image to obtain the third image. In this way, the terminal device can accurately determine the difference between the first and second images based on the third image. For example, if both the first and second images are 10*10 images, the terminal device can subtract the pixel value of pixel (1,1) in the first image from the pixel value of pixel (1,1) in the second image to obtain the pixel value of pixel (1,1) in the third image, subtract the pixel value of pixel (1,2) in the first image from the pixel value of pixel (1,2) in the second image to obtain the pixel value of pixel (1,2) in the third image, and so on, until the pixel value of pixel (10,10) in the first image is subtracted from the pixel value of pixel (10,10) in the second image to obtain the pixel value of pixel (10,0) in the third image, thus obtaining the third image.

[0084] The fourth image can be the denoised version of the third image. For example, since the third image is a difference map between the first and second images, it may contain interference information (there is no actual difference, but it appears as a difference in the third image). After the terminal device performs noise reduction on the third image, the interference information can be removed, thereby improving the accuracy of determining the difference region.

[0085] Optionally, the terminal device may perform denoising processing on the third image based on any feasible denoising algorithm, and the embodiments disclosed herein are not limited in this regard.

[0086] Optionally, the terminal device determines the difference region in the fourth image. Specifically, it can do this by identifying a target pixel in the fourth image whose pixel value is greater than a preset pixel value, and then determining the difference region based on the target pixel.

[0087] The target pixel can be a pixel that differs between the first image and the second image. For example, since the fourth image is a noise-reduced difference map (a difference map between the first image and the second image), if the value of a pixel in the fourth image is greater than a preset pixel value, it means that the pixel is a difference pixel between the first image and the second image. Therefore, the area where the difference pixel is located can be a difference region.

[0088] Optionally, the terminal device can define the area where the target pixel is located as the difference region, or the terminal device can define a region that includes all target pixels (or a region that includes 95% of the target pixels) as the difference region.

[0089] Below, in conjunction with Figure 7 The process of determining the regions of difference is explained.

[0090] Figure 7This is a schematic diagram illustrating a process for determining a region of difference, as provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 7 This includes: a first image and a second image. The first image may include the text "A", and the second image may also include the text "A". Terminal device ( Figure 7 (Not shown) The pixel values ​​of the first image and the second image can be subtracted to obtain the third image, wherein the third image may include multiple target pixels.

[0091] Please see Figure 7 The terminal device can perform noise reduction processing on the third image to obtain a fourth image. The number of target pixels in the fourth image can be less than the number of target pixels in the third image. Based on the target pixels in the fourth image, the terminal device can determine a region that includes all target pixels. This region can be designated as the difference region, thus improving the accuracy of the difference region determination.

[0092] S502. Determine the degree of difference based on the difference region, the first image, and the second image.

[0093] The terminal device can determine the degree of difference based on the following feasible implementation: in the first image, a first sub-image of the difference region is determined, and in the second image, a second sub-image of the difference region is determined, and the degree of difference is determined based on the first sub-image and the second sub-image.

[0094] The first sub-image can be an image within a difference region of the first image. For example, the terminal device can obtain the first sub-image from the first image based on the coordinates of the difference region. For instance, the difference region is a rectangular region with vertex coordinates of (x1, y1), (x1, y2), (x2, y1), and (x2, y2). The terminal device can determine the first sub-image based on pixels that are greater than or equal to x1, less than or equal to x2, and greater than or equal to y1, less than or equal to y2.

[0095] The second sub-image can be an image in the difference region of the second image. The method by which the terminal device determines the second sub-image in the second image based on the difference region is similar to the method by which the terminal device determines the first sub-image in the first image based on the difference region. The embodiments disclosed herein will not be described in detail here.

[0096] Below, in conjunction with Figure 8 The process of determining the first sub-image and the second sub-image is explained.

[0097] Figure 8 This is a schematic diagram illustrating the determination of a first sub-image and a second sub-image according to an embodiment of this disclosure. Please refer to [link / reference]. Figure 8This includes a first image and a second image. Both the first and second images contain the text "A". Terminal device ( Figure 8 (Not shown) A first sub-image can be determined in a first image based on a difference region, wherein the bottom of the first sub-image is the letter "A". The terminal device can determine a second sub-image in the first image based on a difference region, wherein the top of the second sub-image is the letter "A".

[0098] Specifically, the terminal device determines the degree of difference based on the first sub-image and the second sub-image. This can be achieved by registering the first sub-image and the second sub-image to obtain the registered third sub-image and the fourth sub-image, and then determining the degree of difference based on the third sub-image and the fourth sub-image.

[0099] The third sub-image can be a sub-image registered with the first sub-image, and the fourth sub-image can be a sub-image registered with the second sub-image. For example, if the elements (such as text, filters, and stickers) in the first and second sub-images are the same, but their positions or angles differ, the terminal device can register the first and second sub-images to obtain the third and fourth sub-images. This avoids situations where small positional or angular deviations could cause the terminal device to determine that the editing function has failed the test, thus improving the accuracy of the test.

[0100] Optionally, the terminal device may register the second sub-image based on the first sub-image to obtain a third sub-image (which is the same as the first sub-image) and a fourth sub-image, or it may configure the first sub-image based on the second sub-image to obtain a third sub-image and a fourth sub-image (which is the same as the second sub-image). This embodiment of the present disclosure does not limit this.

[0101] Optionally, the terminal device can perform registration based on feature points. For example, the terminal device uses a first sub-image as a standard and obtains four feature points on the top, bottom, left, and right sides of the first sub-image. It also obtains four feature points on the top, bottom, left, and right sides of the second sub-image. Based on the positions of the four feature points in the first sub-image, the terminal device translates and / or rotates the four feature points in the second sub-image to align them with the four feature points in the first sub-image, thus obtaining a third sub-image (the first sub-image) and a fourth sub-image (the sub-image after alignment with the second sub-image).

[0102] Specifically, the terminal device determines the degree of difference based on the third and fourth sub-images. This can be done by subtracting the third and fourth sub-images to obtain the fifth sub-image, performing noise reduction on the fifth sub-image to obtain the sixth sub-image, and determining the degree of difference based on the sixth sub-image.

[0103] The fifth sub-image can be a difference map between the third and fourth sub-images. For example, the terminal device can subtract the pixel values ​​of the fourth sub-image from the pixel values ​​of the third sub-image to obtain the fifth sub-image. In this way, the terminal device can accurately determine the difference between the third and fourth sub-images based on the fifth sub-image.

[0104] The sixth sub-image can be the denoised version of the fifth sub-image. For example, the fifth sub-image may contain interference information. After the terminal device performs noise reduction on the fifth sub-image, the interference information can be removed, thereby improving the accuracy of determining the difference.

[0105] The terminal device can determine the degree of difference based on the pixel values ​​in the sixth sub-image. For example, the terminal device can identify pixels in the sixth sub-image whose pixel values ​​are greater than or equal to a preset threshold, and determine the degree of difference based on the proportion of pixels with pixel values ​​greater than or equal to the preset threshold in the sixth image. For example, pixels with pixel values ​​greater than or equal to the preset threshold in the sixth sub-image can be error pixels, and the proportion of error pixels among non-error pixels can be 1%, 2%, 3%, etc., which is not limited in this embodiment.

[0106] It should be noted that the degree of difference can also indicate rotation, number of pixel offsets, and scaling ratio, etc., and the embodiments disclosed herein do not limit this.

[0107] This disclosure provides a method for determining the degree of difference. A terminal device can subtract a first image from a second image to obtain a third image, perform noise reduction processing on the third image to obtain a fourth image, and identify the difference region in the fourth image. The terminal device can also identify a first sub-image of the difference region in the first image and a second sub-image of the difference region in the second image. The terminal device can register the first and second sub-images to obtain registered third and fourth sub-images. Subtracting the third and fourth sub-images yields a fifth sub-image, and performing noise reduction processing on the fifth sub-image yields a sixth sub-image. The degree of difference is then determined based on the sixth sub-image. In this way, the terminal device can accurately determine the degree of difference between the first and second images, thereby improving the accuracy of testing editing functions and the accuracy of determining template quality.

[0108] Figure 9 This is a schematic diagram of a template quality determination device provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 9 The template quality determination device 900 includes an acquisition module 901, a generation module 902, and a determination module 903, wherein:

[0109] The acquisition module 901 is used to acquire a first video and a template, wherein the first video is a video generated based on the editing function to be tested, and the template is a template for generating the first video;

[0110] The generation module 902 is used to generate a second video based on the template;

[0111] The determining module 903 is used to determine the quality of the template based on the first video and the second video.

[0112] According to one or more embodiments of this disclosure, the determining module 903 is specifically used for:

[0113] Based on the first video and the second video, a first image and a second image are determined, wherein the first image is an image from the first video and the second image is an image from the second video;

[0114] The quality of the template is determined based on the first image and the second image.

[0115] According to one or more embodiments of this disclosure, the determining module 903 is specifically used for:

[0116] Determine the degree of difference between the first image and the second image;

[0117] Based on the degree of difference, the quality of the template is determined.

[0118] According to one or more embodiments of this disclosure, the determining module 903 is specifically used for:

[0119] Based on the first image and the second image, determine the difference region between the first image and the second image;

[0120] The degree of difference is determined based on the difference region, the first image, and the second image.

[0121] According to one or more embodiments of this disclosure, the determining module 903 is specifically used for:

[0122] In the first image, a first sub-image is used to determine the difference region, and in the second image, a second sub-image is used to determine the difference region.

[0123] The degree of difference is determined based on the first sub-image and the second sub-image.

[0124] According to one or more embodiments of this disclosure, the determining module 903 is specifically used for:

[0125] The first sub-image and the second sub-image are registered to obtain the registered third sub-image and the fourth sub-image;

[0126] The degree of difference is determined based on the third sub-image and the fourth sub-image.

[0127] According to one or more embodiments of this disclosure, the determining module 903 is specifically used for:

[0128] Subtracting the third sub-image from the fourth sub-image yields the fifth sub-image;

[0129] The fifth sub-image is denoised to obtain the sixth sub-image, and the difference is determined based on the sixth sub-image.

[0130] According to one or more embodiments of this disclosure, the determining module 903 is specifically used for:

[0131] Subtract the first image from the second image to obtain the third image;

[0132] The third image is subjected to noise reduction processing to obtain a fourth image, and the difference region is determined in the fourth image.

[0133] According to one or more embodiments of this disclosure, the acquisition module 901 is specifically used for:

[0134] Receive the first video and the Uniform Resource Locator URL of the template sent by the server;

[0135] Download the template based on its URL.

[0136] The template quality determination device provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0137] Figure 10 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 10 The diagram illustrates a structural schematic suitable for implementing the terminal device 1000 of the embodiments of the present disclosure. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 10 The terminal device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0138] like Figure 10 As shown, the terminal device 1000 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the terminal device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0139] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows terminal device 1000 to exchange data via wireless or wired communication with other devices. Although Figure 10 A terminal device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0140] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.

[0141] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A 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 thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0142] The aforementioned computer-readable medium may be included in the aforementioned terminal device; or it may exist independently and not assembled into the terminal device.

[0143] The aforementioned computer-readable medium carries one or more programs, which, when executed by the terminal device, cause the terminal device to perform the method shown in the above embodiments.

[0144] This disclosure provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements various methods that may be involved in the above embodiments.

[0145] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements various methods that may be involved in the above embodiments.

[0146] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0148] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0149] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0150] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction 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 be, 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 machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0151] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0152] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0153] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and provisions. The data may include information, parameters and messages, such as flow switching indication information.

[0154] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0155] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments. Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely exemplary forms of implementing the claims.

Claims

1. A method for determining template quality, characterized in that, include: Obtain a first video and a template, wherein the first video is a video generated based on the editing function to be tested, and the template is a template used to generate the first video; A second video is generated based on the template; The quality of the template is determined based on the first video and the second video.

2. The method according to claim 1, characterized in that, Determining the quality of the template based on the first video and the second video includes: Based on the first video and the second video, a first image and a second image are determined, wherein the first image is an image from the first video and the second image is an image from the second video; The quality of the template is determined based on the first image and the second image.

3. The method according to claim 2, characterized in that, Determining the quality of the template based on the first image and the second image includes: Determine the degree of difference between the first image and the second image; The quality of the template is determined based on the degree of difference.

4. The method according to claim 3, characterized in that, Determining the degree of difference between the first image and the second image includes: Based on the first image and the second image, determine the difference region between the first image and the second image; The degree of difference is determined based on the difference region, the first image, and the second image.

5. The method according to claim 4, characterized in that, Determining the degree of difference based on the difference region, the first image, and the second image includes: In the first image, a first sub-image is used to determine the difference region, and in the second image, a second sub-image is used to determine the difference region. The degree of difference is determined based on the first sub-image and the second sub-image.

6. The method according to claim 5, characterized in that, Determining the difference degree based on the first sub-image and the second sub-image includes: The first sub-image and the second sub-image are registered to obtain the registered third sub-image and the fourth sub-image; The degree of difference is determined based on the third sub-image and the fourth sub-image.

7. The method according to claim 6, characterized in that, Determining the difference degree based on the third sub-image and the fourth sub-image includes: Subtracting the third sub-image from the fourth sub-image yields the fifth sub-image; The fifth sub-image is denoised to obtain the sixth sub-image, and the difference is determined based on the sixth sub-image.

8. The method according to any one of claims 4-7, characterized in that, The step of determining the difference region between the first image and the second image based on the first image and the second image includes: Subtract the first image from the second image to obtain the third image; The third image is subjected to noise reduction processing to obtain a fourth image, and the difference region is determined in the fourth image.

9. The method according to any one of claims 1-7, characterized in that, The process of obtaining the first video and template includes: Receive the first video and the Uniform Resource Locator URL of the template sent by the server; Download the template based on its URL.

10. A template quality determination device, characterized in that, It includes an acquisition module, a generation module, and a determination module, wherein: The acquisition module is used to acquire a first video and a template, wherein the first video is a video generated based on the editing function to be tested, and the template is a template for generating the first video; The generation module is used to generate a second video based on the template; The determining module is used to determine the quality of the template based on the first video and the second video.

11. A terminal device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the template quality determination method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the template quality determination method as described in any one of claims 1-9.

13. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the template quality determination method as described in any one of claims 1-9.