Visual verification method and system for multimedia files
The method and system for visual verification of multimedia files solves the problem of the inability to automatically identify the visual effects of multimedia files, and enables visual effect verification after automated testing, thereby improving the customer experience.
Patent Information
- Application Number
- CN202111270158.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-10-29
AI Technical Summary
In existing technologies, the visual effects of multimedia files cannot be identified through automated testing, resulting in insufficient aesthetics of multimedia files in software and a poor user experience.
A method and system for visual verification of multimedia files are provided. The method obtains multimedia files through automated test scripts, determines whether a benchmark file for visual verification exists, compares the benchmark file if it exists, and stores the benchmark file if it does not exist. The method then verifies the files using similarity comparison or pixel comparison algorithms and sends a visual verification report for correction.
After automated testing, further verification of the visual effects of multimedia files is conducted to enhance the customer experience and ensure that the visual effects of multimedia files meet the standards.
Smart Images

Figure CN115249309B_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of computer technology. More specifically, this disclosure relates to a method and system for visual verification of multimedia files. Background Technology
[0002] With the development of computer networks, the amount of data displayed to users online is constantly increasing, and the types of visual information provided to users are becoming increasingly diverse, such as pushed articles, videos, and images. Each of these types of information contains a large amount of data. The integration of these various media—videos, sounds, images, text, animations, etc.—into a cohesive whole, capable of achieving certain functions, is commonly referred to as multimedia. A multimedia file represents the various encoded data of the media stored in the computer as a file; it is a collection of binary data.
[0003] In existing technologies, some software development may involve the design of multimedia files. The functions implemented by multimedia files are usually evaluated through automated testing along with the software functions. However, the visual effects of multimedia files cannot be identified through automated testing, resulting in insufficient aesthetics of multimedia files in some software, failing to meet users' visual requirements, and leading to a poor customer experience.
[0004] Therefore, how to obtain an optimized visual verification method and system for multimedia files is a problem that needs to be solved in the existing technology. Summary of the Invention
[0005] In order to at least partially solve the technical problems mentioned in the background art, the present disclosure provides a visual verification method and system for multimedia files.
[0006] According to a first aspect of this disclosure, a method for visual verification of a multimedia file is provided, wherein the method includes: acquiring the multimedia file, wherein the multimedia file is exported by an automated test script; determining whether there is a corresponding benchmark file for visual verification in an automated test branch bound to the multimedia file; if yes, comparing the multimedia file with the benchmark file; if no, storing the multimedia file as a benchmark file for visual verification of the automated test branch.
[0007] Optionally, comparing the multimedia file with the benchmark file includes: if the multimedia file is not similar to the benchmark file, then sending a visual verification report to one or more verification terminals.
[0008] Optionally, the verification end includes a development end and / or a testing end, and the verification end is used to correct the multimedia file according to the visual verification report.
[0009] Optionally, the algorithm used to compare the multimedia file with the reference file is a similarity comparison algorithm or a pixel comparison algorithm.
[0010] Optionally, the method further includes: detecting the status of the automated test script before acquiring the multimedia file; if the detection passes, acquiring the multimedia file and visually verifying it; if the detection fails, the automated test fails, and there is no need to visually verify the multimedia file again.
[0011] Optionally, the multimedia file is inspected by multiple inspection terminals, and all inspection terminals pass the inspection.
[0012] According to a second aspect of this disclosure, a visual verification system for multimedia files is provided, wherein the system comprises: an acquisition module configured to acquire the multimedia file, wherein the multimedia file is exported by an automated test script; a judgment module configured to determine whether an automated test branch bound to the multimedia file has a corresponding benchmark file for visual verification; a comparison module configured to compare the multimedia file with the benchmark file when the benchmark file exists in the automated test branch; and a storage module configured to store the multimedia file as a benchmark file for visual verification of the automated test branch when the benchmark file does not exist in the automated test branch.
[0013] Optionally, the comparison module includes a sending subunit, which is used to send a visual verification report to one or more verification terminals when the multimedia file is not similar to the reference file.
[0014] Optionally, the comparison module is used to compare the multimedia file with the reference file using a similarity comparison algorithm or a pixel comparison algorithm.
[0015] Optionally, the system further includes a detection module, which is used to detect the status of the automated test script before acquiring the multimedia file.
[0016] Optionally, the multimedia file is inspected by multiple inspection terminals, and all inspection terminals pass the inspection.
[0017] According to a third aspect of this disclosure, an electronic device is provided, wherein the electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method of the first aspect of this disclosure described above.
[0018] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program that, when executed, implements the method of the first aspect of this disclosure.
[0019] The visual verification method and system for multimedia files disclosed herein can be used to further perform automatic visual verification on multimedia files in automated test scripts after automated testing, thereby further ensuring the visual effect of multimedia files and improving customer experience. Attached Figure Description
[0020] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. In the drawings, several embodiments of this disclosure are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein:
[0021] Figure 1 This is a flowchart illustrating a visual verification method for multimedia files according to an embodiment of the present disclosure;
[0022] Figure 2 This is a schematic block diagram illustrating a visual verification system for multimedia files according to an embodiment of the present disclosure. Detailed Implementation
[0023] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0024] The specific embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0025] This disclosure provides a visual verification method for multimedia files. (Refer to...) Figure 1 , Figure 1 This is a flowchart illustrating a visual verification method for multimedia files according to an embodiment of the present disclosure. Figure 1As shown, the method includes the following steps S101-S102. Step S101: Obtain the multimedia file, wherein the multimedia file is exported by an automated test script. Step S102: Determine whether the automated test branch bound to the multimedia file has a corresponding benchmark file for visual verification; if yes, compare the multimedia file with the benchmark file; if not, store the multimedia file as the benchmark file for visual verification of the automated test branch.
[0026] The visual verification method and system for multimedia files disclosed herein can be used to further visually verify the multimedia files in the automated test scripts after automated testing, thereby ensuring the visual effect of the multimedia files and improving the customer experience.
[0027] In step S101, the multimedia file can be obtained, wherein the multimedia file is exported by an automated test script.
[0028] According to embodiments of this disclosure, the multimedia file to be visually verified is exported by an automated test script. That is, after the automated test is completed, the multimedia file is exported from the automated test script and uploaded to the visual verification system for the multimedia file.
[0029] Specifically, multimedia files exported from automated test scripts can be uploaded through the upload interface (API) of the multimedia file visual verification system. These multimedia files are bound to automated test branches, which include sub-branches and master branches. Sub-branches and master branches have a direct or indirect hierarchical relationship, and the master branch can be the parent branch of the sub-branches or a higher-level branch.
[0030] In step S102, it can be determined whether there is a corresponding benchmark file for visual verification for the automated test branch bound to the multimedia file; if yes, the multimedia file is compared with the benchmark file; if no, the multimedia file is stored as the benchmark file for visual verification of the automated test branch.
[0031] According to embodiments of this disclosure, during visual verification, the first step is to determine whether the automated test branch bound to the multimedia file has a corresponding benchmark file for visual verification. Typically, if the automated test branch is a newly created branch, then no benchmark file for visual verification has been established for that branch. In this case, the multimedia file can be stored as the benchmark file for visual verification of that automated test branch, for use in the visual verification of subsequent related multimedia files of that automated test branch. It is understood that before storing the multimedia file as the benchmark file for visual verification of its bound automated test branch, the visual effect of the multimedia file can be manually verified. Once verified, it can be used as the benchmark file for visual verification of that automated test branch to ensure the effectiveness of the visual verification of that automated test branch.
[0032] Furthermore, if the automated test branch is a sub-branch, and the multimedia file serves as the visual verification benchmark file for the sub-branch, then when the sub-branch is merged into the main branch, it is necessary to further determine whether the main branch has a corresponding benchmark file for visual verification. If not, the multimedia file is further transferred to the main branch as the visual verification benchmark file for the main branch, so as to be used for the visual verification of the multimedia file of the main branch.
[0033] If a corresponding benchmark file for visual verification already exists for this automated testing branch, the multimedia file is compared with that benchmark file. The comparison preferably uses a similarity matching algorithm or a pixel matching algorithm. The structural similarity (SSIM) algorithm is commonly used to measure image similarity and can also be used to judge the quality of compressed images. SSIM consists of three parts: brightness comparison, contrast comparison, and structural comparison; SSIM is a number between 0 and 1, and the larger the SSIM, the smaller the difference between the two images. The pixel matching algorithm (PixelMatch) is essentially a minimal, simple, and fastest JavaScript pixel-level image comparison library. It is suitable for raw image data arrays, is fast, and can be used in any environment (Node.js or browser).
[0034] Specifically, taking visual verification of video files as an example, FFmpeg is first used to extract frames from the video file, and then SSIM similarity comparison is performed frame by frame. The comparison result can be similar or dissimilar. If the comparison result is similar, it means that the visual effect of the multimedia file meets the standard of the benchmark file, and the visual verification passes. If the comparison result is dissimilar, it means that the multimedia file does not meet the visual effect of the benchmark file, and a visual verification report is sent to one or more verification endpoints. FFmpeg is a multimedia video processing tool that can be used to record, convert, and stream digital audio and video. It has very powerful functions, including video capture, video format conversion, video screenshotting, and adding watermarks to videos.
[0035] The visual verification report describes the visual verification process and may include the comparison results, the algorithm used for comparison, and the main reasons for dissimilarity. The visual verification report can be sent to the verification end in any feasible manner, such as wired or wireless transmission, transmission via communication tools or platforms, and encrypted or unencrypted transmission. The verification end may include a development end and / or a testing end, and is used to correct the multimedia file based on the visual verification report.
[0036] As a preferred embodiment, the visual verification method for multimedia files further includes: detecting the status of the automated test script before acquiring the multimedia file; if the detection passes, acquiring the multimedia file and visually verifying it; if the detection fails, the automated test fails, and there is no need to perform visual verification on the multimedia file again.
[0037] This preferred embodiment detects abnormal scripts in advance by checking the status of the automated test scripts, thereby avoiding unnecessary visual verification and improving the efficiency of visual verification.
[0038] It is understandable that checking the status of the automated test script before acquiring the multimedia file is a preferred technique in the visual verification method for multimedia files disclosed herein. If the check fails, the multimedia file can still be acquired and visually verified.
[0039] Preferably, the multimedia file is inspected by multiple inspection terminals, and all inspection terminals pass the inspection.
[0040] Specifically, in the embodiments of this disclosure, multiple acceptance terminals, including development, testing, and user terminals, are used to accept multimedia files. Each of the development, testing, and user terminals can include one or more, with the specific number configured according to actual needs. User terminals can be selected from external target user groups or composed of internal personnel familiar with the requirements. Acceptance terminals can be the same as or different from verification terminals, and there can be overlap between them; they can be terminals or programs, without particular limitation. Multiple acceptance terminals can accept multimedia files based on the same or different acceptance items. For example, multiple acceptance terminals can separately accept multimedia files based on aspects such as materials, functions, layout, special effects, response / feedback patterns, and / or their fit with the requirements, or all acceptance terminals can uniformly and comprehensively accept the multimedia file. Only when all acceptance terminals pass the acceptance results will the multimedia file undergo further visual verification.
[0041] The visual verification method for multimedia files in this embodiment only performs visual verification on multimedia files that have passed the acceptance test. This allows for the timely detection of multimedia files that do not meet the requirements or have defects, avoiding unnecessary visual verification processes and resource consumption.
[0042] It is understandable that multi-terminal acceptance of multimedia files is only a further optimization of the technical solution disclosed herein. Visual verification can be performed directly without multi-terminal acceptance of multimedia files, and the technical effect of this disclosure can be achieved in the same way.
[0043] This disclosure also provides a visual verification system for multimedia files. This system is used to perform the above-described combinations. Figure 1 The steps in the embodiments of the visual verification method for multimedia files described herein.
[0044] Reference Figure 2 , Figure 2 This is a schematic block diagram illustrating a visual verification system 100 for multimedia files according to an embodiment of the present disclosure. The system 100 includes an acquisition module 101, a judgment module 102, a comparison module 103, and a storage module 104. The acquisition module 101 is configured to acquire the multimedia file, wherein the multimedia file is exported from an automated test script. The judgment module 102 is configured to determine whether a corresponding benchmark file for visual verification exists in the automated test branch bound to the multimedia file. The comparison module 103 is configured to compare the multimedia file with the benchmark file if the benchmark file exists in the automated test branch. The storage module 104 is configured to store the multimedia file as a benchmark file for visual verification of the automated test branch if the benchmark file does not exist in the automated test branch.
[0045] According to an embodiment of this disclosure, the comparison module 103 includes a sending subunit, which is used to send a visual verification report to one or more verification terminals when the multimedia file is not similar to the reference file.
[0046] According to embodiments of this disclosure, the system includes one or more verification terminals, the verification terminals including development terminals and / or testing terminals, and the verification terminals are used to correct the multimedia file according to the visual verification report.
[0047] According to embodiments of this disclosure, the comparison module 103 is used to compare the multimedia file with the reference file using a similarity comparison algorithm or a pixel comparison algorithm.
[0048] According to an embodiment of this disclosure, the system further includes a detection module, which is used to detect the status of the automated test script before acquiring the multimedia file.
[0049] According to embodiments of this disclosure, the system may further include an acceptance module, which includes multiple acceptance terminals for accepting the multimedia file. When all acceptance terminals pass the acceptance test, the acquisition module 101 acquires the multimedia file.
[0050] It is understood that the verification end, the detection module and / or the acceptance end can be different hardware modules or software programs based on the same / different hardware platforms, or they can be the same or similar hardware modules or software programs, without any particular limitation here.
[0051] It is understandable that the above references Figure 2 The described embodiment of the multimedia file visual verification system, wherein the specific manner in which each module performs its operations has been incorporated into the system. Figure 1 The embodiments of the visual verification method for multimedia files described herein have been described in detail, and will not be elaborated upon here.
[0052] This disclosure also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it performs the following steps: acquiring the multimedia file, wherein the multimedia file is exported by an automated test script; determining whether there is a corresponding benchmark file for visual verification in the automated test branch bound to the multimedia file; if yes, comparing the multimedia file with the benchmark file; if no, using the multimedia file as the benchmark file for visual verification of the automated test branch.
[0053] It is understood that the steps implemented by the processor when executing the computer program are basically the same as the implementation of each step in the above method. The specific implementation has been described in detail in the embodiments of the visual verification method for multimedia files, and will not be elaborated here.
[0054] In another aspect, this disclosure provides a computer-readable storage medium storing a computer program that, when executed, performs the following steps: acquiring the multimedia file, wherein the multimedia file is exported by an automated test script; determining whether there exists a corresponding benchmark file for visual verification in the automated test branch bound to the multimedia file; if yes, comparing the multimedia file with the benchmark file; if no, using the multimedia file as the benchmark file for visual verification of the automated test branch.
[0055] It is understood that the steps implemented by the processor when executing the computer program are basically the same as the implementation of each step in the above method. The specific implementation has been described in detail in the embodiments of the visual verification method for multimedia files, and will not be elaborated here.
[0056] The embodiments of this disclosure have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this disclosure. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of this disclosure. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this disclosure. Therefore, the content of this specification should not be construed as a limitation of this disclosure.
[0057] It should be understood that the terms "first" and "second," etc., in the claims, specification, and drawings of this disclosure are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "including" as used in the specification and claims of this disclosure indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0058] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. As used in this disclosure and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this disclosure and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0059] The embodiments of this disclosure have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this disclosure. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this disclosure. Furthermore, any changes or modifications made by those skilled in the art based on the ideas of this disclosure, and on the specific implementation methods and application scope of this disclosure, are all within the scope of protection of this disclosure. Therefore, the content of this specification should not be construed as a limitation of this disclosure.
Claims
1. A visual verification method for multimedia files, wherein, The method includes: Obtain the multimedia file, wherein the multimedia file is exported by an automated test script; Determine whether the automated test branch bound to the multimedia file has a corresponding benchmark file for visual verification; If so, the multimedia file is compared with the benchmark file, including: if the multimedia file is not similar to the benchmark file, a visual verification report is sent to multiple verification terminals. The visual verification report includes the comparison result, the algorithm used for comparison, and the main reasons for the dissimilarity of the comparison result. The verification terminal includes a test terminal. The verification terminal is used to correct the multimedia file according to the visual verification report. The multimedia file is verified by multiple acceptance terminals, and the acceptance result of all acceptance terminals is passed. The multiple acceptance terminals include a development terminal, a test terminal, and a user terminal. If not, the multimedia file will be stored as a benchmark file for visual verification in the automated test branch.
2. The visual verification method for multimedia files according to claim 1, wherein, The algorithm used to compare the multimedia file with the reference file is a similarity comparison algorithm or a pixel comparison algorithm.
3. The visual verification method for multimedia files according to claim 2, wherein, The method further includes: Before acquiring the multimedia file, the status of the automated test script is checked; if the check passes, the multimedia file is acquired.
4. A visual verification system for multimedia files, wherein, The system includes: An acquisition module is configured to acquire the multimedia file, wherein the multimedia file is exported by an automated test script; The judgment module is configured to determine whether there is a corresponding benchmark file for visual verification in the automated test branch bound to the multimedia file; A comparison module is configured to compare the multimedia file with the benchmark file when the benchmark file exists in the automated test branch. The comparison module includes a sending subunit, which is used to send a visual verification report to multiple verification ends when the multimedia file is not similar to the benchmark file. The visual verification report includes the comparison result, the algorithm used for comparison, and the main reasons for the dissimilarity of the comparison result. The verification ends include a test end, which is used to correct the multimedia file according to the visual verification report. The multimedia file has been verified by multiple acceptance ends, and the verification result of all acceptance ends is passed. The multiple acceptance ends include a development end, a test end, and a user end. A storage module is configured to store the multimedia file as a benchmark file for visual verification of the automated test branch when the benchmark file is not present in the automated test branch.
5. The visual verification system for multimedia files according to claim 4, wherein, The comparison module is used to compare the multimedia file with the reference file using a similarity comparison algorithm or a pixel comparison algorithm.
6. The visual verification system for multimedia files according to claim 5, wherein, The system also includes a detection module, which is used to detect the status of the automated test script before acquiring the multimedia file.
7. An electronic device, wherein, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 3.
8. A computer-readable storage medium, wherein, The storage medium stores a computer program, which, when executed, implements the method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Method and device for testing software compatibility, server, equipment and storage medium
CN108920380A
Code verification method and device, computer equipment and storage medium
CN110134605A