Internet voice restoration method and device, electronic equipment and storage medium

CN116827919BActive Publication Date: 2026-10-30DAWNING NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310961446.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2026-10-30
Estimated Expiration
2043-07-31

AI Technical Summary

Technical Problem

[0003]在VoIP语音通话过程中,会涉及到对语音的编码和解码,而对于同一条语音,编码和解码的算法相匹配,才能正确传输相应的语音,然而目前在完成互联网信令流(即VoIP信令流)和RTP媒体流的关联时,通常仅进行IP地址和端口的关联,使媒体流在正确的会话中传输

Benefits of technology

[0023]本申请实施例的技术方案中,在接收到属于互联网信令流的信令报文情况下,从所述信令报文中提取第一标识信息和编码信息,并将所述第一标识信息和所述编码信息以哈希节点的方式映射存储在动态负载类型映射表中;在接收到语音数据报文的情况下,从所述语音数据报文中提取第二标识信息,并确定是否存在与所述第二标识信息对应的目标哈希节点;若存在所述目标哈希节点,从所述语音数据报文中提取目标有效荷载类型值;若所述目标有效荷载类型值落入预设区间内,从所述目标哈希节点对应的动态负载类型映射表中查找所述目标有效荷载类型值对应的目标编码信息;利用所述目标编码信息对所述语音数据报文进行解码,以还原所述语音数据报文对应的语音。基于此,本申请在对信令报文和语音数据报文进行匹配时,还匹配了其编码信息,从而使其解码时,能够使用其编码信息进行相应的解码还原,保证编解码的高匹配性,从而提高了语音数据报文还原的成功率和正确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116827919B_ABST
    Figure CN116827919B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an Internet voice restoration method and device, electronic equipment and storage medium. The method comprises: extracting first identification information and encoding information from a signaling message, and storing the first identification information and the encoding information in a dynamic payload type mapping table in the form of a hash node; extracting second identification information from a voice data message, and determining whether a target hash node corresponding to the second identification information exists; if the target hash node exists, extracting a target effective payload type value from the voice data message; if the target effective payload type value falls within a preset interval, searching for target encoding information corresponding to the target effective payload type value from the dynamic payload type mapping table corresponding to the target hash node; and decoding the voice data message by using the target encoding information to restore the voice corresponding to the voice data message. Therefore, the present application can guarantee high matching of encoding and decoding, and improve the success rate and accuracy of voice data message restoration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of VoIP voice transmission technology, and in particular to an Internet voice restoration method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of network technology, IP voice calling technology has also developed accordingly. For example, VoIP voice calling technology is a calling technology that enables voice calls and multimedia conferencing via the Internet Protocol. VoIP voice calling technology uses the Internet as a transmission platform to enable two-party or multi-party calls.

[0003] During a VoIP voice call, voice encoding and decoding are involved. For the same voice message, the encoding and decoding algorithms must match to transmit the corresponding voice message correctly. However, currently, when associating Internet signaling streams (i.e., VoIP signaling streams) and RTP media streams, only IP addresses and ports are usually associated to ensure that the media streams are transmitted in the correct session.

[0004] When decoding a media stream, the corresponding decoder is determined based on the payload type in the media stream. However, for dynamic payload types, since the corresponding decoder cannot be explicitly specified in the protocol, the default decoder is usually used for decoding. This may cause the decoder to be inconsistent with the original encoding algorithm, resulting in unsuccessful decoding or decoding errors, and thus the inability to obtain the correct voice, which in turn leads to voice call failure. Summary of the Invention

[0005] This application provides an Internet voice restoration method, apparatus, electronic device, and storage medium to improve the accuracy of voice decoding for dynamic payload types.

[0006] In a first aspect, embodiments of this application provide an internet voice restoration method, the method comprising:

[0007] Upon receiving a signaling message belonging to an Internet signaling flow, first identification information and encoding information are extracted from the signaling message, and the first identification information and the encoding information are mapped and stored in a dynamic load type mapping table in the form of hash nodes;

