Message forwarding method and device, FPGA and voice communication device

CN117499307BActive Publication Date: 2026-10-27MAIPU COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210886272.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2026-10-27
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

目前,现有的语音通信设备存在数据延迟、转发效率低的问题

Benefits of technology

[0014]本发明实施例提供的报文转发方法、装置、FPGA和语音通信设备,语音通信设备中的FPGA与交换芯片电连接,FPGA对接收的交换芯片发送的以太网报文进行解析,得到以太网报文的VLAN号和UDP端口号;启动报文发送流程,并在发送报文前根据VLAN号和UDP端口号对以太网报文的VLAN号和MAC地址进行修改;再将修改后的以太网报文发送至交换芯片,以使交换芯片进行转发。相比现有技术,在以太网报文发送的间隔内完成地址修改,不需要额外的时间进行数据处理,从而避免产生延迟,实现了报文的高效转发。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117499307B_ABST
    Figure CN117499307B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of communication, and provides a message forwarding method and device, an FPGA and a voice communication device. The FPGA in the voice communication device is electrically connected with a switching chip. The FPGA analyzes an Ethernet message sent by the switching chip, obtains a VLAN number and a UDP port number of the Ethernet message, starts a message sending process, and modifies the VLAN number and a MAC address of the Ethernet message according to the VLAN number and the UDP port number before sending the message. Then, the FPGA sends the modified Ethernet message to the switching chip, so that the switching chip forwards the message. The address modification is completed within the interval of sending the Ethernet message, and additional time is not needed for data processing, thereby avoiding delay and realizing efficient forwarding of the message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically, to a message forwarding method, apparatus, FPGA, and voice communication device. Background Technology

[0002] In voice communication devices based on Voice Over Internet Protocol (VOIP), Ethernet and Real-time Transport Protocol (RTP) are generally used to transmit voice data, which involves the forwarding of RTP messages. Currently, existing voice communication devices suffer from data latency and low forwarding efficiency. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a message forwarding method, apparatus, FPGA, and voice communication device.

