A method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls

Through real-time analysis and dynamic decoding of 5G to enhance audio and video streams in calls, the problem that the existing technology cannot effectively parse and identify AMR-WB encoded audio streams is solved, and efficient audio and video stream processing and intelligent interaction are achieved, ensuring call quality.

CN119788652APending Publication Date: 2025-04-08JIANGSU HAOBAI INFORMATION SERVICE CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411733850.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing technology cannot effectively analyze the audio and video streams in 5G enhanced calls and combine them with AI capabilities to achieve the upgrade of the visual call experience. At the same time, while real-time identification and analysis of AMR-WB-encoded audio streams while ensuring call quality.

Method used

A real-time analysis and dynamic decoding method for audio and video streams in 5G enhanced calls is proposed. By grabbing RTP packets in real time, the media control description information and audio and video load data are separated, the AMR-WB-encoded voice load data is parsed, and the AMR-WB-encoded voice load data is transcoded into PCM-encoded audio streams through effective frame data retention, frame data rearrangement and silent frame precision compensation mechanisms.

Benefits of technology

Real-time analysis and dynamic decoding of audio and video streams in 5G enhanced calls is realized, solving the problem that the existing technology cannot recognize AMR-WB encoded audio streams, ensuring 5G enhanced call quality, and providing recognizable transcoding audio for intelligent interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788652A_ABST
    Figure CN119788652A_ABST
Patent Text Reader

Abstract

The present invention provides a method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls, and relates to the field of new generation communication telephone technology. The first method is to perform audio and video media negotiation after the 5G enhanced call starts, read the SDP description information to separate the media description control information and the RTP data packet, separate the audio and video media stream data according to the media load type, parse the load data according to the RTP data protocol format, and parse the load data of the data packet in the call in real time. The second method is to retain the effective frame data, rearrange the frame data and compensate for the silent frame of the extracted AMR-WB voice data, parse the complete AMR-WB audio stream, and then determine the decoding parameters according to the obtained audio clock frequency, and transcode the AMR-WB audio stream into the PCM encoding format. This method can solve the problem that the existing technology cannot perform real-time parsing of audio and video streams under the 5G enhanced call network. Under the premise of ensuring the quality of 5G enhanced calls, recognizable transcoded audio is provided for intelligent interaction in calls.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of new generation communication telephone technology, and in particular to a method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls. Background Art

[0002] With the advancement of 5G network construction and large-scale deployment, 5G communication services are developing rapidly. 5G enhanced calls are an upgrade of the basic call service by operators. Based on the audio and video channels of the IMS network, it provides a series of call enhancement services, such as call subtitles, fun calls and intelligent translation, to provide users with a new call experience with multimedia, visualization and full interaction. The 5G enhanced call network is based on the existing IMS audio and video call network architecture, and introduces two new capabilities: the control plane NCP and the media plane UMF. Different from the existing network equipment, NCP can not only be used to control the interaction of telephone call signaling SIP, but also complete the distribution of service control HTTP requests, while UMF is mainly responsible for the replication and synthesis of call audio and video media streams.

[0003] In order to realize 5G enhanced call services such as call subtitles, fun calls and intelligent translation, it is first necessary to perform real-time analysis of the audio and video media streams in 5G enhanced calls. In the 5G enhanced call network, the analysis of the media stream not only needs to separate the media control description information and the payload data packet, but also needs to process the audio stream and video stream separately according to the payload type, and then use different AI algorithms to integrate AI capabilities for the audio and video streams respectively, such as applying speech recognition to the analyzed audio stream and gesture recognition to the video stream. However, at this stage, there is currently no real-time analysis method for audio and video streams under the 5G enhanced call network to complete the combination of audio and video media streams and AI capabilities and realize the upgrade of the visual call experience of 5G enhanced calls.