[0008] Upon receiving a voice data packet, extract the second identification information from the voice data packet and determine whether there is a target hash node corresponding to the second identification information;

[0009] If the target hash node exists, extract the target payload type value from the voice data packet;

[0010] If the target effective load type value falls within a preset range, the target encoding information corresponding to the target effective load type value is retrieved from the dynamic load type mapping table corresponding to the target hash node;

[0011] The target encoding information is used to decode the voice data packet to restore the voice corresponding to the voice data packet.

[0012] Secondly, embodiments of this application also provide an Internet voice restoration device, which includes:

[0013] The mapping storage module is used to extract first identification information and encoding information from the signaling message when a signaling message belonging to the Internet signaling flow is received, and to map and store the first identification information and the encoding information in a dynamic load type mapping table in the form of hash nodes;

[0014] The hash node lookup module is used to extract second identification information from the received voice data packet and determine whether there is a target hash node corresponding to the second identification information.

[0015] The load type value extraction module is used to extract the target effective load type value from the voice data packet if the target hash node exists.

[0016] The encoding information lookup module is used to look up the target encoding information corresponding to the target effective load type value from the dynamic load type mapping table corresponding to the target hash node if the target effective load type value falls within a preset range.

[0017] The decoding and restoration module is used to decode the voice data packet using the target encoding information to restore the voice corresponding to the voice data packet.

[0018] Thirdly, embodiments of this application also provide an electronic device, the electronic device comprising:

[0019] One or more processors;

[0020] Storage device for storing one or more programs.

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the Internet voice restoration method as provided in any embodiment of this application.

[0022] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, characterized in that, when the program is executed by a processor, it implements the Internet voice restoration method as provided in any embodiment of this application.

[0023] In the technical solution of this application embodiment, when a signaling message belonging to an Internet signaling stream is received, first identification information and encoding information are extracted from the signaling message, and the first identification information and the encoding information are mapped and stored in a dynamic load type mapping table in the form of hash nodes; when a voice data message is received, second identification information is extracted from the voice data message, and it is determined whether there is a target hash node corresponding to the second identification information; if the target hash node exists, a target payload type value is extracted from the voice data message; if the target payload type value falls within a preset range, the target encoding information corresponding to the target payload type value is searched in the dynamic load type mapping table corresponding to the target hash node; the voice data message is decoded using the target encoding information to restore the voice corresponding to the voice data message. Based on this, when matching signaling messages and voice data messages, this application also matches their encoding information, so that when decoding, the encoding information can be used for corresponding decoding and restoration, ensuring high matching between encoding and decoding, thereby improving the success rate and accuracy of voice data message restoration. Attached Figure Description

[0024] Figure 1 A flowchart illustrating the Internet voice restoration method provided in Embodiment 1 of this application;

[0025] Figure 2 This is a schematic diagram of the structure of an Internet voice restoration device provided in Embodiment 2 of this application;

[0026] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of this application. Detailed Implementation

[0027] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.

[0028] Example 1

[0029] Figure 1 This is a flowchart illustrating the Internet voice restoration method provided in Embodiment 1 of this application. This embodiment is applicable to scenarios involving Internet voice restoration. The method can be executed by an Internet voice restoration device, which can be implemented in hardware and / or software and is generally integrated into electronic devices such as computers with data processing capabilities. Specifically, it includes the following steps:

[0030] Step 101: Upon receiving a signaling message belonging to the Internet signaling flow, extract the first identification information and encoding information from the signaling message, and map and store the first identification information and encoding information in the dynamic load type mapping table in the form of hash nodes.

[0031] It should be noted that the method in this embodiment can be applied to situations where multiple calls exist simultaneously. For a single call, the messages transmitted between the caller and the called party may include VoIP signaling messages (i.e., Internet signaling messages) and voice data messages.

[0032] VoIP signaling messages typically carry control signaling, basic information between the calling and called parties, and the encoding information of the corresponding voice data packets. Since there are numerous voice encoding and decoding methods, some are specified in relevant communication protocols and specifications. For voice messages using these encoding and decoding methods, the corresponding payload type value in the protocol or specification can be used to define them. During encoding and decoding, the corresponding encoding and decoding method can be found directly from the protocol or specification based on this payload type value. This method is a static payload type.