[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows: In a first aspect, the present invention provides a message forwarding method applied to an FPGA in a voice communication device, wherein the voice communication device further includes a switching chip electrically connected to the FPGA, and the method includes: The received Ethernet packets sent by the switching chip are parsed to obtain the VLAN number and UDP port number of the Ethernet packets; Initiate the message sending process, and modify the VLAN number and MAC address of the Ethernet message according to the VLAN number and the UDP port number during the initiation process; The modified Ethernet packet is sent to the switching chip so that the switching chip can forward it.

[0005] In an optional implementation, the step of parsing the received Ethernet packet sent by the switching chip to obtain the VLAN number and UDP port number of the Ethernet packet includes: The received Ethernet packets are converted from serial to parallel. The Ethernet packets after serial-to-parallel conversion are parsed to obtain the VLAN number and UDP port number of the Ethernet packets.

[0006] In an optional implementation, the MAC address includes a source MAC address and a destination MAC address; The step of modifying the VLAN number and MAC address of the Ethernet packet based on the VLAN number and the UDP port number includes: When the VLAN number includes a sending identifier, the VLAN number and source MAC address of the Ethernet packet are modified to the designated sending port number of the voice communication device and the MAC address of the voice communication device, respectively.

[0007] In an optional implementation, the MAC address includes a source MAC address and a destination MAC address; The step of modifying the VLAN number and MAC address of the Ethernet packet based on the VLAN number and the UDP port number includes: When the VLAN number includes a receive identifier, the VLAN number and destination MAC address of the Ethernet packet are modified to the VLAN number and MAC address corresponding to the destination digital processing unit in the voice communication device, respectively, based on the UDP port number.

[0008] In an optional implementation, the FPGA pre-stores a correspondence between multiple UDP port number ranges, each of which includes the VLAN number of the switching port of the switching chip to which the destination digital processing unit is connected and the MAC address of the destination digital processing unit. The step of modifying the VLAN number and destination MAC address of the Ethernet packet according to the UDP port number to the VLAN number and MAC address corresponding to the address of the destination digital processing unit in the voice communication device includes: Determine the target UDP port number range to which the UDP port number belongs; Modify the VLAN number of the Ethernet packet to the VLAN number of the switching port of the switching chip connected to the destination digital processing unit corresponding to the target UDP port number range; The destination MAC address of the Ethernet packet is modified to the MAC address of the destination digital processing unit corresponding to the target UDP port number range.

[0009] In an optional implementation, the MAC address includes a source MAC address and a destination MAC address; The step of sending the modified Ethernet packet to the switching chip so that the switching chip can forward it includes: If the VLAN number and the source MAC address are modified, the modified Ethernet packet is converted from parallel to serial and then sent to the switching chip, so that the switching chip forwards it to other voice communication devices corresponding to the destination MAC address of the Ethernet packet.

[0010] In an optional implementation, the MAC address includes a source MAC address and a destination MAC address; The step of sending the modified Ethernet packet to the switching chip so that the switching chip can forward it includes: If the VLAN number and the destination MAC address are modified, the modified Ethernet packet is converted from parallel to serial and then sent to the switching chip, so that the switching chip forwards it to the digital processing unit in the voice communication device corresponding to the modified VLAN number and the modified destination MAC address.

[0011] In a second aspect, the present invention provides a message forwarding device applied to an FPGA in a voice communication device, the voice communication device further comprising a switching chip electrically connected to the FPGA, the device comprising: The parsing module is used to parse the Ethernet packets sent by the receiving switching chip to obtain the VLAN number and UDP port number of the Ethernet packets; The conversion module is used to initiate the packet sending process and modify the VLAN number and MAC address of the Ethernet packet according to the VLAN number and the UDP port number before sending the packet; The sending module is used to send the modified Ethernet packet to the switching chip so that the switching chip can forward it.

[0012] Thirdly, the present invention provides an FPGA for implementing the method described in any of the foregoing embodiments.

[0013] Fourthly, the present invention provides a voice communication device, the voice communication device including a switching chip and the FPGA described in the foregoing embodiments.

[0014] The packet forwarding method, apparatus, FPGA, and voice communication device provided in this invention embodiment are as follows: In the voice communication device, the FPGA is electrically connected to a switching chip. The FPGA parses the Ethernet packets sent by the switching chip to obtain the VLAN number and UDP port number of the Ethernet packets; it initiates the packet sending process and modifies the VLAN number and MAC address of the Ethernet packets according to the VLAN number and UDP port number before sending the packets; then, it sends the modified Ethernet packets to the switching chip for forwarding. Compared with existing technologies, address modification is completed within the interval of Ethernet packet sending, eliminating the need for additional data processing time, thereby avoiding delays and achieving efficient packet forwarding.

[0015] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 An example diagram of an application scenario provided by an embodiment of the present invention is shown; Figure 2 A block diagram of a voice communication device provided in an embodiment of the present invention is shown; Figure 3 This illustration shows one of the flowcharts of the message forwarding method provided in an embodiment of the present invention; Figure 4 An example diagram of the packet structure of an Ethernet packet provided in an embodiment of the present invention is shown; Figure 5 The second schematic flowchart of the message forwarding method provided in this embodiment of the invention is shown. Figure 6 One example diagram of the message forwarding method provided in an embodiment of the present invention is shown; Figure 7 The second example diagram shows the message forwarding method provided in the embodiment of the present invention; Figure 8 A functional block diagram of a message forwarding device provided in an embodiment of the present invention is shown.

[0018] Icons: 110-Processor; 120-Memory; 130-Communication module; 140-FPGA; 150-Switching chip; 300-Message forwarding device; 310-Parsing module; 330-Conversion module; 350-Sending module. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0020] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0021] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0022] Please see Figure 1 This is an example diagram of an application scenario provided by an embodiment of the present invention, which includes two voice communication devices connected in communication. It should be understood that... Figure 1 This is just an example; the application scenario could also include multiple voice communication devices.

[0023] Voice communication devices can be VoIP devices, which transmit voice data in real time via Ethernet and the Real-time Transport Protocol (RTP). Using RTP typically involves forwarding RTP packets. Currently, some methods use a CPU to process voice data and forward packets, but this places high demands on CPU performance. Other methods use dedicated chips such as DSPs to process voice data, but this requires modification of the Media Access Control (MAC) address.

[0024] The inventors discovered that related technologies use multiple buffers to modify MAC addresses, which suffers from data latency and low forwarding efficiency due to the high real-time requirements of voice data transmission. Therefore, this invention provides a message forwarding method to solve these problems.