[0004] Secondly, the audio stream in 5G enhanced calls needs to be dynamically decoded. The most common audio stream encoding form in 5G enhanced call networks is Adaptive Multi-Rate Wideband (AMR-WB) encoding technology, which has high encoding efficiency and good error resistance, and can dynamically adjust the bit rate under different network conditions. However, such mainstream AMR-WB encoding has brought troubles to the recognition and parsing of audio streams for intelligent voice services such as intelligent translation and voice emoticons in fun calls in 5G enhanced calls. The audio stream format required by common voice recognition engines is PCM. For AMR-WB encoded audio streams, all current real-time voice recognition engines do not support recognition. The inability to recognize voice directly affects the subsequent intelligent call interaction and hinders the installation and popularization of voice intelligent applications in 5G enhanced calls.

[0005] At present, the algorithm for transcoding AMR-WB encoded audio streams into recognizable PCM encoded streams is mainly for offline voice files. The conversion is performed by adding AMR encoding packages to ffmpeg. However, in real-time audio and video communications, the media streams transmitted in the network are not directly accessible AMR-WB audio files. Conventional offline audio encoding conversion cannot handle the needs of voice recognition in real-time audio and video communications for intelligent interaction. If other encoding technologies are used for audio and video transmission in 5G enhanced calls, the call quality of 5G enhanced calls will be sacrificed, resulting in excessive audio noise, audio information loss and other problems, affecting user experience. Therefore, how to quickly and accurately extract AMR-WB audio and transcode PCM for real-time audio streams in 5G enhanced calls while ensuring the quality of user calls, so as to successfully carry out voice recognition and promote the construction of subsequent voice intelligence applications has become a complex but urgent problem to be solved. Summary of the invention

[0006] Purpose of the invention: A method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls is proposed. First, the real-time audio and video streams in 5G enhanced calls are parsed, including audio and video media negotiation, reading media information, extracting the encoding type and audio clock frequency of the current audio and video streams, so as to determine the decoding parameters later, and separating the control information and audio and video load data at the same time, separating the audio stream and video stream data packets according to the load type, and parsing the load data in the call data packet in real time; second, the parsed voice load data containing AMR-WB audio stream information is retained for effective frame data, rearranged for frame data, and accurately compensated for silent frames, and after splicing the complete AMR-WB audio stream, the decoding parameters are modified according to the obtained audio clock frequency, and AMR to PCM decoding is performed. The present invention performs real-time parsing of audio and video streams in 5G enhanced calls, separates media description control information and media stream load data packets, and completes efficient parsing of RTP data streams; restores AMR-WB audio streams through effective frame data retention, frame data rearrangement, and silent frame accurate compensation mechanisms, and transcodes them into PCM audio streams. The above-mentioned technical means are used to solve the above-mentioned problems existing in the prior art.

[0007] The present invention proposes a method for real-time parsing and dynamic decoding of audio and video streams in a 5G enhanced call, and the steps are as follows:

[0008] When a 5G enhanced call starts, the SDP description information of the target audio and video stream is extracted;

[0009] Separating media description control information and RTP data packets from the target audio and video stream according to the SDP description information;

[0010] During the 5G enhanced call, the RTP data packets are captured in real time, the RTP data packets are parsed one by one, and after the RTP header information is stripped from the RTP data packets, the AMR-WB encoded voice payload data and the H264 encoded video payload data are obtained;

[0011] Parsing the AMR-WB encoded voice payload data, wherein the parsing process includes retaining valid frame data, reordering frame data, and compensating for silent frames, and outputting a spliced ​​AMR-WB audio stream;

[0012] Extract the H264-encoded video payload data frame by frame for subsequent gesture recognition engine;

[0013] Determine the transcoding parameters and transcode the spliced ​​AMR-WB audio stream into a PCM encoded audio stream. The generated PCM encoded audio stream can be sent to subsequent speech recognition for text translation and intelligent interaction.

[0014] In a further embodiment, the SDP description information includes multiple lines of media description information;

[0015] Regular expression matching is performed on the media description information to obtain the payload media type name, encoding name, and audio clock frequency.