[0033] However, the protocols or regulations do not cover all encoding and decoding methods, therefore, dynamic loading is possible.

[0034] In this embodiment, when a signaling message is received, the destination port number in the signaling message is extracted; if the destination port number meets the preset port determination conditions, it is determined that a signaling message belonging to the Internet signaling flow (i.e., VoIP signaling flow) has been received.

[0035] Specifically, this embodiment can identify signaling messages of the following protocols: SIP, mgcp, and H.248. In a specific example, the destination port number of SIP is 5060, the destination port number of mgcp is 2427, and the destination port number of H.248 is 2944.

[0036] Therefore, the preset port determination conditions can be: the destination port number is 5060, 2427 or 2944.

[0037] Since the location of encoded information in a message can vary depending on the protocol, different extraction methods can be used in this embodiment.

[0038] Specifically, the protocol type of the signaling message can be determined first based on the destination port number, and the media description information in the signaling message can be extracted according to the extraction rules corresponding to the protocol type. Finally, the media format value, encoding type and sampling rate can be extracted from the media description information, and the media format value, encoding type and sampling rate can be determined as encoding information.

[0039] When extracting media format values, encoding types, and sampling rates from media description information, you can first find the target keyword (e.g., a = rtpmap). The media format (a value between 0 and 127), encoding type (e.g., PCMU), and sampling rate (e.g., 8000) are recorded after this keyword, and can be extracted directly.

[0040] If the target port of the signaling message indicates that the signaling message is a message of the first protocol type, and the content type is the target type, and a payload is attached after the message header end marker, then the payload is determined to be media description information.

[0041] If the target port of the signaling message indicates that the signaling message is a message of the second protocol type, and there is a blank line after the message header, the payload after the blank line is determined to be the media description information;

[0042] If the target port of the signaling message indicates that the signaling message is a message of the third protocol type, and the signaling message contains a first target field or a second target field, the content in the first target field or the second target field is determined as media description information.

[0043] It should be noted that the first protocol type can be SIP, the second protocol type can be mgcp, and the third protocol type can be H.248.

[0044] In addition, when mapping and storing the first identification information and encoding information in the dynamic load type mapping table as hash nodes, the hash value of the first identification information can be determined first, and a hash node can be added in the preset Internet related flow hash table (i.e., VoIP related flow hash table) based on the hash value.

[0045] The first identifier information can be address information and port information. The address information and port information can be used as a tuple, and then the hash value of the tuple information can be calculated.

[0046] It should be noted that the same first identifier information may appear in different calls. Therefore, you can first check whether there is a hash node with the same hash value in the preset Internet association stream hash table. If it exists, use the existing hash node as the added hash node. If it does not exist, add a new hash node.

[0047] In addition, the encoding information includes media format value, encoding type and sampling rate. Therefore, a dynamic payload type mapping table can be established between media format value and encoding type and sampling rate, and the dynamic payload type mapping table can be stored in hash nodes.

[0048] Step 102: Upon receiving a voice data packet, extract the second identification information from the voice data packet and determine whether there is a target hash node corresponding to the second identification information.

[0049] In this step, the received UDP packets are typically from non-publicly known ports, which can be identified as voice data packets. The second identification information is then extracted from these voice data packets. The second identification information may include first address information, first port information, second address information, and second port information.

[0050] In this process, the first address information can be the destination IP address, the first port information can be the destination port, the second address information can be the source IP address, and the second port information can be the source port. First, the first address information and the first port information can be used as the second identifier information, and the hash value of the second identifier information is calculated. Then, the internet association flow hash table is searched to determine if a target hash node corresponding to the hash value of the second identifier information exists.

[0051] If it does not exist, the second address information and the second port information are determined as the second identification information, and the hash value of the second identification information is calculated; the target hash node corresponding to the hash value of the second identification information is searched in the Internet association flow hash table.