[0025] Please see Figure 2 This is a block diagram of a voice communication device according to an embodiment of the present invention. The voice communication device includes a processor 110, a memory 120, a communication module 130, an FPGA 140, and a switching chip 150. The components are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0026] The processor 110 is used to read / write data or programs stored in the memory and to perform corresponding functions.

[0027] The memory 120 is used to store programs or data. The memory 120 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), or electrically erasable programmable read-only memory (EEPROM).

[0028] The communication module 130 is used for signaling or data communication with other node devices.

[0029] FPGA140 is used to execute the packet forwarding method provided in the embodiments of the present invention, which can realize MAC address modification.

[0030] Switching chip 150 is used to forward modified messages.

[0031] Optionally, the voice communication device may also include multiple voice processing chips such as DSPs, each voice processing chip including the core of multiple digital processing units such as DSPs.

[0032] Understandable Figure 2 The structure shown is only a schematic diagram of a voice communication device; the voice communication device may also include components such as... Figure 2 The more or fewer components shown, or having the same Figure 2 The different configurations shown. Figure 2 The components shown can be implemented using hardware, software, or a combination thereof.

[0033] Please see Figure 3 , Figure 3 This is a flowchart illustrating a forwarding method provided in an embodiment of the present invention.

[0034] Step S202: Parse the Ethernet packets sent by the received switching chip to obtain the VLAN number and UDP port number of the Ethernet packets. VLAN stands for Virtual Local Area Network. UDP stands for User Datagram Protocol, and the UDP port number indicates the destination port.

[0035] In this embodiment, the FPGA is electrically connected to the switching chip. The switching chip sends Ethernet packets to the FPGA, which receives and parses the Ethernet packets to obtain the VLAN number and UDP port number from the Ethernet packets.

[0036] Step S204: Start the message sending process, and modify the VLAN number and MAC address of the Ethernet message according to the VLAN number and UDP port number before sending the message; It is understandable that Ethernet packets are sent periodically at set intervals. In order to avoid delays caused by MAC address modification, in this embodiment, after the Ethernet packet is parsed, the packet sending process is started, and the address modification is completed before the packet is sent. That is, the VLAN number and MAC address in the Ethernet packet are modified at the end of the same packet data according to the VLAN number and UDP port number.

[0037] It can be understood that the message sending process and the address modification are two separate threads. In this embodiment of the invention, the address modification is implemented by using the interval of message sending, so it will not cause additional delay.

[0038] Step S206: Send the modified Ethernet packet to the switching chip so that the switching chip can forward it; In this embodiment, after modifying the VLAN number and MAC address, a modified Ethernet packet is obtained. This modified Ethernet packet is then sent to the switching chip so that the switching chip can forward it.

[0039] As can be seen from the above steps, the FPGA in the voice communication device is electrically connected to the switching chip. The FPGA parses the Ethernet packets sent by the switching chip to obtain the VLAN number and UDP port number of the Ethernet packets; it then initiates the packet transmission process, modifying the VLAN number and MAC address of the Ethernet packets according to the VLAN number and UDP port number before sending the packets; finally, it sends the modified Ethernet packets to the switching chip for forwarding. Compared with existing technologies, address modification is completed within the interval of Ethernet packet transmission, eliminating the need for additional data processing time, thus avoiding delays and achieving efficient packet forwarding.

[0040] Optionally, in order to further improve forwarding efficiency, the present invention provides a possible implementation of step S202 above.

[0041] Step S202-1: Perform serial-to-parallel conversion on the received Ethernet packets; Step S202-3: Parse the Ethernet packets after serial-to-parallel conversion to obtain the VLAN number and UDP port number of the Ethernet packets.

[0042] In this embodiment, the FPGA can perform serial-to-parallel conversion on the received Ethernet packets, that is, convert serial Ethernet packet data into internal parallel data; then, it can parse the converted Ethernet packets to obtain start and end flags, that is, the data header and data trailer of the packet data.

[0043] The VLAN number and UDP port number can be extracted from the Ethernet packet based on the start flag; alternatively, the VLAN number and UDP port number can be extracted from the corresponding position based on the packet structure of the Ethernet packet.

