Data packet transmission control method and apparatus based on active and standby machines, device, and medium
By obtaining and adjusting the data packet transmission instruction information and synchronizing the network protocol stack status of the standby machine, the problem of service interruption after the main and standby machines are switched in the 5G core network is solved, and the normal processing and transmission of data packet transmission is realized.
Patent Information
- Application Number
- PCT/CN2023/130007
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-01
- Filing Date
- 2023-11-06
- Publication Date
- 2024-09-06
AI Technical Summary
In the 5G core network, when the active and standby machines are switched, due to the influence of the network or other factors, the network protocol stack status of the standby machine is not completely synchronized with the network protocol stack status of the host machine, resulting in business interruption and normal data packet transmission.
By obtaining the data packet transmission instruction information of the network element device, the network protocol stack status of the standby machine is adjusted to synchronize it with the network protocol stack status of the host machine, thereby realizing the processing and transmission of data packet transmission.
This ensures the normal processing of services after the main and backup machines are switched, avoids data packet transmission interruptions, and improves the rationality and reliability of data packet transmission control.
Smart Images

Figure CN2023130007_06092024_PF_FP
Abstract
Description
Data packet transmission control method, device, equipment, and medium based on master and backup machines
[0001] This application claims priority to Chinese patent application number "202310119590.9", filed on February 1, 2023, entitled "Data packet transmission control method, device, equipment, and medium based on master-slave machines". The entire contents of this Chinese patent application are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a method for controlling data packet transmission based on a master-slave machine, a device for controlling data packet transmission based on a master-slave machine, an electronic device, and a computer-readable medium. Background Art
[0003] In the relevant technologies of the 5G core network, in order to ensure the reliability of network element equipment, a 1+1 master-slave solution is usually adopted, that is, one network element equipment serves as the main core network element equipment (referred to as the host) to handle related services, and the other network element equipment serves as the backup core network element equipment (referred to as the backup machine). When the main machine fails, the backup machine will be promoted to the main machine and take over the related business processing.
[0004] Among them, when the host processes related business, it will send related processing messages to the backup machine for synchronization by the backup machine. However, in actual applications, such as due to network or other factors, the related processing information may be lost, resulting in the network protocol stack state of the backup machine and the network protocol stack state of the host being not fully synchronized; therefore, although the backup machine is promoted to the host, its connection with the external network element device will be interrupted, and it will be unable to continue data packet transmission, which greatly affects the normal processing of the business.
[0005] Therefore, how to improve the rationality of data packet transmission control based on the master and backup machines to ensure the normal processing of services is an urgent problem to be solved.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a method, apparatus, device, and medium for controlling data packet transmission based on a master and a standby machine, which improves the rationality of data packet transmission control based on a master and a standby machine and ensures normal processing of services after switching between the master and the standby machine.
[0008] In the first aspect, an embodiment of the present application provides a data packet transmission control method based on a master-slave machine, the method comprising: after the standby machine switches from a standby working mode to a master working mode, obtaining transmission indication information of a network element device for a data packet; wherein the transmission indication information is used to indicate data packet information of a data packet to be transmitted between the standby machine and the network element device; based on the data packet information, adjusting the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine; and performing data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine.
[0009] In the second aspect, an embodiment of the present application provides a data packet transmission control method based on a master-slave machine, the method comprising: if it is detected that the backup machine switches to the master working mode, obtaining the data packet to be transmitted between the backup machine; sending the data packet to the backup machine, so that the backup machine obtains the transmission indication information of the network element device for the data packet based on the data packet, and determines the data packet to be transmitted based on the transmission indication information; and receiving the data packet sent by the backup machine.
[0010] In the third aspect, an embodiment of the present application provides a data packet transmission control device based on a master-standby machine, the device comprising: an acquisition module, configured to obtain transmission indication information of a network element device for a data packet after the standby machine switches from a standby working mode to a master working mode; wherein the transmission indication information is used to indicate the data packet information of the data packet to be transmitted between the standby machine and the network element device; an adjustment module, configured to adjust the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine based on the data packet information; and transmission processing, configured to perform data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine.
[0011] In the fourth aspect, an embodiment of the present application provides a data packet transmission control device based on a master-slave machine, the device comprising: an acquisition module, configured to acquire the data packet to be transmitted between the standby machine and the standby machine if it is detected that the standby machine has switched to the master working mode; a sending module, configured to send the data packet to the standby machine, so that the standby machine obtains the transmission indication information of the network element device for the data packet based on the data packet, and determines the data packet to be transmitted based on the transmission indication information; a receiving module, configured to receive the data packet sent by the standby machine.
[0012] In a fifth aspect, an embodiment of the present application provides an electronic device comprising one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the master-slave-based data packet transmission control method as described above.
[0013] In a sixth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for controlling data packet transmission based on a master and a backup machine as described above is implemented.
[0014] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the above-described method for controlling data packet transmission based on a master-slave machine.
[0015] In the technical solution provided in the embodiments of the present application: after the standby machine is promoted to the main machine, the network protocol stack state of the standby machine can be adjusted to be synchronized with the network protocol stack state of the main machine by obtaining the transmission indication information of the network element device for the data packet, and then the data packet transmission processing between the standby machine and the network element device can be performed based on the network protocol stack state of the standby machine synchronized with the network protocol stack state of the main machine.
[0016] On the one hand, by transmitting indication information, the network protocol stack state of the standby machine is kept consistent with that of the host machine, so that data packets can be transmitted between the standby machine and the network element device. The data packet transmission control based on the master and standby machines is more rational, which ensures the normal processing of the business after the master and standby machines switch; more specifically, even if the connection with the external network element device is interrupted after the standby machine is promoted to the master, the network protocol stack state of the standby machine can be kept consistent with that of the host machine in real time by transmitting indication information, so that the connection between the standby machine and the network element device is re-established and then data packets are transmitted, thereby avoiding the phenomenon in the related technology that the standby machine is promoted to the master but its connection with the external network element device is interrupted and data packet transmission cannot be continued.
[0017] On the one hand, by transmitting indication information, the network protocol stack state of the backup machine is kept consistent with that of the host machine. The consistency synchronization process is simple and easy to implement, and is applicable to a wide range of application scenarios.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] FIG1 is a schematic diagram of an exemplary implementation environment to which the technical solutions of the embodiments of the present application can be applied;
[0020] FIG2 is a flow chart of a method for controlling data packet transmission based on a master-slave machine according to an exemplary embodiment of the present application;
[0021] FIG3 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0022] FIG4 is a flow chart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0023] FIG5 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0024] FIG6 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0025] FIG7 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0026] FIG8 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to an exemplary embodiment of the present application;
[0027] FIG9 is a schematic diagram of an exemplary implementation environment to which the technical solutions of the embodiments of the present application can be applied;
[0028] FIG10 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0029] FIG11 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0030] FIG12 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0031] FIG13 is a flowchart of a method for controlling data packet transmission based on a master-slave machine according to another exemplary embodiment of the present application;
[0032] FIG14 is a block diagram of a data packet transmission control device based on a master / slave machine according to an embodiment of the present application;
[0033] FIG15 is a block diagram of a data packet transmission control device based on a master / slave machine according to an embodiment of the present application;
[0034] FIG16 is a schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments applicable to the present application. Rather, they are merely examples of apparatus and methods applicable to certain aspects of the present application, as detailed in the appended claims.
[0036] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0037] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0038] It should be noted that the term "plurality" used in this application refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0039] In the relevant technologies of the 5G core network, in order to ensure the reliability of network element equipment, a 1+1 master-slave solution is usually adopted, that is, one network element equipment serves as the main core network element equipment (referred to as the host) to handle related services, and the other network element equipment serves as the backup core network element equipment (referred to as the backup machine). When the main machine fails, the backup machine will be promoted to the main machine and take over the related business processing.
[0040] Among them, when the host processes related business, it will send related processing messages to the backup machine for synchronization by the backup machine. However, in actual applications, such as due to network or other factors, the related processing information may be lost, resulting in the network protocol stack state of the backup machine and the network protocol stack state of the host being not fully synchronized; therefore, although the backup machine is promoted to the host, its connection with the external network element device will be interrupted, and it will be unable to continue data packet transmission, which greatly affects the normal processing of the business.
[0041] Therefore, in order to improve the rationality of data packet transmission control based on the master and standby machines and ensure the normal processing of the business, the present application provides a data packet transmission control solution based on the master and standby machines. Please refer to Figure 1, which is a schematic diagram of an implementation environment involved in this application. The implementation environment mainly includes a host 101, a standby machine 102 and an external network element device (referred to as the network element device) 103. It can be understood that the host 101, the standby machine 102 and the network element device 103 are connected through network communication, and the network can include various connection types, such as wireless communication links, wired and optical fiber cables, etc. Among them:
[0042] Any one or more of the host 101, the backup device 102, and the network element device 103 may be a switch, a router, a hub, a network interface card (NIC), a wireless access point (WAP), a modem, an optical terminal, an optical transceiver, a bridge, a server, a smart phone, a computer, a notebook, a computer, and a vehicle-mounted terminal, etc. The server may be a server that provides various services; it may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), big data and artificial intelligence platforms, etc.
[0043] It is understood that the network element device 103 includes but is not limited to a separately provided network element device and a network element device provided within a communication device. A separately provided network element device refers to a network element device that is an independent communication device, and a network element device provided within a communication device refers to a network element device that is a component of the communication device, such as a network element device provided within a base station.
[0044] It should be noted that the number of servers corresponding to the host 101, backup machine 102 and network element device 103 in Figure 1 is only schematic. According to actual needs, there can be any number of servers corresponding to the host 101, backup machine 102 and network element device 103.
[0045] In one embodiment of the present application, the data packet transmission control method based on the master and backup machines may be interactively executed by the backup machine 102 and the network element device 103 .
[0046] Exemplarily, after detecting that the standby machine 102 switches to the master working mode, the network element device 103 obtains a data packet to be transmitted between the standby machine 102 and then sends the data packet to the standby machine 102 .
[0047] Correspondingly, the backup machine 102 obtains the transmission indication information of the network element device 103 for the data packet based on the received data packet sent by the network element device 103, and the transmission indication information is used to indicate the data packet information of the data packet to be transmitted between the backup machine 102 and the network element device 103; then, based on the data packet information, the network protocol stack state of the backup machine 102 is adjusted to be synchronized with the network protocol stack state of the host machine 101; then, based on the adjusted network protocol stack state of the backup machine 102, the corresponding data packet is sent to the network element device 103.
[0048] Correspondingly, the network element device 103 receives the data packet sent by the backup device 102 .
[0049] By implementing the optional embodiment, it is achieved that after the standby machine is promoted to the master, data packet transmission between the standby machine and the network element device continues, thereby ensuring normal processing of services after the master-standby machine switchover.
[0050] In one embodiment of the present application, the data packet transmission control method based on the master and backup machines may be interactively executed by the backup machine 102, the network element device 103 and the control device (not shown in FIG. 1 ).
[0051] Exemplarily, after the standby machine 102 switches from the standby working mode to the host working mode, the control device obtains the transmission indication information of the network element device 103 for the data packet, and the transmission indication information is used to indicate the data packet information of the data packet to be transmitted between the standby machine 102 and the network element device 103; then, based on the data packet information, the network protocol stack state of the standby machine 102 is adjusted to be synchronized with the network protocol stack state of the host 101; then, based on the adjusted network protocol stack state of the standby machine 102, the data packet transmission processing between the standby machine 102 and the network element device 103 is controlled.
[0052] Accordingly, the backup machine 102 adjusts the network protocol stack state of the backup machine 102 to be synchronized with the network protocol stack state of the host 101 based on the control instruction sent by the control device, and then sends the corresponding data packet to the network element device 103 based on the adjusted network protocol stack state of the backup machine 102.
[0053] Correspondingly, the network element device 103 receives the data packet sent by the backup device 102 .
[0054] It is understandable that the control device can be a device used to manage the host machine and the backup machine, such as a cloud controller, etc.; in actual applications, it can be flexibly adjusted according to the specific application scenario.
[0055] By implementing the optional embodiment, it is achieved that after the standby machine is promoted to the master, data packet transmission between the standby machine and the network element device continues, thereby ensuring normal processing of services after the master-standby machine switchover.
[0056] The technical solution of the embodiment shown in Figure 1 can be applied to various scenarios, including but not limited to smart transportation, assisted driving, cloud technology, artificial intelligence, etc.; in actual applications, corresponding adjustments can be made according to specific application scenarios.
[0057] For example, if applied to smart transportation or assisted driving scenarios, the service may be an Internet of Vehicles service, and accordingly, the host / backup machine may be a network element device that processes the Internet of Vehicles service; furthermore, by implementing the technical solution of the embodiment of the present application, the rationality of the data packet transmission control based on the host and backup machines is higher, thereby ensuring the normal processing of the Internet of Vehicles service.
[0058] For example, if applied to cloud technology or artificial intelligence scenarios, the service may be a cloud gaming service, and accordingly, the host / backup machine may be a network element device for processing the cloud gaming service; furthermore, by implementing the technical solution of the embodiment of the present application, the rationality of the data packet transmission control based on the host / backup machine is higher, thereby ensuring the normal processing of the cloud gaming service.
[0059] It should be noted that in the specific implementation of this application, user-related data is involved. When the embodiments of this application are applied to specific products or technologies, it is necessary to obtain the object's permission or consent, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0060] The following describes in detail the various implementation details of the technical solutions of the embodiments of the present application:
[0061] Please refer to FIG2 , which is a flow chart of a method for controlling data packet transmission based on a master and a standby machine according to an embodiment of the present application. The method for controlling data packet transmission based on a master and a standby machine can be executed by the standby machine 102. As shown in FIG2 , the method for controlling data packet transmission based on a master and a standby machine includes at least S201 to S203, which are described in detail as follows:
[0062] S201, after the standby machine switches from the standby working mode to the master working mode, obtain transmission instruction information of the network element device for the data packet; wherein the transmission instruction information is used to indicate the data packet information of the data packet to be transmitted between the standby machine and the network element device.
[0063] In the embodiment of the present application, the standby machine working mode refers to the working mode of the standby machine before being promoted to the main machine; correspondingly, the main machine working mode refers to the working mode of the standby machine after being promoted to the main machine.
[0064] It is understandable that after the standby machine is promoted to the main machine, the standby machine needs to connect the main machine and the network element device to transmit data packets to ensure normal processing of the business; therefore, in the embodiment of the present application, if the standby machine detects that it has been promoted to the main machine (that is, it switches from the standby machine working mode to the main machine working mode), it can obtain the transmission indication information of the network element device for the data packet.
[0065] In the embodiment of the present application, the transmission indication information is used to indicate the data packet information of the data packet to be transmitted between the standby machine and the network element device; the data packet information refers to information related to the data packet to be transmitted, including but not limited to the identification information of the data packet, the protocol information followed, etc.
[0066] Exemplarily, the transmission indication information may include packet sending indication information, and the data packet information may include target identification information; wherein the packet sending indication information is used to indicate the target identification information corresponding to the data packet to be sent by the standby machine.
[0067] For example, assume that the target identification information is M+1, that is, the packet sending indication information is used to indicate that the backup machine should send a data packet to the network element device, and the target identification information of the data packet to be sent is M+1; in short, the backup machine should send the M+1th data packet to the network element device.
[0068] Exemplarily, the transmission indication information may include packet receiving indication information, and the data packet information may include target identification information; wherein the packet receiving indication information is used to indicate the target identification information corresponding to the data packet that the standby machine should receive.
[0069] For example, assume that the target identification information is N+1, that is, the packet receiving indication information is used to indicate that the backup machine should receive the data packet sent by the network element device, and the target identification information of the data packet to be received is N+1; in short, the backup machine should receive the N+1th data packet sent by the network element device.
[0070] S202: Adjust the network protocol stack state of the backup machine to be synchronized with the network protocol stack state of the master machine based on the data packet information.
[0071] It is understandable that after the standby machine is promoted to the master, the standby machine mainly connects the master and the network element device to transmit data packets based on the standby machine's network protocol stack state; therefore, in the embodiment of the present application, the standby machine obtains the transmission instruction information for the data packet sent by the network element device, and needs to adjust the standby machine's network protocol stack state based on the data packet information of the data packet to be transmitted between the standby machine and the network element device indicated by the transmission instruction information. At the same time, since the transmission instruction information for the data packet sent by the network element device is consistent with the master's network protocol stack state, the standby machine's network protocol stack state can be adjusted to be synchronized with the master's network protocol stack state based on the data packet information of the data packet to be transmitted between the standby machine and the network element device indicated by the transmission instruction information.
[0072] That is, only when the network protocol stack state of the standby machine is synchronized with the network protocol stack state of the host machine, can the standby machine successfully connect the host machine and the network element device for data packet transmission with the help of the network protocol stack state of the standby machine that is synchronized with the network protocol stack state of the host machine; conversely, if the network protocol stack state of the standby machine is not synchronized with the network protocol stack state of the host machine, the standby machine cannot successfully connect the host machine and the network element device for data packet transmission with the help of the network protocol stack state of the standby machine that is not synchronized with the network protocol stack state of the host machine.
[0073] S203 , performing data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine.
[0074] In the embodiment of the present application, the standby machine adjusts the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine. Thereafter, based on the adjusted network protocol stack state of the standby machine that is synchronized with the network protocol stack state of the host machine, the host machine and the network element device can be successfully connected for data packet transmission, thereby ensuring the normal connection between the standby machine and the network element device, so that the business can be processed normally.
[0075] In the embodiment of the present application, the standby machine maintains the consistency of the network protocol stack state of the standby machine and the network protocol stack state of the host machine by transmitting indication information, so that data packets can be transmitted between the standby machine and the network element device, thereby improving the rationality of the data packet transmission control of the master and standby machines and ensuring the normal processing of the business after the master and standby machines are switched; and by transmitting indication information, the consistency of the network protocol stack state of the standby machine and the network protocol stack state of the host machine is maintained, and the consistency synchronization process is simple and easy to implement, and is applicable to many wide range of application scenarios.
[0076] In one embodiment of the present application, another method for controlling data packet transmission based on a master and a standby machine is provided, which can be executed by the standby machine 102. As shown in FIG3 , the method for controlling data packet transmission based on a master and a standby machine may include S301 to S302, S201, and S203.
[0077] In the embodiment of the present application, the data packet information includes target identification information, which refers to the identification information of the data packet to be transmitted between the indicated backup machine and the network element device; wherein the identification information is used to uniquely identify the data packet, and the identification information includes but is not limited to the data packet sequence number, data packet name, etc.
[0078] In the embodiment of the present application, the network protocol stack status of the standby machine includes information on the number of data packets transmitted between the host and the network element device.
[0079] Exemplarily, the transmitted data packets may be data packets sent by the host to the network element device, that is, the quantity information is used to represent the number of packets corresponding to the data packets sent by the host to the network element device, which is for the case where the host sends data packets to the network element device.
[0080] For example, in the case where the host sends data packets to the network element device, the quantity information corresponds to the number of packets sent, and the network protocol stack status of the device includes that the host has sent MY data packets to the network element device, that is, the number of packets sent is MY.
[0081] Exemplarily, the transmitted data packet may be a data packet sent by the network element device that has been received by the host, that is, the quantity information is used to represent the number of received packets corresponding to the data packets sent by the network element device that the host has received. This refers to the case where the host receives data packets sent by the network element device.
[0082] For example, in the case where the host receives data packets sent by the network element device, the quantity information corresponds to the number of received packets. The network protocol stack status of the device includes that the host has received NX data packets sent by the network element device, that is, the number of received packets is NX.
[0083] S301 to S302 are described in detail as follows:
[0084] S301: Determine transmission identification information of a transmitted data packet based on target identification information.
[0085] In an embodiment of the present application, the backup machine obtains the transmission indication information for the data packet sent by the network element device, and then can determine the transmission identification information of the transmitted data packet based on the target identification information of the data packet to be transmitted between the backup machine and the network element device indicated by the transmission indication information.
[0086] In the embodiment of the present application, the transmission identification information refers to the identification information corresponding to the transmitted data packet; wherein, the identification information is used to uniquely identify the data packet, and the identification information includes but is not limited to the data packet sequence number, data packet name, etc.
[0087] In one embodiment of the present application, for the case where the backup machine sends a data packet to the network element device, the transmission indication information may include packet indication information for indicating the target identification information corresponding to the data packet that the backup machine should send, the target identification information includes first identification information, and the quantity information is used to represent the number of packets corresponding to the data packet sent by the host machine to the network element device.
[0088] It can be understood that in an optional embodiment, the target identification information of the data packet that the backup machine should send to the network element device is called the first identification information, to distinguish it from the second identification information of the data packet that the backup machine should receive sent by the network element device; among them, the packet indication information and the number of packets sent have been explained in the aforementioned embodiments and will not be repeated here.
[0089] Accordingly, the process of determining the transmission identification information of the transmitted data packet based on the target identification information in S301 may include:
[0090] The previous identification information adjacent to the target identification information is used as the sending identification information of the sent data packet.
[0091] That is, in the optional embodiment, for the case where the backup machine sends a data packet to the network element device, the previous identification information adjacent to the target identification information is used as the sending identification information of the sent data packet.
[0092] For example, assume that the target identification information of the backup machine indicated by the packet sending indication information to send a data packet to the network element device is M+1, and the previous identification information adjacent to M+1 is calculated to be M. At this time, the previous identification information M adjacent to M+1 is used as the sending identification information of the sent data packet.
[0093] In one embodiment of the present application, for the case where the standby machine receives a data packet sent by a network element device, the transmission indication information includes packet receiving indication information for indicating the target identification information corresponding to the data packet that the standby machine should receive, the target identification information includes second identification information, and the quantity information is used to represent the number of received packets corresponding to the data packet sent by the network element device that the standby machine has received.
[0094] It can be understood that in an optional embodiment, the target identification information of the data packet sent by the network element device that the backup machine should receive is called the second identification information, to distinguish it from the first identification information that the backup machine should send the data packet to the network element device; among them, the packet receiving indication information and the number of received packets have been explained in the aforementioned embodiments and will not be repeated here.
[0095] Accordingly, the process of determining the transmission identification information of the transmitted data packet based on the target identification information in S301 may include:
[0096] The previous identification information adjacent to the target identification information is used as the receiving identification information of the received data packet.
[0097] That is, in the optional embodiment, for the case where the standby machine receives a data packet sent by a network element device, the previous identification information adjacent to the target identification information is used as the receiving identification information of the received data packet.
[0098] For example, assume that the target identification information of the data packet sent by the network element device that the backup machine indicated by the packet receiving indication information should receive is N+1, and the previous identification information adjacent to N+1 is calculated to be N. At this time, the previous identification information N adjacent to the target identification information N+1 is used as the receiving identification information of the received data packet.
[0099] S302: Adjust the quantity information to quantity information that matches the transmission identification information, so as to synchronize the network protocol stack state of the standby machine with the network protocol stack state of the master machine.
[0100] In an embodiment of the present application, the backup machine determines the transmission identification information of the transmitted data packet based on the target identification information, and then adjusts the quantity information to quantity information that matches the transmission identification information, thereby synchronizing the network protocol stack state of the backup machine with the network protocol stack state of the host machine.
[0101] In one embodiment of the present application, in the case where the standby machine sends a data packet to the network element device, the process of adjusting the quantity information to quantity information matching the transmission identification information in S302 may include:
[0102] Adjust the number of packets sent to match the sending identification information.
[0103] That is, in an optional embodiment, for the case where the backup machine sends data packets to the network element device, the number of packets sent is adjusted to the number of packets sent that matches the previous identification information adjacent to the first identification information, so that the number of packets contained in the network protocol stack state of the backup machine is synchronized with the number of packets contained in the network protocol stack state of the host machine.
[0104] For example, taking the above example of the backup machine sending data packets to the network element device, the number of packets sent is MY, and the first identification information is M+1. At this time, the number of packets sent MY is adjusted to the previous identification information M adjacent to M+1, that is, the number of packets sent is adjusted from MY to M.
[0105] In one embodiment of the present application, in the case where the standby machine receives a data packet sent by a network element device, the process of adjusting the quantity information to quantity information matching the transmission identification information in S302 may include:
[0106] Adjust the number of received packets to match the number of received packets with the receiving identification information.
[0107] That is, in an optional embodiment, for the case where the backup machine receives data packets sent by the network element device, the number of received packets is adjusted to a number of received packets that matches the second identification information, so that the number of received packets contained in the network protocol stack state of the backup machine is synchronized with the number of received packets contained in the network protocol stack state of the host machine.
[0108] For example, taking the example of the aforementioned standby machine receiving data packets sent by the network element device, the number of received packets is NX, and the second identification information is N+1. At this time, the number of received packets NX is adjusted to the previous identification information N adjacent to the second identification information N+1, that is, the number of received packets is adjusted from NX to N.
[0109] It should be noted that, for the detailed description of S201 and S203 shown in FIG3 , please refer to S201 and S203 shown in FIG2 , which will not be repeated here.
[0110] In the embodiment of the present application, the standby machine can quickly and easily adjust the quantity information corresponding to the data packets transmitted between the host and the network element device contained in the network protocol stack state of the standby machine based on the target identification information of the data packets to be transmitted between the standby machine and the network element device indicated by the transmission indication information, thereby maintaining the consistency of the network protocol stack state of the standby machine and the network protocol stack state of the host.
[0111] In one embodiment of the present application, another method for controlling data packet transmission based on a master and a standby machine is provided, which can be executed by the standby machine 102. As shown in FIG4 , the method for controlling data packet transmission based on a master and a standby machine can include S401 to S402, S201, and S203.
[0112] In the embodiment of the present application, the data packet information includes target identification information, which refers to the identification information of the data packet to be transmitted between the indicated backup machine and the network element device; wherein the identification information is used to uniquely identify the data packet, and the identification information includes but is not limited to the data packet sequence number, data packet name, etc.
[0113] In the embodiment of the present application, the network protocol stack status of the standby machine includes information on the number of data packets transmitted between the host and the network element device.
[0114] Exemplarily, the transmitted data packets may be data packets sent by the host to the network element device, that is, the quantity information is used to represent the number of packets corresponding to the data packets sent by the host to the network element device, which is for the case where the host sends data packets to the network element device.
[0115] For example, in the case where the host sends data packets to the network element device, the quantity information corresponds to the number of packets sent, and the network protocol stack status of the device includes that the host has sent MY data packets to the network element device, that is, the number of packets sent is MY.
[0116] Exemplarily, the transmitted data packet may be a data packet sent by the network element device that has been received by the host, that is, the quantity information is used to represent the number of received packets corresponding to the data packets sent by the network element device that the host has received. This refers to the case where the host receives data packets sent by the network element device.
[0117] For example, in the case where the host receives data packets sent by the network element device, the quantity information corresponds to the number of received packets. The network protocol stack status of the device includes that the host has received NX data packets sent by the network element device, that is, the number of received packets is NX.
[0118] S401 to S402 are described in detail as follows:
[0119] S401 : Based on the relationship between the target identification information and the quantity information, detecting the synchronization status of the network protocol stack state of the backup machine and the network protocol stack state of the master machine.
[0120] In the embodiment of the present application, the standby machine obtains the transmission indication information for the data packet sent by the network element device, and then can detect the synchronization status of the network protocol stack status of the standby machine and the network protocol stack status of the host machine based on the relationship between the target identification information and the quantity information of the data packet to be transmitted between the standby machine and the network element device indicated by the transmission indication information, and then determine whether to perform adjustment processing based on the detected synchronization status.
[0121] In one embodiment of the present application, the process of detecting the synchronization status of the network protocol stack state of the backup machine and the network protocol stack state of the master machine based on the relationship between the target identification information and the quantity information in S401 may include:
[0122] Determine third identification information corresponding to the data packet to be transmitted based on the quantity information;
[0123] If the target identification information does not match the third identification information, a detection result is obtained that indicates that the network protocol stack state of the standby machine is not completely synchronized with the network protocol stack state of the master machine.
[0124] If the target identification information matches the third identification information, a detection result is obtained that indicates that the network protocol stack state of the standby machine is completely synchronized with the network protocol stack state of the master machine.
[0125] That is, in an optional embodiment, the backup machine can determine the third identification information corresponding to the data packet to be transmitted based on the quantity information, and then detect the synchronization status of the network protocol stack status of the backup machine and the network protocol stack status of the host machine based on the relationship between the target identification information and the third identification information.
[0126] In the optional embodiment, the data packet to be transmitted may be a data packet that the standby machine needs to send to the network element device, or may be a data packet sent by the network element device that the standby machine needs to receive.
[0127] The third identification information in the optional embodiment refers to the identification information corresponding to the data packet to be transmitted determined based on the quantity information, so as to be distinguished from the first identification information and the second identification information in the aforementioned embodiment.
[0128] In an optional embodiment, based on the relationship between the target identification information and the third identification information, detecting the synchronization between the network protocol stack state of the standby machine and the network protocol stack state of the master machine includes the following two situations:
[0129] In case one, if the target identification information does not match the third identification information, a detection result is obtained that characterizes that the network protocol stack state of the backup machine is not fully synchronized with the network protocol stack state of the host machine; that is, if the target identification information does not match the third identification information, it is detected at this time that the network protocol stack state of the backup machine is not fully synchronized with the network protocol stack state of the host machine.
[0130] For example, in the case of a backup machine sending a data packet to a network element device, the quantity information is the number of packets sent, and the target identification information is the first identification information. Assuming the number of packets sent is MY, the next adjacent identification information M-Y+1 of the number of packets sent is determined as the third identification information M-Y+1 corresponding to the data packet to be sent, and the first identification information is set to M+1. Obviously, the first identification information M+1 does not match the third identification information M-Y+1. In this case, the detection result obtained is used to indicate that the number of packets sent contained in the network protocol stack state of the backup machine is not fully synchronized with the number of packets sent contained in the network protocol stack state of the master machine.
[0131] For another example, in the case where a standby machine receives a data packet sent by a network element device, the quantity information is the number of received packets, and the target identification information is the second identification information. Assuming the number of received packets is NX, the next adjacent identification information N-X+1 of the number of received packets NX is determined as the third identification information N-X+1 corresponding to the data packet to be received, and the second identification information is set to N+1. Obviously, the second identification information N+1 does not match the third identification information N-X+1. In this case, the detection result obtained is used to indicate that the number of received packets contained in the network protocol stack state of the standby machine is not fully synchronized with the number of received packets contained in the network protocol stack state of the master machine.
[0132] In the second case, if the target identification information matches the third identification information, a detection result is obtained to characterize that the network protocol stack state of the backup machine is completely synchronized with the network protocol stack state of the host machine; that is, if the target identification information matches the third identification information, it is detected at this time that the network protocol stack state of the backup machine is completely synchronized with the network protocol stack state of the host machine.
[0133] For example, in the case of a backup machine sending a data packet to a network element device, the quantity information is the number of packets sent, and the target identification information is the first identification information. Assuming the number of packets sent is M, the next adjacent identification information M+1 of the packet number M is determined as the third identification information M+1 corresponding to the packet to be sent, and the first identification information is set to M+1. Obviously, the first identification information M+1 matches the third identification information M+1, and the result is a detection result that indicates that the number of packets sent contained in the network protocol stack state of the backup machine is completely synchronized with the number of packets sent contained in the network protocol stack state of the master machine.
[0134] For another example, in the case where a standby machine receives a data packet sent by a network element device, the quantity information is the number of received packets, and the target identification information is the second identification information. Assuming the number of received packets is N, the next adjacent identification information N+1 of the number of received packets N is determined as the third identification information N+1 corresponding to the to-be-received data packet, and the second identification information is set to N+1. Obviously, the second identification information N+1 matches the third identification information N+1, and the result is a detection result indicating that the number of received packets contained in the network protocol stack state of the standby machine is completely synchronized with the number of received packets contained in the network protocol stack state of the master machine.
[0135] S402: If the synchronization condition indicates that the network protocol stack state of the standby machine is not completely synchronized with the network protocol stack state of the master machine, the network protocol stack state of the standby machine is adjusted to be synchronized with the network protocol stack state of the master machine based on the target identification information.
[0136] In the embodiment of the present application, for the aforementioned situation 1, if the synchronization situation indicates that the network protocol stack state of the standby machine is not fully synchronized with the network protocol stack state of the host machine, the network protocol stack state of the standby machine can be adjusted to be synchronized with the network protocol stack state of the host machine based on the target identification information.
[0137] For example, in the case where the backup machine sends data packets to the network element device, the quantity information is the number of packets sent, and the target identification information is the first identification information. Based on the first identification information, the number of packets sent contained in the network protocol stack state of the backup machine can be adjusted to be synchronized with the number of packets sent contained in the network protocol stack state of the host machine.
[0138] For example, in the case where the standby machine receives data packets sent by the network element device, the quantity information is the number of received packets, and the target identification information is the second identification information. Based on the second identification information, the number of received packets contained in the network protocol stack state of the standby machine can be adjusted to be synchronized with the number of received packets contained in the network protocol stack state of the host machine.
[0139] In the embodiment of the present application, for the aforementioned second situation, if the synchronization situation indicates that the network protocol stack state of the standby machine is completely synchronized with the network protocol stack state of the master machine, no processing is required.
[0140] For example, in the case where the backup machine sends data packets to the network element device, the number of packets contained in the network protocol stack state of the backup machine is completely synchronized with the number of packets contained in the network protocol stack state of the host machine, and there is no need to adjust the number of packets contained in the network protocol stack state of the backup machine to be synchronized with the number of packets contained in the network protocol stack state of the host machine based on the target identification information.
[0141] For example, in the case where the standby machine receives data packets sent by the network element device, the number of received packets contained in the network protocol stack state of the standby machine is completely synchronized with the number of received packets contained in the network protocol stack state of the host machine, and there is no need to adjust the number of received packets contained in the network protocol stack state of the standby machine to be synchronized with the number of received packets contained in the network protocol stack state of the host machine based on the target identification information.
[0142] It should be noted that, for the detailed description of S201 and S203 shown in FIG4 , please refer to S201 and S203 shown in FIG2 , which will not be repeated here.
[0143] In the embodiment of the present application, the standby machine detects that the network protocol stack state of the standby machine is not fully synchronized with the network protocol stack state of the host machine based on the target identification information of the data packet to be transmitted between the standby machine and the network element device indicated by the transmission indication information. Only then does it adjust the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine based on the target identification information, thereby avoiding unnecessary and tedious adjustment operations and saving a certain amount of adjustment resources.
[0144] In one embodiment of the present application, another method for controlling data packet transmission based on a master and a standby machine is provided, which can be executed by the standby machine 102. As shown in FIG5 , the method for controlling data packet transmission based on a master and a standby machine may include S501 to S502 and S202 to S203.
[0145] S501 to S502 are described in detail as follows:
[0146] S501: Receive a data packet sent by a network element device.
[0147] In the embodiment of the present application, the network element device can send a data packet to the backup machine; correspondingly, the backup machine receives the data packet sent by the network element device.
[0148] In one embodiment of the present application, in the case where the standby machine sends a data packet to the network element device, the process of receiving the data packet sent by the network element device in S501 may include:
[0149] Sending a data packet with specified identification information to the network element device based on the network protocol stack status of the standby machine;
[0150] The receiving network element device feeds back a data packet based on the data packet with designated identification information.
[0151] That is, in an optional embodiment, for the case where the standby machine sends a data packet to the network element device, the standby machine can send a data packet with specified identification information to the network element device based on the number of packets contained in the network protocol stack status of the standby machine; accordingly, the network element device receives the data packet with specified identification information sent by the standby machine, and then when it detects that the data packet with specified identification information sent by the standby machine is not the correct data packet currently required, it can send a feedback data packet to the standby machine; accordingly, the standby machine receives the feedback data packet sent by the network element device.
[0152] In an optional embodiment, sending a data packet with specified identification information to a network element device based on the network protocol stack status of the standby machine may include:
[0153] Determine third identification information corresponding to the data packet to be sent based on the number of sent packets contained in the network protocol stack state of the standby machine, and use the determined third identification information as designated identification information;
[0154] Send a data packet with specified identification information to the network element device.
[0155] That is, in an optional embodiment, the standby machine can determine the third identification information corresponding to the data packet to be sent based on the number of packets contained in the network protocol stack status of the standby machine, and use the determined third identification information as the designated identification information, and then send the data packet with the designated identification information to the network element device.
[0156] Among them, the third identification information in the optional embodiment refers to the identification information corresponding to the data packet to be sent determined based on the quantity information, that is, the third identification information in the aforementioned embodiment, to distinguish it from the first identification information and the second identification information in the aforementioned embodiment.
[0157] For example, assuming that the number of packets sent is MY, the specified identification information is M-Y+1. At this time, the standby machine sends the M-Y+1th data packet to the network element device; accordingly, the network element device receives the M-Y+1th data packet sent by the standby machine. At the same time, assuming that the actual situation is that the network element device has received M data packets sent by the host, and what it needs is the M+1th data packet, so the network element device determines that the M-Y+1th data packet sent by the standby machine is not the correct data packet currently required, and it generates the M+1th data packet (that is, the feedback data packet, the data content of which contains the first identification information M+1, but does not contain the content actually required for the network element device to perform business processing), and sends the M+1th data packet to the standby machine; accordingly, the standby machine receives the M+1th data packet sent by the network element device, so that it can determine that the correct data packet currently required by the network element device is the M+1th data packet, and then can send the M+1th data packet (the data content of which contains the content actually required for the network element device to perform business processing) to the network element device.
[0158] In one embodiment of the present application, in the case where the standby machine receives a data packet sent by a network element device, the network element device sends the correct data packet currently required to the standby machine; accordingly, the standby machine receives the data packet sent by the network element device.
[0159] That is, in an optional embodiment, for the case where the standby machine receives data packets sent by the network element device, the standby machine does not need to send data packets with specified identification information to the network element device based on the number of packets contained in the network protocol stack status of the standby machine. It only needs to receive data packets sent by the network element device.
[0160] For example, assume that the actual situation is that the network element device has sent N data packets to the host, so the network element device generates the N+1th data packet and sends the N+1th data packet to the backup machine; accordingly, the backup machine receives the N+1th data packet sent by the network element device, so that it can be determined that the correct data packet currently required by the backup machine is the N+1th data packet, and it can receive the N+1th data packet.
[0161] S502: Determine transmission instruction information of the network element device for the data packet based on the received data packet.
[0162] In the embodiment of the present application, the standby machine receives a data packet sent by a network element device, and can then determine the transmission instruction information of the network element device for the data packet based on the received data packet, thereby obtaining the transmission instruction information of the network element device for the data packet.
[0163] In one embodiment of the application, in the case where the standby machine sends a data packet to the network element device, the process of determining the transmission instruction information of the network element device for the data packet based on the received data packet in S502 may include:
[0164] Determine the packet sending instruction information of the standby machine for the data packet based on the data packet information corresponding to the received data packet; wherein the packet sending instruction information is the data packet information for indicating the data packet that the standby machine should send;
[0165] The packet sending indication information is used as the transmission indication information.
[0166] That is, in the optional embodiment, for the case where the backup machine sends a data packet to the network element device, the backup machine receives the data packet sent by the network element device, and then can determine the packet sending indication information of the backup machine for the data packet based on the data packet information corresponding to the received data packet. At this time, the determined packet sending indication information is the transmission indication information.
[0167] For example, following the aforementioned example of the standby machine sending a data packet to the network element device, the standby machine receives the M+1th data packet, that is, the data packet information of the M+1th data packet is M+1, then the packet sending indication information is obtained to indicate that the standby machine should send the M+1th data packet to the network element device.
[0168] In one embodiment of the application, in the case where the standby machine receives a data packet sent by a network element device, the process of determining transmission instruction information of the network element device for the data packet based on the received data packet in S502 may include:
[0169] Determine the packet receiving instruction information of the standby machine for the data packet based on the data packet information corresponding to the received data packet; wherein the packet receiving instruction information is the data packet information used to indicate the data packet that the standby machine should receive;
[0170] The packet receiving indication information is used as the transmission indication information.
[0171] That is, in an optional embodiment, for the case where the standby machine receives a data packet sent by a network element device, the standby machine receives the data packet sent by the network element device, and then can determine the packet receiving indication information of the standby machine for the data packet based on the data packet information corresponding to the received data packet. At this time, the determined packet receiving indication information is the transmission indication information.
[0172] For example, taking the above example of the standby machine receiving the data packet sent by the network element device, the standby machine receives the N+1th data packet, that is, the data packet information of the N+1th data packet is N+1, then the packet receiving indication information is obtained to indicate that the standby machine should receive the N+1th data packet sent by the network element device.
[0173] It should be noted that, for the detailed description of S202 to S203 shown in FIG5 , please refer to S202 to S203 shown in FIG2 , which will not be repeated here.
[0174] In the embodiment of the present application, the standby machine can quickly and easily determine the transmission instruction information of the network element device for the data packet based on the data packet sent by the network element device, providing strong support for the subsequent synchronization adjustment of the network protocol stack status of the standby machine and the network protocol stack status of the host.
[0175] In one embodiment of the present application, another method for controlling data packet transmission based on a master and a standby machine is provided, which can be executed by the standby machine 102. As shown in FIG6 , the method for controlling data packet transmission based on a master and a standby machine can further include S601 to S602 before S201.
[0176] S601 to S602 are described in detail as follows:
[0177] S601, receiving a synchronization request sent by a host; wherein the synchronization request is generated by the host after updating the state of the host's network protocol stack, and the synchronization request carries the updated network protocol stack information of the host.
[0178] In an embodiment of the present application, after the host updates the network protocol stack status of the host, it can obtain the updated network protocol stack information of the host, and then generate a synchronization request based on the updated network protocol stack information of the host, and send the synchronization request to the backup machine; accordingly, the backup machine receives the synchronization request sent by the host.
[0179] S602: Synchronously update the network protocol stack status of the standby machine based on the updated network protocol stack information.
[0180] In the embodiment of the present application, after the standby machine receives the synchronization request sent by the host machine, it can synchronize and update the network protocol stack status of the standby machine based on the updated network protocol stack information carried in the synchronization request.
[0181] In one embodiment of the present application, the process of synchronously updating the network protocol stack status of the standby machine based on the updated network protocol stack information in S602 may include: if the updated network protocol stack information is for the case where the host machine sends data packets to the network element device, then the number of packets contained in the network protocol stack status of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of packets contained in the network protocol stack status of the standby machine is synchronized with the number of packets contained in the network protocol stack status of the host machine.
[0182] For example, if the updated network protocol stack information is for the case where the host sends data packets to the network element device, the number of packets contained in the network protocol stack status of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of packets contained in the network protocol stack status of the standby machine is synchronized with the number of packets contained in the network protocol stack status of the host machine.
[0183] In one embodiment of the present application, the process of synchronously updating the network protocol stack status of the standby machine based on the updated network protocol stack information in S602 may include: if the updated network protocol stack information is for the case where the host machine receives data packets sent by the network element device, then the number of received packets contained in the network protocol stack status of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of received packets contained in the network protocol stack status of the standby machine is synchronized with the number of received packets contained in the network protocol stack status of the host machine.
[0184] For example, if the updated network protocol stack information is for the case where the host receives data packets sent by the network element device, the number of received packets contained in the network protocol stack status of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of received packets contained in the network protocol stack status of the standby machine is synchronized with the number of received packets contained in the network protocol stack status of the host machine.
[0185] In one embodiment of the present application, the process of synchronously updating the network protocol stack status of the standby machine based on the updated network protocol stack information in S602 may include:
[0186] A non-confirmation response mechanism is used to synchronously update the network protocol stack status of the standby machine based on the updated network protocol stack information; wherein the non-confirmation response mechanism is used to indicate that the standby machine does not need to send the synchronization update result to the host machine after the synchronization update is completed.
[0187] That is, in an optional embodiment, the standby machine synchronously updates the network protocol stack status of the standby machine based on the updated network protocol stack information, and does not need to send the synchronization update result to the host machine after the synchronization update is completed. In short, no matter whether the synchronization update is successful or failed, there is no need to feedback to the host machine.
[0188] It can be understood that, as introduced in the aforementioned embodiment, the embodiment of the present application can achieve that when the network protocol states of the primary and standby machines are inconsistent, the standby machine can continue to transmit data packets with the network element device after being promoted to the primary machine; therefore, in an optional embodiment, a non-confirmation response mechanism can be used to synchronously update the network protocol stack state of the standby machine. Even if the synchronous update of the network protocol stack state of the standby machine fails, it will not affect the data packet transmission between the standby machine and the network element device, thereby saving a certain amount of response resources and improving the efficiency of the synchronous update of the network protocol stack state of the standby machine.
[0189] It should be noted that, for the detailed description of S201 to S203 shown in FIG6 , please refer to S201 to S203 shown in FIG2 , which will not be repeated here.
[0190] In the embodiment of the present application, the standby machine synchronously updates the network protocol stack status of the standby machine in real time based on the updated network protocol stack information of the host machine, providing strong support for the subsequent upgrade of the standby machine to the host machine; and the standby machine adopts an unconfirmed response mechanism to synchronously update the network protocol stack status of the standby machine, saving a certain amount of response resources and improving the efficiency of the synchronous update of the network protocol stack status of the standby machine.
[0191] In one embodiment of the present application, another method for controlling data packet transmission based on a master and a standby machine is provided, which can be executed by the standby machine 102. As shown in FIG7 , the method for controlling data packet transmission based on a master and a standby machine may include S701, S201 to S202.
[0192] In the embodiment of the present application, the network element device includes at least one of a separately set network element device and a network element device set in a base station.
[0193] S701 is described in detail as follows:
[0194] S701 : Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for the stream transmission control protocol is performed between the standby machine and the network element device.
[0195] In the embodiment of the present application, the standby machine adjusts the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine, and then based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for the stream transmission control protocol can be performed between the standby machine and the network element device.
[0196] It is understood that the Stream Control Transmission Protocol (SCTP) is a transmission protocol based on which multiple data streams can be transmitted simultaneously between the two ends of a network connection. Among them, SCTP is widely used in 4G / 5G core networks. For example, SCTP is used to transmit signaling messages between base stations and core network element devices, and SCTP is used to carry the DIAMETER protocol between network elements MME (Mobility Management Entity) and HSS (Home Subscriber Server) in 4G.
[0197] In one embodiment of the present application, data packet transmission processing for the transmission control protocol may be performed between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine.
[0198] It is understandable that the Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte stream-based transport layer communication protocol.
[0199] In one embodiment of the present application, data packet transmission processing for the User Datagram Protocol may be performed between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine.
[0200] It is understandable that the User Datagram Protocol (UDP) is a connectionless transport layer protocol in the OSI (Open System Interconnection) reference model, which provides a simple, transaction-oriented, unreliable information transmission service.
[0201] It should be noted that, in actual applications, data packet transmission processing of a transmission protocol targeted at the backup machine and the network element device may be performed according to specific application scenarios.
[0202] It should be noted that, for the detailed description of S201 to S202 shown in FIG7 , please refer to S201 to S202 shown in FIG2 , which will not be repeated here.
[0203] In the embodiment of the present application, based on the adjusted network protocol stack status of the standby machine, data packet transmission processing for many network protocols can be performed between the standby machine and the network element device, which is suitable for a wide range of application scenarios.
[0204] It should be noted that the embodiments shown in Figures 2 to 7 are described from the perspective of a standby device. The following is a detailed description of the implementation details of the technical solution of the embodiment of the present application from the perspective of a network element device in conjunction with Figure 8:
[0205] Please refer to FIG8 , which is a flowchart of a method for controlling data packet transmission based on a master / standby machine according to an embodiment of the present application. The method for controlling data packet transmission based on a master / standby machine can be executed by the network element device 103. As shown in FIG8 , the method for controlling data packet transmission based on a master / standby machine includes at least S801 to S803, which are described in detail as follows:
[0206] S801: If it is detected that the standby machine has switched to the master working mode, a data packet to be transmitted between the standby machine and the standby machine is obtained.
[0207] In the embodiment of the present application, the network element device can detect the working mode of the standby machine, and if it is detected that the standby machine has switched to the master working mode, the data packet to be transmitted between the standby machine and the network element device can be obtained.
[0208] It can be understood that the data packets obtained by the network element device and to be transmitted between the standby machine include the data packets to be received (i.e., the data packets to be sent by the standby machine in the aforementioned embodiment) or the data packets to be sent (i.e., the data packets to be received by the standby machine in the aforementioned embodiment).
[0209] S802: Send a data packet to the standby machine, so that the standby machine obtains transmission instruction information of the network element device for the data packet based on the data packet, and determines the data packet to be transmitted based on the transmission instruction information.
[0210] In the embodiment of the present application, the network element device obtains a data packet to be transmitted between the network element device and the backup device, and then can send the data packet to the backup device. Correspondingly, the backup device receives the data packet sent by the network element device, and then obtains the transmission instruction information of the network element device for the data packet based on the received data packet, and determines the data packet to be transmitted based on the transmission instruction information. The processing process on the backup device side is described in the previous embodiment and will not be repeated here.
[0211] S803: Receive the data packet sent by the standby machine.
[0212] In the embodiment of the present application, the backup machine determines the data packet to be transmitted based on the transmission indication information, and then can send the determined data packet to be transmitted to the network element device; accordingly, the network element device receives the data packet sent by the backup machine.
[0213] In the embodiment of the present application, the network device sends the data packet to be transmitted between the network device and the standby machine to the standby machine. As a result, the standby machine can quickly and easily determine the transmission instruction information of the network element device for the data packet based on the data packet, providing strong support for the subsequent synchronization adjustment of the network protocol stack state of the standby machine and the network protocol stack state of the host, maintaining the consistency of the network protocol stack state of the standby machine and the network protocol stack state of the host, allowing data packet transmission between the standby machine and the network element device, improving the rationality of the data packet transmission control of the master and standby machines, and ensuring the normal processing of the business after the master and standby machines switch.
[0214] The following is a detailed description of a specific scenario in an embodiment of the present application:
[0215] Please refer to Figure 9, which mainly includes a base station, an SCTP proxy gateway, and an AMF (Authentication Management Function) service; wherein:
[0216] The base station includes a network element device, which corresponds to the external network element device in the aforementioned embodiment.
[0217] The SCTP proxy gateway adopts a 1+1 master-slave solution, including a master machine and a backup machine.
[0218] The AMF service includes a load balancer and multiple AMF instances. Figure 9 shows three AMF instances. For example, AMF can be deployed in the cloud. It is understood that the functions of AMF mainly include:
[0219] 1) Terminate the N2 interface of the base station control plane and implement the encoding and decoding of NGAP (Protocol for NG Interface) messages based on the SCTP protocol stack;
[0220] 2) Terminate the UE's N1 interface and implement encryption and integrity protection of NAS messages;
[0221] 3) Responsible for UE access authentication, authorization management, registration, connection, reachability and mobility management functions;
[0222] 4) Responsible for the transparent transmission of session management messages between UE and SMF (Session Management Function).
[0223] Among them, the base station and AMF can transmit NGAP messages through the SCTP transport layer protocol stack, and carry the UE's NAS (Non-Access Stratum) message in the NGAP message. In order to support the deployment of the 5G core network in the cloud, an SCTP proxy gateway is added to the AMF front end in this embodiment of the application, so that the SCTP connection can be converted into a gRPC (Google Remote Procedure Call) connection, HTTP / 2 connection or MQ (Message Queue), so that the AMF can be deployed more flexibly and get rid of dependence on cloud service providers.
[0224] Based on the implementation environment shown in FIG9 , the synchronous update process of the network protocol stack status of the standby machine is first introduced.
[0225] Please refer to Figure 10, which is a flow chart of a method for controlling data packet transmission based on a master-slave machine according to an embodiment of the present application. As shown in Figure 10, the method for controlling data packet transmission based on a master-slave machine includes at least S1001 to S1005, which are described in detail as follows:
[0226] S1001, the host sends an SCTP message to the base station.
[0227] S1002: The base station sends an SCTP message response to the SCTP message to the host.
[0228] S1003: The host updates the SCTP protocol stack status of the host.
[0229] S1004: The host generates a synchronization request, wherein the synchronization request carries the updated SCTP protocol stack information of the host.
[0230] S1005, the standby machine adopts a non-confirmation response mechanism to synchronously update the SCTP protocol stack status of the standby machine based on the updated SCTP protocol stack information; wherein the non-confirmation response mechanism is used to indicate that the standby machine does not need to send a synchronization update result to the master machine after the synchronization update is completed.
[0231] It can be understood that S1001 to S1005 shown in FIG10 are a synchronous update process of the SCTP protocol stack state of a single standby machine. The synchronous update process is usually a multiple-cycle process. In actual applications, it can be flexibly adjusted according to specific application scenarios.
[0232] It should be noted that, for the detailed description of S1001 to S1005 shown in FIG10 , please refer to the aforementioned embodiment, which will not be repeated here.
[0233] In the embodiment of the present application, the standby machine adopts an unconfirmed response mechanism to synchronously update the SCTP protocol stack state of the standby machine, which saves a certain amount of response resources and improves the efficiency of synchronous updating of the SCTP protocol stack state of the standby machine.
[0234] Based on the implementation environment shown in FIG9 , the following describes the data packet transmission process between the standby machine and the network element device when the SCTP protocol stack state of the standby machine is completely synchronized with the SCTP protocol stack state of the master machine.
[0235] Please refer to Figure 11, which is a flow chart of a method for controlling data packet transmission based on a master-slave machine according to an embodiment of the present application. As shown in Figure 11, the method for controlling data packet transmission based on a master-slave machine includes at least S1101 to S1107, which are described in detail as follows:
[0236] S1101, host failure.
[0237] S1102: The standby machine switches from the standby working mode to the master working mode.
[0238] S1103: The standby machine determines a data packet to be transmitted based on the synchronously updated SCTP protocol stack state of the standby machine.
[0239] Exemplarily, the number of packets sent contained in the SCTP protocol stack state of the backup machine is synchronized with the number of packets sent contained in the SCTP protocol stack state of the master machine. For example, the number of packets sent is M, which means that the Mth data packet has been sent.
[0240] Exemplarily, the number of received packets contained in the SCTP protocol stack state of the backup machine is synchronized with the number of received packets contained in the SCTP protocol stack state of the master machine. For example, the number of received packets is N, which means that the Nth data packet has been received.
[0241] S1104: The standby device sends an SCTP message to the base station, where the SCTP message is for the M+1th data packet.
[0242] S1105: The base station sends an SCTP message response to the SCTP message to the standby machine, where the SCTP message response is for the M+2th data packet.
[0243] S1106: The base station sends an SCTP message to the backup machine, where the SCTP message is for the (N+1)th data packet.
[0244] S1107 , the standby device sends an SCTP message response to the SCTP message to the base station, where the SCTP message response is for the N+2th data packet.
[0245] It is understandable that S1104 to S1105 and S1106 to S1107 shown in FIG11 can be executed first or later, and in actual applications, they can be flexibly adjusted according to specific application scenarios.
[0246] It should be noted that, for the detailed description of S1101 to S1107 shown in FIG11 , please refer to the aforementioned embodiment, which will not be repeated here.
[0247] In the embodiment of the present application, when the SCTP protocol stack state of the backup machine is completely synchronized with the SCTP protocol stack state of the host machine, data packets can be transmitted between the backup machine and the network element device.
[0248] Based on the implementation environment shown in FIG9 , the data packet transmission process between the standby machine and the network element device is introduced again when the SCTP protocol stack state of the standby machine is not completely synchronized with the SCTP protocol stack state of the master machine.
[0249] Please refer to Figure 12, which is a flow chart of a method for controlling data packet transmission based on a master-slave machine according to an embodiment of the present application. As shown in Figure 12, the method for controlling data packet transmission based on a master-slave machine includes at least S1201 to S1207, which are described in detail as follows:
[0250] S1201, host failure.
[0251] S1202: The standby machine switches from the standby working mode to the master working mode.
[0252] S1203: The standby machine determines a data packet to be sent based on the synchronously updated SCTP protocol stack state of the standby machine.
[0253] Exemplarily, the number of packets sent contained in the SCTP protocol stack state of the backup machine is not completely synchronized with the number of packets sent contained in the SCTP protocol stack state of the host machine. For example, the number of packets sent contained in the SCTP protocol stack state of the backup machine is MY, that is, the MYth data packet has been sent, while the number of packets sent contained in the SCTP protocol stack state of the actual host machine is M, that is, the Mth data packet has been sent.
[0254] It can be understood that the standby machine determines that the data packet to be sent is the M-Y+1th data packet based on the synchronously updated SCTP protocol stack state of the standby machine.
[0255] S1204: The standby device sends an SCTP message to the base station, where the SCTP message is for the M-Y+1th data packet.
[0256] S1205: The base station sends an SCTP message response to the SCTP message to the standby machine, where the SCTP message response is for the M+1th data packet.
[0257] It can be understood that the SCTP message response is the packet sending indication information in the aforementioned embodiment, that is, the packet sending indication information is used to instruct the standby machine to send the M+1th data packet to the base station.
[0258] S1206, the standby machine adjusts the number of packets sent contained in the standby machine's SCTP protocol stack state to be synchronized with the number of packets sent contained in the master machine's SCTP protocol stack state based on the data packet information, and sends an SCTP message to the standby machine, where the SCTP message is for the M+1th data packet.
[0259] It can be understood that the backup machine adjusts the number of packets contained in the backup machine's SCTP protocol stack state based on the data packet information to synchronize with the number of packets contained in the host machine's SCTP protocol stack state, that is, the number of packets sent is M, that is, the Mth data packet has been sent, and now the M+1th data packet needs to be sent to the backup machine.
[0260] S1207: The base station sends an SCTP message response to the SCTP message to the standby machine, where the SCTP message response is for the M+2th data packet.
[0261] It should be noted that, for the detailed description of S1201 to S1207 shown in FIG12 , please refer to the aforementioned embodiment and will not be repeated here.
[0262] In an embodiment of the present application, when the number of packets contained in the SCTP protocol stack state of the standby machine is not completely synchronized with the number of packets contained in the SCTP protocol stack state of the host machine, the standby machine maintains the consistency of the number of packets contained in the SCTP protocol stack state of the standby machine with the number of packets contained in the SCTP protocol stack state of the host machine through packet indication information, so that data packets can be transmitted between the standby machine and the network element device, thereby improving the rationality of the data packet transmission control of the master and standby machines and ensuring the normal processing of the business after the master and standby machines switch.
[0263] Please refer to Figure 13, which is a flow chart of a method for controlling data packet transmission based on a master-slave machine according to an embodiment of the present application. As shown in Figure 13, the method for controlling data packet transmission based on a master-slave machine includes at least S1301 to S1307, which are described in detail as follows:
[0264] S1301, host failure.
[0265] S1302: The standby machine switches from the standby working mode to the master working mode.
[0266] S1303: The standby machine determines a data packet to be received based on the synchronously updated SCTP protocol stack state of the standby machine.
[0267] For example, the number of received packets contained in the SCTP protocol stack status of the standby machine is not completely synchronized with the number of received packets contained in the SCTP protocol stack status of the host machine. For example, the number of received packets contained in the SCTP protocol stack status of the standby machine is NX, which means that the NXth data packet has been received, while the number of received packets contained in the SCTP protocol stack status of the actual host machine is N, which means that the Nth data packet has been received.
[0268] It can be understood that the standby machine determines that the data packet to be received is the N-X+1th data packet based on the synchronously updated SCTP protocol stack state of the standby machine.
[0269] S1304: The base station sends an SCTP message to the backup machine, where the SCTP message is for the (N+1)th data packet.
[0270] It can be understood that the SCTP message is the packet receiving indication information in the aforementioned embodiment, that is, the packet receiving indication information is used to instruct the standby machine to receive the N+1th data packet sent by the base station.
[0271] S1305, the standby machine adjusts the number of received packets contained in the SCTP protocol stack state of the standby machine based on the data packet information to be synchronized with the number of received packets contained in the SCTP protocol stack state of the host machine, and sends an SCTP message response to the SCTP message to the base station, where the SCTP message response is for the N+2th data packet.
[0272] It can be understood that the backup machine adjusts the number of received packets contained in the backup machine's SCTP protocol stack state based on the data packet information to be synchronized with the number of received packets contained in the host machine's SCTP protocol stack state, that is, the number of received packets is N, that is, the Nth data packet has been received, and since the N+1th data packet sent by the network element device has been received, it is necessary to update the number of received packets contained in the backup machine's SCTP protocol stack state again, that is, the number of received packets is N+1.
[0273] S1306: The base station sends an SCTP message to the backup machine, where the SCTP message is for the N+2th data packet.
[0274] S1307: The standby device sends an SCTP message response to the SCTP message to the base station, where the SCTP message response is for the N+3th data packet.
[0275] It should be noted that, for the detailed description of S1301 to S1307 shown in FIG13 , please refer to the aforementioned embodiment and will not be repeated here.
[0276] In an embodiment of the present application, when the number of received packets contained in the SCTP protocol stack state of the standby machine is not completely synchronized with the number of received packets contained in the SCTP protocol stack state of the host machine, the standby machine maintains the consistency of the number of received packets contained in the SCTP protocol stack state of the standby machine with the number of received packets contained in the SCTP protocol stack state of the host machine through packet reception indication information, so that data packets can be transmitted between the standby machine and the network element device, thereby improving the rationality of the data packet transmission control of the master and standby machines and ensuring the normal processing of the business after the master and standby machines switch.
[0277] FIG14 is a block diagram of a data packet transmission control device based on a master / standby machine according to an embodiment of the present application. As shown in FIG14 , the data packet transmission control device based on a master / standby machine includes:
[0278] The acquisition module 1401 is configured to obtain transmission instruction information of a network element device for a data packet after the standby machine switches from the standby machine working mode to the master machine working mode; wherein the transmission instruction information is used to indicate data packet information of the data packet to be transmitted between the standby machine and the network element device;
[0279] An adjustment module 1402 is configured to adjust the network protocol stack state of the backup machine to be synchronized with the network protocol stack state of the master machine based on the data packet information;
[0280] The transmission module 1403 is configured to perform data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine.
[0281] In one embodiment of the present application, the data packet information includes target identification information, and the network protocol stack status of the standby machine includes information corresponding to the number of data packets transmitted between the host and the network element device; the adjustment module 1402 is specifically configured as follows:
[0282] Determining transmission identification information of the transmitted data packet based on the target identification information;
[0283] The quantity information is adjusted to quantity information that matches the transmission identification information, so that the network protocol stack state of the standby machine is synchronized with the network protocol stack state of the master machine.
[0284] In one embodiment of the present application, the transmission indication information includes packet sending indication information for indicating target identification information corresponding to a data packet to be sent by the standby machine, the target identification information includes first identification information, and the quantity information is used to represent the number of packets corresponding to the data packet sent by the host to the network element device; the adjustment module 1402 is further specifically configured to:
[0285] Using the previous identification information adjacent to the target identification information as the sending identification information of the sent data packet;
[0286] The number of packets sent is adjusted to a number of packets sent that matches the sending identification information.
[0287] In one embodiment of the present application, the transmission indication information includes packet receiving indication information for indicating target identification information corresponding to a data packet that the standby machine should receive, the target identification information includes second identification information, and the quantity information is used to indicate the number of received packets corresponding to the data packet sent by the network element device that the host has received; the adjustment module 1402 is further specifically configured to:
[0288] Using the previous identification information adjacent to the target identification information as the receiving identification information of the received data packet;
[0289] The number of received packets is adjusted to a number of received packets that matches the receiving identification information.
[0290] In one embodiment of the present application, the data packet information includes target identification information, and the network protocol stack status of the standby machine includes information corresponding to the number of data packets transmitted between the host and the network element device; the adjustment module 1402 is specifically configured as follows:
[0291] Based on the relationship between the target identification information and the quantity information, detecting the synchronization status of the network protocol stack state of the standby machine and the network protocol stack state of the master machine;
[0292] If the synchronization condition indicates that the network protocol stack state of the standby machine is not completely synchronized with the network protocol stack state of the master machine, the network protocol stack state of the standby machine is adjusted to be synchronized with the network protocol stack state of the master machine based on the target identification information.
[0293] In one embodiment of the present application, the adjustment module 1402 is further specifically configured to:
[0294] Determine third identification information corresponding to the data packet to be transmitted based on the quantity information;
[0295] If the target identification information does not match the third identification information, a detection result is obtained that indicates that the network protocol stack state of the standby machine is not completely synchronized with the network protocol stack state of the master machine;
[0296] If the target identification information matches the third identification information, a detection result is obtained that indicates that the network protocol stack state of the standby machine is completely synchronized with the network protocol stack state of the master machine.
[0297] In one embodiment of the present application, the acquisition module 1401 is specifically configured as follows:
[0298] Receiving a data packet sent by the network element device;
[0299] The transmission instruction information of the network element device for the data packet is determined based on the received data packet.
[0300] In one embodiment of the present application, the acquisition module 1401 is further specifically configured to:
[0301] Sending a data packet with specified identification information to the network element device based on the network protocol stack status of the standby machine;
[0302] receiving a data packet fed back by the network element device based on the data packet of the specified identification information;
[0303] Determining packet sending instruction information of the standby machine for the data packet based on the data packet information corresponding to the received data packet; wherein the packet sending instruction information is data packet information for indicating the data packet that the standby machine should send;
[0304] The packet sending indication information is used as the transmission indication information.
[0305] In one embodiment of the present application, the acquisition module 1401 is further specifically configured to:
[0306] Determining third identification information corresponding to the data packet to be sent based on the number of sent packets contained in the network protocol stack state of the standby machine, and using the determined third identification information as the designated identification information;
[0307] Send a data packet containing designated identification information to the network element device.
[0308] In one embodiment of the present application, the acquisition module 1401 is further specifically configured to:
[0309] Determining packet receiving instruction information of the standby machine for the data packet based on the data packet information corresponding to the received data packet; wherein the packet receiving instruction information is data packet information for indicating the data packet that the standby machine should receive;
[0310] The packet receiving indication information is used as the transmission indication information.
[0311] In one embodiment of the present application, the data packet transmission control device based on the master and standby machines further includes:
[0312] a receiving module configured to receive a synchronization request sent by the host; wherein the synchronization request is generated by the host after updating the network protocol stack status of the host, and the synchronization request carries the updated network protocol stack information of the host;
[0313] The synchronous updating module is configured to synchronously update the network protocol stack status of the standby machine based on the updated network protocol stack information.
[0314] In one embodiment of the present application, the synchronization update module is specifically configured as follows:
[0315] A non-confirmation response mechanism is used to synchronously update the network protocol stack status of the standby machine based on the updated network protocol stack information; wherein, the non-confirmation response mechanism is used to indicate that the standby machine does not need to send a synchronization update result to the host after the synchronization update is completed.
[0316] In one embodiment of the present application, the synchronization update module is specifically configured as follows:
[0317] If the updated network protocol stack information is for the case where the host sends data packets to the network element device, the number of packets contained in the network protocol stack status of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of packets contained in the network protocol stack status of the standby machine is synchronized with the number of packets contained in the network protocol stack status of the host.
[0318] In one embodiment of the present application, the synchronization update module is specifically configured as follows:
[0319] If the updated network protocol stack information is for the case where the host receives data packets sent by the network element device, the number of received packets contained in the network protocol stack status of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of received packets contained in the network protocol stack status of the standby machine is synchronized with the number of received packets contained in the network protocol stack status of the host.
[0320] In one embodiment of the present application, the network element device includes at least one of a separately provided network element device and a network element device provided in a base station; the transmission module 1403 is specifically configured as follows:
[0321] Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for the stream transmission control protocol is performed between the standby machine and the network element device.
[0322] In one embodiment of the present application, the network element device includes at least one of a separately provided network element device and a network element device provided in a base station; the transmission module 1403 is specifically configured as follows:
[0323] Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for the transmission control protocol is performed between the standby machine and the network element device.
[0324] In one embodiment of the present application, the network element device includes at least one of a separately provided network element device and a network element device provided in a base station; the transmission module 1403 is specifically configured as follows:
[0325] Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for the User Datagram Protocol is performed between the standby machine and the network element device.
[0326] FIG15 is a block diagram of a data packet transmission control device based on a master / standby machine according to an embodiment of the present application. As shown in FIG15 , the data packet transmission control device based on a master / standby machine includes:
[0327] The acquisition module 1501 is configured to acquire data packets to be transmitted between the standby machine and the standby machine upon detecting that the standby machine has switched to the master working mode;
[0328] The sending module 1502 is configured to send the data packet to the standby machine, so that the standby machine obtains transmission instruction information of the network element device for the data packet based on the data packet, and determines the data packet to be transmitted based on the transmission instruction information;
[0329] The receiving module 1503 is configured to receive the data packet sent by the backup machine.
[0330] It should be noted that the apparatus provided in the aforementioned embodiment and the method provided in the aforementioned embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment.
[0331] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, which, when executed by one or more processors, enables the electronic device to implement the above-mentioned master-slave machine-based data packet transmission control method.
[0332] FIG16 is a schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
[0333] It should be noted that the computer system 1600 of the electronic device shown in FIG16 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
[0334] As shown in Figure 16, computer system 1600 includes a central processing unit (CPU) 1601, which can perform various appropriate actions and processes according to the program stored in read-only memory (ROM) 1602 or the program loaded from storage unit 1608 into random access memory (RAM) 1603, such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in RAM 1603. CPU 1601, ROM 1602 and RAM 1603 are connected to each other via bus 1604. Input / output (I / O) interface 1605 is also connected to bus 1604.
[0335] The following components are connected to the I / O interface 1605: an input section 1606 including a keyboard, a mouse, and the like; an output section 1607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1608 including a hard disk; and a communication section 1609 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1609 performs communication processing via a network such as the Internet. A drive 1610 is also connected to the I / O interface 1605 as needed. Removable media 1611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1610 as needed, so that computer programs read from the removable media can be installed in the storage section 1608 as needed.
[0336] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1609, and / or installed from a removable medium 1611. When the computer program is executed by the central processing unit (CPU) 1601, the various functions defined in the system of the present application are executed.
[0337] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0338] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0339] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.
[0340] Another aspect of the present application provides a computer-readable medium having a computer program stored thereon. When executed by a processor, the computer program implements the aforementioned method for controlling data packet transmission based on a master / standby machine. The computer-readable medium may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device.
[0341] Another aspect of the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable medium. A processor of a computer device reads the computer instructions from the computer-readable medium and executes the computer instructions, causing the computer device to perform the data packet transmission control method based on the master and backup machines provided in each of the above embodiments.
[0342] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. Ordinary technicians in this field can easily make corresponding changes or modifications based on the main ideas and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A data packet transmission control method based on a master-slave machine, characterized in that: include: After the standby machine switches from the standby working mode to the host working mode, obtaining transmission instruction information of the network element device for the data packet; wherein the transmission instruction information is used to indicate the data packet information of the data packet to be transmitted between the standby machine and the network element device; Adjusting the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine based on the data packet information; Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing is performed between the standby machine and the network element device.
2. The method according to claim 1, characterized in that The data packet information includes target identification information, and the network protocol stack status of the standby machine includes quantity information corresponding to data packets transmitted between the host and the network element device; The step of adjusting the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine based on the data packet information includes: Determine the transmission identification information of the transmitted data packet based on the target identification information; The quantity information is adjusted to quantity information matching the transmission identification information, so that the network protocol stack state of the standby machine is synchronized with the network protocol stack state of the host machine.
3. The method according to claim 2, characterized in that The transmission indication information includes packet sending indication information for indicating target identification information corresponding to the data packet to be sent by the standby machine, the target identification information includes first identification information, and the quantity information is used to represent the number of packets corresponding to the data packet sent by the host to the network element device; The determining the transmission identification information of the transmitted data packet based on the target identification information includes: Using the previous identification information adjacent to the target identification information as the sending identification information of the sent data packet; The adjusting the quantity information to quantity information matching the transmission identification information includes: The number of packets sent is adjusted to a number of packets sent that matches the sending identification information.
4. The method according to claim 2, characterized in that: The transmission indication information includes packet receiving indication information for indicating target identification information corresponding to the data packet that the standby machine should receive, the target identification information includes second identification information, and the quantity information is used to indicate the number of received packets corresponding to the data packet sent by the network element device that the host has received; The determining the transmission identification information of the transmitted data packet based on the target identification information includes: Using the previous identification information adjacent to the target identification information as the receiving identification information of the received data packet; The adjusting the quantity information to quantity information matching the transmission identification information includes: The number of received packets is adjusted to a number of received packets that matches the receiving identification information.
5. The method according to claim 1, characterized in that The data packet information includes target identification information, and the network protocol stack status of the standby machine includes quantity information corresponding to data packets transmitted between the host and the network element device; The step of adjusting the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine based on the data packet information includes: Based on the relationship between the target identification information and the quantity information, detecting the synchronization status of the network protocol stack state of the standby machine and the network protocol stack state of the host machine; If the synchronization condition indicates that the network protocol stack state of the standby machine is not completely synchronized with the network protocol stack state of the host machine, the network protocol stack state of the standby machine is adjusted to be synchronized with the network protocol stack state of the host machine based on the target identification information.
6. The method according to claim 5, characterized in that The detecting, based on the relationship between the target identification information and the quantity information, the synchronization status of the network protocol stack state of the standby machine and the network protocol stack state of the host machine includes: Determine third identification information corresponding to the data packet to be transmitted based on the quantity information; If the target identification information does not match the third identification information, a detection result is obtained for indicating that the network protocol stack state of the standby machine is not completely synchronized with the network protocol stack state of the host machine; If the target identification information matches the third identification information, a detection result is obtained that indicates that the network protocol stack state of the standby machine is completely synchronized with the network protocol stack state of the host machine.
7. The method according to claim 1, characterized in that The obtaining of transmission instruction information of the network element device for the data packet includes: Receiving a data packet sent by the network element device; The transmission indication information of the network element device for the data packet is determined based on the received data packet.
8. The method according to claim 7, characterized in that The receiving a data packet sent by the network element device includes: Sending a data packet with designated identification information to the network element device based on the network protocol stack status of the standby machine; receiving a data packet fed back by the network element device based on the data packet of the specified identification information; The determining, based on the received data packet, transmission indication information of the network element device for the data packet includes: Based on the data packet information corresponding to the received data packet, determining the packet sending indication information of the standby machine for the data packet; wherein the packet sending indication information is the data packet information used to indicate the data packet that the standby machine should send; The packet sending indication information is used as the transmission indication information.
9. The method according to claim 8, characterized in that The sending a data packet with designated identification information to the network element device based on the network protocol stack state of the standby machine includes: Determine the third identification information corresponding to the data packet to be sent based on the number of packets sent contained in the network protocol stack state of the standby machine, and use the determined third identification information as the designated identification information; Send a data packet with designated identification information to the network element device.
10. The method according to claim 7, characterized in that The determining, based on the received data packet, transmission indication information of the network element device for the data packet includes: Based on the data packet information corresponding to the received data packet, determining the packet receiving indication information of the standby machine for the data packet; wherein the packet receiving indication information is the data packet information used to indicate the data packet that the standby machine should receive; The packet receiving indication information is used as the transmission indication information.
11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: Receiving a synchronization request sent by the host; wherein the synchronization request is generated after the host updates the network protocol stack status of the host, and the synchronization request carries the updated network protocol stack information of the host; Based on the updated network protocol stack information, the network protocol stack status of the standby machine is synchronously updated.
12. The method according to claim 11, characterized in that The synchronously updating the network protocol stack status of the standby machine based on the updated network protocol stack information includes: The network protocol stack status of the standby machine is synchronously updated based on the updated network protocol stack information by using a non-confirmation response mechanism; wherein the non-confirmation response mechanism is used to indicate that after the synchronous update of the standby machine is completed, there is no need to send the synchronous update result to the host.
13. The method according to claim 11, characterized in that The synchronously updating the network protocol stack status of the standby machine based on the updated network protocol stack information includes: If the updated network protocol stack information is for the situation where the host sends data packets to the network element device, the number of packets contained in the network protocol stack state of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of packets contained in the network protocol stack state of the standby machine is synchronized with the number of packets contained in the network protocol stack state of the host.
14. The method according to claim 11, characterized in that The synchronously updating the network protocol stack status of the standby machine based on the updated network protocol stack information includes: If the updated network protocol stack information is for the situation where the host receives data packets sent by the network element device, the number of received packets contained in the network protocol stack state of the standby machine is synchronously updated based on the updated network protocol stack information, so that the number of received packets contained in the network protocol stack state of the standby machine is synchronized with the number of received packets contained in the network protocol stack state of the host.
15. The method according to any one of claims 1 to 10, characterized in that The network element device includes at least one of a separately arranged network element device and a network element device arranged in a base station; The performing data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine includes: Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for a stream transmission control protocol is performed between the standby machine and the network element device.
16. The method according to any one of claims 1 to 10, characterized in that The network element device includes at least one of a separately arranged network element device and a network element device arranged in a base station; The performing data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine includes: Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for the transmission control protocol is performed between the standby machine and the network element device.
17. The method according to any one of claims 1 to 10, characterized in that The network element device includes at least one of a separately arranged network element device and a network element device arranged in a base station; The performing data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine includes: Based on the adjusted network protocol stack state of the standby machine, data packet transmission processing for the User Datagram Protocol is performed between the standby machine and the network element device.
18. A data packet transmission control device based on a master and a standby machine, characterized in that: include: An acquisition module, configured to acquire transmission indication information of a network element device for a data packet after the standby machine switches from a standby machine working mode to a host machine working mode; wherein the transmission indication information is used to indicate data packet information of a data packet to be transmitted between the standby machine and the network element device; an adjustment module, configured to adjust the network protocol stack state of the standby machine to be synchronized with the network protocol stack state of the host machine based on the data packet information; The transmission processing is configured to perform data packet transmission processing between the standby machine and the network element device based on the adjusted network protocol stack state of the standby machine.
19. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs, which, when executed by the electronic device, enables the electronic device to implement the data packet transmission control method based on the master-slave machine as described in any one of claims 1 to 17.
20. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for controlling data packet transmission based on a master-slave machine according to any one of claims 1 to 17 is implemented.
21. A computer program product, characterized in that It includes computer instructions, which, when executed by a processor, implement the data packet transmission control method based on a master-slave machine as described in any one of claims 1 to 17.