[0052] It should be noted that the process of calculating the hash value can refer to the relevant content of step 101 above, and will not be repeated here.

[0053] Step 103: If a target hash node exists, extract the target payload type value from the voice data packet.

[0054] In this step, the range of the extracted target effective load type value is the same as that of the aforementioned media format, which is 0 to 127. Usually, the effective load type is divided into static or dynamic based on the first preset threshold. For example, if it is less than or equal to the first preset threshold, it is a static effective load type, and if it is greater than the first preset threshold but less than the second preset threshold, it is a dynamic effective load type.

[0055] In this step, the common header in the voice data type can be parsed during extraction to extract the value of the payload type field, which is the target payload type value.

[0056] Step 104: If the target effective load type value falls within the preset range, search for the target encoding information corresponding to the target effective load type value in the dynamic load type mapping table corresponding to the target hash node.

[0057] In this step, the preset range is greater than the first preset threshold and less than the second preset threshold. If the target payload type value falls within the preset range, it means that the voice data packet is a dynamic payload type. At this time, the target encoding information corresponding to the target payload type value is searched from the dynamic payload type mapping table corresponding to the target hash node.

[0058] Of course, this embodiment can also decode the static effective load type. First, the effective load type value and the parsing parameters corresponding to each effective load type value are extracted from the preset protocol specification, and a static load type mapping table is constructed according to the effective load type value and its corresponding parsing parameters.

[0059] If the target effective load type value is less than or equal to the first preset threshold, query the target encoding information corresponding to the target effective load type value from the static load type mapping table.

[0060] In other words, this embodiment achieves correct parsing and restoration of voice data packets with both static and dynamic payload types by setting up a static payload type mapping table and a dynamic payload type mapping table.

[0061] Step 105: Decode the voice data packet using the target encoding information to restore the voice corresponding to the voice data packet.

[0062] In this step, the voice data message can be reassembled with the target message that meets the preset reassembly conditions to obtain the voice data to be restored; the target encoding information is used to parse the voice data to be restored to obtain the restored voice file.

[0063] It should be noted that the preset reassembly conditions can be that the five-tuple information of the messages are the same and the sending direction is the same, such as from the calling party to the called party or from the called party to the calling party.

[0064] In addition, during reconstruction, the data can be reconstructed according to the message number (i.e., seq number). Typically, a voice segment is sent in multiple frames, with each frame corresponding to a message. The messages are numbered according to the frame order. Therefore, during reconstruction, the voice data portion of the voice data message is reconstructed according to the seq number order to obtain the voice data to be restored.

[0065] In order not to block the current thread's packet receiving business, after the data is reassembled, the voice data to be restored and the corresponding target encoding information can be sent to another thread for decoding and restoration to obtain the voice file.

[0066] In the technical solution of this application embodiment, when a signaling message belonging to an Internet signaling stream is received, first identification information and encoding information are extracted from the signaling message, and the first identification information and encoding information are mapped and stored in a dynamic load type mapping table in the form of hash nodes; when a voice data message is received, second identification information is extracted from the voice data message, and it is determined whether there is a target hash node corresponding to the second identification information; if a target hash node exists, a target payload type value is extracted from the voice data message; if the target payload type value falls within a preset range, the target encoding information corresponding to the target payload type value is searched in the dynamic load type mapping table corresponding to the target hash node; the voice data message is decoded using the target encoding information to restore the voice corresponding to the voice data message. Based on this, when matching signaling messages and voice data messages, this application also matches their encoding information, so that when decoding, the encoding information can be used for corresponding decoding and restoration, ensuring high matching between encoding and decoding, thereby improving the success rate and accuracy of voice data message restoration.

[0067] Example 2

[0068] Figure 2 This is a schematic diagram of an Internet voice restoration device provided in Embodiment 2 of this application. The Internet voice restoration device provided in this embodiment can execute the Internet voice restoration method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the method. This device can be implemented in software and / or hardware, such as... Figure 2 As shown, the Internet voice restoration device specifically includes: a mapping storage module 201, a hash node lookup module 202, a payload type value extraction module 203, an encoding information lookup module 204, and a decoding restoration module 205.