[0016] In a further embodiment, the RTP data packets are captured in real time during the 5G enhanced call, each RTP data packet including RTP header information and actual media data payload;

[0017] According to the format required by the RTP bearer protocol, after stripping the RTP header information from the RTP data packet, the AMR-WB encoded voice payload data and the H264 encoded video payload data are obtained.

[0018] In a further embodiment, when the voice payload data length of the AMR-WB encoded voice payload data is greater than or equal to 10, it is a non-silent frame;

[0019] At this time, each segment of AMR-WB encoded voice payload data consists of multiple voice frames, and each voice frame consists of a mode request field CMR, a content information table ToC, and a voice data stream.

[0020] In a further embodiment, parsing the AMR-WB encoded voice payload data of the non-silent frame includes:

[0021] Parse the mode request field CMR to determine whether the obtained value is 15:

[0022] When the value is 15, the AMR-WB encoded voice payload data is not further encoded and can be directly retained for subsequent parsing;

[0023] When the value is not 15, the current AMR-WB encoded voice payload data is re-encoded.

[0024] Parsing a content information table ToC, wherein the content information table ToC records a tail frame identifier, a frame type, and a valid identifier;

[0025] By obtaining the frame rate of AMR-WB through the frame type, the actual effective length of the frame data can be calculated;

[0026] By parsing the obtained frame data, it is determined whether the current frame is the end frame and whether it is valid. When the frame is valid, the valid frame data is retained according to the calculated actual effective length of the frame data, and the frame data is rearranged at the same time, retaining the ToC and the valid frame data to merge into a spliced ​​AMR-WB audio stream.

[0027] In a further embodiment, when the voice payload data length of the AMR-WB encoded voice payload data is less than 10, it is a silence frame;

[0028] Add AMR header data to the silent frame and fill it with 0 as placeholder to compensate for the missing 7 silent data packets and then splice them into the current AMR-WB encoded voice payload data to obtain the spliced ​​AMR-WB audio stream.

[0029] In a further embodiment, based on the spliced ​​AMR-WB audio stream, according to the audio clock frequency, the transcoding parameters are determined, the ffmpeg transcoding statements are spliced, and the AMR-WB audio stream is transcoded into a PCM encoded audio stream. The generated PCM encoded audio stream can be sent to subsequent speech recognition for text translation and intelligent interaction.

[0030] In addition, the present invention also proposes an electronic device, which includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the above-mentioned real-time parsing and dynamic decoding method of audio and video streams in 5G enhanced calls.

[0031] In addition, the present invention also proposes a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is run on an electronic device, the electronic device executes the above-mentioned real-time parsing and dynamic decoding method of audio and video streams in 5G enhanced calls.

[0032] Compared with the prior art, the present invention has at least the following beneficial effects:

[0033] The first method of the present invention is to parse the real-time audio and video streams of the 5G enhanced call, including audio and video streaming media negotiation, reading media information, extracting the encoding type and audio clock frequency of the current audio and video streams for subsequent determination of decoding parameters, separating the media control description information and the audio and video load data, separating the audio stream and video stream data packets according to the load type, and parsing the load data in the call data packet in real time, thereby solving the problem that the existing technology cannot perform real-time analysis of the audio and video streams under the 5G enhanced call network.

[0034] The second method is to retain valid frame data, rearrange frame data, and accurately compensate for silent frames on the parsed voice load data containing AMR-WB audio stream information, and after splicing the complete AMR-WB audio stream, modify the decoding parameters according to the acquired audio clock frequency to perform AMR to PCM decoding. The present invention performs efficient parsing of the RTP data stream by real-time parsing of the audio and video media streams in 5G enhanced calls, separating the media description control information and the media stream load data packets; and restores the AMR-WB audio stream through the effective frame data retention, frame data rearrangement, and silent frame accurate compensation mechanism, and transcodes it into a PCM audio stream. It solves the problems of audio and video stream parsing and AWR-WB audio decoding in 5G enhanced calls, and provides recognizable transcoded audio for intelligent interaction in 5G enhanced calls while ensuring the quality of 5G enhanced calls. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is an overall architecture diagram of a method for real-time parsing and dynamic decoding of audio and video streams in a 5G enhanced call in an embodiment of the present invention.

