Stream control transmission protocol (SCTP) link establishment method, equipment and device
By introducing SCTP processing threads into the network device, processing link configuration data and establishing data links with the second network device, the system overhead problem caused by frequent thread switching in the existing SCTP link building process is solved, and more efficient Processing performance.
Patent Information
- Application Number
- CN202311026650.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-21
AI Technical Summary
The existing SCTP chain building process leads to frequent thread switching and high system overhead.
By introducing SCTP processing threads into the network device, receiving configuration messages sent by the configuration thread, processing link configuration data, generating link control block information, and establishing a data link with the second network device based on this to reduce thread switching.
Reduces the frequency of thread switching, reduces the system overhead in the SCTP chain building process, and improves processing performance.
Smart Images

Figure CN119496768A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a stream control transmission protocol (SCTP) link establishment method, equipment and device. Background Art
[0002] Stream Control Transmission Protocol (SCTP) is a protocol for transmitting multiple data streams simultaneously between the two ends of a network connection. It can provide multiple streams between the two connected ends, and each stream can reliably deliver messages in sequence.
[0003] At present, the SCTP protocol in network devices is implemented based on the Linux multi-threading concept, which is divided into SCTP packet receiving thread, timer thread, signaling sending thread, SCTP control and signaling receiving thread, SCTP configuration thread, etc. However, the current SCTP link establishment process will lead to frequent thread switching and high system overhead. Summary of the invention
[0004] The present application provides a stream control transmission protocol (SCTP) link establishment method, device and apparatus to solve the problem that the current SCTP link establishment process causes frequent thread switching and high system overhead.
[0005] In a first aspect, the present application provides an SCTP link establishment method, which is applied to a first network device, wherein the first network device includes a configuration thread and an SCTP processing thread, and the method includes:
[0006] The SCTP processing thread receives the configuration message sent by the configuration thread, and the configuration message includes link configuration data;
[0007] The SCTP processing thread processes the link configuration data according to SCTP and generates link control block information;
[0008] The SCTP processing thread establishes a data link with the second network device based on the link control block information.
[0009] In a possible implementation, the SCTP processing thread establishes a data link with the second network device based on the link control block information, including:
[0010] The SCTP processing thread sends an SCTP establishment request message to the second network device, where the SCTP establishment request message includes link control block information;
[0011] The SCTP processing thread receives the SCTP establishment request confirmation message sent by the second network device, where the SCTP establishment request confirmation message includes a status COOKIE;
[0012] The SCTP processing thread sends a COOKIE response message to the second network device, where the COOKIE response message includes a status COOKIE;
[0013] The SCTP processing thread receives a COOKIE response confirmation message sent by the second network device, where the COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0014] In a possible implementation manner, the first network device further includes an AP processing thread, and the method further includes:
[0015] When a data link is established with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
[0016] In a possible implementation, the method further includes:
[0017] The SCTP processing thread receives an AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted;
[0018] The SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data;
[0019] The SCTP processing thread sends the first SCTP data to the second network device.
[0020] In a possible implementation, the method further includes:
[0021] The SCTP processing thread receives second SCTP data sent by the second network device;
[0022] The SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted;
[0023] The SCTP processing thread sends a receiving signaling to the AP processing thread, where the receiving signaling includes the second data to be transmitted.
[0024] In a possible implementation, the first network device further includes a system timer thread, and the method further includes:
[0025] The SCTP processing thread receives the timer message sent by the system timer thread, and the timer message is used to indicate the basic timer;
[0026] The SCTP processing thread determines the timing services to be processed;
[0027] The SCTP processing thread generates a target timer for the timing service based on the duration of the basic timer and the duration required for the timing service;
[0028] The SCTP processing thread performs timing processing on the timing service according to the target timer.
[0029] In a second aspect, the present application provides an SCTP link establishment method, which is applied to a second network device, and the method includes:
[0030] Establishing a data link with the SCTP processing thread in the first network device based on the link control block information;
[0031] The link control block information is obtained by processing the link configuration data generated by the configuration thread in the first network device.
[0032] In a possible implementation, establishing a data link with an SCTP processing thread in a first network device based on link control block information includes:
[0033] Receive an SCTP establishment request message sent by the SCTP processing thread, where the SCTP establishment request message includes link control block information;
[0034] Send an SCTP establishment request confirmation message to the SCTP processing thread, where the SCTP establishment request confirmation message includes a status cookie;
[0035] Receive the COOKIE response message sent by the SCTP processing thread, where the COOKIE response message includes the status COOKIE;
[0036] A COOKIE response confirmation message is sent to the SCTP processing thread. The COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0037] In a possible implementation, the method further includes:
[0038] Receive the first SCTP data sent by the SCTP processing thread;
[0039] The first SCTP data is decapsulated to obtain first transmission data.
[0040] In a possible implementation, the method further includes:
[0041] Send the second SCTP data to the SCTP processing thread.
[0042] In a third aspect, the present application provides a first network device, including a memory, a transceiver, and a processor;
[0043] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of a processor; and a processor for reading the computer program in the memory and performing the following operations:
[0044] The SCTP processing thread of the first network device receives a configuration message sent by the configuration thread of the first network device, where the configuration message includes link configuration data;
[0045] The SCTP processing thread processes the link configuration data according to SCTP and generates link control block information;
[0046] The SCTP processing thread establishes a data link with the second network device based on the link control block information.
[0047] In a possible implementation, the SCTP processing thread establishes a data link with the second network device based on the link control block information, including:
[0048] The SCTP processing thread sends an SCTP establishment request message to the second network device, where the SCTP establishment request message includes link control block information;
[0049] The SCTP processing thread receives the SCTP establishment request confirmation message sent by the second network device, where the SCTP establishment request confirmation message includes a status COOKIE;
[0050] The SCTP processing thread sends a COOKIE response message to the second network device, where the COOKIE response message includes a status COOKIE;
[0051] The SCTP processing thread receives a COOKIE response confirmation message sent by the second network device, where the COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0052] In a possible implementation manner, the first network device further includes an AP processing thread, and the processor is further configured to read a computer program in the memory and perform the following operations:
[0053] When a data link is established with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
[0054] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0055] The SCTP processing thread receives an AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted;
[0056] The SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data;
[0057] The SCTP processing thread sends the first SCTP data to the second network device.
[0058] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0059] The SCTP processing thread receives second SCTP data sent by the second network device;
[0060] The SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted;
[0061] The SCTP processing thread sends a receiving signaling to the AP processing thread, where the receiving signaling includes the second data to be transmitted.
[0062] In a possible implementation, the first network device further includes a system timer thread, and the processor is further configured to read a computer program in the memory and perform the following operations:
[0063] The SCTP processing thread receives the timer message sent by the system timer thread, and the timer message is used to indicate the basic timer;
[0064] The SCTP processing thread determines the timing services to be processed;
[0065] The SCTP processing thread generates a target timer for the timing service based on the duration of the basic timer and the duration required for the timing service;
[0066] The SCTP processing thread performs timing processing on the timing service according to the target timer.
[0067] In a fourth aspect, the present application provides a second network device, including a memory, a transceiver, and a processor;
[0068] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of a processor; and a processor for reading the computer program in the memory and performing the following operations:
[0069] Establishing a data link with the SCTP processing thread in the first network device based on the link control block information;
[0070] The link control block information is obtained by processing the link configuration data generated by the configuration thread in the first network device.
[0071] In a possible implementation, establishing a data link with an SCTP processing thread in a first network device based on link control block information includes:
[0072] Receive an SCTP establishment request message sent by the SCTP processing thread, where the SCTP establishment request message includes link control block information;
[0073] Send an SCTP establishment request confirmation message to the SCTP processing thread, where the SCTP establishment request confirmation message includes a status cookie;
[0074] Receive the COOKIE response message sent by the SCTP processing thread, where the COOKIE response message includes the status COOKIE;
[0075] A COOKIE response confirmation message is sent to the SCTP processing thread. The COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0076] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0077] Receive the first SCTP data sent by the SCTP processing thread;
[0078] The first SCTP data is decapsulated to obtain first transmission data.
[0079] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0080] Send the second SCTP data to the SCTP processing thread.
[0081] In a fifth aspect, the present application provides an SCTP link establishment device, which is applied to a first network device, the first network device includes a configuration thread and an SCTP processing thread, and the device includes:
[0082] A receiving module, used for the SCTP processing thread to receive a configuration message sent by the configuration thread, where the configuration message includes link configuration data;
[0083] A processing module, used for the SCTP processing thread to process the link configuration data according to SCTP and generate link control block information;
[0084] The first link establishment module is used for the SCTP processing thread to establish a data link with the second network device based on the link control block information.
[0085] In a possible implementation, the first link building module is specifically configured to:
[0086] The SCTP processing thread sends an SCTP establishment request message to the second network device, where the SCTP establishment request message includes link control block information;
[0087] The SCTP processing thread receives the SCTP establishment request confirmation message sent by the second network device, where the SCTP establishment request confirmation message includes status text data COOKIE;
[0088] The SCTP processing thread sends a COOKIE response message to the second network device, where the COOKIE response message includes a status COOKIE;
[0089] The SCTP processing thread receives a COOKIE response confirmation message sent by the second network device, where the COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0090] In a possible implementation manner, the first network device further includes an application protocol AP processing thread, and the first link establishment module is further configured to:
[0091] When a data link is established with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
[0092] In a possible implementation manner, the processing module is further configured to:
[0093] The SCTP processing thread receives an AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted;
[0094] The SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data;
[0095] The SCTP processing thread sends the first SCTP data to the second network device.
[0096] In a possible implementation manner, the processing module is further configured to:
[0097] The SCTP processing thread receives second SCTP data sent by the second network device;
[0098] The SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted;
[0099] The SCTP processing thread sends a receiving signaling to the AP processing thread, where the receiving signaling includes the second data to be transmitted.
[0100] In a possible implementation, the first network device further includes a system timer thread, and the processing module is further configured to:
[0101] The SCTP processing thread receives the timer message sent by the system timer thread, and the timer message is used to indicate the basic timer;
[0102] The SCTP processing thread determines the timing services to be processed;
[0103] The SCTP processing thread generates a target timer for the timing service based on the duration of the basic timer and the duration required for the timing service;
[0104] The SCTP processing thread performs timing processing on the timing service according to the target timer.
[0105] In a sixth aspect, the present application provides an SCTP link establishment device, applied to a second network device, the device comprising:
[0106] A second link establishment module, configured to establish a data link with the SCTP processing thread in the first network device based on the link control block information;
[0107] The link control block information is obtained by processing the link configuration data generated by the configuration thread in the first network device.
[0108] In a possible implementation manner, the second link building module is specifically configured to:
[0109] Receive an SCTP establishment request message sent by the SCTP processing thread, where the SCTP establishment request message includes link control block information;
[0110] Send an SCTP establishment request confirmation message to the SCTP processing thread, where the SCTP establishment request confirmation message includes a status cookie;
[0111] Receive the COOKIE response message sent by the SCTP processing thread, where the COOKIE response message includes the status COOKIE;
[0112] A COOKIE response confirmation message is sent to the SCTP processing thread. The COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0113] In a possible implementation manner, the second link building module is further configured to:
[0114] Receive the first SCTP data sent by the SCTP processing thread;
[0115] The first SCTP data is decapsulated to obtain first transmission data.
[0116] In a possible implementation manner, the second link building module is further configured to:
[0117] Send the second SCTP data to the SCTP processing thread.
[0118] In a seventh aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is used to enable a computer to execute the SCTP link establishment method of any one of the first aspect or the second aspect.
[0119] The SCTP link establishment method, device and apparatus provided in the embodiment of the present application are applied to a first network device, wherein the first network device includes a configuration thread and an SCTP processing thread. First, the SCTP processing thread receives a configuration message sent by the configuration thread, wherein the configuration message includes link configuration data; then the SCTP processing thread processes the link configuration data according to SCTP to generate link control block information; finally, the SCTP processing thread establishes a data link with the second network device based on the link control block information. The SCTP link establishment scheme provided in the present application uses the SCTP processing thread in the first network device as the main body as the processing thread. During the link establishment process, the SCTP processing thread and other threads and the second network device interact directly, without the need to call the interface of the SCTP protocol processing module through thread switching during each execution process, which greatly reduces the frequency of thread switching, thereby reducing the system overhead in the SCTP link establishment process. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0121] Figure 1 It is a framework diagram based on SCTP protocol in a wireless communication framework;
[0122] Figure 2 A signaling diagram for establishing an SCTP link;
[0123] Figure 3 A flowchart of the SCTP link establishment method provided in the embodiment of the present application;
[0124] Figure 4 SCTP link establishment signaling diagram provided for an embodiment of the present application;
[0125] Figure 5 It is a signaling diagram for sending and receiving messages after the SCTP link is established;
[0126] Figure 6 A framework diagram based on the SCTP protocol under the wireless communication framework provided in an embodiment of the present application;
[0127] Figure 7 A signaling diagram for sending and receiving messages after establishing a SCTP link provided in an embodiment of the present application;
[0128] Figure 8 A timing service processing signaling diagram provided in an embodiment of the present application;
[0129] Fig. 9 A schematic diagram of the structure of a first network device provided in an embodiment of the present application;
[0130] Fig.10 A schematic diagram of the structure of a second network device provided in an embodiment of the present application;
[0131] Fig.11 A schematic diagram of the structure of an SCTP link establishment device provided in an embodiment of the present application Figure 1 ;
[0132] Fig.12 A schematic diagram of the structure of an SCTP link establishment device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0133] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0134] SCTP is a protocol that transmits multiple data streams simultaneously between the two ends of a network connection. It can provide multiple streams between the two connected ends, and each stream can reliably deliver messages in sequence. The loss of a message on one stream will not block the delivery of messages on other streams of the same association.
[0135] Due to these characteristics of the SCTP protocol, the SCTP protocol is widely used in various data transmission scenarios, including data transmission scenarios under wireless communication. In the wireless communication framework, the implementation of the SCTP protocol of network devices is based on the idea of Linux multithreading, which is similar to the design of general applications using the Transmission Control Protocol (TCP) protocol for sending and receiving. However, the TCP protocol processing module, TCP packet receiving thread, and timer thread under the TCP protocol are provided by kernel modules, while the SCTP protocol is presented as a user-mode program in consideration of maintainability and other aspects.
[0136] Figure 1 It is a framework diagram based on SCTP protocol under a wireless communication framework, such as Figure 1 As shown, the SCTP protocol processing unit is divided into an SCTP packet receiving thread, a timer thread, a signaling sending thread, an SCTP control and signaling receiving thread, a configuration thread, etc. Each thread is uniformly scheduled by the SCTP protocol processing module.
[0137] The SCTP packet receiving thread can interact with the network port service and signaling distribution thread outside the SCTP protocol processing unit to realize the distribution and processing of network port services and signaling. The signaling sending thread can interact with the next-generation 5G base station interface (NG / XN) application protocol (AP) processing thread to realize the sending and receiving processing of signaling. The SCTP control and signaling receiving thread can also interact with the NG / XN AP processing thread.
[0138] based on Figure 1 The framework of the example is combined with Figure 2 This section describes the current SCTP link establishment process.
[0139] Figure 2 This is a signaling diagram for SCTP link establishment, such as Figure 2 As shown, including:
[0140] S201, the configuration thread parses configuration data.
[0141] The configuration thread of the first network device parses a configuration message of an Operations and Maintenance Center (OMC) to generate corresponding link configuration data.
[0142] S202, the configuration thread sends an SCTP establishment request message (SCTP INIT) to the second network device.
[0143] The configuration thread of the first network device calls the interface of the SCTP protocol processing module to process the configuration data of the link, generates actual configuration data, and triggers the sending of SCTP INIT, which includes the actual configuration data.
[0144] S203, the second network device sends an SCTP establishment request confirmation message (SCTP INIT_ACK) to the SCTP packet receiving thread.
[0145] SCTP INIT_ACK includes status text data (COOKIE). After the SCTP packet receiving thread receives SCTP INIT_ACK, it can obtain the status COOKIE.
[0146] S204, the SCTP packet receiving thread sends a COOKIE response message (SCTP COOKIE_ECHO) to the second network device.
[0147] The SCTP packet receiving thread calls the interface of the SCTP protocol processing module, generates an SCTP COOKIE_ECHO based on the status COOKIE, and sends the SCTP COOKIE_ECHO to the second network device.
[0148] S205, the second network device sends a COOKIE response confirmation message (SCTP COOKIE_ACK) to the SCTP packet receiving thread.
[0149] S202 to S205 are a four-step link establishment process between the first network device and the second network device. After the SCTP packet receiving thread of the first network device receives SCTP COOKIE_ACK, it indicates that the SCTP link establishment between the first network device and the second network device is successful.
[0150] S206, the SCTP packet receiving thread calls the SCTP protocol processing module interface to put the link establishment message into the SCTP protocol receiving message queue.
[0151] S207, the SCTP packet receiving thread notifies the SCTP control and signaling receiving thread that there is data in the message queue.
[0152] There are two ways of notification: one is to notify by polling the SCTP control and signaling receiving thread, and the other is to send in a message-like manner.
[0153] S208, the SCTP control and signaling receiving thread calls the SCTP protocol processing module interface to read out the SCTP link establishment success message.
[0154] S209, the SCTP control and signaling receiving thread encapsulates the SCTP link establishment success notification message to the NG / XN AP processing thread.
[0155] By sending an SCTP link establishment success notification message to the NG / XN AP processing thread, the NG / XN AP processing thread is notified that the SCTP link establishment between the first network device and the second network device is successful, and the subsequent NG / XN AP processing thread can perform data transmission with the second network device on the successfully established link.
[0156] Combination Figure 2 It can be seen that the current SCTP link establishment process has the following technical problems:
[0157] First, although it is multi-threaded processing, the SCTP protocol processing module interface will be called. The same SCTP link cannot be processed in parallel. In fact, it is difficult to implement multi-threaded processing, and frequent thread switching will increase system overhead.
[0158] Second, there is no good notification mechanism between multiple threads. Either the notification mechanism is too complicated, or multiple threads can only work in a polling manner.
[0159] Third, the entire SCTP process involves too many threads, which makes it difficult to scale;
[0160] Fourth, the configuration thread itself is responsible for reading and implementing the configuration data of the entire network device and should not participate in the triggering of actual business logic. Otherwise, it will cause the configuration thread to be coupled with the specific module and cause it to be overloaded.
[0161] In summary, in the above SCTP link establishment process, when multiple threads share SCTP resources, they must be processed in time-sharing, which leads to frequent thread switching, high system overhead, and is not easy to expand into multiple SCTP processing units.
[0162] Based on this, an embodiment of the present application provides an SCTP link establishment method to reduce the problem of high system overhead caused by frequent switching between threads.
[0163] It should be noted that the technical solutions provided in each embodiment of the present application can be applicable to a variety of systems, especially 5G systems. For example, the applicable systems may be global system of mobile communication (GSM) system, code division multiple access (CDMA) system, wideband code division multiple access (WCDMA) general packet radio service (GPRS) system, long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD) system, long term evolution advanced (LTE-A) system, universal mobile telecommunication system (UMTS), worldwide interoperability for microwave access (WiMAX) system, 5G new radio (NR) system, etc.
[0164] The first network device involved in each embodiment of the present application may be a base station, which may include multiple cells providing services for the terminal. Depending on the specific application scenario, the base station may also be called an access point, or may be a device in the access network that communicates with the wireless terminal device through one or more sectors on the air interface, or other names. The first network device may be used to interchange received air frames with Internet Protocol (IP) packets, and serve as a router between the wireless terminal device and the rest of the access network, wherein the rest of the access network may include an Internet Protocol (IP) communication network. The first network device may also coordinate the attribute management of the air interface. For example, the first network device involved in the embodiment of the present application may be a network device (Base Transceiver Station, BTS) in the Global System for Mobile communications (Global System for Mobile communications, GSM) or Code Division Multiple Access (Code Division Multiple Access, CDMA), or a network device (NodeB) in Wide-band Code Division Multiple Access (WCDMA), or an evolutionary network device (evolutional Node B, eNB or e-NodeB) in the long-term evolution (long term evolution, LTE) system, a 5G base station (gNB) in the 5G network architecture (next generation system), or a home evolved Node B (Home evolved Node B, HeNB), a relay node, a home base station (femto), a pico base station (pico), etc., which is not limited in the embodiment of the present application. In some network structures, the first network device may include a centralized unit (CU) node and a distributed unit (DU) node, and the centralized unit and the distributed unit may also be arranged geographically separately.
[0165] The second network device involved in each embodiment of the present application may be a base station or a core network device. For the case where the second network device is a base station, please refer to the relevant introduction of the first network device in the above embodiment, which will not be repeated here. For the case where the second network device is a core network device, the core network device may be, for example, an evolved packet system (EPS), a 5G system (5GS), and the like.
[0166] The present application is described in detail below.
[0167] Figure 3 A flow chart of the SCTP link establishment method provided in an embodiment of the present application is applied to a first network device, wherein the first network device includes a configuration thread and an SCTP processing thread, such as Figure 3 As shown, the method includes:
[0168] S31, the SCTP processing thread receives a configuration message sent by the configuration thread, where the configuration message includes link configuration data.
[0169] The executor of the embodiment of the present application is a first network device, in which an SCTP processing thread and a configuration thread are configured. The SCTP processing thread and the configuration thread are used together for establishing an SCTP link between the first network device and the second network device.
[0170] For the first network device, before performing SCTP link establishment, the configuration thread parses the configuration content of the OMC and generates link configuration data, which is the configuration data related to the subsequent SCTP link establishment process between the first network device and the second network device.
[0171] After generating the link configuration data, the configuration thread carries the link configuration data in a configuration message and sends the configuration message to the SCTP processing thread of the first network device. After receiving the configuration message sent by the configuration thread, the SCTP processing thread can obtain the link configuration data included in the configuration message.
[0172] S32, the SCTP processing thread processes the link configuration data according to SCTP to generate link control block information.
[0173] After obtaining the link configuration data, the SCTP processing thread will process the link configuration data according to SCTP, and the processing process is to generate SCTP link control block information based on the link configuration data. Among them, the link configuration data configured by the configuration thread includes the specific data required in the SCTP link establishment process.
[0174] For example, the link configuration data indicates that the data required in the SCTP link establishment process include the IP address of the second network device, the port number of the second network device, the IP address of the first network device, the port number of the first network device, the number of retransmissions, the retransmission interval, the heartbeat interval, etc. Therefore, the SCTP processing thread obtains the specific content of each data according to the specific configuration items in the link configuration data, and finally generates the link control block information.
[0175] S33, the SCTP processing thread establishes a data link with the second network device based on the link control block information.
[0176] After generating the link control block information, the SCTP processing thread establishes a data link with the second network device based on the link control block information. The process of establishing the data link can be seen in Figure 4 Related introduction of .
[0177] Figure 4 The SCTP link establishment signaling diagram provided in the embodiment of the present application is as follows: Figure 4 As shown, including:
[0178] S401, the configuration thread parses the configuration content of the OMC and generates link configuration data.
[0179] S402, the configuration thread sends a configuration message to the SCTP processing thread, where the configuration message includes link configuration data.
[0180] S403, the SCTP protocol thread processes the link configuration data according to SCTP to generate link control block information.
[0181] S404, the SCTP processing thread sends SCTP INIT to the second network device.
[0182] The SCTP processing thread sends SCTP INIT to the second network device. The SCTP INIT includes link control block information. The link control block information may include, for example, the IP address of the first network device, an initial sequence number, a start mark for identifying all messages in this SCTP, the number of outgoing streams requested by the first network device, the number of external streams that the first network device can support, and the like.
[0183] S405: The second network device sends an SCTP INIT_ACK to the SCTP processing thread.
[0184] The second network device sends SCTP INIT_ACK to the SCTP processing thread to confirm the SCTP INIT sent by the first network device. The SCTP INIT_ACK includes a state COOKIE, which contains all the states required by the second network device to ensure that this SCTP is valid. Since the state COOKIE is digitally signed, its validity can be ensured. Furthermore, the SCTP INIT_ACK can also include the IP address of the second network device, the initial sequence number, the start mark for identifying all messages in this SCTP, the number of outbound flows requested by the second network device, the number of external flows that the second network device can support, and so on.
[0185] S406, the SCTP processing thread sends an SCTP COOKIE_ECHO to the second network device.
[0186] The first network device returns an SCTP COOKIE_ECHO to the second network device through the SCTP processing thread, where the SCTP COOKIE_ECHO includes a status COOKIE of the second network device.
[0187] S407: The second network device sends an SCTP COOKIE_ACK to the SCTP processing thread.
[0188] The second network device confirms with the first network device through SCTP COOKIE_ACK that the status COOKIE returned by the first network device is correct. At this time, the data link between the first network device and the second network device is successfully established.
[0189] S408, the SCTP processing thread sends a message notifying the AP processing thread that the SCTP link establishment is successful.
[0190] When the first network device establishes a data link with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
[0191] The SCTP link establishment method provided in the embodiment of the present application is applied to a first network device, and the first network device includes a configuration thread and an SCTP processing thread. First, the SCTP processing thread receives a configuration message sent by the configuration thread, and the configuration message includes link configuration data; then the SCTP processing thread processes the link configuration data according to SCTP to generate link control block information; finally, the SCTP processing thread establishes a data link with the second network device based on the link control block information. The SCTP link establishment scheme provided in the embodiment of the present application uses the SCTP processing thread in the first network device as the main body as the processing thread. During the link establishment process, the SCTP thread and other threads and the second network device interact directly, without the need to call the interface of the SCTP protocol processing module through thread switching in each execution process, which greatly reduces the frequency of thread switching, thereby reducing the system overhead in the SCTP link establishment process.
[0192] Based on any of the above embodiments, the scheme of the embodiments of the present application is further introduced below in conjunction with the accompanying drawings.
[0193] Figure 5 This is a signaling diagram for sending and receiving messages after SCTP link establishment, such as Figure 5 As shown, including:
[0194] S501, the NG / XN AP processing thread sends AP signaling to the signaling sending thread.
[0195] S502, the signaling sending thread calls the SCTP protocol processing module interface to send first SCTP data to the second network device.
[0196] The AP signaling includes the first data to be transmitted. After receiving the AP signaling, the signaling sending thread can obtain the first data to be transmitted, and then encapsulate and process it to obtain the first SCTP data. Then, the signaling sending thread sends the first SCTP data to the second network device by calling the SCTP protocol processing module interface.
[0197] S501 to S502 are the process of the first network device sending data to the second network device after the data link is established, and the SCTP protocol processing module interface also needs to be called to send data.
[0198] S503, the second network device sends second SCTP data to the SCTP packet receiving thread.
[0199] S504, the SCTP packet receiving thread calls the SCTP protocol processing module interface to put the AP signaling into the SCTP protocol receiving message queue.
[0200] After receiving the second SCTP data, the SCTP packet receiving thread carries it in the AP signaling by calling the SCTP protocol processing module interface, and puts the AP signaling into the SCTP protocol receiving message queue to wait for sending.
[0201] S505, the SCTP packet receiving thread notifies the SCTP control and signaling receiving thread that there is data in the message queue.
[0202] There are two ways of notification: one is to notify by polling the SCTP control and signaling receiving thread, and the other is to send in a message-like manner.
[0203] S506, the SCTP control and signaling receiving thread calls the SCTP protocol processing module interface to read out the AP signaling.
[0204] S507, the SCTP control and signaling receiving thread encapsulates the AP signaling into a message and sends it to the NG / XN AP processing thread.
[0205] The NG / XN AP processing thread obtains the second SCTP data carried in the AP signaling by receiving the AP signaling, and decapsulates the second SCTP data to obtain the second data to be transmitted.
[0206] S503 to S507 are the process of the second network device sending data to the first network device after the data link is established, and the SCTP protocol processing module interface also needs to be called to send data.
[0207] based on Figure 5It can be seen that the above message sending and receiving process also has the problem that multi-threaded processing requires calling the SCTP protocol processing module interface, which makes it difficult to implement multi-threaded processing, and the frequent switching of threads makes the system overhead large, and there is no good notification mechanism between multiple threads.
[0208] Based on this, the following Figure 6 and Figure 7 The message sending and receiving process based on the SCTP protocol provided in an embodiment of the present application is introduced.
[0209] Figure 6 A framework diagram based on the SCTP protocol under the wireless communication framework provided in the embodiment of the present application, such as Figure 6 As shown, it includes SCTP processing thread, system timer thread, network port service and signaling distribution thread, configuration thread and NG / XN AP thread.
[0210] and Figure 1 In the example, SCTP protocol processing is used as a functional module for multiple threads to share and call SCTP related functions in time-sharing manner to complete the related processing of SCTP protocol. In the embodiment of the present application, SCTP protocol processing module is used as the main body to adjust the SCTP protocol optimization process. SCTP protocol processing module receives external configuration messages, SCTP message sending, SCTP message processing request, timer message, etc. as a thread to complete the related processing of SCTP protocol.
[0211] like Figure 6 As shown, in the SCTP protocol processing process in the embodiment of the present application, the configuration thread still exists, but it no longer directly triggers the sending and receiving of SCTP messages. It only sends the configuration message of the SCTP link parameters to the SCTP processing thread through the operating system message queue, thereby achieving the purpose of decoupling specific business modules.
[0212] The timer thread is changed to a system timer thread. The system timer thread is a thread that already exists in the first network device. In the embodiment of the present application, the system timer thread can be reused without separately setting a timer thread under the SCTP protocol. The system timer thread also notifies the SCTP processing thread of the timer through the operating system message queue, and the SCTP processing thread itself completes the relevant processing.
[0213] The network port service and signaling distribution thread is a thread that exists in the first network device itself and completes the forwarding of service data. For SCTP packets, the corresponding messages are placed in the network port hardware queue in the original design.
[0214] There are two options for triggering scheduling based on the SCTP processing thread:
[0215] One is that the thread needs resources based on large-loop polling, then the distribution thread retains the existing design and directly sends it to the network port hardware queue; the other is based on the scheduling triggered by the operating system message queue, then the distribution thread directly sends the message buf pointer to the SCTP processing thread in the form of a message.
[0216] The interaction between the NG / XN AP processing thread and the SCTP processing thread is mainly that after the link is successfully established, the SCTP processing thread sends the link establishment success message or AP signaling to the NG / XN AP processing thread through the operating system message queue, and the NG / XN AP thread sends the AP signaling to be sent to the SCTP processing thread through the operating system message queue, and so on.
[0217] The processing process of the SCTP processing thread is similar to that of the application thread of the first network device. The SCTP processing thread is regarded as an application module. The two design methods of the application module are also applicable to the SCTP processing thread. Based on the operating system message-driven scheduling method, if the thread is blocked, it waits for messages. If there is data in the message queue, the operating system schedules the thread. Based on the large loop scheduling method, the thread keeps polling its own message queue and hardware queue in an infinite loop, and takes out the corresponding data for related processing.
[0218] The following is based on Figure 6 The framework of the example, combined with Figure 7 The message sending and receiving process in the embodiment of the present application is introduced.
[0219] Figure 7 The signaling diagram of the message sending and receiving after the SCTP link is established is provided in the embodiment of the present application, such as Figure 7 As shown, including:
[0220] S701, the AP processing thread sends AP signaling to the SCTP processing thread.
[0221] When the first network device establishes a data link with the second network device, the SCTP processing thread receives AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted.
[0222] S702, the SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data.
[0223] S703, the SCTP processing thread sends the first SCTP data to the second network device.
[0224] S704: The second network device decapsulates the first SCTP data to obtain first transmission data.
[0225] The process from S701 to S704 is a process in which the first network device sends the first data to be transmitted to the second network device after the data link is established.
[0226] S705, the second network device sends second SCTP data to the SCTP processing thread.
[0227] When the first network device establishes a data link with the second network device, the second network device sends second SCTP data to the SCTP processing thread.
[0228] S706, the SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted.
[0229] S707, the SCTP processing thread sends a receiving signaling to the AP processing thread, where the receiving signaling includes the second data to be transmitted.
[0230] The process from S705 to S707 is the process in which the second network device sends the second data to be transmitted to the first network device after the data link is established. It should be noted that there is no absolute order between the process in which the first network device sends the first data to be transmitted to the second network device and the process in which the second network device sends the second data to be transmitted to the first network device. The two can be performed simultaneously, or the first data to be transmitted can be transmitted first, or the second data to be transmitted can be transmitted first. This embodiment does not limit this.
[0231] The first network device also includes a system timer thread, which can interact with the SCTP processing thread to implement the processing of related timing services. Figure 8 Introduce it.
[0232] Figure 8 The timing service processing signaling diagram provided in the embodiment of the present application is as follows: Figure 8 As shown, including:
[0233] S81, the system timer thread sends a timer message to the SCTP processing thread.
[0234] The system timer thread in the embodiment of the present application is a timer thread that already exists in the first network device, rather than a thread specifically configured for SCTP service processing. That is to say, the system timer thread that already exists in the first network device can be reused in SCTP-related service processing.
[0235] The system timer thread sends a timer message to the SCTP processing thread, and the timer message is used to indicate a basic timer. For example, the timer message includes the duration of the basic timer, and the duration of the basic timer can be, for example, 300ms, 500ms, etc. The SCTP processing thread receives the timer message sent by the system timer thread and determines the basic timer according to the timer message.
[0236] S82, the SCTP processing thread determines the timing service to be processed.
[0237] The SCTP processing thread may need to process multiple services, among which there may be services that do not require timing and services that require timing. The services that require timing are the scheduled services to be processed.
[0238] In an embodiment of the present application, the timing service may include related services involved in the SCTP link establishment process, and may also include related services involved in the data transmission process between the first network device and the second network device based on the established data link after the SCTP link is successfully established.
[0239] S83, the SCTP processing thread generates a target timer for the timing service according to the duration of the basic timer and the duration required for the timing service.
[0240] For any timing service to be processed, the timing service needs to be timed, and the SCTP processing thread generates a target timer for the timing service according to the duration required for the timing service and the duration of the basic timer.
[0241] Since the basic timer is the basis for generating the target timer of the timing service, the duration of the basic timer can usually be set relatively small. Then the target timer is configured according to the relationship between the duration required for the timing service and the duration of the basic timer.
[0242] For example, the duration of the basic timer is 100ms, and the duration required for the timing service is 500ms. According to the duration required for the timing service and the duration of the basic timer, 5 basic timers can be configured to form a target timer to obtain a target timer with a duration of 500ms.
[0243] Taking the timing services involved in the SCTP link establishment process as an example, in the SCTP link establishment process, the retransmission of SCTP INIT and the sending of heartbeat information are involved, and corresponding timers need to be set.
[0244] The link configuration data includes a retransmission interval, which indicates the duration required by the timer corresponding to the retransmission service of SCTP INIT. Therefore, the target timer for the retransmission service can be configured according to the duration required by the timer indicated by the retransmission interval and the duration of the basic timer. After the SCTP processing thread sends SCTP INIT to the second network device, if the SCTP INIT_ACK sent by the second network device is not received during the operation of the target timer, the SCTP processing thread needs to retransmit SCTP INIT to the second network device.
[0245] The link configuration data includes a heartbeat interval, which indicates the duration required for the timer corresponding to the service of sending the heartbeat information. The heartbeat information is sent periodically, and its purpose is to detect whether the second network device is operating normally. Therefore, according to the duration required for the timer indicated by the heartbeat interval and the duration of the basic timer, the target timer for the heartbeat information sending service can be configured. Whenever the target timer runs for the duration indicated by the heartbeat interval, the SCTP processing thread sends a heartbeat message to the second network device to determine the health status of the second network device and whether the second network device is "alive".
[0246] S84, the SCTP processing thread performs timing processing on the timing service according to the target timer.
[0247] After the target timer is generated, the SCTP processing thread can process the timing service according to the target timer. The duration of the target timer is the duration required for the timing service. If the SCTP processing thread completes the processing of the timing service within the running period of the target timer, it is determined that the timing service has not timed out; if the SCTP processing thread does not complete the processing of the timing service within the running period of the target timer, it is determined that the timing service has timed out.
[0248] Furthermore, the solution of the embodiment of the present application is also easy to expand because it is based on the SCTP processing thread. After being expanded into multiple SCTP processing threads, each SCTP processing thread is bound to the configuration threads of different hardware CPUs when there are hardware resources, and different NG links are configured to the SCTP protocol processing thread and the forwarding rules of the network port data and signaling distribution thread. The NG / XN AP processing thread sends the signaling to the corresponding SCTP processing thread according to the corresponding relationship. The network port service and signaling forwarding thread forwards the SCTP packet to the network port hardware queue or message queue of different SCTP processing threads according to the forwarding rules, so as to solve the signaling storm problem on the access and mobility management function pool.
[0249] In summary, the SCTP link establishment solution provided in the embodiment of the present application takes the SCTP processing thread in the first network device as the main body as the processing thread. Whether in the link establishment process, the message sending and receiving process or the timer generation process, the SCTP processing thread directly interacts with the AP processing thread, the configuration thread, the system timer thread and the second network device, reducing the system overhead caused by the transit mechanism and thread switching, and there is no need to consider issues such as mutual exclusion between multiple threads. The sending and receiving and state maintenance of the SCTP link are uniformly maintained by the SCTP processing thread. For the NG / XN AP processing thread, the underlying SCTP interface remains unchanged, and the processing link of the signaling sending thread is also reduced. The entire SCTP protocol processing flow is simplified and the SCTP processing performance is improved.
[0250] Fig. 9 A schematic diagram of the structure of a first network device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the first network device includes a memory 920, a transceiver 900, and a processor 910, wherein:
[0251] The memory 920 is used to store computer programs; the transceiver 900 is used to send and receive data under the control of the processor 910; the processor 910 is used to read the computer program in the memory 920 and perform the following operations:
[0252] The SCTP processing thread receives the configuration message sent by the configuration thread, and the configuration message includes link configuration data;
[0253] The SCTP processing thread processes the link configuration data according to SCTP and generates link control block information;
[0254] The SCTP processing thread establishes a data link with the second network device based on the link control block information.
[0255] Specifically, the transceiver 900 is used to receive and send data under the control of the processor 910.
[0256] Among them, Fig. 9In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 910 and memory represented by memory 920. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 900 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which may include transmission media such as wireless channels, wired channels, optical cables, etc. The processor 910 is responsible for managing the bus architecture and general processing, and the memory 920 may store data used by the processor 910 when performing operations.
[0257] Optionally, processor 910 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD), and the processor may also adopt a multi-core architecture.
[0258] The processor calls the computer program stored in the memory to execute any method provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.
[0259] In a possible implementation, the SCTP processing thread establishes a data link with the second network device based on the link control block information, including:
[0260] The SCTP processing thread sends an SCTP establishment request message to the second network device, where the SCTP establishment request message includes link control block information;
[0261] The SCTP processing thread receives the SCTP establishment request confirmation message sent by the second network device, where the SCTP establishment request confirmation message includes a status COOKIE;
[0262] The SCTP processing thread sends a COOKIE response message to the second network device, where the COOKIE response message includes a status COOKIE;
[0263] The SCTP processing thread receives a COOKIE response confirmation message sent by the second network device, where the COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0264] In a possible implementation manner, the first network device further includes an AP processing thread, and the processor is further configured to read a computer program in the memory and perform the following operations:
[0265] When a data link is established with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
[0266] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0267] The SCTP processing thread receives an AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted;
[0268] The SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data;
[0269] The SCTP processing thread sends the first SCTP data to the second network device.
[0270] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0271] The SCTP processing thread receives second SCTP data sent by the second network device;
[0272] The SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted;
[0273] The SCTP processing thread sends a receiving signaling to the AP processing thread, where the receiving signaling includes the second data to be transmitted.
[0274] In a possible implementation, the first network device further includes a system timer thread, and the processor is further configured to read a computer program in the memory and perform the following operations:
[0275] The SCTP processing thread receives the timer message sent by the system timer thread, and the timer message is used to indicate the basic timer;
[0276] The SCTP processing thread determines the timing services to be processed;
[0277] The SCTP processing thread generates a target timer for the timing service based on the duration of the basic timer and the duration required for the timing service;
[0278] The SCTP processing thread performs timing processing on the timing service according to the target timer.
[0279] It should be noted here that the above-mentioned first network device provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment in which the execution subject is the first network device, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0280] Fig.10 A schematic diagram of the structure of a second network device provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, the second network device includes a memory 1020, a transceiver 1000, and a processor 1010, wherein:
[0281] The memory 1020 is used to store computer programs; the transceiver 1000 is used to send and receive data under the control of the processor 1010; the processor 1010 is used to read the computer program in the memory 1020 and perform the following operations:
[0282] Establishing a data link with the SCTP processing thread in the first network device based on the link control block information;
[0283] The link control block information is obtained by processing the link configuration data generated by the configuration thread in the first network device.
[0284] Specifically, the transceiver 1000 is used to receive and send data under the control of the processor 1010 .
[0285] Among them, Fig.10 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 1010 and memory represented by memory 1020. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1000 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which may include transmission media such as wireless channels, wired channels, optical cables, etc. The processor 1010 is responsible for managing the bus architecture and general processing, and the memory 1020 may store data used by the processor 1010 when performing operations.
[0286] Optionally, the processor 1010 may be a CPU, an ASIC, an FPGA or a CPLD, and the processor may also adopt a multi-core architecture.
[0287] The processor calls the computer program stored in the memory to execute any method provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.
[0288] In a possible implementation, establishing a data link with an SCTP processing thread in a first network device based on link control block information includes:
[0289] Receive an SCTP establishment request message sent by the SCTP processing thread, where the SCTP establishment request message includes link control block information;
[0290] Send an SCTP establishment request confirmation message to the SCTP processing thread, where the SCTP establishment request confirmation message includes a status cookie;
[0291] Receive the COOKIE response message sent by the SCTP processing thread, where the COOKIE response message includes the status COOKIE;
[0292] A COOKIE response confirmation message is sent to the SCTP processing thread. The COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0293] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0294] Receive the first SCTP data sent by the SCTP processing thread;
[0295] The first SCTP data is decapsulated to obtain first transmission data.
[0296] In a possible implementation manner, the processor is further configured to read a computer program in the memory and perform the following operations:
[0297] Send the second SCTP data to the SCTP processing thread.
[0298] It should be noted here that the above-mentioned second network device provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment in which the execution subject is the second network device, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0299] Fig.11 A schematic diagram of the structure of an SCTP link establishment device provided in an embodiment of the present application Figure 1 , applied to a first network device, the first network device includes a configuration thread and an SCTP processing thread, such as Fig.11 As shown, the SCTP link building device 110 includes:
[0300] A receiving module 111, used for the SCTP processing thread to receive a configuration message sent by the configuration thread, where the configuration message includes link configuration data;
[0301] Processing module 112, used for the SCTP processing thread to process the link configuration data according to SCTP and generate link control block information;
[0302] The first link establishment module 113 is used for the SCTP processing thread to establish a data link with the second network device based on the link control block information.
[0303] In a possible implementation, the first link building module 113 is specifically configured to:
[0304] The SCTP processing thread sends an SCTP establishment request message to the second network device, where the SCTP establishment request message includes link control block information;
[0305] The SCTP processing thread receives the SCTP establishment request confirmation message sent by the second network device, where the SCTP establishment request confirmation message includes status text data COOKIE;
[0306] The SCTP processing thread sends a COOKIE response message to the second network device, where the COOKIE response message includes a status COOKIE;
[0307] The SCTP processing thread receives a COOKIE response confirmation message sent by the second network device, where the COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0308] In a possible implementation manner, the first network device further includes an application protocol AP processing thread, and the first link building module 113 is further configured to:
[0309] When a data link is established with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
[0310] In a possible implementation, the processing module 112 is further configured to:
[0311] The SCTP processing thread receives an AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted;
[0312] The SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data;
[0313] The SCTP processing thread sends the first SCTP data to the second network device.
[0314] In a possible implementation, the processing module 112 is further configured to:
[0315] The SCTP processing thread receives second SCTP data sent by the second network device;
[0316] The SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted;
[0317] The SCTP processing thread sends a receiving signaling to the AP processing thread, where the receiving signaling includes the second data to be transmitted.
[0318] In a possible implementation, the first network device further includes a system timer thread, and the processing module 112 is further configured to:
[0319] The SCTP processing thread receives the timer message sent by the system timer thread, and the timer message is used to indicate the basic timer;
[0320] The SCTP processing thread determines the timing services to be processed;
[0321] The SCTP processing thread generates a target timer for the timing service based on the duration of the basic timer and the duration required for the timing service;
[0322] The SCTP processing thread performs timing processing on the timing service according to the target timer.
[0323] Specifically, the above-mentioned SCTP link establishment device provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment in which the execution subject is the first network device, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0324] Fig.12 A schematic diagram of the structure of an SCTP link establishment device provided in an embodiment of the present application Figure 2 , applied to the second network device, such as Fig.12 As shown, the SCTP link building device 120 includes:
[0325] The second link establishment module 121 is used to establish a data link with the SCTP processing thread in the first network device based on the link control block information;
[0326] The link control block information is obtained by processing the link configuration data generated by the configuration thread in the first network device.
[0327] In a possible implementation, the second link building module 121 is specifically configured to:
[0328] Receive an SCTP establishment request message sent by the SCTP processing thread, where the SCTP establishment request message includes link control block information;
[0329] Send an SCTP establishment request confirmation message to the SCTP processing thread, where the SCTP establishment request confirmation message includes a status cookie;
[0330] Receive the COOKIE response message sent by the SCTP processing thread, where the COOKIE response message includes the status COOKIE;
[0331] A COOKIE response confirmation message is sent to the SCTP processing thread. The COOKIE response confirmation message is used to indicate that the data link is successfully established.
[0332] In a possible implementation manner, the second link building module 121 is further configured to:
[0333] Receive the first SCTP data sent by the SCTP processing thread;
[0334] The first SCTP data is decapsulated to obtain first transmission data.
[0335] In a possible implementation manner, the second link building module 121 is further configured to:
[0336] Send the second SCTP data to the SCTP processing thread.
[0337] Specifically, the above-mentioned SCTP link establishment device provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment in which the execution subject is the second network device, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0338] It should be noted that the division of units / modules in the above embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated units may be implemented in the form of hardware or in the form of software functional units.
[0339] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0340] In some embodiments, a computer-readable storage medium is also provided, which stores a computer program, and the computer program is used to enable a computer to execute the SCTP link establishment method provided by the above-mentioned method embodiments.
[0341] Specifically, the above-mentioned computer-readable storage medium provided in the embodiment of the present application can implement all the method steps implemented by the above-mentioned method embodiments, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0342] It should be noted that computer-readable storage media can be any available media or data storage devices that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0343] It should also be noted that the terms "first", "second", etc. in the embodiments of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0344] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0345] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0346] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0347] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0348] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0349] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0350] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A stream control transmission protocol SCTP link establishment method, characterized in that: Applied to a first network device, the first network device includes a configuration thread and an SCTP processing thread, the method includes: The SCTP processing thread receives a configuration message sent by the configuration thread, wherein the configuration message includes link configuration data; The SCTP processing thread processes the link configuration data according to SCTP to generate link control block information; The SCTP processing thread establishes a data link with the second network device based on the link control block information.
2. The method according to claim 1, characterized in that The SCTP processing thread establishes a data link with the second network device based on the link control block information, including: The SCTP processing thread sends an SCTP establishment request message to the second network device, wherein the SCTP establishment request message includes the link control block information; The SCTP processing thread receives the SCTP establishment request confirmation message sent by the second network device, wherein the SCTP establishment request confirmation message includes status text data COOKIE; The SCTP processing thread sends a COOKIE response message to the second network device, where the COOKIE response message includes the status COOKIE; The SCTP processing thread receives a COOKIE response confirmation message sent by the second network device, and the COOKIE response confirmation message is used to indicate that the data link is successfully established.
3. The method according to claim 1 or 2, characterized in that: The first network device also includes an application protocol AP processing thread, and the method further includes: When the data link is established with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
4. The method according to claim 3, characterized in that The method further comprises: The SCTP processing thread receives an AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted; The SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data; The SCTP processing thread sends the first SCTP data to the second network device.
5. The method according to claim 3, characterized in that: The method further comprises: The SCTP processing thread receives second SCTP data sent by the second network device; The SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted; The SCTP processing thread sends a reception signaling to the AP processing thread, where the reception signaling includes the second data to be transmitted.
6. The method according to claim 1 or 2, characterized in that: The first network device also includes a system timer thread, and the method further includes: The SCTP processing thread receives a timer message sent by the system timer thread, where the timer message is used to indicate a basic timer; The SCTP processing thread determines the timing service to be processed; The SCTP processing thread generates a target timer for the timing service according to the duration of the basic timer and the duration required for the timing service; The SCTP processing thread performs timing processing on the timing service according to the target timer.
7. A SCTP link establishment method, characterized in that: Applied to the second network device, the method comprises: Establishing a data link with the SCTP processing thread in the first network device based on the link control block information; The link control block information is obtained by processing link configuration data generated by a configuration thread in the first network device.
8. The method according to claim 7, characterized in that The establishing of a data link with the SCTP processing thread in the first network device based on the link control block information includes: Receiving an SCTP establishment request message sent by the SCTP processing thread, wherein the SCTP establishment request message includes the link control block information; Sending an SCTP establishment request confirmation message to the SCTP processing thread, wherein the SCTP establishment request confirmation message includes a status COOKIE; Receive a COOKIE response message sent by the SCTP processing thread, wherein the COOKIE response message includes the status COOKIE; A COOKIE response confirmation message is sent to the SCTP processing thread, where the COOKIE response confirmation message is used to indicate that the data link is successfully established.
9. The method according to claim 7 or 8, characterized in that: The method further comprises: Receive the first SCTP data sent by the SCTP processing thread; The first SCTP data is decapsulated to obtain first transmission data.
10. The method according to claim 7 or 8, characterized in that: The method further comprises: Sending second SCTP data to the SCTP processing thread.
11. A first network device, characterized in that: Including memory, transceiver, processor; A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: The SCTP processing thread of the first network device receives a configuration message sent by a configuration thread of the first network device, wherein the configuration message includes link configuration data; The SCTP processing thread processes the link configuration data according to SCTP to generate link control block information; The SCTP processing thread establishes a data link with the second network device based on the link control block information.
12. The first network device according to claim 11, characterized in that: The SCTP processing thread establishes a data link with the second network device based on the link control block information, including: The SCTP processing thread sends an SCTP establishment request message to the second network device, wherein the SCTP establishment request message includes the link control block information; The SCTP processing thread receives the SCTP establishment request confirmation message sent by the second network device, wherein the SCTP establishment request confirmation message includes a status COOKIE; The SCTP processing thread sends a COOKIE response message to the second network device, where the COOKIE response message includes the status COOKIE; The SCTP processing thread receives a COOKIE response confirmation message sent by the second network device, and the COOKIE response confirmation message is used to indicate that the data link is successfully established.
13. The first network device according to claim 11 or 12, characterized in that: The first network device further includes an AP processing thread, and the processor is further configured to read the computer program in the memory and perform the following operations: When the data link is established with the second network device, the SCTP processing thread sends a message notifying the AP processing thread of successful SCTP link establishment, where the message notifying the AP of successful SCTP link establishment is used to indicate that the data link is successfully established.
14. The first network device according to claim 13, characterized in that: The processor is further configured to read the computer program in the memory and perform the following operations: The SCTP processing thread receives an AP signaling sent by the AP processing thread, where the AP signaling includes first data to be transmitted; The SCTP processing thread encapsulates the first data to be transmitted to obtain first SCTP data; The SCTP processing thread sends the first SCTP data to the second network device.
15. The first network device according to claim 13, characterized in that: The processor is further configured to read the computer program in the memory and perform the following operations: The SCTP processing thread receives second SCTP data sent by the second network device; The SCTP processing thread decapsulates the second SCTP data to obtain second data to be transmitted; The SCTP processing thread sends a reception signaling to the AP processing thread, where the reception signaling includes the second data to be transmitted.
16. The first network device according to claim 11 or 12, characterized in that: The first network device further includes a system timer thread, and the processor is further configured to read a computer program in the memory and perform the following operations: The SCTP processing thread receives a timer message sent by the system timer thread, where the timer message is used to indicate a basic timer; The SCTP processing thread determines the timing service to be processed; The SCTP processing thread generates a target timer for the timing service according to the duration of the basic timer and the duration required for the timing service; The SCTP processing thread performs timing processing on the timing service according to the target timer.
17. A second network device, characterized in that: Including memory, transceiver, processor; a memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; A processor is configured to read the computer program in the memory and perform the following operations: Establishing a data link with the SCTP processing thread in the first network device based on the link control block information; The link control block information is obtained by processing link configuration data generated by a configuration thread in the first network device.
18. The second network device according to claim 17, characterized in that: The establishing of a data link with the SCTP processing thread in the first network device based on the link control block information includes: Receiving an SCTP establishment request message sent by the SCTP processing thread, wherein the SCTP establishment request message includes the link control block information; Sending an SCTP establishment request confirmation message to the SCTP processing thread, wherein the SCTP establishment request confirmation message includes a status COOKIE; Receive a COOKIE response message sent by the SCTP processing thread, wherein the COOKIE response message includes the status COOKIE; A COOKIE response confirmation message is sent to the SCTP processing thread, where the COOKIE response confirmation message is used to indicate that the data link is successfully established.
19. The second network device according to claim 17 or 18, characterized in that: The processor is further configured to read the computer program in the memory and perform the following operations: Receive the first SCTP data sent by the SCTP processing thread; The first SCTP data is decapsulated to obtain first transmission data.
20. The second network device according to claim 17 or 18, characterized in that: The processor is further configured to read the computer program in the memory and perform the following operations: Sending second SCTP data to the SCTP processing thread.
21. An SCTP link establishment device, characterized in that: Applied to a first network device, the first network device includes a configuration thread and an SCTP processing thread, the apparatus includes: A receiving module, used for the SCTP processing thread to receive a configuration message sent by the configuration thread, wherein the configuration message includes link configuration data; A processing module, used for the SCTP processing thread to process the link configuration data according to SCTP to generate link control block information; The first link establishment module is used for the SCTP processing thread to establish a data link with the second network device based on the link control block information.
22. An SCTP link establishment device, characterized in that: Applied to a second network device, the apparatus comprises: A second link establishment module, configured to establish a data link with the SCTP processing thread in the first network device based on the link control block information; The link control block information is obtained by processing link configuration data generated by a configuration thread in the first network device.
23. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the SCTP link establishment method according to any one of claims 1 to 10.