[0069] The mapping storage module is used to extract the first identification information and the encoding information from the signaling message when a signaling message belonging to the Internet signaling flow is received, and to map and store the first identification information and the encoding information in the dynamic load type mapping table in the form of hash nodes.

[0070] The hash node lookup module is used to extract the second identification information from the received voice data packet and determine whether there is a target hash node corresponding to the second identification information.

[0071] The load type value extraction module is used to extract the target effective load type value from the voice data packet if a target hash node exists.

[0072] The encoding information lookup module is used to look up the target encoding information corresponding to the target effective load type value from the dynamic load type mapping table corresponding to the target hash node if the target effective load type value falls within a preset range.

[0073] The decoding and restoration module is used to decode the voice data packets using the target encoding information in order to restore the voice corresponding to the voice data packets.

[0074] In the technical solution of the application embodiment, when a signaling message belonging to the Internet signaling stream is received, first identification information and encoding information are extracted from the signaling message, and the first identification information and encoding information are mapped and stored in a dynamic load type mapping table in the form of hash nodes; when a voice data message is received, second identification information is extracted from the voice data message, and it is determined whether there is a target hash node corresponding to the second identification information; if a target hash node exists, a target payload type value is extracted from the voice data message; if the target payload type value falls within a preset range, the target encoding information corresponding to the target payload type value is searched in the dynamic load type mapping table corresponding to the target hash node; the voice data message is decoded using the target encoding information to restore the voice corresponding to the voice data message. Based on this, when matching signaling messages and voice data messages, this application also matches their encoding information, so that when decoding, the encoding information can be used for corresponding decoding and restoration, ensuring high matching between encoding and decoding, thereby improving the success rate and accuracy of voice data message restoration.

[0075] Furthermore, the device also includes:

[0076] The port number extraction module is used to extract the destination port number from the received signaling message.

[0077] The signaling determination module is used to determine that a signaling message belonging to the Internet signaling flow has been received if the destination port number meets the preset port determination conditions.

[0078] Furthermore, the encoding information includes media format values, encoding type, and sampling rate;

[0079] The mapped storage module includes:

[0080] A hash node adding unit is used to determine the hash value of the first identifier information and add a hash node in a preset Internet association flow hash table based on the hash value;

[0081] The mapping storage unit is used to establish a dynamic payload type mapping table between media format values ​​and encoding type and sampling rate, indexed by media format values, and to store the dynamic payload type mapping table in hash nodes.

[0082] Furthermore, the mapped storage module includes:

[0083] The first description information extraction unit is used to determine the payload as media description information if the target port of the signaling message indicates that the signaling message is a message of the first protocol type, the content type is the target type, and the message header end flag has a payload attached.

[0084] The second description information extraction unit is used to determine the payload after the empty line as media description information if the target port of the signaling message indicates that the signaling message is a message of the second protocol type and there is an empty line after the message header.

[0085] The third description information extraction unit is used to determine the content in the first target field or the second target field as media description information if the target port of the signaling message indicates that the signaling message is a message of the third protocol type and the signaling message contains a first target field or a second target field.

[0086] The encoding information extraction unit is used to extract media format values, encoding type and sampling rate from media description information, and to determine the media format values, encoding type and sampling rate as encoding information.

[0087] Furthermore, the hash node lookup module includes:

[0088] The information extraction unit is used to extract first address information, first port information, second address information and second port information from voice data packets;

[0089] The first hash value calculation unit is used to take the first address information and the first port information as the second identification information and calculate the hash value of the second identification information;

[0090] The first search unit is used to search the Internet association stream hash table to find whether there is a target hash node corresponding to the hash value of the second identifier information;

[0091] The second hash value calculation unit is used to determine the second address information and the second port information as the second identification information if the second identification information does not exist, and to calculate the hash value of the second identification information.

[0092] The second search unit is used to search the Internet association flow hash table for the existence of a target hash node corresponding to the hash value of the second identifier information.

