Information receiving method and apparatus, information sending method and apparatus, device, and storage medium

By receiving and utilizing template information from the application information identification field, the problem of format uncertainty in data message processing is solved, achieving efficient and accurate data message processing.

WO2025246809A1PCT designated stage Publication Date: 2025-12-04HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/092817
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-31
Filing Date
2025-05-06
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately determine the format of application information identification fields when processing data packets, resulting in low processing efficiency and insufficient accuracy.

Method used

By receiving template information from the application information identifier field, the distribution of subfields within the application information identifier field is clarified. Subfields are then extracted and encapsulated using the template information to achieve precise processing of data packets.

Benefits of technology

It improves the accuracy and efficiency of data message processing, simplifies the extraction and matching process of subfields, and enhances the flexibility and versatility of processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025092817_04122025_PF_FP_ABST
    Figure CN2025092817_04122025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and discloses an information receiving method and apparatus, an information sending method and apparatus, a device, and a storage medium. The information receiving method comprises: receiving template information of an application information identifier field, wherein the application information identifier field comprises at least two sub-fields, and the template information indicates the distribution of the sub-fields in the application information identifier field. The distribution of the sub-fields in the application information identifier field is determined by means of the template information, so that a device receiving the template information can subsequently accurately determine a field format of the application information identifier field on the basis of the template information, thereby improving the accuracy of data packet processing.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, equipment and storage media for receiving and sending information

[0001] This application claims priority to Chinese Patent Application No. 202410709124.0, filed on May 31, 2024, entitled “Method, Apparatus, Device and Storage Medium for Receiving and Transmitting Information”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular to methods, apparatus, devices and storage media for receiving and sending information. Background Technology

[0003] In the field of computer technology, data packets transmitted over a network carry application information to describe the application corresponding to the data packet and its requirements. Based on this, transmission devices in the network can determine the application and its requirements corresponding to the data packet during transmission based on the application information carried in the data packet, and process the data packet according to the determined application or requirements. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for receiving and sending information, which processes data packets based on an application information identification field. The technical solution is as follows.

[0005] Firstly, a method for receiving information is provided, the method comprising: receiving template information of an application information identifier field, the application information identifier field including at least two subfields, the template information indicating the distribution of the subfields in the application information identifier field.

[0006] This application uses template information to indicate the distribution of subfields in the application information identifier field. The device receiving the template information can then accurately determine the field format of the application information identifier field of the data packet based on the template information, thereby improving the accuracy of data packet processing.

[0007] In one possible implementation, after receiving the template information of the application information identifier field, the process further includes: obtaining the data packet to be processed; and processing the data packet according to the template information. Processing the data packet according to the template information includes extracting sub-fields from the data packet carrying the application information identifier field based on the template information, and also includes determining the application information identifier field carried in the data packet according to the template information. Since the template information indicates the distribution of sub-fields in the application information identifier field, processing the data packet based on the explicit field format of the application information identifier field has high accuracy.

[0008] In one possible implementation, the data packet carries an application information identifier field. The data packet is processed according to the template information, including: obtaining the execution action corresponding to the data packet and at least one matching condition corresponding to the execution action; extracting at least one sub-field to be matched from the application information identifier field of the data packet according to the template information, where each sub-field corresponds to at least one matching condition; and processing the data packet according to the execution action if any sub-field in the at least one sub-field matches any matching condition.

[0009] If a data packet carries an application information identifier field, the device receiving the template information can directly extract the subfields to be matched based on the distribution of the subfields described in the template information within the application information identifier field. This subfield extraction operation is simple and efficient. Since an application information identifier field includes at least two subfields, the length of each subfield is shorter than the length of the application information identifier field. Extracting and processing the subfields first, then matching them with the matching conditions, effectively reduces the length of the data being matched against the conditions compared to matching the application information identifier field itself, thus improving matching efficiency. Subfields are fields included in the application information identifier field and can be used to describe the application corresponding to the data packet. Based on the subfields, the action to be performed on the data packet is determined, enabling data packet processing based on the application corresponding to the data packet, resulting in high processing accuracy.

[0010] In one possible implementation, extracting at least one subfield to be matched from the application information identifier field of the data packet based on template information includes: determining the subfield to be extracted based on at least one matching condition; for any subfield to be extracted, determining the position of the subfield in the application information identifier field based on the template information, and extracting the subfield based on the determined position. Determining the position of the subfield to be extracted in the application information identifier field based on template information, and then extracting the subfield from the determined position, is a simple and efficient extraction process.

[0011] In one possible implementation, at least one of the execution action or the matching condition corresponding to the execution action and template information are encapsulated in the same message. Since at least one of the matching condition or execution action and template information is encapsulated in the same message, the device receiving the template information receives the matching condition or execution action encapsulated in the same message at the same time as receiving the template information. This allows for the acquisition of multiple data in a single transmission, resulting in high transmission efficiency. Furthermore, this application does not limit the information included in the message carrying template information; in addition to template information, it may also include at least one of the execution action or matching condition, thus offering high versatility.

[0012] In one possible implementation, there are multiple matching conditions. After extracting at least one sub-field to be matched from the application information identifier field of the data packet based on the template information, the method further includes: determining at least one of the logical relationship or matching priority of each matching condition; matching each matching condition and at least one sub-field according to the matching priority or logical relationship to obtain a matching result. The matching result is used to indicate whether any sub-field and any matching condition among the at least one sub-fields are successfully matched. Matching sub-fields and matching conditions based on at least one of the matching priorities or logical relationships offers high flexibility, enables ordered matching, and improves matching efficiency.

[0013] In one possible implementation, the application information identification field is encapsulated in the data packet in the location of at least one of the following extension headers: a hop-by-hop options header (HBH), a destination options header (DOH), or a segment routing header (SRH). This application does not limit the encapsulation location of the application information identification field in the data packet; it can be encapsulated in at least one of the HBH, DOH, or SRH extension headers, offering high flexibility and wide applicability.

[0014] In one possible implementation, the message or data packet carrying template information also includes location information, which indicates the encapsulation location of the application information identification field in the data packet. By clearly defining the encapsulation location of the application information identification field through location information, the application information identification field can be determined from the encapsulation location in the data packet based on the location information, and then subfields can be extracted from the determined application information identification field, resulting in higher extraction efficiency. Furthermore, this application does not limit the method of carrying the location information, offering high flexibility.

[0015] In one possible implementation, if the data packet does not carry an application information identifier field, the data packet is processed based on template information, including: if the data packet and the matching rule match successfully, determining the application information identifier field to be encapsulated based on the template information; the matching rule is used to filter data packets to be identified; the application information identifier field includes at least two sub-fields; encapsulating the application information identifier field in the data packet to obtain a data packet carrying the application information identifier field; and sending the data packet carrying the application information identifier field. For cases where the data packet does not carry an application information identifier field, the application information identifier field carrying at least two sub-fields can be determined based on the template information, and the format of the obtained application information identifier field is accurate.

[0016] Furthermore, this application does not limit the process of processing data packets based on template information. When the data packet carries an application information identifier field, subfields in the application information identifier field can be extracted based on the template information. Alternatively, when the data packet does not carry an application information identifier field, an application information identifier field can be added to the data packet based on the template information. The processing is highly flexible.

[0017] In one possible implementation, the application information identifier field to be encapsulated is determined based on template information, including: determining sub-fields based on the action entries corresponding to the matching rules; determining the bits used by the sub-fields in the application information identifier field based on the template information; and assigning values ​​to the bits used by the sub-fields in the application information identifier field to obtain an application information identifier field that includes at least two sub-fields. Assigning values ​​to the bits used by the sub-fields in the application information identifier field based on the template information of the application information identifier field allows for carrying sub-fields in the application information identifier field as needed, providing high flexibility in carrying sub-fields.

[0018] In one possible implementation, the action entry corresponding to the matching rule includes indication information of the encapsulation location of the application information identifier field. Encapsulating the application information identifier field in the data packet includes: determining the encapsulation location of the application information identifier field in the data packet based on the encapsulation location indication information; and encapsulating the application information identifier field at the encapsulation location. During the encapsulation of the application information identifier field, the encapsulation location of the application information identifier field is determined based on the indication information, thereby accurately encapsulating the application information identifier field at the encapsulation location.

[0019] In one possible implementation, the encapsulation location includes the location of at least one of the HBH, DOH, or SRH extension headers. This application does not limit the encapsulation location of the application information identifier field; it may include one or more of the HBH, DOH, or SRH extension headers, offering broad applicability to a wider range of scenarios.

[0020] Secondly, a method for sending information is provided, the method comprising: obtaining template information of an application information identifier field, the application information identifier field including at least two subfields, the template information indicating the distribution of the subfields in the application information identifier field; and sending the template information.

[0021] This application clarifies the distribution of subfields within the application information identifier field using template information, and then sends the template information so that the receiving device can determine the field format of the application information identifier field of the data packet based on the template information, thereby improving the accuracy of data packet processing.

[0022] In one possible implementation, template information is used to process data packets, and the application information identification field is located in the encapsulation position of the data packet, including at least one of the following extension headers: HBH, DOH, or SRH. Template information can be used to process data packets, resulting in high utilization. Furthermore, this application does not limit the encapsulation position of the application information identification field in the data packet, thus offering broad applicability.

[0023] In one possible implementation, the template information in the first or second aspect includes at least one of the following for each of at least two subfields: length or offset. The information included in the template information is not limited; it can be one or more of length or offset, offering high flexibility.

[0024] In one possible implementation, the application information identification field in the first or second aspect includes at least one of application-aware networking identification (APN ID) or service-aware network identification (SAN ID). This application does not limit the type of application information identification field and has a wide range of applications.

[0025] In one possible implementation, the sub-fields in the first or second aspect include at least one of application identification (ID), user ID, flow ID, intent ID, device ID, site ID, or performance parameters. This application does not limit the sub-fields carried in the application information identification field, offering high flexibility and broad applicability.

[0026] Thirdly, an apparatus for receiving information is provided, the apparatus comprising: a transceiver module for performing receiving and / or sending related operations in the first aspect or any possible implementation of the first aspect; and a processing module for performing other operations besides the receiving and / or sending related operations in the first aspect or any possible implementation of the first aspect.

[0027] In one possible implementation, a transceiver module is used to receive template information of the application information identifier field, which includes at least two subfields, and the template information indicates the distribution of the subfields in the application information identifier field.

[0028] In one possible implementation, the transceiver module is used to acquire data packets to be processed; the processing module is used to process the data packets according to the template information.

[0029] In one possible implementation, the data packet carries an application information identifier field. The processing module is used to obtain the execution action corresponding to the data packet and at least one matching condition corresponding to the execution action; extract at least one sub-field to be matched from the application information identifier field of the data packet according to the template information, and each sub-field corresponds to at least one matching condition; if any sub-field in at least one sub-field matches any matching condition, the data packet is processed according to the execution action.

[0030] In one possible implementation, the processing module is used to determine the subfield to be extracted based on at least one matching condition; for any subfield to be extracted, the position of any subfield in the application information identifier field is determined based on the template information, and the subfield is extracted based on the determined position.

[0031] In one possible implementation, at least one of the execution action or the matching conditions corresponding to the execution action and the template information are encapsulated in the same message.

[0032] In one possible implementation, there are multiple matching conditions. The processing module is also used to determine at least one of the logical relationship or matching priority of each matching condition; according to at least one of the matching priority or logical relationship, each matching condition and at least one sub-field are matched to obtain a matching result. The matching result is used to indicate whether any sub-field in at least one sub-field and any matching condition are successfully matched.

[0033] In one possible implementation, the application information identification field is located in the encapsulation position of the data packet, including at least one of the following extension headers: HBH extension header, DOH extension header, or SRH extension header.