[0036] Figure 2 It is a schematic diagram of the real-time parsing process of audio and video streams in an embodiment of the present invention.

[0037] Figure 3 It is a schematic diagram of the AMR-WB voice data parsing and decoding process in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features known in the art are not described.

[0039] Assuming that the audio stream of the call based on the 5G enhanced call network is AMR-WB encoded, and the video stream is H264 encoded, it is necessary to perform real-time parsing and transcoding of the audio and video streams in the 5G enhanced call, efficiently parse out the audio and video data, and decode the AMR-WB audio stream into a PCM encoding type that can be parsed by the speech recognition engine. The solution proposed by the present invention is as follows Figure 1 As shown, a method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls is provided. The method mainly includes two processes: real-time parsing of audio and video streams and parsing and decoding of AMR-WB voice data:

[0040] Process (I): Real-time parsing of audio and video streams

[0041] Step 1: Audio and video streaming negotiation. When the 5G enhanced call starts, audio and video media negotiation is performed. First, the SDP description information of the audio and video media stream is negotiated and extracted. The SDP description information contains multiple lines of media description information. Through regular expression matching, the payload media type name, encoding name, audio clock frequency and other information are obtained. If the current audio encoding is AMR-WB, the audio clock frequency is stored for subsequent decoding. Secondly, the address and port number for sending and receiving media streams are negotiated, and the audio and video streaming data are separated according to the payload type.

[0042] Step 2: Set up a media stream monitoring service. When the 5G enhanced call starts, the actual user call media stream will be sent to the switching center server in the form of RTP data packets via the UDP transmission protocol. This method sets up a media stream monitoring service on the switching center server to capture the call RTP data packets obtained by the switching center.

[0043] Step 3: RTP data packet parsing. After the call starts, the audio and video media data information of the call will be sent to the exchange center in the form of RTP data packets. After the media stream monitoring service monitors and captures the RTP data packets in real time, it will parse the RTP data packets one by one. Each RTP data packet contains RTP header information and actual media data payload. According to the format required by the RTP bearer protocol, after stripping the RTP header information, AMR-WB encoded voice payload data and H264 encoded video payload data are obtained. In order to decode the AMR-WB voice data into a PCM audio stream supported by the speech recognition engine, it is necessary to enter the subsequent AMR-WB voice data parsing and decoding process.

[0044] The real-time parsing process of audio and video streams mainly involves parsing the RTP data packets received after the call starts, reading the media information, extracting the audio stream encoding information, and separating the effective voice payload data (see Figure 2 ), the detailed steps are as follows:

[0045] Step 1: When the 5G enhanced call starts, the audio and video media negotiation is performed. First, the SDP description information of the audio and video media stream is negotiated. The SDP description information does not contain specific audio and video data streams, but mainly contains the encoding information of the media stream, the media type name, the audio clock frequency and other audio streaming parameters. Extract the SDP description information, which contains multiple lines of media description information. According to the media information descriptor corresponding to the audio stream encoding information, media type name, audio clock frequency and other parameters, perform regular expression matching to extract the corresponding media information. If the audio stream encoding information read is AMR-WB, the audio stream transcoding is required for this call, and the audio clock frequency is stored; secondly, negotiate the address and port number for sending and receiving media streams, separate the audio and video streaming data according to the load type, and enter step 2 to monitor and capture the media data stream.

[0046] Step 2: After the 5G enhanced call starts, the actual user call media stream will be sent to the switching center server in the form of RTP data packets via the UDP transmission protocol. When each call comes in, the RTP data packet will be sent to the IP and port specified by the switching center. The media stream monitoring service on the server monitors the port in real time. If the port receives a data packet, it will forward the data packet to the media server in real time and proceed to step 3 for data packet parsing.