[0093] Furthermore, the decoding and restoration module includes:

[0094] The reassembly unit is used to reassemble voice data packets with target packets that meet preset reassembly conditions to obtain voice data to be restored.

[0095] The parsing unit is used to parse the speech data to be restored using the target encoding information to obtain the restored speech file.

[0096] Furthermore, the preset interval is greater than a first preset threshold and less than a second preset threshold, and the device also includes:

[0097] The static table construction module is used to extract the effective load type values ​​and the corresponding parsing parameters from the preset protocol specifications in advance, and to construct a static load type mapping table based on the effective load type values ​​and their corresponding parsing parameters.

[0098] The static encoding information lookup module is used to query the target encoding information corresponding to the target effective load type value from the static load type mapping table if the target effective load type value is less than or equal to the first preset threshold.

[0099] Example 3

[0100] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of this application, as shown below. Figure 3 As shown, the electronic device includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of processors 310 in the electronic device can be one or more. Figure 3 Taking a processor 310 as an example; the processor 310, memory 320, input device 330, and output device 340 in the electronic device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0101] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the Internet voice restoration method in this embodiment of the invention (e.g., the mapping storage module 201, hash node lookup module 202, payload type value extraction module 203, encoded information lookup module 204, and decoding restoration module 205 in the Internet voice restoration device). The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 320, thereby implementing the aforementioned Internet voice restoration method.

[0102] Upon receiving a signaling message belonging to the Internet signaling flow, the first identification information and encoding information are extracted from the signaling message, and the first identification information and encoding information are mapped and stored in the dynamic load type mapping table in the form of hash nodes;

[0103] Upon receiving a voice data packet, extract the second identification information from the voice data packet and determine whether there is a target hash node corresponding to the second identification information;

[0104] If a target hash node exists, extract the target payload type value from the voice data packet;

[0105] If the target effective load type value falls within the preset range, the target encoding information corresponding to the target effective load type value is retrieved from the dynamic load type mapping table corresponding to the target hash node;

[0106] The target encoding information is used to decode the voice data message in order to restore the voice corresponding to the voice data message.

[0107] The memory 320 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 320 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include memory remotely located relative to the processor 310, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0108] Example 4

[0109] Embodiment 4 of this application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform an Internet voice restoration method, the method comprising:

[0110] Upon receiving a signaling message belonging to the Internet signaling flow, the first identification information and encoding information are extracted from the signaling message, and the first identification information and encoding information are mapped and stored in the dynamic load type mapping table in the form of hash nodes;

[0111] Upon receiving a voice data packet, extract the second identification information from the voice data packet and determine whether there is a target hash node corresponding to the second identification information;

[0112] If a target hash node exists, extract the target payload type value from the voice data packet;

[0113] If the target effective load type value falls within the preset range, the target encoding information corresponding to the target effective load type value is retrieved from the dynamic load type mapping table corresponding to the target hash node;

[0114] The target encoding information is used to decode the voice data message in order to restore the voice corresponding to the voice data message.

[0115] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the above-described method operations, but can also execute related operations in the Internet voice restoration method provided in any embodiment of this application.

[0116] Based on the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0117] It is worth noting that in the embodiments of the search device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of this application.

[0118] Note that the above description is merely a preferred embodiment and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this application, and the scope of this application is determined by the scope of the appended claims.

Claims

1. A method for restoring internet voice recordings, characterized in that, The method includes: Upon receiving a signaling message belonging to an Internet signaling flow, first identification information and encoding information are extracted from the signaling message, and the first identification information and the encoding information are mapped and stored in a dynamic load type mapping table in the form of hash nodes; Upon receiving a voice data packet, extract the second identification information from the voice data packet and determine whether there is a target hash node corresponding to the second identification information; If the target hash node exists, extract the target payload type value from the voice data packet; If the target effective load type value falls within a preset range, the target encoding information corresponding to the target effective load type value is retrieved from the dynamic load type mapping table corresponding to the target hash node; wherein, the preset range is greater than a first preset threshold and less than a second preset threshold; the target effective load type is a dynamic effective load type; The target encoding information is used to decode the voice data packet to restore the voice corresponding to the voice data packet.

