CN110138505A - A kind of the CRC calculation method and system of heterogeneous protocol conversion - Google Patents

A kind of the CRC calculation method and system of heterogeneous protocol conversion Download PDF

Info

Publication number
CN110138505A
CN110138505A CN201910247526.2A CN201910247526A CN110138505A CN 110138505 A CN110138505 A CN 110138505A CN 201910247526 A CN201910247526 A CN 201910247526A CN 110138505 A CN110138505 A CN 110138505A
Authority
CN
China
Prior art keywords
converted
data
data packet
protocol
crc
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.)
Granted
Application number
CN201910247526.2A
Other languages
Chinese (zh)
Other versions
CN110138505B (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides the CRC calculation methods and system of a kind of conversion of heterogeneous protocol, are related to the technical field of data processing, comprising: obtain initial protocol data packet to be converted;Operation is decoded to initial protocol data packet to be converted, verifies whether initial protocol data packet to be converted transmits correctly based on decoding result;If initial protocol data packet transmission to be converted is correct, then it is based on target protocol conversion requirements, modification operation is executed to the header data in initial protocol data packet to be converted, obtain intermediate protocol data packet to be converted, wherein, modification operation comprises at least one of the following: increasing data manipulation, deletes data manipulation, replacement data operation;The CRC check value of intermediate protocol data packet to be converted is calculated, and CRC check value is updated in intermediate protocol data packet to be converted, obtains target protocol data packet to be converted.It solves in the prior art when the CRC coding for carrying out heterogeneous protocol conversion calculates, the consuming time is longer, the lower technical problem of heterogeneous protocol transfer efficiency.

Description

A kind of the CRC calculation method and system of heterogeneous protocol conversion
Technical field
The present invention relates to technical field of data processing, CRC calculation method more particularly, to a kind of conversion of heterogeneous protocol and System.
Background technique
Multiple network agreement is generally involved in heterogeneous protocol conversion, such as Ethernet protocol, FC agreement (Fiber Channel, optical-fibre channel), RapidIO agreement etc., in protocol conversion process, may relate to the conversion between several agreements, RapidIO agreement is such as converted to by Ethernet protocol, data frame format bit field reflects between this relates to how to complete different agreement Penetrate, it is necessary to the data informations such as the packet header of the data packet received are increased, are deleted, change operation, with complete packaging and It unpacks.Cyclic redundancy check method is used in across heterogeneous protocol exchange system to ensure the correctness of data in transmission process. CRC(Cyclic Redundancy Code, cyclic redundancy check code) use polynomial code, such as common CRC-16, CRC- 32 equal decoding methods.Currently, serial mode is difficult to handle in real time for high- speed network communication, therefore CRC codec is adopted more With parallel implementation method.
In across heterogeneous protocol exchange system, general way is to be required after receiving end receives data packet according to exchange, A new data packet is generated after increasing, deleting or changing the information such as some packet header, transmitting terminal is then transmitted to by exchange, The new data packet received is re-started CRC coding and calculated by transmitting terminal, is then sent to corresponding switching equipment or end End equipment.Thus there is a kind of situation, i.e., needs the CRC coding carried out to data packet again to calculate in transmitting terminal, as FC is assisted The data frame payload length of view is up to 2096 bytes, if all carrying out CRC again to these data frames encodes meter It calculates, longer time will be expended, delay is also larger, to increase the cost of system, reduces the effect of exchange system transmission Rate.
In view of the above-mentioned problems, not putting forward effective solutions also.
Summary of the invention
In view of this, the purpose of the present invention is to provide the CRC calculation method and system of a kind of conversion of heterogeneous protocol, with slow It has solved in the prior art when the CRC coding for carrying out heterogeneous protocol conversion calculates, the consuming time is longer, heterogeneous protocol transfer efficiency Lower technical problem.
In a first aspect, the embodiment of the invention provides a kind of CRC calculation methods of heterogeneous protocol conversion, this method comprises: Obtain initial protocol data packet to be converted;Operation is decoded to the initial protocol data packet to be converted, is based on decoding result Verify whether the initial protocol data packet to be converted transmits correctly;If the initial protocol data packet transmission to be converted is correct, Target protocol conversion requirements are then based on, modification operation is executed to the header data in the initial protocol data packet to be converted, is obtained To intermediate protocol data packet to be converted, wherein the modification operation comprises at least one of the following: increasing data manipulation, deletes number According to operation, replacement data operation;The CRC check value of intermediate protocol data packet to be converted is calculated, and the CRC check value is updated To in the protocol data packet to be converted of the centre, target protocol data packet to be converted is obtained.
Further, if modification operation is increase data manipulation or deletion data operation;The centre is calculated wait turn The CRC check value of protocol data packet is changed, and the CRC check value is updated in the protocol data packet to be converted of the centre, is obtained It include: to obtain and the modification operation is executed to the header data based on CRC generating principle to target protocol data packet to be converted When, the first data information of generation;Calculate the CRC check value of first data information;By the CRC of first data information Check value is updated in the protocol data packet to be converted of the centre, obtains target protocol data packet to be converted.
Further, if modification operation is that replacement data operates;It is correct to transmitting based on target protocol conversion requirements The protocol data packet to be converted in header data execute modification operation, obtaining intermediate protocol data packet to be converted includes: Based on the target protocol conversion requirements, the header data is deleted;It is correctly initial that target data is added to the transmission In protocol data packet to be converted, target protocol data packet to be converted is obtained, wherein the target data is for replacing the packet The data of head data.
Further, if modification operation is that replacement data operates;The CRC check value of the header data is calculated, and The CRC check value is updated in the protocol data packet to be converted of the centre, obtaining target protocol data packet to be converted includes: Based on CRC generating principle, when obtaining the deletion header data, the second data information of generation, and obtain and increase the mesh When marking data, the third data information of generation;Calculate second data information CRC check value and the third data information CRC check value;
The CRC check value of the CRC check value of second data information and the third data information is updated to the centre In protocol data packet to be converted, target protocol data packet to be converted is obtained.Further, the method also includes: by the mesh It marks protocol data packet to be converted and is sent to target device, wherein the target device includes: switching equipment, terminal device.
Second aspect, the embodiment of the invention provides a kind of CRC computing system of heterogeneous protocol conversion, which includes: Data sink, CRC decoder, protocol converter and CRC calculate equipment, wherein the data sink is for obtaining wait turn Change protocol data packet;The CRC decoder is based on decoding result for being decoded operation to the protocol data packet to be converted Verify whether the protocol data packet to be converted transmits correctly;If the protocol converter is for the initial agreement number to be converted It is correct according to packet transmission, then target protocol conversion requirements are based on, the header data in the initial protocol data packet to be converted is held Row modification operation, obtains intermediate protocol data packet to be converted, wherein the modification operation comprises at least one of the following: increasing number According to operation, data manipulation, replacement data operation are deleted;The CRC calculates equipment for calculating intermediate protocol data packet to be converted CRC check value, and the CRC check value is updated in the protocol data packet to be converted of the centre, it is to be converted to obtain target Protocol data packet.
Further, the CRC calculates equipment and is used to operate in the modification to increase data manipulation or deleting data behaviour In the case where work, it is based on CRC generating principle, when obtaining to header data execution modification operation, the first number of generation It is believed that breath;Calculate the CRC check value of first data information;By the CRC check value of first data information, it is updated to institute It states in intermediate protocol data packet to be converted, obtains target protocol data packet to be converted.
Further, the protocol converter is used to be based in the case where modification operation is replacement data operation The target protocol conversion requirements, delete the header data;Target data is added to the transmission correctly initially wait turn It changes in protocol data packet, obtains target protocol data packet to be converted, wherein the target data is for replacing the packet header number According to data.
Further, the CRC calculates equipment and is used to be based in the case where modification operation is replacement data operation CRC generating principle, when obtaining the deletion header data, the second data information of generation, and obtain and increase the number of targets According to when, the third data information of generation;By the CRC of the CRC check value of second data information and the third data information Check value is updated in the protocol data packet to be converted of the centre, obtains target protocol data packet to be converted.
Further, the system also includes: target protocol data packet to be converted is sent to target and set by transmitter It is standby, wherein the target device includes: switching equipment, terminal device.
In embodiments of the present invention, initial protocol data packet to be converted is obtained;Initial protocol data packet to be converted is carried out Decoding operate verifies whether initial protocol data packet to be converted transmits correctly based on decoding result;If initial agreement number to be converted It is correct according to packet transmission, then target protocol conversion requirements are based on, the header data execution in initial protocol data packet to be converted is repaired Change operation, obtain intermediate protocol data packet to be converted, wherein modification operation comprises at least one of the following: increasing data manipulation, deletes Subtract data manipulation, replacement data operation;The CRC check value of intermediate protocol data packet to be converted is calculated, and CRC check value is updated Into intermediate protocol data packet to be converted, target protocol data packet to be converted is obtained.
In the present embodiment, when the CRC for carrying out heterogeneous protocol conversion is encoded and calculated, by calculating intermediate agreement number to be converted It is updated in intermediate protocol data packet to be converted according to the CRC check value of packet, and by CRC check value, obtains target agreement to be converted The mode of data packet, reached carry out heterogeneous protocol conversion CRC coding calculate only need to the header data modified into Row CRC coding calculate can complete heterogeneous protocol conversion CRC coding calculate purpose, and then solve in the prior art into When the CRC of row heterogeneous protocol conversion encodes calculating, the consuming time is longer, the lower technical problem of heterogeneous protocol transfer efficiency, from And realize the efficiency techniques effect for improving heterogeneous protocol conversion.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention are in specification, claims And specifically noted structure is achieved and obtained in attached drawing.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the CRC calculation method of heterogeneous protocol conversion provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the CRC calculation method of another heterogeneous protocol conversion provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of the CRC computing system of heterogeneous protocol conversion provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of the CRC computing system of another heterogeneous protocol conversion provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Embodiment one:
According to embodiments of the present invention, a kind of embodiment of the CRC calculation method of heterogeneous protocol conversion is provided, needs to illustrate It is that step shown in the flowchart of the accompanying drawings can execute in a computer system such as a set of computer executable instructions, Also, although logical order is shown in flow charts, and it in some cases, can be to be different from sequence execution herein Shown or described step.
Fig. 1 is a kind of flow chart of the CRC calculation method of heterogeneous protocol conversion according to an embodiment of the present invention, such as Fig. 1 institute Show, this method comprises the following steps:
Step S102 obtains initial protocol data packet to be converted;
Step S104 is decoded operation to the initial protocol data packet to be converted, described initial based on decoding result verifying Whether protocol data packet to be converted transmits correctly;
Step S106 is based on target protocol conversion requirements, to described if the initial protocol data packet transmission to be converted is correct Header data in initial protocol data packet to be converted executes modification operation, obtains intermediate protocol data packet to be converted, wherein institute It states modification operation to comprise at least one of the following: increasing data manipulation, delete data manipulation, replacement data operation;
Step S108 calculates the CRC check value of intermediate protocol data packet to be converted, and the CRC check value is updated to described In intermediate protocol data packet to be converted, target protocol data packet to be converted is obtained.
In the present invention, when the CRC for carrying out heterogeneous protocol conversion is encoded and calculated, by calculating intermediate protocol data to be converted The CRC check value of packet, and CRC check value is updated in intermediate protocol data packet to be converted, obtain target agreement number to be converted According to the mode of packet, reaches and only needed to carry out the header data modified in the CRC coding calculating for carrying out heterogeneous protocol conversion CRC encodes the purpose calculated, and then solves the consuming in the prior art when the CRC coding for carrying out heterogeneous protocol conversion calculates Time is longer, the lower technical problem of heterogeneous protocol transfer efficiency, to realize the efficiency skill for improving heterogeneous protocol conversion Art effect.
It should be noted that the centre of step S106 protocol data packet to be converted, due to not carrying out CRC check value more Newly, therefore the school CRC of the CRC check value of the centre of step S106 protocol data packet to be converted and initial protocol data packet to be converted It is identical to test value.
It should be noted that due to generally involving multiple network agreement in heterogeneous protocol conversion, such as Ethernet protocol, FC Agreement (Fiber Channel, optical-fibre channel), RapidIO agreement etc., in protocol conversion process, may relate to several agreements Between conversion, RapidIO agreement is such as converted to by Ethernet protocol, this relates to how to complete data frame between different agreement Form bit domain mapping, it is necessary to the data informations such as the packet header of the data packet received be increased, deleted, replacement operation.
In addition, it should also be noted that, cyclic redundancy check side can be used during carrying out heterogeneous protocol conversion Method is to ensure the correctness of data in transmission process.CRC(Cyclic Redundancy Code, cyclic redundancy check code) it uses Polynomial code, such as common CRC-16, CRC-32 decoding method.
Above-mentioned header data is related with protocol type, its packet header content of different agreements is also different.Heterogeneous protocol turns The implementation changed is exactly to split the frame of agreement, and the partial informations such as packet header are mapped to the relevant information of another protocol frame, It needs to carry out mapping conversion to address, the priority etc. in agreement packet header, data load will not change.Specific data Packet is as follows by protocal analysis.
The typical packet format such as Nwrite packet of RapidIO agreement, wherein Data data are data load;AckID is used to only The identifier of the confirmation command character number of one ground mark packet;Prio instruction is used for the packet priority of flow control;Tt field determines mesh ID and source ID length and position;Ftype determines the type of packet;Transaction indicates transaction types; Destination ID indicates purpose ID;Source ID indicates source ID;When carrying out protocol conversion, resolution logic layer is not needed In part field.Therefore, for RapidIO agreement, its header packet information mainly includes purpose ID and source ID and priority etc. Physical layer and transport layer data.
Ethernet packet header data include destination address, source address, VLAN stem etc.;Wherein IP Bao Zhongwei X protocol data packet, X protocol stem includes X protocol mark, X protocol length, X protocol offset, X protocol priority, X protocol source port number, X protocol again Destination slogan.
FC agreement packet header data packet is containing SOF mark frame starting, FC frame head, ASM head, EOF frame end mark.FC frame head wraps again The type of frame containing R_CTL, Type protocol type, Destination Address destination address, Source Address source address, Frame Control frame control field, the sequence ID number that the SEQ_ID frame is subordinate to.
In embodiments of the present invention, if modification operation is increase data manipulation or deletion data operation, step S106 Further include following steps:
Step S11 is based on CRC generating principle, when obtaining to header data execution modification operation, the first number of generation It is believed that breath;
Step S12 calculates the CRC check value of first data information;
The CRC check value of first data information is updated in the protocol data packet to be converted of the centre, is obtained by step S13 To target protocol data packet to be converted.
In embodiments of the present invention, if modification operation generates to increase data manipulation or deletion data operation according to CRC Principle obtains the first data information for increasing or deleting header data;
Then, it calculates the first data information CRC check value.
Finally, the first data information CRC check value is updated in intermediate protocol data packet to be converted, obtains target and wait turning Change protocol data packet.
By the way that the first data information CRC check value to be updated in intermediate protocol data packet to be converted, obtains target and wait turning The mode of protocol data packet is changed, is only needed when the CRC coding for carrying out heterogeneous protocol conversion calculates to being modified to reach Packet content carry out CRC coding and calculate that the purpose that the CRC of heterogeneous protocol conversion is calculated can be completed, and then solve existing In technology when the CRC for carrying out heterogeneous protocol conversion is encoded and calculated, the consuming time is longer, the lower skill of heterogeneous protocol transfer efficiency Art problem.
It should be noted that the first above-mentioned data information includes PACKET_ADD and PACKET_DEL.
What PACKET_ADD was indicated is after receiving protocol data packet to be converted, to be required according to protocol conversion, to data packet Content needs to increase some data informations, to be mapped to new agreement, meets the requirement of new agreement.To discuss below conveniently, just These data informations newly increased are defined as PACKET_ADD.As NWrite packet is needed to FC protocol conversion in SRIO agreement 8 data for increasing a R_CTL frame type, are denoted as PACKET_ADD.
Similarly, what PACKET_DEL was indicated is after receiving protocol data packet to be converted, to be required according to protocol conversion, logarithm It needs to delete some data informations according to packet content, to be mapped to new agreement, meets the requirement of new agreement.
In embodiments of the present invention, if modification operation is that replacement data operates, step S104 further includes following steps:
Step S21 is based on the target protocol conversion requirements, deletes the header data;
The target data is added in the correct initial protocol data packet to be converted of the transmission, obtains target by step S22 Protocol data packet to be converted, wherein the target data is the data for replacing the header data.
In embodiments of the present invention, header data is first deleted then above-mentioned replacement data can be operated to be considered as, it is rear to increase The operation of data, detailed process is as follows:
When modifying to initiation protocol change data packet, first has to delete header data, then will be used to replace packet header number According to target data be added in initial protocol data packet to be converted, to complete to repair initial protocol data packet to be converted Change, obtains intermediate protocol data packet to be converted.
In embodiments of the present invention, if modification operation is that replacement data operates, step S106 further includes following steps:
Step S31 is based on CRC generating principle, when obtaining the deletion header data, the second data information of generation, and obtain When taking the increase target data, the third data information of generation;
Step S32 calculates the CRC check value of second data information and the CRC check value of the third data information;
The CRC check value of the CRC check value of second data information and the third data information is updated to by step S33 In the centre protocol data packet to be converted, target protocol data packet to be converted is obtained.
In embodiments of the present invention, if modification operation is that replacement data operates, it is based on CRC generating principle, is obtained respectively The second data information that header data generates is deleted, and obtains and increases the third data information that target data generates.
Then, the CRC check value of the second data information and the CRC check value of third data information are calculated.
Finally, the CRC check value of the CRC check value of the second data information and third data information is updated to intermediate wait turn It changes in protocol data packet, obtains target protocol data packet to be converted, to complete the isomery association of initial protocol data packet to be converted View conversion.
In embodiments of the present invention, as shown in Fig. 2, this method further includes following steps:
Target protocol data packet to be converted is sent to target device by step S110, wherein the target device includes: Switching equipment, terminal device.
After obtaining target protocol data packet to be converted, target protocol data packet to be converted is sent to switching equipment or end End equipment, so that switching equipment or terminal device perform corresponding processing target protocol data packet to be converted.
Embodiment two:
The present invention also provides a kind of CRC computing system of heterogeneous protocol conversion, the system is for executing the embodiment of the present invention The CRC calculation method for stating the conversion of heterogeneous protocol provided by content is heterogeneous protocol conversion provided in an embodiment of the present invention below CRC computing system specific introduction.
As shown in figure 3, Fig. 3 is the schematic diagram for the CRC computing system that above-mentioned heterogeneous protocol is converted, which includes: number According to receiver 10, CRC decoder 20, protocol converter 30 and CRC calculate equipment 40, wherein
The data sink 10 is for obtaining initial protocol data packet to be converted;
The CRC decoder 20 is used to be decoded operation to the initial protocol data packet to be converted, is tested based on decoding result Demonstrate,prove whether the initial protocol data packet to be converted transmits correctly;
If the protocol converter 30 is correct for the initial protocol data packet transmission to be converted, converted based on target protocol It is required that executing modification operation to the header data in the initial protocol data packet to be converted, intermediate agreement number to be converted is obtained According to packet, wherein the modification operation comprises at least one of the following: increasing data manipulation, delete data manipulation, replacement data behaviour Make;
The CRC calculates the CRC check value that equipment 40 is used to calculate intermediate protocol data packet to be converted, and by the CRC check Value is updated in the protocol data packet to be converted of the centre, obtains target protocol data packet to be converted.
In the present embodiment, when the CRC for carrying out heterogeneous protocol conversion is encoded and calculated, by calculating intermediate agreement number to be converted It is updated in intermediate protocol data packet to be converted according to the CRC check value of packet, and by CRC check value, obtains target agreement to be converted The mode of data packet, reached carry out heterogeneous protocol conversion CRC coding calculate only need to the header data modified into Row CRC coding calculates the purpose that the CRC for the heterogeneous protocol conversion that can be completed is calculated, and then solves and carrying out in the prior art When the CRC of heterogeneous protocol conversion encodes calculating, the consuming time is longer, the lower technical problem of heterogeneous protocol transfer efficiency, thus Realize the efficiency techniques effect for improving heterogeneous protocol conversion.
Preferably, the CRC calculates equipment and is used in modification operation be increase data manipulation or deletion data operation In the case where, it is based on CRC generating principle, when obtaining to header data execution modification operation, the first data of generation Information;Calculate the CRC check value of first data information;By the CRC check value of first data information, it is updated to described In intermediate protocol data packet to be converted, target protocol data packet to be converted is obtained.
Preferably, the protocol converter is used to be based on institute in the case where modification operation is replacement data operation Target protocol conversion requirements are stated, the header data is deleted;It is correctly initial to be converted that target data is added to the transmission In protocol data packet, target protocol data packet to be converted is obtained, wherein the target data is for replacing the header data Data.
Preferably, the CRC calculates equipment and is used to be based in the case where modification operation is replacement data operation CRC generating principle, when obtaining the deletion header data, the second data information of generation, and obtain and increase the number of targets According to when, the third data information of generation;By the CRC of the CRC check value of second data information and the third data information Check value is updated in the protocol data packet to be converted of the centre, obtains target protocol data packet to be converted.
Preferably, as shown in figure 4, the system also includes transmitter, for by target protocol data packet to be converted It is sent to target device, wherein the target device includes: switching equipment, terminal device.
In addition, in the description of the embodiment of the present invention unless specifically defined or limited otherwise, term " installation ", " phase Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can To be mechanical connection, it is also possible to be electrically connected;It can be directly connected, can also can be indirectly connected through an intermediary Connection inside two elements.For the ordinary skill in the art, above-mentioned term can be understood at this with concrete condition Concrete meaning in invention.
In the description of the present invention, it should be noted that term " center ", "upper", "lower", "left", "right", "vertical", The orientation or positional relationship of the instructions such as "horizontal", "inner", "outside" be based on the orientation or positional relationship shown in the drawings, merely to Convenient for description the present invention and simplify description, rather than the device or element of indication or suggestion meaning must have a particular orientation, It is constructed and operated in a specific orientation, therefore is not considered as limiting the invention.In addition, term " first ", " second ", " third " is used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with It realizes by another way.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, Only a kind of logical function partition, there may be another division manner in actual implementation, in another example, multiple units or components can To combine or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or beg for The mutual coupling, direct-coupling or communication connection of opinion can be through some communication interfaces, device or unit it is indirect Coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in the executable non-volatile computer-readable storage medium of a processor.Based on this understanding, of the invention Technical solution substantially the part of the part that contributes to existing technology or the technical solution can be with software in other words The form of product embodies, which is stored in a storage medium, including some instructions use so that One computer equipment (can be personal computer, server or the network equipment etc.) executes each embodiment institute of the present invention State all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read- Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can be with Store the medium of program code.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of CRC calculation method of heterogeneous protocol conversion characterized by comprising
Obtain initial protocol data packet to be converted;
Operation is decoded to the initial protocol data packet to be converted, based on the decoding result verifying initial agreement to be converted Whether data packet is transmitted correctly;
If the initial protocol data packet transmission to be converted is correct, target protocol conversion requirements are based on, to described initially wait turn The header data changed in protocol data packet executes modification operation, obtains intermediate protocol data packet to be converted, wherein the modification behaviour It comprises at least one of the following: increasing data manipulation, delete data manipulation, replacement data operation;
The CRC check value of intermediate protocol data packet to be converted is calculated, and it is to be converted that the CRC check value is updated to the centre In protocol data packet, target protocol data packet to be converted is obtained.
2. the method according to claim 1, wherein modification operation is increase data manipulation or deletes data Operation;
Calculate the CRC check value of centre protocol data packet to be converted, and by the CRC check value be updated to the centre to In Conversion Protocol Data packet, obtaining target protocol data packet to be converted includes: to be obtained based on CRC generating principle to the packet header When data execute modification operation, the first data information of generation;
Calculate the CRC check value of first data information;
By the CRC check value of first data information, it is updated in the protocol data packet to be converted of the centre, obtains the mesh Mark protocol data packet to be converted.
3. the method according to claim 1, wherein modification operation is that replacement data operates;
Based on target protocol conversion requirements, modification is executed to the header data in transmission correctly initial protocol data packet to be converted Operation, obtaining intermediate protocol data packet to be converted includes:
Based on the target protocol conversion requirements, the header data is deleted;
Target data is added in the correct initial protocol data packet to be converted of the transmission, target agreement number to be converted is obtained According to packet, wherein the target data is the data for replacing the header data.
4. according to the method described in claim 3, it is characterized in that, if modification operation is that replacement data operates;
The CRC check value of the header data is calculated, and the CRC check value is updated to centre protocol data to be converted Bao Zhong, obtaining target protocol data packet to be converted includes:
Based on CRC generating principle, when obtaining the deletion header data, the second data information of generation, and obtain and increase institute When stating target data, the third data information of generation;
Calculate the CRC check value of second data information and the CRC check value of the third data information;
The CRC check value of the CRC check value of second data information and the third data information is updated to the centre In protocol data packet to be converted, target protocol data packet to be converted is obtained.
5. the method according to claim 1, wherein the method also includes:
Target protocol data packet to be converted is sent to target device, wherein the target device includes: switching equipment, Terminal device.
6. a kind of CRC computing system of heterogeneous protocol conversion, which is characterized in that the system comprises: data sink, CRC solution Code device, protocol converter and CRC calculate equipment, wherein
The data sink is for obtaining initial protocol data packet to be converted;
The CRC decoder is used to be decoded operation to the initial protocol data packet to be converted, is verified based on decoding result Whether the initial protocol data packet to be converted transmits correctly;
If the protocol converter is correct for the initial protocol data packet transmission to be converted, wanted based on target protocol conversion It asks, modification operation is executed to the header data in the initial protocol data packet to be converted, obtains intermediate protocol data to be converted Packet, wherein the modification operation comprises at least one of the following: increasing data manipulation, deletes data manipulation, replacement data operation;
The CRC calculates the CRC check value that equipment is used to calculate intermediate protocol data packet to be converted, and by the CRC check value It is updated in the protocol data packet to be converted of the centre, obtains target protocol data packet to be converted.
7. system according to claim 6, which is characterized in that
The CRC calculates equipment and is used in the case where modification operation is increases data manipulation or deletion data operation, base In CRC generating principle, when obtaining to header data execution modification operation, the first data information of generation;
Calculate the CRC check value of first data information;
By the CRC check value of first data information, it is updated in the protocol data packet to be converted of the centre, obtains the mesh Mark protocol data packet to be converted.
8. system according to claim 6, which is characterized in that
The protocol converter is used to turn in the case where modification operation is replacement data operation based on the target protocol Requirement is changed, the header data is deleted;
Target data is added in the correct initial protocol data packet to be converted of the transmission, target agreement number to be converted is obtained According to packet, wherein the target data is the data for replacing the header data.
9. system according to claim 8, which is characterized in that
The CRC calculates equipment and is used to be based on CRC generating principle in the case where modification operation is replacement data operation, It obtains when deleting the header data, the second data information of generation, and obtains when increasing the target data, the of generation Three data informations;
The CRC check value of the CRC check value of second data information and the third data information is updated to the centre In protocol data packet to be converted, target protocol data packet to be converted is obtained.
10. system according to claim 6, which is characterized in that the system also includes:
Transmitter, for target protocol data packet to be converted to be sent to target device, wherein the target device packet It includes: switching equipment, terminal device.
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 true CN110138505A (en) 2019-08-16
CN110138505B 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)