[0034] In one possible implementation, the message or data packet carrying template information also includes location information, which indicates the encapsulation location of the application information identification field in the data packet.

[0035] In one possible implementation, the data packet does not carry an application information identifier field. The processing module is used to determine the application information identifier field to be encapsulated based on the template information when the data packet and the matching rule match successfully. The matching rule is used to filter the data packets to be identified. The application information identifier field includes at least two sub-fields. The application information identifier field is encapsulated in the data packet to obtain a data packet carrying the application information identifier field. The data packet carrying the application information identifier field is then sent.

[0036] In one possible implementation, the processing module is used to determine the subfields according to the action entries corresponding to the matching rules; determine the bits used by the subfields in the application information identifier field according to the template information; and assign values ​​to the bits used by the subfields in the application information identifier field to obtain an application information identifier field that includes at least two subfields.

[0037] In one possible implementation, the action entry corresponding to the matching rule includes an indication of the encapsulation location of the application information identifier field. The processing module is used to determine the encapsulation location of the application information identifier field in the data packet based on the encapsulation location indication information, and to encapsulate the application information identifier field at the encapsulation location.

[0038] In one possible implementation, the package location includes the location of at least one of the following extensions: HBH extension, DOH extension, or SRH extension.

[0039] Fourthly, an apparatus for transmitting information is provided, the apparatus comprising: a transceiver module for performing receiving and / or transmitting related operations in the second aspect or any possible implementation of the second aspect; and a processing module for performing other operations besides the receiving and / or transmitting related operations in the second aspect or any possible implementation of the second aspect.

[0040] In one possible implementation, a processing module is used to obtain template information of the application information identifier field, which includes at least two subfields, and the template information indicates the distribution of the subfields in the application information identifier field; a sending and receiving module is used to send the template information.

[0041] In one possible implementation, template information is used to process data packets, and the application information identification field is located at the encapsulation position of the data packet, including the position of at least one of the HBH extension header, DOH extension header, or SRH extension header.

[0042] In one possible implementation, the template information in the third or fourth aspect includes at least one of the following for each of at least two subfields: length or offset.

[0043] In one possible implementation, the application information identification field in the third or fourth aspect includes at least one of APN ID or SAN ID.

[0044] In one possible implementation, the subfields in the third or fourth aspect include at least one of the following: application ID, user ID, stream ID, intent ID, device ID, site ID, or performance parameters.

[0045] Fifthly, a communication device is provided, the device including a processor for loading and executing at least one instruction to cause the communication device to perform the method of the first aspect or any possible implementation of the first aspect, or to perform the method of the second aspect or any possible implementation of the second aspect.

[0046] In one possible implementation, the device includes a memory coupled to a processor, the memory storing at least one instruction.

[0047] In a sixth aspect, a communication system is provided, the system comprising a first communication device and a second communication device, the first communication device being configured to perform the method of the first aspect or any possible implementation thereof, and the second communication device being configured to perform the method of the second aspect or any possible implementation thereof.

[0048] In a seventh aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the computer-readable storage medium, the instruction being loaded and executed by a processor to implement the method of receiving information in the first aspect or any possible implementation of the first aspect, or the method of sending information in the second aspect or any possible implementation of the second aspect.

[0049] Eighthly, a computer program (product) is provided, comprising computer program / instructions, which are executed by a processor to enable a computer to implement the method of receiving information in the first aspect or any possible implementation thereof, or to implement the method of sending information in the second aspect or any possible implementation thereof.

[0050] A ninth aspect provides a communication device comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal interconnection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive and transmit signals. When the processor executes the instructions stored in the memory, it causes the processor to perform the method of the first aspect or any possible implementation thereof, or to perform the method of the second aspect or any possible implementation thereof. Optionally, the communication device may be a chip.

[0051] Optionally, there may be one or more processors and one or more memories.

[0052] Alternatively, the memory can be integrated with the processor, or the memory can be set up separately from the processor.

[0053] In the specific implementation process, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. This application does not limit the type of memory or the way the memory and processor are set.

[0054] In a tenth aspect, a chip is provided, including a processor for retrieving and executing program instructions or code stored in a memory, causing a communication device equipped with the chip to perform the methods described in the foregoing aspects.

[0055] Eleventhly, another chip is provided, comprising: an input interface, an output interface, a processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are connected by an internal connection path, the processor being used to execute code in the memory, and when the code is executed, the processor being used to perform the methods in the above aspects.

[0056] It should be understood that the apparatus mentioned in the third and fourth aspects above can be the device mentioned in the fifth aspect, or the chip mentioned in the tenth or eleventh aspect. The beneficial effects achieved by the technical solutions and corresponding possible implementations of the third to eleventh aspects of this application can be found in the above descriptions of the technical effects of the first aspect and its corresponding possible implementations or the second aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0057] Figure 1 is a schematic diagram of an implementation environment provided in an embodiment of this application;

[0058] Figure 2 is a schematic diagram of another implementation environment provided by the embodiments of this application;

[0059] Figure 3 is a schematic diagram of another implementation environment provided in the embodiments of this application;

[0060] Figure 4 is a flowchart of a method for sending and receiving information according to an embodiment of this application;

[0061] Figure 5 is a schematic diagram of the structure of an application information identification field provided in an embodiment of this application;

[0062] Figure 6 is a schematic diagram of the structure of a TLV field provided in an embodiment of this application;

[0063] Figure 7 is a schematic diagram of a BGP NLRI provided in an embodiment of this application;

[0064] Figure 8 is a schematic diagram of the interaction between a first communication device and a second communication device provided in an embodiment of this application;

[0065] Figure 9 is a decoding schematic diagram provided in an embodiment of this application;

[0066] Figure 10 is a schematic diagram of the interaction between another first communication device and a second communication device provided in an embodiment of this application;

[0067] Figure 11 is another decoding schematic diagram provided by an embodiment of this application;

[0068] Figure 12 is a schematic diagram of the structure of an identifier header provided in an embodiment of this application;

[0069] Figure 13 is a schematic diagram of the interaction between another first communication device and a second communication device provided in an embodiment of this application;

[0070] Figure 14 is a schematic diagram of an encoding provided in an embodiment of this application;

[0071] Figure 15 is a schematic diagram of the structure of an op provided in an embodiment of this application;

[0072] Figure 16 is a schematic diagram of another decoding method provided in an embodiment of this application;

[0073] Figure 17 is a schematic diagram of the structure of an information receiving device provided in an embodiment of this application;

[0074] Figure 18 is a schematic diagram of another information transmission device provided in an embodiment of this application;

[0075] Figure 19 is a schematic diagram of the structure of a network device provided in an embodiment of this application;

[0076] Figure 20 is a schematic diagram of the structure of another network device provided in an embodiment of this application. Detailed Implementation

[0077] The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0078] In the field of computer technology, application information can be carried in data packets to be transmitted. This allows network devices to perceive the application and its requirements based on the application information after the data packet enters the network. Consequently, they can provide refined network resource allocation, transmission path scheduling, and service-level agreement (SLA) quality of service guarantees based on the perceived application or requirements. Such networks capable of perceiving application information are sometimes referred to as application-aware networking (APN).

[0079] This application provides methods for receiving and sending information. Please refer to Figure 1, which illustrates an implementation environment for the methods provided in this application. This environment includes a second communication device 01 and a first communication device 02. The second communication device 01 and the first communication device 02 can establish a communication connection via a wired or wireless network. The first communication device 02 is a device involved in the data packet transmission process; it can be a source device for the data packet or an intermediate device for the data packet. The second communication device 01 can be an upper-layer device used to control or manage the data packet transmission.

[0080] Optionally, the first communication device 02 is used to execute the method for receiving information provided in the embodiments of this application, and the second communication device 01 is used to execute the method for sending information provided in the embodiments of this application. For example, based on the case where the data packet is used to carry an application information identification field, the second communication device 01 can obtain template information of the application information identification field and send the template information to the first communication device 02. After receiving the template information, the first communication device 02 can obtain the distribution of subfields in the application information identification field based on the template information.

[0081] Figure 1 is intended to illustrate the connection relationship between the second communication device 01 and the first communication device 02, and is not intended to limit the number of first communication devices 02. The first communication device 02 can be one or more, as shown in Figure 1. Figure 2 is a schematic diagram of another implementation environment provided by an embodiment of this application. The source device, R1, R2, and R3 in Figure 2 are all the first communication devices 02 in Figure 1. This implementation environment includes multiple first communication devices and one second communication device 01. When multiple first communication devices exist, the second communication device 01 can be connected to one first communication device as shown in Figure 2. Optionally, the second communication device 01 can also be connected to multiple first communication devices 02.

[0082] Figure 3 is a schematic diagram of another implementation environment provided by the embodiments of this application. Figure 3 shows the configuration of the second communication device 01 and the first communication device 02 in Figure 1 in an APN. The APN includes: APN Customer, APN Controller, client, and server. The client is used to run applications, such as application (APP) x and APP y in Figure 3. The server can be used to process the data packets generated by the running applications, such as the data packets generated by APP x and APP y processed by the server side in Figure 3.

[0083] In Figure 3, the client and server are connected via an APN network domain, which includes APN Edge, APN Head, APN Midpoint, and APN Endpoint. In Figure 3, the APN-Customer and APN-Controller are connected via their northbound interface (NBI), while the APN-Controller is connected to devices within the APN network domain via its southbound interface (SBI). The APN Edge is a network edge device, while the APN Head, APN Midpoint, and APN Endpoint are network policy enforcement devices. The client is an application-side / cloud-side device.

[0084] Regarding the APN network architecture shown in Figure 3, the second communication device 01 shown in Figure 1 can be the APN-Controller in Figure 3, and the first communication device 02 in Figure 1 can be the application-side / cloud-side device in Figure 3. The first communication device 02 can also be a device included in the APN network domain; for example, the first communication device 02 can be at least one of the APN Edge, APN Head, or APN Midpoint in Figure 3. Referring to Figure 3, the APN-Controller connects to the APN Edge, APN Head, or APN Midpoint, meaning the second communication device 01 connects to multiple first communication devices 02.

[0085] For example, the second communication device 01 and the first communication device 02 in Figure 1 can be any device with transmission capabilities. The second communication device 01 and the first communication device 02 can be terminal devices such as desktop computers, laptops, smartphones, or Internet of Things (IoT) terminals, or servers deployed in any location, such as central cloud servers, edge cloud servers, or local servers in local data centers. The server can be a physical server or a cloud server providing cloud computing services. Optionally, the first communication device 02 can also be a router, switch, or gateway. Furthermore, the second communication device 01 and the first communication device 02 can be independent devices or components within devices, such as transceivers, processors, or chips.

[0086] This application provides a method for receiving and sending information. This method can be applied to the implementation environment shown in Figures 1-3 above. Taking the method as an example where the first communication device and the second communication device interact, the flowchart of the method is shown in Figure 4, including S401-S403.

[0087] S401, the second communication device obtains template information of the application information identification field, the application information identification field includes at least two subfields, and the template information indicates the distribution of the subfields in the application information identification field.

[0088] In one possible scenario, the application information identification field includes multiple subfields, any one of which carries application identification information describing the application or its transmission requirements. For example, the application information identification field includes at least one of APN ID or SAN ID. The subfields within the application information identification field include at least one of application ID, user ID, flow ID, intent ID, device ID, site ID, or performance parameters; that is, the application identification information carried in the subfield includes at least one of these. When the application information identification field includes multiple subfields, the types of these subfields can be different. For example, one subfield may carry application ID, and another may carry application identification parameters. The types of the multiple subfields can also be the same; for example, two subfields may carry application identification information of user ID, but the two user IDs may indicate different users.

