CN110636283A - Video transmission test method and device and terminal equipment - Google Patents
Video transmission test method and device and terminal equipment Download PDFInfo
- Publication number
- CN110636283A CN110636283A CN201910945320.7A CN201910945320A CN110636283A CN 110636283 A CN110636283 A CN 110636283A CN 201910945320 A CN201910945320 A CN 201910945320A CN 110636283 A CN110636283 A CN 110636283A
- Authority
- CN
- China
- Prior art keywords
- video
- frame
- data
- frames
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The application is applicable to the technical field of computers, and provides a video transmission testing method, a video transmission testing device and terminal equipment, wherein the video transmission testing method comprises the following steps: acquiring system parameters; according to the system parameters, simulating to generate video coding data frames and sending the video coding data frames to a video data receiving end; and obtaining a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end. The embodiment of the application can accurately test the video transmission quality.
Description
Technical Field
The application belongs to the technical field of computers, and particularly relates to a video transmission testing method and device and terminal equipment.
Background
The existing monitoring camera equipment generally transmits video data acquired in real time to a background terminal for real-time display, and in order to optimize monitoring display quality, the video transmission quality generally needs to be tested and evaluated so as to improve a monitoring system.
The existing video transmission quality test and evaluation method usually performs a test by directly adjusting device parameters on a monitoring camera device, however, the test method has many interference factors, such as unstable video data generated by the monitoring camera device or interference of running faults of the monitoring camera device software on video transmission, and the existing video transmission test method has the defect of inaccurate test results.
Disclosure of Invention
In view of this, embodiments of the present application provide a video transmission testing method, an apparatus, and a terminal device, so as to solve the problem of how to accurately test video transmission quality in the prior art.
A first aspect of an embodiment of the present application provides a video transmission testing method, including:
acquiring system parameters;
according to the system parameters, simulating to generate video coding data frames and sending the video coding data frames to a video data receiving end;
and obtaining a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
A second aspect of an embodiment of the present application provides a video transmission testing apparatus, including:
an acquisition unit for acquiring system parameters;
the sending unit is used for generating a video coding data frame in a simulation mode according to the system parameters and sending the video coding data frame to a video data receiving end;
and the computing unit is used for obtaining a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
A third aspect of embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, causes the terminal device to implement the steps of the video transmission testing method.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, causes a terminal device to implement the steps of the video transmission testing method as described.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the video transmission testing method according to any one of the above first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, the video coding data frame is generated through setting the system parameters and simulating, and the video transmission quality test result is obtained according to the sending information of the video coding data frame and/or the receiving information of the video coding data frame.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic system structure diagram of a video transmission test system provided in an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating an implementation of a first video transmission testing method according to an embodiment of the present application;
fig. 3 is a schematic flow chart illustrating an implementation of a second video transmission testing method according to an embodiment of the present application;
fig. 4 is an exemplary diagram of an application scenario of a video transmission test according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a video transmission testing apparatus according to an embodiment of the present application;
fig. 6 is a schematic diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Fig. 1 shows a system structure block diagram of a video transmission test system according to an embodiment of the present application, and as shown in fig. 1, the video transmission test system includes a video data sending end 11 and a video data receiving end 12. The video data sending end 11 generates a video coded data frame in an analog manner, sends the video coded data frame to the video data receiving end 12, and counts sending information of the sent video coded data frame after sending is finished. The video data receiving end 12 receives the video data frame, and counts the receiving information of the video coding data frame after the receiving is finished. And then, obtaining a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the statistical receiving information of the video coding data frame.
The first embodiment is as follows:
fig. 2 is a schematic flowchart illustrating a first video transmission testing method provided in an embodiment of the present application, where an execution main body of the embodiment of the present application is a terminal device, and for convenience of distinction, the terminal device in the embodiment of the present application is specifically referred to as a video data sending end, and details are as follows:
in S201, system parameters are acquired.
The system parameter is a parameter that affects video transmission quality, and may specifically include an encoding parameter and a transmission parameter, where the encoding parameter may include an encoding Frame rate, an Intra-coded Frame (I-Frame) size, a Predictive-coded Frame (P-Frame) size, a bidirectional Predictive-coded Frame (B-Frame) size, and the like, and the transmission parameter may include a transmission protocol, a transmission protocol load data length, a sending buffer size, and the like.
The system parameter is specifically a system parameter set by a user. Optionally, before the step S201, a setting instruction of a user is received, and one or more system parameters are set according to the setting instruction. Optionally, after receiving the setting instruction of the user, the method further includes instructing the video data receiving end to set the system parameters so as to keep the system parameters of the video data sending end and the video data receiving end consistent. The system parameters can be set, so that the influence of each system parameter on the video transmission quality can be accurately measured, and the optimal system parameter can be searched.
Optionally, the acquiring of the system parameter may be acquiring a system parameter set by a user in real time, or acquiring a system parameter pre-stored in the local terminal, or acquiring a system parameter input by the user through another terminal.
In S202, according to the system parameters, a video encoded data frame is generated in a simulated manner and sent to a video data receiving end.
And simulating to generate a video coding data frame according to the system parameters, and then sending the video coding data frame to a video data receiving end according to the system parameters. Specifically, according to the coding parameters in the system parameters, video coding data frames are generated in a simulation mode; and sending the video coding data frame to a video data receiving end according to the transmission parameters in the system parameters.
Specifically, the system parameters at least include a frame rate, an I frame size, a P frame size, a transmission protocol load data length, a sending buffer size, and a transmission protocol, and the simulating generation of the video encoded data frame and the sending of the video encoded data frame to the video data receiving end according to the system parameters includes:
according to the frame rate, the size of the I frame and the size of the P frame, simulating and generating a video coding data frame in an H264 or H265 coding mode, wherein the video coding data frame at least comprises the I frame and the P frame;
dividing each frame of the video coding data into a plurality of sub-segments according to the transmission protocol load data length and generating fragment data;
and sequentially sending the fragment data to a video data receiving end according to the size of the sending buffer area and a transmission protocol.
The video coding data frame mainly comprises three types of I frame, P frame and B frame, and the common video coding sequence consists of the I frame and the P frame or consists of the I frame, the P frame and the B frame. In the embodiment of the present application, the system parameters at least include a frame rate, an I frame size, a P frame size, a transport protocol payload data length, a sending buffer size, and a transport protocol, and may further include a B frame size or other system parameters that affect video transmission quality.
Generally, the higher the frame rate, the larger the I-frame size and the P-frame size, the higher the video encoding quality, but the correspondingly larger the amount of video encoded data generated, the greater the probability of data loss during video transmission. And simulating to generate video coded data frames in an H264 coding mode or an H265 coding mode according to information such as the frame rate, the I frame size and the P frame size, wherein the simulated generated video coded data frames at least comprise I frames and P frames, and the unit of the I frame size and the P frame size can be bytes (B) or Kilobytes (KB). Specifically, the video coded data frame comprises multiple groups of unit frame sequences, wherein the first frame of each group of unit frame sequences is an I frame, and other data frames are P frames. Specifically, each frame of video coded data generated by simulation carries frame sequence number information. In the embodiment of the application, because the encoding quality and the encoding efficiency of the H264 encoding mode and the H265 encoding mode are high, the efficiency of generating the video encoding data frame by adopting the H264 encoding mode or the H265 encoding mode in an analog mode is high, and therefore the video transmission testing efficiency can be improved.
The transport protocol payload length is the data payload of a single transmission, i.e. the length of one transmission unit, for example, if the transport protocol payload length is x bytes, the length of a unit data segment to be transmitted cannot exceed x bytes. Generally, the longer the transport protocol payload length, the higher the transmission efficiency, but the greater the loss of packet loss, i.e., the greater the amount of data that may be lost in video transmission. According to the transmission protocol load length and the length of the preset packet header information, each frame of video coding data frame is divided into a plurality of sub-segments, and the data of each sub-segment and the packet header information of the sub-segment form a segment of fragment data. The length of the transmission protocol load minus the length of the header information is equal to the length of the sub-segment, and the length of the sub-segment plus the length of the header information is equal to the length of the fragmented data, i.e. the length of the transmission protocol load is equal to the length of the fragmented data. Specifically, the header information of each fragment data includes a frame sequence number, a sub-fragment sequence number, and sub-fragment length information corresponding to the fragment. For example, if the frame sequence number of one piece of slice data is 2, the sub-slice sequence number is 3, and the sub-slice length information is 1024B, it indicates that the sub-slice data included in the piece of slice data is the data of the third sub-slice of the second frame of video encoded data, and the size of the sub-slice data is 1024B.
The sending buffer area is an area for caching video coded data frames to be sent, when a network fluctuates, the video coded data to be sent can be cached in the sending buffer area to wait for sending, and when the abnormal time of the network is too long, so that the data volume of the video coded data to be sent exceeds the size of the sending buffer area, some video coded data to be sent can be automatically discarded, therefore, the larger the sending buffer area is, the smaller the probability of data loss during video transmission is, but the larger the sending buffer area occupies a larger memory unit, and the system operation efficiency is influenced. The Transmission Protocol may be Transmission Control Protocol (TCP) or User Data Protocol (UDP). And sequentially sending each piece of data to a video data receiving end according to the size of the sending buffer area and the transmission protocol.
In S203, a video transmission quality test result is obtained according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
Specifically, the sending information of the video coded data frame may be information of fragment data (specifically, packet header information of the fragment data) of the video coded data frame sent by the video sending terminal to the video data receiving terminal, and the receiving information of the video coded data frame may specifically be information of fragment data of the video coded data frame of the video sending terminal received by the video receiving terminal.
If data transmission is performed between the video data sending end and the video data receiving end in a TCP manner, the video data sending end may obtain a video transmission quality test result only according to the sending information of the video encoded data frame counted by the video data sending end. If data transmission is performed between the video data sending end and the video data receiving end in a UDP (user Datagram protocol) mode, a video transmission quality test result is obtained according to sending information of video coded data frames counted by the video data sending end and receiving information of the video coded data frames counted by the video data receiving end; in this case, the video data receiving end may send the statistical received information of the video encoded data frame to the video data sending end, so that the video data sending end calculates the video transmission quality test result according to the statistical sent information of the video encoded data frame and the received information of the video encoded data; or, the video data sending end sends the sending information of the video coding data frame to a third-party terminal, the video data receiving end also sends the receiving information of the video coding data frame to the third-party terminal, the video transmission quality test result is calculated through the third-party terminal, and then the video sending end obtains the video transmission quality test result from the third-party terminal.
Optionally, the receiving information of the video coded data frame may specifically include duration information of decoding success and duration information of decoding failure after the video coded data frame is received by the video data receiving end, and because the reason of decoding failure is usually that a data frame is lost, the ratio of the duration of decoding success to the total video duration may be calculated according to the duration information of decoding success and the duration information of decoding failure, and the ratio is used as a video transmission quality test result.
Optionally, the transmission protocol is specifically a TCP protocol, and correspondingly, the step S203 includes:
recording information of discarded fragment data, information of successfully transmitted fragment data and information of unsuccessfully transmitted fragment data as transmission information of video coded data frames;
counting the sending information of the video coding data frame to obtain a target counting result;
and obtaining a video transmission quality test result according to the target statistical result.
In this embodiment, the sending information of the video coded data frame specifically includes information of discarded fragment data, information of successfully sent fragment data, and information of unsuccessfully sent fragment data, and the information of the fragment data specifically includes frame sequence number information and fragment sequence number information of the fragment data.
The TCP transmission mode is a reliable transmission mode, and the response information of the receiving party is obtained after each data transmission, so that the information of the successfully transmitted fragment data and the information of the unsuccessfully transmitted fragment data can be recorded according to the response information returned by the video data receiving end, and the two kinds of information can reflect the video data receiving condition of the video data receiving end. In addition, when video coded data is transmitted, a transmission buffer area is occupied due to the fact that the time of network abnormity is too long, so that fragment data of some video coded data frames are forced to be discarded.
And after the video coding data frame of the test in the current round is sent, counting the sending information of the video coding data frame. Specifically, the discarded fragment data and the fragment data failed to be sent are regarded as lost fragment data, and according to the recorded information of the discarded fragment data, the information of the fragment data successful to be sent, and the information of the fragment data failed to be sent, whether lost fragment data exists in each frame of video coded data frame can be counted, and the transmission result of each frame of video coded data frame is obtained as a target counting result.
And acquiring the transmission result of each frame of video coding data frame according to the target statistical result, and obtaining a video transmission quality test result through a certain calculation mode. For example, the video transmission quality test result may be the ratio of the number of completely transmitted video coding data frames to the total number of video coding data frames. Specifically, since the I frame is a key frame and has a greater influence on the video quality, the transmission result of the I frame and the transmission result of the P frame can be distinguished, counted and calculated to obtain a more accurate video transmission quality test result. Specifically, for a specific encoding scheme, the unit time length of the unit frame sequence is fixed (for example, the unit time length of the unit frame sequence in the H264 encoding scheme or the H265 encoding scheme is 2 seconds, that is, each 2 seconds is a set of unit frame sequences), and therefore, it is possible to know whether each frame of video encoded data is an I frame or a P frame based on the frame sequence number information, the unit time length of the unit frame sequence, and the frame rate.
Optionally, the transmission protocol is specifically a UDP protocol, and step S203 specifically includes:
counting the sending information of the video coding data frame, and generating a first statistical file, wherein the sending information of the video coding data frame is the information of the fragment data of the video coding data frame sent to a video data receiving end;
obtaining a target statistical result according to the first statistical file and a received second statistical file of a video data receiving end, wherein the second statistical file contains information of fragment data of the received video coding data frame counted by the video receiving end;
and obtaining a video transmission quality test result according to the target statistical result.
In the embodiment of the present application, information of a segment of the segment data is recorded when each segment of the segment data is transmitted, that is, information of segment data of a video encoded data frame that has been transmitted to a video data receiving end is recorded as transmission information of the video encoded data frame. The information of the fragmented data specifically includes a frame sequence number and a fragment sequence number corresponding to the fragmented data. When all video coding data frames of the current round of video transmission test are sent, counting the sending information of all the video coding data frames to generate a first statistical file, wherein the first statistical file comprises the frame serial numbers and the fragment serial numbers corresponding to all the sent fragment data.
And receiving a second statistical file sent by the video data receiving end, wherein the second statistical file is a file which is generated by the video receiving end in a statistical manner and contains frame sequence number information and fragment sequence number information corresponding to the fragment data of all received video coding data frames when the video receiving end finishes receiving. And comparing the frame sequence number, the fragment sequence number and other information corresponding to the fragment data contained in the first statistical file and the second statistical file, so as to count whether each frame of video coded data has lost fragment data, and obtain the transmission result of each frame of video coded data as a target statistical result.
And acquiring the transmission result of each frame of video coding data frame according to the target statistical result, and obtaining a video transmission quality test result through a certain calculation mode. Specifically, since the I frame is a key frame and has a greater influence on the video quality, the transmission result of the I frame and the transmission result of the P frame can be distinguished, counted and calculated to obtain a more accurate video transmission quality test result.
Optionally, the obtaining a video transmission quality test result according to the target statistical result includes:
and calculating to obtain a video transmission quality test result according to the total number of the I frames, the total number of the P frames, the number of the successfully sent complete I frames and the number of the complete P frames, the fragment data loss rate of the incomplete frames, the I frame weight and the P frame weight.
And obtaining the total number of I frames, the total number of P frames, the number of successfully transmitted complete I frames, the number of complete P frames and the fragment data loss rate of incomplete frames according to the counted sending information and receiving information of the video coding data frames as a target counting result. The total number of the I frames is the total number of the I frames in all the video data frames generated by the test; the total number of the P frames is the total number of the P frames in all the video data frames generated by the test; the number of the complete I frames is the number of the I frames without losing the fragment data; the number of complete P frames is the number of P frames without losing fragment data; the incomplete frame refers to a data frame with incomplete data caused by losing part of the fragment data, and the fragment data loss rate of the incomplete frame refers to a ratio of the number of the fragment data lost by the incomplete frame to the total number of the fragment data originally corresponding to the data frame.
And calculating according to the total number of the I frames, the total number of the P frames, the number of the successfully sent complete I frames and the number of the complete P frames, the fragment data loss rate of the incomplete I frames, namely the fragment data loss rate of each incomplete P frame, and a preset I frame weight and a preset P frame weight through a preset formula to obtain a value y of a video transmission quality test result. Specifically, the preset formula is as follows:
wherein, "+" represents a multiplication number, m represents the number of incomplete I frames with the fragment data loss rate of less than 50%, and incomplete I frames with the fragment data loss rate of more than 50% do not participate in the calculation of the video transmission quality test result; n represents the number of incomplete P frames with the fragment data loss rate of less than 50%, and incomplete P frames with the fragment data loss rate of more than 50% do not participate in the calculation of the video transmission quality test result. The I frame weight value and the P frame weight value may be set according to specific situations, for example, the I frame weight is 1, and the P frame weight is 1. Since the I frame is a key frame, the preset weight value of the I frame is usually greater than or equal to the weight value of the P frame. The larger the value of the video transmission quality test result is, the better the video transmission quality is.
Optionally, the target statistical result includes a duration of continuous successful transmission of each unit frame sequence, where each unit frame sequence is composed of an I frame and a preset number of P frames; correspondingly, obtaining a video transmission quality test result according to the target statistical result includes:
obtaining the total duration of the successfully transmitted video data according to the duration of the continuous successful transmission of each unit frame sequence;
and obtaining a video transmission quality test result according to the total duration of the successfully sent video data and the total duration of the video coding data frames.
In the embodiment of the present application, the video coding data frames specifically include I frames and P frames. The video coding data frame generated by the video data sending end is composed of unit frame sequences, wherein each unit frame sequence comprises an I frame and a preset number of P frames. Specifically, for a specific encoding mode, the unit time length of the unit frame sequence is fixed, and the number of data frames included in each unit frame sequence can be calculated according to the unit time length and the frame rate of the unit frame sequence, and the preset number can be obtained by subtracting 1 from the number. For example, for the unit frame sequence of the H264 or 265 encoding scheme, the unit time length is 2 seconds, that is, every 2 seconds is a set of unit frame sequences; if the frame rate is 25fps, the frame number of each unit frame sequence is: the first frame of the 50 frames is an I frame, and the remaining 49 frames are P frames.
Obtaining the duration of the continuous transmission success of each unit frame sequence according to the statistical sending information of the video coding data frames and the statistical receiving information of the video coding data frames; and then accumulating the duration of the continuous successful transmission of each unit frame sequence to obtain the total duration of the successfully transmitted video data. For example, it is assumed that each unit frame sequence includes 50 frames, and if the frame rate is 25fps, it is assumed that the video encoded data frames of this test collectively include 150 frame data frames with frame sequence numbers of 0 to 149, then the test collectively includes 3 unit frame sequences, where the frame sequence number of 0 to 49 is a first unit frame sequence, the frame sequence number of 50 to 99 is a second unit frame sequence, and the frame sequence number of 100 to 149 is a third unit frame sequence. If statistics is made that video coding data frames with frame sequence numbers of 0-47 are all successfully transmitted in the first unit frame sequence, the duration of the continuous successful transmission of the first unit frame sequence is (1+47)/25 ═ 1.92 seconds; counting that video coding data frames with a frame sequence number of 50 are lost in the second unit frame sequence, namely the first frame of the second unit frame sequence is lost, wherein the duration of the continuous and successful transmission of the second unit frame sequence is 0 second; counting that all data frames of the third unit frame sequence are successfully transmitted, wherein the duration of the continuous successful transmission of the third unit frame sequence is 50/25-2 seconds; total duration of successfully transmitted video data T11.92+0+2, 3.92 seconds.
And obtaining a video transmission quality test result according to the total duration of the successfully sent video data and the total duration of the video coding data frames.
And calculating the proportion of the total duration of the successfully sent video data to the total duration of all video coding data frames generated by the test to obtain a video transmission quality test result, wherein the greater the value of the video transmission quality test result is, the better the video transmission quality is. For example, if a total of 150 frames of video coded data frames of the current test is set, and the frame rate is 25fps, the total duration of the video coded data frames is 150/25-6 seconds; if the total duration of the successfully transmitted video data is 3.92 seconds, the video transmission quality test result is 3.92/6-0.653.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, the video transmission quality test result is obtained by setting the system parameters, generating the video coding data frame in a simulation mode and according to the sending information of the video coding data frame and/or the receiving information of the video coding data frame, and the video coding data frame generated in a simulation mode according to the set system parameters is stable, so that the video data generated in real time by the monitoring camera equipment is not needed, other interference factors are eliminated, and the accuracy of the video transmission quality test can be improved; meanwhile, because the system parameters can be set, the influence of the system parameters on the video transmission quality can be accurately measured.
Example two:
fig. 3 shows a schematic flow chart of a second video transmission testing method provided in the embodiment of the present application, where an execution main body of the embodiment of the present application is a terminal device, and for convenience of distinction, the terminal device in the embodiment of the present application is specifically referred to as a video data sending end, and details are as follows:
in S301, system parameters are acquired.
In this embodiment, S301 is the same as S201 in the first embodiment, and please refer to the related description of S201 in the first embodiment, which is not repeated herein.
In S302, according to the system parameters, a video encoded data frame is generated in a simulated manner and sent to a video data receiving end.
In this embodiment, S302 is the same as S202 in the first embodiment, and please refer to the related description of S202 in the first embodiment, which is not repeated herein.
In S303, a video transmission quality test result is obtained according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
In this embodiment, S303 is the same as S203 in the first embodiment, and please refer to the related description of S203 in the first embodiment, which is not repeated herein.
In S304, the system parameters and the video quality test result are saved.
And storing the system parameters of the test and the video quality test result obtained by the test, wherein the system parameters and the video quality test result can be stored in a local database or a third-party database so as to inquire and compare historical test information later.
In S305, target system parameters are determined according to the video quality test result and the historical video quality test result.
Comparing the current video quality test result with the previously stored historical video quality test result according to the current video quality test result, and determining the current system parameter as a target system parameter if the value of the current video quality test result is superior to the value of the previously stored video quality test result; and if the historical video quality test result has a value better than the current video quality test result, determining the historical system parameters stored corresponding to the historical video quality test result as the target system parameters.
In S306, the target terminal is instructed to perform system setting according to the target system parameter.
And sending the target system parameters to a target terminal, and indicating the target terminal to carry out system setting according to the target system parameters so as to optimize video transmission of the target terminal. Specifically, the target terminal is instructed to set the encoder according to the encoding parameters in the target system parameters, and the target terminal is instructed to set the transmission unit according to the transmission parameters in the target system parameters. Specifically, the target terminal is a Video transmission device, such as an internet protocol Camera (IP Camera, IPC), a Network Video Recorder (NVR), and the like.
In the embodiment of the application, after the video transmission test is performed, the video transmission test result of the current time is compared with the pre-stored historical video transmission quality test result, so that a better target system parameter is obtained, and the target terminal is instructed to perform system setting according to the target system parameter, so that the video transmission quality of the target terminal can be improved.
As shown in fig. 4, an application scenario diagram of a video transmission testing method is further provided in the embodiment of the present application, where a video data sending end 41 establishes a connection with a video data receiving end 42 to perform a video data transmission test, and also establishes a connection with a target terminal 43 to instruct the target terminal 43 to perform system configuration.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example three:
fig. 5 is a schematic structural diagram of a video transmission testing apparatus provided in an embodiment of the present application, and for convenience of description, only parts related to the embodiment of the present application are shown:
the video transmission testing device comprises: an acquisition unit 51, a transmission unit 52, and a calculation unit 53. Wherein:
an obtaining unit 51, configured to obtain system parameters.
And a sending unit 52, configured to generate a video encoded data frame in an analog manner according to the system parameter, and send the video encoded data frame to a video data receiving end.
Optionally, the system parameters at least include a frame rate, an I frame size, a P frame size, a transport protocol payload data length, a sending buffer size, and a transport protocol, and the sending unit 52 includes an encoding module, a segmenting module, and a sending module:
the encoding module is used for simulating and generating video encoding data frames in an H264 or H265 encoding mode according to the frame rate, the I frame size and the P frame size, wherein the video encoding data frames at least comprise I frames and P frames;
the segmentation module is used for dividing each frame of the video coding data into a plurality of sub-segments according to the transmission protocol load data length and generating segment data;
and the sending module is used for sequentially sending the fragment data to a video data receiving end according to the size of the sending buffer area and a transmission protocol.
And the calculating unit 53 is configured to obtain a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
Optionally, the transmission protocol is specifically a TCP protocol, and correspondingly, the calculating unit 53 includes a recording module, a sending information statistics module, and a calculating module:
the recording module is used for recording the information of the discarded fragment data, the information of the fragment data which is successfully transmitted and the information of the fragment data which is unsuccessfully transmitted as the transmission information of the video coding data frame;
the sending information counting module is used for counting the sending information of the video coding data frame to obtain a target counting result;
and the calculation module is used for obtaining a video transmission quality test result according to the target statistical result.
Optionally, the transmission protocol is specifically a UDP protocol, and correspondingly, the computing unit 53 includes a first statistical file generating module, a first statistical module, and a second computing module:
the first statistical file generation module is used for counting the sending information of the video coding data frame and generating a first statistical file, wherein the sending information of the video coding data frame is the information of the fragment data of the video coding data frame sent to a video data receiving end;
the first statistical module is used for obtaining a target statistical result according to the first statistical file and a received second statistical file of a video data receiving end, wherein the second statistical file contains information of fragment data of a received video coding data frame counted by the video receiving end;
and the calculation module is used for obtaining a video transmission quality test result according to the target statistical result.
Optionally, the target statistics include a total number of I frames, a total number of P frames, a number of successfully transmitted complete I frames and a number of complete P frames, a fragmentation data loss rate of incomplete frames, and correspondingly,
the calculating module is specifically configured to calculate and obtain a video transmission quality test result according to the total number of I frames, the total number of P frames, the number of successfully transmitted complete I frames and the number of complete P frames, the fragment data loss rate of the incomplete frames, and the I frame weight and the P frame weight.
Optionally, the target statistical result includes a duration of continuous successful transmission of each unit frame sequence, where each unit frame sequence is composed of an I frame and a preset number of P frames; in a corresponding manner, the first and second electrodes are,
the calculating module is specifically configured to obtain a total duration of successfully transmitted video data according to a duration of continuous successful transmission of each unit frame sequence; and obtaining a video transmission quality test result according to the total duration of the successfully sent video data and the total duration of the video coding data frames.
Optionally, the video transmission testing apparatus further includes:
the storage unit is used for storing the system parameters and the video quality test result;
the target system parameter determining unit is used for determining target system parameters according to the video quality test result and the historical video quality test result;
and the indicating unit is used for indicating the target terminal to carry out system setting according to the target system parameters.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, the video coding data frame is generated through setting the system parameters and simulating, and the video transmission quality test result is obtained according to the sending information of the video coding data frame and/or the receiving information of the video coding data frame.
It should be noted that, for the information interaction, execution process, and other contents between the units of the apparatus, the specific functions and technical effects of the embodiments of the method are based on the same concept, and thus reference may be made to the section of the embodiments of the method specifically, and details are not described here.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Example four:
fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62, such as a video transmission test program, stored in said memory 61 and executable on said processor 60. The processor 60, when executing the computer program 62, implements the steps in the various embodiments of the video transmission test method described above, such as the steps S201 to S203 shown in fig. 2. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the units 51 to 53 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into an acquisition unit, a transmission unit, and a calculation unit, and each unit specifically functions as follows:
and the acquisition unit is used for acquiring the system parameters.
And the sending unit is used for simulating and generating a video coding data frame according to the system parameters and sending the video coding data frame to a video data receiving end.
And the computing unit is used for obtaining a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (10)
1. A video transmission test method, comprising:
acquiring system parameters;
according to the system parameters, simulating to generate video coding data frames and sending the video coding data frames to a video data receiving end;
and obtaining a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
2. The video transmission testing method according to claim 1, wherein the system parameters at least include frame rate, I frame size, P frame size, transport protocol payload data length, sending buffer size and transport protocol, and the simulating generating video encoded data frames and sending the video encoded data frames to a video data receiving end according to the system parameters comprises:
according to the frame rate, the size of the I frame and the size of the P frame, simulating and generating a video coding data frame in an H264 or H265 coding mode, wherein the video coding data frame at least comprises the I frame and the P frame;
dividing each frame of the video coding data into a plurality of sub-segments according to the transmission protocol load data length and generating fragment data;
and sequentially sending the fragment data to a video data receiving end according to the size of the sending buffer area and a transmission protocol.
3. The video transmission testing method according to claim 2, wherein the transmission protocol is specifically a TCP protocol, and correspondingly, the obtaining a video transmission quality testing result according to the statistical sending information of the video coding data frame and/or the statistical receiving information of the video coding data frame received by the video data receiving end comprises:
recording information of discarded fragment data, information of successfully transmitted fragment data and information of unsuccessfully transmitted fragment data as transmission information of video coded data frames;
counting the sending information of the video coding data frame to obtain a target counting result;
and obtaining a video transmission quality test result according to the target statistical result.
4. The video transmission testing method according to claim 2, wherein the transmission protocol is a UDP protocol, and correspondingly, the obtaining a video transmission quality testing result according to the statistical sending information of the video coding data frame and/or the statistical receiving information of the video coding data frame received by the video data receiving end comprises:
counting the sending information of the video coding data frame, and generating a first statistical file, wherein the sending information of the video coding data frame is the information of the fragment data of the video coding data frame sent to a video data receiving end;
obtaining a target statistical result according to the first statistical file and a received second statistical file of a video data receiving end, wherein the second statistical file contains information of fragment data of the received video coding data frame counted by the video receiving end;
and obtaining a video transmission quality test result according to the target statistical result.
5. The video transmission testing method according to claim 3 or 4, wherein the target statistical result includes a total number of I frames, a total number of P frames, a number of successfully transmitted complete I frames and a number of complete P frames, and a fragmentation data loss rate of incomplete frames, and correspondingly, the obtaining a video transmission quality testing result according to the target statistical result includes:
and calculating to obtain a video transmission quality test result according to the total number of the I frames, the total number of the P frames, the number of the successfully sent complete I frames and the number of the complete P frames, the fragment data loss rate of the incomplete frames, the I frame weight and the P frame weight.
6. The video transmission testing method of claim 3 or 4, wherein the target statistical result comprises a duration of successful transmission of each unit frame sequence, wherein each unit frame sequence consists of an I frame and a preset number of P frames; correspondingly, obtaining a video transmission quality test result according to the target statistical result includes:
obtaining the total duration of the successfully transmitted video data according to the duration of the continuous successful transmission of each unit frame sequence;
and obtaining a video transmission quality test result according to the total duration of the successfully sent video data and the total duration of the video coding data frames.
7. The video transmission test method of claim 1, further comprising, after said obtaining the video transmission quality test result:
saving the system parameters and the video quality test result;
determining target system parameters according to the video quality test result and the historical video quality test result;
and indicating the target terminal to carry out system setting according to the target system parameters.
8. A video transmission test apparatus, comprising:
an acquisition unit for acquiring system parameters;
the sending unit is used for generating a video coding data frame in a simulation mode according to the system parameters and sending the video coding data frame to a video data receiving end;
and the computing unit is used for obtaining a video transmission quality test result according to the statistical sending information of the video coding data frame and/or the received information of the video coding data frame counted by the received video data receiving end.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the computer program, when executed by the processor, causes the terminal device to carry out the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes a terminal device to carry out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910945320.7A CN110636283B (en) | 2019-09-30 | 2019-09-30 | Video transmission test method and device and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910945320.7A CN110636283B (en) | 2019-09-30 | 2019-09-30 | Video transmission test method and device and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110636283A true CN110636283A (en) | 2019-12-31 |
CN110636283B CN110636283B (en) | 2021-10-15 |
Family
ID=68975469
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910945320.7A Active CN110636283B (en) | 2019-09-30 | 2019-09-30 | Video transmission test method and device and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110636283B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111639235A (en) * | 2020-06-01 | 2020-09-08 | 重庆紫光华山智安科技有限公司 | Video recording quality detection method and device, storage medium and electronic equipment |
CN114422773A (en) * | 2022-01-27 | 2022-04-29 | 重庆长安汽车股份有限公司 | Customized image debugging system and method |
CN115357067A (en) * | 2022-08-26 | 2022-11-18 | 上海磐启微电子有限公司 | Full-automatic batch test system for high and low temperature performance of wireless image transmission product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101115196A (en) * | 2006-07-27 | 2008-01-30 | 腾讯科技(深圳)有限公司 | Method, system and terminal for adjusting video quality |
CN102158881A (en) * | 2011-04-28 | 2011-08-17 | 武汉虹信通信技术有限责任公司 | Method and device for completely evaluating 3G visual telephone quality |
US8131840B1 (en) * | 2006-09-12 | 2012-03-06 | Packet Plus, Inc. | Systems and methods for data stream analysis using embedded design logic |
CN102611894A (en) * | 2012-03-02 | 2012-07-25 | 华为技术有限公司 | Method, device and system for detecting video transmission packet loss |
US20140327779A1 (en) * | 2013-05-01 | 2014-11-06 | Nokia Corporation | Method and apparatus for providing crowdsourced video |
-
2019
- 2019-09-30 CN CN201910945320.7A patent/CN110636283B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101115196A (en) * | 2006-07-27 | 2008-01-30 | 腾讯科技(深圳)有限公司 | Method, system and terminal for adjusting video quality |
US8131840B1 (en) * | 2006-09-12 | 2012-03-06 | Packet Plus, Inc. | Systems and methods for data stream analysis using embedded design logic |
CN102158881A (en) * | 2011-04-28 | 2011-08-17 | 武汉虹信通信技术有限责任公司 | Method and device for completely evaluating 3G visual telephone quality |
CN102611894A (en) * | 2012-03-02 | 2012-07-25 | 华为技术有限公司 | Method, device and system for detecting video transmission packet loss |
US20140327779A1 (en) * | 2013-05-01 | 2014-11-06 | Nokia Corporation | Method and apparatus for providing crowdsourced video |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111639235A (en) * | 2020-06-01 | 2020-09-08 | 重庆紫光华山智安科技有限公司 | Video recording quality detection method and device, storage medium and electronic equipment |
CN111639235B (en) * | 2020-06-01 | 2023-08-25 | 重庆紫光华山智安科技有限公司 | Video recording quality detection method and device, storage medium and electronic equipment |
CN114422773A (en) * | 2022-01-27 | 2022-04-29 | 重庆长安汽车股份有限公司 | Customized image debugging system and method |
CN115357067A (en) * | 2022-08-26 | 2022-11-18 | 上海磐启微电子有限公司 | Full-automatic batch test system for high and low temperature performance of wireless image transmission product |
CN115357067B (en) * | 2022-08-26 | 2024-05-03 | 上海磐启微电子有限公司 | Full-automatic batch test system for high-low temperature performance of wireless image transmission product |
Also Published As
Publication number | Publication date |
---|---|
CN110636283B (en) | 2021-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110636283B (en) | Video transmission test method and device and terminal equipment | |
CN110225417B (en) | Data processing method and server, and method and server for detecting stuck state | |
CN106911927B (en) | Method and device for evaluating experience quality of network video user and DPI equipment | |
US11677769B2 (en) | Counting SYN packets | |
CN109286813B (en) | Video communication quality detection method and device | |
CN111405327A (en) | Network bandwidth prediction model training method, video data playing method and device | |
WO2021088484A1 (en) | Network delay detection method and related device | |
CN108900830B (en) | Platform for verifying accuracy of infrared video image processing algorithm | |
CN111813638B (en) | Alarm information processing method and device and terminal equipment | |
CN110475124A (en) | Video cardton detection method and device | |
CN111405370B (en) | Video playback method and device | |
US20080159410A1 (en) | Methods and systems for computing the quality of an MPEG-2 video stream | |
CN109120468A (en) | The method and apparatus for obtaining end-to-end network delay | |
CN108574814B (en) | Data processing method and device | |
CN107846586A (en) | Monitoring method, device and the service end of video flow quality | |
CN112511522B (en) | Method, device and equipment for reducing memory occupation in detection scanning | |
CN110764975A (en) | Early warning method and device for equipment performance and monitoring equipment | |
CN111552566B (en) | Data processing system, method, electronic equipment and storage medium | |
CN110022334B (en) | Detection method and detection device of proxy server and terminal equipment | |
CN113760989A (en) | Method, device and equipment for processing unbounded stream data and storage medium | |
CN108512711B (en) | Method, device and equipment for obtaining instantaneous interface access statistic | |
CN111176931A (en) | Operation monitoring method, operation monitoring device, server and storage medium | |
CN111159196A (en) | Block chain data storage and acquisition method and device based on fragmentation | |
JP4866376B2 (en) | User experience quality measurement apparatus and user experience quality measurement method | |
CN114640754B (en) | Video jitter detection method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |