Ethernet and optical fiber bus data rate adaptation method and device and electronic equipment

By performing protocol conversion and cache management of Ethernet and fiber bus data in gateway devices, data loss or congestion caused by mismatch in the transmission rate of the two is solved, and more efficient and reliable data transmission is achieved, improving the performance of the network system.

CN119583670APending Publication Date: 2025-03-07AVIC GENERAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411821324.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In gateway devices, data loss or congestion is caused due to mismatch in transmission rates of Ethernet and fiber buses.

Method used

By converting the data of the Ethernet protocol into data of the fiber bus protocol and managing it in the data buffer area, the transmission conditions are determined according to the flow control mechanism to ensure efficient transmission of data between networks of different rates.

Benefits of technology

It effectively solves the data loss or congestion caused by transmission rate mismatch, improves the efficiency and reliability of data transmission, and thus improves the performance of the entire network system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583670A_ABST
    Figure CN119583670A_ABST
Patent Text Reader

Abstract

The invention relates to an Ethernet and optical fiber bus data rate adaptation method and device and electronic equipment, and the method comprises the steps: converting the data of an Ethernet protocol into the data of an optical fiber bus protocol according to a communication protocol conversion algorithm; storing the converted data in a data cache region, and determining a sending condition according to a flow control mechanism; and in response to the condition that the rate of the optical fiber bus end meets the sending condition, taking out the data from the cache region, and sending the data to the optical fiber bus equipment. According to the Ethernet and optical fiber bus data rate adaptation method and apparatus, and the electronic device, by implementing a data caching and flow control mechanism, the efficiency and reliability of data transmission can be improved, so that the performance of the whole network system is improved, and meanwhile, the data transmission efficiency is improved. The problem of data loss or congestion caused by mismatching of transmission rates between the Ethernet and the optical fiber bus can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Ethernet and optical fiber bus transmission, and in particular to a method, device and electronic equipment for adapting data rates of Ethernet and optical fiber bus. Background Art

[0002] Currently, there may be large differences in transmission rate and bandwidth between Ethernet and fiber optic bus. Ethernet usually has a higher transmission rate, which can reach Gigabit or even higher, while the rate of fiber optic bus depends on the specific application scenario and standard, which may lead to a mismatch between the two. In gateway devices, data needs to be transmitted between networks with different rates, and data loss or congestion often occurs due to rate mismatch. Therefore, it needs to be improved. Summary of the invention

[0003] Based on this, it is necessary to provide an Ethernet and fiber optic bus data rate adaptation method, device and electronic device to address the problem that data transmission needs to be carried out between networks with different speeds in gateway devices, and data loss or congestion often occurs due to rate mismatch.

[0004] The present invention provides a method for adapting data rates between Ethernet and optical fiber bus, the method comprising: According to the communication protocol conversion algorithm, the data of the Ethernet protocol is converted into the data of the optical fiber bus protocol; The converted data is stored in the data buffer area, and the sending conditions are determined according to the flow control mechanism; In response to the rate at the optical fiber bus end satisfying the sending condition, the data is taken out from the buffer area and sent to the optical fiber bus device.

[0005] In one embodiment, converting Ethernet protocol data into optical fiber bus protocol data according to a communication protocol conversion algorithm includes: Obtain Ethernet data packets and identify the format and content of Ethernet data packets; According to the protocol specification of the optical fiber bus, the structure of the data packet is reconstructed, and the reconstructed data packet is verified; The verified data packet is encapsulated into the data format required by the optical fiber bus protocol.

[0006] In one embodiment, the step of reconstructing the structure of the data packet according to the protocol specification of the optical fiber bus includes: Based on the protocol specification of the optical fiber bus, some specific protocol fields are added or deleted, or the header information of the data packet is modified, or the layout of the data load is adjusted.

[0007] In one embodiment, storing the converted data in a data buffer area includes: Obtain the converted data and identify the data transmission rate; In response to the current rate of the optical fiber bus being difficult to match the rate of the Ethernet, the data is temporarily stored in the buffer area; Mark the newly arrived data and record the time when it enters the cache; Sort the data according to its priority or the order in which it arrives; In response to the usage of the cache area reaching a preset threshold, the cache cleaning mechanism is triggered, and data that has not been used for a long time is eliminated according to the LRU algorithm.

[0008] In one embodiment, determining the sending condition according to the flow control mechanism includes: Initialize the window size based on the receiver's processing power and network conditions; Send packets until the window size limit is reached; Receives data packets and sends confirmation information and the current receive buffer status to the sender; Adjust the window size based on the received confirmation information and the status of the receive buffer.