[0089] Figure 5 is a schematic diagram of an APN ID structure provided in an embodiment of this application. Figure 5 shows three types of APN IDs including different subfields. The subfields in Figure 5 include SLA Level, APP ID, User ID, Flow ID, Arguments, Locator Address, and Function ID. As shown in Figure 5, the subfields carried by the application information identifier field are dynamically variable, and the distribution of each subfield in the application information identifier field is also dynamically variable. For example, in Figure 5, the length of SLA Level in the first row of the application information identifier field is longer than the length of SLA Level in the second row of the application information identifier field. Since the application information identifier field is composed of multiple fields and its format changes dynamically, the second communication device will obtain the template information of the application information identifier field so that it can still accurately indicate the distribution of each subfield in the application information identifier field even when the format of the application information identifier field changes.

[0090] For example, the template information includes at least one of the following for each of at least two subfields: length or offset. In some cases, the template information reflects the distribution of subfields within the application information identifier field by indicating the start and end positions of each subfield within the field, and the start and end positions can be represented by at least one of the length or offset of the subfield. The offset of a subfield refers to the distance moved from the boundary of the application information identifier field, which can be the first bit or the last bit of the application information identifier field. The length can be a used length or an allocated length. The used length is the actual length occupied by the subfield, and the allocated length is the allowed length occupied by the subfield. Optionally, the start and end positions of subfields within the application information identifier field can be represented by multiple lengths, multiple offsets, or both length and offset.

[0091] Taking an application information identifier field with a length of 64 bits as an example, and subfields A and B respectively using the first 10 bits and bits 32 to 39, we can illustrate three ways to represent the start and end positions of subfields. One method using multiple offsets is as follows: for example, offsets 0 and 9 for subfield A indicate that its start and end positions are 0 to 9. Offsets 32 and 39 for subfield B indicate that its start and end positions are 32 to 39.

[0092] For cases where the start and end positions include a start position and an end position, the start and end positions are indicated by an offset and a length. The start position can be indicated by an offset; for example, if the offset of the start position of subfield A is 0 and the length is 10, then the start and end positions of subfield A are determined to be 0–9. Optionally, the offset can also be used to indicate the end position; for example, if the offset of the end position of a subfield is 39 and the length is 8, then the start and end positions of the subfield are 32–39.

[0093] Optionally, the process of using multiple length-indicating subfields can be as follows: the allocated length of template information indicator subfield A is the first 32 bits, and the usage length is the first 10 bits; the allocated length of indicator subfield B is the last 32 bits, and the usage length is the first 8 bits. This determines the start and end positions of subfield A to be 0-9, and the start and end positions of subfield B to be 32-39. The allocated length is not less than the usage length because an application information identifier field may carry multiple subfields A.

[0094] This application embodiment does not limit the process by which the second communication device obtains template information. The second communication device can receive template information sent by other devices, such as the APN-Customer shown in Figure 2. The APN-Customer is used to provide the customer's control requirements, which indicate the network service the customer expects, such as high-bandwidth network service or low-latency network service. In some cases, the control requirements include template information. That is, the APN-Customer sends template information to the second communication device, which then sends the template information to the first communication device. This allows the first communication device to process data packets according to the template information during data packet transmission. Other devices can also be user terminals. The user sets the template information for the application information identifier field on the terminal and reports the set template information to the second communication device.

[0095] In one possible scenario, the second communication device can also set template information for the application information identification field based on the sub-fields to be carried. For example, the second communication device selects sub-fields whose weights meet the carrying threshold as the sub-fields to be carried, based on the weights of each sub-field. The weights and carrying threshold can be empirically set values. Alternatively, the second communication device analyzes the message streams transmitted in historical time periods to determine the sub-fields to be carried. Then, the second communication device allocates each sub-field to the application information identification field, obtaining the template information for the application information identification field.

[0096] S402, the second communication device sends template information.

[0097] Regardless of the method by which the second communication device obtains the template information, it can send the template information to the first communication device after obtaining it. Optionally, the second communication device can directly send the template information, or it can encapsulate the template information in a message transmission policy and send the message transmission policy accordingly. For example, the second communication device can generate a message processing policy carrying the template information by encapsulating a flow specification (FlowSpec) policy. The FlowSpec policy includes N-tuples, which act as matching elements on an Internet Protocol (IP) flow. If a data packet matches one or more matching elements carried in the FlowSpec policy, the data packet matches the FlowSpec policy. The N-tuples in the FlowSpec policy are carried in the border gateway protocol network layer reachability information (BGP NLRI), and the corresponding action or policy is carried in the extended community attribute. Based on this, the template information can be carried in the extended community attribute or in the BGP NLRI.

[0098] In this context, an extended community attribute is a set of destination addresses with the same characteristics. Using extended community attributes allows a group of devices within an autonomous system (AS) to share the same policies. The extended community attribute can be a community attribute extended by Border Gateway Protocol (BGP) or a community attribute extended by Path Computation Element Protocol (PCEP), and this embodiment of the application does not limit this. Optionally, the BGP extended community attribute can be a BGP extended community attribute based on Internet Protocol version 6 (IPv6) addresses, or it can be a BGP extended community attribute based on other addresses.

[0099] Optionally, the extended community attribute can be either an extended community attribute or a wide community attribute. The extended community attribute is defined by the request for comments (RFC) 4360, while the wide community attribute is defined by the Internet Engineering Task Force (IETF). The number of bytes for the extended community attribute differs from that for the wide community attribute; the extended community attribute has a fixed format of 8 bytes, while the number of bytes for the wide community attribute is dynamically variable.

[0100] In one possible scenario, template information can be encapsulated in a type-length-value (TLV) field of a broad community attribute. Figure 6 is a schematic diagram of the structure of a broad community attribute TLV field provided in an embodiment of this application. This TLV field includes a sub-type field, a length field, and a value field. The value of the sub-type field is to be assigned by the standards organization, and the value field is a variable that can be used to carry template information. In some cases, this TLV field can be referred to as an encapsulated APN header (traffic-marking-apn-header) TLV.

[0101] For example, template information can also be carried in the BGP NLRI. Figure 7 is a schematic diagram of the structure of the BGP NLRI provided in this embodiment. Template information can be encapsulated in the BLRI value in Figure 7. Optionally, template information can also be carried through other protocol messages, including but not limited to PCEP protocol messages or BGP protocol messages. This embodiment does not limit the information included in the message processing strategy used to carry template information. In addition to template information, it can also carry at least one of execution actions, matching conditions, matching rules, or action entries. For a description of execution actions, matching conditions, matching rules, or action entries, please refer to the relevant description in S403, which will not be repeated here.

[0102] Regardless of the method by which the second communication device obtains the message processing strategy carrying template information, it can send the message processing strategy after obtaining it. For example, it can send the message processing strategy to the first communication device involved in the transmission of data packets, so that the first communication device can process the data packets based on the template information in the message processing strategy. Optionally, the second communication device can send the template information to all connected first communication devices, or it can select some first communication devices to send the template information to. For example, as shown in Figure 8, the network devices in Figure 8 correspond to the first communication devices. The second communication device selects the first communication devices that will perform message matching and then traffic splitting, and sends the template information to the selected first communication devices. The above is the method for the second communication device to send information. For the first communication device that receives the template information, the following step S403 can be executed.

[0103] S403, the first communication device receives template information of the application information identifier field.

[0104] This application embodiment does not limit the first communication device for receiving template information; it can be any first communication device used for transmitting data packets. The first communication device can be an intermediate device for transmitting data packets, that is, the first communication device is used to receive data packets sent by an upstream device. Taking a social application message as an example, user A operates terminal A and user B using terminal B send information. Terminal A generates a social application message based on user A's operation and sends the social application message to the first communication device, which then transmits the social application message to terminal B. The first communication device is used to transmit the social application message to terminal B, and the transmitted social application message is a data packet. Optionally, the first communication device can also be a source device for the data packet, that is, the first communication device generates a data packet to be processed and then transmits the data packet. Continuing with the example of terminal A sending a social application message to terminal B in the above embodiment, the first communication device is terminal A, and the social application message generated based on user A's operation is a data packet.

[0105] For example, a data packet can be any packet with a transmission requirement, including but not limited to game packets, video packets, image packets, or social application packets. When a data packet is generated by an application, the application corresponding to the data packet can be a downloaded application on the terminal, or it can be a mini-program or a web-based program.

[0106] In one possible scenario, based on the fact that the first communication device can be used to transmit data packets, after receiving template information, the first communication device will also acquire data packets to be processed; and process the data packets according to the template information. The data packets acquired by the first communication device include two cases: data packets carrying an application information identifier field and data packets not carrying an application information identifier field. For data packets in different cases, the first communication device performs different processing operations on the data packets based on the template information. The following examples illustrate the data packet processing process for each of the different cases.

[0107] Scenario 1: The data packet does not carry the application information identifier field.

[0108] The first communication device processes data packets according to template information, including: if the data packet and the matching rule match successfully, determining the application information identifier field to be encapsulated according to the template information, the matching rule being used to filter the data packets to be identified, the application information identifier field including at least two sub-fields; encapsulating the application information identifier field in the data packet to obtain a data packet carrying the application information identifier field; and sending the data packet carrying the application information identifier field.

[0109] In one possible implementation, the data packet acquired by the first communication device may not carry an application information identifier field. For example, the first communication device may be the source device generating the data packet, but the generated data packet does not carry an application information identifier field. Therefore, the first communication device adds an application information identifier field to the data packet during the data packet encapsulation process. In this case, the first communication device corresponds to the application-side / cloud-side device shown in Figure 3. The operation of adding the application information identifier field by the application-side / cloud-side device during the data packet generation process can be called the application-side solution. This application-side solution only requires the application and the terminal operating system (OS) running the application to support the encapsulation of application information and requirements in the data packet, and is easy to deploy in scenarios where the network and application are owned and managed by the same organization.

[0110] Alternatively, the first communication device may be an intermediate device receiving data packets. However, since the source device did not add an application information identifier field to the data packets during their generation, the data packets received by the first communication device do not carry the application information identifier field. The first communication device will then add the application information identifier field to the data packets. In this case, the first communication device can correspond to either the head node or the edge node shown in Figure 3. The operation of adding the application information identifier field to the data packets by the head node or edge node can be called a network-side solution. In the network-side solution, the application information identifier field does not need to be encapsulated by the application-side / cloud-side device; instead, it is encapsulated by the application-aware network edge device (such as customer premises equipment (CPE)).

[0111] However, not all data packets require an application information identifier field. For example, the first communication device may also transmit packets that do not have corresponding application identifier information, such as probe packets used to detect the network environment. Since these packets lack corresponding application identifier information, there is no need to add an application information identifier field. Therefore, after acquiring a data packet that does not carry an application information identifier field, the matching device will use matching rules to determine whether the data packet requires an identifier.

[0112] In one possible scenario, the matching rule has a corresponding action entry, which is used to indicate the encapsulation of the application information identification field. The first communication device can acquire the matching rule and its corresponding action entry simultaneously, or it can acquire them separately. Furthermore, at least one of the action entry or matching rule can be encapsulated in the same message as the template information; that is, at least one of the action entry or matching rule can be carried in the message processing policy. In this case, after receiving the message processing policy, the first communication device extracts the carried action entry or matching rule from the message processing policy to acquire the action entry or matching rule. If the action entry and matching rule are transmitted separately from the message processing policy, the first communication device can receive action entries and matching rules sent by other devices to acquire the action entries and matching rules. These other devices can be terminals used by maintenance personnel managing the message transmission of the first communication device, or they can be second communication devices.

[0113] Referring to Figure 8, the FlowSpec policy corresponds to the packet processing policy, and the APN ID corresponds to the application information identification field. In Figure 8, the second communication device sends the FlowSpec policy to the first communication device R1, which will perform packet matching and then traffic splitting. R1 generates matching rules and actions based on the received FlowSpec policy. The action is used to match the APN ID and other possible parameters, i.e., other sub-fields. The boxes above R2 and R3 in Figure 8 show the detailed content of the FlowSpec policy, and the action includes action entries and template information. The action items in Figure 8 include apply remark-hbh, apply remark-apn-id-ip6, apn-id-length 64, app-group-space32, user-group-space 32, app-group-used 10, user-group-used 8, apply remark-app-group-id 301, apply remark-user-group-id 201, apply remark-intent 100, apply remark-bandwidth-parameter 10000. Among them, `apply remark-hbh` indicates that the APN-ID is encapsulated in the HBH extension header. `apply remark-apn-id-ip6`, `apn-id-length64`, `app-group-space 32`, `user-group-space 32`, `app-group-used10`, and `user-group-used8` are template information, which can be abbreviated as <64, 32, 32, 10, 8>. For an explanation of the template information, please refer to the explanation in the following examples, which will not be repeated here. `apply remark-app-group-id 301` indicates that the application group ID (app-group-id) is 301. `apply remark-user-group-id 201` indicates that the user group ID (user-group-id) is 201. `apply remark-intent 100` indicates that the intent value is 100. `apply remark-bandwidth-parameter 10000` indicates that the bandwidth requirement parameter value is 10000.In Figure 8, the action items apply remark-hbh, apply remark-user-group-id201, apply remark-intent 100, and apply remark-bandwidth-parameter 10000 are action table items.

[0114] Regardless of whether the first communication device acquires the matching rules and action entries separately or synchronously, the matching rules and corresponding action entries can be referred to as a filtering strategy. This application embodiment does not limit the number of filtering strategies acquired by the first communication device; there can be one or more, and different filtering strategies include at least one different action entry or matching rule. The different matching rules can be due to different parameters used for matching, such as different parameter types or different specific values ​​corresponding to the parameters. The matching rules include at least one of five-tuple information, Layer 2 interface information, or flow identifiers. The five-tuple information can be, for example, a source address or a destination. The specific values ​​corresponding to each parameter can be numerical values, such as a source address of 1000, or the processing results of each parameter, such as performing a mask calculation on the source address, resulting in a mask result of mask1. The different action entries can be due to different processes used to carry subfields, such as carrying different subfields or carrying subfields in different positions.

[0115] If the first communication device acquires a filtering policy, it can directly use the matching rules in the acquired filtering policy to determine whether a data packet requires identification. If the first communication device acquires multiple filtering policies, it can acquire the matching order of each filtering policy and match the matching rules in the filtering policies with the data packet according to the matching order. The matching order can be determined based on the filtering priority of each filtering policy, the acquisition order of each filtering policy, or randomly. Furthermore, multiple matching rules can be matched sequentially, meaning the matching order of multiple filtering policies can be completely different; multiple matching rules can be matched in parallel, for example, multiple filtering policies can have the same matching order; or multiple matching rules can be matched sequentially and in parallel, for example, multiple filtering policies may include some filtering policies with the same matching order.

[0116] Since the process of determining whether a data packet has an identification requirement is similar regardless of whether one or multiple matching rules are matched, the following will use the matching rules shown in Figure 8 as an example to illustrate the process of matching data packets and matching rules.

[0117] Figure 8 includes two matching rules: `if-match destination ip1 mask1` and `if-match source ip2 mask2`. `if-match destination ip1 mask1` indicates matching the destination prefix `ip1`, with `mask1` as the mask. `if-match source ip2 mask2` indicates matching the source prefix `ip2`, with `mask2` as the mask. The first communication device extracts the source prefix `ip3` and the destination prefix `ip4` from the data packet. It then performs masking on `ip3` and `ip4` to obtain `mask3` and `mask4`. `mask3` is compared with `mask1` in the matching rule, and `mask4` is compared with `mask2`. If `mask3` equals `mask1` and `mask4` equals `mask2`, the data packet and the matching rule are considered a successful match. If at least one of the following occurs: `mask3` is not equal to `mask1`, or `mask4` is not equal to `mask2`, the data packet and the matching rule are considered a failed match.

[0118] Since either mask3 or mask4 is not equal to the specific value in the matching rule, it means that the data packet and the matching rule have not matched successfully. Therefore, if the first communication device is performing a sequential matching operation, it can cancel the subsequent matching operation if it detects that the current matching has not been successful. For example, if it detects that mask3 is not equal to mask1, the first communication device will no longer match mask4 and mask2, and will determine that the data packet and the matching rule have not matched successfully.

[0119] When there are multiple filtering strategies, the first communication device can stop executing the remaining matching rules and data packets once a data packet successfully matches any filtering rule. For example, the matching order of each matching rule is determined by filtering priority. Since filtering priority indicates the importance of the filtering strategy, the earlier the matching filtering strategy is matched, the higher its importance. Therefore, the remaining filtering strategies are less important than the currently matched filtering strategy, and the first communication device does not need to continue matching, effectively controlling the number of matching attempts and improving matching efficiency. In some cases, the first communication device can also continue executing the remaining matching rules and data packet matching operations. For example, if the matching order of each filtering strategy is randomly determined, the first communication device can perform multiple matches to obtain multiple filtering strategies that successfully match the data packet. Then, it can select the action entry referenced by the application information identifier field in the subsequent encapsulation from the action entries included in each filtering strategy. The process of selecting the action entry can be based on the amount of information in the subfield indicated by the action entry, selecting the action entry with the most information as the action entry referenced by the application information identifier field, or it can be based on the usage frequency of each action entry, selecting the action entry with the highest usage frequency as the action entry referenced by the application information identifier field.

[0120] If the data packet and the matching rule match successfully, the first communication device determines that the data packet needs to carry an application information identifier field, and can determine the application information identifier field to be encapsulated based on the template information. In one possible case, the process of determining the application information identifier field based on the template information includes: determining the sub-field based on the action entry corresponding to the matching rule; determining the bits used by the sub-field in the application information identifier field based on the template information; assigning values ​​to the bits used by the sub-field in the application information identifier field, resulting in an application information identifier field that includes at least two sub-fields.

[0121] In one possible scenario, the template information and action entries acquired by the first communication device are in encoded form. Therefore, the first communication device will also decode the template information and action entries. Figure 9 is a decoding schematic diagram provided by an embodiment of this application. Figure 9 shows the detailed content of the action item shown in Figure 8. The action item includes template information and action entries. Figure 9(1) is the action item before decoding. The encoding at different positions in Figure 9(1) represents different information, corresponding to... <Location,APN-ID-Space-Len,APP-Group-ID-Space-Len,User-Group-ID-Space-Len,APP-Group-ID-Used-Space-Len,User-Group-ID-Used-Space-Len,Intent-Len,Parameter-Len,[Field-Type,Field-Type-Specific-Value]+> .

[0122] Among them, Location indicates the encapsulation location of APN-ID; APN-ID Space Length refers to the total length allocated to APN-ID; APP-Group-ID Space Length refers to the allocated length allocated to APP-Group-ID; User-Group-ID Space-Len refers to the allocated length allocated to User-Group-ID; APP-Group-ID-Used-Space-Len refers to the used length of APP-Group-ID; and User-Group-ID-Used-Space-Len refers to the used length of User-Group-ID. Intent-Len refers to the length of the Intent field, and Parameter-Len refers to the length of the parameter field. In [Field-Type, Field-Type-Specific-Value], Field-Type indicates the subfield to be carried, and Field-Type-Specific-Value indicates the value of the subfield to be carried. In Figure 9(1), 1 is the code corresponding to the template information, and 2, 3, 4, and 5 are the codes corresponding to [Field-Type, Field-Type-Specific-Value]+. Combining the codes in different positions in Figure 9(1) yields the combination result in Figure 9(2), with different combination results indicating different meanings.

[0123] Taking the encoding corresponding to the template information as an example, the combination results are explained as follows: 0x40 corresponds to APN-ID-Space Length. Since 0x40 equals 64 in decimal, the total length of the APN-ID is 64 bits. The first 0x20 corresponds to APP-Group-ID-Space Length. Since 0x20 equals 32 in decimal, the allocated length for APP-Group-ID is the first 32 bits. The second 0x20 corresponds to User-Group-ID-Space-Len. Since 0x20 equals 32 in decimal, the allocated length for User-Group-ID is the last 32 bits. 0x0a corresponds to APP-Group-ID-Used-Space-Len. Since 0x0a equals 10 in decimal, the used length for APP-Group-ID is the first 10 bits. 0x08 corresponds to User-Group-ID-Used-Space-Len. 0x08 equals 8 after being converted to decimal, indicating that the length of User-Group-ID is the first 8 bits. Among them, APN-ID corresponds to the application information identifier field, and APP-Group-ID and User-Group-ID are subfields. For the meaning of other combination results, please refer to Figure 9 (2), which will not be repeated here.

[0124] In one possible scenario, after acquiring the template information, the first communication device can also perform checks on the template information. For example, in the template information mentioned above, since APP-Group-ID and User-Group-ID are carried within APN-ID, the allocated length of the two fields cannot exceed the total length of APN-ID, i.e., APP-Group-ID-Space-Len + User-Group-ID-Space-Len <= APN-ID-Space-Len. Furthermore, the usage length of the sub-fields cannot exceed the allocated length, i.e., APP-Group-ID-Used-Space-Len <= APP-Group-ID-Space-Len, User-Group-ID-Used-Space-Len <= User-Group-ID-Space-Len. The first communication device checks the template information based on the allocated length and usage length. If the template information check fails, it sends an error message to the second communication device to indicate that the template information was sent incorrectly. If the template information check succeeds, the application information identifier field carrying the fields can be determined using the template information.

[0125] Optionally, the first communication device first selects the subfields to be carried based on the various subfields included in the action entry. For example, as shown in Figure 9(2), the subfields in the action entry include Intent=100, Bandwidth-Parameter=10000, User-Group-ID=201, and APP-Group-ID=301. The first communication device can choose to carry all subfields or select some subfields. The selection of some subfields can be random, for example, the first communication device can randomly select User-Group-ID=201 and APP-Group-ID=301 from the subfields provided by the action entry, or it can be selected according to the importance of the subfields.

[0126] In one possible scenario, the first communication device can also determine the sub-fields to be carried based on the marker field in the action entry. For example, as shown in Figure 9, the action entry also includes a marker field Field-Type, which occupies 1 byte and is used to indicate which sub-fields to be carried. Different values ​​of Field-Type indicate different sub-fields. The correspondence between the values ​​of Field-Type and the sub-fields can be found in Table 1.

[0127] Table 1

[0128] Referring to Table 1, when Field-Type equals 1, the subfield to be carried is APP-Group-ID. Other corresponding relationships can be found in Table 1 and will not be repeated here. Therefore, after receiving the action table entry in Figure 9, the first communication device can determine the subfield to be carried as APP-Group-ID, User-Group-ID, Intent, and Bandwidth parameter based on multiple Field-Type values ​​of 1, 2, 4, and 5 respectively.

[0129] Optionally, the sub-field to be carried determined by the first communication device includes ID, such as APP-GROUP-ID or USER-GROUP-ID. After determining the sub-field to be carried, the first communication device determines the bits used in the application information identifier field of the sub-field according to the template information. Continuing with Figure 9 as an example, the template information indicates that APP-Group-ID uses bits 0 to 9, with the remaining 22 bits unused, and User-Group-ID uses bits 32 to 39, with the remaining 24 bits unused. The first communication device assigns values ​​to the bits used in the sub-field. For example, based on User-Group-ID = 201, 201 converted to binary equals 11001001, so bits 32 to 39 are assigned the value 11001001. The other unused bits in the APN ID are assigned the value 0, resulting in the APN ID value represented in hexadecimal as 0x4b400000c9000000.