[0047] Step 3: All RTP packets of subsequent calls are audio and video media packets that carry call data information. The valid audio and video payload data needs to be stripped. Each RTP packet consists of an RTP header and a payload. The RTP header consists of 12 bytes and contains various control information. After obtaining the RTP packet, first extract the first 12 bytes of the packet to parse the header information. The header information is extracted and parsed bit by bit in order as follows:

[0048] -Version, occupies 2 bits, indicating the version information of the RTP protocol;

[0049] -Padding bit, 1 bit, used to indicate whether there are additional padding bytes;

[0050] -Extension bit, 1 bit, used to indicate whether there is an RTP header extension;

[0051] -CSRC count, 4 bits, indicating the number of CSRC identifiers;

[0052] -Mark bit, occupies 1 bit, application-defined mark;

[0053] - Payload type, occupies 7 bits, used to indicate the load type. After extracting this information, it is combined with SDP media information to assist in verifying the current data media encoding type;

[0054] - Sequence number, occupies 16 bits, used to identify the order of data packets. This sequence number is used for verification during actual splicing to prevent the audio stream from being misplaced due to the disorder of data packet sending and receiving order;

[0055] -Timestamp, occupies 32 bits, used to synchronize the playback speed of the receiving end. By comparing two RTP packets with a sequence number difference of 1, the timestamp difference represents the interval between sending and receiving RTP packets. For example, if the timestamp interval is 20ms, it means that the RTP packet is sent at a frequency of 20ms, and 50 RTP packets are sent per second. The subsequent audio and video stream playback speed can be calculated based on this. The calculation formula is:

[0056] Audio and video rate (kbit / s) = audio and video payload data length (bit) / timestamp interval (ms)

[0057] -Synchronization signal, occupies 32 bits, used to identify the sender of the RTP packet

[0058] -CSRC identifier, 32 bits, used to identify other sources participating in synchronization.

[0059] Finally, based on the RTP header information parsed above, the actual payload audio and video load is extracted, and the audio payload data length and the audio rate recorded according to the timestamp are recorded to enter the subsequent AMR-WB voice data parsing and decoding process.

[0060] Process 2: AMR-WB voice data analysis and decoding

[0061] The AMR-WB voice data parsing and decoding process mainly extracts and splices the extracted AMR-WB voice payload data, compensates for the silent frames, parses the complete AMR-WB audio stream, and then determines the decoding parameters based on the obtained audio clock frequency, and transcodes the AMR-WB audio stream into the PCM encoding format (see Figure 3 ), the specific steps are as follows:

[0062] Step 1: After obtaining the voice payload data from process (1), determine the length of the voice payload data. If the length of the voice payload data exceeds 10, the voice payload data is a non-silent data packet. At this time, continue to parse the payload data bit by bit.

[0063] Each segment of voice payload data consists of multiple voice frames, each of which includes three parts: mode request field (CMR), content information table (ToC) and valid voice bytes. Multiple voice frames are spliced ​​in sequence. After obtaining the voice payload data, for each voice frame, first extract the first four bits of the mode request field CMR information, which occupies the first 4 bits of the voice payload data. Extract the first four bytes of the voice payload data for byte encoding. If the encoding result string is CMR=15, the voice data encoding in the current segment has not been processed by other special encoding. The extracted voice data can be directly processed later. Otherwise, it needs to be further parsed according to the special encoding agreed with the sender, which is not described in this method.

[0064] Continue to extract the content information table in sequence. The 5th to 10th bits of the voice frame are the content information table. After extracting the content information table, extract and splice the remaining bytes for valid voice data according to the content information table. The specific parsing method of the content information table is as follows:

