Multi-type audio and video simulation test method, device, equipment and medium
By generating audio and video type dictionary and converting audio and video files into PS stream format, and pushing target PS stream format files with simulation test requirements information, the problem of complex and inefficient traditional testing methods is solved, and efficient concurrent simulation testing of multiple types of audio and video is realized, which improves testing efficiency and accuracy.
Patent Information
- Application Number
- CN202411802118.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-18
AI Technical Summary
The traditional video integration system testing method is expensive and complex, and it is impossible to efficiently simulate the situation where multiple types of network cameras transmit data at the same time, making it difficult to accurately evaluate the performance and stability of the system under high concurrency conditions.
By obtaining audio and video files with different basic parameters, generating audio and video type dictionary, converting audio and video files into PS stream format files, and establishing an association relationship between the basic parameters and PS stream format files, and pushing the target PS stream format file according to the simulation test requirements information.
It realizes rapid and convenient concurrent simulation tests of various types of audio and video, improves the testing efficiency of the system under test, and can accurately evaluate the performance and stability of the system under high concurrency conditions.
Smart Images

Figure CN119653073A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of audio and video processing technology, and specifically relates to a simulation test method, device, equipment and medium for multiple types of audio and video. Background Art
[0002] In the field of intelligent security, the importance of video integration system is self-evident. Video integration system can integrate all network cameras or video platform resources in a certain area for security monitoring. However, with the rapid development of technology and demand, the number of cameras connected to the video integration system has increased dramatically, and the audio and video formats and protocols that need to be compatible are also becoming increasingly diverse. Therefore, it is very necessary to test the video integration system so that it can run safely and stably.
[0003] However, the traditional testing method, i.e. connecting and testing different types of network cameras one by one, is not only costly but also extremely complicated in terms of operation process. It involves multiple tedious steps such as device connection, parameter setting and data recording. It is also unable to efficiently simulate the situation where network cameras transmit data simultaneously in a real environment, making it difficult to accurately evaluate the performance and stability of the video integration system under high concurrency conditions.
[0004] Therefore, how to quickly and conveniently perform concurrent simulation tests on multiple types of audio and video is a problem that people in this field urgently need to solve. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus, equipment and medium for simulating testing of multiple types of audio and video, with the aim of quickly meeting the concurrent simulation testing requirements of the system under test for audio and video of various basic parameters, thereby improving the testing efficiency of the system under test.
[0006] In a first aspect, an embodiment of the present application provides a multi-type audio and video simulation test method, the method comprising:
[0007] Acquire at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate, and bit rate;
[0008] Generate an audio and video type dictionary according to the basic parameters;
[0009] Convert the audio and video files into PS stream format files, and establish an association relationship between basic parameters and PS stream format files;
[0010] The simulation test requirement information is obtained, and the target PS stream format file is pushed according to the simulation test requirement information, the audio and video type dictionary, and the association relationship between the basic parameters and the PS stream format file.
[0011] Further, generating an audio and video type dictionary according to the basic parameters includes:
[0012] Classifying each basic parameter according to resolution to obtain at least two resolution fields and basic parameter groups corresponding to the resolution fields; wherein the basic parameter group includes at least one basic parameter;
[0013] and / or,
[0014] Classifying each basic parameter according to the audio format to obtain at least two audio format fields and basic parameter groups corresponding to the audio format fields;
[0015] and / or,
[0016] Classifying each basic parameter according to the video coding format to obtain at least two video coding format fields and a basic parameter group corresponding to the video coding format fields;
[0017] and / or,
[0018] Classifying each basic parameter according to the frame rate to obtain at least two frame rate fields and basic parameter groups corresponding to the frame rate fields;
[0019] and / or,
[0020] The basic parameters are classified according to the bit rate to obtain at least two bit rate fields and a basic parameter group corresponding to the bit rate fields.
[0021] Further, the simulation test requirement information includes at least one field, and the field includes at least one of a resolution field, an audio format field, a video encoding format field, a frame rate field, and a bit rate field;
[0022] Accordingly, according to the simulation test requirement information, the audio and video type dictionary, and the association relationship between the basic parameters and the PS stream format file, the target PS stream format file is pushed, including:
[0023] Determine at least one target basic parameter group according to the field;
[0024] Determine a target PS stream format file according to each basic parameter in the target basic parameter group and an association relationship between the basic parameters and the PS stream format file;
[0025] The target PS stream format file is pushed.
[0026] Further, determining the target PS stream format file according to each basic parameter in the target basic parameter group and the association relationship between the basic parameters and the PS stream format file includes:
[0027] In the case where there are at least two target basic parameter groups, determining the intersection of the target basic parameter groups;
[0028] The target PS stream format file is determined according to each basic parameter in the intersection and the association relationship between the basic parameters and the PS stream format file.
[0029] Furthermore, the simulation test requirement information also includes the number of concurrent paths;
[0030] Accordingly, the target PS stream format file is pushed, including:
[0031] According to the number of concurrent paths, the target PS stream format file is pushed.
[0032] Further, according to the number of concurrent paths, the target PS stream format file is pushed, including:
[0033] When the number of the target PS stream format files exceeds the number of concurrent paths, sorting the target PS stream format files according to a preset priority rule to obtain a sorting result;
[0034] The target PS stream format files of the target push quantity are selected in order from the sorting results for pushing; wherein the target push quantity is consistent with the concurrent path number.
[0035] Further, when the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files are sorted according to a preset priority rule to obtain a sorting result, including:
[0036] In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest resolutions are determined as the highest priority;
[0037] and / or,
[0038] In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest frame rates are determined as the highest priority;
[0039] and / or,
[0040] When the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest bit rates are determined as the highest priority.
[0041] In a second aspect, an embodiment of the present application provides a multi-type audio and video simulation test device, the device comprising:
[0042] An audio and video acquisition module, used to acquire at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate and bit rate;
[0043] A type dictionary generation module, used to generate an audio and video type dictionary according to the basic parameters;
[0044] A file format conversion module, used for converting the audio and video files into PS stream format files, and establishing an association relationship between basic parameters and PS stream format files;
[0045] The PS stream push module is used to obtain simulation test requirement information, and push the target PS stream format file according to the simulation test requirement information, the audio and video type dictionary and the association between the basic parameters and the PS stream format file.
[0046] Furthermore, the type dictionary generation module is specifically used to:
[0047] Classifying each basic parameter according to resolution to obtain at least two resolution fields and basic parameter groups corresponding to the resolution fields; wherein the basic parameter group includes at least one basic parameter;
[0048] and / or,
[0049] Classifying each basic parameter according to the audio format to obtain at least two audio format fields and basic parameter groups corresponding to the audio format fields;
[0050] and / or,
[0051] Classifying each basic parameter according to the video coding format to obtain at least two video coding format fields and a basic parameter group corresponding to the video coding format fields;
[0052] and / or,
[0053] Classifying each basic parameter according to the frame rate to obtain at least two frame rate fields and basic parameter groups corresponding to the frame rate fields;
[0054] and / or,
[0055] The basic parameters are classified according to the bit rate to obtain at least two bit rate fields and a basic parameter group corresponding to the bit rate fields.
[0056] Further, the simulation test requirement information includes at least one field, and the field includes at least one of a resolution field, an audio format field, a video encoding format field, a frame rate field, and a bit rate field;
[0057] Correspondingly, the PS stream push module is specifically used for:
[0058] Determine at least one target basic parameter group according to the field;
[0059] Determine a target PS stream format file according to each basic parameter in the target basic parameter group and an association relationship between the basic parameters and the PS stream format file;
[0060] The target PS stream format file is pushed.
[0061] Furthermore, the PS stream push module is specifically used for:
[0062] In the case where there are at least two target basic parameter groups, determining the intersection of the target basic parameter groups;
[0063] The target PS stream format file is determined according to each basic parameter in the intersection and the association relationship between the basic parameters and the PS stream format file.
[0064] Furthermore, the simulation test requirement information also includes the number of concurrent paths;
[0065] Correspondingly, the PS stream push module is specifically used for:
[0066] According to the number of concurrent paths, the target PS stream format file is pushed.
[0067] Furthermore, the PS stream push module is specifically used for:
[0068] When the number of the target PS stream format files exceeds the number of concurrent paths, sorting the target PS stream format files according to a preset priority rule to obtain a sorting result;
[0069] The target PS stream format files of the target push quantity are selected in order from the sorting results for pushing; wherein the target push quantity is consistent with the concurrent path number.
[0070] Furthermore, the PS stream push module is specifically used for:
[0071] In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest resolutions are determined as the highest priority;
[0072] and / or,
[0073] In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest frame rates are determined as the highest priority;
[0074] and / or,
[0075] When the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest bit rates are determined as the highest priority.
[0076] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0077] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0078] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0079] In an embodiment of the present application, at least two audio and video files with different basic parameters are obtained; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate and bit rate; an audio and video type dictionary is generated according to the basic parameters; the audio and video files are converted into PS stream format files, and an association relationship between the basic parameters and the PS stream format files is established; simulation test requirement information is obtained, and the target PS stream format file is pushed according to the simulation test requirement information, the audio and video type dictionary and the association relationship between the basic parameters and the PS stream format file. The above-mentioned simulation test method for multiple types of audio and video can quickly meet the concurrent simulation test requirements of the system under test for audio and video of various basic parameters by generating an audio and video type dictionary according to different audio and video basic parameters, and pushing the corresponding audio and video in PS stream format according to the simulation test requirement information and the audio and video type dictionary, thereby improving the test efficiency of the system under test. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 It is a flowchart of a simulation test method for multiple types of audio and video provided in Example 1 of the present application;
[0081] Figure 2 is a schematic diagram of the interaction between the simulation tool and the system under test provided in the first embodiment of the present application;
[0082] Figure 3 It is a flowchart of a simulation test method for multiple types of audio and video provided in Embodiment 2 of the present application;
[0083] Figure 4 It is a flowchart of a simulation test method for multiple types of audio and video provided in Embodiment 3 of the present application;
[0084] Figure 5 It is a structural schematic diagram of a multi-type audio and video simulation test device provided in Embodiment 4 of the present application;
[0085] Figure 6 It is a schematic diagram of the structure of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION
[0086] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0087] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0088] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0089] The following, in conjunction with the accompanying drawings, describes in detail the multi-type audio and video simulation test method, device, equipment and medium provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0090] Embodiment 1
[0091] Figure 1 1 is a flow chart of a multi-type audio and video simulation test method provided in Example 1 of the present application. Figure 1 As shown, the specific steps include:
[0092] S101, obtaining at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate, and bit rate;
[0093] First of all, the present application is applicable to scenarios where integration testing of multiple types of audio and video is required. Based on the above usage scenarios, it can be understood that the execution subject of the present application can be a simulation tool. Specifically, the generation of an audio and video type dictionary, the format conversion of audio and video files, and the push of target PS stream format files can be performed by the simulation tool. The system under test receives the target PS stream format file and performs decapsulation and decoding processing to obtain the target audio and video file. By playing and displaying the target audio and video file, a simulated integration test of multiple types of audio and video is achieved. Among them, the simulation tool can be a software or device specially designed to simulate different types of audio and video files.
[0094] An audio and video file is a digital file that contains audio and video data, and its format can be MP4 (MPEG-4 Part 14) format. The basic parameters of audio and video files are used to describe and distinguish the characteristics of audio and video files, and may include resolution, audio format, video encoding format, frame rate, and bit rate. Specifically, resolution refers to the precision of the video image, which is an indicator of the degree of detail of the image display, usually expressed as the number of horizontal pixels × the number of vertical pixels; audio format refers to the encoding method of audio data, which determines the audio quality, file size, and compatibility; video encoding format refers to the method used to compress and encode video image data, with the aim of reducing the storage space and transmission bandwidth requirements of audio and video files; frame rate refers to the number of image frames displayed per second in an audio and video file; bit rate, also known as bit rate, refers to the amount of data transmitted per unit time for video or audio data, usually expressed in bits per second (bps).
[0095] To obtain audio and video files with different basic parameters, you can download audio and video files with various resolutions, audio formats, video encoding formats, bit rates and frame rates from video sharing websites or professional audio and video material websites, or use video editing software to import an original audio and video file, and then generate audio and video files with different resolutions, audio formats, video encoding formats, bit rates and frame rates by adjusting the output settings.
[0096] S102, generating an audio and video type dictionary according to the basic parameters;
[0097] The audio and video type dictionary can be a data table used to classify and describe different types of audio and video files. The audio and video type dictionary can be generated based on basic parameters by using preset fields and restrictions on resolution, audio format, video encoding format, frame rate or bit rate in each field. The basic parameters of each audio and video file that meets the restrictions of a field are associated with the field and stored to obtain the audio and video type dictionary. For example, the generated audio and video type dictionary can be as shown in the following table:
[0098] Fields Basic parameters Type 1 Resolution A, Audio format A, Video encoding format A, Frame rate A, Bit rate A Type 2 Resolution B, audio format A, video encoding format A, frame rate A, bit rate A Type 3 Resolution A, audio format B, video encoding format A, frame rate A, bit rate A ... ... ... ...
[0099] In this technical solution, optionally, generating an audio and video type dictionary according to the basic parameters includes:
[0100] Classifying each basic parameter according to resolution to obtain at least two resolution fields and basic parameter groups corresponding to the resolution fields; wherein the basic parameter group includes at least one basic parameter;
[0101] and / or,
[0102] Classifying each basic parameter according to the audio format to obtain at least two audio format fields and basic parameter groups corresponding to the audio format fields;
[0103] and / or,
[0104] Classifying each basic parameter according to the video coding format to obtain at least two video coding format fields and a basic parameter group corresponding to the video coding format fields;
[0105] and / or,
[0106] Classifying each basic parameter according to the frame rate to obtain at least two frame rate fields and basic parameter groups corresponding to the frame rate fields;
[0107] and / or,
[0108] The basic parameters are classified according to the bit rate to obtain at least two bit rate fields and a basic parameter group corresponding to the bit rate fields.
[0109] The method of classifying each basic parameter according to resolution can be to determine the resolution value range according to the resolution of each audio and video file, and divide the resolution value range into at least two sub-resolution value ranges, generate a corresponding resolution field according to the sub-resolution value range, and associate and store each basic parameter with a resolution within the sub-resolution value range with the resolution field corresponding to the sub-resolution value range to obtain a basic parameter group corresponding to the resolution field. It can be understood that the resolution field is a description of the resolution type. For example, the result of classifying each basic parameter according to resolution can be shown in the following table:
[0110]
[0111] The basic parameters can be classified according to the audio format by treating each audio format as an audio format field, and storing the basic parameters with the same audio format in association with the audio format field to obtain the basic parameter group corresponding to the audio format field. It can be understood that the audio format field is a description of the audio format type.
[0112] The basic parameters can be classified according to the video coding format by treating each video coding format as a video coding format field, and storing the basic parameters with the same video coding format in association with the video coding format field to obtain the basic parameter group corresponding to the video coding format field. It can be understood that the video coding format field is a description of the video coding format type.
[0113] The method of classifying each basic parameter according to the frame rate can be to determine the frame rate value range according to the frame rate of each audio and video file, and divide the frame rate value range into at least two sub-frame rate value ranges, generate a corresponding frame rate field according to the sub-frame rate value range, associate and store each basic parameter with a frame rate within the sub-frame rate value range with the frame rate field corresponding to the sub-frame rate value range, and obtain a basic parameter group corresponding to the frame rate field. It can be understood that the frame rate field is a description of the frame rate type.
[0114] In the method of classifying each basic parameter according to the bit rate, the bit rate value range can be determined according to the bit rate of each audio and video file, and the bit rate value range is divided into at least two sub-bit rate value ranges, and the corresponding bit rate field is generated according to the sub-bit rate value range, and each basic parameter with a bit rate within the sub-bit rate value range is associated and stored with the bit rate field corresponding to the sub-bit rate value range to obtain the basic parameter group corresponding to the bit rate field. Among them, it can be understood that the bit rate field is a description of the bit rate type.
[0115] The advantage of this setting is that by classifying the basic parameters according to resolution, audio format, video encoding format, frame rate and bit rate, the characteristics of different types of audio and video files can be clearly sorted out, making it easier to select the corresponding target PS stream format file according to the simulation test requirement information.
[0116] S103, converting the audio and video file into a PS stream format file, and establishing an association relationship between the basic parameters and the PS stream format file;
[0117] PS (Program Stream) stream format file is a file format used to store and transmit audio and video data. To convert audio and video files to PS stream format files, you can use FFmpeg tool or other professional video conversion tools. Among them, FFmpeg tool is an open source cross-platform multimedia processing tool.
[0118] The association relationship between the basic parameters and the PS stream format file may refer to the correspondence between the basic parameters of each audio and video file and the PS stream format file obtained by conversion. It can be understood that a PS stream format file can be uniquely determined according to a basic parameter. The basic parameters of each audio and video file are associated with the PS stream format file obtained by conversion and stored, and the association relationship between the basic parameters and the PS stream format file can be established.
[0119] S104, obtaining simulation test requirement information, and pushing a target PS stream format file according to the simulation test requirement information, the audio and video type dictionary, and the association relationship between the basic parameters and the PS stream format file.
[0120] The simulation test requirement information may refer to information sent by the system under test to describe the type of audio and video files it needs. The simulation test requirement information may include at least one field, and the field may include at least one of a resolution field, an audio format field, a video encoding format field, a frame rate field, and a bit rate field. It is understandable that the method for obtaining the simulation test requirement information may be to receive the simulation test requirement information sent by the system under test. Among them, the system under test may be a system that requires integrated simulation testing of multiple types of audio and video, such as a video integration system.
[0121] According to the simulation test requirement information, the audio and video type dictionary, and the association relationship between the basic parameters and the PS stream format file, the method of pushing the target PS stream format file can be to determine at least one target basic parameter according to the simulation test requirement information and the audio and video type dictionary, determine the PS stream format file associated with the target basic parameter according to the target basic parameter and the association relationship between the basic parameter and the PS stream format file as the target PS stream format file, and push it. Specifically, the target PS stream format file can be pushed through TCP (Transmission Control Protocol).
[0122] Figure 2 Schematic diagram of the interaction between the simulation tool and the system under test provided in the first embodiment of the present application. Figure 2 As shown, the simulation tool converts the acquired audio and video files into PS stream format files. The simulation tool includes a login module, a message processing module and a stream module. The system under test sends a request to the login module to create a connection. The login module feeds back a message of successful connection to the system under test. The system under test sends a stream request to the message processing module to obtain the target PS stream format file, wherein the stream request includes simulation test requirement information. The message processing module passes the simulation test requirement information to the stream module. The stream module determines the target PS stream format file in each PS stream format file according to the simulation test requirement information and pushes it to the system under test.
[0123] It can be understood that the system under test receives the target PS stream format file and performs decapsulation and decoding processing to obtain the target audio and video file, and realizes the simulated integration test of various types of audio and video by playing and displaying the target audio and video file.
[0124] In an embodiment of the present application, at least two audio and video files with different basic parameters are obtained; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate and bit rate; an audio and video type dictionary is generated according to the basic parameters; the audio and video files are converted into PS stream format files, and an association relationship between the basic parameters and the PS stream format files is established; simulation test requirement information is obtained, and the target PS stream format file is pushed according to the simulation test requirement information, the audio and video type dictionary and the association relationship between the basic parameters and the PS stream format file. The above-mentioned simulation test method for multiple types of audio and video can quickly meet the concurrent simulation test requirements of the system under test for audio and video of various basic parameters by generating an audio and video type dictionary according to different audio and video basic parameters, and pushing the corresponding audio and video in PS stream format according to the simulation test requirement information and the audio and video type dictionary, thereby improving the test efficiency of the system under test.
[0125] Embodiment 2
[0126] Figure 3 It is a flowchart of the simulation test method for multiple types of audio and video provided in Example 2 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: the simulation test requirement information includes at least one field, and the field includes at least one of a resolution field, an audio format field, a video encoding format field, a frame rate field, and a bit rate field; accordingly, according to the simulation test requirement information, the audio and video type dictionary, and the association relationship between the basic parameters and the PS stream format file, the target PS stream format file is pushed, including: determining at least one target basic parameter group according to the field; determining the target PS stream format file according to each basic parameter in the target basic parameter group and the association relationship between the basic parameters and the PS stream format file; and pushing the target PS stream format file.
[0127] like Figure 3 As shown, the specific steps include:
[0128] S301, obtaining at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate, and bit rate;
[0129] S302, classifying each basic parameter according to resolution to obtain at least two resolution fields and basic parameter groups corresponding to the resolution fields; wherein the basic parameter group includes at least one basic parameter;
[0130] and / or,
[0131] Classifying each basic parameter according to the audio format to obtain at least two audio format fields and basic parameter groups corresponding to the audio format fields;
[0132] and / or,
[0133] Classifying each basic parameter according to the video coding format to obtain at least two video coding format fields and a basic parameter group corresponding to the video coding format fields;
[0134] and / or,
[0135] Classifying each basic parameter according to the frame rate to obtain at least two frame rate fields and basic parameter groups corresponding to the frame rate fields;
[0136] and / or,
[0137] Classifying each basic parameter according to the bit rate to obtain at least two bit rate fields and a basic parameter group corresponding to the bit rate fields;
[0138] S303, converting the audio and video file into a PS stream format file, and establishing an association relationship between the basic parameters and the PS stream format file;
[0139] S304, obtaining simulation test requirement information;
[0140] S305, determining at least one target basic parameter group according to the field;
[0141] It can be understood that the target basic parameter group refers to the basic parameter group that meets the simulation test requirement information. According to the method of determining the target basic parameter group according to the field, the field in the simulation test requirement information can be used as the query condition to query the associated storage data of the resolution field and the corresponding basic parameter group, the associated storage data of the audio format field and the corresponding basic parameter group, the associated storage data of the video encoding format field and the corresponding basic parameter group, the associated storage data of the frame rate field and the corresponding basic parameter group, and the associated storage data of the bit rate field and the corresponding basic parameter group. The basic parameter groups included in the query results are the target basic parameter groups.
[0142] S306, determining a target PS stream format file according to each basic parameter in the target basic parameter group and an association relationship between the basic parameters and the PS stream format file;
[0143] The method for determining the target PS stream format file is to use each basic parameter in each target basic parameter group as a query condition, query the stored data of the association relationship between the basic parameters and the PS stream format file, and the PS stream format files included in the query results are the target PS stream format files.
[0144] In the technical solution, optionally, determining the target PS stream format file according to each basic parameter in the target basic parameter group and the association relationship between the basic parameters and the PS stream format file includes:
[0145] In the case where there are at least two target basic parameter groups, determining the intersection of the target basic parameter groups;
[0146] The target PS stream format file is determined according to each basic parameter in the intersection and the association relationship between the basic parameters and the PS stream format file.
[0147] It can be understood that the existence of at least two target basic parameter groups indicates that the simulation test requirement information includes at least two fields among the resolution field, audio format field, video encoding format field, frame rate field and bit rate field, and a target basic parameter group only conforms to the type described by the corresponding field, and the intersection of each target basic parameter group can simultaneously conform to the type described by each field in the simulation test requirement information.
[0148] The method for determining the intersection of each target basic parameter group is to initialize the intersection result as the first target basic parameter group, traverse each target basic parameter group starting from the second target basic parameter group, and for each basic parameter in the currently traversed target basic parameter group, check whether the basic parameter exists in the intersection result. If it exists, continue to check the next basic parameter. If not, remove the basic parameter from the intersection result. After traversing all the target basic parameter groups, the intersection result obtained is the intersection of each target basic parameter group.
[0149] The method for determining the target PS stream format file is to use the basic parameters in the intersection as query conditions, query the stored data of the association relationship between the basic parameters and the PS stream format file, and the PS stream format files included in the query results are the target PS stream format files.
[0150] The advantage of this setting of the present scheme is that by determining the intersection of each target basic parameter group when there are at least two target basic parameter groups, and determining the target PS stream format file based on each basic parameter in the intersection and the association between the basic parameters and the PS stream format file, it can be ensured that the pushed target PS stream format file meets the simulation test requirements in multiple key parameter dimensions, thereby improving the accuracy and reliability of the simulation test.
[0151] S307: Push the target PS stream format file.
[0152] In this technical solution, optionally, the simulation test requirement information also includes the number of concurrent paths;
[0153] Accordingly, the target PS stream format file is pushed, including:
[0154] According to the number of concurrent paths, the target PS stream format file is pushed.
[0155] Concurrency refers to the number of tasks or connections that can be processed simultaneously in the same time period.
[0156] The method of pushing the target PS stream format file according to the number of concurrent paths may be to simultaneously push the target PS stream format files of the concurrent paths.
[0157] The benefit of this setting is that by pushing the target PS stream format file according to the number of concurrent paths, it can simulate high-concurrency scenarios in actual applications and help verify the performance of the system under test when multiple tasks are performed simultaneously.
[0158] The advantage of setting up this scheme is that by determining at least one target basic parameter group based on the field, determining the target PS stream format file and pushing it based on the basic parameters in the target basic parameter group and the association between the basic parameters and the PS stream format file, it is possible to accurately locate the required audio and video files, ensure that the pushed target PS stream format file is highly matched with the simulation test requirements, and improve the accuracy and effectiveness of the simulation test.
[0159] Embodiment 3
[0160] Figure 4 It is a flowchart of the simulation test method for multiple types of audio and video provided in Example 3 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: according to the concurrent path, the target PS stream format file is pushed, including: when the number of the target PS stream format files exceeds the concurrent path, each target PS stream format file is sorted according to a pre-set priority rule to obtain a sorting result; in the sorting result, the target PS stream format files of the target push number are selected in order for pushing; wherein, the target push number is consistent with the concurrent path.
[0161] like Figure 4 As shown, the specific steps include:
[0162] S401, obtaining at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate, and bit rate;
[0163] S402, classifying each basic parameter according to resolution to obtain at least two resolution fields and basic parameter groups corresponding to the resolution fields; wherein the basic parameter group includes at least one basic parameter;
[0164] and / or,
[0165] Classifying each basic parameter according to the audio format to obtain at least two audio format fields and basic parameter groups corresponding to the audio format fields;
[0166] and / or,
[0167] Classifying each basic parameter according to the video coding format to obtain at least two video coding format fields and a basic parameter group corresponding to the video coding format fields;
[0168] and / or,
[0169] Classifying each basic parameter according to the frame rate to obtain at least two frame rate fields and basic parameter groups corresponding to the frame rate fields;
[0170] and / or,
[0171] Classifying each basic parameter according to the bit rate to obtain at least two bit rate fields and a basic parameter group corresponding to the bit rate fields;
[0172] S403, converting the audio and video file into a PS stream format file, and establishing an association relationship between the basic parameters and the PS stream format file;
[0173] S404, obtaining simulation test requirement information;
[0174] S405, determining at least one target basic parameter group according to the field;
[0175] S406, determining a target PS stream format file according to each basic parameter in the target basic parameter group and an association relationship between the basic parameters and the PS stream format file;
[0176] S407, when the number of the target PS stream format files exceeds the number of concurrent paths, sorting the target PS stream format files according to a preset priority rule to obtain a sorting result;
[0177] The number of target PS stream format files exceeds the number of concurrent channels, which means that all target PS stream format files cannot be pushed simultaneously. The pre-set priority rules stipulate the priority of the target PS stream format files to be pushed concurrently, for example, the target PS stream format files with the highest and lowest resolutions are determined as the highest priority, or the target PS stream format files with the highest and lowest frame rates are determined as the highest priority, or the target PS stream format files with the highest and lowest bit rates are determined as the highest priority.
[0178] In the technical solution, optionally, when the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files are sorted according to a preset priority rule to obtain a sorting result, including:
[0179] In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest resolutions are determined as the highest priority;
[0180] and / or,
[0181] In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest frame rates are determined as the highest priority;
[0182] and / or,
[0183] When the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest bit rates are determined as the highest priority.
[0184] The target PS stream format files with the highest and lowest resolutions are determined as the highest priority, that is, the target PS stream format files with the highest and lowest resolutions among the target PS stream format files are pushed first; the target PS stream format files with the highest and lowest frame rates are determined as the highest priority, that is, the target PS stream format files with the highest and lowest frame rates among the target PS stream format files are pushed first; the target PS stream format files with the highest and lowest bit rates are determined as the highest priority, that is, the target PS stream format files with the highest and lowest bit rates among the target PS stream format files are pushed first.
[0185] The benefit of this setting is that by determining the target PS stream format files with the highest and lowest resolution, frame rate or bit rate as the highest priority, the performance of the system under test when processing audio and video files of different quality levels can be fully tested on the basis of ensuring that the simulation test requirements of the system under test are met.
[0186] S408, selecting target PS stream format files of a target push quantity in order from the sorting results for push; wherein the target push quantity is consistent with the concurrent path number.
[0187] The method of selecting the target push quantity of target PS stream format files in the sorting results in order for pushing can be to simultaneously push the target push quantity of target PS stream format files selected in order from the sorting results.
[0188] The benefit of this arrangement of the present scheme is that, by sorting the target PS stream format files according to a pre-set priority rule when the number of target PS stream format files exceeds the number of concurrent paths, and selecting the target push quantity of target PS stream format files in order from the sorting results for push, it can ensure that when transmission resources are limited, the most critical and valuable content is pushed first, thereby improving the efficiency and targeting of the push.
[0189] Embodiment 4
[0190] Figure 5 Schematic diagram of the structure of the multi-type audio and video simulation test device provided in the fourth embodiment of the present application. Figure 5 As shown, the device comprises:
[0191] The audio and video acquisition module 510 is used to acquire at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate and bit rate;
[0192] A type dictionary generation module 520, used to generate an audio and video type dictionary according to the basic parameters;
[0193] The file format conversion module 530 is used to convert the audio and video files into PS stream format files and establish an association relationship between basic parameters and PS stream format files;
[0194] The PS stream push module 540 is used to obtain simulation test requirement information, and push the target PS stream format file according to the simulation test requirement information, the audio and video type dictionary and the association relationship between the basic parameters and the PS stream format file.
[0195] In an embodiment of the present application, an audio and video acquisition module is used to acquire at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate and bit rate; a type dictionary generation module is used to generate an audio and video type dictionary according to the basic parameters; a file format conversion module is used to convert the audio and video file into a PS stream format file, and establish an association relationship between the basic parameters and the PS stream format file; a PS stream push module is used to acquire simulation test requirement information, and push the target PS stream format file according to the simulation test requirement information, the audio and video type dictionary and the association relationship between the basic parameters and the PS stream format file. The above-mentioned multi-type audio and video simulation test device can quickly meet the concurrent simulation test requirements of the system under test for audio and video of various basic parameters by generating an audio and video type dictionary according to different audio and video basic parameters, and pushing the corresponding audio and video in PS stream format according to the simulation test requirement information and the audio and video type dictionary, thereby improving the test efficiency of the system under test.
[0196] The multi-type audio and video simulation test device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0197] The multi-type audio and video simulation test device in the embodiment of the present application can be a device with an operating system. The operating system can be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0198] The multi-type audio and video simulation test device provided in the embodiment of the present application can implement each process implemented in the above-mentioned embodiments one to three, and will not be described again here to avoid repetition.
[0199] Embodiment 5
[0200] like Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the embodiment of the simulation test method for multiple types of audio and video is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0201] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0202] Embodiment 6
[0203] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned multi-type audio and video simulation test method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0204] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0205] Embodiment 7
[0206] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned multi-type audio and video simulation test method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0207] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0208] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0209] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0210] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0211] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A multi-type audio and video simulation test method, characterized in that: The method comprises: Acquire at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate, and bit rate; Generate an audio and video type dictionary according to the basic parameters; Convert the audio and video files into PS stream format files, and establish an association relationship between basic parameters and PS stream format files; The simulation test requirement information is obtained, and the target PS stream format file is pushed according to the simulation test requirement information, the audio and video type dictionary, and the association relationship between the basic parameters and the PS stream format file.
2. The multi-type audio and video simulation test method according to claim 1 is characterized in that: Generating an audio and video type dictionary according to the basic parameters includes: Classifying each basic parameter according to resolution to obtain at least two resolution fields and basic parameter groups corresponding to the resolution fields; wherein the basic parameter group includes at least one basic parameter; and / or, Classifying each basic parameter according to the audio format to obtain at least two audio format fields and basic parameter groups corresponding to the audio format fields; and / or, Classifying each basic parameter according to the video coding format to obtain at least two video coding format fields and a basic parameter group corresponding to the video coding format fields; and / or, Classifying each basic parameter according to the frame rate to obtain at least two frame rate fields and basic parameter groups corresponding to the frame rate fields; and / or, The basic parameters are classified according to the bit rate to obtain at least two bit rate fields and a basic parameter group corresponding to the bit rate fields.
3. The multi-type audio and video simulation test method according to claim 2 is characterized in that: The simulation test requirement information includes at least one field, and the field includes at least one of a resolution field, an audio format field, a video encoding format field, a frame rate field, and a bit rate field; Accordingly, according to the simulation test requirement information, the audio and video type dictionary, and the association relationship between the basic parameters and the PS stream format file, the target PS stream format file is pushed, including: Determine at least one target basic parameter group according to the field; Determine a target PS stream format file according to each basic parameter in the target basic parameter group and an association relationship between the basic parameters and the PS stream format file; The target PS stream format file is pushed.
4. The multi-type audio and video simulation test method according to claim 3 is characterized in that: Determining a target PS stream format file according to each basic parameter in the target basic parameter group and an association relationship between the basic parameters and the PS stream format file includes: In the case where there are at least two target basic parameter groups, determining the intersection of the target basic parameter groups; The target PS stream format file is determined according to each basic parameter in the intersection and the association relationship between the basic parameters and the PS stream format file.
5. The multi-type audio and video simulation test method according to claim 3 is characterized in that: The simulation test requirement information also includes the number of concurrent paths; Accordingly, the target PS stream format file is pushed, including: According to the number of concurrent paths, the target PS stream format file is pushed.
6. The multi-type audio and video simulation test method according to claim 5 is characterized in that: According to the number of concurrent paths, the target PS stream format file is pushed, including: When the number of the target PS stream format files exceeds the number of concurrent paths, sorting the target PS stream format files according to a preset priority rule to obtain a sorting result; The target PS stream format files of the target push quantity are selected in order from the sorting results for pushing; wherein the target push quantity is consistent with the concurrent path number.
7. The multi-type audio and video simulation test method according to claim 6 is characterized in that: When the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files are sorted according to a preset priority rule to obtain a sorting result, including: In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest resolutions are determined as the highest priority; and / or, In the case where the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest frame rates are determined as the highest priority; and / or, When the number of the target PS stream format files exceeds the number of concurrent paths, the target PS stream format files with the highest and lowest bit rates are determined as the highest priority.
8. A multi-type audio and video simulation test device, characterized in that: The device comprises: An audio and video acquisition module, used to acquire at least two audio and video files with different basic parameters; wherein the basic parameters include at least one of resolution, audio format, video encoding format, frame rate and bit rate; A type dictionary generation module, used to generate an audio and video type dictionary according to the basic parameters; A file format conversion module, used for converting the audio and video files into PS stream format files, and establishing an association relationship between basic parameters and PS stream format files; The PS stream push module is used to obtain simulation test requirement information, and push the target PS stream format file according to the simulation test requirement information, the audio and video type dictionary and the association between the basic parameters and the PS stream format file.
9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the multi-type audio and video simulation test method as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the simulation test method for multiple types of audio and video as described in any one of claims 1-7 are implemented.