2. The method according to claim 1, characterized in that, The method further includes: Upon receiving a signaling message, extract the destination port number from the signaling message; If the destination port number meets the preset port determination conditions, it is determined that a signaling message belonging to the Internet signaling flow has been received.

3. The method according to claim 1, characterized in that, The encoding information includes media format values, encoding type, and sampling rate; The step of mapping and storing the first identification information and the encoded information in a dynamic load type mapping table as hash nodes includes: Determine the hash value of the first identifier information, and add a hash node to the preset Internet association flow hash table based on the hash value; Using the media format value as an index, a dynamic load type mapping table is established between the media format value, the encoding type, and the sampling rate, and the dynamic load type mapping table is stored in the hash node.

4. The method according to claim 1, characterized in that, Extracting encoded information from the signaling message includes: If the target port of the signaling message indicates that the signaling message is a message of the first protocol type, and the content type is the target type, and a payload is attached after the message header end marker, then the payload is determined to be media description information; If the target port of the signaling message indicates that the signaling message is a message of the second protocol type, and there is a blank line after the message header, the payload after the blank line is determined to be media description information; If the target port of the signaling message indicates that the signaling message is a message of a third protocol type, and the signaling message contains a first target field or a second target field, the content in the first target field or the second target field is determined as media description information; The media format value, encoding type, and sampling rate are extracted from the media description information, and the media format value, encoding type, and sampling rate are determined as encoding information.

5. The method according to claim 1, characterized in that, Extracting the second identifier information from the voice data packet and determining whether a target hash node corresponding to the second identifier information exists includes: Extract the first address information, the first port information, the second address information, and the second port information from the voice data packet; The first address information and the first port information are used as the second identification information, and the hash value of the second identification information is calculated; Check if the target hash node corresponding to the hash value of the second identifier information exists in the Internet association stream hash table; If it does not exist, the second address information and the second port information are determined as the second identification information, and the hash value of the second identification information is calculated; The system searches the Internet-related flow hash table to determine if a target hash node exists corresponding to the hash value of the second identifier information.

6. The method according to claim 1, characterized in that, Decoding the voice data packet using the target encoding information to restore the voice corresponding to the voice data packet includes: The voice data message is reassembled with a target message that meets the preset reassembly conditions to obtain the voice data to be restored. The target encoding information is used to parse the speech data to be restored to obtain the restored speech file.

7. The method according to claim 1, characterized in that, The method further includes: The effective load type values ​​and the corresponding parsing parameters of each effective load type value are extracted from the preset protocol specifications in advance, and a static load type mapping table is constructed based on the effective load type values ​​and their corresponding parsing parameters. If the target effective load type value is less than or equal to the first preset threshold, the target encoding information corresponding to the target effective load type value is queried from the static load type mapping table.

8. An internet voice restoration device, characterized in that, The device includes: The mapping storage module is used to extract first identification information and encoding information from the signaling message when a signaling message belonging to the Internet signaling flow is received, and to map and store the first identification information and the encoding information in a dynamic load type mapping table in the form of hash nodes; The hash node lookup module is used to extract second identification information from the received voice data packet and determine whether there is a target hash node corresponding to the second identification information. The load type value extraction module is used to extract the target effective load type value from the voice data packet if the target hash node exists. The encoding information lookup module is used to look up the target encoding information corresponding to the target effective load type value from the dynamic load type mapping table corresponding to the target hash node if the target effective load type value falls within a preset range; wherein, the preset range is greater than a first preset threshold and less than a second preset threshold; and the target effective load type is a dynamic effective load type; The decoding and restoration module is used to decode the voice data packet using the target encoding information to restore the voice corresponding to the voice data packet.

9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the Internet voice restoration method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the Internet voice restoration method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Voice data transmission method and device

    CN109218083A

  • Voice analysis method and device, receiving end equipment and storage medium

    CN114244911A