[0065] The first bit is the end frame flag F. When the end frame flag is 1, it means that this frame is not the last frame in the voice payload data, and there are other frames behind it, which means that the voice payload data is composed of multiple segments of frame data. Each segment contains CMR information, ToC information, and valid voice bytes. It is necessary to repeat the parsing of steps 1.1 and 1.2 for each segment, and splice the extracted valid voice bytes until the end frame flag in the ToC information is 0. Usually, in a single-channel single-frame scenario, there is only one content information table in a voice payload data, and the end frame flag in the content information table must be 0, and repeated splicing is not required.

[0066] The 6th bit is the valid frame flag, which determines whether the frame is a good frame. 1 is a good frame and 0 is a bad frame. Whether the bad frame needs to be retained is determined based on the actual scenario.

[0067] The second to fifth bits are the frame type FT. When FT is different, the frame rate of the effective audio AMR-WB encoding is also different. After obtaining the FT value, the audio rate is mapped and queried, and compared with the audio rate calculated based on the extracted timestamp information in process (I). It is used to assist in checking whether the voice payload length obtained in process (I) is missing. If there is a missing, it is filled with a placeholder to ensure the audio playback speed. See Table 1 below for a comparison of some frame type rates.

[0068] Table 1: Comparison table of some frame types and rates

[0069]

[0070] After valid voice bytes are judged and spliced ​​using ToC information, the spliced ​​AMR-WB audio stream can be sent to step 3 for subsequent decoding processing.

[0071] Step 2: If the length of the voice payload data does not exceed 10, the voice payload data is a silent data packet. In the actual 5G enhanced call, a non-silent normal data packet is sent every 20ms, and a silent data packet is sent every 160ms. Therefore, when the length is the same, the number of silent segment data packets sent is only one-eighth of the number of non-silent segment data packets sent. If the silent data is directly spliced ​​according to the number of packets sent, the silent duration obtained after splicing will be only one-eighth of the actual silent segment duration. Therefore, when it is detected that the current data packet is a silent data packet, the mode request field and content information table are also stripped, and the remaining bytes are in the AMR-WB data format, the AMR header data is added, and 0 is used as a placeholder. According to the length of the previous voice data packet, the missing 7 silent data packets are compensated and then spliced ​​into the AMR-WB audio stream. Steps 1 and 2 are performed alternately according to whether it is a silent data packet, and the spliced ​​AMR-WB audio byte stream is synchronously sent to step 3 for decoding.

[0072] Step 3: AMR is transcoded to PCM. According to the audio clock frequency and encoding information obtained in process (1), the transcoding parameters of this step are determined, and the ffmpeg transcoding statements are spliced, such as:

[0073]

[0074] The audio stream in AMR-WB format is transcoded into PCM format, and the generated PCM audio stream can be sent to subsequent speech recognition for text translation and interaction with intelligent applications.

[0075] To summarize the above embodiments, in the present invention, complex real-time 5G enhanced call media stream data is parsed, audio and video data packets are captured through the real-time monitoring port, and the audio and video data in the call are taken out for complex extraction.

[0076] In the present invention, by parsing SDP data, separating audio and video stream data according to the load type, extracting the encoding type and audio clock frequency of the current audio stream, and obtaining the transmission voice encoding information.

[0077] In the present invention, by parsing the RTP data packet, separating the control information and the call load data, and parsing the voice load data and video load data in the 5G enhanced call data packet in real time, the problem that the prior art cannot perform real-time analysis of the audio and video streams under the 5G enhanced call network is solved.

[0078] In the present invention, by retaining valid frames, re-arranging frame data, compensating for silent frames, parsing the extracted AMR-WB voice data, splicing the complete AMR-WB audio stream, and then modifying the decoding parameters according to the acquired audio clock frequency, AMR to PCM decoding is performed, thereby solving the problem of AWR-WB audio transcoding in real-time 5G enhanced calls, and providing recognizable transcoded audio for smart applications carried in 5G enhanced calls while ensuring the quality of 5G enhanced calls.

