CN116760504A - Session synchronization method, device, service node, terminal and readable storage medium - Google Patents

Session synchronization method, device, service node, terminal and readable storage medium Download PDF

Info

Publication number
CN116760504A
CN116760504A CN202311028250.1A CN202311028250A CN116760504A CN 116760504 A CN116760504 A CN 116760504A CN 202311028250 A CN202311028250 A CN 202311028250A CN 116760504 A CN116760504 A CN 116760504A
Authority
CN
China
Prior art keywords
core
session
core set
rate
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311028250.1A
Other languages
Chinese (zh)
Other versions
CN116760504B (en
Inventor
蒋贤强
谭跃辉
陆俊华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202311028250.1A priority Critical patent/CN116760504B/en
Publication of CN116760504A publication Critical patent/CN116760504A/en
Application granted granted Critical
Publication of CN116760504B publication Critical patent/CN116760504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0676Mutual
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/062Synchronisation of signals having the same nominal but fluctuating bit rates, e.g. using buffers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0685Clock or time synchronisation in a node; Intranode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a session synchronization method, a session synchronization device, a service node, a terminal and a readable storage medium. The method comprises the following steps: after receiving a session request message sent by a second node, storing abstract information of session data corresponding to at least one session request message in a first message queue; transmitting the summary information to a second core in the second core set; and under the condition that the quantity of the summary information in the first message queue is larger than a preset value, transmitting the summary information to a third node through a second core. According to the session synchronization method, the session is newly established through the cores in the first core set, the session is synchronized through the cores in the second core set, and the session newly established cores and the session synchronization cores in the same node are in a mutually isolated state. The scheme of the invention solves the problem that session synchronization failure is easily caused by sharing the CPU core by the session synchronization process and other processes in the same SP node, thereby influencing the integrity of session synchronization between the SP master node and the standby node.

Description

Session synchronization method, device, service node, terminal and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a session synchronization method, a session synchronization device, a service node, a terminal, and a readable storage medium.
Background
The session synchronization channels between the primary and backup nodes of the Slow Path (SP) network element at the present stage are usually multiplexed with the kernel network protocol stack. As shown in fig. 1, after receiving a message sent by a Fast Path (FP) node, an SP master node creates a corresponding session according to a network element configuration; the SP master node returns session information to the FP node and synchronizes the session information to the SP standby node. The session synchronization process and other processes (such as a session new process) in the same SP node share the CPU core, so that loss in process scheduling is caused, session synchronization failure is easy to cause, the integrity of session synchronization between the SP main node and the standby node is affected, the performance of the SP node is poor, and the overall performance and reliability of the network element are affected.
Disclosure of Invention
The invention aims to provide a session synchronization method, a session synchronization device, a service node, a terminal and a readable storage medium, which are used for solving the problem that session synchronization failure is easily caused by sharing a CPU core by a session synchronization process and other processes in the same SP node in the prior art, so that the integrity of session synchronization between an SP main node and a standby node is affected.
To achieve the above object, an embodiment of the present invention provides a session synchronization method, which is applied to a first node, including:
after receiving a session request message sent by a second node, storing abstract information of session data corresponding to at least one session request message in a first message queue;
transmitting the summary information to a second core in a second core set;
transmitting, by the second core, the summary information to a third node if the number of the summary information in the first message queue is greater than a preset value;
the method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
Further, the sending the summary information to the third node includes:
transmitting the summary information to a third node through a DPDK (data plane development tool), and storing the summary information in a timer queue; the abstract information carries an authentication serial number;
If the verification serial number fed back by the third node is received within the preset time, deleting the abstract information from the timer queue; and if the verification serial number fed back by the third node is not received within the preset time, the abstract information is sent to the third node again.
Further, the method further comprises:
determining a session new rate corresponding to the first core set and a session synchronization rate corresponding to the second core set;
and adjusting the first core set and the second core set under the condition that the absolute value of the difference value between the new session rate and the session synchronous rate is larger than a preset threshold value.
Further, the adjusting the first core set and the second core set includes:
when the difference value between the first rate and the second rate is larger than a preset threshold value, at least one third core in a first target core set corresponding to the first rate is adjusted to a second target core set corresponding to the second rate;
wherein the third core is a hot standby core in the first core set or the second core set; the first rate is one of a new session rate and a synchronous session rate, and the second rate is the other of the new session rate and the synchronous session rate;
The first target core set is one of a first core set and a second core set, and the second target core set is the other of the first core set and the second core set.
Further, the adjusting at least one third core in the first target core set corresponding to the first rate to the second target core set corresponding to the second rate includes:
sorting all cores in the first target core set according to the first rate;
determining at least one core with the lowest first rate in the first target core set as the third core;
and adjusting the third core to the second target core set, and binding a message queue corresponding to the third core to the core with the lowest first rate in the first target core set.
To achieve the above object, an embodiment of the present invention provides a session synchronization method, which is applied to a third node, including:
receiving abstract information of a session to be synchronized, which is sent by a first node, through a fourth core in a fourth core set;
storing the summary information in a second message queue;
transmitting at least one piece of summary information to a fifth core in a fifth core set through the second message queue;
The fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
Further, the receiving the summary information of the session to be synchronized sent by the first node includes:
after receiving the summary information through a data plane development tool DPDK, sending a verification sequence number to the first node;
wherein the verification serial number is carried in the summary information.
Further, the method further comprises:
determining a session synchronization rate corresponding to the fourth core set and a session new rate corresponding to the fifth core set;
and adjusting the fourth core set and the fifth core set under the condition that the absolute value of the difference value between the session synchronous rate and the session newly-built rate is larger than a preset threshold value.
Further, the adjusting the fourth core set and the fifth core set includes:
when the difference value between the third rate and the fourth rate is larger than a preset threshold value, at least one sixth core in a third target core set corresponding to the third rate is adjusted to a fourth target core set corresponding to the fourth rate;
The sixth core is a hot standby core in the fourth core set or the fifth core set; the third rate is one of a new session rate and a synchronous session rate, and the fourth rate is the other of the new session rate and the synchronous session rate;
the third target core set is one of a fourth core set and a fifth core set, the fourth target core set being the other of the fourth core set and the fifth core set.
Further, the adjusting at least one sixth core in the third target core set corresponding to the third rate to the fourth target core set corresponding to the fourth rate includes:
sorting all cores in the third target core set according to the third rate;
determining at least one core of the third target core set with the lowest third speed as the sixth core;
and adjusting the sixth core to the fourth target core set, and binding a message queue corresponding to the sixth core to the core with the lowest third speed in the third target core set.
To achieve the above object, an embodiment of the present invention provides a session synchronization device, which is applied to a first node, including:
The first storage module is used for storing abstract information of session data corresponding to at least one session request message in a first message queue after receiving the session request message sent by the second node;
the first sending module is used for sending the abstract information to a second core in a second core set;
a second sending module, configured to send, by using the second core, the summary information to a third node when the number of the summary information in the first message queue is greater than a preset value;
the method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
To achieve the above object, an embodiment of the present invention provides a session synchronization device, which is applied to a third node, including:
the receiving module is used for receiving abstract information of the session to be synchronized, which is sent by the first node, through a fourth core in the fourth core set;
the second storage module is used for storing the abstract information in a second message queue;
A third sending module, configured to send at least one piece of summary information to a fifth core in a fifth core set through the second message queue;
the fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
To achieve the above object, an embodiment of the present invention provides a service node, including: a transceiver and a processor;
the processor is used for storing abstract information of session data corresponding to at least one session request message in a first message queue after receiving the session request message sent by the second node;
the transceiver is configured to send the summary information to a second core in a second set of cores;
transmitting, by the second core, the summary information to a third node if the number of the summary information in the first message queue is greater than a preset value;
the method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
To achieve the above object, an embodiment of the present invention provides a service node, including: a transceiver and a processor;
the transceiver is used for receiving abstract information of the session to be synchronized, which is sent by the first node, through a fourth core in the fourth core set;
the processor is used for storing the abstract information in a second message queue;
the transceiver is further configured to send at least one of the summary information to a fifth core in a fifth core set via the second message queue;
the fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
To achieve the above object, an embodiment of the present invention provides a terminal including a transceiver, a processor, a memory, and a program or instructions stored on the memory and executable on the processor; the processor, when executing the program or instructions, implements the session synchronization method as described above.
To achieve the above object, an embodiment of the present invention provides a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps in the session synchronization method as described above.
The technical scheme of the invention has the following beneficial effects:
according to the session synchronization method, the session is newly established through the cores in the first core set, the session is synchronized through the cores in the second core set, the newly established session cores and the session synchronization cores in the same node are in a mutually isolated state, the mutual logics are not interfered with each other, the loss of process scheduling is avoided, the efficiency of session synchronization between the nodes is improved, and the overall performance of the nodes is improved. The scheme of the invention solves the problem that session synchronization failure is easily caused by sharing the CPU core by the session synchronization process and other processes in the same SP node, thereby influencing the integrity of session synchronization between the SP master node and the standby node.
Drawings
FIG. 1 is a schematic diagram of the steps of session synchronization between SP primary and standby nodes in the prior art;
fig. 2 is a flow chart of a session synchronization method applied to a first node according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an SP primary node and a standby node according to an embodiment of the present invention;
FIG. 4 is a second schematic diagram of an SP primary node and a standby node according to an embodiment of the present invention;
FIG. 5 is a third schematic diagram of an SP primary node and a standby node according to an embodiment of the present invention;
fig. 6 is a flow chart of a session synchronization method applied to a third node according to an embodiment of the present invention;
Fig. 7 is a schematic structural diagram of a session synchronization device according to an embodiment of the present invention;
FIG. 8 is a second schematic diagram of a session synchronization device according to an embodiment of the invention;
FIG. 9 is a schematic diagram of a service node according to an embodiment of the present invention;
FIG. 10 is a second schematic diagram of a service node according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a terminal according to another embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the following detailed description will be given with reference to the accompanying drawings and specific embodiments.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
In addition, the terms "system" and "network" are often used interchangeably herein.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B may be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information.
The special communication network element equipment such as a router, a firewall, a Load Balancer (LB), network address conversion (Network Address Translation, NAT) and the like has the advantages of high reliability and high performance, and meanwhile, the defects of high software and hardware coupling, long development period, incapability of adapting to elastic expansion and contraction in the cloud computing field and the like are brought. Network function virtualization (NFV, network Function Virtualization) is a technology that appears to solve the above-mentioned problems, and by adopting a virtualization technology, the software of the network element function is realized; the generalization of hardware resources is realized by supporting deployment on a general X86 server. And the constraint of insufficient flexibility of the traditional communication network element equipment is eliminated.
VNF refers to a technology for implementing a specific network element function through software in a virtualized environment, and is a specific network element implementation after NFV. One implementation manner of the network element at present is to adopt a framework of isolation between a forwarding layer and a session layer, wherein the forwarding layer is specially responsible for forwarding a message, and the session layer is specially responsible for new construction and synchronization of a session, so that the forwarding layer is also called Fast Path (FP) and the session layer is also called Slow Path (SP). Generally, to facilitate lateral expansion of bandwidth, FP adopts clustered deployment; in order to improve the reliability of the network element, the SP adopts main and standby deployment.
As shown in fig. 2, a session synchronization method according to an embodiment of the present invention is applied to a first node, and includes the following steps:
step 201, after receiving a session request message sent by a second node, storing abstract information of session data corresponding to at least one session request message in a first message queue;
step 202, sending the abstract information to a second core in a second core set;
step 203, when the number of the summary information in the first message queue is greater than a preset value, sending, by the second core, the summary information to a third node;
the method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
Optionally, the first node is an SP master node, the second node is an FP node, and the third node is an SP standby node.
Optionally, the cores in the first core set are session newly-built cores, and the cores in the second core set are session synchronous cores.
Optionally, the first message queue, the message queue corresponding to the third core, the second message queue and the message queue corresponding to the sixth core are lock-free message queues.
Optionally, sending, by the second core, the summary information to a third node, including:
and sending the abstract information to a fourth core in a fourth core set of the third node through the second core.
Optionally, one or more of the first message queues corresponding to the first core;
one or more second message queues corresponding to the fourth core.
Optionally, one of the first cores receives one or more data packets requested by session messages.
In an embodiment of the present invention, after receiving a session packet request sent by the second node, a network card of the first node receives session data corresponding to the session packet request through a data plane development tool (Data Plane Development Kit, DPDK) by a first core in the first core set, and the first core performs session creation according to the session data;
processing the session data to obtain abstract information of the session data, and storing the abstract information into the first message queue;
Transmitting the summary information to the second core through the first message queue;
and sending the summary information to a fourth core of a third node through the second core under the condition that the quantity of the summary information to be synchronized in the first message queue is larger than a preset value.
Optionally, the processing of the session data may be understood as:
and performing analysis calculation, such as hash calculation, on the session data to obtain the abstract information.
In an embodiment of the present invention, before the first message queue sends the summary information to the second core, the summary information is marked to be synchronized;
after the first message queue sends the summary information into a second core, the summary information is marked as synchronized;
and under the condition that the quantity of summary information to be synchronized in the first message queue is larger than a preset value, the summary information is sent to a third node through the second core.
In an embodiment of the invention, the newly built core and the synchronous core are isolated from the scheduling seed of the operating system through the kernel grub parameter, so that cache pollution caused by scheduling and executing other programs of the two types of cores by the operating system is avoided;
The realization of the lock-free message queue is as follows: the non-lock ring queue rte _ring of the DPDK is used as message transmission of inter-core communication, and the queue is characterized in that the enqueuing and dequeuing operations of the queue are performed under the scene of multiple producers and multiple consumers, so that locking processing is not needed, and loss caused by locking is reduced; in an embodiment of the invention, communication between a conversation newly-built core and a conversation synchronous core meets the scene of multiple producers and multiple consumers, each core creates a lock-free message queue, when the newly-built core transmits data to the synchronous core, HASH calculation is performed according to five-tuple information of the conversation, the lock-free message queue on the corresponding synchronous core is selected according to a calculation result, and summary information is put into the queue; the mode of transferring data from the sync core to the newly built core is the same.
According to the session synchronization method, the session is newly established through the cores in the first core set, the session is synchronized through the cores in the second core set, the newly established session cores and the session synchronization cores in the same node are in a mutually isolated state, the mutual logics are not interfered with each other, the loss of process scheduling is avoided, the efficiency of session synchronization between the nodes is improved, and the overall performance of the nodes is improved. The scheme of the invention solves the problem that session synchronization failure is easily caused by sharing the CPU core by the session synchronization process and other processes in the same SP node, thereby influencing the integrity of session synchronization between the SP master node and the standby node.
Optionally, the sending the summary information to the third node includes:
transmitting the summary information to a third node through a DPDK (data plane development tool), and storing the summary information in a timer queue; the abstract information carries an authentication serial number;
if the verification serial number fed back by the third node is received within the preset time, deleting the abstract information from the timer queue; and if the verification serial number fed back by the third node is not received within the preset time, the abstract information is sent to the third node again.
In an embodiment of the present invention, DPDK may greatly improve data processing performance, throughput, and working efficiency of a data plane application. Compared with the Mode of an Ethernet Driver, the DPDK adopts an optimized Poll Mode Driver (PMD), and when a data packet is received, the network card Driver reloaded by the DPDK can directly store the data packet into a memory and deliver application layer software for direct processing, so that a large amount of CPU interrupt time and memory copy time are saved.
In an embodiment of the present invention, when the first node sends the summary information to the third node, the first core encapsulates the summary information through a user datagram protocol (User Datagram Protocol, UDP), so that complex protocols such as TCP and the like are avoided being implemented in a user mode.
Optionally, as shown in fig. 3, the host of the first node opens two network ports, where the first network port is only used for receiving and transmitting a new session message, and the second network port is only used for receiving and transmitting a session synchronization message;
the first core (session new core) binds a session new processing function through thread affinity;
the second core (session sync core) binds session sync processing functions through thread affinity.
In an embodiment of the present invention, as shown in fig. 4, the session newly-built core and the session synchronization core communicate through the first network port (UDP port), and the session synchronization core communicates through the second network port (UDP port);
the session newly-built processing function of the first core receives data packets from the queue 1 of the first network port A at regular time, recognizes received UDP messages, and performs session newly-built processing; the session newly-built processing function of the first core receives data packets from the queue 2 of the first network port A at regular time, recognizes the received UDP message, performs session newly-built processing, and so on;
each first core (session new core) sends synchronization information (summary information) to the second core (session synchronization core) through a lock-free message queue;
After receiving the synchronization information, the second core sends a session synchronization message to a network port B of the third node through the second network port B;
after the message reaches the network port B of the third node, the session synchronization processing function of the third node can identify the arrival of the message, the fourth core (session synchronization core) checks the port of the message and the type field in the message, if the format specification of the session synchronization message is met, the message is received, the message is sent to the fifth core (session new core) of the third node through a lock-free queue, after the session new core receives the message, a session is created at the third node, and finally the session synchronization between the first node and the third node is realized.
Optionally, the verification sequence number is a 64-bit sequence number.
In an embodiment of the present invention, after the first node sends the summary information to the third node, the timer queue is established, and the summary information is stored in the timer queue;
deleting the summary information in the timer queue after receiving the verification serial number sent by the third node;
and if the first node does not receive the verification sequence number within the preset time, retransmitting the abstract information, deleting the abstract information in the timer queue after the verification sequence number is not received after the first node repeatedly transmits the verification sequence number for preset times, and discarding the abstract information to be transmitted to the third node.
According to the session synchronization method, the verification sequence number is carried in the abstract information, so that a message confirmation mechanism is increased, and the reliability of session message synchronization between the master node and the standby node is improved.
Optionally, the method further comprises:
determining a session new rate corresponding to the first core set and a session synchronization rate corresponding to the second core set;
and adjusting the first core set and the second core set under the condition that the absolute value of the difference value between the new session rate and the session synchronous rate is larger than a preset threshold value.
Optionally, the session establishment rate and the session synchronization rate are calculated by:
wherein, the liquid crystal display device comprises a liquid crystal display device,is T n-1 To T n Average new rate over time period;is T n-1 To T n Average synchronization rate over a period of time;is T n The value of the new counter is established at the moment,is T n The value of the time synchronization counter.
Optionally, the preset threshold is determined by the following method:
wherein, the liquid crystal display device comprises a liquid crystal display device,is the maximum number of buffer memory messages of the lock-free queue corresponding to the session synchronization core cs; ρ is the set water level ratio.
In an embodiment of the present invention, a host of the first node configures CN new session cores, CS session synchronization cores, and CR hot standby cores;
In the process of initializing the first node, binding session new functions by CN session new cores and CR hot standby cores, and respectively collecting session new messages from (CN+CR) network port queues of the first network port A; the CS session synchronization cores bind the session synchronization function and wait for a session synchronization message.
In an embodiment of the present invention, if the difference between the new session rate and the session synchronization rate is greater than a preset threshold, as shown in fig. 5, one or more hot standby cores are adjusted to be session synchronization cores, and specific adjustment steps are as follows:
1) Sequencing all new cores at a new rate;
2) Sequencing all hot standby cores working in a session new mode at a new rate;
3) Selecting a hot standby core with the largest newly built rate (the core number is assumed to be n), and adjusting a new function of an original binding session from a queue n of an original binding network port A to a queue m of a binding network port B (m is the bound queue number +1 of the network port B), so as to bind a session synchronization function;
4) Considering that the queue n of the network port a still has data packets coming in, no corresponding core is used for processing the data packets, and because the core which originally processes the data packets is already adjusted to be the synchronous core, one core with the lowest speed in the newly built core is selected, and the queue n of the binding network port a is increased.
According to the session synchronization method, the number of the cores in the first core set and the second core set is adjusted by monitoring the matching condition of the session new-built rate and the session synchronization rate in real time, so that dynamic expansion and contraction of the session new-built cores are realized.
Optionally, the adjusting the first core set and the second core set includes:
when the difference value between the first rate and the second rate is larger than a preset threshold value, at least one third core in a first target core set corresponding to the first rate is adjusted to a second target core set corresponding to the second rate;
wherein the third core is a hot standby core in the first core set or the second core set; the first rate is one of a new session rate and a synchronous session rate, and the second rate is the other of the new session rate and the synchronous session rate;
the first target core set is one of a first core set and a second core set, and the second target core set is the other of the first core set and the second core set.
According to the session synchronization method, the dynamic expansion and contraction of the new session core and the session synchronization core are realized by switching the sum of the first core set and the second core set, and the efficiency and the reliability of the node are improved.
Optionally, the adjusting at least one third core in the first target core set corresponding to the first rate to the second target core set corresponding to the second rate includes:
sorting all cores in the first target core set according to the first rate;
determining at least one core with the lowest first rate in the first target core set as the third core;
and adjusting the third core to the second target core set, and binding a message queue corresponding to the third core to the core with the lowest first rate in the first target core set.
Optionally, the binding the message queue corresponding to the third core to the core with the lowest first rate in the first target core set may be understood as:
and placing the data in the message queue corresponding to the third core to the core with the lowest first rate in the first target core set for processing.
In an embodiment of the present invention, when a difference between the session new rate and the session synchronization rate is greater than a preset threshold, at least one third core in the first core set is adjusted to the second core set;
specifically, the first cores are ordered according to the session new rate;
At least one third core with the lowest session creation rate in the first core is adjusted to be the second core;
and binding the message queue corresponding to the third core to the core with the lowest session new rate in the first core set.
In an embodiment of the present invention, when a difference between the session synchronization rate and the session new rate is greater than a preset threshold, at least one third core in the second core set is adjusted to the first core set;
specifically, ordering the second cores according to the session synchronization rate;
adjusting at least one third core with the lowest session synchronization rate in the second core to be the first core;
and binding the message queue corresponding to the third core to the core with the lowest session new-establishment rate in the second core set.
As shown in fig. 6, a session synchronization method according to an embodiment of the present invention is applied to a third node, and includes the following steps:
step 601, receiving summary information of a session to be synchronized, which is sent by a first node, through a fourth core in a fourth core set;
step 602, storing the summary information in a second message queue;
step 603, sending at least one piece of summary information to a fifth core in a fifth core set through the second message queue;
The fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
According to the session synchronization method, the session is newly established through the cores in the first core set, the session is synchronized through the cores in the second core set, the newly established session cores and the session synchronization cores in the same node are in a mutually isolated state, the mutual logics are not interfered with each other, the loss of process scheduling is avoided, the efficiency of session synchronization between the nodes is improved, and the overall performance of the nodes is improved. The scheme of the invention solves the problem that session synchronization failure is easily caused by sharing the CPU core by the session synchronization process and other processes in the same SP node, thereby influencing the integrity of session synchronization between the SP master node and the standby node.
Optionally, the receiving the summary information of the session to be synchronized sent by the first node includes:
after receiving the summary information through a data plane development tool DPDK, sending a verification sequence number to the first node;
wherein the verification serial number is carried in the summary information.
Optionally, the method further comprises:
Determining a session synchronization rate corresponding to the fourth core set and a session new rate corresponding to the fifth core set;
and adjusting the fourth core set and the fifth core set under the condition that the absolute value of the difference value between the session synchronous rate and the session newly-built rate is larger than a preset threshold value.
Optionally, the adjusting the fourth core set and the fifth core set includes:
when the difference value between the third rate and the fourth rate is larger than a preset threshold value, at least one sixth core in a third target core set corresponding to the third rate is adjusted to a fourth target core set corresponding to the fourth rate;
the sixth core is a hot standby core in the fourth core set or the fifth core set; the third rate is one of a new session rate and a synchronous session rate, and the fourth rate is the other of the new session rate and the synchronous session rate;
the third target core set is one of a fourth core set and a fifth core set, the fourth target core set being the other of the fourth core set and the fifth core set.
Optionally, the adjusting at least one sixth core in the third target core set corresponding to the third rate to the fourth target core set corresponding to the fourth rate includes:
Sorting all cores in the third target core set according to the third rate;
determining at least one core of the third target core set with the lowest third speed as the sixth core;
and adjusting the sixth core to the fourth target core set, and binding a message queue corresponding to the sixth core to the core with the lowest third speed in the third target core set.
As shown in fig. 7, a session synchronization device 700 according to an embodiment of the present invention is applied to a first node, and includes:
a first storage module 701, configured to store summary information of session data corresponding to at least one session request packet in a first message queue after receiving the session request packet sent by the second node;
a first sending module 702, configured to send the summary information to a second core in a second core set;
a second sending module 703, configured to send, by the second core, the summary information to a third node if the number of the summary information in the first message queue is greater than a preset value;
the method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
As shown in fig. 8, a session synchronization device 800 according to an embodiment of the present invention is applied to a third node, and includes:
a receiving module 801, configured to receive, by using a fourth core in the fourth core set, summary information of a session to be synchronized sent by the first node;
a second storage module 802, configured to store the summary information in a second message queue;
a third sending module 803, configured to send at least one piece of summary information to a fifth core in a fifth core set through the second message queue;
the fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
As shown in fig. 9, a service node 900 of an embodiment of the present invention includes a processor 910 and a transceiver 920, wherein,
the processor is used for storing abstract information of session data corresponding to at least one session request message in a first message queue after receiving the session request message sent by the second node;
the transceiver is configured to send the summary information to a second core in a second set of cores;
transmitting, by the second core, the summary information to a third node if the number of the summary information in the first message queue is greater than a preset value;
The method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
As shown in fig. 10, a service node 1000 of an embodiment of the present invention includes a processor 1010 and a transceiver 1020, wherein,
the transceiver is used for receiving abstract information of the session to be synchronized, which is sent by the first node, through a fourth core in the fourth core set;
the processor is used for storing the abstract information in a second message queue;
the transceiver is further configured to send at least one of the summary information to a fifth core in a fifth core set via the second message queue;
the fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
A terminal according to another embodiment of the present invention, as shown in fig. 11, includes a transceiver 1110, a processor 1100, a memory 1120, and a program or instructions stored on the memory 1120 and executable on the processor 1100; the processor 1100, when executing the program or instructions, implements the above-described application to session synchronization methods.
The transceiver 1110 is configured to receive and transmit data under the control of the processor 1100.
Wherein in fig. 11, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by processor 1100 and various circuits of memory represented by memory 1120, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 1110 may be a number of elements, i.e., include a transmitter and a receiver, providing a means for communicating with various other apparatus over a transmission medium. The user interface 1130 may also be an interface capable of interfacing with an inscribed desired device for a different user device, including but not limited to a keypad, display, speaker, microphone, joystick, etc.
The processor 1100 is responsible for managing the bus architecture and general processing, and the memory 1120 may store data used by the processor 1100 in performing operations.
The readable storage medium of the embodiment of the present invention stores a program or an instruction, which when executed by a processor, implements the steps in the session synchronization method described above, and can achieve the same technical effects, and is not described herein again for avoiding repetition.
Wherein the processor is a processor in the service node described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk or an optical disk.
It is further noted that the terminals described in this specification include, but are not limited to, smartphones, tablets, etc., and that many of the functional components described are referred to as modules in order to more particularly emphasize their implementation independence.
In an embodiment of the invention, the modules may be implemented in software for execution by various types of processors. An identified module of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions which may, for instance, be organized as an object, procedure, or function. Nevertheless, the executables of an identified module need not be physically located together, but may comprise disparate instructions stored in different bits which, when joined logically together, comprise the module and achieve the stated purpose for the module.
Indeed, a module of executable code may be a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, and across several memory devices. Likewise, operational data may be identified within modules and may be embodied in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including over different storage devices.
Where a module may be implemented in software, taking into account the level of existing hardware technology, a module may be implemented in software, and one skilled in the art may, without regard to cost, build corresponding hardware circuitry, including conventional Very Large Scale Integration (VLSI) circuits or gate arrays, and existing semiconductors such as logic chips, transistors, or other discrete components, to achieve the corresponding functions. A module may also be implemented in programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices or the like.
The exemplary embodiments described above are described with reference to the drawings, many different forms and embodiments are possible without departing from the spirit and teachings of the present invention, and therefore, the present invention should not be construed as limited to the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will convey the scope of the invention to those skilled in the art. In the drawings, the size of the elements and relative sizes may be exaggerated for clarity. The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Unless otherwise indicated, a range of values includes the upper and lower limits of the range and any subranges therebetween.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (16)