[0009] In one of the embodiments, determining the sending condition according to the flow control mechanism further includes: Acquire network status parameters, wherein the network status parameters include round trip time, packet loss rate, and available bandwidth; In response to abnormal network status parameters, updating the window size; Or, based on a preset period, the window size is updated periodically.

[0010] In one embodiment, in response to the rate of the optical fiber bus end satisfying the sending condition, taking the data out of the buffer area and sending the data to the optical fiber bus device includes: Get the real-time transmission rate of the optical fiber bus; Compare the transmission rate of the optical fiber bus with the waiting rate of data in the buffer area; In response to the rate at the optical fiber bus end matching or exceeding the rate of the data to be sent in the buffer, selecting the frontmost data packet from the buffer; Sending data packets to the fiber optic bus device at a predetermined rate; Identify the transmission status during data transmission and receive feedback information from fiber optic bus devices.

[0011] The present invention also provides an Ethernet and optical fiber bus data rate adaptation device, comprising: A conversion module, used for converting Ethernet protocol data into optical fiber bus protocol data according to a communication protocol conversion algorithm; A storage module, used for storing the converted data in a data buffer area and determining a sending condition according to a flow control mechanism; The response module is used for taking data out of the buffer area and sending the data to the optical fiber bus device in response to the rate of the optical fiber bus end meeting the sending condition.

[0012] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the Ethernet and optical fiber bus data rate adaptation method as described in any one of the above is implemented.

[0013] The present invention also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for adapting the data rate between Ethernet and optical fiber bus as described above is implemented.

[0014] The above-mentioned Ethernet and optical fiber bus data rate adaptation method, device and electronic device can improve the efficiency and reliability of data transmission by implementing data caching and flow control mechanisms, thereby improving the performance of the entire network system. At the same time, it can effectively solve the data loss or congestion problem caused by the mismatch of transmission rates between Ethernet and optical fiber buses. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to 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 any creative work.

[0016] Figure 1 The figure is a flow chart of a method for adapting Ethernet and optical fiber bus data rates in one embodiment; Figure 2 A schematic diagram of a data conversion process in one embodiment; Figure 3 A schematic diagram of a process of storing converted data in a data buffer area in an embodiment; Figure 4 A schematic diagram of a flow chart of determining a sending condition according to a flow control mechanism in an embodiment; Figure 5 is a schematic diagram of a process of updating a window size in one embodiment; Figure 6 A schematic diagram of a process of sending data to an optical fiber bus device in one embodiment; Figure 7 It is a schematic diagram of the structure of an Ethernet and optical fiber bus data rate adaptation device in one embodiment; Figure 8 The figure is a diagram showing the internal structure of an electronic device according to an embodiment. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments 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.

[0018] Combine the following Figure 1-Figure 8 The present invention describes the Ethernet and optical fiber bus data rate adaptation method, device and electronic equipment.

[0019] like Figure 1 As shown, in one embodiment, a method for adapting Ethernet and optical fiber bus data rates comprises the following steps: Step S100, converting Ethernet protocol data into optical fiber bus protocol data according to a communication protocol conversion algorithm.

[0020] The core function of the communication protocol conversion algorithm is to convert the PDU (Protocol Data Unit) format used by Ethernet into the PDU format recognizable by the optical fiber bus. By converting the Ethernet protocol data into the optical fiber bus protocol data, it ensures that the data can be transmitted efficiently and accurately between different networks, and also improves the compatibility and stability of the entire network system.

[0021] Step S200, storing the converted data in a data buffer area, and determining the sending conditions according to the flow control mechanism.

[0022] For example, suppose the Ethernet end sends 100 data packets continuously, but the processing rate of the optical fiber bus end can only support 10 data packets per second.

[0023] The gateway device stores these 100 data packets in a buffer area and manages them according to the FIFO algorithm.

[0024] After the flow control module monitors the optical fiber bus rate, it calculates the sending timing of each data packet.

[0025] When the optical fiber bus is ready to receive data, the gateway device takes the data packet from the buffer and sends the data according to the calculated sending timing.

[0026] By storing the converted data in the data buffer and determining the sending conditions according to the flow control mechanism, it is possible to effectively manage data transmission between different network interfaces, avoid data loss or network congestion due to rate mismatch, and improve the performance and reliability of the entire network system.

[0027] Step S300, in response to the rate of the optical fiber bus end satisfying the sending condition, the data is taken out from the buffer area and sent to the optical fiber bus device.

[0028] Sending data to the fiber optic bus device through the fiber optic bus interface can ensure the efficiency and reliability of the data transmission process. At the same time, the data transmission rate is dynamically adjusted according to the real-time processing capability of the fiber optic bus. This adjustment mechanism can ensure that the data transmission matches the capabilities of the receiving end and avoid data loss due to rate mismatch.

[0029] The data rate adaptation method for Ethernet and optical fiber bus can improve the efficiency and reliability of data transmission by implementing data caching and flow control mechanisms, thereby improving the performance of the entire network system. At the same time, it can effectively solve the data loss or congestion problem caused by the mismatch of transmission rates between Ethernet and optical fiber bus.

[0030] In this embodiment, see Figure 2 , according to the communication protocol conversion algorithm, the data of the Ethernet protocol is converted into the data of the optical fiber bus protocol, including the following steps: Step S110, obtaining an Ethernet data packet, and identifying the format and content of the Ethernet data packet.

[0031] After receiving a data packet from Ethernet, the gateway device first analyzes the Ethernet frame header of the data packet and extracts information such as the destination address, source address, and type field.

[0032] Step S120, reconstructing the structure of the data packet according to the protocol specification of the optical fiber bus, and verifying the reconstructed data packet.

[0033] Based on the extracted information, the gateway device builds a new data frame with reference to the protocol standard of the optical fiber bus. This step is particularly important if the optical fiber bus protocol and the Ethernet protocol have significant differences in data encapsulation.

[0034] Step S130, encapsulating the verified data packet into the data format required by the optical fiber bus protocol.

[0035] By verifying the new data frame, the integrity and correctness of the data are ensured.

[0036] In this embodiment, according to the protocol specification of the optical fiber bus, the structure of the data packet is reconstructed, including the following steps: Step S121, based on the protocol specification of the optical fiber bus, adding or deleting certain specific protocol fields, or modifying the header information of the data packet, or adjusting the layout of the data load.

[0037] For example, adding a security authentication field to the fiber optic bus protocol makes it easier to ensure that the source of the data is credible.

[0038] Deleting the unused status field can shorten the data packet length and reduce bandwidth usage.

[0039] Modify the header design to allow dynamic addition of optional fields, thus enhancing the flexibility of the protocol.

[0040] Placing real-time data at the beginning of the load optimizes the data load sequence and improves real-time performance.

[0041] In this embodiment, see Figure 3 , storing the converted data in the data buffer area, including the following steps: Step S211, acquiring the converted data and identifying the transmission rate of the data.

[0042] This facilitates subsequent comparison of the current rate of the fiber optic bus and the data transmission rate in the buffer area.

[0043] Step S212: In response to the current rate of the optical fiber bus being difficult to match the rate of the Ethernet, the data is temporarily stored in a buffer area.

[0044] A data cache area is set up, which consists of a storage space of a certain size and can dynamically adjust its capacity according to the needs of data transmission.

[0045] When the Ethernet interface receives data, the data is first checked for its transmission rate. If the current rate of the fiber bus cannot match the rate of the Ethernet, the data will be temporarily stored in the buffer.

[0046] The specific data caching steps are as follows: After the data packet arrives at the Ethernet interface, it is parsed by the protocol and temporarily stored in the data buffer.

[0047] The cache management module inserts the data packet into the appropriate location according to its characteristics. The following is a simplified insertion process: Insert(data,cache), Among them, data represents the data packet to be cached, and cache represents the cache area.

[0048] Step S213, marking the newly arrived data and recording the time when the data enters the buffer area.

[0049] Marking newly arrived data and recording the time when it enters the cache is an effective cache management and flow control strategy, which can significantly optimize the data processing process and improve system efficiency.

[0050] Step S214, sorting the data according to the priority of the data or the order of arrival.

[0051] By sorting the data, it is convenient to ensure that the data that needs to be processed most is transmitted first.

[0052] Step S215, in response to the usage of the cache area reaching a preset threshold, a cache cleaning mechanism is triggered, and data that has not been used for a long time is eliminated according to the LRU algorithm.

[0053] By setting up a cache cleaning mechanism, you can effectively improve system performance and resource utilization.

[0054] In this embodiment, see Figure 4 , determine the sending conditions according to the flow control mechanism, including the following steps: Step S221, initializing the window size based on the processing capability of the receiver and the network status.

[0055] Assuming W is the window size, C is the processing capacity of the receiver, and S is the sending rate of the sender, the goal of flow control is to minimize the following formula: ,in, Indicates the difference between the sender's sending rate and the receiver's processing capacity.

[0056] This difference should be as small as possible to avoid data congestion.

[0057] Step S222, sending data packets until the window size limit is reached.

[0058] Send as much data as possible without exceeding the window size. On the one hand, it can ensure that network resources (such as bandwidth) are fully utilized. At the same time, window control allows data to continue to be sent before waiting for confirmation, reducing the impact of the round-trip delay of a single data packet on the overall transmission rate. On the other hand, the window size serves as a rate control parameter on the sender to prevent network congestion and buffer overflow on the receiver.

[0059] Step S223, receiving the data packet, and sending confirmation information and the current receiving buffer status to the sender.

[0060] By receiving data packets and sending confirmation information and receiving buffer status, it can not only ensure the reliability of data transmission, but also achieve flow control, avoid buffer overflow at the receiving end, and optimize the use of network resources. This mechanism is crucial in all kinds of network communications, especially for high-latency and large-bandwidth network scenarios, which can effectively reduce packet loss, control delays, and improve overall transmission efficiency.

[0061] Step S224, adjusting the window size according to the received confirmation information and the status of the receiving buffer.

[0062] If the receiver processes quickly, the window size can be increased, otherwise it can be reduced.

[0063] Specific application examples are as follows: Assume that the initial window size W is set to 10 packets.

[0064] The sender starts sending data at a maximum rate of 10 packets / second.

[0065] The receiver can process 8 packets per second and feed back to the sender.

[0066] After receiving the feedback, the sender adjusts the window size to 8 packets.

[0067] The sender then sends data at a rate of 8 packets / second until the receiver again reports a change in its processing power.

[0068] In this embodiment, see Figure 5 , determining the sending conditions according to the flow control mechanism, and further comprising the following steps: Step S225, obtaining network status parameters, which include round trip time, packet loss rate and available bandwidth.

[0069] By analyzing network status parameters, it is convenient to dynamically adjust the window size.

[0070] Step S226: In response to the network status parameter being abnormal, update the window size.

[0071] The specific examples are as follows: When packets are lost, the window is reduced; when things return to normal, the window is gradually increased.

[0072] When network latency increases, the window is reduced to avoid congestion; when network latency decreases, the window is increased to improve throughput.

[0073] Dynamically adjust window size using bandwidth estimation.

[0074] Or, step S227, regularly updating the window size based on a preset period.

[0075] At regular intervals, the window size is updated based on historical data or network measurements.

[0076] In this embodiment, see Figure 6 , in response to the rate of the optical fiber bus end meeting the sending condition, taking the data out of the buffer area and sending the data to the optical fiber bus device, including the following steps: Step S310, obtaining the real-time transmission rate of the optical fiber bus.

[0077] Through the built-in rate monitoring module of the gateway device, the processing capacity information of the optical fiber bus can be obtained in real time.

[0078] Step S320, comparing the transmission rate of the optical fiber bus with the waiting transmission rate of the data in the buffer area.

[0079] By comparing the transmission rate of the optical fiber bus with the waiting sending rate of the data in the buffer area, it is convenient to determine whether to trigger the sending process.

[0080] Step S330, in response to the rate at the optical fiber bus end matching or exceeding the rate of the data to be sent in the buffer, selecting the frontmost data packet from the buffer.

[0081] It is convenient to ensure smooth and efficient data transmission, avoid buffer overflow and reduce delay. This strategy can adapt to changes in fiber network bandwidth, optimize the use of system resources, and improve system stability and transmission efficiency. Step S340, sending the data packet to the optical fiber bus device at a predetermined rate.

[0082] Through the optical fiber bus interface, data packets are sent out at a predetermined rate, which improves the stability of data transmission.

[0083] Step S350, identifying the transmission status during data transmission, and receiving feedback information from the optical fiber bus device.

[0084] In this way, not only the efficiency of data transmission is improved, but also the reliability of data transmission is improved through dynamic rate adjustment and real-time monitoring of the transmission status during data transmission.

[0085] The Ethernet and optical fiber bus data rate adaptation device provided by the present invention is described below. The Ethernet and optical fiber bus data rate adaptation device described below and the Ethernet and optical fiber bus data rate adaptation method described above can be referred to each other.

[0086] like Figure 7 As shown, in one embodiment, an Ethernet and fiber bus data rate adaptation device includes a conversion module 710, a storage module 720 and a response module 730.