Cited By (1)

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

Citations (4)

* 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
US20150067188A1 (en) * 2013-08-28 2015-03-05 Wipro Limited Systems and methods for multi-protocol translation
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

Patent Citations (4)

* 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
US20150067188A1 (en) * 2013-08-28 2015-03-05 Wipro Limited Systems and methods for multi-protocol translation
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

Cited By (1)

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

Also Published As

Publication number Publication date
CN110138505B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
KR102569305B1 (en) Data message detection method, device and system
US8576847B2 (en) Mechanisms for discovering path maximum transmission unit
US7007101B1 (en) Routing and forwarding table management for network processor architectures
WO2015180559A1 (en) Fault detection method and apparatus for service chain
US8848582B2 (en) Method for measuring throughput and maintenance end point
US8584146B1 (en) Communications driver management
CN104104609A (en) Credit-based link level flow control method and system
US20180159770A1 (en) System and method
JP2023514790A (en) NETWORK PERFORMANCE DETECTION METHOD AND DEVICE, AND NETWORK DEVICE
WO2020135238A1 (en) Method, apparatus and system for planning path
JP7282895B2 (en) Data retransmission decoding method, device, system and communication device
CN111510388A (en) Method, device and system for determining forwarding path
CN110138505A (en) A kind of the CRC calculation method and system of heterogeneous protocol conversion
CN103297196B (en) A kind of cyclic redundancy check method of non-whole byte data
US20160329987A1 (en) Streaming Media Packet Processing Method, WiFi Chip, and Mobile Terminal
CN112969202B (en) Network parameter adjusting method and device, electronic equipment and storage medium
US20120294307A1 (en) Apparatus and Method for Identifier Management
US20090210770A1 (en) Method, system and computer program product for end to end error checking in ethernet
CN114050994A (en) SRv 6-based network telemetry method
CN108768848B (en) Segmented routing method and device
WO2015006908A1 (en) Processing method, device and system for idle block (idle) in burst data block
US8532101B2 (en) System and method for providing co-signaled return label switch paths
CN107257265A (en) Real-time transmission data stream forward error correction, equipment and storage medium
WO2019179392A1 (en) Packet generation method and related device
CN113783753B (en) Loop detection method, device, equipment and storage medium

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