Video recording test method, device, equipment and storage medium
Patent Information
- Application Number
- CN202211549745.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-12-05
AI Technical Summary
相关技术中,一般通过人工测试方法来测试录制视频中的各个互动环节,然而人工测试方式需要测试人员对录制视频的每个互动环节都进行测试,使得测试人员关注整个测试过程,因此,录制视频的测试过程会耗费大量人力成本和时间成本,有待改进
[0018] The technical solution provided in this disclosure has the following advantages compared with the prior art:
Smart Images

Figure CN115883820B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video testing technology, and in particular to a method, apparatus, device and storage medium for recording video tests. Background Technology
[0002] Recorded videos are the video presentation of the entire live broadcast process, and parameters such as playback speed and progress cannot be adjusted when playing recorded videos.
[0003] When playing recorded videos later, to ensure that the interactive elements in the recorded video replicate the live broadcast effect, the interactive elements in the recorded video need to be tested before playback. Related technologies typically use manual testing methods to test each interactive element in the recorded video. However, manual testing requires testers to test every single interactive element in the recorded video, keeping them focused on the entire testing process. Therefore, the testing process for recorded videos consumes significant manpower and time resources and needs improvement. Summary of the Invention
[0004] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and storage medium for recording video tests.
[0005] Firstly, this disclosure provides a method for recording video for testing, the method comprising:
[0006] Obtain the recorded video to be tested;
[0007] Identify the start and end times of each interactive video segment in the recorded video to be tested;
[0008] From the start time of the interaction to the end time of the interaction, each interactive video segment is tested to obtain the test results of the recorded video to be tested.
[0009] Secondly, this disclosure provides a video recording test apparatus, the apparatus comprising:
[0010] The acquisition module is used to acquire the recorded video to be tested.
[0011] The identification module is used to identify the start and end times of each interactive video segment in the video to be tested.
[0012] The testing module is used to test each interactive video segment from the start time of the interaction to the end time of the interaction, and obtain the test results of the recorded video to be tested.
[0013] Thirdly, embodiments of this disclosure also provide an electronic device, the device comprising:
[0014] processor;
[0015] Memory, used to store executable instructions;
[0016] The processor is used to read executable instructions from memory and execute the executable instructions to implement the method provided in the first aspect above.
[0017] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon, wherein the storage medium stores the computer program, and when the computer program is executed by a processor, the processor causes the processor to implement the method provided in the first aspect above.
[0018] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0019] This disclosure discloses a video recording testing method, apparatus, device, and storage medium. The method involves acquiring a recorded video to be tested; identifying the start and end times of interactions for each interactive video segment within the recorded video; and testing each interactive video segment from the start to the end time to obtain the test results for the recorded video. Therefore, before playing the recorded video, each interactive video segment can be automatically tested based on its start and end times. This ensures that when the recorded video is played back, each interactive element perfectly replicates the live broadcast effect. The testing process does not require personnel to intervene in each interactive element or constantly monitor the entire process, thus reducing the manpower and time costs associated with testing recorded videos. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart illustrating a video recording test method provided in this embodiment of the present disclosure;
[0023] Figure 2 This is a schematic diagram of the structure of a video recording test device provided in an embodiment of the present disclosure;
[0024] Figure 3This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0025] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0026] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0027] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0028] 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".
[0029] 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.
[0030] To solve the above problems, the following will combine... Figures 1 to 3 The video recording test method provided in this disclosure is described below. In this disclosure, the video recording test method can be executed by an electronic device or a server. Both the electronic device and the server are video recording test devices in this disclosure. The electronic device may include devices with communication functions such as mobile phones, tablets, desktop computers, and laptops. The server may be a cloud server or a server cluster, or other devices with storage and computing functions. It should be noted that the following embodiments use an electronic device as the execution subject for illustrative explanation.
[0031] Figure 1 A flowchart illustrating a video recording test method provided in an embodiment of this disclosure is shown.
[0032] like Figure 1 As shown, the video recording test method may include the following steps.
[0033] S110. Obtain the recorded video to be tested.
[0034] In this embodiment, in scenarios such as teaching classes and online shopping, teachers, livestreamers, and other users will play pre-recorded videos, allowing users to learn knowledge points or shop online by watching the recorded videos. To ensure that the interactive elements in the recorded videos completely replicate the livestream experience, the interactive elements in the recorded videos need to be tested before playback.
[0035] The video to be tested refers to a pre-recorded live video, and the playback parameters such as speed and progress in the video to be tested cannot be adjusted.
[0036] In one example, in a real classroom setting, the teacher can play pre-recorded teaching videos that include explanations of key concepts and interactive quiz segments, allowing students to learn by watching the videos. These videos contain two interactive segments: the explanation of key concepts and the quiz. To ensure that the explanations and quiz segments in the pre-recorded videos perfectly replicate the live streaming experience, these segments need to be tested before being played. After the pre-recorded videos pass the test, the teacher can then play them in class, allowing students to experience a live teaching process through watching the pre-recorded videos.
[0037] In another example, in a live-streaming sales scenario, the live-streaming host can play pre-recorded live-streaming sales videos that include product explanations, allowing viewers to shop online by watching the pre-recorded videos. These pre-recorded videos include an interactive product explanation segment. To ensure that the product explanation process in the pre-recorded videos perfectly replicates the live-streaming experience, the product explanation process needs to be tested before playing the pre-recorded videos. After the pre-recorded videos pass the test, the live-streaming host can then play them on the shopping platform, allowing viewers to experience the live-streaming sales process by watching the pre-recorded videos.
[0038] S120. Identify the start and end times of each interactive video segment in the recorded video to be tested.
[0039] Interactive video clips refer to the video frame sequences corresponding to interactive segments.
[0040] In some embodiments, S120 may specifically include the following steps:
[0041] Obtain the preset video tags corresponding to the video to be recorded for testing;
[0042] Read the time point tag content of each interactive video segment from the preset video tags, and determine the start time and end time of each interactive video segment.
[0043] The preset video tags are used to identify the video attributes of the video to be recorded for testing. Optionally, the preset video tags may include video type tags, start and end time tags of interactive video clips, interaction type tags of interactive video clips (e.g., quiz type, knowledge point explanation type, red envelope type), and name tags of interactive video clips (e.g., multiple choice question, trigonometric function, sending red envelopes), etc.
[0044] Specifically, the start and end time tags of each interactive video segment are selected from the preset video tags, and the text recognition technology is used to read the time tag content contained in the start and end time tags to obtain the interaction start time and interaction end time of each interactive video segment.
[0045] In other embodiments, S120 may specifically include the following steps:
[0046] Iterate through the video frames corresponding to each timestamp in the recorded video to be tested;
[0047] Identify the video content contained in the video frames corresponding to each timestamp, determine each interactive video segment, and obtain the start and end times of the interaction for each interactive video segment.
[0048] Specifically, video content recognition technology can be used to identify the video content contained in the video frames corresponding to each timestamp. If the video content belongs to the interactive type, the video segment corresponding to the interactive type is extracted as the interactive video segment, and the interactive start time and interactive end time of each interactive video segment are determined based on the timestamp.
[0049] Therefore, based on preset video tags, or based on the video content contained in the video frames corresponding to each timestamp, the start and end times of each interactive video segment can be determined.
[0050] S130. Test each interactive video segment from the start time to the end time of the interaction to obtain the test results of the recorded video to be tested.
[0051] In this embodiment, a pre-configured automated testing framework can be used to simulate the interactive nodes of each interactive video segment, and to test each interactive video segment from the start time to the end time of the interaction. If all interactive segments pass the test, the video to be tested is determined to have passed the test. If one interactive video segment fails the test, the video to be tested is determined to have failed the test.
[0052] In some embodiments, a thread can be started to call a pre-configured automated testing framework to simulate the interactive nodes of each interactive video segment, so as to test each interactive video segment from the start time of the interaction to the end time of the interaction, so that the recording process of the video to be tested is always executed by a single thread.
[0053] In other embodiments, at the start time of each interactive video segment, an idle thread is invoked to call a pre-configured automated testing framework, and the interactive nodes of each interactive video segment are simulated based on the automated testing framework. This enables testing of each interactive video segment from the start time to the end time of the interaction, ensuring that the recording process of the video to be tested is always executed by the same idle thread or different threads.
[0054] This disclosure provides a method for testing recorded videos, which involves acquiring a recorded video to be tested; identifying the start and end times of interactions for each interactive video segment in the recorded video; and testing each interactive video segment from the start to the end time to obtain the test results for the recorded video. Therefore, before playing the recorded video, each interactive video segment can be automatically tested based on its start and end times. This ensures that when the recorded video is played back, each interactive element can perfectly replicate the live broadcast effect. The testing process does not require personnel to intervene in each interactive element or constantly monitor the entire process, thus reducing the manpower and time costs associated with testing recorded videos.
[0055] In one embodiment of this disclosure, after obtaining the test result of the recorded video to be tested, the method further includes:
[0056] Based on the timestamps corresponding to each interactive video segment, the test data for each interactive video segment included in the test results is displayed on the user interface; or,
[0057] Based on the timestamps corresponding to each interactive video segment, the test data for each interactive video segment included in the test results are converted into images and displayed on the user interface; or,
[0058] Based on the timestamps corresponding to each interactive video segment, the test data of each interactive video segment included in the test results is displayed on the user interface, and the test data of each interactive video segment included in the test results is converted into images and displayed on the user interface.
[0059] In this embodiment, the test data of each interactive video segment can be nested on multiple pages of the user interface, allowing users to view the test results on different pages by flipping through pages, or to display them on a single page.
[0060] For example, the video to be recorded is an instructional video, and the interactive video clips include a red envelope distribution clip, a voting clip, and a quiz clip. The test data for the red envelope distribution clip includes: verifying the existence of the red envelope; the test data for the voting clip includes: the game voting question loading successfully, verifying the existence of voting option A, verifying the existence of voting option B, verifying the selected option, and verifying the removal of the voting option; the test data for the quiz clip includes: the interactive question loading successfully, the assertion answerer loading successfully, asserting the correct answer displayed correctly, the assertioner loading successfully, asserting the student's answer displayed correctly, and asserting the quiz answerer collapsing successfully. Furthermore, the test data corresponding to the red envelope distribution clip, voting clip, and quiz clip in the instructional video are displayed on the user interface in text form, or converted into images before being displayed on the user interface, or displayed on the user interface in both text and image form simultaneously.
[0061] Therefore, after the video to be tested has been tested, the test data of each interactive video segment can be displayed on the user interface in the form of text, images, or a combination of text and images. Testers only need to view the test data through the user interface to determine whether the video to be tested has passed the test, without having to pay attention to the entire testing process of the video to be tested, thereby reducing the manpower and time costs consumed in the testing process.
[0062] In another embodiment of this disclosure, a pre-configured automated testing framework can be invoked to generate automated test scripts and compile the automated test scripts, generate test commands, and then test each interactive video segment based on the test commands.
[0063] In some embodiments of this disclosure, the phrase "testing each interactive video segment from the start time to the end time of the interaction to obtain the test results of the recorded video to be tested" in the above embodiments includes:
[0064] Invoke the pre-configured automated testing framework and obtain the pre-edited automated test scripts corresponding to each interactive video segment;
[0065] Using an automated testing framework, the automated test scripts corresponding to each interactive video segment are compiled into test instructions for each interactive video segment;
[0066] From the start time of the interaction to the end time of the interaction, each interactive video segment is tested based on the test instructions of each interactive video segment to obtain the test results of the recorded video to be tested.
[0067] In this embodiment, the electronic device is pre-installed with an automated testing framework, and the automated test scripts pre-edited by the testers are further compiled using the automated testing framework to perform tests.
[0068] The automated test script is a test script edited based on each interactive video segment in the recorded video to be tested. Optionally, the automated test script includes the video name, each interactive video segment, the interaction logic of each interactive node in each interactive video segment, and the interaction result corresponding to each interaction logic.
[0069] In some embodiments, "using an automated testing framework, compiling the automated test scripts corresponding to each interactive video segment into test instructions for each interactive video segment" specifically includes the following steps:
[0070] Based on the automated testing framework, the interactive logic of each interactive node contained in each interactive video segment is read from the automated testing script;
[0071] The interactive logic of each interactive node contained in each interactive video segment is encapsulated into test instructions for each interactive video segment.
[0072] Understandably, automated test scripts are pre-edited by testers. Since these scripts are not part of the electronic device's system language, they cannot be directly read and executed by the device. Therefore, an automated testing framework is needed to compile these scripts, transforming them into test instructions that the electronic device can directly read and execute. Specifically, the automated testing framework reads the interaction logic of each interactive node within each interactive video segment from the automated test script, and encapsulates this logic into test instructions for each interactive video segment.
[0073] Interaction logic refers to the interaction method and execution order of each interaction node.
[0074] Among them, test instructions refer to system language instructions that carry interactive logic.
[0075] In one example, if the interactive video clip is a red envelope distribution clip, then the red envelope distribution clip includes interactive nodes such as red envelope distribution, red envelope clicking, and display of the amount after receiving the red envelope. The interactive logic includes red envelope distribution logic, red envelope clicking logic, and display of the amount after receiving the red envelope logic.
[0076] In another example, if the interactive video clip includes a multiple-choice question answering segment, then the multiple-choice question answering segment includes interactive nodes such as the answerer detection node, the answerer activation node, the question submission node, and the question answering result. The interactive logic includes answerer detection logic, answerer activation detection logic, question submission detection logic, and question answering result verification logic.
[0077] In another example, if the interactive video clip includes a voting clip, then the voting clip includes interactive nodes such as option appearance nodes and voting result display nodes. The interactive logic includes option appearance verification logic, voting result display logic, etc.
[0078] Therefore, manually edited automated test scripts can be compiled into test instructions that the device can read based on the automated testing framework, making it convenient for the device to perform tests based on the test instructions.
[0079] In some embodiments, "testing each interactive video segment based on the test instructions for each interactive video segment to obtain the test results of the recorded video to be tested" includes:
[0080] Based on the test instructions for each interactive video segment, simulate the interaction process of each interactive node in each interactive video segment to obtain the simulation results of each interactive segment;
[0081] Determine whether the simulation result of each interactive node is the same as the actual result of each interactive node in the interactive video segment in which it is located;
[0082] If they are the same, the video to be recorded is determined to have passed the test; otherwise, the video to be recorded is determined to have failed the test.
[0083] The actual result of each interactive node refers to the real interactive result during the live broadcast corresponding to the video to be tested.
[0084] Understandably, since the automated test scripts are edited by testers based on the interactive video segments in the video to be tested, the simulated results of each interactive step after executing the test instructions corresponding to each interactive video segment can realistically reflect the interactive process of each interactive video segment in the video to be tested. If the simulated result of each interactive node is the same as the actual result of each interactive node in the interactive video segment, then it is determined that each interactive video segment in the video to be tested is consistent with the actual interactive result during the live broadcast, and the video to be tested passes the test. If the simulated result of at least one interactive node is different from the actual result of the interactive node in the interactive video segment, then it is determined that each interactive video segment in the video to be tested is not completely consistent with the actual interactive result during the live broadcast, and the video to be tested fails the test.
[0085] Therefore, by executing test instructions that the device can read, each interactive node in each interactive video segment is simulated, and then by comparing the simulated results of each interactive node in the interactive video segment with the actual results of each interactive node, it is determined whether the recorded video under test passes the test. This process is executed automatically and can obtain reliable test results.
[0086] In summary, by using an automated testing framework, the automated test scripts obtained from editing each interactive video segment are encapsulated into test instructions that the system can directly read. Then, the interactive video segments are tested automatically according to the test instructions, which ensures the reliability of the testing process and reduces labor and time costs.
[0087] In another embodiment of this disclosure, during the entire testing process of the video to be tested, a single thread can always be used for testing, or an idle thread can be found at the start time of each interactive video segment to execute the test task of that interactive video segment.
[0088] In some embodiments of this disclosure, a single thread can be used for testing throughout the entire testing process of the recorded video to be tested. Therefore, the above embodiment's "testing each interactive video segment from the start time to the end time of the interaction to obtain the test results of the recorded video to be tested" includes:
[0089] Start the first target thread to execute the test task, and test each interactive video segment from the start time of the interaction to the end time of the interaction to obtain the test results of the recorded video to be tested.
[0090] The first target thread refers to any thread in the electronic device used to execute test tasks for each interactive video segment in the recorded video to be tested.
[0091] To reduce thread resource consumption during testing, the first target thread is kept idle when the current playback time of the video to be tested is not within the interaction start-to-end time of any interactive video segment. Correspondingly, in the process of "starting the first target thread for executing the test task, testing each interactive video segment from its interaction start-to-end time, and obtaining the test results of the video to be tested," the method further includes:
[0092] For any two adjacent interactive video segments, if the current playback time of the video to be tested is after the interaction end time corresponding to the current interactive video segment and before the interaction start time of the next interactive video segment, control the first target thread to switch from the test state to the idle state and calculate the waiting time for release idle time and the waiting time for end idle time.
[0093] The waiting time for release is the first interval from the current playback time to the testing of the next interactive video segment, and the waiting time for end of the idle period is the second interval from the current playback time to the completion of the testing of the next interactive video segment. The waiting time for release and the waiting time for end of the idle period are used to monitor the time for testing the next interactive video segment.
[0094] The current playback time refers to the timestamp of the currently playing video being recorded for testing.
[0095] In some embodiments, if the current playback time of the video to be tested is after the interaction end time corresponding to the current interactive video segment and before the interaction start time of the next interactive video segment, the waiting idle time can be calculated based on the start timestamp of the video to be tested, the interaction start time of the next interactive video segment, and the current playback time. This waiting idle time is used as the first interval time from the current playback time to testing the next interactive video segment, that is, determining how long it is necessary to wait from the current playback time before testing the next interactive video segment.
[0096] In other embodiments, if the current playback time of the video to be tested is after the interaction end time of the current interactive video segment and before the interaction start time of the next interactive video segment, the waiting time can be calculated based on the start timestamp of the video to be tested, the interaction end time of the next interactive video segment, and the current playback time. This waiting time is used as the second interval from the current playback time to the completion of the test on the next interactive video segment. In other words, it determines how long it will take to complete the test on the next interactive video segment from the current playback time, and then enters the idle state again.
[0097] Therefore, if a single thread is used for testing throughout the entire testing process of the recorded video, and this thread is not between the start and end times of any interactive video segment, then controlling this thread to switch from the testing state to the idle state helps reduce the consumption of thread resources. Furthermore, calculating the waiting time for publication and the waiting time for completion allows for monitoring the testing time of the next interactive video segment based on these waiting times, enabling timely switching of the first target thread's state.
[0098] In other embodiments of this disclosure, during the entire testing process of the recorded video to be tested, an idle thread is found at the start time of the interaction of each interactive video segment to execute the test task of that interactive video segment. Therefore, in the above embodiments, "testing each interactive video segment from the start time to the end time of the interaction to obtain the test result of the recorded video to be tested" includes:
[0099] If the video to be recorded for testing includes at least two interactive video segments, starting with the first interactive video segment in the video to be recorded for testing, for the current interactive video segment, if the current playback time of the video to be recorded for testing is the start time of the interaction of the current interactive video segment, the second target thread that is in an idle state is selected from multiple pre-set threads;
[0100] Start a second target thread to test the current interactive video segment from the start time of the interaction to the end time of the interaction;
[0101] The next interactive video segment is determined based on the timestamp of each interactive video segment. The above process is repeated until all interactive video segments in the video to be tested have been tested, and the test results of the video to be tested are obtained.
[0102] In this embodiment, multiple threads can be pre-configured, with different threads executing application startup tasks, application running tasks, and test tasks for the recorded video to be tested. For any given thread, if it is not executing any task, it is idle. Thus, starting with the first interactive video segment, for any current interactive video segment, a polling method can be used. If the current playback time of the recorded video to be tested is the start time of the current interactive video segment, an idle thread is selected from the pre-configured multiple threads as the second target thread. Then, the second target thread is started and used to test any current interactive video segment, starting from the first interactive segment. Further, after the current interactive video segment test is completed, the recorded video to be tested is played according to the timestamps of each interactive video segment. If the current playback time is the start time of the next interactive video segment, the idle second target thread is selected from the pre-configured multiple threads again, and the second thread is used to test the next interactive video segment. This process is repeated until all interactive video segments in the recorded video to be tested have been tested.
[0103] To ensure the orderly execution of different tasks within the device, or to improve the utilization of thread resources within the device, after executing "start a second target thread and test the current interactive video segment from the start time to the end time of the current interactive video segment," the method further includes:
[0104] If the current playback time is after the end time of the interaction corresponding to the current interactive video segment and before the start time of the interaction of the next interactive video segment, control the second target thread to execute a non-test task.
[0105] Non-test tasks can include tasks such as application startup tasks and application running tasks.
[0106] Therefore, at the start time of each interactive video segment, an idle thread is found to execute the test task of any interactive video segment. After the test task of any interactive video segment is completed, the second target thread is controlled to execute other non-test tasks, ensuring that different tasks in the device are executed in an orderly manner and improving the utilization rate of thread resources.
[0107] It should be noted that regardless of whether a single thread is used for testing throughout, or an idle thread is found at the start time of each interactive video segment to execute the test task for that segment, a pre-configured automated testing framework can be invoked. This framework retrieves pre-edited automated test scripts corresponding to each interactive video segment and compiles these scripts into test instructions for each segment. From the start time to the end time of the interaction, each interactive video segment is tested based on these instructions to obtain the test results for the recorded video. The process of generating test instructions and testing each interactive video segment based on these instructions can be found in the description of the foregoing embodiments and will not be repeated here.
[0108] This disclosure also provides a video recording test apparatus for implementing the above-described video recording test method, which is described below in conjunction with... Figure 2 The following explanation is provided. In this embodiment, the video recording test device can be an electronic device or a server. Both electronic devices and servers are video recording test devices in this embodiment. The electronic device can include devices with communication functions such as mobile phones, tablets, desktop computers, and laptops. The server can be a cloud server or server cluster, or other devices with storage and computing functions.
[0109] Figure 2 A schematic diagram of the structure of a video recording test apparatus provided in an embodiment of this disclosure is shown.
[0110] like Figure 2 As shown, the video recording test device 200 may include:
[0111] Module 210 is used to acquire the recorded video to be tested;
[0112] The identification module 220 is used to identify the interaction start time and interaction end time corresponding to each interactive video segment in the video to be tested.
[0113] The testing module 230 is used to test each interactive video segment from the start time of the interaction to the end time of the interaction, and obtain the test results of the recorded video to be tested.
[0114] This disclosure provides a video recording testing apparatus that acquires a video to be tested; identifies the start and end times of interactions for each interactive video segment within the video; and tests each interactive video segment from the start to the end time to obtain the test results for the video. Therefore, before playing the recorded video, each interactive video segment can be automatically tested based on its start and end times. This ensures that when the recorded video is played back, each interactive element perfectly replicates the live broadcast effect. The testing process does not require personnel to intervene in each interactive element or constantly monitor the entire process, thus reducing the manpower and time costs associated with testing recorded videos.
[0115] In some optional embodiments, the identification module 220 is specifically used for:
[0116] Obtain the preset video tags corresponding to the video to be tested and recorded;
[0117] Read the time point tag content of each interactive video segment from the preset video tags, and determine the interaction start time and interaction end time of each interactive video segment.
[0118] In some optional embodiments, the test module 230 includes:
[0119] The calling unit is used to call the pre-configured automated testing framework and obtain the pre-edited automated testing scripts corresponding to each interactive video segment;
[0120] The compilation unit is used to compile the automated test scripts corresponding to each interactive video segment into test instructions for each interactive video segment using the automated test framework.
[0121] The first testing unit is used to test each interactive video segment based on the test instructions of each interactive video segment from the start time of the interaction to the end time of the interaction, and to obtain the test results of the recorded video to be tested.
[0122] In some optional embodiments, the compilation unit is specifically used for:
[0123] Based on the automated testing framework, the interactive logic of each interactive node contained in each interactive video segment is read from the automated testing script;
[0124] The interactive logic of each interactive node contained in each interactive video segment is encapsulated into test instructions for each interactive video segment.
[0125] In some optional embodiments, the test unit is specifically used for:
[0126] Based on the test instructions for each interactive video segment, simulate the interaction process of each interactive node in each interactive video segment to obtain the simulation result of each interactive segment;
[0127] Determine whether the simulation result of each interactive node is the same as the actual result of each interactive node in the corresponding interactive video segment;
[0128] If they are the same, the video to be tested is determined to have passed the test; otherwise, the video to be tested is determined to have failed the test.
[0129] In some optional embodiments, the test module 230 is specifically used to: start a first target thread for executing test tasks, test each interactive video segment from the start time of the interaction to the end time of the interaction, and obtain the test results of the recorded video to be tested.
[0130] In some optional embodiments, the test module 230 is further configured to: for any two adjacent interactive video segments, if the current playback time of the video to be tested is after the interaction end time corresponding to the current interactive video segment and before the interaction start time of the next interactive video segment, control the first target thread to switch from the test state to the idle state and calculate the waiting time for release idle time and the waiting time for end idle time;
[0131] The waiting time for release refers to the first interval from the current playback time to the testing of the next interactive video segment, and the waiting time for end of the waiting period refers to the second interval from the current playback time to the completion of the testing of the next interactive video segment. The waiting time for release and the waiting time for end of the waiting period are used to monitor the time for testing the next interactive video segment.
[0132] In some alternative embodiments, test module 230 includes:
[0133] The selection unit is configured to, if the video to be tested includes at least two interactive video segments, starting with the first interactive video segment in the video to be tested, select a second target thread that is in an idle state from a set of multiple threads for the current interactive video segment, provided that the current playback time of the video to be tested is the interaction start time of the current interactive video segment.
[0134] The activation unit is used to activate the second target thread and test the current interactive video segment from the start time of the interaction to the end time of the interaction.
[0135] The second testing unit is used to determine the next interactive video segment based on the timestamp of each interactive video segment, and repeat the above process until all interactive video segments in the video to be tested have been tested, and the test result of the video to be tested is obtained.
[0136] In some optional embodiments, the device further includes a display module; wherein the display module is used for:
[0137] Based on the timestamps corresponding to each interactive video segment, the test data for each interactive video segment included in the test results is displayed on the user interface; or,
[0138] Based on the timestamps corresponding to each interactive video segment, the test data of each interactive video segment included in the test results are converted into images and displayed on the user interface; or,
[0139] Based on the timestamps corresponding to each interactive video segment, the test data of each interactive video segment included in the test results is displayed on the user interface, and the test data of each interactive video segment included in the test results is converted into images and displayed on the user interface.
[0140] It should be noted that, Figure 2 The video recording test device 200 shown can perform... Figure 1 The various steps in the method embodiment shown are implemented. Figure 1 The processes and effects in the method embodiments shown are not described in detail here.
[0141] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform a method according to an embodiment of this disclosure.
[0142] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0143] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0144] refer to Figure 3The present invention describes a structural block diagram of an electronic device 300 that can serve as a server or client of the present disclosure. This device is an example of a hardware device applicable to various aspects of the present disclosure, and the electronic device 300 may be one form of the aforementioned video recording test device. The video recording test device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0145] like Figure 3 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. The RAM 303 may also store various programs and data required for the operation of the electronic device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0146] Multiple components in electronic device 300 are connected to I / O interface 305, including: input unit 306, output unit 307, storage unit 308, and communication unit 309. Input unit 306 can be any type of device capable of inputting information to electronic device 300. Input unit 306 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 307 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 304 may include, but is not limited to, disk and optical disk. Communication unit 309 allows electronic device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0147] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above. For example, in some embodiments, the video recording test method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 300 via ROM 302 and / or communication unit 309. In some embodiments, the computing unit 301 can be configured to perform the video recording test method by any other suitable means (e.g., by means of firmware).
[0148] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0149] 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.
[0150] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0151] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0152] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0153] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0154] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0155] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for recording video for testing, characterized in that, include: Obtain the recorded video to be tested, which is a pre-recorded live stream video; Identify the start and end times of each interactive video segment in the recorded video to be tested; Using a pre-configured automated testing framework, the interaction process of interactive nodes in each interactive video segment is simulated. From the start time of the interaction to the end time of the interaction, each interactive video segment is tested to obtain the test results of the recorded video to be tested.
2. The method according to claim 1, characterized in that, The process of identifying the start and end times of interactions for each interactive video segment in the recorded video to be tested includes: Obtain the preset video tags corresponding to the video to be tested and recorded; Read the time point tag content of each interactive video segment from the preset video tags, and determine the interaction start time and interaction end time of each interactive video segment.
3. The method according to claim 1, characterized in that, The method utilizes a pre-configured automated testing framework to simulate the interaction process of interactive nodes in each interactive video segment. From the start time of the interaction to the end time, each interactive video segment is tested to obtain the test results of the recorded video under test, including: Invoke the pre-configured automated testing framework and obtain the pre-edited automated testing scripts corresponding to each interactive video segment; Using the automated testing framework, the automated test scripts corresponding to each interactive video segment are compiled into test instructions for each interactive video segment; From the start time of the interaction to the end time of the interaction, the interactive video segments are tested based on the test instructions of each interactive video segment to obtain the test results of the recorded video to be tested.
4. The method according to claim 3, characterized in that, The step of using the automated testing framework to compile the automated test scripts corresponding to each interactive video segment into test instructions for each interactive video segment includes: Based on the automated testing framework, the interactive logic of each interactive node contained in each interactive video segment is read from the automated testing script; The interactive logic of each interactive node contained in each interactive video segment is encapsulated into test instructions for each interactive video segment.
5. The method according to claim 3, characterized in that, The test command based on each interactive video segment is used to test each interactive video segment to obtain the test result of the recorded video to be tested, including: Based on the test instructions for each interactive video segment, simulate the interaction process of each interactive node in each interactive video segment to obtain the simulation result of each interactive node; Determine whether the simulation result of each interactive node is the same as the actual result of each interactive node in the interactive video segment in which it is located; If they are the same, the video to be tested is determined to have passed the test; otherwise, the video to be tested is determined to have failed the test.
6. The method according to claim 1, characterized in that, The process of testing each interactive video segment from the start time of the interaction to the end time of the interaction to obtain the test results of the recorded video to be tested includes: A first target thread is started to execute the test task. The interactive video segments are tested from the start time of the interaction to the end time of the interaction to obtain the test results of the recorded video to be tested.
7. The method according to claim 6, characterized in that, During the process of launching a first target thread for executing test tasks and testing each interactive video segment from the start time of the interaction to the end time of the interaction, the method further includes: For any two adjacent interactive video segments, if the current playback time of the video to be tested is after the interaction end time corresponding to the current interactive video segment and before the interaction start time of the next interactive video segment, control the first target thread to switch from the test state to the idle state and calculate the waiting time for release idle time and the waiting time for end idle time. The waiting time for release refers to the first interval from the current playback time to the testing of the next interactive video segment, and the waiting time for end of the waiting period refers to the second interval from the current playback time to the completion of the testing of the next interactive video segment. The waiting time for release and the waiting time for end of the waiting period are used to monitor the time for testing the next interactive video segment.
8. The method according to claim 1, characterized in that, The process of testing each interactive video segment from the start time of the interaction to the end time of the interaction to obtain the test results of the recorded video to be tested includes: If the video to be tested includes at least two interactive video segments, starting from the first interactive video segment in the video to be tested, for the current interactive video segment, if the current playback time of the video to be tested is the interaction start time of the current interactive video segment, a second target thread that is in an idle state is selected from a set of multiple threads. Start the second target thread and test the current interactive video segment from the start time of the interaction to the end time of the interaction; Based on the interaction start time of each interactive video segment, the next interactive video segment is determined, and the above process is repeated until all interactive video segments in the video to be tested have been tested, and the test result of the video to be tested is obtained.
9. The method according to claim 1, characterized in that, After testing each interactive video segment from the start time of the interaction to the end time of the interaction to obtain the test results of the recorded video to be tested, the method further includes: Based on the timestamps corresponding to each interactive video segment, the test data for each interactive video segment included in the test results is displayed on the user interface; or, Based on the timestamps corresponding to each interactive video segment, the test data of each interactive video segment included in the test results are converted into images and displayed on the user interface; or, Based on the timestamps corresponding to each interactive video segment, the test data of each interactive video segment included in the test results is displayed on the user interface, and the test data of each interactive video segment included in the test results is converted into images and displayed on the user interface.
10. A video recording testing device, characterized in that, include: The acquisition module is used to acquire the recorded video to be tested, which is a pre-recorded live video. The identification module is used to identify the start and end times of each interactive video segment in the video to be tested. The testing module is used to simulate the interaction process of interactive nodes in each interactive video segment using a pre-configured automated testing framework, and to test each interactive video segment from the start time of the interaction to the end time of the interaction, so as to obtain the test results of the recorded video to be tested.
11. An electronic device, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the method of any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, The storage medium stores a computer program that, when executed by a processor, causes the processor to implement the method described in any one of claims 1-9.
Citation Information
Patent Citations
Remote teaching scoring device and method
CN104112374A
Video detection method and device, electronic device and storage medium
CN110113630A