[0087] The conversion module 710 is used to convert the Ethernet protocol data into the optical fiber bus protocol data according to the communication protocol conversion algorithm.

[0088] The storage module 720 is used to store the converted data in the data buffer area and determine the sending conditions according to the flow control mechanism.

[0089] The response module 730 is used to take out the data from the buffer area and send the data to the optical fiber bus device in response to the rate of the optical fiber bus end meeting the sending condition.

[0090] In this embodiment, the conversion module 710 is specifically used for: Obtain Ethernet data packets and identify the format and content of Ethernet data packets; According to the protocol specification of the optical fiber bus, the structure of the data packet is reconstructed, and the reconstructed data packet is verified; The verified data packet is encapsulated into the data format required by the optical fiber bus protocol.

[0091] In this embodiment, according to the protocol specification of the optical fiber bus, the structure of the data packet is reconstructed, specifically for: Based on the protocol specification of the optical fiber bus, some specific protocol fields are added or deleted, or the header information of the data packet is modified, or the layout of the data load is adjusted.

[0092] In this embodiment, the converted data is stored in the data buffer area, specifically used for: Obtain the converted data and identify the data transmission rate; In response to the current rate of the optical fiber bus being difficult to match the rate of the Ethernet, the data is temporarily stored in the buffer area; Mark the newly arrived data and record the time when it enters the cache; Sort the data according to its priority or the order in which it arrives; In response to the usage of the cache area reaching a preset threshold, the cache cleaning mechanism is triggered, and data that has not been used for a long time is eliminated according to the LRU algorithm.

[0093] In this embodiment, the sending condition is determined according to the flow control mechanism, specifically for: Initialize the window size based on the receiver's processing power and network conditions; Send packets until the window size limit is reached; Receives data packets and sends confirmation information and the current receive buffer status to the sender; Adjust the window size based on the received confirmation information and the status of the receive buffer.

[0094] In this embodiment, the sending condition is determined according to the flow control mechanism, and is also specifically used for: Obtain network status parameters, including round-trip time, packet loss rate, and available bandwidth; In response to abnormal network status parameters, updating the window size; Or, based on a preset period, the window size is updated periodically.

[0095] In this embodiment, the response module 730 is specifically used for: Get the real-time transmission rate of the optical fiber bus; Compare the transmission rate of the optical fiber bus with the waiting rate of data in the buffer area; In response to the rate at the optical fiber bus end matching or exceeding the rate of the data to be sent in the buffer, selecting the frontmost data packet from the buffer; Sending data packets to the fiber optic bus device at a predetermined rate; Identify the transmission status during data transmission and receive feedback information from fiber optic bus devices.

[0096] The Ethernet and optical fiber bus data rate adapter can improve the efficiency and reliability of data transmission by implementing data caching and flow control mechanisms, thereby improving the performance of the entire network system. At the same time, it can effectively solve the data loss or congestion problem caused by the mismatch of transmission rates between Ethernet and optical fiber buses.

[0097] Figure 8 The physical structure diagram of an electronic device is shown as an example. The electronic device may be a smart terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The electronic device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for adapting the data rate of Ethernet and optical fiber bus is implemented, and the method includes: According to the communication protocol conversion algorithm, the data of the Ethernet protocol is converted into the data of the optical fiber bus protocol; The converted data is stored in the data buffer area, and the sending conditions are determined according to the flow control mechanism; In response to the rate at the optical fiber bus end satisfying the sending condition, the data is taken out from the buffer area and sent to the optical fiber bus device.

[0098] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation on the electronic device to which the scheme of the present invention is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0099] On the other hand, the present invention also provides a computer storage medium storing a computer program, which implements a method for adapting Ethernet and optical fiber bus data rates when the computer program is executed by a processor, the method comprising: According to the communication protocol conversion algorithm, the data of the Ethernet protocol is converted into the data of the optical fiber bus protocol; The converted data is stored in the data buffer area, and the sending conditions are determined according to the flow control mechanism; In response to the rate at the optical fiber bus end satisfying the sending condition, the data is taken out from the buffer area and sent to the optical fiber bus device.

[0100] In another aspect, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, a method for adapting Ethernet and optical fiber bus data rates is implemented, the method comprising: According to the communication protocol conversion algorithm, the data of the Ethernet protocol is converted into the data of the optical fiber bus protocol; The converted data is stored in the data buffer area, and the sending conditions are determined according to the flow control mechanism; In response to the rate at the optical fiber bus end satisfying the sending condition, the data is taken out from the buffer area and sent to the optical fiber bus device.