1. A session synchronization method applied to a first node, comprising:
after receiving a session request message sent by a second node, storing abstract information of session data corresponding to at least one session request message in a first message queue;
transmitting the summary information to a second core in a second core set;
transmitting, by the second core, the summary information to a third node if the number of the summary information in the first message queue is greater than a preset value;
the method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
2. The session synchronization method according to claim 1, wherein the sending the summary information to the third node includes:
Transmitting the summary information to a third node through a DPDK (data plane development tool), and storing the summary information in a timer queue; the abstract information carries an authentication serial number;
if the verification serial number fed back by the third node is received within the preset time, deleting the abstract information from the timer queue; and if the verification serial number fed back by the third node is not received within the preset time, the abstract information is sent to the third node again.
3. The session synchronization method according to claim 1, characterized in that the method further comprises:
determining a session new rate corresponding to the first core set and a session synchronization rate corresponding to the second core set;
and adjusting the first core set and the second core set under the condition that the absolute value of the difference value between the new session rate and the session synchronous rate is larger than a preset threshold value.
4. A session synchronization method according to claim 3, wherein said adjusting of said first set of cores and said second set of cores comprises:
when the difference value between the first rate and the second rate is larger than a preset threshold value, at least one third core in a first target core set corresponding to the first rate is adjusted to a second target core set corresponding to the second rate;
Wherein the third core is a hot standby core in the first core set or the second core set; the first rate is one of a new session rate and a synchronous session rate, and the second rate is the other of the new session rate and the synchronous session rate;
the first target core set is one of a first core set and a second core set, and the second target core set is the other of the first core set and the second core set.
5. The session synchronization method according to claim 4, wherein said adjusting at least one third core in the first target core set corresponding to the first rate to the second target core set corresponding to the second rate comprises:
sorting all cores in the first target core set according to the first rate;
determining at least one core with the lowest first rate in the first target core set as the third core;
and adjusting the third core to the second target core set, and binding a message queue corresponding to the third core to the core with the lowest first rate in the first target core set.
6. A session synchronization method applied to a third node, comprising:
Receiving abstract information of a session to be synchronized, which is sent by a first node, through a fourth core in a fourth core set;
storing the summary information in a second message queue;
transmitting at least one piece of summary information to a fifth core in a fifth core set through the second message queue;
the fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
7. The session synchronization method according to claim 6, wherein the receiving the summary information of the session to be synchronized sent by the first node includes:
after receiving the summary information through a data plane development tool DPDK, sending a verification sequence number to the first node;
wherein the verification serial number is carried in the summary information.
8. The session synchronization method according to claim 6, characterized in that the method further comprises:
determining a session synchronization rate corresponding to the fourth core set and a session new rate corresponding to the fifth core set;
and adjusting the fourth core set and the fifth core set under the condition that the absolute value of the difference value between the session synchronous rate and the session newly-built rate is larger than a preset threshold value.
9. The session synchronization method according to claim 8, wherein said adjusting the fourth core set and the fifth core set comprises:
when the difference value between the third rate and the fourth rate is larger than a preset threshold value, at least one sixth core in a third target core set corresponding to the third rate is adjusted to a fourth target core set corresponding to the fourth rate;
the sixth core is a hot standby core in the fourth core set or the fifth core set; the third rate is one of a new session rate and a synchronous session rate, and the fourth rate is the other of the new session rate and the synchronous session rate;
the third target core set is one of a fourth core set and a fifth core set, the fourth target core set being the other of the fourth core set and the fifth core set.
10. The session synchronization method according to claim 9, wherein said adjusting at least one sixth core in the third target core set corresponding to the third rate to the fourth target core set corresponding to the fourth rate comprises:
sorting all cores in the third target core set according to the third rate;
Determining at least one core of the third target core set with the lowest third speed as the sixth core;
and adjusting the sixth core to the fourth target core set, and binding a message queue corresponding to the sixth core to the core with the lowest third speed in the third target core set.
11. A session synchronization device applied to a first node, comprising:
the first storage module is used for storing abstract information of session data corresponding to at least one session request message in a first message queue after receiving the session request message sent by the second node;
the first sending module is used for sending the abstract information to a second core in a second core set;
a second sending module, configured to send, by using the second core, the summary information to a third node when the number of the summary information in the first message queue is greater than a preset value;
the method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
12. A session synchronization device applied to a third node, comprising:
the receiving module is used for receiving abstract information of the session to be synchronized, which is sent by the first node, through a fourth core in the fourth core set;
the second storage module is used for storing the abstract information in a second message queue;
a third sending module, configured to send at least one piece of summary information to a fifth core in a fifth core set through the second message queue;
the fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
13. A service node, comprising: a transceiver and a processor;
the processor is used for storing abstract information of session data corresponding to at least one session request message in a first message queue after receiving the session request message sent by the second node;
the transceiver is configured to send the summary information to a second core in a second set of cores;
transmitting, by the second core, the summary information to a third node if the number of the summary information in the first message queue is greater than a preset value;
The method comprises the steps that session data corresponding to a session request message are stored in a first core set, a first message queue is a message queue corresponding to the first core, the first core set is a set of cores for session establishment, and the second core set is a set of cores for session synchronization.
14. A service node, comprising: a transceiver and a processor;
the transceiver is used for receiving abstract information of the session to be synchronized, which is sent by the first node, through a fourth core in the fourth core set;
the processor is used for storing the abstract information in a second message queue;
the transceiver is further configured to send at least one of the summary information to a fifth core in a fifth core set via the second message queue;
the fourth core set is a set of cores for session synchronization, and the fifth core set is a set of cores for session new creation; the second message queue is a message queue corresponding to the fourth core.
15. A terminal, comprising: a transceiver, a processor, a memory, and a program or instructions stored on the memory and executable on the processor; -wherein the processor, when executing the program or instructions, implements a session synchronization method as claimed in any one of claims 1-5; alternatively, the processor, when executing the program or instructions, implements a session synchronization method as claimed in any one of claims 6-10.
16. A readable storage medium having stored thereon a program or instructions which when executed by a processor performs the steps in the session synchronization method according to any of claims 1-5; alternatively, the program or instructions, when executed by a processor, implement the steps in a session synchronization method as claimed in any one of claims 6-10.
CN202311028250.1A 2023-08-16 2023-08-16 Session synchronization method, device, service node, terminal and readable storage medium Active CN116760504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311028250.1A CN116760504B (en) 2023-08-16 2023-08-16 Session synchronization method, device, service node, terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311028250.1A CN116760504B (en) 2023-08-16 2023-08-16 Session synchronization method, device, service node, terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN116760504A true CN116760504A (en) 2023-09-15
CN116760504B CN116760504B (en) 2023-11-03