[0130] In the above embodiments, since the structure of the application information identifier field has been explicitly specified through the template information, the first communication device can assign values ​​to some bits in the application information identifier field individually according to the template information and the carrying details of the sub-fields, as shown in the above embodiments. For example, the bits used by User-Group-ID or APP-Group-ID can be assigned values ​​individually.

[0131] In one possible scenario, the first communication device may also directly obtain the application information identifier field to be encapsulated, which is determined based on template information. For example, although the message processing strategy sent by the second communication device does not include template information, it includes an application information identifier field carrying sub-fields determined based on the template information. Figure 10 is another interactive schematic diagram provided by an embodiment of this application. The interaction process between the second communication device and the first communication device in Figure 10 is similar to the interaction process shown in Figure 8, and can be referred to the relevant description in Figure 8, which will not be repeated here.

[0132] In Figure 10, the action items of the FlowSpec policy issued by the second communication device include apply remark-doh, apply remark-apn-id-ip60x4b400000c9000000, apply remark-intent 100, and Apply remark-bandwidth-parameter 10000. Among these, apply remark-doh indicates that the APN-ID is encapsulated in the DOH extension header. The meanings of apply remark-intent 100 and apply remark-bandwidth-parameter 10000 are similar to those in Figure 8, and can be found in the above descriptions, so they will not be repeated here. apply remark-apn-id-ip6 0x4b400000c9000000 indicates that an APN-ID is added, and the value of this APN-ID is 0x4b400000c9000000.

[0133] Figure 11 is a schematic diagram of the decoding of the action item shown in Figure 10. In Figure 11, (1) is the action item before decoding. Different positions represent different information, such as<Location,APN-ID-Type,APN-ID,Intent-Exists,APN-Para-Type,Intent,APN-Para> In this context, Location has the same meaning as Location in the above embodiments. APN-ID-Type indicates the type of APN-ID, APN-ID indicates the value of the APN-ID field, Intent-Exists is the intent existence field, used to indicate whether an Intent field exists, and APN-Para-Type is the APN parameter type field, indicating the subfield to be carried, occupying 4 bytes. Each bit identifies a subfield, and setting a bit to 1 indicates that the corresponding subfield is carried. Figure 11(2) shows the decoded action item. The decoding process of Figure 11 is similar to that of Figure 9. Please refer to the relevant description of the decoding process of Figure 9 in the above embodiments, which will not be repeated here.

[0134] In Figure 11, the APN ID corresponds to the Application Information Identifier field. The value of the APN ID is 0x4b400000c9000000, and it carries the subfields User-Group-ID and APP-Group-ID. The bits used in the User-Group-ID and APP-Group-ID in the APN ID are consistent with the bits indicated in the template information. Based on the application scenario shown in Figure 10, the first communication device can directly determine the Application Information Identifier field according to the message processing strategy. The process of obtaining the Application Information Identifier field is simple and efficient.

[0135] Regardless of whether the first communication device determines the application information identifier field based on template information or directly obtains the application information identifier field, it can encapsulate the data packet after obtaining the application information identifier field. In one possible scenario, the action entry includes indication information of the encapsulation position of the application information identifier field. Therefore, the process by which the first communication device encapsulates the application information identifier field in the data packet includes: determining the encapsulation position of the application information identifier field in the data packet based on the encapsulation position indication information; and encapsulating the application information identifier field at the encapsulation position. Optionally, the encapsulation position includes at least one of the HBH extension header, DOH extension header, or SRH extension header. In one possible implementation, in the scenario where this application is applied to IPv6, the HBH extension header, DOH extension header, or SRH extension header is an IPv6 extension header. For example, the HBH extension header can be called the HBH IPv6 extension header, and the SRH extension header can, in some cases, also be called the SRH TLV extension header.

[0136] Referring to Figures 9 and 11, the action table includes a Location field, which indicates the encapsulation location. The Location field can be set to different values ​​to indicate different encapsulation locations. A Location field equal to a first value indicates the location is the HBH extension header. A Location field equal to a second value indicates the location is the DOH extension header, and a Location field equal to a third value indicates the location is the SRH extension header. The first, second, and third values ​​can be empirically set values; for example, the first value is 1, the second value is 2, and the third value is 0. In Figure 9, Location equals 1, indicating the encapsulation location is the HBH extension header, thus the first communication device determines that the application information identifier field is encapsulated in the HBH extension header. In Figure 11, Location equals 2, indicating the encapsulation location is the DOH extension header.

[0137] After determining the encapsulation location of the application information identifier field, the first communication device can perform tunnel encapsulation on the data packet as shown in Figure 8, and then add the application information identifier field at the determined encapsulation location after tunnel encapsulation. Furthermore, the first communication device can use only the application information identifier field to carry subfields, or it can carry other subfields in addition to the application information identifier field. In one possible scenario, the first communication device encapsulates the application information identifier field in an identifier header during the process of adding the application information identifier field, and then adds the identifier header at the encapsulation location. In this case, subfields can be added to the identifier header in locations other than the application information identifier field.

[0138] For example, as shown in Figure 9, the subfields to be carried include APP-Group-ID, User-Group-ID, Intent, and Bandwidth parameter. However, the subfields that can be carried in the application information identifier field APN-ID are APP-Group-ID and User-Group-ID. Therefore, the Intent and Bandwidth parameter, which are not carried through APN-ID, can be added to other positions in the identifier header. Figure 12 is a schematic diagram of the structure of an identifier header provided by an embodiment of this application. In Figure 12, the APN-ID type (APN-ID-Type) occupies 1 byte and indicates the type of APN-ID. When APN-ID-Type equals 1, it indicates a 4-byte APN-ID; when APN-ID-Type equals 2, it indicates an 8-byte APN-ID; and when APN-ID-Type equals 3, it indicates a 16-byte APN-ID. Flags, as identifier bits, can be used as extensions. The APN Paragraph Type (APN-Para-Type) occupies 4 bytes and is an APN parameter type field. It indicates the subfields carried in the APN Paragraph (APN-Para). One bit corresponds to one subfield. A bit set to 1 indicates that the corresponding subfield is carried in the APN-Para, and a bit set to 0 indicates that the corresponding subfield is not carried in the APN-Para. For example, bit 0 being 1 indicates that the APN-Para carries a bandwidth requirement parameter, which is, for example, a 4-byte bandwidth value. The Intent is an optional field in the header. If the Intent field is included in the header, it occupies 4 bytes. The APN-Para is used to carry subfields. In Figure 12, the APN-ID is the application information identifier field. Subfields not carried in the application information identifier field are encapsulated in the APN-Para, such as the Intent and the Bandwidth parameter. Based on the case where the application information identifier field is APN-ID, the header can be called the APN header.

[0139] The first communication device encapsulates an application information identifier field in the data packet. After obtaining the data packet carrying the application information identifier field, it can send the data packet carrying the application information identifier field. For example, based on the routing information of the data packet, it determines the downstream device of the data packet and sends the data packet carrying the application information identifier field to the downstream device. Taking R1 as the first communication device in Figure 8 as an example, the first communication device sends the data packet carrying the application information identifier field to R2.

[0140] Scenario 2: The data packet carries an application information identifier field.

[0141] The first communication device processes data packets according to template information, including: obtaining the execution action corresponding to the data packet and at least one matching condition corresponding to the execution action; extracting at least one subfield to be matched from the identifier field of the data packet according to the template information, wherein each subfield corresponds to at least one matching condition; and processing the data packet according to the execution action if any subfield in the at least one subfield matches any matching condition.

[0142] Regarding the case where the data packet acquired by the first communication device carries an application information identifier field, this application embodiment does not impose limitations. For example, the first communication device is an intermediate device receiving the data packet, and the upstream device of the first communication device adds an application information identifier field to the data packet during the transmission of the data packet. Taking the example shown in Figure 3, where the application-side / cloud-side device adds an application information identifier field to the data packet after generating it, the first communication device is a downstream device of the application-side / cloud-side device and can be a node within the APN network domain, such as an edge node, head node, intermediate node, and tail node. Taking the example shown in Figure 3, where the edge node adds an application information identifier field to the data packet before transmitting it, the first communication device is a head node, intermediate node, tail node, and edge node close to the server side.

[0143] In one possible scenario, during the transmission of data packets, the first communication device determines the execution action of the data packet based on the application corresponding to the data packet, in order to provide the data packet with corresponding application-aware, fine-grained network services. Therefore, the first communication device also acquires the execution action and its corresponding matching conditions to determine the execution action for the data packet based on the matching conditions. Similar to the process of acquiring action entries and matching rules, the execution action and matching conditions acquired by the first communication device can be acquired separately or uniformly. Optionally, at least one of the execution action or the corresponding matching condition is encapsulated in a message processing strategy. That is, the message processing strategy may include template information and execution action, or template information and matching conditions, or template information, matching conditions, and execution action.

[0144] Figure 13 is a schematic diagram of the interaction between a second communication device and a first communication device provided in an embodiment of this application. In Figure 13, network device R1 corresponds to the first communication device, and FlowSpec policy corresponds to the message processing policy. The target matching item in the FlowSpec policy is the matching condition. In Figure 13, the FlowSpec policy includes the matching condition and template information. In this case, the second communication device only needs to send the FlowSpec policy to the first communication device once to provide the matching condition and template information to the first communication device, and the data interaction efficiency is high.

[0145] Similar to the message processing strategy in Case 1, the template information and target matching items in Figure 13 are also information obtained after decoding the FlowSpec policy. In some cases, the FlowSpec policy received by the first communication device is an encoded result. Figure 14 shows an encoding result of template information and matching conditions provided in an embodiment of this application. The subTLV-type is used to indicate the type of the subTLV, and the value of the subTLV-type is to be assigned and specified by the Internet Assigned Numbers Authority (IANA). SubTLV-length indicates the length of the subTLV. The meanings of APN-ID-Space-Len, APP-Group-ID-Space-Len, User-Group-ID-Space-Len, APP-Group-ID-Used-Space-Len, and User-Group-ID-Used-Space-Len are similar to those in Case 1. Please refer to the relevant description in Case 1, and it will not be repeated here.

[0146] [op, value] represents the matching conditions, belonging to a tuple. The operation (operator, op) within [op, value] occupies one byte, and the fields included are shown in Figure 15. The 'e' bit indicates whether the current matching condition is the last one, and the 'a' bit indicates the logical relationship between the current matching condition and the previous matching condition; if equal to 0, it represents "OR," and if equal to 1, it represents "AND." The match type occupies 3 bits and indicates the subfield to be matched: 000 indicates the subfield to be matched is APP-Group-ID, 001 indicates the subfield to be matched is User-Group-ID, and 010 indicates the subfield to be matched is APN-ID. The 'lt', 'gt', and 'eq' bits indicate the comparison condition; 0 indicates no comparison. If the 'lt' bit is equal to 1, the comparison condition is less than; if the 'gt' bit is equal to 1, the comparison condition is greater than; and if the 'eq' bit is equal to 1, the comparison condition is equal to. The type of the value field is indicated by the "match type" in the operator. Optionally, [op, value] can be one or more, that is, there can be one or more matching conditions, and the logical relationship between the matching conditions can be AND or OR.

