A method, apparatus, and electronic device for video stream clustering testing
By establishing a video monitoring database in video stress test and filtering abnormal images, the problems of low efficiency and poor accuracy of manual playback confirmation are solved, and the video test is automated and efficient and accurate test results are achieved.
Patent Information
- Application Number
- CN202111652095.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the video stress test of the in-vehicle infotainment system, the low efficiency and poor accuracy are confirmed through manual playback, resulting in low test efficiency and low accuracy.
Provide a video stream clustering test method, by performing video stress testing on target objects, obtaining monitoring videos, and establishing a video monitoring database based on video monitoring images and time information to filter abnormal video images.
It realizes the automation of video testing, saves human resources, improves testing efficiency and accuracy, and allows the entire testing process to be carried out in real time without the need for advance preparation.
Smart Images

Figure CN114329061B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video testing, and in particular to a video stream clustering test method, device and electronic device. Background Art
[0002] When conducting a long-term video stress test on an in-vehicle infotainment system, video display anomalies often occur. When testing a display system, usually the same video is played back repeatedly for a long time and in large quantities to achieve a stress test on the LCD display function. However, due to the long time, manual video playback confirmation consumes a lot of time and occupies a large amount of human resources. At the same time, there is a large error rate in manual playback confirmation, resulting in low overall test efficiency and poor accuracy. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a video stream clustering test method to solve the problems of low efficiency and poor accuracy in manual playback confirmation for video stress testing.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] Embodiments of the present invention provide a video stream clustering test method, including:
[0006] Conduct a video stress test on a target object, and obtain the monitoring video of the target object during the video stress test, where the monitoring video consists of multiple rounds of monitoring videos;
[0007] Obtain the video monitoring images of the first round of monitoring video and the time information corresponding to each frame of video monitoring image;
[0008] Establish a video monitoring database based on the correspondence between the video monitoring images and the time information;
[0009] Screen the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video images.
[0010] Optionally, the establishing a video monitoring database based on the correspondence between the video monitoring images and the time information includes:
[0011] Perform hashing on the video monitoring images to obtain the hash vectors of each frame of video monitoring image;
[0012] Perform clustering analysis on the hash vectors to obtain multiple vector groups, and record the central vectors of each vector group;
[0013] Establish a mapping between the time information and the central vectors based on the correspondence between the video monitoring images and the time information to obtain a video monitoring database.
[0014] Optionally, screening the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video monitoring images, including:
[0015] Successively obtain the current video monitoring image and the current time information corresponding to the current video monitoring image from the current round of monitoring videos;
[0016] Match the current time information with the video monitoring database to obtain the current central vector corresponding to the current video monitoring image;
[0017] Judge the current video monitoring image based on the current central vector to obtain abnormal video monitoring images, and return to successively obtain the current video monitoring image and the current time information corresponding to the current video monitoring image from the current round of monitoring videos until the test ends.
[0018] Optionally, judging the current video monitoring image based on the current central vector to obtain abnormal video monitoring images, including:
[0019] Perform hashing processing on the current video monitoring image to obtain the corresponding hash vector;
[0020] Calculate the pattern recognition similarity measure distance based on the current central vector for the hash vector to obtain the similarity distance;
[0021] Compare the similarity distance with a preset value, and obtain abnormal video monitoring images according to the comparison result.
[0022] Optionally, comparing the similarity distance with a preset value and obtaining abnormal video monitoring images according to the comparison result, including:
[0023] If the similarity distance is less than the preset value, determine that the current video monitoring image is a normal image;
[0024] If the similarity distance is greater than or equal to the preset value, determine that the current video monitoring image is an abnormal image and record the abnormal image.
[0025] Optionally, before obtaining the video images of the first round of monitoring videos and the time information corresponding to each frame of video image, the method further includes:
[0026] Normalize the video monitoring images according to a preset size;
[0027] Perform grayscale conversion on the normalized video monitoring images.
[0028] An embodiment of the present invention also provides a video stream clustering test device, including:
[0029] A test module, configured to perform a video stress test on a target object and obtain a monitoring video of the target object during the video stress test, where the monitoring video is composed of multiple rounds of monitoring videos;
[0030] A first acquisition module, configured to acquire video monitoring images of the first round of monitoring video and time information corresponding to each frame of the video monitoring images;
[0031] A building module, configured to build a video monitoring database based on the correspondence between the video monitoring images and the time information;
[0032] A monitoring module, configured to screen the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video images.
[0033] Optionally, the monitoring module includes:
[0034] A second acquisition module, configured to sequentially acquire a current video monitoring image and current time information corresponding to the current video monitoring image from the current round of monitoring video;
[0035] A matching module, configured to match the current time information with the video monitoring database to obtain a current central vector corresponding to the current video monitoring image;
[0036] A judgment module, configured to judge the current video monitoring image based on the current central vector to obtain an abnormal video monitoring image, and return to sequentially acquire the current video monitoring image and the current time information corresponding to the current video monitoring image from the current round of monitoring video until the test ends.
[0037] An embodiment of the present invention also provides an electronic device, including:
[0038] A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the video stream clustering test method provided by the embodiment of the present invention.
[0039] An embodiment of the present invention also provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the video stream clustering test method provided by the embodiment of the present invention.
[0040] The technical solution of the present invention has the following advantages:
[0041] A video stream clustering test method of the present invention performs a video stress test on a target object and obtains a monitoring video of the target object during the video stress test. The monitoring video consists of multiple rounds of monitoring videos; obtains the video monitoring images of the first round of monitoring video and the time information corresponding to each frame of the video monitoring image; establishes a video monitoring database based on the correspondence between the video monitoring images and the time information; screens the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video images. The present invention processes the monitoring video of the first round to establish a video monitoring database and uses the video monitoring database as the basis for subsequent multiple rounds of monitoring, enabling the entire test process to be carried out in real time without the need for prior preparation work; at the same time, through automated monitoring, a large amount of manpower and material resources are saved, and the efficiency and accuracy of monitoring are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0043] Figure 1 It is a flowchart of the video stream clustering test method in the embodiment of the present invention;
[0044] Figure 2 It is a schematic structural diagram of the video stream clustering test device in the embodiment of the present invention;
[0045] Figure 3 It is a schematic structural diagram of the electronic device in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0047] According to an embodiment of the present invention, an embodiment of a video stream clustering test method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0048] In this embodiment, a video stream clustering test method is provided, which can be used for the above-mentioned terminal devices, such as computers, etc. As Figure 1 shown, the video stream clustering test method includes the following steps:
[0049] Step S1: Perform a video stress test on the target object and obtain the monitoring video of the target object during the video stress test. The monitoring video consists of multiple rounds of monitoring videos. Specifically, during the video stress test, multiple rounds of monitoring are required to confirm whether problems such as display anomalies occur.
[0050] Step S2: Obtain the video monitoring images of the first round of monitoring video and the time information corresponding to each frame of the video monitoring image.
[0051] Step S3: Establish a video monitoring database based on the correspondence between the video monitoring images and the time information.
[0052] Step S4: Screen the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video images.
[0053] Specifically, in the prior art, it is carried out by recording manual playback, which wastes a large amount of labor and time costs, and has a very low work efficiency, and it is easy to have the situation of missed judgment. The method provided by the present invention accurately obtains and records abnormal video images by automatically recording the video images of on-site tests and screening them, which is used as the basis for subsequent abnormal processing.
[0054] Through the above steps S1 to S4, the video stream clustering test method provided by the embodiment of the present invention establishes a video monitoring database by processing the monitoring video of the first round, and uses the video monitoring database as the basis for subsequent multiple rounds of monitoring, so that the entire test process can be carried out in real time without prior preparation work; at the same time, through automated monitoring, a large amount of manpower and material resources are saved, and the efficiency and accuracy of monitoring are improved.
[0055] Specifically, in one embodiment, before the above step S2, the following steps are further included:
[0056] Step 1: Normalize the video monitoring images according to a preset size. Specifically, in order to eliminate the differences between video monitoring images, data standardization processing is required to solve the comparability between data indicators and increase the reliability of data. After the original data is processed by data standardization, each index is at the same order of magnitude, which is more suitable for comprehensive comparison and evaluation.
[0057] Step 2: Perform gray conversion on the normalized video monitoring images. Specifically, the image quality is improved through gray conversion, making the display effect of the video monitoring images clearer and easier to identify.
[0058] Specifically, in one embodiment, step S3 above specifically includes the following steps:
[0059] Step 3: Perform hashing on the video monitoring images to obtain the hash vectors of each frame of the video monitoring images.
[0060] Step 4: Perform clustering analysis on the hash vectors to obtain multiple vector groups, and record the central vectors of each vector group. Specifically, first use the first dHash sequence obtained as the center of clustering, then calculate the dHash vectors of other frame images in turn, and then calculate the Tanimoto distances of each dHash vector Clustering center x = (a1, a2,..., a n ). If the distance is less than the preset threshold, it belongs to the same class, and then recalculate the center of this cluster; otherwise, establish a new clustering center, and so on until the entire video is completed with clustering analysis. The whole process is automatic and has high flexibility.
[0061] Step 5: Establish a mapping between the time information and the central vector based on the correspondence between the video monitoring images and the time information to obtain a video monitoring database. Specifically, correspond the central vectors of each vector group formed after the clustering analysis and the time information to form a video monitoring database in the form of [key, Value], providing data support for subsequent monitoring, and at the same time improving the monitoring speed through this method. The video monitoring database is a mapping method of the clustering center vector proposed to improve the speed in the monitoring stage. The calculation method is as follows. a, b, c,..., e are the times of the image frames. Encode the clustering center according to the times of the image frames clustered into each class.
[0062]
[0063]
[0064] Specifically, in one embodiment, step S4 above specifically includes the following steps:
[0065] Step 6: Sequentially obtain the current video monitoring image and the current time information corresponding to the current video monitoring image from the current round of monitored video.
[0066] Step 7: Match the current time information with the video monitoring database to obtain the current central vector corresponding to the current video monitoring image.
[0067] Step 8: Based on the current central vector, judge the current video monitoring image to obtain the abnormal video monitoring images, and return to sequentially obtain the current video monitoring image and the current time information corresponding to the current video monitoring image from the current round of monitored video until the test ends.
[0068] Specifically, a video monitoring database is established by processing the monitoring video of the first round, and the video monitoring database is used as the basis for subsequent multi-round monitoring to judge the subsequent video monitoring images, without the need for preparatory work such as extracting features and training models in advance, effectively saving time and improving the overall efficiency.
[0069] Specifically, in one embodiment, step eight described above specifically includes the following steps:
[0070] Step nine: Perform hashing processing on the current video monitoring image to obtain the corresponding hash vector.
[0071] Step ten: Calculate the similarity measure distance of pattern recognition for the hash vector based on the current center vector to obtain the similarity distance. Specifically, find the corresponding Key value according to the mapping relationship in the video monitoring database, then obtain the corresponding center vector, and calculate the Tanimoto distance
[0072] Step eleven: Compare the similarity distance with a preset value, and obtain the abnormal video monitoring image according to the comparison result.
[0073] Specifically, in one embodiment, step eleven described above specifically includes the following steps:
[0074] Step twelve: If the similarity distance is less than the preset value, determine that the current video monitoring image is a normal image.
[0075] Step thirteen: If the similarity distance is greater than or equal to the preset value, determine that the current video monitoring image is an abnormal image and record the abnormal image.
[0076] Specifically, by judging whether the similarity distance exceeds the threshold, it is determined whether the video monitoring image is abnormal, which has the characteristics of high accuracy and low error rate, and can effectively screen out and record abnormal images, providing data support for subsequent staff to process abnormalities.
[0077] In this embodiment, a video stream clustering test device is also provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0078] Through the above steps, the video stream clustering test method provided by the embodiments of the present invention establishes a video monitoring database by processing the monitoring videos in the first round, and uses the video monitoring database as the basis for subsequent multiple rounds of monitoring, enabling the entire test process to be carried out in real time without the need for advance preparation work; at the same time, through automated monitoring, a large amount of manpower and material resources are saved, and the efficiency and accuracy of monitoring are improved.
[0079] This embodiment provides a video stream clustering test device, as Figure 2 shown, including:
[0080] A test module 101, configured to perform a video stress test on a target object and obtain a monitoring video of the target object during the video stress test. The monitoring video consists of multiple rounds of monitoring videos. For detailed content, refer to the relevant description of step S1 in the above method embodiment, and details will not be elaborated here.
[0081] A first acquisition module 102, configured to acquire video monitoring images of the first round of monitoring videos and time information corresponding to each frame of the video monitoring images. For detailed content, refer to the relevant description of step six in the above method embodiment, and details will not be elaborated here.
[0082] A building module 103, configured to establish a video monitoring database based on the correspondence between the video monitoring images and the time information. For detailed content, refer to the relevant description of step seven in the above method embodiment, and details will not be elaborated here.
[0083] A monitoring module 104, configured to screen the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video images. For detailed content, refer to the relevant description of step eight in the above method embodiment, and details will not be elaborated here.
[0084] Specifically, in one embodiment, the above-mentioned monitoring module 104 specifically includes:
[0085] A second acquisition module, configured to sequentially acquire a current video monitoring image and current time information corresponding to the current video monitoring image from the current round of monitoring videos. For detailed content, refer to the relevant description of step S4 in the above method embodiment, and details will not be elaborated here.
[0086] A matching module, configured to match the current time information with the video monitoring database to obtain a current central vector corresponding to the current video monitoring image. For detailed content, refer to the relevant description of step S4 in the above method embodiment, and details will not be elaborated here.
[0087] A judgment module is used to judge the current video monitoring image based on the current central vector, obtain the abnormal video monitoring image, and return the current video monitoring image and the corresponding current time information of the current video monitoring image sequentially obtained from the current round of monitored videos until the test ends. For the detailed content, refer to the relevant description of step S4 in the above method embodiment, which will not be elaborated here.
[0088] Through the collaborative cooperation of the above-mentioned various components, the video stream clustering test method provided by the embodiment of the present invention establishes a video monitoring database by processing the monitored videos in the first round, and uses the video monitoring database as the basis for subsequent multiple rounds of monitoring, enabling the entire test process to be carried out in real time without the need for prior preparation work; at the same time, through automated monitoring, a large amount of manpower and material resources are saved, and the efficiency and accuracy of monitoring are improved.
[0089] The video stream clustering test device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0090] The further functional descriptions of the above-mentioned various modules are the same as those in the corresponding embodiments above, which will not be elaborated here.
[0091] According to the embodiment of the present invention, an electronic device is also provided, as Figure 3 shown. The electronic device may include a processor 901 and a memory 902, where the processor 901 and the memory 902 may be connected through a bus or other means, Figure 3 taking the connection through the bus as an example.
[0092] The processor 901 may be a central processing unit (CPU). The processor 901 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. chips, or combinations of the above types of chips.
[0093] The memory 902, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the method embodiments of the present invention. The processor 901 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 902, that is, to implement the methods in the above-mentioned method embodiments.
[0094] The memory 902 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created by the processor 901, etc. In addition, the memory 902 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 902 may optionally include a memory remotely disposed relative to the processor 901, and these remote memories can be connected to the processor 901 through a network. Examples of the above networks include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0095] One or more modules are stored in the memory 902 and, when executed by the processor 901, implement the methods in the above-mentioned method embodiments.
[0096] For the specific details of the above electronic device, reference can be made to the corresponding relevant descriptions and effects in the above method embodiments for understanding, and details are not described herein again.
[0097] Those skilled in the art can understand that to implement all or part of the processes in the above method embodiments, it can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, it may include the processes of the above method embodiments. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (abbreviation: HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories.
[0098] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A video stream clustering test method, characterized in that The method includes: Performing a video stress test on a target object and obtaining a monitoring video of the target object during the video stress test, where the monitoring video consists of multiple rounds of monitoring videos; Obtaining video monitoring images of the first round of monitoring video and time information corresponding to each frame of the video monitoring images; Establishing a video monitoring database based on the correspondence between the video monitoring images and the time information; Screening the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video images; The establishing a video monitoring database based on the correspondence between the video monitoring images and the time information includes: Performing a hashing process on the video monitoring images to obtain a hash vector for each frame of the video monitoring images; Performing a clustering analysis on the hash vectors to obtain multiple vector groups and recording the central vector of each vector group; Establishing a mapping between the time information and the central vector based on the correspondence between the video monitoring images and the time information to obtain a video monitoring database; The screening the remaining multiple rounds of monitoring videos based on the video monitoring database to obtain abnormal video monitoring images includes: Sequentially obtaining a current video monitoring image and current time information corresponding to the current video monitoring image from the current round of monitoring video; Matching the current time information with the video monitoring database to obtain a current central vector corresponding to the current video monitoring image; Judging the current video monitoring image based on the current central vector to obtain an abnormal video monitoring image, and returning to sequentially obtain a current video monitoring image and current time information corresponding to the current video monitoring image from the current round of monitoring video until the test ends.
2. The video stream clustering test method according to claim 1, wherein The judging the current video monitoring image based on the current central vector to obtain an abnormal video monitoring image includes: Performing a hashing process on the current video monitoring image to obtain a corresponding hash vector; Calculating a similarity measure distance of pattern recognition for the hash vector based on the current central vector to obtain a similarity distance; Comparing the similarity distance with a preset value, and obtaining an abnormal video monitoring image according to the comparison result.
3. The video stream clustering test method according to claim 2, wherein The comparing the similarity distance with a preset value and obtaining an abnormal video monitoring image according to the comparison result includes: If the similarity distance is less than the preset value, determining that the current video monitoring image is a normal image; If the similarity distance is greater than or equal to the preset value, determining that the current video monitoring image is an abnormal image and recording the abnormal image.
4. The video stream clustering test method according to claim 1, characterized in that Before obtaining the video images of the first round of monitoring video and the time information corresponding to each frame of the video images, the method further includes: Normalizing the video monitoring images according to a preset size; Performing a gray conversion on the normalized video monitoring images.
5. A video stream clustering test device, characterized in that It includes: A test module for performing a video stress test on a target object and obtaining a monitoring video of the target object during the video stress test, where the monitoring video consists of multiple rounds of monitoring videos; A first acquisition module, configured to acquire video monitoring images of the first round of monitoring video and time information corresponding to each frame of the video monitoring images; A building module, configured to build a video monitoring database based on the correspondence between the video monitoring images and the time information; A monitoring module, configured to screen the remaining multiple rounds of monitoring video based on the video monitoring database to obtain abnormal video images; Building the video monitoring database based on the correspondence between the video monitoring images and the time information includes: Performing hash processing on the video monitoring images to obtain hash vectors of each frame of the video monitoring images; Performing clustering analysis on the hash vectors to obtain multiple vector groups, and recording the central vectors of each vector group; Building a mapping between the time information and the central vectors based on the correspondence between the video monitoring images and the time information to obtain the video monitoring database; Screening the remaining multiple rounds of monitoring video based on the video monitoring database to obtain abnormal video monitoring images includes: Sequentially acquiring a current video monitoring image and current time information corresponding to the current video monitoring image from the current round of monitoring video; Matching the current time information with the video monitoring database to obtain a current central vector corresponding to the current video monitoring image; Judging the current video monitoring image based on the current central vector to obtain abnormal video monitoring images, and returning to sequentially acquire the current video monitoring image and the current time information corresponding to the current video monitoring image from the current round of monitoring video until the test ends.
6. An electronic device, characterized in that, Including: A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the video stream clustering test method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the video stream clustering test method according to any one of claims 1-4.
Citation Information
Patent Citations
Detection method for testing screen abnormity
CN111665649A