[0044] Understandably, if an Ethernet packet is input to the FPGA and undergoes serial-to-parallel conversion, the FPGA needs to perform parallel-to-serial conversion on the Ethernet packet before sending it to the switching chip.

[0045] As can be seen, by converting the received Ethernet packets from serial to parallel and then parsing the converted Ethernet packets, the VLAN number and UDP port number of the Ethernet packets can be obtained.

[0046] Optionally, the MAC address includes a source MAC address and a destination MAC address, where the source MAC address represents the MAC address of the message sender, and the destination MAC address represents the MAC address of the message receiver. Furthermore, this embodiment of the invention provides an example diagram of the packet structure of an Ethernet packet.

[0047] Please see Figure 4 The Ethernet packet structure provided in this embodiment of the invention includes a start identifier, voice data, UDP port number, VLAN number, source MAC address, destination MAC address, and end identifier. The following will be based on... Figure 4 The message structure shown illustrates the message forwarding method provided in this embodiment of the invention.

[0048] Optionally, for step S204 above, the embodiments of the present invention provide two possible implementation methods, please refer to [link to relevant documentation]. Figure 5 The first implementation method will be introduced below.

[0049] Step S204A: When the VLAN number includes a sending identifier, modify the VLAN number and source MAC address of the Ethernet packet to the specified sending port number of the voice communication device and the MAC address of the voice communication device, respectively. In this embodiment, a sending identifier can be preset, such as using A to represent the sending identifier. It should be understood that the sending identifier can be set according to the actual application, and this embodiment of the invention does not impose any limitations.

[0050] If the VLAN number in the Ethernet packet includes a sender identifier (A), indicating that the current voice communication device is the sender, then the VLAN number and source MAC address need to be modified. Specifically, the VLAN number should be changed to the designated sender port number of the voice communication device, and the source MAC address should be changed to the MAC address of the voice communication device.

[0051] Since step S204A modifies the VLAN number and source MAC address, this embodiment of the invention provides a possible implementation method for step S206.

[0052] In step S206A, if the VLAN number and source MAC address are modified, the modified Ethernet packet is converted from parallel to serial and then sent to the switching chip so that the switching chip forwards it to other voice communication devices corresponding to the destination MAC address of the Ethernet packet.

[0053] In this embodiment, if the VLAN number and source MAC address are modified, it indicates that the current voice communication device is the message sender, that is, it needs to send Ethernet messages to other voice communication devices. In this case, the FPGA will perform parallel-to-serial conversion (converting internal parallel data into Ethernet serial data) on the modified Ethernet message and send it to the switching chip. Then, the switching chip will forward the message to the other voice communication device corresponding to the destination MAC address based on the destination MAC address in the Ethernet message.

[0054] For ease of understanding, an example diagram is provided in this embodiment of the invention. Please refer to it. Figure 6 This includes voice communication device 1 and voice communication device 2. The following explanation will focus on steps S204A and 206A based on voice communication device 1.

[0055] The FPGA of voice communication device 1 parses the Ethernet packets received from the switching chip of this device, obtains the VLAN number, and finds that the VLAN number is the preset sending identifier A, indicating that the current voice communication device 1 is the packet sending end, that is, voice communication device 1 sends Ethernet packets to voice communication device 2.

[0056] At this time, the destination MAC address of the Ethernet packet received by the FPGA is the MAC address of voice communication device 2, and the source MAC address is the MAC address of a certain digital processing unit in voice communication device 1. The FPGA needs to modify the VLAN number to the designated sending port number of voice communication device 1 so that the packet can be sent to voice communication device 2 from the designated sending port number; and modify the source MAC address to the MAC address of voice communication device 1 so that voice communication device 2 knows that the Ethernet packet was sent by voice communication device 1.

[0057] The FPAG converts the modified Ethernet packet from parallel to serial and sends it to the switching chip. The switching chip forwards the packet based on the destination MAC address in the Ethernet packet, that is, it forwards the packet to the voice communication device 2.

[0058] Please see Figure 5 The second implementation of step S204 above will be introduced below.

[0059] Step S204B: When the VLAN number includes the receiving identifier, modify the VLAN number and destination MAC address of the Ethernet packet to the VLAN number and MAC address corresponding to the destination digital processing unit in the voice communication device, respectively, according to the UDP port number. In this embodiment, a receiving identifier can be preset, such as using B to represent the receiving identifier. It should be understood that the receiving identifier can be set according to the actual application, and this embodiment of the invention does not impose any limitations.

