CN118900290A - Message processing method, device, equipment and readable storage medium - Google Patents
Message processing method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN118900290A CN118900290A CN202310493929.1A CN202310493929A CN118900290A CN 118900290 A CN118900290 A CN 118900290A CN 202310493929 A CN202310493929 A CN 202310493929A CN 118900290 A CN118900290 A CN 118900290A
- Authority
- CN
- China
- Prior art keywords
- service message
- service
- data header
- identification information
- message
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 claims abstract description 71
- 238000012545 processing Methods 0.000 claims description 39
- 238000012790 confirmation Methods 0.000 claims description 38
- 230000005540 biological transmission Effects 0.000 abstract description 36
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 21
- 238000013507 mapping Methods 0.000 description 11
- 230000003287 optical effect Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000002457 bidirectional effect Effects 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- DWSYCUKCNSVBRA-UHFFFAOYSA-N 4-(5-methylsulfonyltetrazol-1-yl)phenol Chemical compound CS(=O)(=O)C1=NN=NN1C1=CC=C(C=C1)O DWSYCUKCNSVBRA-UHFFFAOYSA-N 0.000 description 1
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 101150012532 NANOG gene Proteins 0.000 description 1
- 101100396520 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) TIF3 gene Proteins 0.000 description 1
- 101710167643 Serine/threonine protein phosphatase PstP Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009432 framing Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 101150038107 stm1 gene Proteins 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/50—Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种报文处理方法、装置、设备和可读存储介质,涉及数据传输技术领域,以解决业务报文的丢包率较高,业务报文的传输可靠性较低的问题。该方法应用于第一设备,方法包括:通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头,第一数据头包括第一状态信息和第一序列标识信息;基于第一状态信息确定第二业务报文;将第二数据头与第二业务报文进行关联,第二数据头包括第二状态信息和第二序列标识信息;通过目标网络侧链路向第二设备发送第二业务报文和第二数据头。本发明实施例可降低业务报文的丢包率。
The present invention discloses a message processing method, device, equipment and readable storage medium, which relates to the field of data transmission technology, to solve the problem of high packet loss rate of business messages and low transmission reliability of business messages. The method is applied to a first device, and the method includes: receiving a first business message and a first data header sent by a second device through a target network side link, the first data header including first state information and first sequence identification information; determining a second business message based on the first state information; associating the second data header with the second business message, the second data header including second state information and second sequence identification information; sending the second business message and the second data header to the second device through the target network side link. The embodiment of the present invention can reduce the packet loss rate of business messages.
Description
技术领域Technical Field
本发明涉及数据传输技术领域,尤其涉及一种报文处理方法、装置、设备和可读存储介质。The present invention relates to the technical field of data transmission, and in particular to a message processing method, device, equipment and readable storage medium.
背景技术Background Art
面向多业务接入,光传送网(Optical Transport Network,OTN)需要支持多种不同业务的传输管道,包括第五代移动通信技术(5th-Generation,5G)、第四代移动通信技术(the 4th Generation mobile communication technology,4G)、集客和家宽等。针对不同业务需要不同的传输等级,对于部分类型的业务,要求其对应的业务报文在以任意两个客户侧OTN设备(Customer Premise Equipment OTN,CPE OTN)设备之间传输的过程中无丢包。For multi-service access, the Optical Transport Network (OTN) needs to support transmission pipelines for a variety of different services, including the fifth-generation mobile communication technology (5G), the fourth-generation mobile communication technology (4G), customer and home broadband, etc. Different services require different transmission levels. For some types of services, it is required that the corresponding service messages are transmitted between any two customer-side OTN devices (Customer Premise Equipment OTN, CPE OTN) without packet loss.
现有技术中CPE OTN设备之间进行业务报文传输时,在业务报文没有被正确接收时难以及时发现并重发该业务报文,导致业务报文的丢包率较高,业务报文的传输可靠性较低。In the prior art, when CPE OTN devices transmit service messages, it is difficult to timely discover and resend the service message when the service message is not correctly received, resulting in a high packet loss rate of the service message and low transmission reliability of the service message.
发明内容Summary of the invention
本发明实施例提供一种报文处理方法、装置、设备和可读存储介质,以解决业务报文的丢包率较高,业务报文的传输可靠性较低的问题。The embodiments of the present invention provide a message processing method, apparatus, device and readable storage medium to solve the problems of high packet loss rate of business messages and low transmission reliability of business messages.
第一方面,本发明实施例提供了一种报文处理方法,应用于第一设备,所述方法包括:In a first aspect, an embodiment of the present invention provides a message processing method, which is applied to a first device, and the method includes:
通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头,所述第一数据头与所述第一业务报文关联,所述第一数据头包括第一状态信息和第一序列标识信息,所述第一状态信息用于表征所述第二设备对所述第一设备发送的业务报文的接收状态,所述第一序列标识信息用于标识所述第一业务报文的序列号;receiving, through the target network side link, a first service message and a first data header sent by a second device, where the first data header is associated with the first service message, and the first data header includes first state information and first sequence identification information, where the first state information is used to characterize a reception state of the service message sent by the first device by the second device, and the first sequence identification information is used to identify a sequence number of the first service message;
基于所述第一状态信息确定第二业务报文;Determine a second service message based on the first status information;
将第二数据头与所述第二业务报文进行关联,所述第二数据头包括第二状态信息和第二序列标识信息,所述第二状态信息用于表征所述第一设备对所述第二设备发送的业务报文的接收状态,所述第二序列标识信息用于标识所述第二业务报文的序列号;Associating a second data header with the second service message, where the second data header includes second state information and second sequence identification information, where the second state information is used to characterize a reception state of the service message sent by the first device to the second device, and the second sequence identification information is used to identify a sequence number of the second service message;
通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头。The second service message and the second data header are sent to the second device through the target network side link.
可选地,所述目标网络侧链路包括N条网络侧链路,N为大于1的正整数;所述将第二数据头与所述第二业务报文进行关联,包括:Optionally, the target network side link includes N network side links, where N is a positive integer greater than 1; and associating the second data header with the second service message includes:
生成与所述N条网络侧链路一一对应的N个第二数据头,每个所述第二数据头包括对应的链路标识;Generate N second data headers corresponding one-to-one to the N network-side links, each of the second data headers including a corresponding link identifier;
分别将所述N个第二数据头中每个第二数据头与所述第二业务报文进行关联;Associating each of the N second data headers with the second service message respectively;
所述通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头,包括:The sending the second service message and the second data header to the second device through the target network side link includes:
通过所述N条网络侧链路中每一条网络侧链路向所述第二设备发送所述网络侧链路对应的第二数据头和所述第二业务报文。The second data header and the second service message corresponding to the network side link are sent to the second device through each of the N network side links.
可选地,所述第一状态信息包括第一确认标识信息和第一丢包标识信息,所述第一确认标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收成功的业务报文的序列号,所述第一丢包标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收失败的业务报文的序列号。Optionally, the first status information includes first confirmation identification information and first packet loss identification information, the first confirmation identification information is used to identify the sequence number of the service message successfully received by the second device in the service message sent by the first device, and the first packet loss identification information is used to identify the sequence number of the service message failed to be received by the second device in the service message sent by the first device.
可选地,所述基于所述第一状态信息确定第二业务报文,包括:Optionally, determining the second service message based on the first state information includes:
基于所述第一丢包标识信息,将所述第一设备发送的业务报文中所述第二设备接收失败的业务报文确定为第二业务报文。Based on the first packet loss identification information, a service message sent by the first device and which fails to be received by the second device is determined as a second service message.
可选地,所述第一数据头还包括业务标识信息,所述业务标识信息用于表征所述第一业务报文对应的目标业务,所述通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头之前,所述方法还包括:Optionally, the first data header further includes service identification information, where the service identification information is used to characterize a target service corresponding to the first service message. Before sending the second service message and the second data header to the second device through the target network side link, the method further includes:
基于所述业务标识信息确定所述目标业务;Determine the target service based on the service identification information;
基于预先定义的业务与网络侧链路的对应关系,确定所述目标业务对应的目标网络侧链路。Based on the predefined correspondence between the service and the network side link, a target network side link corresponding to the target service is determined.
可选地,所述将第二数据头与所述第二业务报文进行关联,包括:Optionally, associating the second data header with the second service message includes:
将所述第二数据头添加至所述第二业务报文中。Add the second data header to the second service message.
可选地,所述将第二数据头与所述第二业务报文进行关联,包括:Optionally, associating the second data header with the second service message includes:
将所述第二数据头插入所述第二业务报文之间的空闲字节中。The second data header is inserted into the idle bytes between the second service messages.
第二方面,本发明实施例还提供一种报文处理装置,第一设备包括所述报文处理装置,所述报文处理装置包括:In a second aspect, an embodiment of the present invention further provides a message processing device, wherein a first device includes the message processing device, and the message processing device includes:
接收模块,用于通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头,所述第一数据头与所述第一业务报文关联,所述第一数据头包括第一状态信息和第一序列标识信息,所述第一状态信息用于表征所述第二设备对所述第一设备发送的业务报文的接收状态,所述第一序列标识信息用于标识所述第一业务报文的序列号;a receiving module, configured to receive, through a target network side link, a first service message and a first data header sent by a second device, wherein the first data header is associated with the first service message, the first data header includes first status information and first sequence identification information, the first status information is used to characterize a reception status of the service message sent by the first device by the second device, and the first sequence identification information is used to identify a sequence number of the first service message;
第一确定模块,用于基于所述第一状态信息确定第二业务报文;A first determining module, used to determine a second service message based on the first state information;
关联模块,用于将第二数据头与所述第二业务报文进行关联,所述第二数据头包括第二状态信息和第二序列标识信息,所述第二状态信息用于表征所述第一设备对所述第二设备发送的业务报文的接收状态,所述第二序列标识信息用于标识所述第二业务报文的序列号;an associating module, configured to associate a second data header with the second service message, wherein the second data header includes second state information and second sequence identification information, wherein the second state information is used to characterize a reception state of the service message sent by the first device to the second device, and the second sequence identification information is used to identify a sequence number of the second service message;
发送模块,用于通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头。A sending module is used to send the second service message and the second data header to the second device through the target network side link.
第三方面,本发明实施例还提供一种第一设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;In a third aspect, an embodiment of the present invention further provides a first device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor;
所述处理器,用于读取存储器中的程序实现如第一方面所述的方法中的步骤。The processor is used to read the program in the memory to implement the steps in the method described in the first aspect.
第四方面,本发明实施例还提供一种可读存储介质,用于存储程序,所述程序被处理器执行时实现如第一方面所述的方法中的步骤。In a fourth aspect, an embodiment of the present invention further provides a readable storage medium for storing a program, wherein the program, when executed by a processor, implements the steps in the method described in the first aspect.
在本申请实施例中,第一设备通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头。第一设备根据第一数据头包括的第一状态信息,可以确定第二设备对所述第一设备发送的业务报文的接收状态;第一设备根据第一数据头包括的第一序列标识信息,可以确定第一设备对第二设备发送的业务报文的接收状态。第一设备可以及时确定业务报文的收发情况,从而对传输失败的业务报文及时进行重发等处理,从而提高业务报文的传输可靠性,降低丢包率。In an embodiment of the present application, the first device receives the first service message and the first data header sent by the second device through the target network side link. The first device can determine the reception status of the service message sent by the first device to the second device based on the first status information included in the first data header; the first device can determine the reception status of the service message sent by the first device to the second device based on the first sequence identification information included in the first data header. The first device can promptly determine the reception and transmission status of the service message, so as to promptly retransmit the service message that fails to be transmitted, thereby improving the transmission reliability of the service message and reducing the packet loss rate.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
图1是CPE OTN传输网络设备的结构示意图;FIG1 is a schematic diagram of the structure of a CPE OTN transmission network device;
图2是本发明实施例提供的报文处理方法的流程图;2 is a flow chart of a message processing method provided by an embodiment of the present invention;
图3a是本发明实施例提供的数据接收方式示意图之一;FIG3a is a schematic diagram of one of the data receiving methods provided in an embodiment of the present invention;
图3b是本发明实施例提供的数据接收方式示意图之二;FIG3b is a second schematic diagram of a data receiving method provided in an embodiment of the present invention;
图4a是本发明实施例提供的数据接收方式示意图之三;FIG4a is a third schematic diagram of a data receiving method provided in an embodiment of the present invention;
图4b是本发明实施例提供的数据接收方式示意图之四;FIG4b is a fourth schematic diagram of a data receiving method provided in an embodiment of the present invention;
图5a是本发明实施例提供的第二业务报文的结构示意图;FIG5a is a schematic diagram of the structure of a second service message provided by an embodiment of the present invention;
图5b是本发明实施例提供的目标数据报文的结构示意图之一;FIG5b is one of the structural schematic diagrams of the target data message provided by an embodiment of the present invention;
图5c是本发明实施例提供的数据目标数据报文的结构示意图之二;FIG5c is a second schematic diagram of the structure of a data target data message provided by an embodiment of the present invention;
图6a是本发明实施例提供的业务报文的传输方式示意图之一;FIG6a is a schematic diagram of one of the transmission modes of service messages provided in an embodiment of the present invention;
图6b是本发明实施例提供的业务报文的传输方式示意图之二;FIG6b is a second schematic diagram of a transmission method of a service message provided in an embodiment of the present invention;
图7是本发明实施例提供的CPE OTN芯片OSU映射处理流程示意图;7 is a schematic diagram of a CPE OTN chip OSU mapping process flow according to an embodiment of the present invention;
图8是本发明实施例提供的OTN管控平台建立连接链路示意图;8 is a schematic diagram of establishing a connection link on an OTN management and control platform according to an embodiment of the present invention;
图9是本发明实施例提供的收发数据流示意图;9 is a schematic diagram of a data flow for sending and receiving provided in an embodiment of the present invention;
图10是本发明实施例提供的CPE OTN芯片发送业务报文的处理流程示意图;10 is a schematic diagram of a processing flow of a CPE OTN chip sending a service message according to an embodiment of the present invention;
图11是本发明实施例提供的CPE OTN芯片接收业务报文的处理流程示意图;11 is a schematic diagram of a process flow of receiving a service message by a CPE OTN chip according to an embodiment of the present invention;
图12是本发明实施例提供的CPE OTN芯片之间的交互流程示意图之一;12 is a schematic diagram of one of the interaction flow diagrams between CPE OTN chips provided in an embodiment of the present invention;
图13是本发明实施例提供的CPE OTN芯片之间的交互流程示意图之二;13 is a schematic diagram of the second interaction process between CPE OTN chips provided in an embodiment of the present invention;
图14是本发明实施例提供的报文处理装置的结构示意图;14 is a schematic diagram of the structure of a message processing device provided in an embodiment of the present invention;
图15是本发明实施例提供的第一设备的结构示意图。FIG. 15 is a schematic diagram of the structure of a first device provided in an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally represents that the objects associated with each other are in an "or" relationship.
本发明实施例提供了一种报文处理方法,示例性地,本发明实施例提供的报文处理方法可以应用于CPE OTN设备对业务报文进行处理,更具体地,所述方法可以应用于CPEOTN传输网络设备的主芯片(简称CPE OTN芯片)对业务报文进行处理。An embodiment of the present invention provides a message processing method. Exemplarily, the message processing method provided by the embodiment of the present invention can be applied to a CPE OTN device to process service messages. More specifically, the method can be applied to a main chip of a CPE OTN transmission network device (referred to as a CPE OTN chip) to process service messages.
为了方便理解,下面将首先对CPE OTN芯片的相关内容进行简要介绍。For ease of understanding, the following will first briefly introduce the relevant contents of the CPE OTN chip.
5G网络需要支持多种业务和应用场景,例如具有更高带宽、更低时延的增强移动宽带(Enhanced Mobile Broadband,eMBB)业务、支持海量用户连接的物联网(MassiveMachine-Type Communication,mMTC)业务,以及超高可靠性、超低时延的(UltraReliable&Low Latency Communication,uRLLC)等。可以预见的是,5G时代,将会引入许多新的用户应用,例如:密集城区无处不在的高清/超高清甚至三维(3Dimensions,3D)全息影片和视频、任何地方100Mbps的高速用户体验、大于350km/h的高速移动应用、传感网、触觉互联网、电子医疗(E-Health)、自然灾害监测等。5G networks need to support a variety of services and application scenarios, such as enhanced mobile broadband (eMBB) services with higher bandwidth and lower latency, massive machine-type communication (mMTC) services that support massive user connections, and ultra-reliable and low latency (ultra-reliable & low latency communication, uRLLC), etc. It is foreseeable that many new user applications will be introduced in the 5G era, such as ubiquitous high-definition/ultra-high-definition and even three-dimensional (3D) holographic films and videos in dense urban areas, high-speed user experience of 100Mbps anywhere, high-speed mobile applications greater than 350km/h, sensor networks, tactile Internet, e-health, natural disaster monitoring, etc.
由于5G网络需求,需要同时支持不同业务类型的传输,提出了新的技术挑战,如大带宽、低时延、硬隔离、灵活连接、统一管控和高精度时间同步等。对于已有的4G传输技术,在各个方面都不能满足5G挑战,需要新的切片传输网技术体制来支持5G业务的传输。Due to the requirements of 5G networks, it is necessary to support the transmission of different types of services at the same time, which poses new technical challenges, such as large bandwidth, low latency, hard isolation, flexible connection, unified management and control, and high-precision time synchronization. The existing 4G transmission technology cannot meet the 5G challenges in all aspects, and a new slicing transmission network technology system is needed to support the transmission of 5G services.
5G传输基于切片传输网(Slicing Packet Network,SPN)机制。数据通过用户侧接口(User-to-Network Interface,UNI)进入SPN传输设备后,先经过数据分类,区分数据类型,进入网络侧接口(Network Node Interface或者Network to Network Interface,NNI)转发流程。5G transmission is based on the Slicing Packet Network (SPN) mechanism. After the data enters the SPN transmission device through the user-side interface (User-to-Network Interface, UNI), it is first classified and distinguished by data type before entering the network-side interface (Network Node Interface or Network to Network Interface, NNI) forwarding process.
面向多业务接入,SPN/OTN需要支持多种不同业务的传输管道,包括5G、4G、集客和家宽等,针对不同业务需要不同的传输等级,涉及带宽、时延、抖动、可靠性和安全性等,需要配置不同的传输管道来满足需要。如图1所示,CPE OTN传输网络设备支持多业务接入,支持E1、快速以太网(Fast Ethernet,FE)、千兆以太网(Gigabit Ethernet,GE)、10GE局域网(Local Area Network,LAN)、同步传输模块(STM-Synchronous Transfer Module,STM)-1、STM-4等客户业务的固定数量接入,支持客户侧业务映射到OTN线路口。在主芯片执行多业务(E1、FE、GE、10GE LAN、STM-1、STM-4等客户业务)接入、OTN业务传输、(多业务传送平台(Multi-Service Transport Platform,MSTP)多业务和以太网(Ether Net,ETH)功能。CPEOTN主芯片支持功能包括业务映射处理、链路监控和保护、以太网虚拟局域网(VirtualLocal Area Network,VLAN)转发和操作维护管理(Operation Administration andMaintenance)以及频率同步等。For multi-service access, SPN/OTN needs to support transmission pipelines for a variety of different services, including 5G, 4G, customer and home broadband, etc. Different services require different transmission levels, involving bandwidth, latency, jitter, reliability and security, etc. Different transmission pipelines need to be configured to meet the needs. As shown in Figure 1, CPE OTN transmission network equipment supports multi-service access, supports a fixed number of customer services such as E1, Fast Ethernet (FE), Gigabit Ethernet (GE), 10GE Local Area Network (LAN), Synchronous Transfer Module (STM-Synchronous Transfer Module, STM)-1, STM-4, etc., and supports mapping of customer-side services to OTN line ports. The main chip performs multi-service (E1, FE, GE, 10GE LAN, STM-1, STM-4 and other customer services) access, OTN service transmission, (Multi-Service Transport Platform (MSTP) multi-service and Ethernet (ETH) functions. The CPE OTN main chip supports functions including service mapping processing, link monitoring and protection, Ethernet virtual local area network (VLAN) forwarding and operation and maintenance management (Operation Administration and Maintenance) and frequency synchronization.
针对多种业务接入,需要在主芯片支持多种接口,业务映射路径和OTN业务处理。在OTN业务处理时,需要处理多种级联映射(VC12、VC4、STM1、STM4、STM16、OTN0和OTN1等)、多种封装(通用成帧规程(Generic Framing Procedure,GFP)、通用映射规程(GenericMapping Procedure,GMP)、异步映射规程(Asynchronous Mapping Procedure,AMP)/比特同步映射规程(Bit-synchronous Mapping Procedure,BMP)等)和SNCP保护等。For multiple service access, the main chip needs to support multiple interfaces, service mapping paths and OTN service processing. When processing OTN services, it is necessary to process multiple cascade mappings (VC12, VC4, STM1, STM4, STM16, OTN0 and OTN1, etc.), multiple encapsulations (Generic Framing Procedure (GFP), Generic Mapping Procedure (GMP), Asynchronous Mapping Procedure (AMP)/Bit-synchronous Mapping Procedure (BMP), etc.) and SNCP protection.
为了方便描述,在后续的实施例中将以本发明实施例应用于CPE OTN设备的主芯片(简称CPE OTN芯片)对业务报文进行处理的场景中为例进行说明。在上述应用场景中,第一设备和第二设备均为CPE OTN芯片,两侧的CPE OTN芯片均通过执行本发明实施例提供的报文处理方法,不断进行业务报文的传输和处理。For the convenience of description, in the subsequent embodiments, the embodiment of the present invention is applied to the scenario where the main chip of the CPE OTN device (referred to as the CPE OTN chip) processes the service message. In the above application scenario, the first device and the second device are both CPE OTN chips, and the CPE OTN chips on both sides continuously transmit and process the service message by executing the message processing method provided by the embodiment of the present invention.
请参见图2,本发明实施例提供了一种报文处理方法,应用于第一设备,所述报文处理方法具体包括以下步骤:Referring to FIG. 2 , an embodiment of the present invention provides a message processing method, which is applied to a first device. The message processing method specifically includes the following steps:
步骤201,通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头,所述第一数据头与所述第一业务报文关联,所述第一数据头包括第一状态信息和第一序列标识信息,所述第一状态信息用于表征所述第二设备对所述第一设备发送的业务报文的接收状态,所述第一序列标识信息用于标识所述第一业务报文的序列号。Step 201: Receive a first service message and a first data header sent by a second device through a target network side link, wherein the first data header is associated with the first service message, and the first data header includes first status information and first sequence identification information, wherein the first status information is used to characterize a reception status of the service message sent by the second device to the first device, and the first sequence identification information is used to identify a sequence number of the first service message.
在具体实现时,第一设备和第二设备之间不断进行业务报文的传输,第一设备向第二设备发送第一设备侧的业务报文,第二设备向第一设备发送第二设备侧的业务报文,第一设备接收到业务报文后存储相应的业务报文。其中,第一业务报文为第二设备侧的业务报文。In a specific implementation, the first device and the second device continuously transmit service messages, the first device sends the service message of the first device side to the second device, the second device sends the service message of the second device side to the first device, and the first device stores the corresponding service message after receiving the service message. Among them, the first service message is the service message of the second device side.
第一业务报文和第一数据头的数量在此不做限定,第一业务报文和第一数据头的数量相同,每一个第一业务报文均与一个第一数据头关联。第一设备发送业务报文的时间间隔与第二设备发送业务报文的时间间隔可能相同或不同,第一业务报文的数量基于第一设备发送业务报文的时间间隔确定。The number of first service messages and first data headers is not limited here, the number of first service messages and first data headers is the same, and each first service message is associated with a first data header. The time interval for the first device to send service messages may be the same as or different from the time interval for the second device to send service messages, and the number of first service messages is determined based on the time interval for the first device to send service messages.
为了方便理解,下面举例说明。示例性地,第一设备作为业务报文的发送方,在时刻A向第二设备发送业务报文A,在时刻B向第二设备发送业务报文B。第一设备作为业务报文的接收方同时接收第二设备发送的业务报文,则第一业务报文为时刻A和时刻B之间第一设备接收到的业务报文,其数量受到时刻A和时刻B之间时间差的长度以及第二设备发送业务报文的速度的影响。For ease of understanding, an example is given below. For example, the first device, as the sender of the service message, sends service message A to the second device at time A, and sends service message B to the second device at time B. The first device, as the receiver of the service message, simultaneously receives the service message sent by the second device. The first service message is the service message received by the first device between time A and time B, and the number of the first service messages is affected by the length of the time difference between time A and time B and the speed at which the second device sends the service message.
第二设备向第一设备发送业务报文时是按照业务报文的序列号依次发送的,第一序列标识信息可以标识当前的第一业务报文为第二设备发送的第几个业务报文。When the second device sends service messages to the first device, the service messages are sent in sequence according to the sequence numbers of the service messages. The first sequence identification information may identify the number of service messages sent by the second device that the current first service message is.
第一数据头与第一业务报文关联,因此第一数据头中的第一序列标识信息用于标识该第一业务报文的序列号。第一设备基于第一序列标识信息可以确定当前收到的第一业务报文的序列号,进而判断第二设备侧的业务报文是否有丢包。The first data header is associated with the first service message, so the first sequence identification information in the first data header is used to identify the sequence number of the first service message. The first device can determine the sequence number of the currently received first service message based on the first sequence identification information, and then determine whether the service message on the second device side has packet loss.
可选地,在一些实施例中,目标网络侧链路包括N条网络侧链路,N为大于1的正整数。第二设备通过N条网络侧链路发送第一业务报文和第一数据头,第一设备通过N条网络侧链路接收第二设备发送的第一业务报文和第一数据头。Optionally, in some embodiments, the target network side link includes N network side links, where N is a positive integer greater than 1. The second device sends the first service message and the first data header through the N network side links, and the first device receives the first service message and the first data header sent by the second device through the N network side links.
应理解的是,第二设备在N条网络侧链路均会发送第一业务报文和第一数据头,因此第一设备在N条网络侧链路的每一条链路上均可以接收到第一业务报文和第一数据头,其具体接收方式在此不做限定。It should be understood that the second device will send the first service message and the first data header on N network side links, so the first device can receive the first service message and the first data header on each link of the N network side links, and the specific receiving method is not limited here.
作为一种可选的实施方式,预先将所述N条网络侧链路中任一条网络侧链路确定为主链路,将所述N条网络侧链路中除所述主链路外其他的网络侧链路确定为备份链路。第一设备从主链路接收第二设备发送的第一业务报文和第一数据头,并基于第一序列标识信息确定主链路是否存在未成功接收的业务报文,在主链路存在未成功接收的业务报文的情况下,基于第一序列标识信息确定未成功接收的业务报文的序列号,从所述备份链路接收所述未成功接收的业务报文。As an optional implementation, any one of the N network side links is determined in advance as a main link, and the other network side links of the N network side links except the main link are determined as backup links. The first device receives the first service message and the first data header sent by the second device from the main link, and determines whether there is an unsuccessfully received service message on the main link based on the first sequence identification information. If there is an unsuccessfully received service message on the main link, the sequence number of the unsuccessfully received service message is determined based on the first sequence identification information, and the unsuccessfully received service message is received from the backup link.
为了方便描述,将本实施例提供的配置模式成为固定模式,下面将举例说明。目标网络侧链路包括Link1和Link2,预先确定Link1为主链路,Link2为备份链路,固定使用Link1的业务报文为主数据,将Link2的业务报文作为备份数据,只有当没有收到Link1的业务报文时,使用其他链路的备份数据的对应序列号的业务报文来作为接收数据进行业务处理。For the convenience of description, the configuration mode provided in this embodiment is called a fixed mode, and an example is given below. The target network side links include Link1 and Link2, Link1 is predetermined as the main link, Link2 is predetermined as the backup link, the service message of Link1 is fixedly used as the main data, and the service message of Link2 is used as the backup data, and only when the service message of Link1 is not received, the service message of the corresponding sequence number of the backup data of other links is used as the received data for service processing.
第二设备分别在Link1和Link2上传输业务报文以及每一个业务报文关联的数据头。在正常情况下,如图3a所示,Link1处于正常状态,接收数据队列从Link1来读取数据,第一设备从Link1上依次接收各个业务报文。当link1数据丢失或者短路后,接收数据队列从Link2来读取数据。The second device transmits the service message and the data header associated with each service message on Link1 and Link2 respectively. Under normal circumstances, as shown in Figure 3a, Link1 is in a normal state, the receiving data queue reads data from Link1, and the first device receives each service message from Link1 in sequence. When the link1 data is lost or short-circuited, the receiving data queue reads data from Link2.
示例性地,如图3b所示,第一设备从Link1上依次接收序列号为1、2、3、4的业务报文,但是由于Link1上序列号为5的业务报文丢失,因此第一设备从Link2上接收序列号为5的业务报文。Exemplarily, as shown in FIG3b , the first device receives service messages with sequence numbers 1, 2, 3, and 4 in sequence from Link1 , but since the service message with sequence number 5 on Link1 is lost, the first device receives the service message with sequence number 5 from Link2 .
作为另一种可选的实施方式,根据所述N条网络侧链路中每一条网络侧链路上第一业务报文的达到时间,从到达时间最早的网络侧链路上接收第一业务报文。As another optional implementation, according to the arrival time of the first service message on each network side link among the N network side links, the first service message is received from the network side link with the earliest arrival time.
为了方便描述,将本实施例提供的配置模式成为最优模式,下面将举例说明。目标网络侧链路包括Link1和Link2,从Link1和Link2收到的数据都可以为主数据,并互为备份,按照到达时间先到先用的原则,按照到达业务报文的序列号顺序进行处理。For the convenience of description, the configuration mode provided in this embodiment is called the optimal mode, and an example is given below. The target network side link includes Link1 and Link2, and the data received from Link1 and Link2 can be primary data and back up each other. The data is processed according to the first-come-first-served principle and the sequence number order of the arriving service messages.
如图4a所示,对于序列号为5的业务报文,当业务报文到达时间T1<T2时,Link1到达先于Link2,第一设备从Link1接收序列号为5的业务报文。对于序列号为6的业务报文,如图4b所示,当业务报文达到时间T3>T4时,Link2到达先于Link1,第一设备从Link2接收序列号为6的业务报文。As shown in FIG4a, for a service message with a sequence number of 5, when the service message arrives at time T1<T2, Link1 arrives earlier than Link2, and the first device receives the service message with a sequence number of 5 from Link1. For a service message with a sequence number of 6, as shown in FIG4b, when the service message arrives at time T3>T4, Link2 arrives earlier than Link1, and the first device receives the service message with a sequence number of 6 from Link2.
步骤202,基于所述第一状态信息确定第二业务报文。Step 202: Determine a second service message based on the first status information.
第一状态信息用于表征第二设备对第一设备侧的业务报文的接收状态,其中,接收状态包括接收成功和接收失败。第一设备在接收到第二设备侧的业务报文的同时,基于第一数据头中的第一状态信息可以确定自身发送的业务报文的接收状态,进而适应性地调整业务报文的发送。The first status information is used to characterize the reception status of the service message of the first device side by the second device, wherein the reception status includes successful reception and failed reception. When the first device receives the service message of the second device side, it can determine the reception status of the service message sent by itself based on the first status information in the first data header, and then adaptively adjust the sending of the service message.
可选地,在一些实施例中,所述步骤202基于所述第一丢包标识信息,将所述第一设备发送的业务报文中所述第二设备接收失败的业务报文确定为第二业务报文。Optionally, in some embodiments, the step 202 determines, based on the first packet loss identification information, a service message sent by the first device and which fails to be received by the second device as a second service message.
在第一设备基于第一状态信息确定其发送至第二设备的业务报文中某个业务报文没有被正确接收的情况下,第一设备可以选择在任意时刻重新发送该业务报文。When the first device determines, based on the first status information, that a certain service message among the service messages sent by the first device to the second device is not correctly received, the first device may choose to resend the service message at any time.
可选地,在一些实施例中,所述第一状态信息包括第一确认标识信息和第一丢包标识信息,所述第一确认标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收成功的业务报文的序列号,所述第一丢包标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收失败的业务报文的序列号。Optionally, in some embodiments, the first status information includes first confirmation identification information and first packet loss identification information, the first confirmation identification information is used to identify the sequence number of the service message successfully received by the second device in the service message sent by the first device, and the first packet loss identification information is used to identify the sequence number of the service message failed to be received by the second device in the service message sent by the first device.
在具体实现时,第一设备和第二设备之间不断地进行业务报文的双向传输,因此第一设备和第二设备互相之间传输的业务报文的数量通常为多个。In a specific implementation, the first device and the second device continuously perform bidirectional transmission of service messages, so the number of service messages transmitted between the first device and the second device is usually multiple.
作为一种可选的实施方式,第一确认标识信息中包括所有第二设备接收成功的第一设备侧的业务报文的序列号,第一丢包标识信息包括所有第二设备接收失败的第一设备侧的业务报文的序列号。As an optional implementation, the first confirmation identification information includes the serial numbers of all service messages on the first device side that are successfully received by the second device, and the first packet loss identification information includes the serial numbers of all service messages on the first device side that are failed to be received by the second device.
示例性地,第一设备向第二设备发送了6个业务报文,其序列号依次为0、1、2、3、4、5,其中,序列号为2、4的业务报文没有被第二设备成功接收。在该实施例中,第二设备向第一设备发送业务报文时关联的数据头中第一确认标识信息为“0、1、3、5”,第一丢包标识信息为“2、4”。Exemplarily, the first device sends 6 service messages to the second device, whose sequence numbers are 0, 1, 2, 3, 4, and 5, respectively, wherein the service messages with sequence numbers 2 and 4 are not successfully received by the second device. In this embodiment, when the second device sends a service message to the first device, the first confirmation identification information in the associated data header is "0, 1, 3, 5", and the first packet loss identification information is "2, 4".
作为另一种可选的实施方式,第一确认标识信息中包括最大序列号,所述最大序列号为所有第二设备接收成功的第一设备侧的业务报文的序列号中的最大值,用于表征除第一丢包标识信息包括的序列号以外,其余小于或等于所述最大序列号的序列号对应的业务报文均被成功接收。As another optional implementation, the first confirmation identification information includes a maximum sequence number, which is the maximum value of the sequence numbers of all service messages on the first device side that are successfully received by the second device, and is used to indicate that, except for the sequence number included in the first packet loss identification information, all other service messages corresponding to sequence numbers that are less than or equal to the maximum sequence number are successfully received.
示例性地,第一设备向第二设备发送了6个业务报文,其序列号依次为0、1、2、3、4、5,其中,序列号为2、4的业务报文没有被第二设备成功接收。在本实施例中,第二设备向第一设备发送业务报文时关联的数据头中第一确认标识信息为“5”,第一丢包标识信息为“2、4”。根据第一确认标识信息可知,除2、4以外其他小于或等于5的序列号(即0、1、3、5)对应的业务报文均被成功接收。通过本实施例提供的方法,可以减少第一确认标识信息占用的比特数,提高了资源的利用率。Exemplarily, the first device sends 6 service messages to the second device, whose serial numbers are 0, 1, 2, 3, 4, and 5, respectively, among which the service messages with serial numbers 2 and 4 are not successfully received by the second device. In this embodiment, when the second device sends a service message to the first device, the first confirmation identification information in the associated data header is "5", and the first packet loss identification information is "2, 4". According to the first confirmation identification information, except for 2 and 4, the service messages corresponding to the serial numbers less than or equal to 5 (i.e., 0, 1, 3, 5) are all successfully received. Through the method provided in this embodiment, the number of bits occupied by the first confirmation identification information can be reduced, thereby improving the utilization rate of resources.
在该实施例中,第一状态信息包括第一确认标识信息和第一丢包标识信息,第一确认标识信息用于标识第一设备发送的业务报文中第二设备接收成功的业务报文的序列号,第一丢包标识信息用于标识第一设备发送的业务报文中第二设备接收失败的业务报文的序列号。通过上述设置,第一设备可以基于第一状态信息中的序列号快速判断每一个业务报文的接收情况,提高了第一设备确定业务报文接收情况的便捷性、准确度和效率。In this embodiment, the first status information includes first confirmation identification information and first packet loss identification information, the first confirmation identification information is used to identify the sequence number of the service message successfully received by the second device in the service message sent by the first device, and the first packet loss identification information is used to identify the sequence number of the service message failed to be received by the second device in the service message sent by the first device. Through the above settings, the first device can quickly determine the reception status of each service message based on the sequence number in the first status information, thereby improving the convenience, accuracy and efficiency of the first device in determining the reception status of the service message.
步骤203,将第二数据头与所述第二业务报文进行关联,所述第二数据头包括第二状态信息和第二序列标识信息,所述第二状态信息用于表征所述第一设备对所述第二设备发送的业务报文的接收状态,所述第二序列标识信息用于标识所述第二业务报文的序列号。Step 203: associate a second data header with the second service message, wherein the second data header includes second status information and second sequence identification information, wherein the second status information is used to characterize a reception status of the service message sent by the first device to the second device, and the second sequence identification information is used to identify a sequence number of the second service message.
由于第一设备接收到的业务报文均关联有数据头,因此,第一设备可以基于接收到的业务报文的序列号判断是否未成功接收的业务报文,并确定未成功接收的业务报文的序列号。Since the service messages received by the first device are all associated with a data header, the first device can judge whether the service messages are unsuccessfully received based on the sequence numbers of the received service messages, and determine the sequence numbers of the unsuccessfully received service messages.
示例性地,第一设备在已经接收并存储了第二设备发送的序列号为0、1、2、3的业务报文后,通过第一数据头确定当前接收到的第一业务报文的序列号为5,此时第一设备结合已成功接收的业务报文的序列号以及当前接收到的业务报文的序列号即可确定,序列号为4的业务报文没有被正确接收。Exemplarily, after the first device has received and stored the business messages with serial numbers 0, 1, 2, and 3 sent by the second device, it determines through the first data header that the serial number of the currently received first business message is 5. At this time, the first device combines the serial numbers of the successfully received business messages and the serial number of the currently received business message to determine that the business message with serial number 4 has not been correctly received.
第一设备基于接收到的业务报文的序列号确定了哪些业务报文被成功接收,哪些业务报文没有被成功接收后,即可生成第二状态信息。After the first device determines which service messages are successfully received and which service messages are not successfully received based on the sequence numbers of the received service messages, the second status information may be generated.
在一些实施例中,所述第二状态信息包括第二确认标识信息和第二丢包标识信息,所述第二确认标识信息用于标识所述第二设备发送的业务报文中所述第一设备接收成功的业务报文的序列号,所述第二丢包标识信息用于标识所述第二设备发送的业务报文中所述第一设备接收失败的业务报文的序列号。In some embodiments, the second status information includes second confirmation identification information and second packet loss identification information, the second confirmation identification information is used to identify the sequence number of the service message successfully received by the first device in the service message sent by the second device, and the second packet loss identification information is used to identify the sequence number of the service message failed to be received by the first device in the service message sent by the second device.
生成第二数据头后,将第二数据头的第二序列标识信息设置为第二业务报文的序列号,完成第二数据头与第二业务报文的关联,以使第二设备接收到第二业务报文和第二数据头后可以确定第二业务报文的序列号以及第一设备对第一业务报文的接收状态。After generating the second data header, the second sequence identification information of the second data header is set to the serial number of the second business message, completing the association between the second data header and the second business message, so that after the second device receives the second business message and the second data header, it can determine the serial number of the second business message and the reception status of the first device for the first business message.
步骤204,通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头。Step 204: Send the second service message and the second data header to the second device through the target network side link.
可选地,作为一种可选的实施方式,所述步骤203包括:Optionally, as an optional implementation, step 203 includes:
将所述第二数据头添加至所述第二业务报文中。Add the second data header to the second service message.
在本实施方式中,将所述第二数据头添加至所述第二业务报文,得到目标数据报文。In this implementation, the second data header is added to the second service message to obtain a target data message.
通过所述目标网络侧链路向所述第二设备发送所述目标数据报文。The target data message is sent to the second device via the target network side link.
在本实施方式中,将第二数据头插入第二业务报文中,成为业务报文中的一部分,得到目标数据报文。第二业务报文的具体结构可以参见相关技术中的描述,在此不做赘述,在具体实现时,可以根据实际需求将第二数据头添加至第二业务报文的任意位置中,例如以太报文的中间、头部和尾部等。In this embodiment, the second data header is inserted into the second service message and becomes a part of the service message to obtain the target data message. The specific structure of the second service message can refer to the description in the related art, which will not be repeated here. In the specific implementation, the second data header can be added to any position of the second service message according to actual needs, such as the middle, head and tail of the Ethernet message.
示例性地,第二业务报文的结构如图5a所示,第二业务报文包括媒体访问控制(Media Access Control,MAC)、虚拟局域网(Virtual Local Area Network,VLAN)、多协议标签交换(Multi-Protocol Label Switching,MPLS)、网际互连协议(Internet Protocol,IP)、负载(Payload)和帧检验序列(Frame Check Sequence,FCS)。Exemplarily, the structure of the second service message is shown in Figure 5a, and the second service message includes media access control (Media Access Control, MAC), virtual local area network (Virtual Local Area Network, VLAN), multi-protocol label switching (Multi-Protocol Label Switching, MPLS), Internet Protocol (Internet Protocol, IP), payload (Payload) and frame check sequence (Frame Check Sequence, FCS).
作为一种可选的实施方式,将第二数据头添加至业务报文的头部,得到如图5b所示的目标数据报文,得到第二数据头+ETH的形式。作为另一种可选的实施方式,将第二数据头添加在IP头之后,得到如图5c所示的目标数据报文,得到ETH+IP+第二数据头+Payload的形式。As an optional implementation, the second data header is added to the header of the service message to obtain the target data message as shown in Figure 5b, and the second data header + ETH format is obtained. As another optional implementation, the second data header is added after the IP header to obtain the target data message as shown in Figure 5c, and the ETH + IP + second data header + Payload format is obtained.
在该实施例中,将第二数据头添加至第二业务报文,得到目标数据报文;通过目标网络侧链路向第二设备发送目标数据报文。通过上述方法,构建目标数据报文并进行目标数据报文的传输,使得第二数据头与第二业务报文的关联更加紧密,避免出现第二数据头和第二业务报文中仅一者被成功接收的情况。由于本实施例改变了链路层的帧结构,链路层的报文处理流程也会相应的变化。In this embodiment, the second data header is added to the second service message to obtain the target data message; the target data message is sent to the second device through the target network side link. Through the above method, the target data message is constructed and the target data message is transmitted, so that the second data header and the second service message are more closely associated, avoiding the situation where only one of the second data header and the second service message is successfully received. Since this embodiment changes the frame structure of the link layer, the message processing flow of the link layer will also change accordingly.
可选地,作为另一种可选的实施方式,所述步骤203包括:Optionally, as another optional implementation, step 203 includes:
将所述第二数据头插入所述第二业务报文之间的空闲字节中。The second data header is inserted into the idle bytes between the second service messages.
在本实施方式中,通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头,其中,所述第二数据头占用空闲块进行传输。In this embodiment, the second service message and the second data header are sent to the second device via the target network side link, wherein the second data header occupies an idle block for transmission.
在业务报文的传输中,在帧之间存在空闲块(或者称为空闲字节),利用空闲块对第二数据头进行传输。示例性地,如图6a所示,ETH报文之间有20比特(Bytes)的帧间隙和前导码,如图6b所示,利用帧间隙和前导码对第二数据头进行传输。In the transmission of the service message, there are idle blocks (or idle bytes) between frames, and the second data header is transmitted using the idle blocks. For example, as shown in FIG6a, there are 20 bits (Bytes) of frame gap and preamble between ETH messages, and as shown in FIG6b, the second data header is transmitted using the frame gap and preamble.
在该实施例中,占用空闲块来传输第二数据头。通过帧之间的空闲字节进行第二数据头的传输,仅影响物理层的处理流程,不会影响第二业务报文的结构,使得第二业务报文的数据处理可以兼容现有的数据处理流程,处理过程更加便捷和高效。In this embodiment, the second data header is transmitted by occupying the idle block. The second data header is transmitted by using the idle bytes between frames, which only affects the processing flow of the physical layer and does not affect the structure of the second service message, so that the data processing of the second service message can be compatible with the existing data processing flow, and the processing process is more convenient and efficient.
可选地,在一些实施例中,所述目标网络侧链路包括N条网络侧链路,N为大于1的正整数;所述步骤203包括:Optionally, in some embodiments, the target network side link includes N network side links, where N is a positive integer greater than 1; and step 203 includes:
生成与所述N条网络侧链路一一对应的N个第二数据头,每个所述第二数据头包括对应的链路标识;Generate N second data headers corresponding one-to-one to the N network-side links, each of the second data headers including a corresponding link identifier;
分别将所述N个第二数据头中每个第二数据头与所述第二业务报文进行关联;Associating each of the N second data headers with the second service message respectively;
所述步骤204包括:The step 204 includes:
通过所述N条网络侧链路中每一条网络侧链路向所述第二设备发送所述网络侧链路对应的第二数据头和所述第二业务报文。The second data header and the second service message corresponding to the network side link are sent to the second device through each of the N network side links.
由于目标网络侧链路包括N条网络侧链路,因此需要相应地生成N个第二数据头,以便与每一个网络侧链路上传输的第二业务报文进行关联。每一个第二数据头均包括链路标识,用于标识该第二数据头在哪一条网络侧链路上传输。Since the target network side link includes N network side links, N second data headers need to be generated accordingly to be associated with the second service message transmitted on each network side link. Each second data header includes a link identifier for identifying on which network side link the second data header is transmitted.
在生成N个第二数据头后,分别将N个第二数据头包括的第一序列标识信息设置为其关联的第二业务报文的序列号,实现每个第二数据头与第二业务报文的关联。After generating N second data headers, the first sequence identification information included in the N second data headers is respectively set as the sequence number of the second service message associated therewith, so as to associate each second data header with the second service message.
在每一条网络侧链路上分别发送第二业务报文和第二数据头,以使第二设备接收第二业务报文和第二数据头。其中,第二设备接收第二业务报文和第二数据头的方式可以参见图3a-图4b部分的相关说明,在此不做赘述。The second service message and the second data header are respectively sent on each network side link so that the second device receives the second service message and the second data header. The manner in which the second device receives the second service message and the second data header can be referred to the relevant description of FIG. 3a to FIG. 4b, which will not be described here.
在该实施方式中,目标网络侧链路包括至少两条网络侧链路,第一设备通过至少两条网络侧链路向第二设备发送第二数据头与第二业务报文,在任一条网络侧链路出现丢包的情况下,第二设备仍可以从其他网络侧链路接收第二数据头与第二业务报文,提高了第二设备对第二业务报文接收的成功率,降低了丢包率。In this embodiment, the target network side link includes at least two network side links. The first device sends the second data header and the second service message to the second device through at least two network side links. In the event of packet loss in any one of the network side links, the second device can still receive the second data header and the second service message from other network side links, thereby improving the success rate of the second device in receiving the second service message and reducing the packet loss rate.
在实际应用过程中,CPE OTN芯片支持多业务接入,针对不同业务需要不同的传输等级,部分业务对丢包率的要求较低(例如业务类型为50ms电信级保护的业务),无需通过本实施例提供的方法进行报文的处理。In actual application, the CPE OTN chip supports multi-service access, and different services require different transmission levels. Some services have lower requirements on packet loss rate (for example, services with 50ms carrier-grade protection), and there is no need to process messages using the method provided in this embodiment.
可选地,在一些实施例中,所述第一数据头还包括业务标识信息,所述业务标识信息用于表征所述第一业务报文对应的目标业务,所述步骤204之前,所述方法还包括:Optionally, in some embodiments, the first data header further includes service identification information, and the service identification information is used to characterize a target service corresponding to the first service message. Before step 204, the method further includes:
基于所述业务标识信息确定所述目标业务;Determine the target service based on the service identification information;
基于预先定义的业务与网络侧链路的对应关系,确定所述目标业务对应的目标网络侧链路。Based on the predefined correspondence between the service and the network side link, a target network side link corresponding to the target service is determined.
应理解的是,网络侧链路为预先配置,其数量为多条。通过OTN管控平台,建立CPEOTN业务的多条网络侧链路。根据实际业务的需求,预先定义业务与网络侧链路的对应关系。It should be understood that the network side links are pre-configured and there are multiple links. Through the OTN management and control platform, multiple network side links of the CPE OTN service are established. According to the actual service requirements, the corresponding relationship between the service and the network side link is pre-defined.
示例性地,对于无需通过本实施例提供的方法进行报文的处理的业务,则不分配对应的网络侧链路,按照现有技术中的流程执行。对于需要通过本实施例提供的方法进行报文的处理的业务,则将预先配置的网络侧链路中的N条网络侧链路确定为该业务对应的目标网络侧链路。Exemplarily, for a service that does not need to process messages using the method provided in this embodiment, the corresponding network side link is not allocated, and the process in the prior art is executed. For a service that needs to process messages using the method provided in this embodiment, N network side links in the pre-configured network side links are determined as the target network side links corresponding to the service.
在具体实现时,不同的业务对应的网络侧链路的数量可以相同或不同,且同一个业务对应的多条网络侧链路不共用同一条光纤链路,从而提高保护的作用。通过配置不同的光通路数据单元(Optical Channel Data Unit,ODUk),建立不同的OTN通道,发送到不同的网络侧链路中。In specific implementation, the number of network side links corresponding to different services can be the same or different, and multiple network side links corresponding to the same service do not share the same optical fiber link, thereby improving the protection effect. By configuring different optical channel data units (ODUk), different OTN channels are established and sent to different network side links.
在该实施例中,第一设备接收到数据头后,基于业务标识信息确定该业务报文对应的目标业务,并基于预先定义的业务与网络侧链路的对应关系确定目标网络侧链路,从而在目标网络侧链路上传输第一设备侧的业务报文。In this embodiment, after receiving the data header, the first device determines the target service corresponding to the service message based on the service identification information, and determines the target network side link based on the pre-defined correspondence between the service and the network side link, thereby transmitting the service message on the first device side on the target network side link.
在该申请实施例中,基于业务标识信息确定目标业务;基于预先定义的业务与网络侧链路的对应关系,确定目标业务对应的目标网络侧链路。通过上述方法,CPE OTN芯片可以针对不同的业务类型执行不同的报文处理方法,提高了CPE OTN芯片多业务处理的灵活性,同时避免了其他类型的业务对网络侧链路的占用,提高了网络侧链路的可靠性。In the embodiment of the application, the target service is determined based on the service identification information; based on the predefined correspondence between the service and the network side link, the target network side link corresponding to the target service is determined. Through the above method, the CPE OTN chip can execute different message processing methods for different service types, thereby improving the flexibility of the CPE OTN chip in multi-service processing, while avoiding the occupation of the network side link by other types of services, thereby improving the reliability of the network side link.
在本申请实施例中,第一设备通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头。第一设备根据第一数据头包括的第一状态信息,可以确定第二设备对所述第一设备发送的业务报文的接收状态;第一设备根据第一数据头包括的第一序列标识信息,可以确定第一设备对第二设备发送的业务报文的接收状态。第一设备可以及时确定业务报文的收发情况,从而对传输失败的业务报文及时进行重发等处理,从而提高业务报文的传输可靠性,降低丢包率。In an embodiment of the present application, the first device receives the first service message and the first data header sent by the second device through the target network side link. The first device can determine the reception status of the service message sent by the first device to the second device based on the first status information included in the first data header; the first device can determine the reception status of the service message sent by the first device to the second device based on the first sequence identification information included in the first data header. The first device can promptly determine the reception and transmission status of the service message, so as to promptly retransmit the service message that fails to be transmitted, thereby improving the transmission reliability of the service message and reducing the packet loss rate.
在一些实施例中,第一数据头和第二数据头均为无损可选时延数据头,所述无损可选时延数据头包括业务标识信息、无损标识信息、链路标识信息、序列标识信息、确认标识信息和丢包标识信息;In some embodiments, the first data header and the second data header are both lossless optional delay data headers, and the lossless optional delay data header includes service identification information, lossless identification information, link identification information, sequence identification information, confirmation identification information and packet loss identification information;
其中,所述业务标识信息用于标识该无损可选时延数据头对应的业务流标识(Identifier,ID),所述无损标识信息用于标识该业务的类型是否为无损业务,所述链路标识信息用于标识该无损可选时延数据头对应的网络侧链路ID,所述序列标识信息用于标识该无损可选时延数据头对应的业务报文的序列号ID,所述确认标识信息用于标识接收成功的业务报文的序列号ID,所述丢包标识信息用于标识丢失的业务报文的序列号ID。无损可选时延数据头的结构可参见表一。Among them, the service identification information is used to identify the service flow identifier (Identifier, ID) corresponding to the lossless optional delay data header, the lossless identification information is used to identify whether the type of the service is a lossless service, the link identification information is used to identify the network side link ID corresponding to the lossless optional delay data header, the sequence identification information is used to identify the sequence number ID of the service message corresponding to the lossless optional delay data header, the confirmation identification information is used to identify the sequence number ID of the successfully received service message, and the packet loss identification information is used to identify the sequence number ID of the lost service message. The structure of the lossless optional delay data header can be seen in Table 1.
表一无损可选时延数据头的结构示例Table 1 Example of structure of lossless optional delay data header
在无损可选时延数据头作为第一数据头的情况下,序列标识信息可以理解为第一序列标识信息,确认标识信息可以理解为第一确认标识信息,丢包标识信息可以理解为第一丢包标识信息。When the lossless optional delay data header is used as the first data header, the sequence identification information can be understood as the first sequence identification information, the confirmation identification information can be understood as the first confirmation identification information, and the packet loss identification information can be understood as the first packet loss identification information.
在无损可选时延数据头作为第二数据头的情况下,序列标识信息可以理解为第二序列标识信息,确认标识信息可以理解为第二确认标识信息,丢包标识信息可以理解为第二丢包标识信息。When the lossless optional delay data header is used as the second data header, the sequence identification information can be understood as the second sequence identification information, the confirmation identification information can be understood as the second confirmation identification information, and the packet loss identification information can be understood as the second packet loss identification information.
在第一设备通过目标网络侧链路向第二设备发送第二业务报文和第二数据头后,第二设备通过目标网络侧链路接收第二设备发送的第二业务报文和第二数据头,基于第二状态信息确定第二设备下一个发送的业务报文,将无损可选时延数据头与该业务报文进行关联,通过目标网络侧链路向第一设备发送该业务报文和无损可选时延数据头。其具体方式可以参见前述的内容,在此不做限定。After the first device sends the second service message and the second data header to the second device through the target network side link, the second device receives the second service message and the second data header sent by the second device through the target network side link, determines the next service message sent by the second device based on the second state information, associates the lossless optional delay data header with the service message, and sends the service message and the lossless optional delay data header to the first device through the target network side link. The specific method can be referred to the above content and is not limited here.
为了方便理解,下面以一个具体的实施例为例进行说明。CPE OTN多业务接入处理时,支持多种接口业务(E1、FE、GE、10GE LAN、STM-1、STM-4等客户业务),将多种接口业务封装到多级容器中,经过级联处理,发送到OTN接口,进行线路侧发送。示例性地,CPE OTN芯片光业务单元(Optical Service Unit,OSU)映射处理流程如图7所示。业务映射模块将客户信号封装到ODU净荷帧,然后封装光信道传送单元开销(Optical Channel Transport UnitOverhead,OUT OH)头,进行OTU通道层处理,封装发送。在封装过程中,通过增加无损可选时延功能,实现丰富业务选择,包括无损时隙转发、超低时延处理等,实现更为优化的OTN业务处理。For ease of understanding, a specific embodiment is used as an example for explanation below. When CPE OTN processes multi-service access, it supports multiple interface services (E1, FE, GE, 10GE LAN, STM-1, STM-4 and other customer services), encapsulates multiple interface services into multi-level containers, and after cascading processing, sends them to the OTN interface for line-side transmission. Exemplarily, the CPE OTN chip optical service unit (Optical Service Unit, OSU) mapping processing flow is shown in Figure 7. The service mapping module encapsulates the customer signal into the ODU payload frame, and then encapsulates the optical channel transport unit overhead (Optical Channel Transport UnitOverhead, OUT OH) header, performs OTU channel layer processing, and encapsulates and sends it. During the encapsulation process, by adding a lossless optional delay function, rich service options are achieved, including lossless time slot forwarding, ultra-low delay processing, etc., to achieve more optimized OTN service processing.
通过OTN管控平台,建立CPE OTN业务的网络侧链路,具体如图8所示。根据业务入口类型和业务需求,定义不同的业务类型,业务类型为50ms电信级保护的业务可以理解为普通业务,即无需通过本申请实施例提供的方法进行报文处理的业务,业务类型为无丢包的业务可以理解为无损可选时延业务,即需要通过本申请实施例提供的方法进行报文处理的业务。根据业务配置,设置相应表项,具体可参见表二。Through the OTN management and control platform, a network side link of the CPE OTN service is established, as shown in Figure 8. Different service types are defined according to the service entry type and service requirements. The service type of 50ms carrier-level protection can be understood as a common service, that is, a service that does not need to be processed by the method provided in the embodiment of the present application. The service type of no packet loss can be understood as a lossless optional delay service, that is, a service that needs to be processed by the method provided in the embodiment of the present application. According to the service configuration, the corresponding table items are set, and the details can be seen in Table 2.
表二无损可选时延业务配置表Table 2 Lossless optional delay service configuration table
在本实施例中,CPE OTN1芯片(简称芯片A)和CPE OTN2芯片(简称芯片B)之间建立2条网络侧链路,分别称为link1和link2,为提高保护的作用,link1和link2不共光路。通过配置不同的ODUk,建立不同的OTN通道,发送到不同的link中。In this embodiment, two network-side links are established between the CPE OTN1 chip (referred to as chip A) and the CPE OTN2 chip (referred to as chip B), which are called link1 and link2. To improve the protection effect, link1 and link2 do not share the same optical path. By configuring different ODUk, different OTN channels are established and sent to different links.
业务创建时,将同时建立对应的收发数据流,示例性地,如图9所示:When a service is created, the corresponding data transmission and reception streams will be established at the same time, as shown in FIG9 :
创建业务1,对应发送流ID1,接收流ID2,在link1和link2收发;Create service 1, corresponding to send stream ID 1, receive stream ID 2, and send and receive on link 1 and link 2;
创建业务2,对应发送流ID3,接收流ID4,在link1和link2收发。Create service 2, corresponding to sending flow ID 3 and receiving flow ID 4, and send and receive on link 1 and link 2.
表三无损可选时延数据头示例Table 3 Example of lossless optional delay data header
在当前业务的业务报文需要基于本申请实施例提供的报文处理方法进行处理时,当前数据流使能无损可选时延功能,构建如表三所示的无损可选时延数据头。When the service message of the current service needs to be processed based on the message processing method provided in the embodiment of the present application, the current data stream enables the lossless optional delay function and constructs a lossless optional delay data header as shown in Table 3.
请参见图10,CPE OTN芯片发送业务报文的处理流程如下:Referring to FIG. 10 , the processing flow of the CPE OTN chip sending a service message is as follows:
步骤A:CPE OTN芯片首先在收到业务报文后,根据定义识别业务数据流的流ID,判断是否为无损可选时延业务,如果不是则进行按照现有技术的流程对报文进行原有处理,如果是,进行步骤B的处理;Step A: After receiving the service message, the CPE OTN chip first identifies the flow ID of the service data flow according to the definition, and determines whether it is a lossless optional delay service. If not, the message is processed according to the existing process. If yes, the process of step B is performed;
步骤B:根据识别的业务数据流的流ID,以及预先已经配置的业务与网络侧链路的对应关系,形成如表三所示的无损可选时延数据头;Step B: According to the flow ID of the identified service data flow and the correspondence between the pre-configured service and the network side link, a lossless optional delay data header as shown in Table 3 is formed;
步骤C:按照预定义的无损可选时延数据头的位置,关联无损可选时延数据头和业务报文;Step C: according to the position of the predefined lossless optional delay data header, associating the lossless optional delay data header with the service message;
步骤D:将关联好无损可选时延数据头的业务报文在对应的网络侧链路(Link1-Linkn)进行发送,每次发送一个业务报文(即在网络层链路(Link1-Linkn)都发送完这个业务报文)后,对应业务报文的无损可选时延数据头中的序列标识+1,确认标识是当前收到的序列标识,丢包标识是当前链路丢包的序列标识。Step D: Send the service message associated with the lossless optional delay data header on the corresponding network side link (Link1-Linkn). Each time a service message is sent (that is, after the service message is sent on the network layer link (Link1-Linkn)), the sequence identifier in the lossless optional delay data header of the corresponding service message is increased by 1, the confirmation identifier is the currently received sequence identifier, and the packet loss identifier is the sequence identifier of the current link packet loss.
请参见图11,CPE OTN芯片接收业务报文的处理流程如下:Referring to FIG. 11 , the processing flow of the CPE OTN chip receiving a service message is as follows:
在Link1或者Link2接收业务报文和关联的数据头,当业务为无损业务则进行下列处理,否则按照现有技术的流程对报文进行原有处理。收到的无损可选时延数据头中流ID、无损标识和链路标识将用来检验对应链路和业务报文是否匹配。CPE OTN芯片将对接收到的业务报文存储。When receiving a service message and the associated data header on Link1 or Link2, if the service is a lossless service, the following processing is performed, otherwise the message is processed according to the existing process. The stream ID, lossless identifier and link identifier in the received lossless optional delay data header will be used to check whether the corresponding link and service message match. The CPE OTN chip will store the received service message.
解析出无损可选时延数据头和业务报文,选择配置模式(例如图3a所示的固定模式或图3b所示的最优模式,具体可参见前述内容,在此不做赘述)。根据序列标识更新对应的确认标识,在反向业务发送时业务报文所关联的无损可选时延数据头中带上确认标识。Parse the lossless optional delay data header and service message, select the configuration mode (for example, the fixed mode shown in FIG3a or the optimal mode shown in FIG3b, for details, please refer to the above content, which will not be repeated here). Update the corresponding confirmation identifier according to the sequence identifier, and add the confirmation identifier to the lossless optional delay data header associated with the service message when the reverse service is sent.
根据业务报文到达的顺序以及业务报文关联的无损可选时延数据头中的序列标识判断是否发生丢包,判断方式可以参见前述实施例中的描述,在此不做限定。Whether packet loss occurs is determined based on the order in which the service messages arrive and the sequence identifier in the lossless optional delay data header associated with the service messages. The determination method can be found in the description of the aforementioned embodiment and is not limited here.
在芯片A和芯片B之间进行业务报文的双向收发处理过程中,在芯片A作为第一设备执行本申请实施例提供的方法时,芯片B为芯片A对应的第二设备。同理,在芯片B作为第一设备执行本申请实施例提供的方法时,芯片A为芯片B对应的第二设备。During the bidirectional transmission and reception of service messages between chip A and chip B, when chip A is used as a first device to execute the method provided in the embodiment of the present application, chip B is the second device corresponding to chip A. Similarly, when chip B is used as a first device to execute the method provided in the embodiment of the present application, chip A is the second device corresponding to chip B.
为了方便理解,下面将对芯片A和芯片B之间的交互流程进行说明。请参见图12,芯片A(A端)和芯片B(B端)之间建立Link1和Link2的链路连接,在正常场景下,A端和B端之间的报文交互流程如下:For ease of understanding, the following will explain the interaction process between chip A and chip B. Please refer to Figure 12, link connections Link1 and Link2 are established between chip A (A end) and chip B (B end). In a normal scenario, the message interaction process between end A and end B is as follows:
A端:A在Link1和Link2发送业务报文,带上关联的无损可选时延数据头(简称数据头),数据头中包含正在发送的业务报文的序列标识(seq)x,确认标识(ack)和丢失标识(lost),A将数据头和业务报文发到B。A到B的数据格式为Data+数据头(seq x,ack,lost),其中Data为业务报文。A side: A sends a service message on Link1 and Link2, with an associated lossless optional delay data header (referred to as data header). The data header contains the sequence identifier (seq) x, confirmation identifier (ack) and loss identifier (lost) of the service message being sent. A sends the data header and service message to B. The data format from A to B is Data+data header (seq x, ack, lost), where Data is the service message.
B端:B在Link1和Link2收到A发送的业务报文,根据接收到的业务报文的序列标识将确认标识更新为x,以表征A发送的序列号为x的业务报文被成功接收,同时根据接收到的业务报文的序列号判断是否有丢失的业务报文并更新丢失标识lost。在B发到A的业务报文关联的数据头中带上序列标识y、确认标识x和丢失标识lost,B到A的数据格式为Data+数据头(seq y,ack x,lost)。B side: B receives the service message sent by A on Link1 and Link2, and updates the confirmation mark to x according to the sequence mark of the received service message, to indicate that the service message with sequence number x sent by A is successfully received. At the same time, it determines whether there is a lost service message according to the sequence number of the received service message and updates the loss mark lost. The data header associated with the service message sent by B to A carries the sequence mark y, confirmation mark x and loss mark lost, and the data format from B to A is Data+data header (seq y, ack x, lost).
A端:A在Link1和Link2收到B发送的业务报文,根据接收到的业务报文的序列标识将确认标识更新为y,以表征B发送的序列号为y的业务报文被成功接收,同时根据接收到的业务报文的序列号判断是否有丢失的业务报文并更新丢失标识lost。在A发到B的业务报文关联的数据头中带上序列标识x+1、确认标识y和丢失标识lost。A到B的数据格式为Data+数据头(seq x+1,ack y,lost)。A side: A receives the service message sent by B on Link1 and Link2, and updates the confirmation flag to y according to the sequence flag of the received service message, to indicate that the service message with sequence number y sent by B is successfully received. At the same time, it determines whether there is a lost service message according to the sequence number of the received service message and updates the loss flag lost. The data header associated with the service message sent by A to B carries the sequence flag x+1, confirmation flag y and loss flag lost. The data format from A to B is Data+data header (seq x+1, ack y, lost).
请参见图13,A和B之间建立Link1和Link2的链路连接,在丢包场景下,A端和B端之间的报文交互流程如下:As shown in Figure 13, Link 1 and Link 2 are established between A and B. In the packet loss scenario, the message exchange process between A and B is as follows:
A端:A在Link1和Link2发送业务报文,带上关联的数据头,A将数据头和业务报文数据头中包含正在发送的业务报文的序列标识x1,确认标识y1和丢失标识z。A将数据头和业务报文发到B。A到B的数据格式为Data+数据头(seq x1,ack y1,lost z)。A: A sends a service message on Link1 and Link2 with the associated data header. A sends the data header and service message to B. The data format from A to B is Data+data header (seq x1, ack y1, lost z).
B端:B在Link1和Link2收到A发送的业务报文,根据接收到的业务报文的序列标识将确认标识更新为x1,以表征A发送的序列号为x1的业务报文被成功接收。B根据数据头中的丢失标识z,在B找到报文z,重新在B向A发送报文z。同时根据接收到的业务报文的序列号判断B是否有丢失报文并更新丢失标识lost。在B发到A的业务报文为报文z,数据头中包含序列标识z、确认标识x1和丢失标识lost,B到A的数据格式为Data+数据头(seq z,ack x1,lost)。B side: B receives the service message sent by A on Link1 and Link2, and updates the confirmation identifier to x1 according to the sequence identifier of the received service message, to indicate that the service message with sequence number x1 sent by A has been successfully received. B finds message z in B according to the loss identifier z in the data header, and resends message z to A from B. At the same time, it determines whether B has lost messages according to the sequence number of the received service message and updates the loss identifier lost. The service message sent from B to A is message z, and the data header contains the sequence identifier z, the confirmation identifier x1 and the loss identifier lost. The data format from B to A is Data+data header (seq z, ack x1, lost).
A端:A在Link1和Link2收到B发送的业务报文,根据接收到的业务报文的序列标识将确认标识更新为z,同时根据接收到的业务报文的序列号判断是否有丢失的业务报文并更新丢失标识lost。在B发到A的业务报文关联的数据头中带上序列标识x+1、确认标识z和丢失标识lost。A到B的数据格式为Data+数据头(seq x1+1,ack z,lost)。A side: A receives the service message sent by B on Link1 and Link2, updates the confirmation flag to z according to the sequence flag of the received service message, and determines whether there is a lost service message according to the sequence number of the received service message and updates the loss flag lost. The data header associated with the service message sent by B to A carries the sequence flag x+1, confirmation flag z and loss flag lost. The data format from A to B is Data+data header (seq x1+1, ack z, lost).
在该实施例中,芯片A和芯片B均可以作为第一设备执行本实施例提供的报文处理方法。本实施例中提供了一种新的CPE OTN业务芯片处理流程,包括ETH帧等到ODU的映射流程,通过增加无损可选时延功能,利用传输保护链路,实现对OTN业务的无损可选时延转发,为上层业务提供更加可靠高效的业务传输,提供更多业务功能选项,实现更优性价比的CPEOTN芯片设计。In this embodiment, both chip A and chip B can be used as the first device to execute the message processing method provided in this embodiment. This embodiment provides a new CPE OTN service chip processing flow, including the mapping flow of ETH frames to ODUs, by adding a lossless optional delay function and using a transmission protection link, to achieve lossless optional delay forwarding of OTN services, provide more reliable and efficient service transmission for upper layer services, provide more service function options, and achieve a more cost-effective CPE OTN chip design.
本发明实施例还提供了一种报文处理装置,第一设备包括所述报文处理装置。参见图14,图14是本发明实施例提供的报文处理装置1400的结构图。由于报文处理装置1400解决问题的原理与本发明实施例中图2所示的报文处理方法相似,因此该报文处理装置1400的实施可以参见方法的实施,重复之处不再赘述。The embodiment of the present invention further provides a message processing device, and the first device includes the message processing device. Referring to FIG. 14, FIG. 14 is a structural diagram of the message processing device 1400 provided by the embodiment of the present invention. Since the principle of solving the problem by the message processing device 1400 is similar to the message processing method shown in FIG. 2 in the embodiment of the present invention, the implementation of the message processing device 1400 can refer to the implementation of the method, and the repeated parts will not be repeated.
请参见图14,本发明实施例还提供了一种报文处理装置1400,第一设备包括所述报文处理装置1400,所述报文处理装置1400包括:Referring to FIG. 14 , an embodiment of the present invention further provides a message processing device 1400. The first device includes the message processing device 1400. The message processing device 1400 includes:
接收模块1401,用于通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头,所述第一数据头与所述第一业务报文关联,所述第一数据头包括第一状态信息和第一序列标识信息,所述第一状态信息用于表征所述第二设备对所述第一设备发送的业务报文的接收状态,所述第一序列标识信息用于标识所述第一业务报文的序列号;A receiving module 1401 is configured to receive, through a target network side link, a first service message and a first data header sent by a second device, where the first data header is associated with the first service message, and the first data header includes first state information and first sequence identification information, where the first state information is used to characterize a reception state of the service message sent by the first device by the second device, and the first sequence identification information is used to identify a sequence number of the first service message;
第一确定模块1402,用于基于所述第一状态信息确定第二业务报文;A first determining module 1402, configured to determine a second service message based on the first state information;
关联模块1403,用于将第二数据头与所述第二业务报文进行关联,所述第二数据头包括第二状态信息和第二序列标识信息,所述第二状态信息用于表征所述第一设备对所述第二设备发送的业务报文的接收状态,所述第二序列标识信息用于标识所述第二业务报文的序列号;an associating module 1403, configured to associate a second data header with the second service message, where the second data header includes second state information and second sequence identification information, where the second state information is used to characterize a reception state of the service message sent by the first device to the second device, and the second sequence identification information is used to identify a sequence number of the second service message;
发送模块1404,用于通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头。The sending module 1404 is used to send the second service message and the second data header to the second device through the target network side link.
可选地,所述目标网络侧链路包括N条网络侧链路,N为大于1的正整数;所述关联模块1403包括:Optionally, the target network side link includes N network side links, where N is a positive integer greater than 1; the association module 1403 includes:
生成单元,用于生成与所述N条网络侧链路一一对应的N个第二数据头,每个所述第二数据头包括对应的链路标识;A generating unit, configured to generate N second data headers corresponding one-to-one to the N network-side links, each of the second data headers including a corresponding link identifier;
关联单元,用于分别将所述N个第二数据头中每个第二数据头与所述第二业务报文进行关联;an associating unit, configured to associate each of the N second data headers with the second service message respectively;
所述发送模块1404具体用于:The sending module 1404 is specifically used for:
通过所述N条网络侧链路中每一条网络侧链路向所述第二设备发送所述网络侧链路对应的第二数据头和所述第二业务报文。The second data header and the second service message corresponding to the network side link are sent to the second device through each of the N network side links.
可选地,所述第一状态信息包括第一确认标识信息和第一丢包标识信息,所述第一确认标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收成功的业务报文的序列号,所述第一丢包标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收失败的业务报文的序列号。Optionally, the first status information includes first confirmation identification information and first packet loss identification information, the first confirmation identification information is used to identify the sequence number of the service message successfully received by the second device in the service message sent by the first device, and the first packet loss identification information is used to identify the sequence number of the service message failed to be received by the second device in the service message sent by the first device.
可选地,所述第一确定模块1402具体用于:Optionally, the first determining module 1402 is specifically configured to:
基于所述第一丢包标识信息,将所述第一设备发送的业务报文中所述第二设备接收失败的业务报文确定为第二业务报文。Based on the first packet loss identification information, a service message sent by the first device and which fails to be received by the second device is determined as a second service message.
可选地,所述第一数据头还包括业务标识信息,所述业务标识信息用于表征所述第一业务报文对应的目标业务,所述报文处理装置1400还包括:Optionally, the first data header further includes service identification information, where the service identification information is used to characterize a target service corresponding to the first service message, and the message processing device 1400 further includes:
第二确定模块,用于基于所述业务标识信息确定所述目标业务;A second determination module, configured to determine the target service based on the service identification information;
第三确定模块,用于基于预先定义的业务与网络侧链路的对应关系,确定所述目标业务对应的目标网络侧链路。The third determination module is used to determine the target network side link corresponding to the target service based on the predefined correspondence between the service and the network side link.
可选地,所述关联模块1403具体用于:Optionally, the association module 1403 is specifically used for:
将所述第二数据头添加至所述第二业务报文中。Add the second data header to the second service message.
可选地,所述关联模块1403具体用于:Optionally, the association module 1403 is specifically used for:
将所述第二数据头插入所述第二业务报文之间的空闲字节中。The second data header is inserted into the idle bytes between the second service messages.
本发明实施例提供的报文处理装置1400能够实现图2所示的方法实施例实现的各个过程,且能够取得相同的有益效果,为避免重复,这里不再赘述。The message processing device 1400 provided in the embodiment of the present invention can implement each process implemented by the method embodiment shown in FIG. 2 , and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.
本发明实施例还提供了一种第一设备。由于第一设备解决问题的原理与本发明实施例中图2中所示的报文处理方法相似,因此该第一设备的实施可以参见方法的实施,重复之处不再赘述。The embodiment of the present invention further provides a first device. Since the principle of solving the problem by the first device is similar to the message processing method shown in FIG. 2 in the embodiment of the present invention, the implementation of the first device can refer to the implementation of the method, and the repeated parts will not be repeated.
如图15所示,本发明实施例的第一设备,包括:处理器1500,用于读取存储器1520中的程序,执行下列过程:As shown in FIG. 15 , the first device according to the embodiment of the present invention includes: a processor 1500 configured to read a program in a memory 1520 and execute the following process:
通过收发机1510通过目标网络侧链路接收第二设备发送的第一业务报文和第一数据头,所述第一数据头与所述第一业务报文关联,所述第一数据头包括第一状态信息和第一序列标识信息,所述第一状态信息用于表征所述第二设备对所述第一设备发送的业务报文的接收状态,所述第一序列标识信息用于标识所述第一业务报文的序列号;Receiving, through the transceiver 1510, a first service message and a first data header sent by a second device through a target network side link, where the first data header is associated with the first service message, and the first data header includes first state information and first sequence identification information, where the first state information is used to characterize a reception state of the service message sent by the first device by the second device, and the first sequence identification information is used to identify a sequence number of the first service message;
基于所述第一状态信息确定第二业务报文;Determine a second service message based on the first status information;
将第二数据头与所述第二业务报文进行关联,所述第二数据头包括第二状态信息和第二序列标识信息,所述第二状态信息用于表征所述第一设备对所述第二设备发送的业务报文的接收状态,所述第二序列标识信息用于标识所述第二业务报文的序列号;Associating a second data header with the second service message, where the second data header includes second state information and second sequence identification information, where the second state information is used to characterize a reception state of the service message sent by the first device to the second device, and the second sequence identification information is used to identify a sequence number of the second service message;
通过收发机1510通过所述目标网络侧链路向所述第二设备发送所述第二业务报文和所述第二数据头。The second service message and the second data header are sent to the second device through the target network side link via the transceiver 1510.
收发机1510,用于在处理器1500的控制下接收和发送数据。The transceiver 1510 is configured to receive and send data under the control of the processor 1500 .
其中,在图15中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器1500代表的一个或多个处理器和存储器1520代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机1510可以是多个元件,即包括发送机和接收机,提供用于在传输介质上与各种其他装置通信的单元。In FIG. 15 , the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1500 and various circuits of memory represented by memory 1520 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1510 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium.
处理器1500负责管理总线架构和通常的处理,存储器1520可以存储处理器1500在执行操作时所使用的数据。The processor 1500 is responsible for managing the bus architecture and general processing, and the memory 1520 can store data used by the processor 1500 when performing operations.
可选地,所述目标网络侧链路包括N条网络侧链路,N为大于1的正整数;处理器1500还用于读取存储器1520中的程序,执行如下步骤:Optionally, the target network side link includes N network side links, where N is a positive integer greater than 1; the processor 1500 is further configured to read a program in the memory 1520 and execute the following steps:
生成与所述N条网络侧链路一一对应的N个第二数据头,每个所述第二数据头包括对应的链路标识;Generate N second data headers corresponding one-to-one to the N network-side links, each of the second data headers including a corresponding link identifier;
分别将所述N个第二数据头中每个第二数据头与所述第二业务报文进行关联;Associating each of the N second data headers with the second service message respectively;
通过所述N条网络侧链路中每一条网络侧链路向所述第二设备发送所述网络侧链路对应的第二数据头和所述第二业务报文。The second data header and the second service message corresponding to the network side link are sent to the second device through each of the N network side links.
可选地,所述第一状态信息包括第一确认标识信息和第一丢包标识信息,所述第一确认标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收成功的业务报文的序列号,所述第一丢包标识信息用于标识所述第一设备发送的业务报文中所述第二设备接收失败的业务报文的序列号。Optionally, the first status information includes first confirmation identification information and first packet loss identification information, the first confirmation identification information is used to identify the sequence number of the service message successfully received by the second device in the service message sent by the first device, and the first packet loss identification information is used to identify the sequence number of the service message failed to be received by the second device in the service message sent by the first device.
可选地,处理器1500还用于读取存储器1520中的程序,执行如下步骤:Optionally, the processor 1500 is further configured to read a program in the memory 1520 and execute the following steps:
基于所述第一丢包标识信息,将所述第一设备发送的业务报文中所述第二设备接收失败的业务报文确定为第二业务报文。Based on the first packet loss identification information, a service message sent by the first device and which fails to be received by the second device is determined as a second service message.
可选地,所述第一数据头还包括业务标识信息,所述业务标识信息用于表征所述第一业务报文对应的目标业务,处理器1500还用于读取存储器1520中的程序,执行如下步骤:Optionally, the first data header further includes service identification information, where the service identification information is used to characterize a target service corresponding to the first service message. The processor 1500 is further used to read a program in the memory 1520 and execute the following steps:
基于所述业务标识信息确定所述目标业务;Determine the target service based on the service identification information;
基于预先定义的业务与网络侧链路的对应关系,确定所述目标业务对应的目标网络侧链路。Based on the predefined correspondence between the service and the network side link, a target network side link corresponding to the target service is determined.
可选地,处理器1500还用于读取存储器1520中的程序,执行如下步骤:Optionally, the processor 1500 is further configured to read a program in the memory 1520 and execute the following steps:
将所述第二数据头添加至所述第二业务报文中。Add the second data header to the second service message.
可选地,处理器1500还用于读取存储器1520中的程序,执行如下步骤:Optionally, the processor 1500 is further configured to read a program in the memory 1520 and execute the following steps:
将所述第二数据头插入所述第二业务报文之间的空闲字节中。The second data header is inserted into the idle bytes between the second service messages.
本发明实施例提供的第一设备,可以执行如图2所示的方法实施例,其实现原理和技术效果类似,本实施例此处不再赘述。The first device provided in the embodiment of the present invention can execute the method embodiment shown in Figure 2, and its implementation principle and technical effects are similar, which will not be repeated in this embodiment.
本发明实施例还提供一种可读存储介质,用于存储程序,所述程序被处理器执行时实现如图2所示的报文处理方法中的步骤。An embodiment of the present invention further provides a readable storage medium for storing a program, wherein the program, when executed by a processor, implements the steps in the message processing method shown in FIG. 2 .
在本申请所提供的几个实施例中,应该理解到,所揭露方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述收发方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310493929.1A CN118900290A (en) | 2023-05-05 | 2023-05-05 | Message processing method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310493929.1A CN118900290A (en) | 2023-05-05 | 2023-05-05 | Message processing method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118900290A true CN118900290A (en) | 2024-11-05 |
Family
ID=93268448
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310493929.1A Pending CN118900290A (en) | 2023-05-05 | 2023-05-05 | Message processing method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118900290A (en) |
-
2023
- 2023-05-05 CN CN202310493929.1A patent/CN118900290A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111147298B (en) | Method and equipment for capability discovery and state discovery | |
CN107438028B (en) | Method and equipment for processing customer service | |
CA2459286C (en) | Method for supporting sdh/sonet aps on ethernet | |
US11477549B2 (en) | Transmission network system, data switching and transmission method, apparatus and equipment | |
US11271668B2 (en) | Data transmission methods, apparatuses, devices, and system | |
KR102342286B1 (en) | DCN message processing method, network device, and network system | |
CN101277196B (en) | Communication system, communication method and cable fastener plate based on PCIE switching network | |
US20150016473A1 (en) | Transmission apparatus, transmission system, and transmission method | |
US12177118B2 (en) | Data frame sending method and network device | |
US20090046575A1 (en) | Failure handling system | |
EP1339183B1 (en) | Method and device for transporting ethernet frames over a transport SDH/SONET network | |
US11902403B2 (en) | Method for receiving code block stream, method for sending code block stream, and communications apparatus | |
CN118900290A (en) | Message processing method, device, equipment and readable storage medium | |
US8515283B2 (en) | Transparent fiber channel link management for protocol transport | |
US20040114640A1 (en) | System, method and device for aggregating SONET links | |
US20040240428A1 (en) | SDH/SONET-based data transmitting method | |
CN115633279B (en) | OSU (open service Unit) cross equipment and data transmission method based on OSU cross equipment | |
CN205265697U (en) | Grouping optical transmission terminal chip based on tag switching | |
CN118804072A (en) | Data transmission method and device, equipment, storage medium, and computer program product | |
WO2022262614A1 (en) | Communication method, apparatus, and system | |
WO2019023824A1 (en) | Method and device for bit block stream processing, rate matching and exchange | |
CN119094919A (en) | Business transmission method, device, equipment and readable storage medium | |
WO2020114084A1 (en) | Message forwarding method and apparatus | |
CN100370778C (en) | Resilient packet ring business transport method | |
WO2024222620A1 (en) | Method and apparatus for data processing, and communication system |
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 |