[0147] Based on the obtained template information and matching conditions as the encoding result, the first communication device will also decode the encoding result to obtain the template information and matching conditions. Figure 16 is a schematic diagram of the decoding of template information and matching conditions provided in an embodiment of this application. (1) in Figure 16 corresponds to the specific value of the encoding result in Figure 14. Combining (1) in Figure 16 yields the combination result (2) in Figure 16. The template information in (2) of Figure 16 is similar to the template information in (2) of Figure 9. Please refer to the relevant description in Figure 9, which will not be repeated here. Next, taking op and value in (2) of Figure 16 as an example, the process of decoding to obtain the matching conditions will be illustrated.

[0148] The first op in (2) of Figure 16 is 0x01, and the binary string is 00000001. Based on the field structure shown in Figure 15, bits 2 to 4 are the match type. Bits 2 to 4 of the binary string are 000, indicating APP-Group-ID. Since the eq bit is equal to 1, it means that the comparison condition is equal. The value corresponding to the first op in (2) of Figure 16 is 0x012d, which is equal to 301 in decimal. The matching condition determined based on op and value is APP-Group-ID = 301.

[0149] The second op in (2) of Figure 16 is 0x4b, and the binary string is 01001011. Bits 2 to 4 of this binary string are 001, indicating that the subfield to be matched is User-Group-ID. Since the gt bit and eq bit are both 1, it means that the comparison condition is greater than or equal to. The value corresponding to the second op in (2) of Figure 16 is 0xc9, which is 201 in decimal. The matching condition determined based on op and value is User-Group-ID>=201.

[0150] The third op in (2) of Figure 16 is 0xcd, and the binary string is 11001101. Bits 2 to 4 of this binary string are 001, indicating that the subfield to be matched is User-Group-ID. Since the lt bit and gt bit are both 1, it means that the comparison condition is less than or equal to. The value corresponding to the third op in (2) of Figure 16 is 0xf0, which is 240 in decimal. Based on the op and value, the matching condition is determined to be User-Group-ID<=201. The above three matching conditions are also the target matching items shown in Figure 13.

[0151] Optionally, the matching conditions and corresponding execution actions can be collectively referred to as matching strategies in some cases. Similar to the filtering strategy in Case 1, the embodiments of this application do not limit the number of matching strategies obtained by the first communication device. The first communication device may obtain one or more matching strategies, and at least one of the execution actions or matching conditions of the multiple matching strategies is different. The process of processing multiple matching strategies is similar to the process of processing multiple filtering strategies. For a detailed description, please refer to the description of multiple filtering strategies in Case 1, which will not be repeated here.

[0152] Since the processing procedures of different matching strategies are similar, we will take any matching strategy as an example to illustrate the process of processing data packets based on the execution action and matching conditions. After obtaining the matching conditions, the first communication device can extract at least one sub-field to be matched from the application information identifier field. The extraction process includes, but is not limited to: determining the sub-field to be extracted based on at least one matching condition; for any sub-field to be extracted, determining the position of any sub-field in the application information identifier field based on the template information, and extracting any sub-field based on the determined position.

[0153] In one possible implementation, a matching condition indicates a subfield to be matched. For example, the first op in Figure 16 indicates that the subfield to be matched is APP-Group-ID, and the second and third ops indicate that the subfield to be matched is User-Group-ID. The first communication device can determine the subfield to be matched indicated by the matching condition as the subfield to be extracted. For example, based on the matching condition shown in Figure 16, it can determine that at least one subfield to be matched is APP-Group-ID and User-Group-ID, and extract the determined subfield.

[0154] After determining the sub-field to be extracted, the first communication device extracts the sub-field from the application information identifier field of the data packet. In one possible scenario, since the encapsulation location of the application information identifier field in the data packet includes the position of at least one of the HBH, DOH, or SRH extension headers, the encapsulation location of the application information identifier field is flexible and variable. Therefore, the first communication device can obtain location information to determine the encapsulation location of the application information identifier field in the data packet based on the location information. For example, the location information can be location information included in a packet carrying template information, such as location information carried in a packet processing policy, or location information carried in the data packet itself. Furthermore, the location information can indicate multi-level locations; for example, first determining that the application information identifier field is encapsulated in an IPv6 extension header based on the location information, and then determining that the application information identifier field is encapsulated in an SRH extension header within the IPv6 extension header based on the location information. In another possible scenario, the encapsulation location of the application information identifier field in the data packet can also be indicated by an offset value.

[0155] The first communication device extracts subfields from the Application Information Identifier field in the data packet. For example, the start and end positions of the subfields are determined based on template information, and the bits between these positions are extracted. Continuing with the template information abbreviated as <64, 32, 32, 10, 8> shown in Figure 16, since APP-Group-ID is located in the first 10 bits of the first 32 bits of the 64-bit APN ID, the value of the first 10 bits is extracted, resulting in APP-Group-ID = 301. Alternatively, since User-Group-ID is located in the first 8 bits of the last 32 bits of the APN ID, the value of these 8 bits is extracted, resulting in User-Group-ID = 201. The above process can also be described as using the target matching field indicated in the matching conditions and the corresponding template information to obtain the actual value of the corresponding part.

[0156] After extracting the subfields to be matched from the data packet based on the template information, the first communication device can sequentially match the subfields and matching conditions. Depending on whether there is one or multiple matching conditions, the process of matching subfields also differs and can be achieved through methods including but not limited to the following two matching methods.

[0157] Matching Method 1: When there is only one matching condition, if the subfield meets the matching condition, it is determined that the subfield and the matching condition are successfully matched; or, if the subfield does not meet the matching condition, it is determined that the subfield and the matching condition are unmatched.

[0158] The sub-field obtained by the first communication device has a corresponding actual value, such as User-Group-ID = 201 in the above embodiment. The first communication device can match the actual value with the expected value indicated by the matching condition. The expected value can be a specific value, such as User-Group-ID = 201, or a range of values, such as User-Group-ID ≤ 201. The first communication device compares the actual value and the expected value. If the actual value is equal to the expected value or falls within the range of values, it is determined that the sub-field meets the matching condition, and the sub-field and the matching condition are successfully matched. If the actual value is not equal to the expected value or does not fall within the range of values, it is determined that the sub-field does not meet the matching condition, and the sub-field and the matching condition are unsuccessful. In one possible case, the expected value indicated by the matching condition can be referred to as the field value corresponding to the matching condition, as shown in Figure 13. In this case, the above comparison process can be referred to as comparing whether the actual value and the field value are consistent. If they are consistent, the matching condition is considered to be successfully matched; if they are inconsistent, the matching condition is considered to be unsuccessful.

[0159] Matching Method 2: When there are multiple matching conditions, determine at least one of the logical relationship or matching priority of each matching condition; according to at least one of the matching priority or logical relationship, match each matching condition and at least one sub-field to obtain the matching result. The matching result is used to indicate whether any sub-field in at least one sub-field and any matching condition are successfully matched.

[0160] In one possible scenario, a successful match between any subfield and any matching condition indicates a successful match between the data packet and the matching strategy. This can be understood as follows: when the logical relationship between multiple matching conditions is OR, a successful match between the data packet and the matching strategy is indicated by any subfield matching any matching condition. Alternatively, when the logical relationship between multiple matching conditions is AND, each of the multiple matching conditions successfully matches a subfield. In this case, any matching condition will have a successfully matched subfield.

[0161] For example, multiple matching conditions have matching priorities. As shown in Figure 16, the matching priority of APP-Group-ID = 301 is higher than that of User-Group-ID >= 201, and the matching priority of User-Group-ID >= 201 is limited to that of User-Group-ID <= 240. The first communication device can match subfields and matching conditions according to the matching priority order after obtaining the matching priorities of the matching conditions. For example, it first compares the actual value of APP-Group-ID extracted from the application information identifier field with the relationship between the actual value and 301. If the actual value equals 301, it determines that APP-Group-ID matches the matching condition successfully. If the actual value does not equal 301, it determines that APP-Group-ID fails to match the matching condition. Then, it compares the actual value of User-Group-ID with the size of 201 to obtain the matching result.

[0162] In one possible scenario, there is a logical relationship between the various matching conditions. For example, in Figure 16(2), the second op is 0x4b, the binary string is 01001011, and the second bit is 1, indicating that the logical relationship with the previous matching condition is AND. In Figure 16(2), the third op is 0xcd, the binary string is 11001101, and the second bit is 1, indicating that the logical relationship with the previous matching condition is AND. Therefore, the logical relationship between the three matching conditions is APP-Group-ID = 301 and 201 <= User-Group-ID <= 240.

[0163] The first communication device can determine the matching result based on logical relationships. Taking the logical relationship as AND as an example, it obtains the comparison result of the matching condition and the subfield. If any comparison result fails, the matching result is determined to be a failed match, and the comparison is stopped for matching conditions that have not been performed. Alternatively, if the logical relationship is OR, if any comparison result succeeds, the matching result is determined to be a successful match, and the comparison is stopped for matching conditions that have not been performed.

[0164] In one possible scenario, the first communication device can also combine logical relationships and matching priorities. Taking Figure 16 as an example, each matching condition is executed in order of matching priority. First, the actual value of APP-Group-ID is compared to 301. If the actual value of APP-Group-ID is not equal to 301, the matching process ends. If the actual value of APP-Group-ID is equal to 301, the next matching condition is compared. The actual value of User-Group-ID is compared to 201. If the actual value is less than 201, the matching process ends. If the actual value is greater than or equal to 201, the next matching condition is compared. Finally, the actual value of User-Group-ID is compared to 240. If the actual value is less than or equal to 240, the matching result is determined to be a successful match; if the actual value is greater than 240, the matching result is determined to be a failed match. Optionally, since the first bit of the third op in Figure 16 is 1, indicating that this is the last matching condition, the first communication device can directly obtain the matching result after comparing the actual value of User-Group-ID with 240, without matching other matching conditions.

[0165] When there are multiple matching conditions, the first communication device can uniformly extract the sub-fields to be matched indicated by the matching conditions, or extract the sub-fields corresponding to the matching conditions from the application information identifier field when comparing any matching conditions, so as to avoid premature termination of the matching process, resulting in the unused sub-fields extracted in advance and avoiding the generation of invalid operations.

[0166] After determining the matching result, the first communication device can execute the corresponding action based on the matching condition if the matching result is successful. The action could be, for example, mapping the data packet into an IPv6 segment routing over IPv6 (SRv6) path, or driving in-situ flow information telemetry (IFIT) real-time performance monitoring. Optionally, if the data packet also carries performance parameters, the action could also be allocating transmission resources to the data packet based on these parameters. For example, if the performance parameter is a bandwidth requirement parameter, the action could be allocating bandwidth to the data packet, ensuring that the bandwidth meets the bandwidth requirement parameter. After determining the action, the first communication device processes the data packet according to the action, for example, transmitting the data packet via the SRv6 path or using the allocated bandwidth. In some cases, the processing action might also be discarding the data packet; in such cases, the first communication device's process of processing the data packet according to the action might involve discarding the data packet.

[0167] In summary, the method provided in this application embodiment indicates the distribution of subfields within the application information identifier field through template information. The first communication device can accurately determine the field format of the application information identifier field based on the template information, thereby improving the processing accuracy of data packets. Even when the data packet does not carry an application information identifier field, the template information can be used to obtain the application information identifier field including subfields, enabling flexible carrying of subfields. Furthermore, this application does not limit the method of obtaining the application information identifier field. The first communication device can determine the application information identifier field based on the subfields to be carried and the template information, or it can receive the application information identifier field directly sent by the second communication device, where the subfields carried in the application information identifier field also satisfy the template information.