[0060] If the VLAN number in the Ethernet packet includes the receive identifier (B), indicating that the current voice communication device is the packet receiver, then the VLAN number and destination MAC address need to be modified. That is, based on the UDP port number, the VLAN number and destination MAC address of the Ethernet packet should be modified to the VLAN number and MAC address corresponding to the destination digital processing unit in the voice communication device.

[0061] This invention provides a possible implementation method for modifying the VLAN number and destination MAC address of an Ethernet packet based on the UDP port number.

[0062] Step S204B-1: Determine the target UDP port number range to which the UDP port number belongs; In this embodiment, the FPGA pre-configures an address translation table based on the starting UDP port number, interval length, VLAN number, and destination MAC address provided by the CPU. The address translation table includes the designated sending port number of the voice communication device, the MAC address of the voice communication device, and the correspondence of multiple UDP port number intervals. Each correspondence includes the VLAN number of the switching port of the switching chip to which the destination digital processing unit is connected and the MAC address of the destination digital processing unit corresponding to each UDP port number interval.

[0063] The FPGA selects the target UDP port number range from all UDP port number ranges based on the UDP port number in the received Ethernet packet.

[0064] Step S204B-3: Modify the VLAN number of the Ethernet packet to the VLAN number of the switching port of the switching chip connected to the destination digital processing unit corresponding to the target UDP port number range. Step S204B-5: Modify the destination MAC address of the Ethernet packet to the MAC address of the destination digital processing unit corresponding to the target UDP port number range.

[0065] In this embodiment, the FPGA obtains the corresponding VLAN number and MAC address based on the obtained target UDP port number range, modifies the VLAN number in the Ethernet packet to the VLAN number corresponding to the target UDP port number range, and modifies the destination MAC address in the Ethernet packet to the MAC address corresponding to the target UDP port number range.

[0066] Since step S204B modifies the VLAN number and destination MAC address, this embodiment of the invention provides a possible implementation method for step S206.

[0067] In step S206B, if the VLAN number and destination MAC address are modified, the modified Ethernet packet is converted from parallel to serial and then sent to the switching chip so that the switching chip forwards it to the digital processing unit in the voice communication device corresponding to the modified VLAN number and the modified destination MAC address.

[0068] In this embodiment, if the VLAN number and destination MAC address are modified, it indicates that the current voice communication device is a message receiver, that is, it receives Ethernet messages sent by other voice communication devices. The FPGA then performs parallel-to-serial conversion (converts internal parallel data into Ethernet serial data) on the modified Ethernet message and sends it to the switching chip. Then, the switching chip forwards the message to the digital processing unit in the voice communication device that corresponds to the modified VLAN number and the modified destination MAC address, based on the modified VLAN number and the modified destination MAC address in the Ethernet message.

[0069] For ease of understanding, an example diagram is provided in this embodiment of the invention. Please refer to it. Figure 7 This includes voice communication device 1 and voice communication device 2. The following will explain steps S204B-1 to S204B-5 and step 206B based on voice communication device 1.

[0070] The FPGA of voice communication device 1 parses the received Ethernet packets, obtains the VLAN number, and finds that the VLAN number is the preset receive identifier B, indicating that the current voice communication device 1 is the packet receiver, that is, voice communication device 1 receives the Ethernet packets sent by voice communication device 2.

[0071] At this time, the source MAC address of the Ethernet packet received by the FPGA is the MAC address of voice communication device 2, and the destination MAC address is the MAC address of voice communication device 1. The FPGA needs to modify the VLAN number and the destination MAC address according to the UDP port number so that the voice data in the Ethernet packet can be sent to the corresponding digital processing unit in voice communication device 1 for processing.

[0072] As shown in the table below, an example of an address translation table is provided in this embodiment of the invention.

[0073]

[0074] It is understandable that multiple UDP port number ranges can correspond to one VLAN number, and the MAC address corresponding to each UDP port number range is unique.

[0075] The FPGA determines the target UDP port number range to which the UDP port number belongs based on the UDP port number in the Ethernet packet and all UDP port number ranges in the table above. For example, if the UDP port number belongs to the range [K1, K2], which is segment 1, then the VLAN number and MAC address corresponding to segment 1 are obtained, namely VLAN1 and MAC address 1.