[0079] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0080] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0081] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls, characterized in that: include: When a 5G enhanced call starts, the SDP description information of the target audio and video stream is extracted; Separating media description control information and RTP data packets from the target audio and video stream according to the SDP description information; During the 5G enhanced call, the RTP data packets are captured in real time, the RTP data packets are parsed one by one, and after the RTP header information is stripped from the RTP data packets, the AMR-WB encoded voice payload data and the H264 encoded video payload data are obtained; Parsing the AMR-WB encoded voice payload data, wherein the parsing process includes retaining valid frame data, reordering frame data, and compensating for silent frames, and outputting a spliced ​​AMR-WB audio stream; Extract the H264-encoded video payload data frame by frame for subsequent gesture recognition engine; Determine the transcoding parameters and transcode the spliced ​​AMR-WB audio stream into a PCM encoded audio stream for the subsequent speech recognition engine.

2. The method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls according to claim 1, characterized in that: The SDP description information includes multiple lines of media description information; Regular expression matching is performed on the media description information to obtain the payload media type name, encoding name, and audio clock frequency.

3. The method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls according to claim 1, characterized in that: During the 5G enhanced call, the RTP data packets are captured in real time, each RTP data packet including RTP header information and actual media data payload; According to the format required by the RTP bearer protocol, after stripping the RTP header information from the RTP data packet, the AMR-WB encoded voice payload data and the H264 encoded video payload data are obtained.

4. The method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls according to claim 2, characterized in that: When the voice payload data length of the AMR-WB encoded voice payload data is greater than or equal to 10, it is a non-silent frame; At this time, each segment of AMR-WB encoded voice payload data consists of multiple voice frames, and each voice frame consists of a mode request field CMR, a content information table ToC, and a voice data stream.

5. The method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls according to claim 4, characterized in that: Parse the AMR-WB-encoded voice payload data of non-silent frames, including: Parse the mode request field CMR to determine whether the obtained value is 15: When the value is 15, the AMR-WB encoded voice payload data is not further encoded and can be directly retained for subsequent parsing; When the value is not 15, the current AMR-WB encoded voice payload data is re-encoded.

6. The method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls according to claim 5, characterized in that: Parse the AMR-WB encoded voice payload data of non-silent frames, including: Parsing a content information table ToC, wherein the content information table ToC records a tail frame identifier, a frame type, and a valid identifier; By obtaining the frame rate of AMR-WB through the frame type, the actual effective length of the frame data can be calculated; By parsing the obtained frame data, it is determined whether the current frame is the end frame and whether it is valid. When the frame is valid, the valid frame data is retained according to the calculated actual effective length of the frame data, and the frame data is rearranged at the same time, retaining the ToC and the valid frame data to merge into a spliced ​​AMR-WB audio stream.

7. The method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls according to claim 1, characterized in that: When the voice payload data length of the AMR-WB encoded voice payload data is less than 10, it is a silent frame; Add AMR header data to the silent frame and fill it with 0 as placeholder to compensate for the missing 7 silent data packets and then splice them into the current AMR-WB encoded voice payload data to obtain the spliced ​​AMR-WB audio stream.

8. The method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls according to claim 6 or 7, characterized in that: Based on the spliced ​​AMR-WB audio stream, the transcoding parameters are determined according to the audio clock frequency, and the ffmpeg transcoding statements are spliced ​​to transcode the AMR-WB audio stream into a PCM encoded audio stream. The generated PCM encoded audio stream can be sent to subsequent speech recognition for text translation and intelligent interaction.

9. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on the electronic device, the electronic device executes the method for real-time parsing and dynamic decoding of audio and video streams in 5G enhanced calls as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Audio stream dynamic capturing and coding transmission method and device based on Android system

    CN121054010A

  • Audio stream intelligent decoding and multi-output management method and device for power amplifier

    CN121054049A

  • Audio stream intelligent decoding and multi-output management method and device for power amplifier

    CN121054049B

  • Media post-processing method and device, equipment and storage medium

    CN121173880A