Family

ID=87948145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311028250.1A Active CN116760504B (en) 2023-08-16 2023-08-16 Session synchronization method, device, service node, terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN116760504B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311656A (en) * 2020-02-14 2021-02-02 北京字节跳动网络技术有限公司 Message aggregation and display method and device, electronic equipment and computer readable medium
CN112769959A (en) * 2021-03-04 2021-05-07 北京字节跳动网络技术有限公司 Session synchronization method, device, first node, second node, system and medium
CN116032880A (en) * 2022-12-19 2023-04-28 北京百度网讯科技有限公司 System, method, electronic equipment and storage medium for session synchronization
CN116346834A (en) * 2023-03-17 2023-06-27 北京华耀科技有限公司 Session synchronization method, device, computing equipment and computer storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311656A (en) * 2020-02-14 2021-02-02 北京字节跳动网络技术有限公司 Message aggregation and display method and device, electronic equipment and computer readable medium
CN112769959A (en) * 2021-03-04 2021-05-07 北京字节跳动网络技术有限公司 Session synchronization method, device, first node, second node, system and medium
CN116032880A (en) * 2022-12-19 2023-04-28 北京百度网讯科技有限公司 System, method, electronic equipment and storage medium for session synchronization
CN116346834A (en) * 2023-03-17 2023-06-27 北京华耀科技有限公司 Session synchronization method, device, computing equipment and computer storage medium