[0101] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.

[0102] By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0103] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0104] The above-described embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A method for adapting data rates between Ethernet and optical fiber bus, characterized in that: The method comprises: According to the communication protocol conversion algorithm, the data of the Ethernet protocol is converted into the data of the optical fiber bus protocol; The converted data is stored in the data buffer area, and the sending conditions are determined according to the flow control mechanism; In response to the rate at the optical fiber bus end satisfying the sending condition, the data is taken out from the buffer area and sent to the optical fiber bus device.

2. The method for adapting Ethernet and optical fiber bus data rates according to claim 1, characterized in that: The method of converting the Ethernet protocol data into the optical fiber bus protocol data according to the communication protocol conversion algorithm includes: Obtain Ethernet data packets and identify the format and content of Ethernet data packets; According to the protocol specification of the optical fiber bus, the structure of the data packet is reconstructed, and the reconstructed data packet is verified; The verified data packet is encapsulated into the data format required by the optical fiber bus protocol.

3. The method for adapting Ethernet and optical fiber bus data rates according to claim 2, characterized in that: The step of reconstructing the structure of the data packet according to the protocol specification of the optical fiber bus includes: Based on the protocol specification of the optical fiber bus, some specific protocol fields are added or deleted, or the header information of the data packet is modified, or the layout of the data load is adjusted.

4. The method for adapting Ethernet and optical fiber bus data rates according to claim 3, characterized in that: The storing of the converted data in the data buffer area comprises: Obtain the converted data and identify the data transmission rate; In response to the current rate of the optical fiber bus being difficult to match the rate of the Ethernet, the data is temporarily stored in the buffer area; Mark the newly arrived data and record the time when it enters the cache; Sort the data according to its priority or the order in which it arrives; In response to the usage of the cache area reaching a preset threshold, the cache cleaning mechanism is triggered, and data that has not been used for a long time is eliminated according to the LRU algorithm.

5. The method for adapting Ethernet and optical fiber bus data rates according to claim 4, characterized in that: The determining of the sending condition according to the flow control mechanism includes: Initialize the window size based on the receiver's processing power and network conditions; Send packets until the window size limit is reached; Receives data packets and sends confirmation information and the current receive buffer status to the sender; Adjust the window size based on the received confirmation information and the status of the receive buffer.

6. The method for adapting data rates between Ethernet and optical fiber bus according to claim 5, characterized in that: The determining of the sending condition according to the flow control mechanism also includes: Acquire network status parameters, wherein the network status parameters include round trip time, packet loss rate, and available bandwidth; In response to abnormal network status parameters, updating the window size; Or, based on a preset period, the window size is updated periodically.

7. The method for adapting data rates between Ethernet and optical fiber bus according to any one of claims 1 to 6, characterized in that: In response to the rate of the optical fiber bus end meeting the sending condition, taking the data out of the buffer area and sending the data to the optical fiber bus device includes: Get the real-time transmission rate of the optical fiber bus; Compare the transmission rate of the optical fiber bus with the waiting rate of data in the buffer area; In response to the rate at the optical fiber bus end matching or exceeding the rate of the data to be sent in the buffer, selecting the frontmost data packet from the buffer; Sending data packets to the fiber optic bus device at a predetermined rate; Identify the transmission status during data transmission and receive feedback information from fiber optic bus devices.

8. An Ethernet and optical fiber bus data rate adaptation device, characterized in that: include: A conversion module, used for converting Ethernet protocol data into optical fiber bus protocol data according to a communication protocol conversion algorithm; A storage module, used for storing the converted data in a data buffer area and determining a sending condition according to a flow control mechanism; The response module is used for taking data out of the buffer area and sending the data to the optical fiber bus device in response to the rate of the optical fiber bus end meeting the sending condition.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for adapting the data rate between Ethernet and optical fiber bus according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for adapting the data rate between Ethernet and optical fiber bus according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Heterogeneous-network-oriented fiber sensing embedded adapter apparatus and system thereof, and construction method thereof

    CN105471863A

  • FC-EG gateway and communication conversion method between optical fiber channel and Ethernet

    CN106789609A

  • Flow control method based on window prediction

    CN110535781A

  • Metadata cache elimination method based on multi-level b + tree

    CN116303586A

  • Self-adaptive adjustment caching method and system based on LRU differentiation

    CN116467353A