[0076] The FPGA modifies the VLAN number in the Ethernet packet to VLAN 1 and the destination MAC address to MAC address 1. This can be understood as VLAN 1 representing the VLAN number of the switching port of the switching chip to which the destination digital processing unit is connected, and MAC address 1 representing the MAC address of the destination digital processing unit.

[0077] The FPAG sends the modified Ethernet packet to the switching chip. The switching chip forwards the packet based on the modified VLAN number and the modified destination MAC address in the Ethernet packet, that is, forwards the packet to the core of the digital processing unit, such as the DSP, in the voice communication device 1 that corresponds to VLAN 1 and MAC address 1.

[0078] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a message forwarding device is given below. Please refer to... Figure 8 , Figure 8 This is a functional block diagram of a message forwarding device 300 provided in an embodiment of the present invention. It should be noted that the message forwarding device 300 provided in this embodiment has the same basic principle and technical effects as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The message forwarding device 300 includes: The parsing module 310 is used to parse the Ethernet packets sent by the receiving switching chip to obtain the VLAN number and UDP port number of the Ethernet packets. The conversion module 330 is used to initiate the packet sending process and modify the VLAN number and MAC address of the Ethernet packet according to the VLAN number and UDP port number before sending the packet; The sending module 350 is used to send the modified Ethernet packet to the switching chip so that the switching chip can forward it.

[0079] Optionally, the parsing module 310 is specifically used to: perform serial-to-parallel conversion on the received Ethernet packets; and parse the converted Ethernet packets to obtain the VLAN number and UDP port number of the Ethernet packets.

[0080] Optionally, the MAC address includes the source MAC address and the destination MAC address. The conversion module 330 is also used to: when the VLAN number includes a sending identifier, modify the VLAN number and source MAC address of the Ethernet packet to the specified sending port number of the voice communication device and the MAC address of the voice communication device, respectively. Optionally, the MAC address includes the source MAC address and the destination MAC address. The conversion module 330 is also used to: when the VLAN number includes a receiving identifier, modify the VLAN number and destination MAC address of the Ethernet packet to the VLAN number and MAC address corresponding to the destination digital processing unit in the voice communication device, respectively, based on the UDP port number.

[0081] Optionally, the FPGA pre-stores multiple mapping relationships for UDP port number ranges. Each mapping relationship includes the VLAN number of the switching port of the switching chip to which the destination digital processing unit is connected, and the MAC address of the destination digital processing unit. The conversion module 330 is further configured to: determine the target UDP port number range to which the UDP port number belongs; modify the VLAN number of the Ethernet packet to the VLAN number of the switching port of the switching chip to which the destination digital processing unit is connected, corresponding to the target UDP port number range; and modify the destination MAC address of the Ethernet packet to the MAC address of the destination digital processing unit, corresponding to the target UDP port number range.

[0082] Optionally, the MAC address includes the source MAC address and the destination MAC address. The conversion module 330 is also used to: if the VLAN number and the source MAC address are modified, the modified Ethernet packet is converted from parallel to serial and then sent to the switching chip so that the switching chip forwards it to other voice communication devices corresponding to the destination MAC address of the Ethernet packet.

[0083] Optionally, the MAC address includes the source MAC address and the destination MAC address. The conversion module 330 is also used to: if the VLAN number and the destination MAC address are modified, then the modified Ethernet packet is converted from parallel to serial and sent to the switching chip, so that the digital processing unit in the voice communication device corresponding to the modified VLAN number and the modified destination MAC address is sent to the switching chip.

[0084] This invention also provides an FPGA for implementing the message forwarding method provided in this invention.

[0085] This invention also provides a voice communication device, including a switching chip and an FPGA provided in this invention.

[0086] This invention also provides a storage medium storing a computer program that, when executed, implements the message forwarding method disclosed in this invention.

[0087] In summary, the message forwarding method, apparatus, FPGA, and voice communication device provided in this invention reduce resource consumption compared to existing technologies. By modifying the MAC address during message transmission time intervals, delays are avoided, meeting the real-time requirements of voice data transmission and achieving efficient message forwarding. Furthermore, the use of identifiers to represent data transmission and reception, along with the modification of VLAN numbers and corresponding MAC addresses based on these identifiers, eliminates the need for dedicated switching chips supporting this function, thus reducing costs.