Also Published As

Publication number Publication date
CN116760504B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN106657365B (en) RDMA (remote direct memory Access) -based high-concurrency data transmission method
CN113485823A (en) Data transmission method, device, network equipment and storage medium
EP3873062A1 (en) Data transmission method, system, and proxy server
CN110557408B (en) Computing system and method for network transmission and network adapter device
US10609125B2 (en) Method and system for transmitting communication data
AU2014200239B2 (en) System and method for multiple sender support in low latency fifo messaging using rdma
CN112631788B (en) Data transmission method and data transmission server
US6760304B2 (en) Apparatus and method for receive transport protocol termination
US20200287781A1 (en) Network connection and termination system
US10999364B1 (en) Emulation of memory access transport services
WO2014082562A1 (en) Method, device, and system for information processing based on distributed buses
CN111966446B (en) RDMA virtualization method in container environment
WO2022032984A1 (en) Mqtt protocol simulation method and simulation device
CN102075434B (en) Communication method in virtual cluster
US20030182440A1 (en) Network processor with high-speed transceiver
WO2024037296A1 (en) Protocol family-based quic data transmission method and device
CN106131162B (en) A method of network service agent is realized based on IOCP mechanism
CN100486248C (en) Zero-copy communication method under real-time environment
Zhu et al. Deploying user-space {TCP} at cloud scale with {LUNA}
CN113259408A (en) Data transmission method and system
CN116760504B (en) Session synchronization method, device, service node, terminal and readable storage medium
CN116471242A (en) RDMA-based transmitting end, RDMA-based receiving end, data transmission system and data transmission method
JP3628514B2 (en) Data transmission / reception method between computers
CN115834660A (en) Non-blocking RDMA connection establishment method and device
US11444886B1 (en) Out of order packet buffer selection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40095855

Country of ref document: HK