[0168] In addition to the application information identifier field, data packets can also carry other subfields, increasing the amount of information carried. If a data packet carries an application information identifier field, the first communication device can extract the subfields based on the template information, resulting in higher extraction efficiency. Since the subfields describe the application corresponding to the data packet, processing the data packet based on the execution action determined by the subfields enables targeted processing of the data packet based on the corresponding application, achieving high processing accuracy. Furthermore, it is not limited to processing data packets based on template information, offering high flexibility and wide applicability.

[0169] The methods for receiving and sending information according to embodiments of this application have been described above. Corresponding to the methods described above, embodiments of this application also provide an apparatus for receiving information. Figure 17 is a schematic structural diagram of an apparatus for receiving information provided in an embodiment of this application. Based on the following modules shown in Figure 17, the apparatus for receiving information shown in Figure 17 can perform all or part of the operations of the first communication device shown in Figure 4. It should be understood that the apparatus may include more additional modules than the modules shown or omit some of the modules shown, and embodiments of this application do not limit this. As shown in Figure 17, the apparatus includes:

[0170] The transceiver module 1701 is used to perform the receiving and / or sending related operations in the embodiment shown in FIG4;

[0171] The processing module 1702 is used to perform operations other than the receiving and / or sending related operations in the embodiment shown in FIG4.

[0172] In one possible implementation, the transceiver module 1701 is used to receive template information of the application information identification field, which includes at least two subfields, and the template information indicates the distribution of the subfields in the application information identification field.

[0173] In one possible implementation, the transceiver module 1701 is used to acquire the data message to be processed; the processing module 1702 is used to process the data message according to the template information.

[0174] In one possible implementation, the data packet carries an application information identifier field. The processing module 1702 is used to obtain the execution action corresponding to the data packet and at least one matching condition corresponding to the execution action; extract at least one subfield to be matched from the application information identifier field of the data packet according to the template information, and each subfield corresponds to at least one matching condition; if any subfield in at least one subfield matches any matching condition, the data packet is processed according to the execution action.

[0175] In one possible implementation, the processing module 1702 is used to determine the subfield to be extracted based on at least one matching condition; for any subfield to be extracted, the position of any subfield in the application information identifier field is determined based on the template information, and the subfield is extracted based on the determined position.

[0176] In one possible implementation, at least one of the execution action or the matching conditions corresponding to the execution action and the template information are encapsulated in the same message.

[0177] In one possible implementation, there are multiple matching conditions. The processing module 1702 is further used to determine at least one of the logical relationship or matching priority of each matching condition; according to at least one of the matching priority or logical relationship, each matching condition and at least one sub-field are matched to obtain a matching result. The matching result is used to indicate whether any sub-field in at least one sub-field and any matching condition are successfully matched.

[0178] In one possible implementation, the application information identification field is located in the encapsulation position of the data packet, including at least one of the following extension headers: HBH extension header, DOH extension header, or SRH extension header.

[0179] In one possible implementation, the message or data packet carrying template information also includes location information, which indicates the encapsulation location of the application information identification field in the data packet.

[0180] In one possible implementation, the data packet does not carry an application information identifier field. The processing module 1702 is used to determine the application information identifier field to be encapsulated based on the template information when the data packet and the matching rule match successfully. The matching rule is used to filter the data packets to be identified. The application information identifier field includes at least two sub-fields. The application information identifier field is encapsulated in the data packet to obtain a data packet carrying the application information identifier field. The data packet carrying the application information identifier field is then sent.

[0181] In one possible implementation, the processing module 1702 is used to determine the subfield according to the action entry corresponding to the matching rule; determine the bit used by the subfield in the application information identifier field according to the template information; and assign values ​​to the bit used by the subfield in the application information identifier field to obtain an application information identifier field that includes at least two subfields.

[0182] In one possible implementation, the action entry corresponding to the matching rule includes an indication of the encapsulation location of the application information identifier field. The processing module is used to determine the encapsulation location of the application information identifier field in the data packet based on the encapsulation location indication information, and to encapsulate the application information identifier field at the encapsulation location.

[0183] In one possible implementation, the package location includes the location of at least one of the following extensions: HBH extension, DOH extension, or SRH extension.

[0184] The aforementioned device clarifies the distribution of subfields within the application information identifier field through template information. Subsequently, it can accurately determine the field format of the application information identifier field based on the template information, thereby improving the accuracy of data packet processing.

[0185] This application also provides an apparatus for sending information. Figure 18 is a schematic diagram of the structure of an apparatus for sending information provided in this application. Based on the multiple modules shown in Figure 18, the apparatus for sending information shown in Figure 18 can perform all or part of the operations of the second communication device shown in Figure 4. It should be understood that the apparatus may include more additional modules than the modules shown or omit some of the modules shown, and this application does not limit this. As shown in Figure 18, the apparatus includes:

[0186] The transceiver module 1801 is used to perform the receiving and / or sending related operations in the embodiment shown in FIG4;

[0187] The processing module 1802 is used to perform operations other than the receiving and / or sending related operations in the embodiment shown in FIG4.

[0188] In one possible implementation, the processing module 1802 is used to obtain template information of the application information identification field, the application information identification field includes at least two subfields, and the template information indicates the distribution of the subfields in the application information identification field; the sending and receiving module 1801 is used to send the template information.

[0189] In one possible implementation, template information is used to process data packets, and the application information identification field is located at the encapsulation position of the data packet, including the position of at least one of the HBH extension header, DOH extension header, or SRH extension header.

[0190] In one possible implementation, the template information in the apparatus shown in Figure 17 or Figure 18 includes at least one of the following for each of at least two subfields: length or offset.

[0191] In one possible implementation, the application information identification field in the device shown in Figure 17 or Figure 18 includes at least one of APN ID or SAN ID.

[0192] In one possible implementation, the subfields in the device shown in Figure 17 or Figure 18 include at least one of application ID, user ID, stream ID, intent ID, device ID, site ID, or performance parameters.

[0193] The aforementioned device clarifies the distribution of subfields within the application information identifier field using template information, and then sends the template information so that the receiving device can accurately determine the field format of the application information identifier field based on the template information, thereby improving the processing accuracy of data packets.

[0194] It should be understood that the devices provided in Figures 17 or 18 are only illustrated by the division of the functional modules described above when implementing their functions. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the devices and methods provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here. In addition, the devices provided in Figures 17 or 18 can be chips or communication devices; for example, the device for sending information can be the network device described below.

[0195] Referring to Figure 19, Figure 19 shows a schematic diagram of the structure of a network device 1900 provided in an exemplary embodiment of this application. The network device 1900 shown in Figure 19 is used to perform the operations involved in the methods of receiving and sending information shown in Figure 4 above. The network device 1900 is, for example, a switch, a router, etc., and can be implemented by a general bus architecture.

[0196] As shown in Figure 19, the network device 1900 includes at least one processor 1901, a memory 1903, and at least one communication interface 1904.

[0197] Processor 1901 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solutions of this application. For example, processor 1901 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. It can implement or execute the various logic blocks, modules, and circuits described in connection with the embodiments of this application. A processor may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0198] Optionally, network device 1900 also includes a bus. The bus is used to transfer information between the components of network device 1900. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one thick line is used in Figure 19, but this does not indicate that there is only one bus or one type of bus.

[0199] Memory 1903 may be, for example, read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 1903 may exist independently and be connected to processor 1901 via a bus. Memory 1903 may also be integrated with processor 1901.

[0200] Communication interface 1904 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), or Wireless Local Area Network (WLAN). Communication interface 1904 can include wired and wireless communication interfaces. Specifically, communication interface 1904 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a WLAN interface, a cellular network communication interface, or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In this embodiment, communication interface 1904 can be used by network device 1900 to communicate with other devices.

[0201] In a specific implementation, as one embodiment, processor 1901 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG19. Each of these processors may be a single-core processor or a multi-core processor. Here, processor may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0202] In a specific implementation, as one example, network device 1900 may include multiple processors, such as processor 1901 and processor 1905 as shown in FIG19. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, a processor may refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0203] In a specific implementation, as one example, network device 1900 may further include output devices and input devices. The output device communicates with processor 1901 and can display information in various ways. For example, the output device may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with processor 1901 and can receive user input in various ways. For example, the input device may be a mouse, keyboard, touchscreen device, or sensing device, etc.

[0204] In some embodiments, memory 1903 stores program code 1910 for executing the scheme of this application, and processor 1901 can execute the program code 1910 stored in memory 1903. That is, network device 1900 can implement the method for receiving information provided in the method embodiment, or the method for sending information provided in the embodiment, through processor 1901 and program code 1910 in memory 1903. Program code 1910 may include one or more software modules. Optionally, processor 1901 itself may also store program code or instructions for executing the scheme of this application.

[0205] In a specific embodiment, the network device 1900 of this application embodiment may correspond to the computing device in the above-described method embodiments.

[0206] In the method for receiving and sending information shown in Figure 4, each step is completed through integrated logic circuits in the hardware or software instructions of the processor in the network device 1900. The steps of the method disclosed in this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. Since the storage medium is located in memory, the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method; to avoid repetition, these will not be described in detail here.

[0207] Referring to Figure 20, which illustrates a schematic diagram of a network device 2000 provided in another exemplary embodiment of this application, the network device 2000 shown in Figure 20 is used to perform all or part of the operations involved in the methods for receiving and sending information shown in Figure 4 above. This network device 2000 is, for example, a switch, a router, etc., and can be implemented using a general bus architecture.

[0208] As shown in Figure 20, the network device 2000 includes: a main control board 2010 and an interface board 2030.

[0209] The main control board, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the network device 2000, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2010 includes a central processing unit 2011 and a memory 2012.

[0210] Interface board 2030, also known as line processing unit (LPU), line card, or service board, provides various service interfaces and enables packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, Flexible Ethernet Clients (FlexE Clients). Interface board 2030 includes: a central processing unit 2031, a network processor 2032, a forwarding table entry memory 2034, and a physical interface card (PIC) 2033.

[0211] The central processing unit 2031 on the interface board 2030 is used to control and manage the interface board 2030 and communicate with the central processing unit 2011 on the main control board 2010.

[0212] The network processor 2032 is used to implement packet forwarding processing. The network processor 2032 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented using an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA). Specifically, the network processor 2032 forwards received packets based on the forwarding table stored in the forwarding table entry memory 2034. If the destination address of the packet is the address of the network device 2000, the packet is sent to the CPU (such as the central processing unit 2031) for processing; if the destination address of the packet is not the address of the network device 2000, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing may include: packet ingress interface processing, forwarding table lookup; downlink packet processing may include: forwarding table lookup, etc. In some embodiments, the central processing unit can also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for a forwarding chip on the interface board.

[0213] The physical interface card 2033 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 2030 through this card, and processed packets are sent out from the physical interface card 2033. The physical interface card 2033, also known as a daughter card, can be installed on the interface board 2030. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 2032 for processing. In some embodiments, the central processing unit 2031 can also perform the functions of the network processor 2032, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 2032 in the physical interface card 2033.

[0214] Optionally, the network device 2000 includes multiple interface boards. For example, the network device 2000 also includes an interface board 2040, which includes a central processing unit 2041, a network processor 2042, a forwarding table entry memory 2044, and a physical interface card 2043. The functions and implementation methods of the components in the interface board 2040 are the same as or similar to those in the interface board 2030, and will not be described in detail here.

[0215] Optionally, the network device 2000 also includes a switching fabric board 2020. The switching fabric board 2020 can also be called a switch fabric unit (SFU). When the network device 2000 has multiple interface boards, the switching fabric board 2020 is used to complete data exchange between the interface boards. For example, interface boards 2030 and 2040 can communicate through the switching fabric board 2020.

