ROHC decompression method, device and equipment based on voice communication
By analyzing and detecting the byte features and encoding formats in the ROHC compressed packet, efficient decompression is achieved in the absence of context information, solving the problem of low decompression success rate of ROHC compressed packets in voice communication, and improving the decompression success rate .
Patent Information
- Application Number
- CN202411480818.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-23
AI Technical Summary
During voice communication, the decompression success rate of ROHC compressed packets is low, especially when the receiver cannot receive IR/IR-DYN packets or ROHC interaction information, resulting in high difficulty and low success rate.
By analyzing the byte characteristics of the compressed packet to be processed, determining the packet type and header length, extracting the remaining data, and performing feature detection according to the candidate voice encoding format, decompression is achieved, and the information in the compressed packet is completely dependent on the information in the compressed packet without the communication context information.
The decompression success rate of ROHC compressed packets during voice communication is improved, and the decompression capability is enhanced in the absence of context information.
Smart Images

Figure CN119011690B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a ROHC decompression method, device and equipment based on voice communication. Background Art
[0002] The current mainstream mobile communication systems are LTE and NR, both of which use IP to transmit voice, known as VoLTE or VoNR. Since the IP protocol header is relatively long, reaching 40 bytes for IPv4 and 60 bytes for IPv6, when transmitting short voice packets (a voice packet is generally around 40 bytes), the header overhead is huge, so VoLTE or VoNR currently uses ROHC header compression technology.
[0003] In the process of mobile communication, the communication sender uses the ROHC header compression method to compress the header of the sent content, and the communication receiver decompresses and restores the header compression of the received content. The decompressor has three states: NC state (no context state), SC state (static context state), and FC (full context state). The NC state is the initial state of the decompressor, which can only decompress messages containing static context and full context, such as IR packets (ROHC initial refresh packets); in the SC state, the decompressor has obtained the static context, and can decompress messages containing dynamic context (IR-DYN); in the FC state, the decompressor has obtained the full context and can decompress all compressed messages.
[0004] In the prior art, the communication receiver needs to use the received IR / IR-DYN packet to initialize the communication context, the decompressor receiving state is migrated from NC to SC or FC, and then the ROHC compressed packet is decompressed according to the known context information.
[0005] However, in some scenarios, the communication receiver may not receive the IR / IR-DYN packet, or even the interactive information on whether ROHC is enabled. Therefore, it is very difficult to establish context information for both parties to decompress and restore the ROHC compressed packet using existing technologies, and the decompression success rate is very low. Summary of the invention
[0006] The present invention provides a ROHC decompression method, device and equipment based on voice communication, which are used to solve the defect of low decompression success rate of ROHC compressed packages in the voice communication process in the prior art, and improve the decompression success rate of ROHC compressed packages in the voice communication process.
[0007] The present invention provides a ROHC decompression method based on voice communication, comprising:
[0008] Acquire a compressed packet to be processed, and determine the packet type of the compressed packet to be processed based on a byte feature of the compressed packet to be processed, wherein the byte feature reflects the value of each bit in a byte;
[0009] Determine the header length of the compressed packet to be processed based on the packet type, and extract the first remaining data from the compressed packet to be processed based on the header length;
[0010] Determining the possibility of an extension field based on the packet type, and when the possibility of the extension field is not possible, decoding the first remaining data to obtain a decompression result of the compressed packet to be processed;
[0011] When the possibility of the extended field is possible, data extraction is performed in the first residual data based on the byte features of the first residual data to obtain at least one second residual data, and feature detection is performed on the second residual data based on the candidate speech coding format. When the coding features of the second residual data are consistent with the candidate speech coding format, the second residual data is decoded to obtain the decompression result of the compressed package to be processed.
[0012] According to a ROHC decompression method based on voice communication provided by the present invention, the packet type of the compressed packet to be processed is determined based on the byte features of the compressed packet to be processed, including:
[0013] Determining the packet type based on the byte characteristics of the first byte in the target intermediate compressed packet;
[0014] Among them, the target intermediate compressed packet is the first intermediate compressed packet or the second intermediate compressed packet, the first intermediate compressed packet is a data packet obtained by removing the padding data in the compressed packet to be processed, and the second intermediate compressed packet is a data packet obtained by removing the feedback field and / or context identifier field in the first intermediate compressed packet.
[0015] According to a ROHC decompression method based on voice communication provided by the present invention, the determining of the header length of the compressed packet to be processed based on the packet type comprises:
[0016] A CRC check is performed on the compressed packet to be processed based on the packet type, and after the check passes, a header length of the compressed packet to be processed is determined based on a correspondence between the packet type and the header length.
[0017] According to a ROHC decompression method based on voice communication provided by the present invention, the step of extracting data from the first residual data based on the byte feature of the first residual data to obtain at least one second residual data includes:
[0018] using the first remaining data as the second remaining data;
[0019] If the encoding feature of the second remaining data is inconsistent with the candidate speech encoding format, the current second remaining data is discarded, and some bytes in the first remaining data are skipped according to the byte feature of the first byte in the first remaining data to obtain new second remaining data.
[0020] According to a ROHC decompression method based on voice communication provided by the present invention, the feature detection of the second residual data based on the candidate voice coding format includes:
[0021] extracting a coding rate value from the second residual data according to the candidate speech coding format;
[0022] Based on the preset coding rate range corresponding to the candidate speech coding format and the coding rate value, it is determined whether the coding feature of the second residual data is consistent with the candidate speech coding format.
[0023] According to a ROHC decompression method based on voice communication provided by the present invention, the method of determining whether the encoding feature of the second residual data is consistent with the candidate voice coding format based on the preset coding rate range corresponding to the candidate voice coding format and the coding rate value includes:
[0024] Determining a theoretical voice data length based on the coding rate value and the frame length corresponding to the candidate voice coding format;
[0025] When the data length of the second remaining data is consistent with the theoretical voice data length, it is determined that the encoding feature of the second remaining data is consistent with the candidate voice encoding format.
[0026] The present invention also provides a ROHC decompression device based on voice communication, comprising:
[0027] A packet type determination module, used for obtaining a compressed packet to be processed, and determining the packet type of the compressed packet to be processed based on a byte feature of the compressed packet to be processed, wherein the byte feature reflects the value of each bit in a byte;
[0028] A packet header length determining module, configured to determine a packet header length of the compressed packet to be processed based on the packet type, and extract the first remaining data from the compressed packet to be processed based on the packet header length;
[0029] A first decompression module, configured to determine the possibility of an extension field based on the packet type, and when the possibility of the extension field is not possible, decode the first remaining data to obtain a decompression result of the compressed packet to be processed;
[0030] A second decompression module is used to, when the possibility of the extended field is possible, extract data from the first residual data based on the byte features of the first residual data to obtain at least one second residual data, perform feature detection on the second residual data based on a candidate speech coding format, and when the coding features of the second residual data are consistent with the candidate speech coding format, decode the second residual data to obtain the decompression result of the compressed package to be processed.
[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the ROHC decompression method based on voice communication as described above is implemented.
[0032] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the ROHC decompression method based on voice communication as described above is implemented.
[0033] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned ROHC decompression methods based on voice communication.
[0034] The ROHC decompression method, device and equipment based on voice communication provided by the present invention determine the packet type of the compressed packet to be processed by the byte features in the compressed packet to be processed, determine the header length of the compressed packet to be processed based on the packet type, extract the first remaining data from the compressed packet to be processed based on the header length, determine the possibility of the extended field based on the packet type, when the possibility of the extended field is impossible, use the first remaining data as the decompression result of the compressed packet to be processed, when the possibility of the extended field is possible, extract data from the first remaining data based on the byte features of the first remaining data to obtain at least one second remaining data, perform feature detection on the second remaining data based on the candidate voice coding format, when the coding feature of the second remaining data is consistent with the candidate voice coding format, extract the second remaining data as the decompression result of the compressed packet to be processed. In the technical solution provided by the present invention, when the compressed packet to be processed is decompressed, only the information carried in the compressed packet to be processed is used throughout the process, and the communication context information is not required, so as to improve the decompression success rate of the ROHC compressed packet during voice communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 The process diagram of the ROHC decompression method based on voice communication provided by the present invention is as follows Figure 1 .
[0037] Figure 2 The process diagram of the ROHC decompression method based on voice communication provided by the present invention is as follows Figure 2 .
[0038] Figure 3 The process diagram of the ROHC decompression method based on voice communication provided by the present invention is as follows Figure 3 .
[0039] Figure 4 The process diagram of the ROHC decompression method based on voice communication provided by the present invention is as follows Figure 4 .
[0040] Figure 5 It is a structural schematic diagram of a ROHC decompression device based on voice communication provided by the present invention.
[0041] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] In the prior art, the communication receiver needs to use the received IR / IR-DYN packet to initialize the communication context, the decompressor receiving state is migrated from NC to SC or FC, and then the ROHC compressed packet is decompressed according to the known context information. However, in some scenarios, such as when the communication quality between the two communicating parties is very poor, the communication receiver may not receive the IR / IR-DYN packet, or even the interactive information on whether ROHC is enabled, or when the third party in communication obtains the communication data, it may not receive the IR / IR-DYN packet, or even the interactive information on whether ROHC is enabled. Therefore, it is very difficult to use the prior art to establish context information for the two communicating parties to decompress and restore the ROHC compressed packet, and the decompression success rate is very low.
[0044] In order to solve the defect of low success rate of decompression of ROHC compressed packages in voice communication process in the prior art, the present invention provides a ROHC decompression method based on voice communication, so as to achieve the effect of improving the success rate of decompression of ROHC compressed packages in voice communication process. It is worth noting that when the third party in communication decompresses the ROHC compressed package by the method provided by the present invention, it should be done under the circumstances permitted by law (such as necessary reconnaissance activities permitted by law).
[0045] Combine the following Figure 1-Figure 4 The ROHC decompression method based on voice communication provided by the present invention is described. Figure 1 As shown, the ROHC decompression method based on voice communication includes the steps of:
[0046] S110, obtaining a compressed packet to be processed, and determining a packet type of the compressed packet to be processed based on a byte feature of the compressed packet to be processed, where the byte feature reflects a value of each bit in a byte;
[0047] S120, determining a header length of the compressed packet to be processed based on the packet type, and extracting first remaining data from the compressed packet to be processed based on the header length;
[0048] S130, determining the possibility of an extension field based on the packet type, and when the possibility of the extension field is impossible, decoding the first remaining data to obtain a decompression result of the compressed packet to be processed;
[0049] S140. When the possibility of extending the field is possible, data is extracted from the first remaining data based on the byte features of the first remaining data to obtain at least one second remaining data, and feature detection is performed on the second remaining data based on the candidate speech coding format. When the coding features of the second remaining data are consistent with the candidate speech coding format, the second remaining data is decoded to obtain a decompression result of the compressed package to be processed.
[0050] After receiving the ROHC compressed packet, it is used as a compressed packet to be processed, and it is decompressed to obtain a decompression result, which is voice data. Under the condition that the context of both parties in communication cannot be fully obtained, the present invention determines the type of received packet by analyzing the byte features of the compressed packet to be processed, determines the header length of the compressed packet to be processed based on the packet type, extracts the first remaining data from the compressed packet to be processed based on the header length, determines the possibility of the extended field based on the packet type, and when the possibility of the extended field is impossible, uses the first remaining data as the decompression result of the compressed packet to be processed. When the possibility of the extended field is possible, data extraction is performed in the first remaining data based on the byte features of the first remaining data to obtain at least one second remaining data, and feature detection is performed on the second remaining data based on the candidate voice coding format. When the coding features of the second remaining data are consistent with the candidate voice coding format, the second remaining data is extracted as the decompression result of the compressed packet to be processed. Only the information carried in the compressed packet to be processed is used throughout the process, and the communication context information is not required, which can improve the decompression success rate of the ROHC compressed packet during voice communication.
[0051] After obtaining the compressed package to be processed, the package type of the compressed package to be processed is determined based on the byte features of the compressed package to be processed, specifically including:
[0052] Determining a packet type based on a byte characteristic of a first byte in a target intermediate compressed packet;
[0053] Among them, the target intermediate compressed packet is the first intermediate compressed packet or the second intermediate compressed packet, the first intermediate compressed packet is a data packet obtained by removing the padding data in the compressed packet to be processed, and the second intermediate compressed packet is a data packet obtained by removing the feedback field and / or context identifier field in the first intermediate compressed packet.
[0054] The possible packet types of ROHC compressed packets are shown in Table 1.
[0055] Table 1
[0056]
[0057] Figure 2 and Figure 3 The complete flow chart of an embodiment of the ROHC decompression method based on voice communication provided by the present invention is as follows: Figure 2As shown, after obtaining the compressed packet to be processed, the padding field is first skipped according to the padding feature, that is, the front padding data 0xe0 is first removed to obtain the first intermediate compressed packet, and then the byte feature of the first byte of the first intermediate compressed packet is used to determine whether the packet type is feedback or segment. When the lower 5 bits of the first byte of the first intermediate compressed packet are 11110, the packet type is determined to be feedback, then the packet length field in the first intermediate compressed packet is extracted, and after skipping the feedback data according to the packet length field, the packet type is determined to be a segmented packet by whether the lower 7 bits of the first byte of the remaining data are 1111111. If the lower 5 bits of the first byte of the first intermediate compressed packet are not 11110, the packet type is directly determined to be a segmented packet by whether the lower 7 bits of the first byte of the first intermediate compressed packet are 1111111. If the packet type is a segmented packet, no processing is performed. If it is not a segmented packet, proceed to the next step and determine whether the add-cid (context identifier) field exists by checking whether the lower 4 bits of the first byte are 110. If so, skip the context identifier field.
[0058] If the feedback field or context identifier field does not exist, the first intermediate compressed packet is used as the target intermediate compressed packet. If the feedback field or context identifier field exists, the second intermediate compressed packet obtained by removing the feedback field and / or context identifier field from the first intermediate compressed packet is used as the target intermediate compressed packet.
[0059] After determining the target intermediate compressed packet, determine whether the packet type is an IR packet or an IR-DYN packet, a Type0 packet, a Type1 packet or a Type2 packet according to the first byte of the target intermediate compressed packet.
[0060] Specifically, if Figure 2 As shown in the figure, if the lower 7 bits of the first byte of the target intermediate compressed packet are 1111110, it is an IR packet. If the first byte of the target intermediate compressed packet is 11111000, it is an IR-DYN packet. For IR or IR-DYN packets, there is a CRC (Cyclic Redundancy Check) field. When determining whether the packet type is an IR packet or an IR-DYN packet, as shown in the figure, Figure 2 and Figure 4 As shown, IR or IR-DYN data is extracted for CRC check. If it passes, the ROHC header is directly skipped and the remaining part is extracted as the voice content. If the CRC check fails, voice detection is performed on it. If the detection is successful, the voice data content is extracted and exited. If the detection fails, the current data is discarded as abnormal data. The specific implementation method of voice detection will be described in detail later.
[0061] If the ROHC packet does not conform to the IR or IR-DYN packet data characteristics, then determine whether it is a ROHC type0, type1, or type2 packet based on the lower 1-bit or lower 2-bit data characteristics, and then perform a CRC check based on whether a CRC field exists. Determine the specific data packet type based on whether the CRC check passes, and then determine the ROHC header length. In other words, determining the header length of the compressed packet to be processed based on the packet type includes:
[0062] A CRC check is performed on the compressed packet to be processed based on the packet type. After the check passes, the header length of the compressed packet to be processed is determined based on the corresponding relationship between the packet type and the header length.
[0063] The header length of type0 packet is fixed. For the packet type with fixed header length, the fixed-length header is directly skipped in the target intermediate compressed packet to obtain the first remaining data. When the packet type is initially determined to be type0 packet, a more specific packet type (R-0-CRC packet, R-0 packet or UO-0 packet) can be determined in combination with CRC data to obtain a specific header length. Specifically, Figure 2 As shown, first determine whether it belongs to these three types of data packets by checking whether the first bit is 0, and then perform CRC check on the data to determine whether it belongs to an R-0-CRC packet or an R-0 or UO-0 packet, thereby determining the length of the ROHC header. For an R-0-CRC packet, the header length is 2 bytes, for a UO-0 packet, the header length is 1 byte, and for an R-0 packet, the header length is 1 byte.
[0064] For some data packets with uncertain header lengths, the header length range is reduced as much as possible, and voice detection is performed on the compressed data content, that is, for some compressed packets in the ROHC compressed packet, there may be an extension field in the header, and the header length is not fixed, the shortest possible header length is determined as the current header length to extract the first remaining data. Figure 2 As shown, for type 1 packets and type 2 packets, it is first assumed that there is no extension field, and the basic packet header length (2 bytes, 3 bytes) is removed respectively to obtain the first remaining data.
[0065] Data is extracted from the first residual data based on the byte features of the first residual data to obtain at least one second residual data, including:
[0066] Using the first remaining data as the second remaining data;
[0067] If the encoding feature of the second remaining data is inconsistent with the candidate speech encoding format, the current second remaining data is discarded, and some bytes are skipped in the first remaining data according to the byte feature of the first byte in the first remaining data to obtain new second remaining data.
[0068] For some packet types, there may be extended data fields that cannot be confirmed all at once. First, it is assumed that there is no extended data field and the data content is detected to see if it is voice data in a preset encoding format. If the detection is successful, it is considered that there is no extended field. Otherwise, based on the characteristics of the extended field, the extended data field header length is further analyzed, and then the extended data field header length is skipped to detect whether the data content is voice data in a preset encoding format. If the detection is successful, the voice content of the compressed package is taken out and decompression is successful.
[0069] like Figure 3 As shown, according to the byte characteristics of the first byte in the first remaining data, some bytes are skipped in the first remaining data to obtain the new second remaining data, which is determined according to the lower two bits of the first byte in the first remaining data. When the lower two bits of the first byte are 00, 1 byte is skipped to obtain the second remaining data, when the lower two bits of the first byte are 01, 2 bytes are skipped to obtain the second remaining data, when the lower two bits of the first byte are 10, 3 bytes are skipped to obtain the second remaining data, and when the lower two bits of the first byte are 11, the S, R-TS, I, ip, rtp, and ip2 fields in the first remaining data are extracted, and the field headers of these fields are skipped to obtain the second remaining data.
[0070] After obtaining the second remaining data, feature detection is performed on the second remaining data based on the candidate speech coding format. If the encoding feature of the second remaining data is detected to be consistent with the candidate speech coding format, the second remaining data is determined to be speech coding data. Specifically, feature detection is performed on the second remaining data based on the candidate speech coding format, including:
[0071] Extracting a coding rate value from the second residual data according to the candidate speech coding format;
[0072] Based on the preset coding rate range and the coding rate value corresponding to the candidate speech coding format, it is determined whether the coding feature of the second residual data is consistent with the candidate speech coding format.
[0073] First, it is assumed that the second remaining data is data encoded according to the candidate voice coding format, and the coding rate value is extracted according to the candidate voice coding format. Taking the AMR (Adaptive Multi-Rate) format as an example, the CMR field and the FT field of the TOC are extracted to obtain the coding rate value. If the second remaining data is data encoded according to the candidate voice coding format, then the extracted coding rate value should be within a certain range. For example, for the AMR-NB format, the normal value range is: 0~8, 15, and for the AMR-WB format, the normal value range is: 0~9, 14~15. In one possible implementation, it is possible to directly determine whether the coding features of the second remaining data are consistent with the candidate voice coding format based on whether the coding rate value extracted from the second remaining data is within the preset coding rate range corresponding to the candidate voice coding format. In another possible implementation, in order to ensure the accuracy of the detection result, based on the preset coding rate range and coding rate value corresponding to the candidate voice coding format, it is determined whether the coding features of the second remaining data are consistent with the candidate voice coding format, including:
[0074] Determine theoretical voice data length based on the coding rate value and the frame length corresponding to the candidate voice coding format;
[0075] When the data length of the second remaining data is consistent with the theoretical voice data length, it is determined that the encoding feature of the second remaining data is consistent with the candidate voice encoding format.
[0076] Different speech coding formats have their corresponding fixed speech frame lengths, for example, the length of each AMR speech frame is 20ms. Therefore, the speech data content length can be calculated according to the speech coding rate. If the received speech data content length is not equal to the speech data content length calculated according to the coding rate, it is not speech data of the candidate speech coding format.
[0077] It is worth noting that for some speech coding formats, there may be multiple data transmission modes. For example, the AMR format has two data transmission modes: bandwidth saving mode and byte alignment mode, and there are two speech coding formats, AMR-NB and AMR-WB. When detecting whether the encoding feature of the second residual data is consistent with the candidate speech coding format, the possible data transmission modes and speech formats should be combined respectively, and the above detection method should be used for detection.
[0078] The following is a description of the ROHC decompression device based on voice communication provided by the present invention. The ROHC decompression device based on voice communication described below and the ROHC decompression method based on voice communication described above can be referred to in correspondence with each other. Figure 5 As shown, the ROHC decompression device based on voice communication provided by the present invention includes the following modules:
[0079] The packet type determination module 510 is used to obtain a compressed packet to be processed and determine the packet type of the compressed packet to be processed based on the byte characteristics of the compressed packet to be processed, where the byte characteristics reflect the value of each bit in the byte;
[0080] A packet header length determining module 520, configured to determine a packet header length of a compressed packet to be processed based on a packet type, and extract first remaining data from the compressed packet to be processed based on the packet header length;
[0081] A first decompression module 530, configured to determine the possibility of an extension field based on a packet type, and when the possibility of the extension field is not possible, decode the first remaining data to obtain a decompression result of the compressed packet to be processed;
[0082] The second decompression module 540 is used to extract data from the first remaining data based on the byte features of the first remaining data to obtain at least one second remaining data when the possibility of extending the field is possible, perform feature detection on the second remaining data based on the candidate speech coding format, and when the coding features of the second remaining data are consistent with the candidate speech coding format, decode the second remaining data to obtain the decompression result of the compressed package to be processed.
[0083] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor (processor) 610 , a communication interface (Communications Interface) 620 , a memory (memory) 630 and a communication bus 640 , wherein the processor 610 , the communication interface 620 , and the memory 630 communicate with each other through the communication bus 640 . The processor 610 can call the logic instructions in the memory 630 to execute the ROHC decompression method based on voice communication, which includes: obtaining a compressed packet to be processed, determining the packet type of the compressed packet to be processed based on the byte characteristics of the compressed packet to be processed, and the byte characteristics reflect the numerical value of each bit in the byte; determining the header length of the compressed packet to be processed based on the packet type, and extracting the first remaining data from the compressed packet to be processed based on the header length; determining the possibility of an extended field based on the packet type, and when the possibility of the extended field is impossible, decoding the first remaining data to obtain the decompression result of the compressed packet to be processed; when the possibility of the extended field is possible, extracting data from the first remaining data based on the byte characteristics of the first remaining data to obtain at least one second remaining data, performing feature detection on the second remaining data based on the candidate voice coding format, and when the coding feature of the second remaining data is consistent with the candidate voice coding format, decoding the second remaining data to obtain the decompression result of the compressed packet to be processed.
[0084] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0085] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the ROHC decompression method based on voice communication provided by the above methods, the method including: obtaining a compressed packet to be processed, determining the packet type of the compressed packet to be processed based on the byte characteristics of the compressed packet to be processed, the byte characteristics reflecting the numerical value of each bit in the byte; determining the header length of the compressed packet to be processed based on the packet type, and extracting the first remaining data from the compressed packet to be processed based on the header length; determining the possibility of an extended field based on the packet type, and when the possibility of the extended field is impossible, decoding the first remaining data to obtain the decompression result of the compressed packet to be processed; when the possibility of the extended field is possible, extracting data from the first remaining data based on the byte characteristics of the first remaining data to obtain at least one second remaining data, performing feature detection on the second remaining data based on the candidate voice coding format, and when the coding feature of the second remaining data is consistent with the candidate voice coding format, decoding the second remaining data to obtain the decompression result of the compressed packet to be processed.
[0086] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented by a processor to execute the ROHC decompression method based on voice communication provided by the above methods when executed by the processor, the method comprising: obtaining a compressed packet to be processed, determining the packet type of the compressed packet to be processed based on the byte characteristics of the compressed packet to be processed, the byte characteristics reflecting the numerical value of each bit in the byte; determining the header length of the compressed packet to be processed based on the packet type, and extracting the first remaining data from the compressed packet to be processed based on the header length; determining the possibility of an extended field based on the packet type, and when the possibility of the extended field is impossible, decoding the first remaining data to obtain the decompression result of the compressed packet to be processed; when the possibility of the extended field is possible, extracting data from the first remaining data based on the byte characteristics of the first remaining data to obtain at least one second remaining data, performing feature detection on the second remaining data based on the candidate voice coding format, and when the coding characteristics of the second remaining data are consistent with the candidate voice coding format, decoding the second remaining data to obtain the decompression result of the compressed packet to be processed.
[0087] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A ROHC decompression method based on voice communication, characterized in that: include: Acquire a compressed packet to be processed, and determine the packet type of the compressed packet to be processed based on a byte feature of the compressed packet to be processed, wherein the byte feature reflects the value of each bit in a byte; Determine the header length of the compressed packet to be processed based on the packet type, and extract the first remaining data from the compressed packet to be processed based on the header length; Determining the possibility of an extension field based on the packet type, and when the possibility of the extension field is not possible, decoding the first remaining data to obtain a decompression result of the compressed packet to be processed; When the possibility of the extended field is possible, extracting data from the first remaining data based on the byte features of the first remaining data to obtain at least one second remaining data, performing feature detection on the second remaining data based on the candidate speech coding format, and when the coding features of the second remaining data are consistent with the candidate speech coding format, decoding the second remaining data to obtain a decompression result of the compressed packet to be processed; The extracting data from the first residual data based on the byte feature of the first residual data to obtain at least one second residual data includes: using the first remaining data as the second remaining data; If the encoding feature of the second remaining data is inconsistent with the candidate speech encoding format, discard the current second remaining data, and skip some bytes in the first remaining data according to the byte feature of the first byte in the first remaining data to obtain new second remaining data; The performing feature detection on the second remaining data based on the candidate speech coding format includes: extracting a coding rate value from the second residual data according to the candidate speech coding format; Determining whether the encoding feature of the second remaining data is consistent with the candidate speech encoding format based on a preset encoding rate range corresponding to the candidate speech encoding format and the encoding rate value; The determining, based on the preset coding rate range corresponding to the candidate speech coding format and the coding rate value, whether the coding feature of the second remaining data is consistent with the candidate speech coding format includes: Determining a theoretical voice data length based on the coding rate value and the frame length corresponding to the candidate voice coding format; When the data length of the second remaining data is consistent with the theoretical voice data length, it is determined that the encoding feature of the second remaining data is consistent with the candidate voice encoding format.
2. The ROHC decompression method based on voice communication according to claim 1, characterized in that: The determining the packet type of the compressed packet to be processed based on the byte features of the compressed packet to be processed includes: Determining the packet type based on the byte characteristics of the first byte in the target intermediate compressed packet; Among them, the target intermediate compressed packet is the first intermediate compressed packet or the second intermediate compressed packet, the first intermediate compressed packet is a data packet obtained by removing the padding data in the compressed packet to be processed, and the second intermediate compressed packet is a data packet obtained by removing the feedback field and / or context identifier field in the first intermediate compressed packet.
3. The ROHC decompression method based on voice communication according to claim 1, characterized in that: The step of determining the header length of the compressed packet to be processed based on the packet type includes: A CRC check is performed on the compressed packet to be processed based on the packet type, and after the check passes, a header length of the compressed packet to be processed is determined based on a correspondence between the packet type and the header length.
4. A ROHC decompression device based on voice communication, characterized in that: include: A packet type determination module, used for obtaining a compressed packet to be processed, and determining a packet type of the compressed packet to be processed based on a byte feature of the compressed packet to be processed, wherein the byte feature reflects a value of each bit in a byte; A packet header length determining module, configured to determine a packet header length of the compressed packet to be processed based on the packet type, and extract the first remaining data from the compressed packet to be processed based on the packet header length; A first decompression module, configured to determine the possibility of an extension field based on the packet type, and when the possibility of the extension field is not possible, decode the first remaining data to obtain a decompression result of the compressed packet to be processed; a second decompression module, configured to, when the possibility of the extended field is possible, extract data from the first remaining data based on the byte features of the first remaining data to obtain at least one second remaining data, perform feature detection on the second remaining data based on a candidate speech coding format, and when the coding features of the second remaining data are consistent with the candidate speech coding format, decode the second remaining data to obtain a decompression result of the compressed packet to be processed; The extracting data from the first residual data based on the byte feature of the first residual data to obtain at least one second residual data includes: using the first remaining data as the second remaining data; If the encoding feature of the second remaining data is inconsistent with the candidate speech encoding format, discard the current second remaining data, and skip some bytes in the first remaining data according to the byte feature of the first byte in the first remaining data to obtain new second remaining data; The performing feature detection on the second remaining data based on the candidate speech coding format includes: extracting a coding rate value from the second residual data according to the candidate speech coding format; Determining whether the encoding feature of the second remaining data is consistent with the candidate speech encoding format based on a preset encoding rate range corresponding to the candidate speech encoding format and the encoding rate value; The determining, based on the preset coding rate range corresponding to the candidate speech coding format and the coding rate value, whether the coding feature of the second remaining data is consistent with the candidate speech coding format includes: Determining a theoretical voice data length based on the coding rate value and the frame length corresponding to the candidate voice coding format; When the data length of the second remaining data is consistent with the theoretical voice data length, it is determined that the encoding feature of the second remaining data is consistent with the candidate voice encoding format.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the ROHC decompression method based on voice communication according to any one of claims 1 to 3 is implemented.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the ROHC decompression method based on voice communication according to any one of claims 1 to 3 is implemented.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the ROHC decompression method based on voice communication according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Method and apparatus for processing voice data packet
CN108737349A
Voice packet loss processing method and device
CN109219078A