[0088] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0089] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0090] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0091] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A message forwarding method, characterized in that, An FPGA used in a voice communication device, the voice communication device further including a switching chip electrically connected to the FPGA, the method comprising: The received Ethernet packets sent by the switching chip are parsed to obtain the VLAN number and UDP port number of the Ethernet packets; The message transmission process is initiated, and before sending the message, the VLAN number and MAC address of the Ethernet message are modified according to the VLAN number and the UDP port number; the MAC address includes the source MAC address and the destination MAC address; when the VLAN number includes a sending identifier, the VLAN number and source MAC address of the Ethernet message are modified to the designated sending port number of the voice communication device and the MAC address of the voice communication device, respectively; when the VLAN number includes a receiving identifier, the VLAN number and destination MAC address of the Ethernet message are modified to the VLAN number and MAC address corresponding to the destination digital processing unit in the voice communication device, respectively, according to the UDP port number; The modified Ethernet packet is sent to the switching chip so that the switching chip can forward it.

2. The method according to claim 1, characterized in that, The step of parsing the received Ethernet packets sent by the switching chip to obtain the VLAN number and UDP port number of the Ethernet packets includes: The received Ethernet packets are converted from serial to parallel. The Ethernet packets after serial-to-parallel conversion are parsed to obtain the VLAN number and UDP port number of the Ethernet packets.

3. The method according to claim 1, characterized in that, The FPGA pre-stores a correspondence between multiple UDP port number ranges. Each correspondence includes the VLAN number of the switching port of the switching chip to which the destination digital processing unit is connected and the MAC address of the destination digital processing unit. The step of modifying the VLAN number and destination MAC address of the Ethernet packet according to the UDP port number to the VLAN number and MAC address corresponding to the destination digital processing unit in the voice communication device includes: Determine the target UDP port number range to which the UDP port number belongs; Modify the VLAN number of the Ethernet packet to the VLAN number of the switching port of the switching chip connected to the destination digital processing unit corresponding to the target UDP port number range; The destination MAC address of the Ethernet packet is modified to the MAC address of the destination digital processing unit corresponding to the target UDP port number range.

4. The method according to claim 1, characterized in that, The step of sending the modified Ethernet packet to the switching chip so that the switching chip can forward it includes: If the VLAN number and the source MAC address are modified, the modified Ethernet packet is converted from parallel to serial and then sent to the switching chip, so that the switching chip forwards it to other voice communication devices corresponding to the destination MAC address of the Ethernet packet.

5. The method according to claim 1, characterized in that, The step of sending the modified Ethernet packet to the switching chip so that the switching chip can forward it includes: If the VLAN number and the destination MAC address are modified, the modified Ethernet packet is converted from parallel to serial and then sent to the switching chip, so that the switching chip forwards it to the digital processing unit in the voice communication device corresponding to the modified VLAN number and the modified destination MAC address.

6. A message forwarding device, characterized in that, An FPGA used in a voice communication device, the voice communication device further including a switching chip electrically connected to the FPGA, the device comprising: The parsing module is used to parse the Ethernet packets sent by the receiving switching chip to obtain the VLAN number and UDP port number of the Ethernet packets; The conversion module is used to initiate the packet transmission process and modify the VLAN number and MAC address of the Ethernet packet according to the VLAN number and the UDP port number before sending the packet; the MAC address includes the source MAC address and the destination MAC address; when the VLAN number includes a sending identifier, the VLAN number and the source MAC address of the Ethernet packet are modified to the designated sending port number of the voice communication device and the MAC address of the voice communication device, respectively; when the VLAN number includes a receiving identifier, the VLAN number and the destination MAC address of the Ethernet packet are modified to the VLAN number and MAC address corresponding to the destination digital processing unit in the voice communication device, respectively, according to the UDP port number; The sending module is used to send the modified Ethernet packet to the switching chip so that the switching chip can forward it.

7. An FPGA, characterized in that, The FPGA is used to implement the method according to any one of claims 1 to 5.

8. A voice communication device, characterized in that, The voice communication device includes a switching chip and the FPGA as described in claim 7.

Citation Information

Patent Citations

  • Network equipment

    CN103490961A

  • IP address based UDP relay

    IN4075DEL2012A