[0216] The main control board 2010 and the interface boards are coupled. For example, the main control board 2010, interface boards 2030 and 2040, and the switching network board 2020 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 2010 and interface boards 2030 and 2040, and communication between the main control board 2010 and interface boards 2030 and 2040 is achieved through the IPC channel.

[0217] Logically, network device 2000 includes a control plane and a forwarding plane. The control plane includes a main control board 2010 and a central processing unit 2011, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 2034, a physical interface card 2033, and a network processor 2032. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of network devices. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 2032 forwards messages received by the physical interface card 2033 based on the forwarding tables distributed by the control plane. The forwarding tables distributed by the control plane can be stored in the forwarding table entry memory 2034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.

[0218] It's worth noting that a network device may have one or more main control boards, including a primary and a backup main control board. It may also have one or more interface boards; the more powerful the network device's data processing capabilities, the more interface boards it provides. Each interface board may also have one or more physical interface cards. A switching board may or may not exist; multiple boards can share the load and provide redundancy. In a centralized forwarding architecture, the network device may not need a switching board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, the network device can have at least one switching board, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture network device are greater than those of a centralized architecture network device. Alternatively, the network device can also be a single board, without a switching board. The functions of the interface board and the main control board are integrated on this one board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU to perform the combined functions. This type of network device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.

[0219] In a specific embodiment, network device 2000 corresponds to the information receiving device shown in FIG17 or the information sending device shown in FIG18. In some embodiments, the processing module 1702 in the information receiving device shown in FIG17 is equivalent to the central processing unit 2011 or the network processor 2032 in network device 2000.

[0220] This application also provides a communication device, which includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive signals and transmit signals. When the processor executes the instructions stored in the memory, it causes the processor to perform a method for receiving information or a method for transmitting information.

[0221] It should be understood that the aforementioned processor can be a CPU, or other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting the Advanced Reduced Instruction Set Computing (RISC) machine (ARM) architecture.

[0222] Furthermore, in an alternative embodiment, the memory described above may include read-only memory and random access memory, and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store device type information.

[0223] The memory can be volatile or non-volatile, or may include both. Non-volatile memory can be ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), EEPROM, or flash memory. Volatile memory can be RAM, used as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0224] This application also provides a communication device, which includes a processor for loading and executing at least one instruction to enable the communication device to implement the method for receiving information in FIG4, or the method for sending information in FIG4. Optionally, the device further includes a memory coupled to the processor for storing at least one instruction.

[0225] This application also provides a communication system, which includes a first communication device and a second communication device. The first communication device and the second communication device are used to interactively execute the method of receiving and sending information shown in FIG4.

[0226] This application also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to enable the computer to implement the method of receiving and sending information shown in FIG4.

[0227] This application also provides a computer program (product) that, when executed by a computer, causes the processor or computer to perform the corresponding steps and / or processes in the above method embodiments.

[0228] This application also provides a chip, which includes a processor for calling and running instructions stored in a memory, causing a communication device equipped with the chip to perform the method of receiving and sending information shown in FIG4.

[0229] This application embodiment also provides another chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method of receiving and sending information shown in FIG4.

[0230] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk).

[0231] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the template information involved in this application was obtained with full authorization.

[0232] Those skilled in the art will recognize that the method steps and modules described in conjunction with the embodiments disclosed herein can be implemented in software, hardware, firmware, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0233] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0234] When implemented using software, it can be implemented wholly or partially as a computer program product. This computer program product includes one or more computer program instructions. As an example, the methods of this application embodiment can be described in the context of machine-executable instructions, such as program modules that execute on a device on a real or virtual processor of the target. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures. In various embodiments, the functionality of program modules can be combined or divided among the described program modules. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside on both local and remote storage media.

[0235] Computer program code used to implement the methods of the embodiments of this application may be written in one or more programming languages. This computer program code may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable means of receiving or transmitting information, such that when executed by the computer or other programmable means of receiving or transmitting information, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a standalone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.

[0236] In the context of the embodiments of this application, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, etc.

[0237] Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.

[0238] A machine-readable medium can be any tangible medium that contains or stores programs for or relating to an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. More detailed examples of machine-readable storage media include electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0239] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0240] In the embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or modules, or they may be electrical, mechanical, or other forms of connection.

[0241] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0242] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0243] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0244] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have substantially the same function and purpose. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another. For example, without departing from the various examples described, a first image can be referred to as a second image, and similarly, a second image can be referred to as a first image. Both the first image and the second image can be images, and in some cases, they can be separate and distinct images.

[0245] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0246] In this application, the term "at least one" means one or more, and the term "multiple" means two or more. For example, multiple second messages refer to two or more second messages. The terms "system" and "network" are often used interchangeably in this document.

[0247] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0248] It should also be understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items. The term "and / or" describes an association between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects are in an "or" relationship.

[0249] It should also be understood that the term “comprising” (also referred to as “includes”, “including”, “comprises” and / or “comprising”) as used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0250] It should also be understood that the terms “if” and “if” can be interpreted as meaning “when” or “upon”, or “in response to determination” or “in response to detection”. Similarly, depending on the context, the phrases “if determination…” or “if detection [the stated condition or event]” can be interpreted as meaning “when determination…”, or “in response to determination…”, or “when detection [the stated condition or event]” or “in response to detection [the stated condition or event]”.

[0251] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.

[0252] It should also be understood that the phrases "an embodiment," "an embodiment," and "a possible implementation" used throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment or implementation is included in at least one embodiment of this application. Therefore, the phrases "in an embodiment," "an embodiment," or "a possible implementation" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

Claims

1. A method for receiving information, characterized in that, The method includes: Receive template information for an application information identifier field, the application information identifier field including at least two subfields, the template information indicating the distribution of the subfields in the application information identifier field.

2. The method according to claim 1, characterized in that, After receiving the template information of the application information identifier field, the method further includes: Retrieve data packets to be processed; The data packet is processed according to the template information.

3. The method according to claim 2, characterized in that, The data packet carries the application information identifier field, and the step of processing the data packet according to the template information includes: Obtain the execution action corresponding to the data packet and at least one matching condition corresponding to the execution action; Based on the template information, at least one subfield to be matched is extracted from the application information identifier field of the data packet, and each subfield corresponds to at least one matching condition; If any one of the at least one subfields matches any one of the matching conditions, the data packet is processed according to the execution action.

4. The method according to claim 3, characterized in that, The step of extracting at least one sub-field to be matched from the application information identifier field of the data packet based on the template information includes: The subfield to be extracted is determined based on at least one matching condition; For any subfield to be extracted, the position of the subfield in the application information identifier field is determined according to the template information, and the subfield is extracted based on the determined position.

5. The method according to claim 3 or 4, characterized in that, At least one of the execution action or the matching condition corresponding to the execution action and the template information are encapsulated in the same message.

6. The method according to any one of claims 3-5, characterized in that, The matching conditions are multiple, and after extracting at least one sub-field to be matched from the application information identifier field of the data packet according to the template information, the method further includes: Determine at least one of the logical relationship or matching priority among the various matching conditions; Based on at least one of the matching priority or the logical relationship, each matching condition and the at least one subfield are matched to obtain a matching result, which is used to indicate whether any subfield and any matching condition in the at least one subfield are successfully matched.

7. The method according to any one of claims 3-6, characterized in that, The application information identification field is located in the encapsulation position of the data packet, including at least one of the following extension headers: Hop-by-Hop Optional Header (HBH), Destination Address Optional Header (DOH), or Segment Router Header (SRH).

8. The method according to any one of claims 3-7, characterized in that, The message carrying the template information or the data message also includes location information, which indicates the encapsulation location of the application information identification field in the data message.

9. The method according to claim 2, characterized in that, The data packet does not carry the application information identifier field. Processing the data packet according to the template information includes: If the data packet and the matching rule match successfully, the application information identifier field to be encapsulated is determined according to the template information. The matching rule is used to filter the data packet to be identified. The application information identifier field includes at least two subfields. The application information identifier field is encapsulated in the data packet to obtain a data packet carrying the application information identifier field; Send the data packet carrying the application information identifier field.

10. The method according to claim 9, characterized in that, The step of determining the application information identifier field to be encapsulated based on the template information includes: The sub-fields are determined based on the action entries corresponding to the matching rules; The bit positions used by the subfield in the application information identifier field are determined based on the template information; The subfields are assigned values ​​to the bits used in the application information identifier field to obtain an application information identifier field that includes the at least two subfields.

11. The method according to claim 9 or 10, characterized in that, The action entry corresponding to the matching rule includes an indication of the encapsulation location of the application information identifier field. Encapsulating the application information identifier field in the data packet includes: Based on the encapsulation location indication information, determine the encapsulation location of the application information identifier field in the data packet; The application information identifier field is encapsulated at the encapsulation location.

12. The method according to claim 11, characterized in that, The encapsulation location includes the location of at least one of the following extension headers: Hop-by-Hop Optional Header (HBH), Destination Address Optional Header (DOH), or Segment Router Header (SRH).

13. A method for sending information, characterized in that, The method includes: Obtain template information for an application information identifier field, wherein the application information identifier field includes at least two subfields, and the template information indicates the distribution of the subfields in the application information identifier field; Send the template information.

14. The method according to claim 13, characterized in that, The template information is used to process data packets, and the application information identification field includes the position of at least one of the following extension headers in the encapsulation location of the data packet: Hop-by-Hop Optional Header (HBH), Destination Address Optional Header (DOH), or Segment Router Header (SRH).

15. The method according to any one of claims 1-14, characterized in that, The template information includes at least one of the following for each of the at least two subfields: length or offset.

16. The method according to any one of claims 1-15, characterized in that, The application information identification field includes at least one of the application-aware network identifier (APN ID) or service-aware network identifier (SAN ID).

17. The method according to any one of claims 1-16, characterized in that, The subfields include at least one of the following: application identifier ID, user ID, stream ID, intent ID, device ID, site ID, or performance parameters.

18. A device for receiving information, characterized in that, The device includes: The transceiver module is used to perform the receiving and / or sending related operations in the method of any one of claims 1-12 and 15-17; The processing module is used to perform operations other than the receiving and / or sending related operations in the method of any one of claims 1-12 and 15-17.

19. A device for transmitting information, characterized in that, The device includes: The transceiver module is used to perform the receiving and / or sending related operations in the method of any one of claims 13-17; The processing module is used to perform operations other than the receiving and / or sending related operations in the method of any one of claims 13-17.

20. A communication device, characterized in that, The device includes a processor for loading and executing at least one instruction to cause the device to implement the method of receiving information as described in any one of claims 1-12, 15-17, or the method of sending information as described in any one of claims 13-17.

21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement the method as described in any one of claims 1-12, 15-17, or the method as described in any one of claims 13-17.

22. A chip, characterized in that, The chip includes a processor for running program instructions or code that cause a device containing the chip to perform the method as described in any one of claims 1-12, 15-17, or the method as described in any one of claims 13-17.

23. A computer program product, characterized in that, The computer program product includes a computer program / instruction that is executed by a processor to cause a computer to perform the method as described in any one of claims 1-12, 15-17, or the method as described in any one of claims 13-17.

24. A communication system, characterized in that, The system includes a first communication device and a second communication device, wherein the first communication device is used to perform the method as described in any one of claims 1-12, 15-17, and the second communication device is used to perform the method as described in any one of claims 13-17.

Citation Information

Patent Citations

  • Application layer stream detection method and device based on access point (APN), and related equipment

    CN116527592A

  • Message receiving method, sending method, forwarding method, device and system

    CN117176632A

  • Message sending method, device and system

    CN117478734A

  • Non-volatile Storage Systems With Application-Aware Error-Correcting Codes

    US20180358989A1

  • Use of template messages to optimize a software messaging system

    US7444596B1