CN101588221B - Method and device for realizing self-adapting selection of checkum algorithm - Google Patents

Method and device for realizing self-adapting selection of checkum algorithm Download PDF

Info

Publication number
CN101588221B
CN101588221B CN 200910087389 CN200910087389A CN101588221B CN 101588221 B CN101588221 B CN 101588221B CN 200910087389 CN200910087389 CN 200910087389 CN 200910087389 A CN200910087389 A CN 200910087389A CN 101588221 B CN101588221 B CN 101588221B
Authority
CN
China
Prior art keywords
message
checksum
endpoint
algorithm
received
Prior art date
Application number
CN 200910087389
Other languages
Chinese (zh)
Other versions
CN101588221A (en
Inventor
王波
王辉
高毅
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to CN 200910087389 priority Critical patent/CN101588221B/en
Publication of CN101588221A publication Critical patent/CN101588221A/en
Application granted granted Critical
Publication of CN101588221B publication Critical patent/CN101588221B/en

Links

Abstract

The invention discloses a method for realizing the self-adapting selection of checksum algorithm, comprising: the terminal point selects the first checksum algorithm to calculate the received checksumof the message from the counterpart terminal point, when the calculated checksum is determined to be unequal to the checksum carried by the received message, the second checksum algorithm is selectedto attempt to be coupled with the counterpart terminal point. The invention also discloses a device for realizing the self-adapting selection of checksum algorithm, the method and device are used torealize that the SCTF terminal point adopting the new checksum algorithm CRC-32 is coupled with the SCTP terminal point adopting the Adler-32 or CRC-32 checksum algorithm, further realize that the newapparatus is compatible with the old apparatus in the network.

Description

一种实现校验和算法自适应选择的方法及装置 Method and apparatus for implementing adaptive algorithm selected checksum

技术领域 FIELD

[0001] 本发明涉及通信系统中的流控制传输协议(SCTP),尤其涉及一种实现SCTP中校验和算法自适应选择的方法及装置。 [0001] The present invention relates to a communication system Stream Control Transmission Protocol (SCTP), in particular, relates to a method and apparatus in SCTP checksum algorithms implemented adaptively selected.

背景技术 Background technique

[0002] SCTP是信令传输协议(SIGTRAN)协议簇中的组成部分,属于传输层协议,主要用于在IP网络上可靠地传送公共交换电话网络(PSTN)的信令消息。 [0002] SCTP is part of the signaling protocol (the SIGTRAN) protocol suite, belonging to a transport layer protocol, mainly used for transmitting signaling messages reliable public switched telephone network (PSTN) over an IP network. SCTP是一个面向连接的协议,SCTP提供了在两个SCTP端点之间的一组IP地址间建立偶联的方法,通过这些已建立的偶联,SCTP端点可以发送SCTP分组。 SCTP is a connection-oriented protocol, SCTP provides a method for establishing a coupling between the set of IP addresses between two SCTP endpoints established by the coupling, SCTP endpoint may transmit a SCTP packet. 这里,所述SCTP端点是SCTP分组逻辑的接收方或发送方;偶联是两个SCTP端点间的一个对应关系,每个SCTP端点可对应一组IP地址,相应的,偶联即是两组IP地址之间的对应关系。 Here, the SCTP endpoint is a logical SCTP packet sender or recipient; coupling is a correspondence between the two SCTP endpoints, each SCTP endpoint may correspond to a set of IP addresses, corresponding, i.e., two sets of coupling correspondence between the IP address. 这里,所述偶联的建立过程如图1所示,采用“四次握手”机制实现。 Here, the process of establishing the coupling shown in Figure 1, a "handshake" mechanism implemented. 为了保证SCTP分组的有效性,每个SCTP分组头中都包含一个必备的验证标签字段和一个校验和字段,其中,所述校验和由SCTP分组的发送方设置,接收方对包含无效校验和的SCTP分组予以丢弃。 In order to ensure the effectiveness of the SCTP packet, each SCTP packet header contains a prerequisite verification tag field and a checksum field, wherein, the check and SCTP packet provided by the sender, the receiver of the invalid checksum SCTP packets to be discarded. 目前,传统版本的校验和算法为Adler-32,为了进一步提高校验和算法的可靠性,又提出了新版本的校验和算法,为:CRC-32。 At present, the traditional version of the checksum algorithm to Adler-32, in order to further improve the reliability of the checksum algorithm, also proposed a new version of the checksum algorithm, to: CRC-32.

[0003] 现有技术中,采用新版本校验和算法CRC-32的SCTP端点只能与采用校验和算法CRC-32的SCTP端点建立偶联,而无法与采用校验和算法Adler-32的SCTP端点建立偶联, 即:与采用老版本校验和算法的SCTP端点不兼容,进而,无法与现有网络中的设备兼容,影响了新版本校验和算法的广泛使用。 [0003] In the prior art, using a new version of a checksum algorithm SCTP endpoints can only be established in the CRC-32 conjugated with SCTP endpoint using the CRC-32 checksum algorithm, and a checksum algorithm can not be employed with Adler-32 SCTP endpoint coupling established, namely: not compatible with older versions of SCTP endpoint uses a checksum algorithm, thus, can not be compatible with existing network equipment, affecting the widespread use of the new version checksum algorithm.

发明内容 SUMMARY

[0004] 有鉴于此,本发明的主要目的在于提供一种实现校验和算法自适应选择的方法及装置,使得采用不同校验和算法的SCTP端点之间可建立偶联。 [0004] In view of this, the main object of the present invention is to provide a method and apparatus for implementing a checksum algorithm adaptively selected, so that the coupling may be established between SCTP endpoints using different check sum algorithm.

[0005] 为达到上述目的,本发明的技术方案是这样实现的: [0005] To achieve the above object, the technical solution of the present invention is implemented as follows:

[0006] 本发明提供了一种实现校验和算法自适应选择的方法,该方法包括: [0006] The present invention provides a method for implementing adaptive checksum algorithm selection, the method comprising:

[0007] 本端点选用第一校验和算法计算收到的来自对方端点的消息的校验和,确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法并尝试与对方端点重新建立偶联。 When the checksum, and the checksum calculated is determined to carry the message received checksums are not equal [0007] This first endpoint selected checksum algorithm received from the partner endpoint message, the choice of two checksum algorithm with the other end and try to re-establish the coupling.

[0008] 其中,所述计算来自对方端点的消息的校验和之前,还包括:判断是否收到来自对方端点的消息,收到来自对方端点的消息时,选用第一校验和算法计算来自对方端点的消息的校验和;未收到来自对方端点的消息时,选用第二校验和算法并尝试与对方端点重新建立偶联。 Before [0008] wherein, calculated from the other end of the message and a checksum, further comprising: determining whether a message is received from the partner endpoint, the endpoint receives a message from the other, a first checksum algorithm selected from check messages and other endpoints; the message is not received from the other end, the choice of the second checksum algorithm with the other end and try to re-establish the coupling.

[0009] 其中,所述本端点主动与对方端点建立偶联时,该方法具体为: [0009] wherein, when the active end with the other end of this coupling established, the method specifically comprises:

[0010] 向对方端点发送启动消息; [0010] An endpoint sends a start message to the other;

[0011] 判断是否收到来自对方端点的启动证实消息,如果没有收到来自对方端点的启动证实消息,则选用第二校验和算法并重新开始与对方端点建立偶联;如果收到来自对方端点的启动证实消息,则选用第一校验和算法计算启动证实消息的校验和,如果计算所得的校验和与收到的启动证实消息中携带的校验和相等,则向对方端点发送状态应答消息;如果计算所得的校验和与收到的启动证实消息中携带的校验和不相等,则选用第二校验和算法并重新开始与对方端点建立偶联; [0011] determines whether or not to start from the other end of the confirmed news, if not received start acknowledgment message from the other end, the second checksum algorithm selection and start over with each other to establish the endpoint coupling; if you receive from the other side start the endpoint acknowledgment message, the selection of the first checksum algorithm starts checksum verification message, if the checksum calculated and the checksum is equal to the message carried in the received start confirmed, the sending endpoint to the other status response message; if the checksum calculated and the resulting message carries the checksums are not equal to the received start confirmed, the selection of a second checksum algorithm restarts with each other and establish a coupling end;

[0012] 向对方端点发送状态应答消息后,判断是否收到来自对方端点的状态证实消息, 如果没有收到来自对方端点的状态证实消息,则选用第二校验和算法并重新开始与对方端点建立偶联;如果收到来自对方端点的状态证实消息,则选用第一校验和算法计算状态证实消息的校验和,如果计算所得的校验和与收到的状态证实消息中携带的校验和相等,则结束当前偶联建立过程;如果计算所得的校验和与收到的状态证实消息中携带的校验和不相等,则选用第二校验和算法并重新开始与对方端点建立偶联。 [0012] state to the other endpoint sends a response message, determines whether or not the status from the other end of the confirmation message, if the state does not receive confirmation message from the other endpoint, then the second checksum algorithm selection and start again with the other end establishing coupling; if the other endpoint receives a status acknowledgment message from the first state of the checksum algorithm selected and confirmed checksum, and if the calculated checksum message carries as received message confirmed correction inspection and equal, then the current coupling establishment procedure; if the checksum calculated and the resulting message carries the checksums are not equal and confirmed as received, the selection of a second checksum algorithm and restarted with each other to establish the endpoint coupling.

[0013] 其中,所述本端点被动与对方端点建立偶联时,该方法具体为: [0013] wherein, when the local endpoint to establish a passive coupling with the other end, the method specifically comprises:

[0014] 选用第一校验和算法计算接收到的启动消息,如果计算所得的校验和与收到的启动消息中携带的校验和相等,则向对方端点发送启动证实消息;如果计算所得的校验和与收到的启动消息中携带的校验和不相等,则选用第二校验和算法并重新开始与对方端点建立偶联; [0014] Selection of the first checksum algorithm to the received initiation message, if the checksum is calculated with the start message carrying the received checksum is equal to the resultant of the promoter to the other endpoint sends confirmation message; if the calculated checksum and start carrying the message received checksums are not equal, the choice of the second checksum algorithm and re-start and the other end coupled to the establishment;

[0015] 向对方端点发送启动证实消息后,判断是否收到来自对方端点的状态应答消息, 如果没有收到来自对方端点的状态应答消息,则选用第二校验和算法并重新开始与对方端点建立偶联;如果收到来自对方端点的状态应答消息,则选用第一校验和算法计算接收到的状态应答消息,如果计算所得的校验和与收到的状态应答消息中携带的校验和相等,则向对方端点发送状态证实消息,结束当前偶联建立过程;如果计算所得的校验和与收到的状态应答消息中携带的校验和不相等,则选用第二校验和算法并重新开始与对方端点建立偶联。 After [0015] Startup Authentication endpoint sends messages to each other, determines whether or not the status response message from the other endpoint, if no response is received from the message to the partner endpoint, the selection of a second checksum algorithm and restarted with each other endpoints establishing coupling; If you receive a reply message from the other endpoint state, the selection of the first checksum algorithm to the received status response message, if the calculated checksum with the received status response message carries a check and equal, the endpoint sends a confirmation message to the other state, the coupling end of the current establishment process; If the calculated checksum with the received status response message carries the checksums are not equal, then the second checksum algorithm selection and re-start building coupled with each other endpoints.

[0016] 上述方案中,所述第一校验和算法为CRC-32校验和算法;所述第二校验和算法为Adler-32校验和算法;或者,所述第一校验和算法为Adler-32校验和算法;所述第二校验和算法为CRC-32校验和算法。 [0016] In the above embodiment, the first checksum algorithm is CRC-32 checksum algorithm; the second check and Adler-32 algorithm is a checksum algorithm; Alternatively, the first checksum Adler-32 algorithm is a checksum algorithm; the second checksum algorithm is CRC-32 checksum algorithm.

[0017] 本发明还提供了一种实现校验和算法自适应选择的装置,该装置包括: [0017] The present invention further provides an apparatus for implementing a checksum algorithm adaptively selected, the apparatus comprising:

[0018] 收发模块,用于接收来自对方端点的消息并传输到存储模块存储; Message [0018] The transceiver module, for receiving the other end of the memory and transferred to the memory module;

[0019] 存储模块,用于存储来自对方端点的消息; [0019] The storing module, for storing messages from the other endpoint;

[0020] 计算比较模块,用于选用第一校验和算法计算收到的来自对方端点的消息的校验和,并在确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法,并触发收发模块重新与对方端点建立偶联。 [0020] The calculation and comparison means for checking the message and from the other end of the first checksum algorithm selection received and carried in the message to determine the resulting checksum calculation and received checksum when not equal, the choice of the second checksum algorithm, and trigger transceiver module to re-establish the endpoint coupled with each other.

[0021] 其中,所述计算比较模块在确定计算所得的校验和与收到的消息中携带的校验和相等时,进一步用于继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块继续与对方端点建立偶联。 Message [0021] wherein the checksum is calculated and is equal to the comparison module in determining the resulting carried calculated checksum with the received message, the selection is further continued for a subsequent checksum algorithm from a first end of the other checksum, and trigger the transceiver module continues to build with the other endpoint coupling.

[0022] 进一步地,该装置还包括: [0022] Further, the apparatus further comprising:

[0023] 判断处理模块,用于确定收到来自对方端点的消息时,触发计算比较模块进行校验和计算,确定未收到来自对方端点的消息时,通知计算比较模块更改校验和算法; When the [0023] determination processing module for determining the other endpoint receives a message from trigger comparator module calculates the checksum calculation, when determining not received a message from the other endpoint, change notification comparison module calculates a checksum algorithm;

[0024] 相应的,所述计算比较模块,还用于在判断处理模块确定未收到来自对方端点的消息时更改选用的校验和算法,并触发收发模块重新与对方端点建立偶联。 [0024] Accordingly, the calculation of the comparison module is further configured to change the checksum algorithm is selected when the determination module determines that the processing has not received a message from the other endpoint, and trigger the endpoint transceiver module re-established with the other coupling. [0025] 上述方案中,所述装置用于本端点主动建立偶联时, [0025] In the above embodiment, when the present device for coupling the initiative to establish the endpoint,

[0026] 所述收发模块接收来自对方端点的消息并传输到存储模块存储,具体为: Message [0026] The transceiver module receives from the other end of the storage module and transmitted to the storage, in particular:

[0027] 向对方端点发送启动消息或状态应答消息,接收来自对方端点的启动证实消息或状态证实消息,并将启动证实消息或状态证实消息传输到存储模块存储; [0027] message to the other endpoint sends a start response message or status, start from the other endpoint receives acknowledgment message or status confirmation message and start confirmation message or status confirmation message to the memory storage module;

[0028] 所述计算比较模块选用第一校验和算法计算收到的来自对方端点的消息的校验和,并在确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法,并触发收发模块重新与对方端点建立偶联,具体为: [0028] The calculation and comparison module selects a message from the other end of the first checksum and the received checksum algorithm and, and carried in the message and determine the calculated checksum with the received checksum is not are equal, the choice of a second checksum algorithm, triggering transceiver module and re-establish coupling with the other end, in particular:

[0029] 选用第一校验和算法计算启动证实消息或状态证实消息的校验和,将计算结果与启动证实消息或状态证实消息中携带的校验和作比较,确定与启动证实消息中携带的校验和相等时,继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块向对方端点发送状态应答消息,确定与状态证实消息中携带的校验和相等时,结束偶联建立过程;确定与来自对方端点的消息中携带的校验和不相等时,选用第二校验和算法计算,并触发收发模块向对方端点发送启动消息。 [0029] a first checksum algorithm selection start status or confirmation message confirms the checksum, the calculated results with the message start confirmation message or status confirm and compare the checksum message carried in the message carrying the determined start confirmed when the checksums are equal, the choice of continuing the first checksum algorithm to compute subsequent messages from the check and the other endpoint, and trigger the transceiver module sends a status response message to the other endpoint, and determine the status confirmation message carries checksum when equal, the end of the coupling setup procedure; determining when the checksums are not equal, the choice of a second checksum algorithm carried in the message from the other endpoint, and trigger the transceiver module transmits a start message to the other endpoint.

[0030] 上述方案中,所述装置用于本端点被动建立偶联时, [0030] In the above embodiment, when the means for coupling the local endpoint to establish a passive,

[0031] 所述收发模块接收来自对方端点的消息并传输到存储模块存储,具体为: Message [0031] The transceiver module receives from the other end of the storage module and transmitted to the storage, in particular:

[0032] 接收对方端点发送的启动消息或状态应答消息,向对方端点发送启动证实消息或状态证实消息,并将启动消息或状态应答消息传输到存储模块存储; [0032] the other endpoint receives initiation message or status response message sent to the other endpoint sends start confirmation message or status confirmation message transmission start message and the status response message or the storage to the storage module;

[0033] 所述计算比较模块选用第一校验和算法计算收到的来自对方端点的消息的校验和,并在确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法,并触发收发模块重新与对方端点建立偶联,具体为: [0033] The calculation and comparison module selects a message from the other end of the first checksum and the received checksum algorithm and, and carried in the message and determine the calculated checksum with the received checksum is not are equal, the choice of a second checksum algorithm, triggering transceiver module and re-establish coupling with the other end, in particular:

[0034] 选用第一校验和算法计算启动消息或状态应答消息的校验和,将计算结果与启动消息或状态应答消息中携带的校验和作比较,确定与启动消息或状态应答消息中携带的校验和相等时,继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块向对方端点发送启动证实消息或状态证实消息;确定与启动消息或状态应答消息中携带的校验和不相等时,选用第二校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块与对方端点建立偶联。 [0034] The checksum algorithm to calculate a first selection start status response message or the message checksum, starting with the calculation result or status message carried in the response message and checksum comparison, determining initiation message or status response message when parity checksums are equal, the choice of continuing the first checksum algorithm from the other end of the subsequent message and carried, and trigger the endpoint to the other transceiver module transmits a start confirmation message or status confirmation message; determining initiation message or status check response message when carrying checksums are not equal, the choice of algorithm to calculate a second checksum from the subsequent message and the other endpoint, and endpoint triggering transceiver modules to establish coupling with the counterpart.

[0035] 本发明提供的实现校验和算法自适应选择的方法及装置,本端点选用第一校验和算法计算收到的来自对方端点的消息的校验和,确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法并尝试与对方端点重新建立偶联。 [0035] The method and apparatus of the present invention to achieve a checksum algorithm provided adaptively selected, the check message from the other end of this first end checksum algorithm selected and received, the checksum is calculated to determine the resulting carrying the message received when checksums are not equal, the choice of the second checksum algorithm with the other end and try to re-establish the coupling. 本发明可实现采用新版本校验和算法CRC-32的SCTP端点与采用Adler-32或CRC-32校验和算法的SCTP端点均能建立偶联,进而实现了网络中新旧设备的兼容。 The present invention may be implemented using a new version of a checksum algorithm SCTP endpoints and CRC-32 uses the SCTP endpoint Adler-32 or CRC-32 checksum algorithm can establish coupling, so as to realize the old and new network-compatible device.

附图说明 BRIEF DESCRIPTION

[0036] 图1为采用“四次握手”机制实现偶联建立的示意图; [0036] FIG. 1 is a "handshake" to establish a mechanism to achieve a schematic view of the coupling;

[0037] 图2为本发明本端点主动建立偶联的方法实现流程示意图; [0037] FIG. 2 of the present invention, the present active end of the conjugated schematic flow chart of method for establishing implemented;

[0038] 图3为本发明本端点被动建立偶联的方法实现流程示意图; [0038] FIG. 3 of the present invention a passive method for establishing endpoint coupling a schematic flow diagram implemented;

[0039] 图4为本发明实现校验和算法自适应选择的装置结构示意图。 [0039] FIG. 4 is a schematic structural apparatus checksum algorithm adaptively selected to achieve the present invention.

具体实施方式[0040] 本发明的基本思想是:本端点选用第一校验和算法计算收到的来自对方端点的消息的校验和,确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法并尝试与对方端点重新建立偶联。 DETAILED DESCRIPTION [0040] The basic idea of ​​the invention is: The checksum endpoint selected, the other endpoint is determined from a first message received checksum algorithm to calculate the message checksum and the calculated carried in the received when the checksums are not equal, the choice of the second checksum algorithm with the other end and try to re-establish the coupling.

[0041] 对于不同的通信系统,所述校验和算法可为多种不同种类,下面以第一校验和算法、第二校验和算法分别为CRC-32校验和算法和Adler-32校验和算法为例对本发明的实现做详细说明。 [0041] For different communication systems, the checksum algorithm may be different species, following a first checksum algorithm, the second checksum algorithm are CRC-32 checksum, and Adler-32 algorithm a checksum algorithm described in detail an example of realization of the present invention.

[0042] 本发明中,所述本端点和对方端点均指任一SCTP端点,其中,所述对方端点支持CRC-32校验和算法、Adler-32校验和算法中的一种。 [0042] In the present invention, the other end of this end and refer to any one SCTP endpoint, wherein the endpoint supports other CRC-32 checksum algorithm, Adler-32 checksum algorithm is one kind.

[0043] 下面针对本端点主动建立偶联和被动建立偶联两种不同情况对所述校验和算法自适应选择的方法及装置进行描述。 [0043] The following endpoints for the present active and passive coupling to establish two different cases to establish coupling apparatus and method for adaptive selection algorithm and the check will be described.

[0044] 图2为本发明本端点主动建立偶联的方法实现流程示意图,如图2所示,该流程包括以下步骤: [0044] FIG. 2 of the present invention the initiative to establish the endpoint coupling flowchart of a method implemented, as shown in FIG. 2, which comprises the following steps:

[0045] 步骤201 :向对方端点发送启动(INIT)消息; [0045] Step 201: Start transmitting endpoint (the INIT) message to the other party;

[0046] 具体为:本端点选用CRC-32校验和算法计算待发送的启动消息的校验和,将计算所得的校验和填入启动消息中的校验和字段中,并将整条启动消息发送到对方端点。 [0046] Specifically: The endpoint selected CRC-32 checksum algorithm to calculate the start message to be transmitted checksum, the checksum calculation start message and fill the resulting checksum field, and the whole start message to the other endpoint.

[0047] 本发明中,本端点在主动和被动建立偶联的过程中均默认首先选用CRC-32校验和算法尝试与对方端点建立偶联,也可首先选用Adler-32校验和算法尝试与对方端点建立偶联。 [0047] In the present invention, in the process of the present active and passive end coupled both to establish a default the first choice and the CRC-32 checksum algorithm attempts to establish coupling with the other end, also Adler-32 checksum algorithm attempts first choice and the other end coupled to the establishment.

[0048] 步骤202 :判断是否收到来自对方端点的启动证实(INIT ACK)消息,如果收到来自对方端点的启动证实消息,则执行步骤203;如果没有收到来自对方端点的启动证实消息,则执行步骤207。 [0048] Step 202: determines whether or not to start confirmed (INIT ACK) message from the other endpoint, if receiving a start message from the other endpoint confirmed, step 203 is performed; if not received the start message from the other endpoint confirmed, step 207 is executed.

[0049] 本发明中,所述没有收到来自对方端点的消息,为:在设定时间内没有收到来自对方端点的消息;所述设定时间以秒为单位计算,如:1秒、或2秒、或0. 1秒等;如果没有收到来自对方端点的消息,即:对方端点没有回复消息,可能是由于对方端点计算所得本端点发送的消息的校验和与本端点发送的消息中携带的校验和不相等,则此次偶联的建立过程失败,选用另一种校验和算法并重新建立偶联。 [0049] In the present invention, the message is not received from the partner endpoint for: no other endpoint receives a message from within a set time; the set time, in seconds, is calculated as: 1 sec, or 2 seconds, 0.1 seconds, or the like; If no message from the other endpoint, namely: the other endpoint is not a reply message, probably because the other end of this calculated checksum endpoint sends the resulting message and transmits this endpoint message carries the checksums are not equal, then the process of establishing coupling failure, the choice of another checksum algorithm and re-establish the coupling.

[0050] 步骤203 :选用CRC-32校验和算法计算启动证实消息的校验和,如果计算所得的校验和与收到的启动证实消息中携带的校验和相等,则执行步骤204 ;如果计算所得的校验和与收到的启动证实消息中携带的校验和不相等,则执行步骤207。 [0050] Step 203: selection of CRC-32 checksum algorithm to calculate the checksum and starts, if the checksum calculated and the checksum is equal to the message carried in the received start confirmed, the confirmation message step 204; If the calculated checksum carried in the message does not match with the checksum received start confirmed, step 207 is executed.

[0051] 步骤204 :向对方端点发送状态应答(COOKIE ECHO)消息; [0051] Step 204: the status to the other endpoint sends a response (COOKIE ECHO) message;

[0052] 具体为:本端点选用CRC-32校验和算法计算待发送的状态应答消息的校验和,将计算所得的校验和填入状态应答消息中的校验和字段中,并将整条状态应答消息发送到对方端点。 [0052] Specifically: the present state of the computing endpoint selected to be transmitted and CRC-32 checksum algorithm response message checksum, checksum and the calculated fill status response message checksum field, and entire status response message to the other endpoint.

[0053] 步骤205 :判断是否收到来自对方端点的状态证实(C00KIEACK)消息,如果收到来自对方端点的状态证实消息,则执行步骤206 ;如果没有收到来自对方端点的状态证实消息,则执行步骤207; [0053] Step 205: determines whether or not the state was confirmed from the other endpoint (C00KIEACK) message, if the endpoint receives a status confirmation message from the other party, step 206 is performed; if not from the other endpoint receives a status confirmation message, then the step 207 is performed;

[0054] 这里,所述没有收到来自对方端点的消息,原因可能为:本端点的消息在传输到对方端点的过程中,由于网络破坏造成了本端点消息数据的差错,使得对方端点计算所得本端点发送的消息的校验和与本端点发送的消息中携带的校验和不相等,则此次偶联的建立过程失败,选用另一种校验和算法并重新建立偶联。 [0054] Here, the message is not received from the other endpoint, the reason may be: This message is transmitted to the endpoint in the other end of the process, damage caused due to network errors present the endpoint message data, so that the other endpoint calculated checksum message sent by the local endpoint carried checksums are not equal according to the message sent by the endpoint, the process of establishing the coupling fails, another checksum algorithm selection and re-establish coupling.

[0055] 步骤206 :选用CRC-32校验和算法计算状态证实消息的校验和,如果计算所得的校验和与收到的状态证实消息中携带的校验和相等,则执行步骤208 ;如果计算所得的校验和与收到的状态证实消息中携带的校验和不相等,则执行步骤207 ; [0055] Step 206: selection of CRC-32 checksum algorithm to calculate the checksum confirmed state, if the checksum calculated and the checksum is equal to the message carries confirmed as received, step 208 is executed in the message; If the calculated checksum carried in the message does not match with the checksum as received confirmed, step 207 is executed;

[0056] 这里,计算所得的校验和与收到的状态证实消息中携带的校验和不相等,原因可能为:对方端点的消息在传输到本端点的过程中,由于网络破坏造成了对方端点消息数据的差错,使得两校验和不相等,则此次偶联的建立过程失败,选用另一种校验和算法并重新建立偶联。 [0056] Here, the calculated checksum and the received state of the acknowledgment message carries the checksums are not equal, the reason may be: the other end of the transmission message to the endpoint of the present process, due to damage caused by the other network error message data endpoint, so that two checksums are not equal, the process of establishing the coupling fails, another checksum algorithm selection and re-establish coupling.

[0057] 步骤207 :选用Adler-32校验和算法并执行与步骤201至206相同的操作,如果没有收到对方端点返回的启动证实消息或状态证实消息,或计算所得的校验和与收到的启动证实消息或状态证实消息中携带的校验和不相等,则均执行步骤201,再次选用CRC-32校验和算法尝试与对方端点建立偶联,如果四次握手均选用Adler-32校验和算法完成,则执行步骤208。 [0057] Step 207: selection of Adler-32 checksum algorithm to step 201 and performs the same operation 206, if the other endpoint receives no start or status acknowledgment message returned confirmation message or checksum calculation and a resulting yield confirmed the news to start or confirm the status message carries the checksums are not equal, you have to step 201, once again chosen CRC-32 checksum algorithm attempts to establish coupled with each other endpoints, if the four-way handshake are selected Adler-32 checksum algorithm is complete, step 208 is executed.

[0058] 步骤208 :偶联建立过程结束。 [0058] Step 208: establishing coupling process ends.

[0059] 图3为本发明本端点被动建立偶联的方法实现流程示意图,如图3所示,该流程包括以下步骤: [0059] FIG. 3 is established passively coupling end flowchart of a method implemented, the present invention is shown in FIG. 3, which comprises the following steps:

[0060] 步骤301 :选用CRC-32校验和算法计算接收到的启动消息的校验和,如果计算所得的校验和与收到的启动消息中携带的校验和相等,则执行步骤302 ;如果计算所得的校验和与收到的启动消息中携带的校验和不相等,则执行步骤306。 [0060] Step 301: selection of CRC-32 checksum algorithm to calculate the start message received checksum, and if the calculated checksum with the start message carried in the received checksums are equal, step 302 is executed ; If the calculated checksum with the start message carried in the received checksums are not equal, step 306 is executed.

[0061] 步骤302 :向对方端点发送启动证实消息; [0061] Step 302: Start endpoint sends a confirmation message to the other;

[0062] 具体为:本端点选用CRC-32校验和算法计算待发送的启动证实消息的校验和,将计算所得的校验和填入启动证实消息中的校验和字段中,并将整条启动证实消息发送到对 [0062] Specifically: The endpoint selected CRC-32 checksum algorithm to calculate the checksum to be activated and sent to confirm the calculated checksum filled start confirmation message and the checksum field of the message, and Complete confirmation message sent to the start of

方端点。 Endpoint.

[0063] 步骤303 :判断是否收到来自对方端点的状态应答消息,如果收到来自对方端点的状态应答消息,则执行步骤304 ;如果没有收到来自对方端点的状态应答消息,则执行步骤306 ; [0063] Step 303: determining whether a response is received from the message to the partner endpoint, if the response from the other endpoint receives a status message, step 304 is performed; if not receive a state response message from the other endpoint, step 306 is executed ;

[0064] 这里,所述没有收到来自对方端点的消息,原因可能为:本端点的消息在传输到对方端点的过程中,由于网络破坏造成了本端点消息数据的差错,使得对方端点计算所得本端点发送的消息的校验和与本端点发送的消息中携带的校验和不相等,则此次偶联的建立过程失败,选用另一种校验和算法并重新建立偶联。 [0064] Here, the message is not received from the other endpoint, the reason may be: This message is transmitted to the endpoint in the other end of the process, damage caused due to network errors present the endpoint message data, so that the other endpoint calculated checksum message sent by the local endpoint carried checksums are not equal according to the message sent by the endpoint, the process of establishing the coupling fails, another checksum algorithm selection and re-establish coupling.

[0065] 步骤304 :选用CRC-32校验和算法计算接收到的状态应答消息的校验和,如果计算所得的校验和与收到的状态应答消息中携带的校验和相等,则执行步骤305 ;如果计算所得的校验和与收到的状态应答消息中携带的校验和不相等,则执行步骤306 ; [0065] Step 304: selection of CRC-32 checksum algorithm to the received status response message checksum, and if the calculated checksum with the received status response message carries the checksums are equal, is performed step 305; if the computed checksum with the received status response message carries the checksums are not equal, then step 306 is performed;

[0066] 这里,计算所得的校验和与收到的状态证实消息中携带的校验和不相等,原因可能为:对方端点的消息在传输到本端点的过程中,由于网络破坏造成了对方端点消息数据的差错,使得两校验和不相等,则此次偶联的建立过程失败,选用另一种校验和算法并重新建立偶联。 [0066] Here, the calculated checksum and the received state of the acknowledgment message carries the checksums are not equal, the reason may be: the other end of the transmission message to the endpoint of the present process, due to damage caused by the other network error message data endpoint, so that two checksums are not equal, the process of establishing the coupling fails, another checksum algorithm selection and re-establish coupling.

[0067] 步骤305 :向对方端点发送状态证实消息,结束当前偶联建立过程; [0067] Step 305: the status to the other endpoint sends confirmation message, ending the current process of establishing the coupling;

[0068] 具体为:本端点选用CRC-32校验和算法计算待发送的状态证实消息的校验和,将 [0068] Specifically: the present state of the computing endpoint selected to be transmitted and CRC-32 checksum algorithm to confirm and verify the message, the

9计算所得的校验和填入状态证实消息中的校验和字段中,并将整条状态证实消息发送到对方端点; 9 calculated checksum confirmation message fill status in the checksum field, and the whole was confirmed status messages sent to the counterpart terminal;

[0069] 这里,认为向对方端点发送状态证实消息后,如果对方端点能收到,则偶联建立过程结束。 [0069] Here, think back to the other endpoint sends a confirmation message status, if the other end to receive, then coupling the establishment process ends.

[0070] 步骤306 :选用Adler-32校验和算法并执行与步骤301至305相同的操作,如果没有收到对方端点返回的状态应答消息,或计算所得的校验和与收到的启动消息或状态应答消息中携带的校验和不相等,则执行步骤301,再次选用CRC-32校验和算法尝试与对方端点建立偶联,如果四次握手均选用Adler-32校验和算法完成,则偶联建立过程结束。 [0070] Step 306: selection of Adler-32 checksum algorithm and performs the same operations as steps 301 to 305, if the state does not receive a response message returned by the other end, or to the calculated checksum and the received initiation message or status response message carries the checksums are not equal, step 301, the choice again CRC-32 checksum algorithm attempts to establish coupled with each other endpoints, if the four-way handshake are selected Adler-32 checksum algorithm is complete, establish the coupling process ends.

[0071] 为实现上述方法,本发明还提供了一种实现校验和算法自适应选择的装置,如图4 所示,该装置包括:收发模块、存储模块和计算比较模块;其中, [0071] To achieve the above-described method, the present invention also provides an apparatus for implementing adaptive selection checksum algorithm, shown in Figure 4, the apparatus comprising: a transceiver module, a storage module and a calculation and comparison module; wherein,

[0072] 所述收发模块,用于向对方端点发送消息,接收来自对方端点的消息并传输到存储模块存储; [0072] The transceiver module, a message sends a message to the other endpoint, the receiving endpoint from the other module and transmitted to a storage memory;

[0073] 所述存储模块,用于存储来自对方端点的消息; [0073] The storing module, for storing the message from the other endpoint;

[0074] 所述计算比较模块,用于选用第一校验和算法计算来自对方端点的消息的校验和,将计算结果与来自对方端点的消息中携带的校验和作比较,确定两校验和相等时,仍继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块继续与对方端点建立偶联,确定两校验和不相等时,选用第二校验和算法,并触发收发模块重新与对方端点建立偶联;计算比较模块中计算校验和的消息来自存储模块。 [0074] The calculation and comparison means for comparing a checksum and the checksum algorithm to compute a first choice message from the other end of the checksum calculation result from the message carried in the other endpoint, determining two schools when inspection and equal, continue checksum algorithm to calculate a first selection of subsequent messages from the check and the other endpoint, and continue to trigger the transceiver module coupled with each other to establish the endpoint, determining two checksums are not equal, the choice of a second checksum algorithm, triggering transceiver module and re-establish coupling with the other end; Comparative calculating module calculates a checksum message from the memory module.

[0075] 该装置进一步包括判断处理模块,用于判断是否收到来自对方端点的消息,确定收到时,触发计算比较模块进行校验和计算,确定未收到时,通知计算比较模块更改校验和算法; [0075] The apparatus further comprises a processing determining means for determining whether a message is received from the partner endpoint, when so determined, to trigger a comparison module calculates the checksum calculation, determination is not received, the notification module changes the correction calculation and comparison inspection and algorithm;

[0076] 相应的,所述计算比较模块,还用于在判断处理模块确定收到来自对方端点的消息时,仍选用现用的校验和算法计算来自对方端点的消息的校验和;在判断处理模块确定未收到来自对方端点的消息时,更改选用的校验和算法,并触发收发模块重新与对方端点建立偶联。 [0076] Accordingly, the calculation and comparison module is further for determining when the processing module determines the endpoint receives a message from the other, still active selected checksum algorithm to calculate the checksum from the other end of the message; in determining the processing module determines a checksum algorithm not received from the other endpoint of the message, to change the selection, triggering transceiver module and re-establish the coupling with the other endpoint.

[0077] 所述装置用于本端点主动建立偶联时, The [0077] When the means for coupling the initiative to establish the local endpoint,

[0078] 所述收发模块向对方端点发送消息,接收来自对方端点的消息并传输到存储模块存储,具体为: [0078] The transceiver module to the other endpoint sends a message, the message received from the partner endpoint is stored and transmitted to the storage module, in particular:

[0079] 向对方端点发送启动消息或状态应答消息,接收来自对方端点的启动证实消息或状态证实消息,并将启动证实消息或状态证实消息传输到存储模块存储; [0079] message to the other endpoint sends a start response message or status, start from the other endpoint receives acknowledgment message or status confirmation message and start confirmation message or status confirmation message to the memory storage module;

[0080] 所述存储模块存储来自对方端点的消息,具体为: [0080] The storage module stores the message from the other end, in particular:

[0081] 存储来自对方端点的启动证实消息或状态证实消息; [0081] stored boot from the other end acknowledgment message or status confirmation message;

[0082] 所述判断处理模块判断是否收到来自对方端点的消息,确定收到时,触发计算比较模块进行校验和计算,确定未收到时,通知计算比较模块更改校验和算法,具体为: [0082] The determination processing module determines whether it has received a message from the other endpoint is determined when the received comparison module triggers calculating the checksum calculation, determination is not received, the notification module changes checksum calculation and comparison algorithms, specifically for:

[0083] 判断是否收到来自对方端点的启动证实消息或状态证实消息,确定收到时,触发计算比较模块进行校验和计算,确定未收到时,通知计算比较模块更改校验和算法; [0083] determines whether or not to start from the opposite end acknowledgment message or status confirmation message received to determine when to trigger a comparison module calculates the checksum calculation, determination is not received, a notification to change the comparison module calculates a checksum algorithm;

[0084] 所述计算比较模块选用第一校验和算法计算来自对方端点的消息的校验和,将计算结果与来自对方端点的消息中携带的校验和作比较,确定两校验和相等时,仍继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块继续与对方端点建立偶联,确定两校验和不相等时,选用第二校验和算法,并触发收发模块重新与对方端点建立偶联,具体为: Checksum calculation result [0084] The comparison module calculating a first checksum algorithm selected from the endpoint messages with each other and compare the checksum from the message carried in the other endpoint, and determine two checksums are equal when, continuing selection of a first checksum algorithm to calculate the checksum from the subsequent message and the other endpoint, and continue to trigger the transceiver module coupled with each other to establish the endpoint, determining two checksums are not equal, the choice of second checksum algorithms and trigger transceiver module to re-establish the endpoint coupled with each other, in particular:

[0085] 选用第一校验和算法计算启动证实消息或状态证实消息的校验和,将计算结果与启动证实消息或状态证实消息中携带的校验和作比较,确定与启动证实消息中携带的校验和相等时,仍继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块向对方端点发送状态应答消息,确定与状态证实消息中携带的校验和相等时,结束偶联建立过程;确定与来自对方端点的消息中携带的校验和不相等时,选用第二校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块向对方端点发送启动消息。 [0085] a first checksum algorithm selection start status or confirmation message confirms the checksum, the calculated results with the message start confirmation message or status confirm and compare the checksum message carried in the message carrying the determined start confirmed when the parity checksums are equal, the choice of continuing the first checksum algorithm to calculate from subsequent messages and other endpoint, and trigger the endpoint to the other transceiver module sends a status response message determine a state check message carries proven and equal, the process of establishing the end of the coupling; determining when the checksums are not equal, the choice of algorithm to calculate a second checksum from the subsequent message from the opposite end of the check carried in the message and the other endpoint, and trigger the transceiver module start sending a message to the other endpoint.

[0086] 所述装置用于本端点被动建立偶联时, [0086] When the means for coupling the local endpoint to establish a passive,

[0087] 所述收发模块向对方端点发送消息,接收来自对方端点的消息并传输到存储模块存储,具体为: [0087] The transceiver module to the other endpoint sends a message, the message received from the partner endpoint is stored and transmitted to the storage module, in particular:

[0088] 接收对方端点发送的启动消息或状态应答消息,向对方端点发送启动证实消息或状态证实消息,并将启动消息或状态应答消息传输到存储模块存储; [0088] receiving state or other initiation message endpoint sending a response message to the other endpoint sends start confirmation message or status confirmation message transmission start message and the status response message or the storage to the storage module;

[0089] 所述存储模块存储来自对方端点的消息,具体为: [0089] The storage module stores the message from the other end, in particular:

[0090] 存储来自对方端点的启动消息或状态应答消息; [0090] The storage status from initiation message or other response message endpoint;

[0091] 所述判断处理模块判断是否收到来自对方端点的消息,确定收到时,触发计算比较模块进行校验和计算,确定未收到时,通知计算比较模块更改校验和算法,具体为: [0091] The determination processing module determines whether it has received a message from the other endpoint is determined when the received comparison module triggers calculating the checksum calculation, determination is not received, the notification module changes checksum calculation and comparison algorithms, specifically for:

[0092] 判断是否收到来自对方端点的状态应答消息,确定收到时,触发计算比较模块进行校验和计算,确定未收到时,通知计算比较模块更改校验和算法; [0092] determines whether or not the status response message from the partner endpoint is determined when the received comparison module triggers calculating the checksum calculation, determination is not received, a notification to change the comparison module calculates a checksum algorithm;

[0093] 所述计算比较模块选用第一校验和算法计算来自对方端点的消息的校验和,将计算结果与来自对方端点的消息中携带的校验和作比较,确定两校验和相等时,仍继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块继续与对方端点建立偶联,确定两校验和不相等时,选用第二校验和算法,并触发收发模块重新与对方端点建立偶联,具体为: Checksum calculation result [0093] The comparison module calculating a first checksum algorithm selected from the endpoint messages with each other and compare the checksum from the message carried in the other endpoint, and determine two checksums are equal when, continuing selection of a first checksum algorithm to calculate the checksum from the subsequent message and the other endpoint, and continue to trigger the transceiver module coupled with each other to establish the endpoint, determining two checksums are not equal, the choice of second checksum algorithms and trigger transceiver module to re-establish the endpoint coupled with each other, in particular:

[0094] 选用第一校验和算法计算启动消息或状态应答消息的校验和,将计算结果与启动消息或状态应答消息中携带的校验和作比较,确定与启动消息或状态应答消息中携带的校验和相等时,仍继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块向对方端点发送启动证实消息或状态证实消息;确定与启动消息或状态应答消息中携带的校验和不相等时,选用第二校验和算法计算后续来自对方端点的消息的校验和, 并触发收发模块与对方端点建立偶联。 [0094] and the choice of algorithm to calculate a first checksum initiation message or status response message checksum, starting with the calculation result or status message carried in the response message and checksum comparison, determining initiation message or status response message when parity checksums are equal, the choice of continuing the first checksum algorithm subsequent messages from the other end and carried, and trigger the endpoint to the other transceiver module transmits a start confirmation message or status confirmation message; determining initiation message or check status response message when carrying the checksums are not equal, the choice of algorithm to calculate a second checksum subsequent messages from other endpoints and, transceivers with each other and trigger the endpoint to establish coupling.

[0095] 以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。 [0095] The above are only preferred embodiments of the present invention but are not intended to limit the scope of the present invention, any modifications within the spirit and principle of the present invention, equivalent replacements and improvements are It is included within the scope of the present invention.

Claims (6)

1. 一种实现校验和算法自适应选择的方法,其特征在于,该方法包括:本端点选用第一校验和算法计算收到的来自对方端点的消息的校验和,确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法并尝试与对方端点重新建立偶联;所述本端点主动与对方端点建立偶联时,该方法具体为:向对方端点发送启动消息;判断是否收到来自对方端点的启动证实消息,如果没有收到来自对方端点的启动证实消息,则选用第二校验和算法并重新开始与对方端点建立偶联;如果收到来自对方端点的启动证实消息,则选用第一校验和算法计算启动证实消息的校验和,如果计算所得的校验和与收到的启动证实消息中携带的校验和相等,则向对方端点发送状态应答消息;如果计算所得的校验和与收到的启动证实消息中携带的校验和不相等, CLAIMS 1. A method implemented checksum algorithm adaptively selected, wherein the method comprises: the local endpoint selected checksums to determine from the other end of the first message received checksum algorithm is calculated checksum with the received message when the checksums are not equal, and the choice of a second checksum algorithm attempts to re-establish the other end coupled carried; active when the local endpoint to establish coupling with the other end, the method specifically: to start sending a message to the other endpoint; determines whether or not to start from the other end of the confirmed news, if not received start acknowledgment message from the other end, the second checksum algorithm selection and start over with each other to establish even the endpoint linking; If you receive a start confirmation message from the other endpoint, and the choice of algorithm to calculate a first checksum startup Authentication checksum of start if the received checksum and the computed message carried in the acknowledgment message and are equal, then the endpoint sends a status response message to each other; If the calculated checksum carried in the message does not match with the checksum received confirmed start, 选用第二校验和算法并重新开始与对方端点建立偶联;向对方端点发送状态应答消息后,判断是否收到来自对方端点的状态证实消息,如果没有收到来自对方端点的状态证实消息,则选用第二校验和算法并重新开始与对方端点建立偶联;如果收到来自对方端点的状态证实消息,则选用第一校验和算法计算状态证实消息的校验和,如果计算所得的校验和与收到的状态证实消息中携带的校验和相等,则结束当前偶联建立过程;如果计算所得的校验和与收到的状态证实消息中携带的校验和不相等,则选用第二校验和算法并重新开始与对方端点建立偶联;所述本端点被动与对方端点建立偶联时,该方法具体为:选用第一校验和算法计算接收到的启动消息,如果计算所得的校验和与收到的启动消息中携带的校验和相等,则向对方端点发送启动证实消息;如 And a second selection of a checksum algorithm restarts with each other to establish coupling end; the endpoint sends a response message to the other state, determines whether or not the status from the other end of the confirmation message, if the state does not receive the confirmation message from the other endpoint, the selection of a second checksum algorithm restarts with each other and establish a coupling end; if the endpoint receives a status confirmation message from the other side, the selection of the first checksum and the checksum algorithm confirmed state, if the message calculated checksum and the checksum is equal to the state of the received acknowledgment message carried in, then the current coupling establishment procedure; if the resulting state of the received checksum calculations confirm message carries the checksums are not equal, and a second checksum algorithm selection begins again with the other end coupled established; when the local endpoint to establish a passive coupling with the other end, the method specifically comprises: a first selection of a checksum algorithm to calculate the start message received, if the resulting checksum is calculated starting with the message carried in the received checksums are equal, then starts sending to the other end confirmation message; as 计算所得的校验和与收到的启动消息中携带的校验和不相等,则选用第二校验和算法并重新开始与对方端点建立偶联;向对方端点发送启动证实消息后,判断是否收到来自对方端点的状态应答消息,如果没有收到来自对方端点的状态应答消息,则选用第二校验和算法并重新开始与对方端点建立偶联;如果收到来自对方端点的状态应答消息,则选用第一校验和算法计算接收到的状态应答消息,如果计算所得的校验和与收到的状态应答消息中携带的校验和相等,则向对方端点发送状态证实消息,结束当前偶联建立过程;如果计算所得的校验和与收到的状态应答消息中携带的校验和不相等,则选用第二校验和算法并重新开始与对方端点建立偶联。 The resulting checksum is calculated starting with the message carried in the received checksums are not equal, the selection of a second checksum algorithm restarts with each other and establish a coupling end; the other end to send an activation confirmation message, determines whether or not receive the reply message from the other end of the state, if no response is received a message from the other end of the state, the selection of the second checksum algorithm and re-start building coupled with the other end; if you receive status messages from the other endpoint of response , the selection of the first checksum algorithm to the received status response message, and if the calculated checksum with the checksum is equal to the resultant state of the received response message carried in the state to the other endpoint sends confirmation message terminates the current coupling establishment procedure; If the calculated checksum with the received status response message carries the checksums are not equal, the selection of a second checksum algorithm restarts with each other and establish a coupling end.
2.根据权利要求1所述的实现校验和算法自适应选择的方法,其特征在于,所述计算来自对方端点的消息的校验和之前,还包括:判断是否收到来自对方端点的消息,收到来自对方端点的消息时,选用第一校验和算法计算来自对方端点的消息的校验和;未收到来自对方端点的消息时,选用第二校验和算法并尝试与对方端点重新建立偶联。 The checksum algorithm implemented method of adaptively selected according to claim 1, characterized in that the message from the other end of said previously calculated checksum, further comprising: determining whether a message is received from the partner endpoint when verification, receives a message from the other endpoint, and the choice of algorithm to calculate a first checksum from the other endpoints and messages; message is not received from the other endpoint, and selection of the second checksum algorithm tries to end with each other re-establish the coupling.
3.根据权利要求1或2所述的实现校验和算法自适应选择的方法,其特征在于,所述第一校验和算法为CRC-32校验和算法;所述第二校验和算法为Adler-32校验和算法;或者, 所述第一校验和算法为Adler-32校验和算法;所述第二校验和算法为CRC-32校验和算法。 3. The method implemented for adaptively selecting checksum algorithm to claim 1 or claim 2, wherein said first checksum algorithm is CRC-32 checksum algorithm; and the second check Adler-32 algorithm is a checksum algorithm; Alternatively, the first checksum and Adler-32 algorithm is a checksum algorithm; the second checksum algorithm is CRC-32 checksum algorithm.
4. 一种实现校验和算法自适应选择的装置,其特征在于,该装置包括:收发模块,用于接收来自对方端点的消息并传输到存储模块存储;存储模块,用于存储来自对方端点的消息;计算比较模块,用于选用第一校验和算法计算收到的来自对方端点的消息的校验和, 并在确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法,并触发收发模块重新与对方端点建立偶联; 所述装置用于本端点主动建立偶联时,所述收发模块接收来自对方端点的消息并传输到存储模块存储,具体为: 向对方端点发送启动消息或状态应答消息,接收来自对方端点的启动证实消息或状态证实消息,并将启动证实消息或状态证实消息传输到存储模块存储;所述计算比较模块选用第一校验和算法计算收到的来自对方端点的消息的校验和,并在确定计 An apparatus for implementing a checksum algorithm adaptively selected, wherein, the apparatus comprising: a transceiver module for receiving a message from the counterpart terminal and transferred to the memory module of the storage; a storage module, for storing data from the other endpoint message; calculating a comparison module, for checking the message from the other end of the first checksum algorithm selected and received, and carried in the received message and a checksum calculation to determine the resulting checksum when not equal, the choice of a second checksum algorithm, triggering transceiver module and re-establish the coupling with the other end; said means for coupling the initiative to establish the local endpoint, receiving a message from the transceiver module and transmitted to the other endpoint storage module stores, specifically: initiation message to the other endpoint sends a status response message or, starting from the other endpoint receives acknowledgment message or status confirmation message and start confirmation message or status confirmation message to the memory storage module; comparing said computing module selects a message from the other end of the first checksum algorithm of the checksum received, and determines whether the count 所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法, 并触发收发模块重新与对方端点建立偶联,具体为:选用第一校验和算法计算启动证实消息或状态证实消息的校验和,将计算结果与启动证实消息或状态证实消息中携带的校验和作比较,确定与启动证实消息中携带的校验和相等时,继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块向对方端点发送状态应答消息,确定与状态证实消息中携带的校验和相等时,结束偶联建立过程;确定与来自对方端点的消息中携带的校验和不相等时,选用第二校验和算法计算, 并触发收发模块向对方端点发送启动消息; 所述装置用于本端点被动建立偶联时,所述收发模块接收来自对方端点的消息并传输到存储模块存储,具体为: 接收对方端点发送的启动消 The resulting checksum carried in the received message when the checksums are not equal, the choice of a second checksum algorithm, triggering transceiver module and re-establish coupling with the other end, in particular: a first checksum algorithm selection calculating the start confirmation message or status confirmation message checksum, starting with the calculation result confirmation message or verification message carries status and checksum comparison, determining the checksum is equal to the start message carries confirmed, continuing selection of a checksum algorithm to calculate the checksum from the other end of the subsequent message and, and trigger the endpoint to the other transceiver module sends a status response message, determining the checksum is equal to the message carries status was confirmed, the end of the coupling establishment procedure; determining when the checksums are not equal, the choice of a second checksum algorithm to calculate the message from the other end carries, and trigger the transceiver module transmits a start message to the other endpoint; means for said local endpoint to establish a passive coupling, the said message transceiver module receives from the other endpoint, and transmitted to the storage module stores, specifically: receiving endpoint sends a start cancellation counterpart 或状态应答消息,向对方端点发送启动证实消息或状态证实消息,并将启动消息或状态应答消息传输到存储模块存储;所述计算比较模块选用第一校验和算法计算收到的来自对方端点的消息的校验和,并在确定计算所得的校验和与收到的消息中携带的校验和不相等时,选用第二校验和算法, 并触发收发模块重新与对方端点建立偶联,具体为:选用第一校验和算法计算启动消息或状态应答消息的校验和,将计算结果与启动消息或状态应答消息中携带的校验和作比较,确定与启动消息或状态应答消息中携带的校验和相等时,继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块向对方端点发送启动证实消息或状态证实消息;确定与启动消息或状态应答消息中携带的校验和不相等时,选用第二校验和算法计算后续来自对方端 Or status response message to the other endpoint sends start confirmation message or status confirmation message and the status response message or the start message transmitted to the storage module stores; from the other computing module selects a first comparison algorithm received checksum endpoint and the check message, and carried in the message to determine the checksum calculated and received checksums are not equal when, a second checksum algorithm selection, and trigger the endpoint transceiver module to re-establish with the other coupling , specifically: a first checksum algorithm selection start status response message or the message checksum, the results with initiation message or a status check and compare the response message carries, determines initiation message or status response message when carried checksums are equal, the choice of continuing the first checksum algorithm to compute subsequent messages from the check and the other endpoint, and to trigger the endpoint to the other transceiver module transmits a start confirmation message or status confirmation message; determining initiation message or status response message when carrying the checksums are not equal, the choice of algorithm to calculate a second checksum from the opposite end of the follow-up 的消息的校验和,并触发收发模块与对方端点建立偶联。 Check the message and, and trigger the transceiver module and the other end coupled to the establishment.
5.根据权利要求4所述的实现校验和算法自适应选择的装置,其特征在于,所述计算比较模块在确定计算所得的校验和与收到的消息中携带的校验和相等时,进一步用于继续选用第一校验和算法计算后续来自对方端点的消息的校验和,并触发收发模块继续与对方端点建立偶联。 5. implement the checksum algorithm means 4 adaptively selected according to claim wherein said comparison module in determining the calculated checksum and the calculated checksum is equal to the received message carrying the , continue to check for further checksum algorithm to calculate a first selection from the subsequent message and the other endpoint, and continue to trigger the transceiver module coupled with each other to establish the endpoint.
6.根据权利要求4或5所述的实现校验和算法自适应选择的装置,其特征在于,该装置还包括:判断处理模块,用于确定收到来自对方端点的消息时,触发计算比较模块进行校验和计算,确定未收到来自对方端点的消息时,通知计算比较模块更改校验和算法;相应的,所述计算比较模块,还用于在判断处理模块确定未收到来自对方端点的消息时更改选用的校验和算法,并触发收发模块重新与对方端点建立偶联。 The checksum algorithm to achieve 4 or 5 of the adaptive selection means as claimed in claim, wherein the apparatus further comprises: determining a processing module for determining the other endpoint receives a message from, the trigger calculation and comparison checksum calculation module, when determining not received a message from the other endpoint, change notification comparison module calculates a checksum algorithm; correspondingly, the calculation and comparison module is further configured to determining the processing module determines not received from the other change the selected message endpoint checksum algorithm, and trigger transceiver module to re-establish the endpoint coupled with each other.
CN 200910087389 2009-06-19 2009-06-19 Method and device for realizing self-adapting selection of checkum algorithm CN101588221B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910087389 CN101588221B (en) 2009-06-19 2009-06-19 Method and device for realizing self-adapting selection of checkum algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910087389 CN101588221B (en) 2009-06-19 2009-06-19 Method and device for realizing self-adapting selection of checkum algorithm

Publications (2)

Publication Number Publication Date
CN101588221A CN101588221A (en) 2009-11-25
CN101588221B true CN101588221B (en) 2012-07-04

Family

ID=41372303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910087389 CN101588221B (en) 2009-06-19 2009-06-19 Method and device for realizing self-adapting selection of checkum algorithm

Country Status (1)

Country Link
CN (1) CN101588221B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103875312B (en) * 2011-10-07 2016-07-06 皇家飞利浦有限公司 For have verify with the method and apparatus that communicates of the DMX512 of improvement

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123485A (en) 2007-09-20 2008-02-13 杭州华三通信技术有限公司 iSCSI packet processing method and device, error recovery method and device
CN101252476A (en) 2008-03-18 2008-08-27 华为技术有限公司 Apparatus and method for malfunction detection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123485A (en) 2007-09-20 2008-02-13 杭州华三通信技术有限公司 iSCSI packet processing method and device, error recovery method and device
CN101252476A (en) 2008-03-18 2008-08-27 华为技术有限公司 Apparatus and method for malfunction detection

Also Published As

Publication number Publication date
CN101588221A (en) 2009-11-25

Similar Documents

Publication Publication Date Title
JP5684301B2 (en) Transaction timeout processing in communication session management
KR101106926B1 (en) Submit report handling in smsip
EP1768296A2 (en) Method and apparatus for transmitting signaling data messages in a wireless communications system
US6785259B2 (en) Enhanced transmission of critical data
US20070070931A1 (en) Adaptive data delivery
CN100375409C (en) Method of radio chain circuit control resetting or treatment of timer after reconstitution in radio communication system
CN1139219C (en) Method and system for implementing hybrid automatic request using parity check combining
JP4574014B2 (en) System and method for improved data transmission in packet-switched communication networks
CN100338898C (en) Apparatus and method for establishing a session in a radio network organized with mobile nodes
KR101159363B1 (en) Reliable request-response messaging over a request-response transport
US7502860B1 (en) Method and apparatus for client-side flow control in a transport protocol
US7394788B2 (en) Method and system for setting TCP proxy to reduce packet loss and transmission delay in wire/wireless integrated IP network
JP2002009692A (en) Data transmitter and data transmission method
JPH11243419A (en) Rate control system for tcp layer
JP2000507777A (en) The method and apparatus of the data recovery of Arq equipment
KR20070082872A (en) Apparatus and method for operating automatic repeat request in a broadband wireless access communication system
KR20060064517A (en) Verifying and maintaining connection liveliness in a reliable messaging for web services environment
CN1177498C (en) Device and method for repeatly transmitting error block data of radio local loop
US6415331B1 (en) Method of updating accumulated data with middleware and server system performing the same
US8239670B1 (en) Multi-aspect identifier in network protocol handshake
CN1187996C (en) Method for controlling data-flow in communication system
CN1156124C (en) Method and equipment for grouping transmission data
CN100531124C (en) Controller apparatus, mobile terminal, and communication control method
KR101440670B1 (en) A method and a network element for controlling the end-to-end overload based on the diameter application
EP1536589B1 (en) Transmitter device for controlling data transmission

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
TR01