CN110138505B - CRC calculation method and system for heterogeneous protocol conversion - Google Patents

CRC calculation method and system for heterogeneous protocol conversion Download PDF

Info

Publication number
CN110138505B
CN110138505B CN201910247526.2A CN201910247526A CN110138505B CN 110138505 B CN110138505 B CN 110138505B CN 201910247526 A CN201910247526 A CN 201910247526A CN 110138505 B CN110138505 B CN 110138505B
Authority
CN
China
Prior art keywords
converted
data
data packet
crc
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910247526.2A
Other languages
Chinese (zh)
Other versions
CN110138505A (en
Inventor
张丽
沈剑良
李沛杰
刘勤让
刘冬培
张霞
陈艇
赵博
张文建
董春雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Information Engineering University of PLA Strategic Support Force
Original Assignee
Information Engineering University of PLA Strategic Support Force
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Information Engineering University of PLA Strategic Support Force filed Critical Information Engineering University of PLA Strategic Support Force
Priority to CN201910247526.2A priority Critical patent/CN110138505B/en
Publication of CN110138505A publication Critical patent/CN110138505A/en
Application granted granted Critical
Publication of CN110138505B publication Critical patent/CN110138505B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention provides a CRC calculation method and a CRC calculation system for heterogeneous protocol conversion, which relate to the technical field of data processing and comprise the following steps: acquiring an initial protocol data packet to be converted; decoding the initial protocol data packet to be converted, and verifying whether the initial protocol data packet to be converted is transmitted correctly or not based on a decoding result; if the initial protocol data packet to be converted is correctly transmitted, modifying operation is performed on packet header data in the initial protocol data packet to be converted based on a target protocol conversion requirement to obtain an intermediate protocol data packet to be converted, wherein the modifying operation comprises at least one of the following operations: adding data operation, deleting data operation and replacing data operation; and calculating a CRC (cyclic redundancy check) value of the intermediate protocol data packet to be converted, and updating the CRC value into the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted. The method solves the technical problems of long time consumption and low heterogeneous protocol conversion efficiency in CRC coding calculation of heterogeneous protocol conversion in the prior art.

Description

CRC calculation method and system for heterogeneous protocol conversion
Technical Field
The invention relates to the technical field of data processing, in particular to a CRC calculation method and system for heterogeneous protocol conversion.
Background
The heterogeneous protocol conversion usually involves multiple network protocols, such as an ethernet protocol, an FC protocol (fibre Channel, and RapidIO protocol), and during the protocol conversion process, conversion between several protocols may be involved, such as conversion from the ethernet protocol to the RapidIO protocol, which involves how to complete mapping of data frame format bit fields between different protocols, and then, operations of adding, deleting, and changing data information such as packet headers of received data packets are required to complete packet splicing and unpacking. A cyclic redundancy check method is adopted in a cross heterogeneous protocol exchange system to ensure the correctness of data in the transmission process. The Cyclic Redundancy Check (CRC) Code adopts polynomial coding, such as common coding and decoding methods of CRC-16, CRC-32, and the like. At present, for high-speed network communication, a serial mode is difficult to process in real time, so that CRC (Cyclic redundancy check) codecs mostly adopt a parallel implementation method.
In the cross-heterogeneous protocol switching system, a receiving end receives a data packet, adds, deletes or changes some packet headers and other information according to switching requirements to generate a new data packet, and then transmits the new data packet to a transmitting end through switching, and the transmitting end performs CRC coding calculation on the received new data packet again and then transmits the new data packet to corresponding switching equipment or terminal equipment. Thus, there is a situation that the sending end needs to perform the CRC coding calculation again on the data packet, for example, the length of the data frame payload of the FC protocol is maximum 2096 bytes, if the CRC coding calculation is performed on all the data frames again, it will take a long time, and the delay is large, thereby increasing the cost of the system and reducing the efficiency of the switching system transmission.
No effective solution has been proposed to the above problems.
Disclosure of Invention
In view of the above, the present invention provides a CRC calculation method and system for heterogeneous protocol conversion, so as to alleviate the technical problems of long time consumption and low efficiency of heterogeneous protocol conversion when performing CRC coding calculation for heterogeneous protocol conversion in the prior art.
In a first aspect, an embodiment of the present invention provides a CRC calculation method for heterogeneous protocol conversion, where the method includes: acquiring an initial protocol data packet to be converted; decoding the initial protocol data packet to be converted, and verifying whether the initial protocol data packet to be converted is transmitted correctly or not based on a decoding result; if the initial protocol data packet to be converted is correctly transmitted, modifying packet header data in the initial protocol data packet to be converted based on a target protocol conversion requirement to obtain an intermediate protocol data packet to be converted, wherein the modifying operation comprises at least one of the following operations: adding data operation, deleting data operation and replacing data operation; and calculating a CRC (cyclic redundancy check) value of the intermediate protocol data packet to be converted, and updating the CRC value into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
Further, if the modification operation is an operation of adding data or deleting data; calculating a CRC value of the intermediate protocol data packet to be converted, and updating the CRC value into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted, wherein the CRC value comprises the following steps: based on a CRC generation principle, acquiring first data information generated when the modification operation is executed on the packet header data; calculating a CRC check value of the first data information; and updating the CRC value of the first data information to the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted.
Further, if the modification operation is a replacement data operation; based on the target protocol conversion requirement, modifying the header data in the protocol data packet to be converted which is transmitted correctly, and obtaining an intermediate protocol data packet to be converted comprises: deleting the packet header data based on the target protocol conversion requirement; and adding target data into the initial protocol data packet to be converted with correct transmission to obtain a target protocol data packet to be converted, wherein the target data is data for replacing the packet header data.
Further, if the modification operation is a replacement data operation; calculating a CRC value of the packet header data, and updating the CRC value to the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted, wherein the CRC value comprises the following steps: based on a CRC generation principle, second data information generated when the header data is deleted and third data information generated when the target data is added are obtained; calculating a CRC value of the second data information and a CRC value of the third data information;
and updating the CRC value of the second data information and the CRC value of the third data information into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted. Further, the method further comprises: sending the target protocol data packet to be converted to target equipment, wherein the target equipment comprises: switching equipment and terminal equipment.
In a second aspect, an embodiment of the present invention provides a CRC calculation system for heterogeneous protocol conversion, where the system includes: the device comprises a data receiver, a CRC decoder, a protocol converter and CRC calculation equipment, wherein the data receiver is used for acquiring a protocol data packet to be converted; the CRC decoder is used for decoding the protocol data packet to be converted and verifying whether the protocol data packet to be converted is transmitted correctly or not based on a decoding result; the protocol converter is configured to, if the initial protocol data packet to be converted is correctly transmitted, perform a modification operation on packet header data in the initial protocol data packet to be converted based on a target protocol conversion requirement, to obtain an intermediate protocol data packet to be converted, where the modification operation includes at least one of: adding data operation, deleting data operation and replacing data operation; and the CRC calculation equipment is used for calculating a CRC check value of the intermediate protocol data packet to be converted, and updating the CRC check value into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
Further, the CRC calculation device is configured to, in a case that the modification operation is an add data operation or a delete data operation, obtain, based on a CRC generation principle, first data information generated when the modification operation is performed on the header data; calculating a CRC check value of the first data information; and updating the CRC value of the first data information to the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted.
Further, the protocol converter is configured to delete the packet header data based on the target protocol conversion requirement if the modification operation is a replace data operation; and adding target data into the initial protocol data packet to be converted with correct transmission to obtain a target protocol data packet to be converted, wherein the target data is data for replacing the packet header data.
Further, the CRC calculation device is configured to, based on a CRC generation principle, obtain second data information generated when the header data is deleted and obtain third data information generated when the target data is added, in a case where the modification operation is a replacement data operation; and updating the CRC value of the second data information and the CRC value of the third data information into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
Further, the system further comprises: a transmitter, configured to transmit the target protocol packet to be converted to a target device, where the target device includes: switching equipment and terminal equipment.
In the embodiment of the invention, an initial protocol data packet to be converted is obtained; decoding the initial protocol data packet to be converted, and verifying whether the initial protocol data packet to be converted is transmitted correctly or not based on a decoding result; if the initial protocol data packet to be converted is correctly transmitted, modifying operation is performed on packet header data in the initial protocol data packet to be converted based on a target protocol conversion requirement to obtain an intermediate protocol data packet to be converted, wherein the modifying operation comprises at least one of the following operations: adding data operation, deleting data operation and replacing data operation; and calculating a CRC (cyclic redundancy check) value of the intermediate protocol data packet to be converted, and updating the CRC value into the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted.
In the embodiment, when performing CRC code calculation for heterogeneous protocol conversion, the purpose of performing CRC code calculation for heterogeneous protocol conversion only by performing CRC code calculation on modified header data in CRC code calculation for heterogeneous protocol conversion is achieved by calculating a CRC check value of an intermediate protocol data packet to be converted and updating the CRC check value into the intermediate protocol data packet to be converted, so that the technical problems of long time consumption and low heterogeneous protocol conversion efficiency in CRC code calculation for heterogeneous protocol conversion in the prior art are solved, and the technical effect of improving the efficiency of heterogeneous protocol conversion is achieved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a CRC calculation method for heterogeneous protocol conversion according to an embodiment of the present invention;
fig. 2 is a flowchart of another CRC calculation method for heterogeneous protocol conversion according to an embodiment of the present invention;
FIG. 3 is a diagram of a CRC calculation system for heterogeneous protocol conversion according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another CRC calculation system for heterogeneous protocol conversion according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
in accordance with an embodiment of the present invention, there is provided an embodiment of a CRC calculation method for heterogeneous protocol conversion, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that herein.
Fig. 1 is a flowchart of a CRC calculation method for heterogeneous protocol conversion according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, acquiring an initial protocol data packet to be converted;
step S104, decoding the initial protocol data packet to be converted, and verifying whether the initial protocol data packet to be converted is transmitted correctly based on a decoding result;
step S106, if the initial protocol data packet to be converted is correctly transmitted, modifying the header data in the initial protocol data packet to be converted based on the target protocol conversion requirement to obtain an intermediate protocol data packet to be converted, wherein the modifying operation includes at least one of the following operations: adding data operation, deleting data operation and replacing data operation;
step S108, calculating a CRC value of the intermediate protocol data packet to be converted, and updating the CRC value into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
In the invention, when CRC coding calculation of heterogeneous protocol conversion is carried out, the CRC check value of the protocol data packet to be converted in the middle is calculated, and the CRC check value is updated to the protocol data packet to be converted in the middle to obtain the target protocol data packet to be converted, so that the aim of carrying out CRC coding calculation on modified packet header data only in the CRC coding calculation of heterogeneous protocol conversion is achieved, and the technical problems of longer time consumption and lower heterogeneous protocol conversion efficiency in the CRC coding calculation of heterogeneous protocol conversion in the prior art are solved, thereby realizing the technical effect of improving the efficiency of heterogeneous protocol conversion.
It should be noted that, since the CRC check value of the intermediate protocol data packet to be converted in step S106 is not updated, the CRC check value of the intermediate protocol data packet to be converted in step S106 is the same as the CRC check value of the initial protocol data packet to be converted.
It should be noted that, since a plurality of network protocols, such as an ethernet protocol, an FC protocol (Fiber Channel, fibre Channel, etc.), a RapidIO protocol, are usually involved in the heterogeneous protocol conversion, in the protocol conversion process, conversion between several protocols may be involved, such as conversion from the ethernet protocol to the RapidIO protocol, which relates to how to complete mapping of data frame format bit fields between different protocols, and therefore, operations of adding, deleting, and replacing data information, such as a header of a received data packet, etc., are required.
In addition, it should be noted that a cyclic redundancy check method may be used in the process of performing heterogeneous protocol conversion to ensure the correctness of data during transmission. The Cyclic Redundancy Check (CRC) Code adopts polynomial coding, such as common coding and decoding methods of CRC-16, CRC-32, and the like.
The header data is related to the type of protocol, and the header contents of different protocols are different. The heterogeneous protocol conversion is realized by splitting a protocol frame and mapping part of information such as a packet header to related information of another protocol frame, i.e. mapping and converting addresses, priorities and the like in the protocol packet header are required, and data loads are not changed. Specific packets are analyzed per protocol as follows.
Typical packet formats of the RapidIO protocol are Nwrite packets, wherein Data is a Data payload; an identifier used to uniquely identify the acknowledgment control symbol of the packet by ackID; prio indicates packet priority for flow control; the tt field determines the length and position of the destination ID and the source ID; ftype determines the type of packet; transaction indicates the Transaction type; destination ID represents a Destination ID; source ID represents a source ID; when protocol conversion is carried out, partial fields in the logic layer do not need to be analyzed. Therefore, for the RapidIO protocol, the header information mainly includes a destination ID and a source ID, and physical layer and transport layer data such as priority.
The Ethernet packet head data comprises a destination address, a source address, a VLAN header and the like; the IP packet is an X protocol data packet, and the X protocol header also comprises an X protocol identifier, an X protocol length, an X protocol offset, an X protocol priority, an X protocol source port number and an X protocol destination port number.
The FC protocol header data comprises an SOF identification frame start, an FC frame header, an ASM header and an EOF frame end identification. The FC Frame header also comprises an R _ CTL Frame Type, a Type protocol Type, a Destination Address, a Source Address, a Frame Control field and a sequence ID number of the Frame of SEQ _ ID.
In this embodiment of the present invention, if the modification operation is an add data operation or a delete data operation, step S106 further includes the following steps:
step S11, based on the CRC generation principle, acquiring first data information generated when the modification operation is performed on the packet header data;
step S12, calculating a CRC check value of the first data information;
step S13, updating the CRC check value of the first data information into the intermediate protocol data packet to be converted, so as to obtain the target protocol data packet to be converted.
In the embodiment of the invention, if the modification operation is an operation of adding data or deleting data, first data information of adding or deleting header data is obtained according to a CRC generation principle;
then, a CRC check value of the first data information is calculated.
And finally, updating the CRC value of the first data information into the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted.
The mode that the target protocol data packet to be converted is obtained by updating the CRC value of the first data information into the intermediate protocol data packet to be converted achieves the aim that CRC calculation of heterogeneous protocol conversion can be completed only by performing CRC calculation on the content of the modified data packet when CRC calculation of heterogeneous protocol conversion is performed, and further solves the technical problems that time consumption is long and heterogeneous protocol conversion efficiency is low when CRC calculation of heterogeneous protocol conversion is performed in the prior art.
It should be noted that the first data information includes PACKET _ ADD and PACKET _ DEL.
The PACKET _ ADD indicates that after receiving a protocol data PACKET to be converted, some data information needs to be added to the content of the data PACKET according to the protocol conversion requirement so as to be mapped to a new protocol, and the requirement of the new protocol is met. For convenience of the following discussion, these newly added data information are defined as PACKET _ ADD. For example, in the SRIO protocol, the NWrite PACKET is converted to the FC protocol, and 8 bits of data of an R _ CTL frame type, denoted as PACKET _ ADD, needs to be added.
Similarly, PACKET _ DEL indicates that after receiving the protocol PACKET to be converted, some data information needs to be deleted from the content of the PACKET according to the protocol conversion requirement to map to a new protocol, so as to meet the requirement of the new protocol.
In this embodiment of the present invention, if the modify operation is a data replacement operation, step S104 further includes the following steps:
step S21, deleting the header data based on the target protocol conversion requirement;
step S22, adding the target data to the initial protocol data packet to be converted with correct transmission to obtain a target protocol data packet to be converted, where the target data is data for replacing the header data.
In the embodiment of the present invention, the data replacement operation may be regarded as an operation of deleting the header data and then adding the data, and the specific process is as follows:
when the initial protocol conversion data packet is modified, the header data is deleted firstly, and then the target data for replacing the header data is added into the initial protocol data packet to be converted, so that the modification of the initial protocol data packet to be converted is completed, and the intermediate protocol data packet to be converted is obtained.
In this embodiment of the present invention, if the modifying operation is a data replacing operation, step S106 further includes the following steps:
step S31, based on the CRC generation principle, acquiring second data information generated when the header data is deleted and acquiring third data information generated when the target data is added;
step S32, calculating a CRC check value of the second data information and a CRC check value of the third data information;
step S33, updating the CRC check value of the second data information and the CRC check value of the third data information into the intermediate protocol data packet to be converted, so as to obtain a target protocol data packet to be converted.
In the embodiment of the present invention, if the modification operation is a data replacement operation, based on a CRC generation principle, second data information generated by deleting header data and third data information generated by adding destination data are respectively acquired.
Next, a CRC check value of the second data information and a CRC check value of the third data information are calculated.
And finally, updating the CRC value of the second data information and the CRC value of the third data information into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted, thereby completing the heterogeneous protocol conversion of the initial protocol data packet to be converted.
In the embodiment of the present invention, as shown in fig. 2, the method further includes the following steps:
step S110, sending the target protocol data packet to be converted to a target device, where the target device includes: switching equipment and terminal equipment.
And after the target protocol data packet to be converted is obtained, sending the target protocol data packet to be converted to the switching equipment or the terminal equipment so that the switching equipment or the terminal equipment can correspondingly process the target protocol data packet to be converted.
Example two:
the present invention further provides a CRC calculation system for heterogeneous protocol conversion, where the system is used to execute the CRC calculation method for heterogeneous protocol conversion provided in the foregoing content of the embodiment of the present invention, and the following is a specific description of the CRC calculation system for heterogeneous protocol conversion provided in the embodiment of the present invention.
As shown in fig. 3, fig. 3 is a schematic diagram of the CRC calculation system for heterogeneous protocol conversion, where the system includes: a data receiver 10, a CRC decoder 20, a protocol converter 30 and a CRC calculation device 40, wherein,
the data receiver 10 is configured to obtain an initial protocol data packet to be converted;
the CRC decoder 20 is configured to perform a decoding operation on the initial protocol data packet to be converted, and verify whether the initial protocol data packet to be converted is correctly transmitted based on a decoding result;
the protocol converter 30 is configured to, if the initial protocol data packet to be converted is correctly transmitted, perform a modification operation on packet header data in the initial protocol data packet to be converted based on a target protocol conversion requirement, to obtain an intermediate protocol data packet to be converted, where the modification operation includes at least one of: adding data operation, deleting data operation and replacing data operation;
the CRC calculation device 40 is configured to calculate a CRC check value of the intermediate protocol data packet to be converted, and update the CRC check value to the intermediate protocol data packet to be converted, so as to obtain a target protocol data packet to be converted.
In the embodiment, when performing CRC code calculation for heterogeneous protocol conversion, the purpose of CRC calculation for heterogeneous protocol conversion can be achieved by calculating the CRC check value of the intermediate protocol data packet to be converted and updating the CRC check value into the intermediate protocol data packet to be converted, and performing CRC calculation for heterogeneous protocol conversion only by performing CRC calculation on modified header data, thereby solving the technical problems of long time consumption and low heterogeneous protocol conversion efficiency in the CRC calculation for heterogeneous protocol conversion in the prior art, and thus achieving the technical effect of improving the efficiency of heterogeneous protocol conversion.
Preferably, the CRC calculation device is configured to, when the modification operation is an add data operation or a delete data operation, obtain, based on a CRC generation principle, first data information generated when the modification operation is performed on the header data; calculating a CRC check value of the first data information; and updating the CRC value of the first data information to the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted.
Preferably, the protocol converter is configured to delete the packet header data based on the target protocol conversion requirement if the modification operation is a replacement data operation; and adding target data into the initial protocol data packet to be converted with correct transmission to obtain a target protocol data packet to be converted, wherein the target data is data for replacing the packet header data.
Preferably, the CRC calculation device is configured to, based on a CRC generation principle, acquire second data information generated when the header data is deleted and third data information generated when the target data is added, in a case where the modification operation is a replacement data operation; and updating the CRC value of the second data information and the CRC value of the third data information into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
Preferably, as shown in fig. 4, the system further includes: a transmitter, configured to transmit the target protocol packet to be converted to a target device, where the target device includes: switching equipment and terminal equipment.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A CRC calculation method for heterogeneous protocol conversion is characterized by comprising the following steps:
acquiring an initial protocol data packet to be converted;
decoding the initial protocol data packet to be converted, and verifying whether the initial protocol data packet to be converted is transmitted correctly or not based on a decoding result;
if the initial protocol data packet to be converted is correctly transmitted, modifying packet header data in the initial protocol data packet to be converted based on a target protocol conversion requirement to obtain an intermediate protocol data packet to be converted, wherein the modifying operation comprises at least one of the following operations: adding data operation, deleting data operation and replacing data operation;
and calculating a CRC (cyclic redundancy check) value of packet header data of the intermediate protocol data packet to be converted, and updating the CRC value into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
2. The method of claim 1, wherein the modify operation is an add data operation or a delete data operation;
calculating a CRC (cyclic redundancy check) value of packet header data of the intermediate protocol data packet to be converted, updating the CRC value into the intermediate protocol data packet to be converted, and obtaining a target protocol data packet to be converted comprises the following steps: based on a CRC generation principle, acquiring first data information generated when the modification operation is executed on the packet header data;
calculating a CRC check value of the first data information;
and updating the CRC value of the first data information to the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted.
3. The method of claim 1, wherein the modify operation is a replace data operation;
based on the target protocol conversion requirement, modifying the header data in the initial protocol data packet to be converted, which is transmitted correctly, to obtain an intermediate protocol data packet to be converted, including:
deleting the packet header data based on the target protocol conversion requirement;
and adding target data into the initial protocol data packet to be converted with correct transmission to obtain a target protocol data packet to be converted, wherein the target data is data for replacing the packet header data.
4. The method of claim 3, wherein if the modify operation is a replace data operation;
calculating a CRC (cyclic redundancy check) value of packet header data of the intermediate protocol data packet to be converted, updating the CRC value into the intermediate protocol data packet to be converted, and obtaining a target protocol data packet to be converted comprises the following steps:
based on a CRC generation principle, second data information generated when the header data is deleted and third data information generated when the target data is added are obtained;
calculating a CRC value of the second data information and a CRC value of the third data information;
and updating the CRC value of the second data information and the CRC value of the third data information into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
5. The method of claim 1, further comprising:
sending the target protocol data packet to be converted to target equipment, wherein the target equipment comprises: switching equipment and terminal equipment.
6. A CRC computing system for heterogeneous protocol conversion, the system comprising: a data receiver, a CRC decoder, a protocol converter, and a CRC calculation device, wherein,
the data receiver is used for acquiring an initial protocol data packet to be converted;
the CRC decoder is used for decoding the initial protocol data packet to be converted and verifying whether the transmission of the initial protocol data packet to be converted is correct or not based on a decoding result;
the protocol converter is configured to, if the initial protocol data packet to be converted is correctly transmitted, perform a modification operation on packet header data in the initial protocol data packet to be converted based on a target protocol conversion requirement, to obtain an intermediate protocol data packet to be converted, where the modification operation includes at least one of: adding data operation, deleting data operation and replacing data operation;
and the CRC calculation equipment is used for calculating a CRC check value of packet header data of the intermediate protocol data packet to be converted, and updating the CRC check value into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
7. The system of claim 6,
the CRC computing device is used for acquiring first data information generated when the modification operation is executed on the packet header data based on a CRC generation principle under the condition that the modification operation is an operation of adding data or deleting data;
calculating a CRC check value of the first data information;
and updating the CRC value of the first data information to the intermediate protocol data packet to be converted to obtain the target protocol data packet to be converted.
8. The system of claim 6,
the protocol converter is used for deleting the header data based on the target protocol conversion requirement under the condition that the modification operation is a data replacement operation;
and adding target data into the initial protocol data packet to be converted with correct transmission to obtain a target protocol data packet to be converted, wherein the target data is data for replacing the packet header data.
9. The system of claim 8,
the CRC calculation device is used for acquiring second data information generated when the header data is deleted and third data information generated when the target data is added on the basis of a CRC generation principle under the condition that the modification operation is a data replacement operation;
and updating the CRC value of the second data information and the CRC value of the third data information into the intermediate protocol data packet to be converted to obtain a target protocol data packet to be converted.
10. The system of claim 6, further comprising:
a transmitter, configured to transmit the target protocol packet to be converted to a target device, where the target device includes: switching equipment and terminal equipment.
CN201910247526.2A 2019-03-29 2019-03-29 CRC calculation method and system for heterogeneous protocol conversion Active CN110138505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910247526.2A CN110138505B (en) 2019-03-29 2019-03-29 CRC calculation method and system for heterogeneous protocol conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910247526.2A CN110138505B (en) 2019-03-29 2019-03-29 CRC calculation method and system for heterogeneous protocol conversion

Publications (2)

Publication Number Publication Date
CN110138505A CN110138505A (en) 2019-08-16
CN110138505B true CN110138505B (en) 2022-03-25

Family

ID=67568647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910247526.2A Active CN110138505B (en) 2019-03-29 2019-03-29 CRC calculation method and system for heterogeneous protocol conversion

Country Status (1)

Country Link
CN (1) CN110138505B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079133B (en) * 2021-03-16 2021-12-07 深圳市盛博科技嵌入式计算机有限公司 Data transmission method of gateway and gateway equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605071A (en) * 2009-07-02 2009-12-16 中兴通讯股份有限公司南京分公司 A kind of verification method of transport protocol chip and device
CN106411918A (en) * 2016-10-24 2017-02-15 中国电子科技集团公司第二十八研究所 FPGA-based multipath HDLC-UART conversion system and method
CN109005170A (en) * 2018-07-27 2018-12-14 天津芯海创科技有限公司 A kind of conversion method of RapidIO agreement to FC agreement

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9584632B2 (en) * 2013-08-28 2017-02-28 Wipro Limited Systems and methods for multi-protocol translation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605071A (en) * 2009-07-02 2009-12-16 中兴通讯股份有限公司南京分公司 A kind of verification method of transport protocol chip and device
CN106411918A (en) * 2016-10-24 2017-02-15 中国电子科技集团公司第二十八研究所 FPGA-based multipath HDLC-UART conversion system and method
CN109005170A (en) * 2018-07-27 2018-12-14 天津芯海创科技有限公司 A kind of conversion method of RapidIO agreement to FC agreement

Also Published As

Publication number Publication date
CN110138505A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
US8243757B2 (en) MAC header compression using a pointer
US9294589B2 (en) Header compression with a code book
US20170300595A1 (en) Data packet extraction method and apparatus
CN110943800A (en) Method, device and system for sending data packet, storage medium and electronic device
CN107426770B (en) Data communication method, data terminal and system based on data link layer
US20230034209A1 (en) Data transmission method and network device
EP3419238B1 (en) Method, apparatus, and system for transmitting data
US7720070B1 (en) Hybrid acknowledgement map format for data communication networks
CN112118180A (en) Method, device and system for planning path
CN110138505B (en) CRC calculation method and system for heterogeneous protocol conversion
US9866350B2 (en) Streaming media packet processing method, WiFi chip, and mobile terminal
US8886913B2 (en) Apparatus and method for identifier management
US20090210770A1 (en) Method, system and computer program product for end to end error checking in ethernet
US7032032B2 (en) Method and apparatus for providing tandem connection, performance monitoring, and protection architectures over ethernet protocols
CN112532359B (en) Method and device for content merging at receiving end based on data retransmission data
CN112003816B (en) Data transmission method, device, equipment and storage medium
CN108460044B (en) Data processing method and device
US7516393B2 (en) System and method of error detection for unordered data delivery
WO2023098430A1 (en) Data packet processing method, communication apparatus and communication system
WO2015006908A1 (en) Processing method, device and system for idle block (idle) in burst data block
CN114070405B (en) Optical fiber network system based on multi-type test equipment
JP5817387B2 (en) Communication apparatus and communication method
EP4064633A1 (en) Data compression method and apparatus, network device, and storage medium
WO2015051736A1 (en) Fault tolerant method for packet transmission of network node and network node
CN110312275B (en) Method for CBR service to realize service monitoring on Ethernet frame

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant