[go: up one dir, main page]

CN109495526A - A kind of file transmitting method, device, system, electronic equipment and storage medium - Google Patents

A kind of file transmitting method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN109495526A
CN109495526A CN201710816202.7A CN201710816202A CN109495526A CN 109495526 A CN109495526 A CN 109495526A CN 201710816202 A CN201710816202 A CN 201710816202A CN 109495526 A CN109495526 A CN 109495526A
Authority
CN
China
Prior art keywords
session
centralized
load balancing
target data
synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710816202.7A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud 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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201710816202.7A priority Critical patent/CN109495526A/en
Publication of CN109495526A publication Critical patent/CN109495526A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例提供了一种报文发送方法、装置、系统、电子设备及存储介质,该方法应用于云计算网络中的负载均衡设备,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,该方法包括:接收交换机发送的目标数据报文;在本地存储的会话中查找所述目标数据报文对应的会话,若查找失败,通过所述交换机将所述目标数据报文发送至集中式会话同步设备,以使得所述集中式会话同步设备根据本地存储的会话将所述目标数据报文发送至应用服务器群。本发明实施例在负载均衡设备出现故障时,由集中式会话同步设备将未在负载均衡设备找到对应会话的数据报文发送至应用服务器群,减少了对CPU资源的消耗,提升了负载均衡设备对数据报文的发送能力。

Embodiments of the present invention provide a method, device, system, electronic device, and storage medium for sending a message. The method is applied to a load balancing device in a cloud computing network, where the cloud computing network includes: a switch, a load balancing device, and a centralized type session synchronization device, the method includes: receiving a target data message sent by a switch; searching for a session corresponding to the target data message in a locally stored session, and if the search fails, sending the target data message through the switch Sending to the centralized session synchronization device, so that the centralized session synchronization device sends the target data message to the application server group according to the locally stored session. In the embodiment of the present invention, when the load balancing device fails, the centralized session synchronization device sends the data packets for which the corresponding session is not found in the load balancing device to the application server group, which reduces the consumption of CPU resources and improves the load balancing device. The ability to send data packets.

Description

一种报文发送方法、装置、系统、电子设备及存储介质A message sending method, device, system, electronic device and storage medium

技术领域technical field

本发明涉及通信技术领域,特别是涉及一种报文发送方法、装置、系统、电子设备及存储介质。The present invention relates to the field of communication technologies, and in particular, to a message sending method, device, system, electronic device and storage medium.

背景技术Background technique

在云计算网络中,负载均衡设备作为用户流量的入口,其性能和稳定性有着举足轻重的作用。传统技术将负载均衡设备部署为主备模式来实现高可用,由于负载均衡设备转发用户流量时是有状态的转发,即将用户流量基于会话进行转发,因此主备负载均衡设备之间需要有会话同步功能。为了横向扩展负载均衡设备的性能,多数云厂商都会将负载均衡设备部署为集群模式,通过在交换机中进行等价路由(Equal-CostMultipathRouting,ECMP)算法实现用户流量在多个负载均衡设备上的转发,这样最多可以支持交换机中最大路由数目的负载均衡设备进行用户流量的转发,这种部署方式的好处在于简单可靠,便于横向扩展。In the cloud computing network, the load balancing device, as the entrance of user traffic, plays a pivotal role in its performance and stability. The traditional technology deploys the load balancing device in the active and standby mode to achieve high availability. Because the load balancing device forwards user traffic in a stateful manner, that is, the user traffic is forwarded based on the session. Therefore, the active and standby load balancing devices need to have session synchronization. Function. In order to scale the performance of the load balancing device horizontally, most cloud vendors deploy the load balancing device in cluster mode, and implement the Equal-Cost Multipath Routing (ECMP) algorithm in the switch to realize the forwarding of user traffic on multiple load balancing devices. , so that it can support the load balancing device with the maximum number of routes in the switch to forward user traffic. The advantage of this deployment method is that it is simple, reliable, and convenient for horizontal expansion.

但是,传统的负载均衡设备工作在主备模式时,最大的问题在于其扩展性能较差,无法支持大量用户的流量转发需求,已经难以适用于云计算环境中。当负载均衡设备部署为集群模式时,传统的交换机使用ECMP算法将用户流量通过负载均衡设备进行转发,当负载均衡设备集群中负载均衡设备的数目发生变化时,交换机会重新使用ECMP算法进行路由分配,导致大部分用户流量的路径会发生改变,因而会导致大部分的用户数据报文找不到自己对应的会话,从而转发失败,更为严重的结果是用户和负载均衡设备集群的连接会闪断,对用户的网络使用和体验带来极大的不便。However, when the traditional load balancing device works in the active-standby mode, the biggest problem is that its scalability is poor, and it cannot support the traffic forwarding requirements of a large number of users, so it is difficult to apply to the cloud computing environment. When the load balancing device is deployed in cluster mode, the traditional switch uses the ECMP algorithm to forward user traffic through the load balancing device. When the number of load balancing devices in the load balancing device cluster changes, the switch will re-use the ECMP algorithm for route allocation , the path of most user traffic will change, which will cause most user data packets to find their corresponding sessions, and thus fail to forward, and the more serious result is that the connection between the user and the load balancing device cluster will flicker. It will bring great inconvenience to the user's network usage and experience.

针对集群模式下,负载均衡设备数量发生变化导致用户流量无法转发的问题,目前已有的解决方法为:在各个负载均衡设备之间通过交换机实现全量的会话同步,即集群中每一个负载均衡设备均有集群中其他所有负载均衡设备的全部会话信息,以保证集群中某个或某几个负载均衡设备出现故障时,其他负载均衡设备仍然能够转发故障负载均衡设备应该转发的用户数据报文。应用上述方式虽然能够保证集群中一个或者几个负载均衡设备出现故障时,依然能够实现故障设备所负责数据报文的转发,但是由于每一负载均衡设备均需要存储集群中所有设备的会话信息,导致占用每台负载均衡设备的较多的CPU资源,单台负载均衡设备的会话管理能力会受到限制,从而整个集群对用户流量的转发能力受到限制,而且上述方式需要交换机支持组播功能。Aiming at the problem that user traffic cannot be forwarded due to the change in the number of load balancing devices in cluster mode, the existing solution is to achieve full session synchronization between each load balancing device through switches, that is, each load balancing device in the cluster. All session information of all other load balancing devices in the cluster is available to ensure that when one or several load balancing devices in the cluster fail, other load balancing devices can still forward user data packets that should be forwarded by the faulty load balancing device. Although the application of the above method can ensure that when one or several load balancing devices in the cluster fail, it can still realize the forwarding of data packets that the faulty device is responsible for. However, since each load balancing device needs to store the session information of all devices in the cluster, As a result, more CPU resources are occupied by each load balancing device, and the session management capability of a single load balancing device will be limited, thereby limiting the ability of the entire cluster to forward user traffic, and the above method requires the switch to support the multicast function.

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的在于提供一种报文发送方法、装置、系统、电子设备及存储介质,以避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。具体技术方案如下:The purpose of the embodiments of the present invention is to provide a message sending method, apparatus, system, electronic device and storage medium, so as to avoid the CPU load caused by the need to store session information of all load balancing devices in the cluster for the load balancing devices in the cloud computing network. Excessive resource usage improves the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic. The specific technical solutions are as follows:

本发明实施例公开了一种报文发送方法,应用于云计算网络中的负载均衡设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述方法包括:The embodiment of the present invention discloses a message sending method, which is applied to a load balancing device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device and a centralized session synchronization device. The above method includes:

接收交换机发送的目标数据报文;Receive the target data message sent by the switch;

在接收了目标数据报文的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;如果查找失败,将目标数据报文发送至交换机,以使交换机将目标数据报文发送至集中式会话同步设备,从而使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。In the session stored locally on the load balancing device that has received the target data packet, search for the session corresponding to the target data packet; if the search fails, send the target data packet to the switch, so that the switch sends the target data packet to The centralized session synchronization device, so that the centralized session synchronization device sends the target data packet to the application server group according to the locally stored session of the centralized session synchronization device, wherein the locally stored session of the centralized session synchronization device is: Sessions obtained from the synchronization of various load balancing devices in the cloud computing network.

本发明实施例公开了一种报文发送方法,应用于云计算网络中的集中式会话同步设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述方法包括:The embodiment of the present invention discloses a message sending method, which is applied to a centralized session synchronization device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The method includes:

接收交换机发送的目标数据报文;其中,目标数据报文是由接收了目标数据报文的负载均衡设备在自身本地存储的会话中未查找到目标数据报文对应的会话后,向交换机发送的目标数据报文;Receive the target data packet sent by the switch; wherein, the target data packet is sent to the switch by the load balancing device that has received the target data packet after not finding the session corresponding to the target data packet in the session stored locally by itself target data message;

根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。The target data packet is sent to the application server farm according to the locally stored session of the centralized session synchronization device.

本发明实施例公开了一种报文发送方法,应用于云计算网络中的交换机,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述方法包括:The embodiment of the present invention discloses a message sending method, which is applied to a switch in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The above method includes:

接收目标数据报文;Receive the target data message;

对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备,并将目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;Route allocation to the target data packet, determine the load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device is in the determined load balancing device. Find the session corresponding to the target data packet in the session stored locally on the load balancing device;

接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备,以使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。Receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device The session is to send the target data message to the application server group, wherein the session stored locally by the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the cloud computing network.

本发明实施例公开了一种报文发送装置,应用于云计算网络中的负载均衡设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:An embodiment of the present invention discloses a message sending device, which is applied to a load balancing device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The device includes:

第一接收模块,用于接收交换机发送的目标数据报文;The first receiving module is used for receiving the target data message sent by the switch;

第一查找模块,用于在接收了目标数据报文的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;a first search module, configured to search for a session corresponding to the target data packet in the session stored locally by the load balancing device that has received the target data packet;

第一发送模块,用于在查找目标数据报文对应的会话失败时,将目标数据报文发送至交换机,以使交换机将目标数据报文发送至集中式会话同步设备,从而使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。The first sending module is configured to send the target data packet to the switch when the session corresponding to the target data packet fails to be searched, so that the switch sends the target data packet to the centralized session synchronization device, thereby synchronizing the centralized session The device sends the target data message to the application server group according to the locally stored session of the centralized session synchronization device, wherein the locally stored session of the centralized session synchronization device is: obtained from each load balancing device in the cloud computing network synchronously session.

本发明实施例公开了一种报文发送装置,应用于云计算网络中的集中式会话同步设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:An embodiment of the present invention discloses a message sending device, which is applied to a centralized session synchronization device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The device includes:

第八接收模块,用于接收交换机发送的目标数据报文;其中,目标数据报文是由接收了目标数据报文的负载均衡设备在自身本地存储的会话中未查找到目标数据报文对应的会话后,向交换机发送的目标数据报文;The eighth receiving module is used for receiving the target data message sent by the switch; wherein, the target data message is the one corresponding to the target data message that is not found in the session stored locally by the load balancing device that has received the target data message After the session, the target data message sent to the switch;

第四发送模块,用于根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。The fourth sending module is configured to send the target data message to the application server group according to the session stored locally in the centralized session synchronization device.

本发明实施例公开了一种报文发送装置,应用于云计算网络中的交换机,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:An embodiment of the present invention discloses a message sending device, which is applied to a switch in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The device includes:

第二接收模块,用于接收目标数据报文;The second receiving module is used to receive the target data message;

第一分配模块,用于对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备,并将目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;The first distribution module is configured to perform route distribution on the target data packet, determine a load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device The balancing device searches for the session corresponding to the target data packet in the locally stored session of the determined load balancing device;

第三接收模块,用于接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备,以使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。The third receiving module is configured to receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device can The locally stored session of the session synchronization device sends the target data packet to the application server group, wherein the locally stored session of the centralized session synchronization device is: the session obtained from each load balancing device in the cloud computing network synchronously.

本发明实施例公开了一种报文发送系统,该系统包括:交换机、负载均衡设备和集中式会话同步设备;其中,The embodiment of the present invention discloses a message sending system, the system includes: a switch, a load balancing device and a centralized session synchronization device; wherein,

交换机,用于接收目标数据报文;对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备;将目标数据报文发送至所确定的负载均衡设备;The switch is used to receive the target data packet; perform route distribution on the target data packet, determine a load balancing device for forwarding the target data packet; send the target data packet to the determined load balancing device;

负载均衡设备,用于接收交换机发送的目标数据报文;在负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;如果查找失败,将目标数据报文发送至交换机;The load balancing device is used to receive the target data packet sent by the switch; in the session stored locally on the load balancing device, search for the session corresponding to the target data packet; if the search fails, send the target data packet to the switch;

交换机,还用于接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备;The switch is further configured to receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device;

集中式会话同步设备,用于接收交换机发送的目标数据报文,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从上述系统中的各个负载均衡设备同步获得的会话。The centralized session synchronization device is used to receive the target data packet sent by the switch, and send the target data packet to the application server group according to the locally stored session of the centralized session synchronization device, wherein the local storage of the centralized session synchronization device The session is: the session obtained synchronously from each load balancing device in the above system.

本发明实施例公开了一种电子设备,该电子设备为云计算网络中的负载均衡设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,负载均衡设备包括:处理器和存储器;An embodiment of the present invention discloses an electronic device. The electronic device is a load balancing device in a cloud computing network. The cloud computing network includes a switch, a load balancing device, and a centralized session synchronization device. The load balancing device includes a processor and a memory. ;

存储器,用于存放计算机程序;memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述应用于云计算网络中的负载均衡设备的报文发送的方法步骤。The processor is configured to implement the above method steps for sending packets applied to a load balancing device in a cloud computing network when executing the program stored in the memory.

本发明实施例还公开了一种计算机可读存储介质,该计算机可读存储介质为云计算网络中的负载均衡设备的存储介质,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,计算机可读存储介质内存储有计算机程序,该计算机程序被处理器执行时实现上述应用于云计算网络中的负载均衡设备的报文发送的方法步骤。An embodiment of the present invention further discloses a computer-readable storage medium, where the computer-readable storage medium is a storage medium of a load balancing device in a cloud computing network, where the cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device , a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the above-mentioned method steps for sending a packet applied to a load balancing device in a cloud computing network are implemented.

本发明实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的负载均衡设备的报文发送方法。Embodiments of the present invention also provide a computer program product containing instructions, which, when running on a computer, cause the computer to execute the above-mentioned packet sending method applied to a load balancing device in a cloud computing network.

本发明实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的负载均衡设备的报文发送方法。Embodiments of the present invention also provide a computer program, which, when running on a computer, causes the computer to execute the above-mentioned method for sending packets applied to a load balancing device in a cloud computing network.

本发明实施例公开了一种电子设备,该电子设备为云计算网络中的集中式会话同步设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,集中式会话同步设备包括:处理器和存储器;An embodiment of the present invention discloses an electronic device. The electronic device is a centralized session synchronization device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The centralized session synchronization device includes: processor and memory;

存储器,用于存放计算机程序;memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述应用于云计算网络中的集中式会话同步设备的报文发送的方法步骤。The processor is configured to implement the above-mentioned method and steps of the message sending applied to the centralized session synchronization device in the cloud computing network when executing the program stored in the memory.

本发明实施例还公开了了一种计算机可读存储介质,该计算机可读存储介质为云计算网络中的集中式会话同步设备的存储介质,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,计算机可读存储介质内存储有计算机程序,该计算机程序被处理器执行时实现上述应用于云计算网络中的集中式会话同步设备的报文发送的方法步骤。The embodiment of the present invention also discloses a computer-readable storage medium, where the computer-readable storage medium is a storage medium of a centralized session synchronization device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized In the session synchronization device, a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the above-mentioned method and steps of the message sending applied to the centralized session synchronization device in the cloud computing network are implemented.

本发明实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的集中式会话同步设备的报文发送方法。Embodiments of the present invention also provide a computer program product containing instructions, which, when running on a computer, cause the computer to execute the above-mentioned message sending method applied to a centralized session synchronization device in a cloud computing network.

本发明实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的集中式会话同步设备的报文发送方法。Embodiments of the present invention also provide a computer program, which, when running on a computer, causes the computer to execute the above-mentioned packet sending method applied to a centralized session synchronization device in a cloud computing network.

本发明实施例公开了一种电子设备,该电子设备为云计算网络中的交换机,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,交换机包括:处理器和存储器;The embodiment of the present invention discloses an electronic device, the electronic device is a switch in a cloud computing network, the cloud computing network includes: a switch, a load balancing device and a centralized session synchronization device, and the switch includes: a processor and a memory;

存储器,用于存放计算机程序;memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述应用于云计算网络中的交换机的报文发送的方法步骤。The processor is configured to implement the above-mentioned method steps for sending a message applied to a switch in a cloud computing network when executing the program stored in the memory.

本发明实施例还公开了了一种计算机可读存储介质,该计算机可读存储介质为云计算网络中的交换机的存储介质,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,计算机可读存储介质内存储有计算机程序,该计算机程序被处理器执行时实现上述应用于云计算网络中的交换机的报文发送的方法步骤。The embodiment of the present invention also discloses a computer-readable storage medium, where the computer-readable storage medium is a storage medium of a switch in a cloud computing network, and the cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device, A computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the above-mentioned method steps for sending a packet applied to a switch in a cloud computing network are implemented.

本发明实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的交换机的报文发送方法。Embodiments of the present invention also provide a computer program product containing instructions, which, when running on a computer, cause the computer to execute the above-mentioned packet sending method applied to a switch in a cloud computing network.

本发明实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的交换机的报文发送方法。Embodiments of the present invention also provide a computer program, which, when running on a computer, causes the computer to execute the above-mentioned method for sending a packet applied to a switch in a cloud computing network.

本发明实施例提供的报文发送方法、装置、系统、电子设备、存储介质、包含指令的计算机程序产品及计算机程序中,云计算网络中的负载均衡设备接收到交换发送的目标数据报文后,在负载均衡设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力,并且交换机只需要具有单播功能来实现会话同步。当然,实施本发明的任一产品或方法必不一定需要同时达到以上所述的所有优点。In the message sending method, device, system, electronic device, storage medium, computer program product including instructions, and computer program provided by the embodiments of the present invention, after the load balancing device in the cloud computing network receives the target data message sent by the exchange , Find the session corresponding to the target data packet locally on the load balancing device, if not found, send the target data packet to the switch, and the switch will send the target data packet to the centralized session synchronization device, and the centralized session synchronization The device sends the target data packet to the application server farm. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic, and the switch only needs to have the unicast function to achieve this. Session synchronization. Of course, it is not necessary for any product or method to implement the present invention to simultaneously achieve all of the advantages described above.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1a为本发明实施例提供的报文发送方法的第一种流程示意图;FIG. 1a is a first schematic flowchart of a message sending method provided by an embodiment of the present invention;

图1b为负载均衡设备集群未出现故障时,交换机根据等价路由-哈希算法对目标数据报文进行路由分配的示意图;Figure 1b is a schematic diagram of routing allocation to target data packets according to the equal-cost routing-hash algorithm when the load balancing device cluster is not faulty;

图1c为负载均衡设备集群出现故障时,交换机根据等价路由-哈希算法对目标数据报文重新进行路由分配的示意图;Figure 1c is a schematic diagram of the switch re-routing the target data packet according to the equal-cost routing-hash algorithm when the load balancing device cluster fails;

图2为本发明实施例提供的报文发送方法的第二种流程示意图;FIG. 2 is a second schematic flowchart of a message sending method provided by an embodiment of the present invention;

图3为本发明实施例提供的报文发送方法的第三种流程示意图;3 is a third schematic flowchart of a message sending method provided by an embodiment of the present invention;

图4a为本发明实施例提供的报文发送方法的第四种流程示意图;4a is a fourth schematic flowchart of a message sending method provided by an embodiment of the present invention;

图4b为本发明实施例提供的报文发送方法的第五种流程示意图;4b is a fifth schematic flowchart of a message sending method according to an embodiment of the present invention;

图4c为本发明实施例提供的报文发送方法的第六种流程示意图;4c is a sixth schematic flowchart of a message sending method provided by an embodiment of the present invention;

图5为本发明实施例提供的报文发送装置的第一种结构示意图;FIG. 5 is a first structural schematic diagram of a message sending apparatus provided by an embodiment of the present invention;

图6为本发明实施例提供的报文发送装置的第二种结构示意图;6 is a schematic diagram of a second structure of a message sending apparatus provided by an embodiment of the present invention;

图7为本发明实施例提供的报文发送装置的第三种结构示意图;FIG. 7 is a third schematic structural diagram of a message sending apparatus according to an embodiment of the present invention;

图8a为本发明实施例提供的报文发送装置的第四种结构示意图;8a is a schematic diagram of a fourth structure of a message sending apparatus according to an embodiment of the present invention;

图8b为本发明实施例提供的报文发送装置的第五种结构示意图;FIG. 8b is a fifth structural schematic diagram of a message sending apparatus provided by an embodiment of the present invention;

图8c为本发明实施例提供的报文发送装置的第六种结构示意图;FIG. 8c is a sixth schematic structural diagram of a message sending apparatus provided by an embodiment of the present invention;

图9a为本发明实施例提供的一种报文发送系统的结构示意图;9a is a schematic structural diagram of a system for sending a message according to an embodiment of the present invention;

图9b为本发明实施例提供的报文发送系统将目标数据报文发送至应用服务器群的流程示意图;9b is a schematic flowchart of a message sending system according to an embodiment of the present invention sending a target data message to an application server group;

图9c为本发明实施例提供的报文发送系统中,负载均衡设备通过交换机向集中式会话同步设备发送控制报文的流程示意图;FIG. 9c is a schematic flowchart of a load balancing device sending a control message to a centralized session synchronization device through a switch in a message sending system provided by an embodiment of the present invention;

图10为本发明实施例提供的一种电子设备的结构示意图;10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;

图11为本发明实施例提供的另一种电子设备的结构示意图;11 is a schematic structural diagram of another electronic device according to an embodiment of the present invention;

图12为本发明实施例提供的另一种电子设备的结构示意图。FIG. 12 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例提供的一种报文发送方法可以应用于云计算网络中的负载均衡设备或交换机,云计算网络可以包括:交换机、负载均衡设备和集中式会话同步设备。其中,负载均衡设备在云计算网络中可以被部署为集群模式,即负载均衡设备的数量至少为两个。A packet sending method provided by an embodiment of the present invention can be applied to a load balancing device or switch in a cloud computing network, and the cloud computing network may include: a switch, a load balancing device, and a centralized session synchronization device. The load balancing device may be deployed in a cluster mode in the cloud computing network, that is, the number of load balancing devices is at least two.

本发明实施例给出了集中式会话同步设备的数量为一个时的数据报文发送的方法步骤。The embodiment of the present invention provides a method and steps for sending a data packet when the number of centralized session synchronization devices is one.

本申请的一种实现方式中,为了提高负载均衡设备集群的数据报文转发能力,并扩展集中式会话同步设备的数据报文发送能力,集中式会话同步设备的数量可以为多个,相应地,可以在每台负载均衡设备中配置每个集中式会话同步设备的互联网协议(Internet Protocol,IP)地址,以便于在一台集中式会话同步设备升级或出现故障时,负载均衡设备可以选择其他集中式会话同步设备来发送数据报文或者向其同步会话。In an implementation manner of the present application, in order to improve the data packet forwarding capability of the load balancing device cluster and expand the data packet sending capability of the centralized session synchronization device, the number of centralized session synchronization devices may be multiple, and correspondingly , the Internet Protocol (IP) address of each centralized session synchronization device can be configured in each load balancing device, so that when a centralized session synchronization device is upgraded or fails, the load balancing device can choose other A centralized session synchronization facility to send data packets or synchronize sessions to it.

本发明实施例中,交换机可以由路由器代替。In this embodiment of the present invention, the switch may be replaced by a router.

本发明实施例中,负载均衡设备可以为四层负载均衡设备或七层负载均衡设备。其中,四层负载均衡设备工作在开放式系统互联(Open System Interconnection,OSI)模型的第四层(传输层),通过分析数据报文的目标地址和端口对数据报文进行转发。七层负载均衡设备工作在OSI模型的第七层(应用层),除了分析数据报文的目标地址和端口,还分析数据报文的统一资源定位符(Uniform Resource Locator,URL)等应用层信息对数据报文进行转发。In this embodiment of the present invention, the load balancing device may be a Layer 4 load balancing device or a Layer 7 load balancing device. The four-layer load balancing device works on the fourth layer (transport layer) of the Open System Interconnection (OSI) model, and forwards the data packet by analyzing the destination address and port of the data packet. The seven-layer load balancing device works at the seventh layer (application layer) of the OSI model. In addition to analyzing the destination address and port of the data packet, it also analyzes the application layer information such as the Uniform Resource Locator (URL) of the data packet. Forward data packets.

本发明实施例中,负载均衡设备本地可以存储:客户端与应用服务器群之间建立的会话。In this embodiment of the present invention, the load balancing device may locally store: the session established between the client and the application server group.

本发明实施例中,集中式会话同步设备本地可以存储:从上述云计算网络中的各个负载均衡设备同步获得的会话。In the embodiment of the present invention, the centralized session synchronization device may locally store: the session obtained by synchronization from each load balancing device in the above-mentioned cloud computing network.

本发明实施例中,集中式会话同步设备可以包括多个CPU核,可以选择其中任意一个CPU核作为主CPU核;集中式会话同步设备还可以包括存储器。In this embodiment of the present invention, the centralized session synchronization device may include multiple CPU cores, and any one of the CPU cores may be selected as the main CPU core; the centralized session synchronization device may further include a memory.

本发明实施例中,需要保证负载均衡设备到集中式会话同步设备是路由可达的。In the embodiment of the present invention, it is necessary to ensure that the load balancing device and the centralized session synchronization device are reachable by route.

下面通过具体实施例,对本发明进行详细说明。The present invention will be described in detail below through specific embodiments.

图1a为本发明实施例提供的报文发送方法的第一种流程示意图,该方法应用于云计算网络中的负载均衡设备,包括以下步骤:1a is a schematic flowchart of a first method for sending a message according to an embodiment of the present invention. The method is applied to a load balancing device in a cloud computing network, and includes the following steps:

S101,接收交换机发送的目标数据报文。S101: Receive a target data packet sent by a switch.

在云计算网络中,当客户端需要向应用服务器群发送目标数据报文时,首先将目标数据报文发送至交换机,由交换机对目标数据报文进行路由分配,即由交换机确定用于转发目标数据报文的负载均衡设备,然后交换机将目标数据报文发送至所确定的负载均衡设备,所确定的负载均衡设备接收交换机发送的目标数据报文并转发至应用服务器群。其中,应用服务器群是用于为客户端提供应用服务的服务器群,可以包括多个应用服务器。In a cloud computing network, when a client needs to send a target data packet to an application server group, it first sends the target data packet to the switch, and the switch assigns the route to the target data packet, that is, the switch determines the target data packet for forwarding. The load balancing device of the data packet, and then the switch sends the target data packet to the determined load balancing device, and the determined load balancing device receives the target data packet sent by the switch and forwards it to the application server group. The application server group is a server group used to provide application services for clients, and may include multiple application servers.

可以理解的是,所确定的负载均衡设备为云计算网络中多个负载均衡设备中的某一个负载均衡设备。It can be understood that the determined load balancing device is a certain load balancing device among multiple load balancing devices in the cloud computing network.

本实施例中,交换机接收到目标数据报文后,可以根据预设的等价路由-哈希(Equal-CostMultipathRouting hash,ECMP-hash)算法对目标数据报文进行路由分配,即可以根据预设的ECMP-hash算法在云计算网络中的多个负载均衡设备中确定用于转发目标数据报文的负载均衡设备。当然,本申请只是以上述为例进行说明,交换机对目标数据报文进行路由分配的方法并不限于此。In this embodiment, after receiving the target data packet, the switch may perform route allocation to the target data packet according to a preset Equal-Cost Multipath Routing hash (ECMP-hash) algorithm, that is, according to the preset Equal-Cost Multipath Routing hash (ECMP-hash) algorithm The ECMP-hash algorithm determines the load balancing device for forwarding the target data packet among multiple load balancing devices in the cloud computing network. Of course, this application only takes the above as an example for description, and the method for the switch to perform route allocation to the target data packet is not limited to this.

S102,在接收了目标数据报文的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话。S102, in the locally stored session of the load balancing device that has received the target data packet, search for a session corresponding to the target data packet.

本实施例中,负载均衡设备在传输层的协议一般为传输控制协议(TransmissionControl Protocol,TCP),因而负载均衡设备转发目标数据报文时是有状态地转发,即负载均衡设备是基于目标数据报文所对应的会话对目标数据报文进行转发。In this embodiment, the protocol of the load balancing device at the transport layer is generally Transmission Control Protocol (TCP). Therefore, the load balancing device forwards the target data packet in a stateful manner, that is, the load balancing device forwards the target data packet based on the target data packet. The session corresponding to the message forwards the target data message.

可以理解的是,如果交换机接收到客户端发送的目标数据报文,则在交换机接收到客户端发送的目标数据报文之前,客户端和应用服务器群之间已经通过三次握手信号建立了目标数据报文对应的会话。It can be understood that if the switch receives the target data packet sent by the client, before the switch receives the target data packet sent by the client, the client and the application server group have established the target data through the three-way handshake signal. The session corresponding to the packet.

具体的,对于所建立的会话而言,上述负载均衡设备转发了建立该会话时所产生的三次握手信号中的同步(synchronous,SYN)包,则负载均衡设备可以在建立会话完成时刻,在负载均衡设备本地存储上述建立的会话,然后基于所存储的会话向应用服务器群转发目标数据报文。例如,负载均衡设备可以在负载均衡设备本地存储上述建立的会话的五元组信息。其中,会话的五元组信息为:会话的源IP地址、源端口、目的IP地址、目的端口以及传输层协议类型。本领域技术人员可以理解的是,一个目标数据报文对应唯一的一个会话。Specifically, for the established session, if the load balancing device forwards the synchronous (SYN) packet in the three-way handshake signal generated when the session is established, the load balancing device can, when the session is established, The balancing device locally stores the established session, and then forwards the target data packet to the application server group based on the stored session. For example, the load balancing device may locally store the quintuple information of the session established above. The quintuple information of the session is: source IP address, source port, destination IP address, destination port and transport layer protocol type of the session. It can be understood by those skilled in the art that one target data packet corresponds to only one session.

本实施例中,目标数据报文可以包含其对应的会话的五元组信息。因而,负载均衡设备接收到交换机发送的目标数据报文后,可以读取目标数据报文所包含的五元组信息,根据该五元组信息,在负载均衡设备本地存储的会话中,查找五元组信息与目标数据报文所包含的五元组信息相同的会话。当然,本申请只是以上述为例进行说明,负载均衡设备在负载均衡设备本地存储的会话中查找目标数据报文对应的会话的方法并不限于此。In this embodiment, the target data packet may include quintuple information of the corresponding session. Therefore, after receiving the target data packet sent by the switch, the load balancing device can read the quintuple information contained in the target data packet. According to the quintuple information, in the session stored locally by the load balancing device, search for five A session whose tuple information is the same as the five-tuple information contained in the target data packet. Of course, this application only uses the above as an example for description, and the method for the load balancing device to search for the session corresponding to the target data packet in the session stored locally by the load balancing device is not limited to this.

S103,如果在接收了目标数据报文的负载均衡设备的本地存储的会话中,未查找到目标数据报文对应的会话,将目标数据报文发送至交换机,以使交换机将目标数据报文发送至集中式会话同步设备,从而使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。S103, if the session corresponding to the target data packet is not found in the session stored locally by the load balancing device that has received the target data packet, send the target data packet to the switch, so that the switch sends the target data packet to the centralized session synchronization device, so that the centralized session synchronization device sends the target data message to the application server group according to the locally stored session of the centralized session synchronization device.

实际应用中,云计算网络中的多个负载均衡设备构成了负载均衡设备集群,在该集群中,每一个节点代表一个负载均衡设备,当负载均衡设备集群的节点数目发生变化时,比如某一个或某几个节点发生故障,或节点数量增加,对应地,交换机检测到下一跳的数量减少或增加,则交换机会根据预设的ECMP-hash算法或通过其他方法对接收到的数据报文重新进行路由分配,导致大部分数据报文的路径发生改变。In practical applications, multiple load balancing devices in a cloud computing network constitute a load balancing device cluster. In this cluster, each node represents a load balancing device. When the number of nodes in the load balancing device cluster changes, for example, a certain Or some nodes fail, or the number of nodes increases. Correspondingly, if the switch detects that the number of next hops decreases or increases, the switch will respond to the received data packets according to the preset ECMP-hash algorithm or through other methods. Re-distribution of routes leads to changes in the paths of most data packets.

进一步地,交换机将数据报文发送至对其重新进行路由分配后所确定的负载均衡设备后,所确定的负载均衡设备在本地存储的会话中极有可能查找不到数据报文对应的会话,从而导致对数据报文转发失败。Further, after the switch sends the data packet to the load balancing device determined after re-routing it, the determined load balancing device may not be able to find the session corresponding to the data packet in the locally stored sessions. As a result, the forwarding of the data packet fails.

举例来说,如图1b所示,假设云计算网络中有4个可正常工作的负载均衡设备,目标数据报文1至目标数据报文4对应的会话分别为会话1至会话4,负载均衡设备1至负载均衡设备4分别存储有会话1至会话4。交换机依次接收到目标数据报文1至目标数据报文4后,根据预设的ECMP-hash算法对目标数据报文1至目标数据报文4进行路由分配,路由分配的结果为:由负载均衡设备1至负载均衡设备4分别转发目标数据报文1至目标数据报文4。For example, as shown in Figure 1b, it is assumed that there are 4 load balancing devices in the cloud computing network that can work normally, and the sessions corresponding to target data packet 1 to target data packet 4 are session 1 to session 4, respectively. Device 1 to load balancing device 4 store session 1 to session 4 respectively. After receiving the target data packet 1 to the target data packet 4 in turn, the switch performs route allocation on the target data packet 1 to the target data packet 4 according to the preset ECMP-hash algorithm. The result of the route allocation is: load balancing Device 1 to load balancing device 4 forward target data packet 1 to target data packet 4 respectively.

如图1c所示,如果负载均衡设备集群的节点数目发生变化,以某一个负载均衡设备宕机为例,如负载均衡设备1宕机,此时,交换机检测到下一跳的数量减少1,则交换机根据预设的ECMP-hash算法对接收到的目标数据报文1至目标数据报文4重新进行路由分配,假设路由分配的结果为:分别由负载均衡设备2至负载均衡设备4转发目标数据报文1至3,由负载均衡设备2转发目标数据报文4。则负载均衡设备2至负载均衡设备4均不能在各自的本地存储的会话中查找到所要转发的目标数据报文对应的会话,从而导致对目标数据报文转发失败。As shown in Figure 1c, if the number of nodes in the load balancing device cluster changes, taking a load balancing device down as an example, for example, load balancing device 1 goes down, at this time, the switch detects that the number of next hops decreases by 1, Then the switch re-distributes the routes to the received target data packets 1 to 4 according to the preset ECMP-hash algorithm. It is assumed that the result of the route allocation is: the load balancing device 2 to the load balancing device 4 forward the targets respectively. The data packets 1 to 3 are forwarded by the load balancing device 2 to the target data packet 4 . Then, none of the load balancing device 2 to the load balancing device 4 can find the session corresponding to the target data packet to be forwarded in the respective locally stored sessions, resulting in failure to forward the target data packet.

当负载均衡设备在负载均衡设备的本地存储的会话中未查找到目标数据报文对应的会话时,且由于交换机并不存储目标数据报文,负载均衡设备可以将目标数据报文发送至交换机,以使交换机将接收到的目标数据报文发送至集中式会话同步设备。When the load balancing device does not find the session corresponding to the target data packet in the session stored locally on the load balancing device, and because the switch does not store the target data packet, the load balancing device can send the target data packet to the switch. So that the switch sends the received target data message to the centralized session synchronization device.

具体的,为了给目标数据报文在OSI模型的不同层次标记不同的标识,负载均衡设备可以将目标数据报文进行封装,并将封装后的目标数据报文发送至交换机,以使交换机将接收到的封装后的目标数据报文发送至集中式会话同步设备。Specifically, in order to mark the target data packets with different identifiers at different levels of the OSI model, the load balancing device can encapsulate the target data packets, and send the encapsulated target data packets to the switch, so that the switch will receive the target data packets. The received encapsulated target data packet is sent to the centralized session synchronization device.

例如,负载均衡设备可以将目标数据报文封装为虚拟可扩展局域网(VirtualExtensible Local Area Network,vxlan)格式。交换机接收到负载均衡设备发送的被封装为vxlan格式的目标数据报文后,并不对该封装后的目标数据报文进行解封装或解析处理,而是直接将该封装为vxlan格式的目标数据报文发送至集中式会话同步设备。当然,本申请只是以上述为例进行说明,负载均衡设备对目标数据报文的封装方法并不限于此。For example, the load balancing device may encapsulate the target data packet into a virtual extensible local area network (Virtual Extensible Local Area Network, vxlan) format. After the switch receives the target data packet encapsulated in vxlan format sent by the load balancing device, it does not decapsulate or parse the encapsulated target data packet, but directly encapsulates the target data packet in vxlan format. messages to a centralized session synchronization facility. Of course, this application only takes the above as an example for description, and the method for encapsulating the target data packet by the load balancing device is not limited to this.

本实施例中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。需要说明的是,可以采用现有技术实现从云计算网络的各个负载均衡设备向集中式会话同步设备同步会话。In this embodiment, the locally stored session of the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the cloud computing network. It should be noted that session synchronization from each load balancing device of a cloud computing network to a centralized session synchronization device may be implemented by using the prior art.

作为本发明的一个优选实施例,集中式会话同步设备根据集中式会话同步设备的本地存储的会话将目标数据报文发送至应用服务器群,可以包括步骤S103a-S103c:As a preferred embodiment of the present invention, the centralized session synchronization device sends the target data packet to the application server group according to the locally stored session of the centralized session synchronization device, which may include steps S103a-S103c:

S103a,集中式会话同步设备的主CPU核,从集中式会话同步设备的本地存储的会话中,确定目标数据报文对应的第一会话。S103a, the main CPU core of the centralized session synchronization device determines the first session corresponding to the target data packet from the locally stored sessions of the centralized session synchronization device.

具体的,如果集中式会话同步设备接收到交换机发送的封装后的目标数据报文,首先,主CPU核可以对该封装后的目标数据报文进行解封装处理,然后,主CPU核可以读取目标数据报文所包含的对应的会话的五元组信息,根据该五元组信息,在集中式会话同步设备的本地存储的会话中确定出五元组信息与目标数据报文所包含的五元组信息相同的会话。Specifically, if the centralized session synchronization device receives the encapsulated target data packet sent by the switch, first, the main CPU core can decapsulate the encapsulated target data packet, and then the main CPU core can read the encapsulated target data packet. The quintuple information of the corresponding session contained in the target data packet, according to the quintuple information, determine the quintuple information and the quintuple information contained in the target data packet in the session stored locally in the centralized session synchronization device. Sessions with the same tuple information.

S103b,集中式会话同步设备的主CPU核按照预设的哈希算法,对第一会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核。S103b, the main CPU core of the centralized session synchronization device performs hash calculation on the attribute of the first session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result.

集中式会话同步设备的主CPU核从集中式会话同步设备的本地存储的会话中确定目标数据报文对应的第一会话后,主CPU核可以按照对称哈希算法对第一会话的属性进行哈希计算,得到第一会话的哈希特征值;根据第一会话的哈希特征值,依据预设的选择规则,从集中式会话同步设备本地中除了主CPU核以外的其他CPU核中选择出第一会话对应的目标CPU核。After the main CPU core of the centralized session synchronization device determines the first session corresponding to the target data packet from the locally stored sessions of the centralized session synchronization device, the main CPU core can perform hashing on the attributes of the first session according to the symmetric hash algorithm. According to the hash characteristic value of the first session, and according to the preset selection rule, select from other CPU cores except the main CPU core in the local centralized session synchronization device The target CPU core corresponding to the first session.

需要说明的是,目标CPU核为集中式会话同步设备本地中除了主CPU核以外的其他CPU核中的某一个CPU核。第一对话对应唯一的一个目标CPU核。预设的选择规则可以根据实际需要预先设定,也可以根据经验设定,本发明对此并不限制。It should be noted that the target CPU core is a certain CPU core among other CPU cores other than the main CPU core in the local centralized session synchronization device. The first dialogue corresponds to only one target CPU core. The preset selection rule may be preset according to actual needs, or may be set according to experience, which is not limited in the present invention.

S103c,集中式会话同步设备的主CPU核调度步骤S103b的目标CPU核,使得步骤S103b的目标CPU核根据第一会话,将目标数据报文发送至应用服务器群。S103c, the main CPU core of the centralized session synchronization device schedules the target CPU core of step S103b, so that the target CPU core of step S103b sends the target data message to the application server group according to the first session.

集中式会话同步设备的主CPU核在确定出目标数据报文对应的第一会话,并选择出第一会话对应的目标CPU核后,可以调度该目标CPU核根据第一会话将目标数据报文发送至应用服务器群。After determining the first session corresponding to the target data packet and selecting the target CPU core corresponding to the first session, the main CPU core of the centralized session synchronization device can schedule the target CPU core to transfer the target data packet according to the first session. Sent to the application server farm.

本优选实施例中,集中式会话同步设备的主CPU核先确定出目标数据报文对应的第一会话,再选择出第一会话对应的目标CPU核,且第一会话对应唯一的一个目标CPU核。这样能够实现:只要一个数据报文对应的会话是第一会话,就由第一会话对应的目标CPU核将这个数据报文发送至应用服务器群,也就是说,所对应的会话为同一会话的不同数据报文,均由同一个CPU核发送至应用服务器群,从而实现了对数据报文的无锁化处理,提高了集中式会话同步设备的会话管理能力和数目报文的发送效率。In this preferred embodiment, the main CPU core of the centralized session synchronization device first determines the first session corresponding to the target data packet, and then selects the target CPU core corresponding to the first session, and the first session corresponds to a unique target CPU nuclear. In this way, as long as the session corresponding to a data packet is the first session, the target CPU core corresponding to the first session sends the data packet to the application server group, that is, the corresponding session belongs to the same session. Different data packets are sent to the application server group by the same CPU core, which realizes the lock-free processing of data packets and improves the session management capability of the centralized session synchronization device and the transmission efficiency of the number of packets.

基于上述优选实施例,一种实现方式中,在步骤S103c之后,可以由步骤S103b的目标CPU核将第一会话的超时起始时刻更新为目标数据报文的发送完成时刻。Based on the above preferred embodiment, in an implementation manner, after step S103c, the target CPU core in step S103b may update the timeout start time of the first session to the completion time of sending the target data message.

进一步地,可以由步骤S103b的目标CPU核根据已更新的第一会话的超时起始时刻,检测第一会话的会话超时时长是否达到预设时长,若第一会话的会话超时时长达到预设时长,销毁第一会话。Further, the target CPU core of step S103b may detect whether the session timeout duration of the first session reaches the preset duration according to the updated timeout start time of the first session, and if the session timeout duration of the first session reaches the preset duration , destroys the first session.

具体的,为节约集中式会话同步设备的可用存储空间,并提高集中式会话同步设备对同步至集中式会话同步设备本地的会话的管理能力,目标CPU核可以周期性地检测第一会话的会话超时时长,第一会话的超时时长为第一会话的超时起始时刻到当前时刻的时长。如果第一会话的会话超时时长达到预设时长,则认为第一会话对应的TCP连接已断开,目标CPU核可以将第一会话进行销毁。Specifically, in order to save the available storage space of the centralized session synchronization device and improve the management capability of the centralized session synchronization device for the session synchronized to the local session of the centralized session synchronization device, the target CPU core can periodically detect the session of the first session The timeout duration, the timeout duration of the first session is the duration from the timeout start time of the first session to the current moment. If the session timeout duration of the first session reaches the preset duration, it is considered that the TCP connection corresponding to the first session has been disconnected, and the target CPU core can destroy the first session.

本发明实施例提供的报文发送方法中,负载均衡设备接收到交换发送的目标数据报文后,在负载均衡设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the packet sending method provided by the embodiment of the present invention, after receiving the target data packet sent by the exchange, the load balancing device searches for the session corresponding to the target data packet locally on the load balancing device. The switch sends the target data packet to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that, in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图2为本发明实施例提供的报文发送方法的第二种流程示意图,该方法应用于云计算网络中的负载均衡设备,包括以下步骤:FIG. 2 is a second schematic flowchart of a packet sending method provided by an embodiment of the present invention. The method is applied to a load balancing device in a cloud computing network, and includes the following steps:

S201,接收交换机发送的目标数据报文。S201: Receive a target data packet sent by a switch.

S202,在接收了目标数据报文的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话。S202, in the locally stored session of the load balancing device that has received the target data packet, search for a session corresponding to the target data packet.

S203,如果在接收了目标数据报文的负载均衡设备的本地存储的会话中,未查找到目标数据报文对应的会话,将目标数据报文发送至交换机,以使交换机将目标数据报文发送至集中式会话同步设备,从而使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。S203, if the session corresponding to the target data packet is not found in the session stored locally by the load balancing device that has received the target data packet, send the target data packet to the switch, so that the switch sends the target data packet to the centralized session synchronization device, so that the centralized session synchronization device sends the target data message to the application server group according to the locally stored session of the centralized session synchronization device.

本实施例中,上述步骤S201-S203可以分别与图1所述实施例的步骤S101-S103完全相同,这里不再重复。In this embodiment, the above steps S201-S203 may be completely the same as the steps S101-S103 in the embodiment shown in FIG. 1, respectively, and are not repeated here.

S204,通过交换机向集中式会话同步设备发送控制报文,以使得集中式会话同步设备根据控制报文进行信息同步。S204: Send a control packet to the centralized session synchronization device through the switch, so that the centralized session synchronization device performs information synchronization according to the control packet.

本实施例中,控制报文为用于进行信息同步的报文。具体的,控制报文可以是包含一个会话,并使得集中式会话同步设备根据该会话进行信息同步的报文。控制报文也可以是包含一个会话的一个状态,并使得集中式会话同步设备根据该状态进行信息同步的报文。In this embodiment, the control message is a message used for information synchronization. Specifically, the control message may be a message that includes a session and enables the centralized session synchronization device to synchronize information according to the session. The control message may also be a message that includes a state of a session and enables the centralized session synchronization device to synchronize information according to the state.

作为本发明的一个优选实施例,通过交换机向集中式会话同步设备发送控制报文,可以包括以下步骤S204a和S204b:As a preferred embodiment of the present invention, sending a control message to a centralized session synchronization device through a switch may include the following steps S204a and S204b:

S204a,确定负载均衡设备本地存储的会话中满足预设的同步条件的会话为待同步会话。S204a: Determine a session that meets a preset synchronization condition among the sessions stored locally by the load balancing device as a to-be-synchronized session.

如步骤S202所述,客户端与应用服务器之间可以建立会话,则负载均衡设备可以在负载均衡设备本地存储上述建立的会话。例如,负载均衡设备可以在负载均衡设备本地存储上述建立的会话的五元组信息。可以理解的是,根据客户端的需要,客户端和应用服务器群之间可以在不同的时刻建立多个会话,进而每个负载均衡设备也可以存储有多个所建立的会话。As described in step S202, a session can be established between the client and the application server, and the load balancing device can locally store the established session in the load balancing device. For example, the load balancing device may locally store the quintuple information of the session established above. It can be understood that, according to the needs of the client, multiple sessions may be established between the client and the application server group at different times, and each load balancing device may also store multiple established sessions.

本领域技术人员可以理解的是,在负载均衡设备的本地存储的会话中,持续时间较短以及所转发的数据报文数较少的会话可以归类为短连接会话。其中,会话的持续时间是指从建立会话完成时刻到当前时刻的时长,会话所转发的数据报文数是指在会话的持续时间内,由存储该会话的负载均衡设备基于该会话向应用服务器群发送的数据报文数。在实际使用中,为减轻集中式会话同步设备处理由云计算网络中的各个负载均衡同步至集中式会话同步设备本地的会话的压力,各个负载均衡设备可不必将负载均衡设备本地的短连接会话同步至集中式会话同步设备。因此,可以预先设置同步条件,由各个负载均衡设备在负载均衡设备本地存储的会话中确定出满足预设的同步条件的会话,则满足预设的同步条件的会话即为各个负载均衡设备需要同步至集中式会话同步设备的会话。It can be understood by those skilled in the art that, among the sessions stored locally by the load balancing device, a session with a shorter duration and a smaller number of forwarded data packets may be classified as a short connection session. The duration of the session refers to the duration from the moment when the session is established to the current moment, and the number of data packets forwarded by the session refers to the number of data packets forwarded by the session during the duration of the session. The number of data packets sent by the group. In actual use, in order to reduce the pressure on the centralized session synchronization device to process the sessions synchronized by each load balancer in the cloud computing network to the local session of the centralized session synchronization device, each load balancer does not need to store the local short connection session of the load balancer. Sync to a centralized session sync facility. Therefore, a synchronization condition can be preset, and each load balancing device determines a session that satisfies the preset synchronization condition from the sessions stored locally by the load balancing device, and the session that meets the preset synchronization condition is that each load balancing device needs to synchronize Sessions to a centralized session synchronization device.

一种实现方式中,预设的同步条件可以包括第一预设子同步条件和第二预设子同步条件。其中,In an implementation manner, the preset synchronization conditions may include a first preset sub-synchronization condition and a second preset sub-synchronization condition. in,

第一预设子同步条件可以为:会话的持续时间大于或等于会话持续时间预设值。The first preset sub-synchronization condition may be: the duration of the session is greater than or equal to the preset value of the session duration.

第二预设子同步条件可以为:通过会话所转发的数据报文数超过或等于数据报文转发数预设值。The second preset sub-synchronization condition may be: the number of data packets forwarded through the session exceeds or equals to a preset value of the number of data packets forwarded.

上述会话持续时间预设值和数据报文转发数预设值可以根据实际需要来设定,也可以根据经验来设定,本发明对此并不限制。The above-mentioned preset value of the session duration and the preset value of the forwarding number of data packets can be set according to actual needs, and can also be set according to experience, which is not limited in the present invention.

举例来说,假设设定的会话持续时间预设值为2s,设定的数据报文转发数预设值为10个。如果会话1的持续时间为5s,且会话1转发的数据报文数为20个,则会话1为满足上述预设的同步条件的会话。如果会话2的持续时间为5s,且会话2转发的数据报文数为8个,则会话2为不满足上述预设的同步条件的会话。For example, it is assumed that the preset session duration is set to 2s, and the preset number of data packet forwarding is set to 10. If the duration of session 1 is 5s, and the number of data packets forwarded by session 1 is 20, session 1 is a session that satisfies the above-mentioned preset synchronization condition. If the duration of session 2 is 5s, and the number of data packets forwarded by session 2 is 8, then session 2 is a session that does not meet the above-mentioned preset synchronization conditions.

当然,本申请只是以上述为例进行说明,预设的同步条件并不限于此。Of course, this application only takes the above as an example for description, and the preset synchronization conditions are not limited to this.

可以理解的是,负载均衡设备在任意时刻均有可能存储一客户端与应用服务器群之间建立的会话。因此,负载均衡设备可以按照预设的扫描周期依次对负载均衡设备的本地存储的会话进行扫描,从而周期性地确定负载均衡设备本地满足预设的同步条件的会话为待同步会话。在一种具体的实施方式里,负载均衡设备可以在首次扫描时,对负载均衡设备本地存储的全部会话依次进行扫描,并且在非首次扫描时,对负载均衡设备本地未被确定为满足预设的同步条件的会话依次进行扫描。当然,本申请只是以上述为例进行说明,负载均衡设备确定负载均衡设备的本地存储的会话中满足预设的同步条件的会话的方法并不限于此。It can be understood that the load balancing device may store a session established between a client and an application server group at any time. Therefore, the load balancing device may sequentially scan the sessions stored locally on the load balancing device according to a preset scanning period, thereby periodically determining the sessions locally satisfying the preset synchronization conditions of the load balancing device as the to-be-synchronized sessions. In a specific implementation manner, the load balancing device may scan all the sessions stored locally on the load balancing device in sequence during the first scan, and when it is not scanned for the first time, the local load balancing device is not determined to meet the preset requirements. Sessions of synchronization conditions are scanned sequentially. Of course, this application only uses the above as an example for description, and the method for the load balancing device to determine the session that satisfies the preset synchronization condition among the sessions stored locally on the load balancing device is not limited to this.

S204b,通过交换机向集中式会话同步设备发送包含待同步会话的控制报文。S204b, send a control packet including the session to be synchronized to the centralized session synchronization device through the switch.

负载均衡设备在确定出负载均衡设备本地存储的会话中满足预设的同步条件的待同步会话后,可以向交换机发送包含待同步会话的控制报文,由交换机将接收到的包含待同步会话的控制报文发送至集中式会话同步设备。需要说明的是,一个控制报文包含唯一的一个待同步会话。After the load balancing device determines the to-be-synchronized session that meets the preset synchronization conditions among the sessions stored locally on the load balancing device, it can send a control packet containing the to-be-synchronized session to the switch, and the switch will receive the received session containing the to-be-synchronized session. Control packets are sent to a centralized session synchronization device. It should be noted that a control packet contains only one session to be synchronized.

具体的,负载均衡设备可以将包含待同步会话的控制报文进行封装,并将封装后的包含待同步会话的控制报文发送至交换机,由交换机将接收到的封装后的包含待同步会话的控制报文发送至集中式会话同步设备。Specifically, the load balancing device may encapsulate the control packet containing the session to be synchronized, and send the encapsulated control packet containing the session to be synchronized to the switch, and the switch will receive the encapsulated control packet containing the session to be synchronized. Control packets are sent to a centralized session synchronization device.

例如,负载均衡设备可以将包含待同步会话的控制报文封装为vxlan格式。交换机接收到负载均衡设备发送的被封装为vxlan格式的包含待同步会话的控制报文后,并不对该封装后的包含待同步会话的控制报文进行解封装或解析处理,而是直接将该封装为vxlan格式的包含待同步会话的控制报文发送至集中式会话同步设备。当然,本申请只是以上述为例进行说明,负载均衡设备对包含待同步会话的控制报文的封装方法并不限于此。For example, the load balancing device may encapsulate the control packet containing the session to be synchronized into the vxlan format. After the switch receives the control packet containing the session to be synchronized and encapsulated in vxlan format sent by the load balancing device, it does not decapsulate or parse the encapsulated control packet containing the session to be synchronized, but directly converts the encapsulated control packet containing the session to be synchronized. The control packet containing the session to be synchronized encapsulated in vxlan format is sent to the centralized session synchronization device. Of course, this application only takes the above as an example for description, and the method for encapsulating the control packet including the session to be synchronized by the load balancing device is not limited to this.

作为本发明的另一个优选实施例,通过交换机向集中式会话同步设备发送控制报文,可以包括以下步骤S204c:As another preferred embodiment of the present invention, sending a control packet to the centralized session synchronization device through the switch may include the following step S204c:

S204c,检测目标会话的状态是否发生改变;若检测目标会话的状态发生改变,通过交换机向集中式会话同步设备发送包含目标会话的状态的控制报文。其中,目标会话为:已同步至集中式会话同步设备的本地会话。S204c, detecting whether the state of the target session changes; if it is detected that the state of the target session changes, send a control packet including the state of the target session to the centralized session synchronization device through the switch. The target session is: a local session that has been synchronized to the centralized session synchronization device.

本实施例中,TCP连接中的会话的状态,如表1所示。In this embodiment, the status of the session in the TCP connection is shown in Table 1.

表1Table 1

目标会话的状态可能是上述TCP状态机中的任意一个状态,且目标会话的状态都以报文的形式,通过交换机发送给负载均衡设备的,因而,负载均衡设备在检测出目标会话的状态发生改变后,可以向交换机发送包含目标会话的改变后状态的控制报文,由交换机将接收到的包含目标会话的改变后状态的控制报文发送至集中式会话同步设备。需要说明的是,一个控制报文包含唯一的一个目标会话的改变后状态。The state of the target session may be any of the above TCP state machines, and the state of the target session is sent to the load balancing device in the form of a packet through the switch. Therefore, the load balancing device detects that the state of the target session occurs. After the change, a control packet including the changed state of the target session can be sent to the switch, and the switch sends the received control packet including the changed state of the target session to the centralized session synchronization device. It should be noted that a control packet contains only one changed state of the target session.

具体的,负载均衡设备可以将包含目标会话的改变后状态的控制报文进行封装,并将封装后的包含目标会话的改变后状态的控制报文发送至交换机,由交换机将接收到的封装后的包含目标会话的改变后状态的控制报文发送至集中式会话同步设备。Specifically, the load balancing device may encapsulate the control packet containing the changed state of the target session, and send the encapsulated control packet containing the changed state of the target session to the switch, and the switch will encapsulate the received encapsulated control packet. The control message containing the changed state of the target session is sent to the centralized session synchronization device.

例如,负载均衡设备可以将包含目标会话的改变后状态的控制报文封装为vxlan格式。交换机接收到负载均衡设备发送的被封装为vxlan格式的包含目标会话的改变后状态的控制报文后,并不对该封装后的包含目标会话的改变后状态的控制报文进行解封装或解析处理,而是直接将该封装为vxlan格式的包含目标会话的改变后状态的控制报文发送至集中式会话同步设备。当然,本申请只是以上述为例进行说明,负载均衡设备对包含目标会话的改变后状态的控制报文的封装方法并不限于此。For example, the load balancing device may encapsulate a control packet containing the changed state of the target session into vxlan format. After the switch receives the control packet that contains the changed state of the target session and is encapsulated in vxlan format and sent by the load balancing device, it does not decapsulate or parse the encapsulated control packet that contains the changed state of the target session. , but directly send the control message encapsulated in vxlan format containing the changed state of the target session to the centralized session synchronization device. Of course, this application only takes the above as an example for description, and the method for encapsulating the control packet containing the changed state of the target session by the load balancing device is not limited to this.

需要说明的是,步骤S204c与步骤S204a-S204b之间没有严格的执行时间顺序。对于云计算网络中的一个负载均衡设备来说,只要负载均衡设备存储一个会话,且该会话为满足预设的同步条件的会话,就可以通过交换机向集中式会话同步设备发送包含该会话的控制报文。只要负载均衡设备检测到目标会话的状态发生改变,就可以通过交换机向集中式会话同步设备发送包含目标会话的改变后状态的控制报文。It should be noted that, there is no strict execution time sequence between step S204c and steps S204a-S204b. For a load balancing device in a cloud computing network, as long as the load balancing device stores a session, and the session is a session that satisfies the preset synchronization conditions, it can send a control containing the session to the centralized session synchronization device through the switch. message. As long as the load balancing device detects that the state of the target session changes, it can send a control packet including the changed state of the target session to the centralized session synchronization device through the switch.

相应地,一种实现方式中,集中式会话同步设备根据控制报文进行信息同步,可以包括步骤S204d-S204f:Correspondingly, in an implementation manner, the centralized session synchronization device performs information synchronization according to the control message, which may include steps S204d-S204f:

S204d,集中式会话同步设备的主CPU核确定控制报文对应的第二会话。S204d, the main CPU core of the centralized session synchronization device determines the second session corresponding to the control packet.

具体的,如果集中式会话同步设备接收到交换机发送的封装后的控制报文,首先,主CPU核可以对该封装后的控制报文进行解封装处理;然后,Specifically, if the centralized session synchronization device receives the encapsulated control packet sent by the switch, first, the main CPU core can decapsulate the encapsulated control packet; then,

针对控制报文为步骤S204b控制报文的情况而言,主CPU核可以读取控制报文所包含的会话的五元组信息,从而将控制报文所包含的会话确定为控制报文对应的第二会话;For the case where the control message is the control message in step S204b, the main CPU core can read the quintuple information of the session included in the control message, so as to determine the session included in the control message as the corresponding session of the control message. second session;

针对控制报文为步骤S204c控制报文的情况而言,主CPU核可以读取目标会话的五元组信息,从而将目标会话确定为控制报文对应的第二会话。In the case where the control packet is the control packet in step S204c, the main CPU core may read the quintuple information of the target session, thereby determining the target session as the second session corresponding to the control packet.

S204e,集中式会话同步设备的主CPU核按照预设的哈希算法,对第二会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核。S204e, the main CPU core of the centralized session synchronization device performs hash calculation on the attribute of the second session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result.

集中式会话同步设备的主CPU核确定了控制报文对应的第二会话后,主CPU核可以按照对称哈希算法对步骤第二会话的属性进行哈希计算,得到第二会话的哈希特征值;根据第二会话的哈希特征值,依据预设的选择规则,从集中式会话同步设备本地中除了主CPU核以外的其他CPU核中选择出第二会话对应的目标CPU核。After the main CPU core of the centralized session synchronization device determines the second session corresponding to the control message, the main CPU core can perform hash calculation on the attributes of the second session according to the symmetric hash algorithm to obtain the hash feature of the second session. value; according to the hash feature value of the second session, according to a preset selection rule, select the target CPU core corresponding to the second session from other CPU cores except the main CPU core in the local centralized session synchronization device.

需要说明的是,目标CPU核为集中式会话同步设备本地中除了主CPU核以外的其他CPU核中的某一个CPU核。第二对话对应唯一的一个目标CPU核。It should be noted that the target CPU core is a certain CPU core among other CPU cores other than the main CPU core in the local centralized session synchronization device. The second dialogue corresponds to only one target CPU core.

S204f,集中式会话同步设备的主CPU核调度步骤S204e的目标CPU核根据第二会话进行信息同步。S204f, the main CPU core of the centralized session synchronization device schedules the target CPU core of step S204e to perform information synchronization according to the second session.

针对第二会话为步骤S204b控制报文所包含会话的情况而言,集中式会话同步设备的主CPU核选择出目标CPU核后,目标CPU核可以对第二会话进行初始化。具体的,目标CPU核可以为第二会话分配存储空间,并调度集中式会话同步设备本地的存储器存储第二会话,例如,目标CPU核可以调度集中式会话同步设备本地的存储器存储第二会话的五元组信息。For the case where the second session is included in the control message in step S204b, after the main CPU core of the centralized session synchronization device selects the target CPU core, the target CPU core can initialize the second session. Specifically, the target CPU core may allocate storage space for the second session, and schedule the local memory of the centralized session synchronization device to store the second session. For example, the target CPU core may schedule the local memory of the centralized session synchronization device to store the data of the second session. Quintuple information.

针对第二会话为步骤S204c目标会话的情况而言,集中式会话同步设备的主CPU核选择出目标CPU核后,目标CPU核可以调度集中式会话同步设备本地的存储器存储目标会话的改变后状态。For the case where the second session is the target session in step S204c, after the main CPU core of the centralized session synchronization device selects the target CPU core, the target CPU core can schedule the local memory of the centralized session synchronization device to store the changed state of the target session .

一种实现方式中,在步骤S204f之后,可以由步骤S204e的目标CPU核将第二会话的超时起始时刻更新为信息同步完成时刻。从而目标CPU核可以等待对第二会话执行销毁处理。In an implementation manner, after step S204f, the target CPU core of step S204e may update the timeout start time of the second session to the information synchronization completion time. Thus, the target CPU core can wait to perform the destruction process on the second session.

进一步地,可以由步骤S204e的目标CPU核根据已更新的第二会话的超时起始时刻,检测第二会话的会话超时时长是否达到预设时长,若第二会话的会话超时时长达到预设时长,销毁第二会话。Further, the target CPU core of step S204e can detect whether the session timeout duration of the second session reaches the preset duration according to the updated timeout start time of the second session, if the session timeout duration of the second session reaches the preset duration. , destroys the second session.

具体的,为节约集中式会话同步设备的可用存储空间,并提高集中式会话同步设备对同步至集中式会话同步设备本地的会话的管理能力,目标CPU核可以周期性地检测第二会话的会话超时时长,第二会话的超时时长为第二会话的超时起始时刻到当前时刻的时长。如果第二会话的会话超时时长达到预设时长,则认为第二会话对应的TCP连接已断开,目标CPU核可以将第二会话进行销毁。Specifically, in order to save the available storage space of the centralized session synchronization device and improve the management capability of the centralized session synchronization device for the session synchronized to the local session of the centralized session synchronization device, the target CPU core can periodically detect the session of the second session Timeout duration, the timeout duration of the second session is the duration from the timeout start time of the second session to the current time. If the session timeout duration of the second session reaches the preset duration, it is considered that the TCP connection corresponding to the second session has been disconnected, and the target CPU core can destroy the second session.

需要说明的是,步骤S204与步骤S201-S203之间没有严格的执行时间顺序。对于云计算网络中的一个负载均衡设备来说,只要在负载均衡设备的本地存储的会话中未查找到接收到的目标数据报文对应的会话,就可以将该目标数据报文发送至交换机,以使交换机发送至集中式会话同步设备。只要负载均衡设备需要向集中式会话同步设备同步信息,就可以通过交换机向集中式会话同步设备发送用于进行信息同步的控制报文。具体的,结合步骤S204所给出的优选实施例来说,只要负载均衡设备存储一个会话,且该会话为满足预设的同步条件的会话,就可以通过交换机向集中式会话同步设备发送包含该会话的控制报文。同样,只要负载均衡设备检测到目标会话的状态发生改变,就可以通过交换机向集中式会话同步设备发送包含目标会话的改变后状态的控制报文。It should be noted that there is no strict execution time sequence between step S204 and steps S201-S203. For a load balancing device in the cloud computing network, as long as the session corresponding to the received target data packet is not found in the session stored locally on the load balancing device, the target data packet can be sent to the switch. for the switch to send to the centralized session synchronization facility. As long as the load balancing device needs to synchronize information to the centralized session synchronization device, it can send a control packet for information synchronization to the centralized session synchronization device through the switch. Specifically, with reference to the preferred embodiment given in step S204, as long as the load balancing device stores a session, and the session is a session that satisfies the preset synchronization conditions, it can send a message containing the session synchronization device to the centralized session synchronization device through the switch. Session control packets. Likewise, as long as the load balancing device detects that the state of the target session changes, it can send a control packet including the changed state of the target session to the centralized session synchronization device through the switch.

本发明实施例提供的报文发送方法中,负载均衡设备接收到交换发送的目标数据报文后,在负载均衡设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力,并且,在集中式会话同步设备中,发送目标数据报文,以及对目标数据报文对应的会话进行信息同步,均在相同的一个CPU核上实现,从而实现了无锁化处理,提升了集中式会话同步管理会话和发送数据报文的性能。In the packet sending method provided by the embodiment of the present invention, after receiving the target data packet sent by the exchange, the load balancing device searches for the session corresponding to the target data packet locally on the load balancing device. The switch sends the target data packet to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic. In the centralized session synchronization device, Sending the target data message and synchronizing the session corresponding to the target data message are all implemented on the same CPU core, thereby realizing lock-free processing and improving the centralized session synchronization management session and sending data messages. performance.

图3为本发明实施例提供的报文发送方法的第三种流程示意图,该方法应用于云计算网络中的交换机,包括以下步骤:3 is a third schematic flowchart of a method for sending a message according to an embodiment of the present invention. The method is applied to a switch in a cloud computing network, and includes the following steps:

S301,接收目标数据报文。S301. Receive a target data message.

在云计算网络中,当客户端需要向应用服务器群发送目标数据报文时,可以先将目标数据报文发送至交换机,交换机接收该目标数据报文。In a cloud computing network, when a client needs to send a target data packet to an application server group, it can first send the target data packet to a switch, and the switch receives the target data packet.

S302,对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备,并将目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话。S302: Perform route allocation on the target data packet, determine a load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device is in the selected load balancing device. Find the session corresponding to the target data packet in the session stored locally on the determined load balancing device.

交换机对目标数据报文进行路由分配,即为交换机确定用于转发目标数据报文的负载均衡设备。The switch allocates routes to the target data packets, that is, determines a load balancing device for the switch to forward the target data packets.

可以理解的是,所确定的负载均衡设备为云计算网络中多个负载均衡设备中的某一个负载均衡设备。It can be understood that the determined load balancing device is a certain load balancing device among multiple load balancing devices in the cloud computing network.

本实施例中,交换机接收到目标数据报文后,可以根据预设的ECMP-hash算法对目标数据报文进行路由分配,即可以根据预设的ECMP-hash算法在云计算网络中的多个负载均衡设备中确定用于转发目标数据报文的负载均衡设备。当然,本申请只是以上述为例进行说明,交换机对目标数据报文进行路由分配的方法并不限于此。In this embodiment, after receiving the target data packet, the switch can perform route allocation to the target data packet according to the preset ECMP-hash algorithm, that is, according to the preset ECMP-hash algorithm, multiple The load balancing device for forwarding the target data packet is determined in the load balancing device. Of course, this application only takes the above as an example for description, and the method for the switch to perform route allocation to the target data packet is not limited to this.

本实施例中,步骤S302中的所确定的负载均衡设备在所确定的负载均衡设备的本地存储的会话中查找目标数据报文对应的会话,可以与图1所述实施例的步骤S102完全相同,这里不再重复。In this embodiment, the determined load balancing device in step S302 searches for the session corresponding to the target data packet in the locally stored session of the determined load balancing device, which may be exactly the same as step S102 in the embodiment shown in FIG. 1 . , and will not be repeated here.

S303,接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备,以使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。S303: Receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device can The stored session sends the target data packet to the application server farm.

具体的,负载均衡设备可以将目标数据报文进行封装,并将封装后的目标数据报文发送至交换机,交换机将接收到的封装后的目标数据报文发送至集中式会话同步设备。Specifically, the load balancing device can encapsulate the target data packet, and send the encapsulated target data packet to the switch, and the switch sends the received encapsulated target data packet to the centralized session synchronization device.

例如,负载均衡设备可以将目标数据报文封装为vxlan格式。交换机接收到负载均衡设备发送的被封装为vxlan格式的目标数据报文后,并不对该封装后的目标数据报文进行解封装或解析处理,而是直接将该封装为vxlan格式的目标数据报文发送至集中式会话同步设备。For example, the load balancing device can encapsulate the target data packet in vxlan format. After the switch receives the target data packet encapsulated in vxlan format sent by the load balancing device, it does not decapsulate or parse the encapsulated target data packet, but directly encapsulates the target data packet in vxlan format. messages to a centralized session synchronization facility.

本实施例中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。需要说明的是,可以采用现有技术实现从云计算网络的各个负载均衡设备向集中式会话同步设备同步会话。In this embodiment, the locally stored session of the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the cloud computing network. It should be noted that session synchronization from each load balancing device of a cloud computing network to a centralized session synchronization device may be implemented by using the prior art.

作为本发明的一个优选实施例,集中式会话同步设备根据集中式会话同步设备本地存储的会话,将目标数据报文发送至应用服务器群,可以包括步骤S303a-S303c:As a preferred embodiment of the present invention, the centralized session synchronization device sends the target data packet to the application server group according to the session stored locally by the centralized session synchronization device, which may include steps S303a-S303c:

S303a,集中式会话同步设备的主CPU核,从集中式会话同步设备本地存储的会话中,确定目标数据报文对应的第一会话。S303a, the main CPU core of the centralized session synchronization device determines the first session corresponding to the target data packet from the sessions stored locally by the centralized session synchronization device.

S303b,集中式会话同步设备的主CPU核按照预设的哈希算法,对第一会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核。S303b, the main CPU core of the centralized session synchronization device performs hash calculation on the attribute of the first session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result.

S303c,集中式会话同步设备的主CPU核调度步骤S303b的目标CPU核,使得步骤S303b的目标CPU核根据第一会话,将目标数据报文发送至应用服务器群。S303c, the main CPU core of the centralized session synchronization device schedules the target CPU core of step S303b, so that the target CPU core of step S303b sends the target data packet to the application server group according to the first session.

本优选实施例中,上述步骤S303a-S303c可以分别与步骤S103a-S103c完全相同,这里不再重复。In this preferred embodiment, the above steps S303a-S303c may be completely the same as the steps S103a-S103c, respectively, and will not be repeated here.

基于上述优选实施例,一种实现方式中,在步骤S303c之后,可以由步骤S303b的目标CPU核将第一会话的超时起始时刻更新为目标数据报文的发送完成时刻。Based on the above preferred embodiment, in an implementation manner, after step S303c, the target CPU core in step S303b may update the timeout start time of the first session to the completion time of sending the target data message.

进一步地,可以由步骤S303b的目标CPU核根据已更新的第一会话的超时起始时刻,检测第一会话的会话超时时长是否达到预设时长,若第一会话的会话超时时长达到预设时长,销毁第一会话。Further, the target CPU core of step S303b may detect whether the session timeout duration of the first session reaches the preset duration according to the updated timeout start time of the first session, and if the session timeout duration of the first session reaches the preset duration , destroys the first session.

具体的,为节约集中式会话同步设备的可用存储空间,并提高集中式会话同步设备对同步至集中式会话同步设备本地的会话的管理能力,目标CPU核可以周期性地检测第一会话的会话超时时长,第一会话的超时时长为第一会话的超时起始时刻到当前时刻的时长。如果第一会话的会话超时时长达到预设时长,则认为第一会话对应的TCP连接已断开,目标CPU核可以将第一会话进行销毁。Specifically, in order to save the available storage space of the centralized session synchronization device and improve the management capability of the centralized session synchronization device for the session synchronized to the local session of the centralized session synchronization device, the target CPU core can periodically detect the session of the first session The timeout duration, the timeout duration of the first session is the duration from the timeout start time of the first session to the current moment. If the session timeout duration of the first session reaches the preset duration, it is considered that the TCP connection corresponding to the first session has been disconnected, and the target CPU core can destroy the first session.

本发明实施例提供的报文发送方法中,交换机将接收到的目标数据报文发送至对其进行路由分配后所确定的负载均衡设备,并在负载均衡设备在负载均衡设备本地未查找目标数据报文对应的会话后,接收负载均衡设备发送的目标数据报文,并将其发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending method provided by the embodiment of the present invention, the switch sends the received target data message to the load balancing device determined after routing allocation, and the load balancing device does not search for the target data locally in the load balancing device After the session corresponding to the message, the target data message sent by the load balancing device is received and sent to the centralized session synchronization device, which sends the target data message to the application server group. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device can realize the sending of the target data packet, thereby avoiding the load balancing in the cloud computing network. The device needs to store the session information of all load balancing devices in the cluster resulting in excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图4a为本发明实施例提供的报文发送方法的第四种流程示意图,该方法应用于云计算网络中的交换机,包括以下步骤:4a is a fourth schematic flowchart of a method for sending a message according to an embodiment of the present invention. The method is applied to a switch in a cloud computing network, and includes the following steps:

S401,接收目标数据报文。S401. Receive a target data message.

S402,对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备,并将目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话。S402: Perform route allocation on the target data packet, determine a load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device is in the specified load balancing device. Find the session corresponding to the target data packet in the session stored locally on the determined load balancing device.

S403,接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备,以使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。S403: Receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device can The stored session sends the target data packet to the application server farm.

本实施例中,上述步骤S401-S403可以分别与图3所述实施例的步骤S301-S303完全相同,这里不再重复。In this embodiment, the above steps S401-S403 may be completely the same as the steps S301-S303 in the embodiment shown in FIG. 3, respectively, and will not be repeated here.

S404,接收负载均衡设备发送的控制报文,并将控制报文发送至集中式会话同步设备,以使得集中式会话同步设备根据控制报文进行信息同步。S404: Receive the control packet sent by the load balancing device, and send the control packet to the centralized session synchronization device, so that the centralized session synchronization device performs information synchronization according to the control packet.

本实施例中,控制报文为用于进行信息同步的报文。具体的,控制报文可以是包含一个会话,并使得集中式会话同步设备根据该会话进行信息同步的报文。控制报文也可以是包含一个会话的一个状态,并使得集中式会话同步设备根据该状态进行信息同步的报文。In this embodiment, the control message is a message used for information synchronization. Specifically, the control message may be a message that includes a session and enables the centralized session synchronization device to synchronize information according to the session. The control message may also be a message that includes a state of a session and enables the centralized session synchronization device to synchronize information according to the state.

作为本发明的一个优选实施例,接收负载均衡设备发送的控制报文,并将控制报文发送至集中式会话同步设备,可以包括以下步骤S404a:As a preferred embodiment of the present invention, receiving the control packet sent by the load balancing device and sending the control packet to the centralized session synchronization device may include the following step S404a:

S404a,接收负载均衡设备在确定出负载均衡设备本地满足预设的同步条件的待同步会话后,发送的包含待同步会话的控制报文,并将包含待同步会话的控制报文发送至集中式会话同步设备。S404a, after the load balancing device determines the to-be-synchronized session that satisfies the preset synchronization condition locally, the control packet including the to-be-synchronized session sent by the load balancing device is received, and the control packet including the to-be-synchronized session is sent to the centralized Session sync device.

如步骤S402所述,客户端与应用服务器之间可以建立会话,则负载均衡设备可以在负载均衡设备本地存储上述建立的会话。例如,负载均衡设备可以在负载均衡设备本地存储上述建立的会话的五元组信息。可以理解的是,根据客户端的需要,客户端和应用服务器群之间可以在不同的时刻建立多个会话,进而每个负载均衡设备也可以存储有多个所建立的会话。As described in step S402, a session can be established between the client and the application server, and the load balancing device can locally store the established session in the load balancing device. For example, the load balancing device may locally store the quintuple information of the session established above. It can be understood that, according to the needs of the client, multiple sessions may be established between the client and the application server group at different times, and each load balancing device may also store multiple established sessions.

本领域技术人员可以理解的是,在负载均衡设备的本地存储的会话中,持续时间较短以及所转发的数据报文数较少的会话可以归类为短连接会话。其中,会话的持续时间是指从建立会话完成时刻到当前时刻的时长,会话所转发的数据报文数是指在会话的持续时间内,由存储该会话的负载均衡设备基于该会话向应用服务器群发送的数据报文数。在实际使用中,为减轻集中式会话同步设备处理由云计算网络中的各个负载均衡同步至集中式会话同步设备本地的会话的压力,各个负载均衡设备可不必将负载均衡设备本地的短连接会话同步至集中式会话同步设备。因此,可以预先设置同步条件,由各个负载均衡设备在负载均衡设备本地存储的会话中确定出满足预设的同步条件的会话,则满足预设的同步条件的会话即为各个负载均衡设备需要同步至集中式会话同步设备的会话。It can be understood by those skilled in the art that, among the sessions stored locally by the load balancing device, a session with a shorter duration and a smaller number of forwarded data packets may be classified as a short connection session. The duration of the session refers to the duration from the moment when the session is established to the current moment, and the number of data packets forwarded by the session refers to the number of data packets forwarded by the session during the duration of the session. The number of data packets sent by the group. In actual use, in order to reduce the pressure on the centralized session synchronization device to process the sessions synchronized by each load balancer in the cloud computing network to the local session of the centralized session synchronization device, each load balancer does not need to store the local short connection session of the load balancer. Sync to a centralized session sync facility. Therefore, a synchronization condition can be preset, and each load balancing device determines a session that satisfies the preset synchronization condition from the sessions stored locally by the load balancing device, and the session that meets the preset synchronization condition is that each load balancing device needs to synchronize Sessions to a centralized session synchronization device.

一种实现方式中,预设的同步条件可以包括第一预设子同步条件和第二预设子同步条件。其中,In an implementation manner, the preset synchronization conditions may include a first preset sub-synchronization condition and a second preset sub-synchronization condition. in,

第一预设子同步条件可以为:会话的持续时间大于或等于会话持续时间预设值。The first preset sub-synchronization condition may be: the duration of the session is greater than or equal to the preset value of the session duration.

第二预设子同步条件可以为:通过会话所转发的数据报文数超过或等于数据报文转发数预设值。The second preset sub-synchronization condition may be: the number of data packets forwarded through the session exceeds or equals to a preset value of the number of data packets forwarded.

上述会话持续时间预设值和数据报文转发数预设值可以根据实际需要来设定,也可以根据经验来设定,本发明对此并不限制。The above-mentioned preset value of the session duration and the preset value of the forwarding number of data packets can be set according to actual needs, and can also be set according to experience, which is not limited in the present invention.

当然,本申请只是以上述为例进行说明,预设的同步条件并不限于此。Of course, this application only takes the above as an example for description, and the preset synchronization conditions are not limited to this.

负载均衡设备可以向交换机发送包含待同步会话的控制报文,交换机接收负载均衡设备发送的包含待同步会话的控制报文。需要说明的是,一个控制报文包含唯一的一个待同步的会话。The load balancing device may send a control packet containing the session to be synchronized to the switch, and the switch receives the control packet containing the session to be synchronized sent by the load balancing device. It should be noted that a control packet contains only one session to be synchronized.

具体的,负载均衡设备可以将包含待同步会话的控制报文进行封装,并将封装后的包含待同步会话的控制报文发送至交换机,交换机将接收到的封装后的包含待同步会话的控制报文发送至集中式会话同步设备。Specifically, the load balancing device may encapsulate the control packet containing the session to be synchronized, and send the encapsulated control packet containing the session to be synchronized to the switch, and the switch will receive the encapsulated control packet containing the session to be synchronized. The message is sent to the centralized session synchronization device.

例如,负载均衡设备可以将包含待同步会话的控制报文封装为vxlan格式。交换机接收到负载均衡设备发送的被封装为vxlan格式的包含待同步会话的控制报文后,并不对该封装后的包含待同步会话的控制报文进行解封装或解析处理,而是直接将该封装为vxlan格式的包含待同步会话的控制报文发送至集中式会话同步设备。For example, the load balancing device may encapsulate the control packet containing the session to be synchronized into the vxlan format. After the switch receives the control packet containing the session to be synchronized and encapsulated in vxlan format sent by the load balancing device, it does not decapsulate or parse the encapsulated control packet containing the session to be synchronized, but directly converts the encapsulated control packet containing the session to be synchronized. The control packet containing the session to be synchronized encapsulated in vxlan format is sent to the centralized session synchronization device.

作为本发明的另一个优选实施例,接收负载均衡设备发送的控制报文,并将控制报文发送至集中式会话同步设备,可以包括以下步骤S404b:As another preferred embodiment of the present invention, receiving the control packet sent by the load balancing device and sending the control packet to the centralized session synchronization device may include the following step S404b:

S404b,接收负载均衡设备在检测到目标会话的状态发生改变后,发送的包含目标会话的状态的控制报文,并将包含目标会话的状态的控制报文发送至集中式会话同步设备,其中,目标会话为:已同步至集中式会话同步设备的本地会话。S404b, receiving a control packet including the state of the target session sent by the load balancing device after detecting that the state of the target session has changed, and sending the control packet including the state of the target session to the centralized session synchronization device, wherein, The target session is: a local session that has been synced to the centralized session sync device.

本实施例中,TCP连接中的会话的状态,如表1所示。In this embodiment, the status of the session in the TCP connection is shown in Table 1.

负载均衡设备在检测出目标会话的状态发生改变后,可以向交换机发送包含目标会话的改变后状态的控制报文,交换机将接收到的包含目标会话的改变后状态的控制报文发送至集中式会话同步设备。需要说明的是,一个控制报文包含唯一的一个目标会话的改变后状态。After the load balancing device detects that the state of the target session has changed, it can send a control packet containing the changed state of the target session to the switch, and the switch will send the received control packet containing the changed state of the target session to the centralized Session sync device. It should be noted that a control packet contains only one changed state of the target session.

具体的,负载均衡设备可以将包含目标会话的改变后状态的控制报文进行封装,并将封装后的包含目标会话的改变后状态的控制报文发送至交换机,交换机将接收到的封装后的包含目标会话的改变后状态的控制报文发送至集中式会话同步设备。Specifically, the load balancing device may encapsulate the control packet containing the changed state of the target session, and send the encapsulated control packet containing the changed state of the target session to the switch, and the switch will receive the encapsulated control packet. A control message containing the changed state of the target session is sent to the centralized session synchronization facility.

例如,负载均衡设备可以将包含目标会话的改变后状态的控制报文封装为vxlan格式。交换机接收到负载均衡设备发送的被封装为vxlan格式的包含目标会话的改变后状态的控制报文后,并不对该封装后的包含目标会话的改变后状态的控制报文进行解封装或解析处理,而是直接将该封装为vxlan格式的包含目标会话的改变后状态的控制报文发送至集中式会话同步设备。For example, the load balancing device may encapsulate a control packet containing the changed state of the target session into vxlan format. After the switch receives the control packet that contains the changed state of the target session and is encapsulated in vxlan format and sent by the load balancing device, it does not decapsulate or parse the encapsulated control packet that contains the changed state of the target session. , but directly send the control message encapsulated in vxlan format containing the changed state of the target session to the centralized session synchronization device.

需要说明的是,步骤S404b与步骤S404a之间没有严格的执行时间顺序。对于云计算网络中的交换机来说,只要接收到负载均衡设备在确定出负载均衡设备本地满足预设的同步条件的待同步会话后,发送的包含待同步会话的控制报文,就可以将该控制报文发送至集中式会话同步设备。只要接收到负载均衡设备在检测到目标会话的状态发生改变后,发送的包含目标会话的改变后状态的控制报文,就可以将该控制报文发送至集中式会话同步设备。It should be noted that there is no strict execution time sequence between step S404b and step S404a. For a switch in a cloud computing network, as long as it receives a control packet containing the to-be-synchronized session sent by the load balancing device after determining the to-be-synchronized session that the load balancing device locally satisfies the preset synchronization conditions, it can Control packets are sent to a centralized session synchronization device. As long as a control packet containing the changed state of the target session sent by the load balancing device after detecting that the state of the target session has changed is received, the control packet can be sent to the centralized session synchronization device.

相应地,一种实现方式中,集中式会话同步设备根据控制报文进行信息同步,可以包括步骤S404c-S404e:Correspondingly, in an implementation manner, the centralized session synchronization device performs information synchronization according to the control message, which may include steps S404c-S404e:

S404c,集中式会话同步设备的主CPU核确定控制报文对应的第二会话。S404c, the main CPU core of the centralized session synchronization device determines the second session corresponding to the control packet.

具体的,如果集中式会话同步设备接收到交换机发送的封装后的控制报文,首先,主CPU核可以对该封装后的控制报文进行解封装处理;然后,Specifically, if the centralized session synchronization device receives the encapsulated control packet sent by the switch, first, the main CPU core can decapsulate the encapsulated control packet; then,

针对控制报文为步骤S404a控制报文的情况而言,主CPU核可以读取控制报文所包含的会话的五元组信息,从而将控制报文所包含的会话确定为控制报文对应的第二会话;For the case where the control message is the control message in step S404a, the main CPU core can read the quintuple information of the session included in the control message, so as to determine the session included in the control message as the corresponding session of the control message. second session;

针对控制报文为步骤S404b控制报文的情况而言,主CPU核可以读取目标会话的五元组信息,从而将目标会话确定为控制报文对应的第二会话。In the case where the control message is the control message in step S404b, the main CPU core may read the quintuple information of the target session, so as to determine the target session as the second session corresponding to the control message.

S404d,集中式会话同步设备的主CPU核按照预设的哈希算法,对第二会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核。S404d, the main CPU core of the centralized session synchronization device performs hash calculation on the attribute of the second session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result.

集中式会话同步设备的主CPU核确定了控制报文对应的第二会话后,主CPU核可以按照对称哈希算法对步骤第二会话的属性进行哈希计算,得到第二会话的哈希特征值;根据第二会话的哈希特征值,依据预设的选择规则,从集中式会话同步设备本地中除了主CPU核以外的其他CPU核中选择出第二会话对应的目标CPU核。After the main CPU core of the centralized session synchronization device determines the second session corresponding to the control message, the main CPU core can perform hash calculation on the attributes of the second session according to the symmetric hash algorithm to obtain the hash feature of the second session. value; according to the hash feature value of the second session, according to a preset selection rule, select the target CPU core corresponding to the second session from other CPU cores except the main CPU core in the local centralized session synchronization device.

需要说明的是,目标CPU核为集中式会话同步设备本地中除了主CPU核以外的其他CPU核中的某一个CPU核。第二对话对应唯一的一个目标CPU核。It should be noted that the target CPU core is a certain CPU core among other CPU cores other than the main CPU core in the local centralized session synchronization device. The second dialogue corresponds to only one target CPU core.

S404e,集中式会话同步设备的主CPU核调度步骤S404d的目标CPU核根据第二会话进行信息同步。S404e, the main CPU core of the centralized session synchronization device schedules the target CPU core of step S404d to synchronize information according to the second session.

针对第二会话为步骤S404a控制报文所包含会话的情况而言,集中式会话同步设备的主CPU核选择出目标CPU核后,目标CPU核可以对第二会话进行初始化。具体的,目标CPU核可以为第二会话分配存储空间,并调度集中式会话同步设备本地的存储器存储第二会话,例如,目标CPU核可以调度集中式会话同步设备本地的存储器存储第二会话的五元组信息。For the case where the second session is included in the control message in step S404a, after the main CPU core of the centralized session synchronization device selects the target CPU core, the target CPU core can initialize the second session. Specifically, the target CPU core may allocate storage space for the second session, and schedule the local memory of the centralized session synchronization device to store the second session. For example, the target CPU core may schedule the local memory of the centralized session synchronization device to store the data of the second session. Quintuple information.

针对第二会话为步骤S404b目标会话的情况而言,集中式会话同步设备的主CPU核选择出目标CPU核后,目标CPU核可以调度集中式会话同步设备本地的存储器存储目标会话的改变后状态。For the case where the second session is the target session in step S404b, after the main CPU core of the centralized session synchronization device selects the target CPU core, the target CPU core can schedule the local memory of the centralized session synchronization device to store the changed state of the target session .

一种实现方式中,在步骤S404e之后,可以由步骤S404d的目标CPU核将第二会话的超时起始时刻更新为信息同步完成时刻。从而目标CPU核可以等待对第二会话执行销毁处理。In an implementation manner, after step S404e, the target CPU core of step S404d may update the timeout start time of the second session to the information synchronization completion time. Thus, the target CPU core can wait to perform the destruction process on the second session.

进一步地,可以由步骤S404d的目标CPU核根据已更新的第二会话的超时起始时刻,检测第二会话的会话超时时长是否达到预设时长,若第二会话的会话超时时长达到预设时长,销毁第二会话。Further, the target CPU core of step S404d can detect whether the session timeout duration of the second session reaches the preset duration according to the updated timeout start time of the second session, if the session timeout duration of the second session reaches the preset duration. , destroys the second session.

具体的,为节约集中式会话同步设备的可用存储空间,并提高集中式会话同步设备对同步至集中式会话同步设备本地的会话的管理能力,目标CPU核可以周期性地检测第二会话的会话超时时长,第二会话的超时时长为第二会话的超时起始时刻到当前时刻的时长。如果第二会话的会话超时时长达到预设时长,则认为第二会话对应的TCP连接已断开,目标CPU核可以将第二会话进行销毁。Specifically, in order to save the available storage space of the centralized session synchronization device and improve the management capability of the centralized session synchronization device for the session synchronized to the local session of the centralized session synchronization device, the target CPU core can periodically detect the session of the second session Timeout duration, the timeout duration of the second session is the duration from the timeout start time of the second session to the current time. If the session timeout duration of the second session reaches the preset duration, it is considered that the TCP connection corresponding to the second session has been disconnected, and the target CPU core can destroy the second session.

需要说明的是,步骤S404与步骤S401-S403之间没有严格的执行时间顺序。对于云计算网络中的一个交换机来说,只要接收到负载均衡设备在查找会话失败后发送的目标数据报文,就可以将该目标数据报文发送至集中式会话同步设备。只要接收到负载均衡设备在需要向集中式会话同步设备同步信息时,发送的用于进行信息同步的控制报文,就可以将该控制报文发送至集中式会话同步设备。具体的,结合步骤S404所给出的优选实施例来说,只要接收到负载均衡设备在确定出负载均衡设备本地满足预设的同步条件的待同步会话后,发送的包含待同步会话的控制报文,就可以将该控制报文发送至集中式会话同步设备。只要接收到负载均衡设备在检测到目标会话的状态发生改变后,发送的包含目标会话的改变后状态的控制报文,就可以将该控制报文发送至集中式会话同步设备。It should be noted that there is no strict execution time sequence between step S404 and steps S401-S403. For a switch in the cloud computing network, as long as it receives the target data packet sent by the load balancing device after failing to find a session, it can send the target data packet to the centralized session synchronization device. As long as the control packet for information synchronization sent by the load balancing device when it needs to synchronize information to the centralized session synchronization device is received, the control packet can be sent to the centralized session synchronization device. Specifically, with reference to the preferred embodiment given in step S404, as long as the load balancing device receives the to-be-synchronized session that satisfies the preset synchronization conditions locally, the control report containing the to-be-synchronized session sent by the load balancing device is received. message, the control message can be sent to the centralized session synchronization device. As long as a control packet containing the changed state of the target session sent by the load balancing device after detecting that the state of the target session has changed is received, the control packet can be sent to the centralized session synchronization device.

本发明实施例提供的报文发送方法中,交换机将接收到的目标数据报文发送至对其进行路由分配后所确定的负载均衡设备,并在负载均衡设备在负载均衡设备本地未查找目标数据报文对应的会话后,接收负载均衡设备发送的目标数据报文,并将其发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending method provided by the embodiment of the present invention, the switch sends the received target data message to the load balancing device determined after routing allocation, and the load balancing device does not search for the target data locally in the load balancing device After the session corresponding to the message, the target data message sent by the load balancing device is received and sent to the centralized session synchronization device, which sends the target data message to the application server group. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device can realize the sending of the target data packet, thereby avoiding the load balancing in the cloud computing network. The device needs to store the session information of all load balancing devices in the cluster resulting in excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图4b为本发明实施例提供的报文发送方法的第五种流程示意图,该方法应用于云计算网络中的集中式会话同步设备,包括以下步骤:4b is a fifth schematic flowchart of a message sending method provided by an embodiment of the present invention. The method is applied to a centralized session synchronization device in a cloud computing network, and includes the following steps:

S511,接收交换机发送的目标数据报文。S511: Receive the target data packet sent by the switch.

在云计算网络中,当客户端需要向应用服务器群发送目标数据报文时,首先将目标数据报文发送至交换机,由交换机对目标数据报文进行路由分配,即由交换机确定用于转发目标数据报文的负载均衡设备,然后交换机将目标数据报文发送至所确定的负载均衡设备。接收了目标数据报文的负载均衡设备在其本地存储的会话中查找目标数据报文对应的会话,如果未查找,则向交换机发送目标数据报文,交换机再将该目标数据报文发送至集中式会话同步设备。In a cloud computing network, when a client needs to send a target data packet to an application server group, it first sends the target data packet to the switch, and the switch assigns the route to the target data packet, that is, the switch determines the destination for forwarding. The load balancing device for the data packet, and then the switch sends the target data packet to the determined load balancing device. The load balancing device that has received the target data packet searches for the session corresponding to the target data packet in its locally stored sessions, and if not, sends the target data packet to the switch, and the switch sends the target data packet to the centralized session synchronization device.

可以理解的是,所确定的负载均衡设备为云计算网络中多个负载均衡设备中的某一个负载均衡设备。It can be understood that the determined load balancing device is a certain load balancing device among multiple load balancing devices in the cloud computing network.

S512,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。S512: Send the target data packet to the application server group according to the session stored locally in the centralized session synchronization device.

本实施例中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。需要说明的是,可以采用现有技术实现从云计算网络的各个负载均衡设备向集中式会话同步设备同步会话。In this embodiment, the locally stored session of the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the cloud computing network. It should be noted that session synchronization from each load balancing device of a cloud computing network to a centralized session synchronization device may be implemented by using the prior art.

作为本发明的一个优选实施例,集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,可以包括步骤S512a-S512c:As a preferred embodiment of the present invention, the centralized session synchronization device sends the target data packet to the application server group according to the locally stored session of the centralized session synchronization device, which may include steps S512a-S512c:

S512a,集中式会话同步设备的主CPU核,从集中式会话同步设备的本地存储的会话中,确定目标数据报文对应的第一会话。S512a, the main CPU core of the centralized session synchronization device determines the first session corresponding to the target data packet from the locally stored sessions of the centralized session synchronization device.

S512b,集中式会话同步设备的主CPU核按照预设的哈希算法,对第一会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核。S512b, the main CPU core of the centralized session synchronization device performs hash calculation on the attribute of the first session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result.

S512c,集中式会话同步设备的主CPU核调度步骤S512b的目标CPU核,使得步骤S512b的目标CPU核根据第一会话,将目标数据报文发送至应用服务器群。S512c, the main CPU core of the centralized session synchronization device schedules the target CPU core of step S512b, so that the target CPU core of step S512b sends the target data message to the application server group according to the first session.

本优选实施例中,上述步骤S512a-S512c可以分别与图1所述实施例的步骤S103a-S103c完全相同,这里不再重复。In this preferred embodiment, the above steps S512a-S512c may be completely the same as the steps S103a-S103c in the embodiment shown in FIG. 1, respectively, and will not be repeated here.

本优选实施例中,集中式会话同步设备的主CPU核先确定出目标数据报文对应的第一会话,再选择出第一会话对应的目标CPU核,且第一会话对应唯一的一个目标CPU核。这样能够实现:只要一个数据报文对应的会话是第一会话,就由第一会话对应的目标CPU核将这个数据报文发送至应用服务器群,也就是说,所对应的会话为同一会话的不同数据报文,均由同一个CPU核发送至应用服务器群,从而实现了对数据报文的无锁化处理,提高了集中式会话同步设备的会话管理能力和数目报文的发送效率。In this preferred embodiment, the main CPU core of the centralized session synchronization device first determines the first session corresponding to the target data packet, and then selects the target CPU core corresponding to the first session, and the first session corresponds to a unique target CPU nuclear. In this way, as long as the session corresponding to a data packet is the first session, the target CPU core corresponding to the first session sends the data packet to the application server group, that is, the corresponding session belongs to the same session. Different data packets are sent to the application server group by the same CPU core, which realizes the lock-free processing of data packets, and improves the session management capability of the centralized session synchronization device and the transmission efficiency of the number of packets.

基于上述优选实施例,一种实现方式中,在步骤S512c之后,可以由步骤S512b的目标CPU核将第一会话的超时起始时刻更新为目标数据报文的发送完成时刻。Based on the above preferred embodiment, in an implementation manner, after step S512c, the target CPU core in step S512b may update the timeout start time of the first session to the completion time of sending the target data message.

进一步地,可以由步骤S512b的目标CPU核根据已更新的第一会话的超时起始时刻,检测第一会话的会话超时时长是否达到预设时长,若第一会话的会话超时时长达到预设时长,销毁第一会话。Further, the target CPU core of step S512b can detect whether the session timeout duration of the first session reaches the preset duration according to the updated timeout start time of the first session, if the session timeout duration of the first session reaches the preset duration. , destroys the first session.

具体的,为节约集中式会话同步设备的可用存储空间,并提高集中式会话同步设备对同步至集中式会话同步设备本地的会话的管理能力,目标CPU核可以周期性地检测第一会话的会话超时时长,第一会话的超时时长为第一会话的超时起始时刻到当前时刻的时长。如果第一会话的会话超时时长达到预设时长,则认为第一会话对应的TCP连接已断开,目标CPU核可以将第一会话进行销毁。Specifically, in order to save the available storage space of the centralized session synchronization device and improve the management capability of the centralized session synchronization device for the session synchronized to the local session of the centralized session synchronization device, the target CPU core can periodically detect the session of the first session The timeout duration, the timeout duration of the first session is the duration from the timeout start time of the first session to the current moment. If the session timeout duration of the first session reaches the preset duration, it is considered that the TCP connection corresponding to the first session has been disconnected, and the target CPU core can destroy the first session.

本发明实施例提供的报文发送方法中,集中式会话同步设备接收到交换发送的目标数据报文后,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending method provided by the embodiment of the present invention, after receiving the target data message sent by the exchange, the centralized session synchronization device sends the target data message to the application server group according to the session stored locally by the centralized session synchronization device . It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图4c为本发明实施例提供的报文发送方法的第六种流程示意图,该方法应用于云计算网络中的集中式会话同步设备,包括以下步骤:4c is a sixth schematic flowchart of a message sending method provided by an embodiment of the present invention. The method is applied to a centralized session synchronization device in a cloud computing network, and includes the following steps:

S611,接收交换机发送的目标数据报文。S611: Receive a target data packet sent by the switch.

S612,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。S612: Send the target data packet to the application server group according to the locally stored session of the centralized session synchronization device.

本实施例中,上述步骤S611-S612可以分别与图4b所述实施例的步骤S511-S512完全相同,这里不再重复。In this embodiment, the above-mentioned steps S611-S612 may be exactly the same as the steps S511-S512 in the embodiment shown in FIG. 4b, respectively, and will not be repeated here.

S613,接收交换机发送的控制报文;根据控制报文进行信息同步。S613: Receive a control message sent by the switch; perform information synchronization according to the control message.

本实施例中,负载均衡设备可以向交换机发送控制报文,交换机可以将接收到的控制报文发送至集中式会话同步设备。该控制报文为用于进行信息同步的报文。具体的,控制报文可以是包含一个会话,并使得集中式会话同步设备根据该会话进行信息同步的报文。控制报文也可以是包含一个会话的一个状态,并使得集中式会话同步设备根据该状态进行信息同步的报文。In this embodiment, the load balancing device may send a control packet to the switch, and the switch may send the received control packet to the centralized session synchronization device. The control message is a message used for information synchronization. Specifically, the control message may be a message that includes a session and enables the centralized session synchronization device to synchronize information according to the session. The control message may also be a message that includes a state of a session and enables the centralized session synchronization device to synchronize information according to the state.

作为本发明的一个优选实施例,控制报文可以是:负载均衡设备在确定出其本地中满足预设的同步条件的待同步会话后,向交换机发送的包含待同步会话的控制报文(可以与图2所述实施例的步骤S204b的控制报文相同)。一种实现方式中,预设的同步条件可以与图2所述实施例的预设的同步条件相同。需要说明的是,一个控制报文包含唯一的一个待同步的会话。As a preferred embodiment of the present invention, the control packet may be: after the load balancing device determines the session to be synchronized locally that satisfies the preset synchronization condition, the control packet containing the session to be synchronized sent to the switch (may be It is the same as the control message of step S204b in the embodiment shown in FIG. 2). In an implementation manner, the preset synchronization condition may be the same as the preset synchronization condition in the embodiment shown in FIG. 2 . It should be noted that a control packet contains only one session to be synchronized.

作为本发明的另一个优选实施例,控制报文可以是:负载均衡设备在检测到目标会话的状态发生改变后,向交换机发送的包含目标会话的状态的控制报文(可以与图2所述实施例的步骤S204c的控制报文相同)。其中,目标会话为:集中式会话同步设备已从云计算网络中的各个负载均衡设备同步至集中式会话同步设备的本地会话。As another preferred embodiment of the present invention, the control message may be: after the load balancing device detects that the state of the target session has changed, a control message containing the state of the target session is sent to the switch (which may be the same as that described in FIG. 2 ). The control message in step S204c of the embodiment is the same). The target session is: the centralized session synchronization device has synchronized from each load balancing device in the cloud computing network to the local session of the centralized session synchronization device.

作为本发明的一个优选实施例,集中式会话同步设备根据控制报文进行信息同步,可以包括步骤S613a-S613c:As a preferred embodiment of the present invention, the centralized session synchronization device performs information synchronization according to the control message, which may include steps S613a-S613c:

S613a,集中式会话同步设备的主CPU核确定控制报文对应的第二会话。S613a, the main CPU core of the centralized session synchronization device determines the second session corresponding to the control packet.

S613b,集中式会话同步设备的主CPU核按照预设的哈希算法,对第二会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核。S613b, the main CPU core of the centralized session synchronization device performs a hash calculation on the attribute of the second session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result.

S613c,集中式会话同步设备的主CPU核调度步骤S613b的目标CPU核根据第二会话进行信息同步。S613c, the main CPU core of the centralized session synchronization device schedules the target CPU core of step S613b to synchronize information according to the second session.

本优选实施例中,上述步骤S613a-S613c可以分别与图2所述实施例的步骤S204d-S204f完全相同,这里不再重复。In this preferred embodiment, the above steps S613a-S613c may be completely the same as the steps S204d-S204f in the embodiment shown in FIG. 2, respectively, and will not be repeated here.

一种实现方式中,在步骤S613c之后,可以由步骤S613b的目标CPU核将第二会话的超时起始时刻更新为信息同步完成时刻。从而目标CPU核可以等待对第二会话执行销毁处理。In an implementation manner, after step S613c, the target CPU core of step S613b may update the timeout start time of the second session to the information synchronization completion time. Thus, the target CPU core can wait to perform the destruction process on the second session.

进一步地,可以由步骤S613b的目标CPU核根据已更新的第二会话的超时起始时刻,检测第二会话的会话超时时长是否达到预设时长,若第二会话的会话超时时长达到预设时长,销毁第二会话。Further, the target CPU core of step S613b can detect whether the session timeout duration of the second session reaches the preset duration according to the updated timeout start time of the second session, if the session timeout duration of the second session reaches the preset duration. , destroys the second session.

具体的,为节约集中式会话同步设备的可用存储空间,并提高集中式会话同步设备对同步至集中式会话同步设备本地的会话的管理能力,目标CPU核可以周期性地检测第二会话的会话超时时长,第二会话的超时时长为第二会话的超时起始时刻到当前时刻的时长。如果第二会话的会话超时时长达到预设时长,则认为第二会话对应的TCP连接已断开,目标CPU核可以将第二会话进行销毁。Specifically, in order to save the available storage space of the centralized session synchronization device and improve the management capability of the centralized session synchronization device for the session synchronized to the local session of the centralized session synchronization device, the target CPU core can periodically detect the session of the second session Timeout duration, the timeout duration of the second session is the duration from the timeout start time of the second session to the current time. If the session timeout duration of the second session reaches the preset duration, it is considered that the TCP connection corresponding to the second session has been disconnected, and the target CPU core can destroy the second session.

需要说明的是,步骤S613与步骤S611-S612之间没有严格的执行时间顺序。对于云计算网络中的集中式会话同步设备来说,只要接收到交换机发送的目标数据报文,就可以将该目标数据报文发送至应用服务器群。只要接收到交换机发送的用于进行信息同步的控制报文,就可以根据该控制报文进行信息同步。It should be noted that there is no strict execution time sequence between step S613 and steps S611-S612. For the centralized session synchronization device in the cloud computing network, as long as the target data packet sent by the switch is received, the target data packet can be sent to the application server group. As long as a control packet for information synchronization sent by the switch is received, information synchronization can be performed according to the control packet.

本发明实施例提供的报文发送方法中,集中式会话同步设备接收到交换发送的目标数据报文后,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending method provided by the embodiment of the present invention, after receiving the target data message sent by the exchange, the centralized session synchronization device sends the target data message to the application server group according to the session stored locally by the centralized session synchronization device . It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图5为本发明实施例提供的报文发送装置的第一种结构示意图,该装置应用于云计算网络中的负载均衡设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:第一接收模块501,第一查找模块502,第一发送模块503。5 is a schematic diagram of a first structure of a message sending apparatus provided by an embodiment of the present invention. The apparatus is applied to a load balancing device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The above apparatus includes: a first receiving module 501 , a first searching module 502 , and a first sending module 503 .

第一接收模块501,用于接收交换机发送的目标数据报文。The first receiving module 501 is configured to receive the target data packet sent by the switch.

第一查找模块502,用于在接收了目标数据报文的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话。The first search module 502 is configured to search for the session corresponding to the target data packet in the locally stored session of the load balancing device that has received the target data packet.

第一发送模块503,用于在本地查找目标数据报文对应的会话失败时,将目标数据报文发送至交换机,以使交换机将目标数据报文发送至集中式会话同步设备,从而使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。The first sending module 503 is configured to send the target data packet to the switch when the session corresponding to the target data packet fails to be searched locally, so that the switch sends the target data packet to the centralized session synchronization device, so that the centralized The session synchronization device sends the target data message to the application server group according to the locally stored session of the centralized session synchronization device, wherein the session stored locally by the centralized session synchronization device is: synchronized from each load balancing device in the cloud computing network acquired session.

本发明实施例提供的报文发送装置中,负载均衡设备接收到交换发送的目标数据报文后,在负载均衡设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending device provided by the embodiment of the present invention, after receiving the target data message sent by the exchange, the load balancing device locally searches the load balancing device for the session corresponding to the target data message, and if not found, sends the target data message The switch sends the target data packet to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图6为本发明实施例提供的报文发送装置的第二种结构示意图,该装置应用于云计算网络中的负载均衡设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:第四接收模块601,第二查找模块602,第二发送模块603和第三发送模块604。6 is a schematic diagram of a second structure of a message sending apparatus provided by an embodiment of the present invention. The apparatus is applied to a load balancing device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The above apparatus includes: a fourth receiving module 601 , a second searching module 602 , a second sending module 603 and a third sending module 604 .

本实施例中,第四接收模块601,第二查找模块602,第二发送模块603可以分别与图5所述实施例的第一接收模块501,第一查找模块502,第一发送模块503完全相同,这里不再重复。In this embodiment, the fourth receiving module 601, the second searching module 602, and the second sending module 603 may be the same as the first receiving module 501, the first searching module 502, and the first sending module 503 in the embodiment shown in FIG. 5, respectively. The same, and will not be repeated here.

第三发送模块604,用于通过交换机向集中式会话同步设备发送控制报文,以使得集中式会话同步设备根据控制报文进行信息同步,其中,控制报文为用于进行信息同步的报文。The third sending module 604 is configured to send a control packet to the centralized session synchronization device through the switch, so that the centralized session synchronization device performs information synchronization according to the control packet, wherein the control packet is a packet used for information synchronization .

一种实现方式中,第三发送模块604可以包括:第一发送子模块6041。In an implementation manner, the third sending module 604 may include: a first sending sub-module 6041 .

第一发送子模块6041,用于确定负载均衡设备本地存储的会话中满足预设的同步条件的会话为待同步会话;通过交换机向集中式会话同步设备发送包含待同步会话的控制报文。The first sending sub-module 6041 is configured to determine a session that meets a preset synchronization condition among the sessions stored locally by the load balancing device as a to-be-synchronized session; send a control packet including the to-be-synchronized session to the centralized session synchronization device through the switch.

一种实现方式中,预设的同步条件可以包括第一预设子同步条件和第二预设子同步条件。其中,In an implementation manner, the preset synchronization conditions may include a first preset sub-synchronization condition and a second preset sub-synchronization condition. in,

第一预设子同步条件可以为:会话的持续时间大于或等于会话持续时间预设值。The first preset sub-synchronization condition may be: the duration of the session is greater than or equal to the preset value of the session duration.

第二预设子同步条件可以为:通过会话所转发的数据报文数超过或等于数据报文转发数预设值。The second preset sub-synchronization condition may be: the number of data packets forwarded through the session exceeds or equals to a preset value of the number of data packets forwarded.

一种实现方式中,第三发送模块604可以包括:第二发送子模块6042。In an implementation manner, the third sending module 604 may include: a second sending sub-module 6042 .

第二发送子模块6042,用于检测目标会话的状态是否发生改变,其中,目标会话为:已同步至集中式会话同步设备的本地会话;若检测目标会话的状态发生改变,通过交换机向集中式会话同步设备发送包含目标会话的状态的控制报文。The second sending sub-module 6042 is used to detect whether the state of the target session has changed, wherein the target session is: a local session that has been synchronized to the centralized session synchronization device; The session synchronization device sends a control packet containing the state of the target session.

本发明实施例提供的报文发送装置中,负载均衡设备接收到交换发送的目标数据报文后,在负载均衡设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending device provided by the embodiment of the present invention, after receiving the target data message sent by the exchange, the load balancing device locally searches the load balancing device for the session corresponding to the target data message, and if not found, sends the target data message The switch sends the target data packet to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图7为本发明实施例提供的报文发送装置的第三种结构示意图,该装置应用于云计算网络中的交换机,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:第二接收模块701,第一分配模块702,第三接收模块703。FIG. 7 is a third schematic structural diagram of a message sending apparatus provided by an embodiment of the present invention. The apparatus is applied to a switch in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The above device It includes: a second receiving module 701 , a first allocating module 702 , and a third receiving module 703 .

第二接收模块701,用于接收目标数据报文。The second receiving module 701 is configured to receive the target data message.

第一分配模块702,用于对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备,并将目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话。The first distribution module 702 is configured to perform route distribution on the target data packet, determine a load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device The load balancing device searches for a session corresponding to the target data packet in the determined session stored locally on the load balancing device.

第三接收模块703,用于接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备,以使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。The third receiving module 703 is configured to receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device can The locally stored session of the centralized session synchronization device sends the target data message to the application server group, wherein the locally stored session of the centralized session synchronization device is the session obtained from each load balancing device in the cloud computing network.

本发明实施例提供的报文发送装置中,交换机将接收到的目标数据报文发送至对其进行路由分配后所确定的负载均衡设备,并在负载均衡设备在负载均衡设备本地未查找目标数据报文对应的会话后,接收负载均衡设备发送的目标数据报文,并将其发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending device provided by the embodiment of the present invention, the switch sends the received target data message to the load balancing device determined after routing allocation, and the load balancing device does not search for the target data locally in the load balancing device After the session corresponding to the message, the target data message sent by the load balancing device is received and sent to the centralized session synchronization device, which sends the target data message to the application server group. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device can realize the sending of the target data packet, thereby avoiding the load balancing in the cloud computing network. The device needs to store the session information of all load balancing devices in the cluster resulting in excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图8a为本发明实施例提供的报文发送装置的第四种结构示意图,该装置应用于云计算网络中的交换机,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:第五接收模块801,第二分配模块802,第六接收模块803和第七接收模块804。8a is a schematic diagram of a fourth structure of a message sending apparatus provided by an embodiment of the present invention. The apparatus is applied to a switch in a cloud computing network. The cloud computing network includes a switch, a load balancing device, and a centralized session synchronization device. The above device It includes: a fifth receiving module 801 , a second allocating module 802 , a sixth receiving module 803 and a seventh receiving module 804 .

本实施例中,第五接收模块801,第二分配模块802,第六接收模块803可以分别与图7所述实施例的第二接收模块701,第一分配模块702,第三接收模块703完全相同,这里不再重复。In this embodiment, the fifth receiving module 801, the second allocating module 802, and the sixth receiving module 803 may be the same as the second receiving module 701, the first allocating module 702, and the third receiving module 703 in the embodiment described in FIG. 7, respectively. The same, and will not be repeated here.

第七接收模块804,用于接收负载均衡设备发送的控制报文,并将控制报文发送至集中式会话同步设备,以使得集中式会话同步设备根据控制报文进行信息同步,其中,控制报文为用于进行信息同步的报文。The seventh receiving module 804 is configured to receive the control message sent by the load balancing device, and send the control message to the centralized session synchronization device, so that the centralized session synchronization device performs information synchronization according to the control message, wherein the control message The message is a message used for information synchronization.

一种实现方式中,第七接收模块804可以包括:第一接收子模块8041。In an implementation manner, the seventh receiving module 804 may include: a first receiving sub-module 8041 .

第一接收子模块8041,用于接收负载均衡设备在确定出本地满足预设的同步条件的待同步会话后,发送的包含待同步会话的控制报文,并将包含待同步会话的控制报文发送至集中式会话同步设备。The first receiving sub-module 8041 is configured to receive the control packet containing the session to be synchronized sent by the load balancing device after determining the session to be synchronized that satisfies the preset synchronization condition locally, and send the control packet containing the session to be synchronized Sent to a centralized session synchronization facility.

一种实现方式中,预设的同步条件可以与图6所述实施例的预设的同步条件完全相同,这里不再重复。In an implementation manner, the preset synchronization conditions may be exactly the same as the preset synchronization conditions in the embodiment shown in FIG. 6 , which will not be repeated here.

一种实现方式中,第七接收模块804可以包括:第二接收子模块8042。In an implementation manner, the seventh receiving module 804 may include: a second receiving sub-module 8042 .

第二接收子模块8042,用于接收负载均衡设备在检测到目标会话的状态发生改变后,发送的包含目标会话的状态的控制报文,并将包含目标会话的状态的控制报文发送至集中式会话同步设备,其中,目标会话为:已同步至集中式会话同步设备的本地会话。The second receiving sub-module 8042 is configured to receive a control packet including the state of the target session sent by the load balancing device after detecting that the state of the target session has changed, and send the control packet including the state of the target session to the centralized A centralized session synchronization device, wherein the target session is: a local session that has been synchronized to the centralized session synchronization device.

本发明实施例提供的报文发送装置中,交换机将接收到的目标数据报文发送至对其进行路由分配后所确定的负载均衡设备,并在负载均衡设备在负载均衡设备本地未查找目标数据报文对应的会话后,接收负载均衡设备发送的目标数据报文,并将其发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending device provided by the embodiment of the present invention, the switch sends the received target data message to the load balancing device determined after routing allocation, and the load balancing device does not search for the target data locally in the load balancing device After the session corresponding to the message, the target data message sent by the load balancing device is received and sent to the centralized session synchronization device, which sends the target data message to the application server group. It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device can realize the sending of the target data packet, thereby avoiding the load balancing in the cloud computing network. The device needs to store the session information of all load balancing devices in the cluster resulting in excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图8b为本发明实施例提供的报文发送装置的第五种结构示意图,该装置应用于云计算网络中的集中式会话同步设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:第八接收模块711,第四发送模块712。FIG. 8b is a schematic diagram of a fifth structure of a message sending apparatus provided by an embodiment of the present invention. The apparatus is applied to a centralized session synchronization device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. equipment, the above device includes: an eighth receiving module 711 and a fourth sending module 712 .

第八接收模块711,用于接收交换机发送的目标数据报文;其中,目标数据报文是由接收了目标数据报文的负载均衡设备在其本地存储的会话中未查找到目标数据报文对应的会话后,向交换机发送;The eighth receiving module 711 is configured to receive the target data packet sent by the switch; wherein, the target data packet is a load balancing device that has received the target data packet and does not find the corresponding target data packet in its locally stored session After the session, send to the switch;

第四发送模块712,用于根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。The fourth sending module 712 is configured to send the target data packet to the application server group according to the session stored locally in the centralized session synchronization device.

一种实现方式中,第四发送模块712可以包括:第四发送子模块7121。In an implementation manner, the fourth sending module 712 may include: a fourth sending sub-module 7121 .

第四发送子模块7121,用于调度集中式会话同步设备的主CPU核,从集中式会话同步设备本地存储的会话中,确定目标数据报文对应的第一会话;还用于调度集中式会话同步设备的主CPU核按照预设的哈希算法,对第一会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核;还用于调度集中式会话同步设备的主CPU核,进一步调度目标CPU核,使得目标CPU核根据第一会话,将目标数据报文发送至应用服务器群。The fourth sending submodule 7121 is used to schedule the main CPU core of the centralized session synchronization device, and determine the first session corresponding to the target data packet from the sessions stored locally by the centralized session synchronization device; and is also used to schedule the centralized session The main CPU core of the synchronization device performs a hash calculation on the attributes of the first session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result; it is also used for scheduling the centralized session synchronization device. The main CPU core of the session synchronization device further schedules the target CPU core, so that the target CPU core sends the target data packet to the application server group according to the first session.

一种实现方式中,上述装置还可以包括:第一时钟模块713,用于调度目标CPU核将第一会话的超时起始时刻更新为目标数据报文的发送完成时刻。In an implementation manner, the above apparatus may further include: a first clock module 713 configured to schedule the target CPU core to update the timeout start time of the first session to the completion time of sending the target data packet.

一种实现方式中,第一时钟模块713,还用于调度目标CPU核根据已更新的第一会话的超时起始时刻,检测第一会话的会话超时时长是否达到预设时长,若第一会话的会话超时时长达到预设时长,销毁第一会话。In an implementation manner, the first clock module 713 is further configured to schedule the target CPU core to detect whether the session timeout duration of the first session has reached a preset duration according to the updated timeout start time of the first session. If the session timeout period reaches the preset period, the first session will be destroyed.

本发明实施例提供的报文发送装置中,集中式会话同步设备接收到交换发送的目标数据报文后,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending device provided by the embodiment of the present invention, after receiving the target data message sent by the exchange, the centralized session synchronization device sends the target data message to the application server group according to the session stored locally by the centralized session synchronization device . It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图8c为本发明实施例提供的报文发送装置的第六种结构示意图,该装置应用于云计算网络中的集中式会话同步设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,上述装置包括:第九接收模块811,第五发送模块812和第一同步模块813。8c is a schematic diagram of a sixth structure of a message sending apparatus provided by an embodiment of the present invention. The apparatus is applied to a centralized session synchronization device in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. equipment, the above device includes: a ninth receiving module 811 , a fifth sending module 812 and a first synchronization module 813 .

第九接收模块811,用于接收交换机发送的目标数据报文;其中,目标数据报文是由接收了目标数据报文的负载均衡设备在其本地存储的会话中未查找到目标数据报文对应的会话后,向交换机发送;The ninth receiving module 811 is configured to receive the target data packet sent by the switch; wherein, the target data packet is a load balancing device that has received the target data packet and does not find the corresponding target data packet in its locally stored session After the session, send to the switch;

第五发送模块812,用于根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。The fifth sending module 812 is configured to send the target data packet to the application server group according to the session stored locally in the centralized session synchronization device.

一种实现方式中,第五发送模块812可以包括:第五发送子模块8121。In an implementation manner, the fifth sending module 812 may include: a fifth sending sub-module 8121 .

第五发送子模块8121,用于调度集中式会话同步设备的主CPU核,从集中式会话同步设备本地存储的会话中,确定目标数据报文对应的第一会话;还用于调度集中式会话同步设备的主CPU核按照预设的哈希算法,对第一会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核;还用于调度集中式会话同步设备的主CPU核,进一步调度本实现方式中的目标CPU核,使得本实现方式中的目标CPU核根据第一会话,将目标数据报文发送至应用服务器群。The fifth sending sub-module 8121 is used to schedule the main CPU core of the centralized session synchronization device, and determine the first session corresponding to the target data packet from the sessions stored locally by the centralized session synchronization device; it is also used to schedule the centralized session The main CPU core of the synchronization device performs a hash calculation on the attributes of the first session according to a preset hash algorithm, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result; it is also used for scheduling the centralized session synchronization device. The main CPU core of the session synchronization device further schedules the target CPU core in this implementation, so that the target CPU core in this implementation sends the target data packet to the application server group according to the first session.

一种实现方式中,上述装置还可以包括:第二时钟模块814,用于调度第五发送子模块8121所选择的目标CPU核将第一会话的超时起始时刻更新为目标数据报文的发送完成时刻。In an implementation manner, the above-mentioned apparatus may further include: a second clock module 814 for scheduling the target CPU core selected by the fifth sending sub-module 8121 to update the timeout start time of the first session to the sending of the target data message. Completion time.

一种实现方式中,第二时钟模块814,还用于调度第五发送子模块8121所选择的目标CPU核根据已更新的第一会话的超时起始时刻,检测第一会话的会话超时时长是否达到预设时长,若第一会话的会话超时时长达到预设时长,销毁第一会话。In an implementation manner, the second clock module 814 is further configured to schedule the target CPU core selected by the fifth sending sub-module 8121 to detect whether the session timeout duration of the first session is based on the updated timeout start time of the first session. When the preset duration is reached, if the session timeout duration of the first session reaches the preset duration, the first session is destroyed.

第一同步模块813,用于接收交换机发送的控制报文;根据控制报文进行信息同步。The first synchronization module 813 is configured to receive a control message sent by the switch, and perform information synchronization according to the control message.

一种实现方式中,第一同步模块813可以包括:第一同步子模块8131。In an implementation manner, the first synchronization module 813 may include: a first synchronization sub-module 8131 .

第一同步子模块8131,用于调度集中式会话同步设备的主CPU核确定控制报文对应的第二会话;还用于调度集中式会话同步设备的主CPU核按照预设的哈希算法,对第二会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备的CPU核中选择目标CPU核;还用于调度集中式会话同步设备的主CPU核,进一步调度本实现方式中的目标CPU核根据第二会话进行信息同步。The first synchronization sub-module 8131 is used to schedule the main CPU core of the centralized session synchronization device to determine the second session corresponding to the control message; it is also used to schedule the main CPU core of the centralized session synchronization device according to the preset hash algorithm, Hash calculation is performed on the attributes of the second session, and according to the calculation result, the target CPU core is selected from the CPU cores of the centralized session synchronization device; it is also used to schedule the main CPU core of the centralized session synchronization device, and further schedules in this implementation method. The target CPU core performs information synchronization according to the second session.

一种实现方式中,上述装置还可以包括:第三时钟模块815,用于调度第一同步子模块8131所选择的目标CPU核将第二会话的超时起始时刻更新为信息同步完成时刻。In an implementation manner, the above apparatus may further include: a third clock module 815 configured to schedule the target CPU core selected by the first synchronization sub-module 8131 to update the timeout start time of the second session to the information synchronization completion time.

一种实现方式中,第三时钟模块815,还用于调度第一同步子模块8131所选择的目标CPU核根据已更新的第二会话的超时起始时刻,检测第二会话的会话超时时长是否达到预设时长,若第二会话的会话超时时长达到预设时长,销毁第二会话。In an implementation manner, the third clock module 815 is further configured to schedule the target CPU core selected by the first synchronization sub-module 8131 to detect whether the session timeout duration of the second session is based on the updated timeout start time of the second session. When the preset duration is reached, if the session timeout duration of the second session reaches the preset duration, the second session is destroyed.

本发明实施例提供的报文发送装置中,集中式会话同步设备接收到交换发送的目标数据报文后,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。可见,本发明实施例提供的方案中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending device provided by the embodiment of the present invention, after receiving the target data message sent by the exchange, the centralized session synchronization device sends the target data message to the application server group according to the session stored locally by the centralized session synchronization device . It can be seen that in the solution provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

本发明实施例还提供了一种报文发送系统,如图9a所示,该系统包括:交换机901、负载均衡设备和集中式会话同步设备902。其中,An embodiment of the present invention further provides a system for sending a message. As shown in FIG. 9a , the system includes: a switch 901 , a load balancing device, and a centralized session synchronization device 902 . in,

交换机901,用于接收目标数据报文;对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备;将目标数据报文发送至所确定的负载均衡设备。The switch 901 is configured to receive the target data packet; perform route allocation on the target data packet, determine a load balancing device for forwarding the target data packet; and send the target data packet to the determined load balancing device.

负载均衡设备,用于接收交换机901发送的目标数据报文;在负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;如果查找失败,将目标数据报文发送至交换机901。The load balancing device is configured to receive the target data packet sent by the switch 901 ; search for the session corresponding to the target data packet in the session stored locally on the load balancing device; if the search fails, send the target data packet to the switch 901 .

交换机901,还用于接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备902。The switch 901 is further configured to receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device 902 .

集中式会话同步设备902,用于接收交换机901发送的目标数据报文,根据集中式会话同步设备902的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备902的本地存储的会话为:从上述系统中的各个负载均衡设备同步获得的会话。The centralized session synchronization device 902 is configured to receive the target data packet sent by the switch 901, and send the target data packet to the application server group according to the session stored locally by the centralized session synchronization device 902, wherein the centralized session synchronization device The locally stored session in 902 is: a session obtained synchronously from each load balancing device in the above-mentioned system.

图9b给出了上述报文发送系统将目标数据报文发送至应用服务器群的流程示意图。FIG. 9b shows a schematic flowchart of the above-mentioned message sending system sending the target data message to the application server group.

一种实现方式中,负载均衡设备,还用于向交换机901发送控制报文;In an implementation manner, the load balancing device is further configured to send a control packet to the switch 901;

交换机901,还用于接收负载均衡设备发送的控制报文,将控制报文发送至集中式会话同步设备902;The switch 901 is further configured to receive a control packet sent by the load balancing device, and send the control packet to the centralized session synchronization device 902;

集中式会话同步设备902,还用于接收交换机901发送的控制报文,根据控制报文进行信息同步,其中,控制报文为用于进行信息同步的报文。The centralized session synchronization device 902 is further configured to receive a control packet sent by the switch 901, and perform information synchronization according to the control packet, where the control packet is a packet used for information synchronization.

一种实现方式中,负载均衡设备,具体用于确定负载均衡设备本地存储的会话中满足预设的同步条件的会话为待同步会话,向交换机901发送包含待同步会话的控制报文;In an implementation manner, the load balancing device is specifically configured to determine that a session that satisfies a preset synchronization condition among the sessions stored locally by the load balancing device is a session to be synchronized, and sends a control packet including the session to be synchronized to the switch 901;

具体的,预设的同步条件包括第一预设子同步条件和第二预设子同步条件;Specifically, the preset synchronization conditions include a first preset sub-synchronization condition and a second preset sub-synchronization condition;

第一预设子同步条件为:会话的持续时间大于或等于会话持续时间预设值;The first preset sub-synchronization condition is: the session duration is greater than or equal to the session duration preset value;

第二预设子同步条件为:通过会话所转发的数据报文数超过或等于数据报文转发数预设值;The second preset sub-synchronization condition is: the number of data packets forwarded through the session exceeds or equals to the preset value of the number of data packets forwarded;

交换机901,具体用于接收负载均衡设备发送的包含待同步会话的控制报文,将包含待同步会话的控制报文发送至集中式会话同步设备902;The switch 901 is specifically configured to receive a control packet containing the session to be synchronized sent by the load balancing device, and send the control packet containing the session to be synchronized to the centralized session synchronization device 902;

集中式会话同步设备902,具体用于接收交换机901发送的包含待同步会话的控制报文。The centralized session synchronization device 902 is specifically configured to receive a control packet sent by the switch 901 and including the session to be synchronized.

一种实现方式中,负载均衡设备,具体用于检测目标会话的状态是否发生改变,其中,目标会话为:已同步至集中式会话同步设备902的本地会话;若检测目标会话的状态发生改变,向交换机901发送包含目标会话的状态的控制报文;In an implementation manner, the load balancing device is specifically used to detect whether the state of the target session changes, wherein the target session is: a local session that has been synchronized to the centralized session synchronization device 902; if the state of the detected target session changes, sending a control message containing the state of the target session to the switch 901;

交换机901,具体用于接收负载均衡设备发送的包含目标会话的状态的控制报文,将包含目标会话的状态的控制报文发送至集中式会话同步设备902;The switch 901 is specifically configured to receive a control message including the state of the target session sent by the load balancing device, and send the control message including the state of the target session to the centralized session synchronization device 902;

集中式会话同步设备902,具体用于接收交换机901发送的包含目标会话的状态的控制报文。The centralized session synchronization device 902 is specifically configured to receive a control packet including the state of the target session sent by the switch 901 .

图9c给出了上述报文发送系统中,负载均衡设备通过交换机向集中式会话同步设备发送控制报文的流程示意图。FIG. 9c shows a schematic flowchart of the flow of the load balancing device sending a control message to the centralized session synchronization device through the switch in the above-mentioned message sending system.

一种实现方式中,集中式会话同步设备902,具体用于调度集中式会话同步设备902本地的主CPU核,从集中式会话同步设备902的本地存储的会话中,确定目标数据报文对应的第一会话;按照预设的哈希算法,对第一会话的属性进行哈希计算,根据计算结果,从集中式会话同步设备902本地的CPU核中选择目标CPU核;调度目标CPU核,使得目标CPU核根据第一会话,将目标数据报文发送至应用服务器群。In an implementation manner, the centralized session synchronization device 902 is specifically configured to schedule the local main CPU core of the centralized session synchronization device 902, and from the locally stored sessions of the centralized session synchronization device 902, determine the corresponding target data packet. The first session; according to a preset hash algorithm, hash calculation is performed on the attributes of the first session, and according to the calculation result, a target CPU core is selected from the local CPU cores of the centralized session synchronization device 902; the target CPU core is scheduled so that The target CPU core sends the target data packet to the application server group according to the first session.

一种实现方式中,集中式会话同步设备902,还用于调度目标CPU核将第一会话的超时起始时刻更新为目标数据报文的发送完成时刻。In an implementation manner, the centralized session synchronization device 902 is further configured to schedule the target CPU core to update the timeout start time of the first session to the completion time of sending the target data packet.

一种实现方式中,集中式会话同步设备902,还用于调度目标CPU核根据已更新的第一会话的超时起始时刻,检测第一会话的会话超时时长是否达到预设时长,若所述第一会话的会话超时时长达到预设时长,销毁第一会话。In an implementation manner, the centralized session synchronization device 902 is further configured to schedule the target CPU core to detect whether the session timeout duration of the first session reaches a preset duration according to the updated timeout start time of the first session, if the When the session timeout duration of the first session reaches the preset duration, the first session is destroyed.

一种实现方式中,集中式会话同步设备902,具体用于调度集中式会话同步设备902本地的主CPU核确定控制报文对应的第二会话;按照预设的哈希算法,对第二会话的属性进行哈希计算,根据计算结果,从本地的CPU核中选择目标CPU核;调度目标CPU核根据第二会话进行信息同步。In an implementation manner, the centralized session synchronization device 902 is specifically configured to schedule the local main CPU core of the centralized session synchronization device 902 to determine the second session corresponding to the control packet; Hash calculation is performed on the attributes of , and according to the calculation result, the target CPU core is selected from the local CPU cores; the target CPU core is scheduled to perform information synchronization according to the second session.

一种实现方式中,集中式会话同步设备902,还用于调度目标CPU核将第二会话的超时起始时刻更新为信息同步完成时刻。In an implementation manner, the centralized session synchronization device 902 is further configured to schedule the target CPU core to update the timeout start time of the second session to the information synchronization completion time.

一种实现方式中,集中式会话同步设备902,还用于调度目标CPU核根据已更新的第二会话的超时起始时刻,检测第二会话的会话超时时长是否达到预设时长,若所述第二会话的会话超时时长达到预设时长,销毁第二会话。In an implementation manner, the centralized session synchronization device 902 is further configured to schedule the target CPU core to detect whether the session timeout duration of the second session has reached a preset duration according to the updated timeout start time of the second session, if the The session timeout duration of the second session reaches the preset duration, and the second session is destroyed.

作为本发明的一个优选实施例,集中式会话同步设备902,还可以包括控制模块9021(图9中未示出),用于获取集中式会话同步设备902本地存储的会话的数量,每个会话所转发的数据报文数,以便于进行展示;该控制模块,还用于获取集中式会话同步设备902的CPU核的使用率,以便于进行维护;该控制模块,还用于为集中式会话同步设备902中的应用程序提供应用程序编程接口(Application Programming Interface,API)。As a preferred embodiment of the present invention, the centralized session synchronization device 902 may further include a control module 9021 (not shown in FIG. 9 ) for acquiring the number of sessions stored locally by the centralized session synchronization device 902, each session The number of forwarded data packets for easy presentation; the control module is also used to obtain the utilization rate of the CPU cores of the centralized session synchronization device 902 for easy maintenance; the control module is also used for the centralized session synchronization The application in the synchronization device 902 provides an Application Programming Interface (API).

本发明实施例提供的报文发送系统中,负载均衡设备接收到交换发送的目标数据报文后,在负载均衡设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的系统中,负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。In the message sending system provided by the embodiment of the present invention, after receiving the target data message sent by the exchange, the load balancing device locally searches the load balancing device for the session corresponding to the target data message. The switch sends the target data packet to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that, in the system provided by the embodiment of the present invention, when the session corresponding to the target data packet does not exist locally on the load balancing device, the centralized session synchronization device realizes the sending of the target data packet, so as to avoid all load balancing devices in the cloud computing network It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图10为本发明实施例提供的一种电子设备的结构示意图,该电子设备为云计算网络中的负载均衡设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,负载均衡设备包括:处理器1001和存储器1003;10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device is a load balancing device in a cloud computing network. The cloud computing network includes a switch, a load balancing device, and a centralized session synchronization device. The load balancing device Including: processor 1001 and memory 1003;

存储器1003,用于存放计算机程序;a memory 1003 for storing computer programs;

处理器1001,用于执行存储器1003上所存放的程序时,实现应用于云计算网络中的负载均衡设备的报文发送的方法步骤。The processor 1001 is configured to implement the method steps for sending packets applied to the load balancing device in the cloud computing network when executing the program stored in the memory 1003 .

具体的,上述报文发送方法,包括:Specifically, the above message sending method includes:

接收交换机发送的目标数据报文;Receive the target data message sent by the switch;

在接收了目标数据报文的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;如果查找失败,将目标数据报文发送至交换机,以使交换机将目标数据报文发送至集中式会话同步设备,从而使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。In the session stored locally on the load balancing device that has received the target data packet, search for the session corresponding to the target data packet; if the search fails, send the target data packet to the switch, so that the switch sends the target data packet to The centralized session synchronization device, so that the centralized session synchronization device sends the target data packet to the application server group according to the locally stored session of the centralized session synchronization device, wherein the locally stored session of the centralized session synchronization device is: Sessions obtained from the synchronization of various load balancing devices in the cloud computing network.

需要说明的是,上述处理器执行存储器中所存放的程序而实现的报文发送方法的其他实现方式,与前述方法实施例部分所提及的、应用于负载均衡设备的报文发送方法的实现方式相同,这里不再赘述。It should be noted that other implementations of the packet sending method implemented by the processor executing the program stored in the memory are the same as the implementation of the packet sending method applied to the load balancing device mentioned in the foregoing method embodiment section. The method is the same and will not be repeated here.

本发明实施例提供的电子设备接收到交换发送的目标数据报文后,在电子设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的电子设备,能够在电子设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。After receiving the target data message sent by the exchange, the electronic device provided by the embodiment of the present invention searches for the session corresponding to the target data message locally on the electronic device, and if not found, sends the target data message to the switch, and the switch sends the target data message The target data packet is sent to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that the electronic device provided by the embodiment of the present invention can realize the sending of the target data packet by the centralized session synchronization device when the session corresponding to the target data packet does not exist locally on the electronic device, thereby avoiding the load balancing device in the cloud computing network. It is necessary to store the session information of all load balancing devices in the cluster and cause excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图11为本发明实施例提供的另一种电子设备的结构示意图,该电子设备为云计算网络中的交换机,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,交换机包括:处理器1101和存储器1103;11 is a schematic structural diagram of another electronic device provided by an embodiment of the present invention. The electronic device is a switch in a cloud computing network. The cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device. The switch includes: processing device 1101 and memory 1103;

存储器1103,用于存放计算机程序;a memory 1103 for storing computer programs;

处理器1101,用于执行存储器1103上所存放的程序时,实现应用于云计算网络中的交换机的报文发送的方法步骤。The processor 1101 is configured to implement the method steps of the packet sending applied to the switch in the cloud computing network when executing the program stored in the memory 1103 .

具体的,上述报文发送方法,包括:Specifically, the above message sending method includes:

接收目标数据报文;Receive the target data message;

对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备,并将目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;Route allocation to the target data packet, determine the load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device is in the determined load balancing device. Find the session corresponding to the target data packet in the session stored locally on the load balancing device;

接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备,以使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。Receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device The session is to send the target data message to the application server group, wherein the session stored locally by the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the cloud computing network.

需要说明的是,上述处理器执行存储器中所存放的程序而实现的报文发送方法的其他实现方式,与前述方法实施例部分所提及的、应用于交换机的报文发送方法的实现方式相同,这里不再赘述。It should be noted that other implementations of the message sending method implemented by the processor executing the program stored in the memory are the same as the implementations of the message sending method applied to the switch mentioned in the foregoing method embodiment section. , which will not be repeated here.

本发明实施例提供的电子设备将接收到的目标数据报文发送至对其进行路由分配后所确定的负载均衡设备,并在负载均衡设备在本地未查找目标数据报文对应的会话后,接收负载均衡设备发送的目标数据报文,并将其发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的电子设备,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。The electronic device provided by the embodiment of the present invention sends the received target data packet to the load balancing device determined after routing allocation, and receives the target data packet after the load balancing device does not search for the session corresponding to the target data packet locally. The target data packet sent by the load balancing device is sent to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that the electronic device provided by the embodiment of the present invention can realize the sending of the target data packet by the centralized session synchronization device when the session corresponding to the target data packet does not exist locally on the load balancing device, thereby avoiding the load balancing in the cloud computing network. The device needs to store the session information of all load balancing devices in the cluster resulting in excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

图12为本发明实施例提供的另一种电子设备的结构示意图,该电子设备为云计算网络中的集中式会话同步设备,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,集中式会话同步设备包括:处理器1201和存储器1203;12 is a schematic structural diagram of another electronic device provided by an embodiment of the present invention, where the electronic device is a centralized session synchronization device in a cloud computing network, and the cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device, The centralized session synchronization device includes: a processor 1201 and a memory 1203;

存储器1203,用于存放计算机程序;The memory 1203 is used to store computer programs;

处理器1201,用于执行存储器1203上所存放的程序时,实现应用于云计算网络中的交换机的报文发送的方法步骤。The processor 1201 is configured to implement the method steps of the packet sending applied to the switch in the cloud computing network when executing the program stored in the memory 1203 .

具体的,上述报文发送方法,包括:Specifically, the above message sending method includes:

接收交换机发送的目标数据报文;其中,目标数据报文是由接收了目标数据报文的负载均衡设备在自身本地存储的会话中未查找到目标数据报文对应的会话后,向交换机发送的目标数据报文;Receive the target data packet sent by the switch; wherein, the target data packet is sent to the switch by the load balancing device that has received the target data packet after not finding the session corresponding to the target data packet in the session stored locally by itself target data message;

根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。The target data packet is sent to the application server farm according to the locally stored session of the centralized session synchronization device.

需要说明的是,上述处理器执行存储器中所存放的程序而实现的报文发送方法的其他实现方式,与前述方法实施例部分所提及的、应用于集中式会话同步设备的报文发送方法的实现方式相同,这里不再赘述。It should be noted that other implementations of the message sending method implemented by the processor executing the program stored in the memory are the same as the message sending method applied to the centralized session synchronization device mentioned in the foregoing method embodiment section. The implementation method is the same, and will not be repeated here.

本发明实施例提供的电子设备接收到交换发送的目标数据报文后,根据该电子设备的本地存储的会话,将目标数据报文发送至应用服务器群。可见,本发明实施例提供的电子设备,能够在负载均衡设备本地不存在目标数据报文对应的会话时,实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。After receiving the target data message sent by the exchange, the electronic device provided by the embodiment of the present invention sends the target data message to the application server group according to the session stored locally in the electronic device. It can be seen that the electronic device provided by the embodiment of the present invention can realize the sending of the target data packet when the session corresponding to the target data packet does not exist locally on the load balancing device, and avoid that the load balancing device in the cloud computing network needs to be stored in the cluster. The session information of all load balancing devices causes excessive CPU resource usage, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memorY),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (Random Access Memory, RAM for short), and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application SpecificIntegrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; may also be a digital signal processor (Digital Signal Processing, referred to as DSP) , Application Specific Integrated Circuit (ASIC for short), Field-Programmable Gate Array (FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质为云计算网络中的负载均衡设备的存储介质,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,计算机可读存储介质内存储有计算机程序,用以执行应用于云计算网络中的负载均衡设备的报文发送的方法步骤。An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium is a storage medium of a load balancing device in a cloud computing network, where the cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device , a computer program is stored in the computer-readable storage medium, and is used to execute the method steps of the packet sending applied to the load balancing device in the cloud computing network.

具体的,上述报文发送方法,包括:Specifically, the above message sending method includes:

接收交换机发送的目标数据报文;Receive the target data message sent by the switch;

在接收了目标数据报文的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;如果查找失败,将目标数据报文发送至交换机,以使交换机将目标数据报文发送至集中式会话同步设备,从而使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。In the session stored locally on the load balancing device that has received the target data packet, search for the session corresponding to the target data packet; if the search fails, send the target data packet to the switch, so that the switch sends the target data packet to The centralized session synchronization device, so that the centralized session synchronization device sends the target data packet to the application server group according to the locally stored session of the centralized session synchronization device, wherein the locally stored session of the centralized session synchronization device is: Sessions obtained from the synchronization of various load balancing devices in the cloud computing network.

需要说明的是,执行上述计算机可读存储介质内所存储的计算机程序而实现的报文发送方法的其他实现方式,与前述方法实施例部分所提及的、应用于负载均衡设备的报文发送方法的实现方式相同,这里不再赘述。It should be noted that other implementations of the message sending method implemented by executing the computer program stored in the computer-readable storage medium are the same as the message sending applied to the load balancing device mentioned in the foregoing method embodiment section. The method is implemented in the same manner, and will not be repeated here.

本发明实施例提供的计算机可读存储介质所存储的计算机程序能够实现:负载均衡设备接收到交换发送的目标数据报文后,在负载均衡设备本地查找目标数据报文对应的会话,如果查找不到,则将目标数据报文发送至交换机,由交换机将目标数据报文发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的计算机可读存储介质所存储的计算机程序,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。The computer program stored in the computer-readable storage medium provided by the embodiment of the present invention can realize: after the load balancing device receives the target data packet sent by the exchange, the load balancing device locally searches for the session corresponding to the target data packet. When it arrives, the target data packet is sent to the switch, the switch sends the target data packet to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that the computer program stored in the computer-readable storage medium provided by the embodiment of the present invention can realize the sending of the target data packet by the centralized session synchronization device when the session corresponding to the target data packet does not exist locally on the load balancing device, This avoids excessive CPU resource occupation caused by the need to store session information of all load balancing devices in the cluster on the load balancing devices in the cloud computing network, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

本发明实施例还提供了另一种计算机可读存储介质,该计算机可读存储介质为云计算网络中的交换机的存储介质,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,计算机可读存储介质内存储有计算机程序,用以执行应用于云计算网络中的交换机的报文发送的方法步骤。An embodiment of the present invention further provides another computer-readable storage medium, where the computer-readable storage medium is a storage medium of a switch in a cloud computing network, where the cloud computing network includes: a switch, a load balancing device, and a centralized session synchronization device, A computer program is stored in the computer-readable storage medium to execute the method steps for sending a message applied to a switch in a cloud computing network.

具体的,上述报文发送方法,包括:Specifically, the above message sending method includes:

接收目标数据报文;Receive the target data message;

对目标数据报文进行路由分配,确定用于转发目标数据报文的负载均衡设备,并将目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找目标数据报文对应的会话;Route allocation to the target data packet, determine the load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device is in the determined load balancing device. Find the session corresponding to the target data packet in the session stored locally on the load balancing device;

接收所确定的负载均衡设备在查找会话失败后发送的目标数据报文,并将目标数据报文发送至集中式会话同步设备,以使得集中式会话同步设备根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群,其中,集中式会话同步设备的本地存储的会话为:从云计算网络中的各个负载均衡设备同步获得的会话。Receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device The session is to send the target data message to the application server group, wherein the session stored locally by the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the cloud computing network.

需要说明的是,执行上述计算机可读存储介质内所存储的计算机程序而实现的报文发送方法的其他实现方式,与前述方法实施例部分所提及的、应用于交换机的报文发送方法的实现方式相同,这里不再赘述。It should be noted that other implementations of the message sending method realized by executing the computer program stored in the computer-readable storage medium above are different from the message sending method applied to the switch mentioned in the foregoing method embodiment section. The implementation method is the same, and will not be repeated here.

本发明实施例提供的计算机可读存储介质所存储的计算机程序能够实现:交换机将接收到的目标数据报文发送至对其进行路由分配后所确定的负载均衡设备,并在负载均衡设备在本地未查找目标数据报文对应的会话后,接收负载均衡设备发送的目标数据报文,并将其发送至集中式会话同步设备,由集中式会话同步设备将目标数据报文发送至应用服务器群。可见,本发明实施例提供的计算机可读存储介质所存储的计算机程序,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。The computer program stored in the computer-readable storage medium provided by the embodiment of the present invention can realize: the switch sends the received target data packet to the load balancing device determined after routing allocation, and the load balancing device locally After the session corresponding to the target data packet is not searched, the target data packet sent by the load balancing device is received and sent to the centralized session synchronization device, and the centralized session synchronization device sends the target data packet to the application server group. It can be seen that the computer program stored in the computer-readable storage medium provided by the embodiment of the present invention can realize the sending of the target data packet by the centralized session synchronization device when the session corresponding to the target data packet does not exist locally on the load balancing device, This avoids excessive CPU resource occupation caused by the need to store session information of all load balancing devices in the cluster on the load balancing devices in the cloud computing network, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

本发明实施例还提供了另一种计算机可读存储介质,该计算机可读存储介质为云计算网络中的集中式会话同步设备的存储介质,云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,计算机可读存储介质内存储有计算机程序,用以执行应用于云计算网络中的集中式会话同步设备的报文发送的方法步骤。An embodiment of the present invention further provides another computer-readable storage medium, where the computer-readable storage medium is a storage medium of a centralized session synchronization device in a cloud computing network, where the cloud computing network includes: a switch, a load balancing device, and a centralized In the session synchronization device, a computer program is stored in the computer-readable storage medium, and the computer program is used to execute the method steps of the message sending applied to the centralized session synchronization device in the cloud computing network.

具体的,上述报文发送方法,包括:Specifically, the above message sending method includes:

接收交换机发送的目标数据报文;其中,目标数据报文是由接收了目标数据报文的负载均衡设备在自身本地存储的会话中未查找到目标数据报文对应的会话后,向交换机发送的目标数据报文;Receive the target data packet sent by the switch; wherein, the target data packet is sent to the switch by the load balancing device that has received the target data packet after not finding the session corresponding to the target data packet in the session stored locally by itself target data message;

根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。The target data packet is sent to the application server farm according to the locally stored session of the centralized session synchronization device.

需要说明的是,执行上述计算机可读存储介质内所存储的计算机程序而实现的报文发送方法的其他实现方式,与前述方法实施例部分所提及的、应用于集中式会话同步设备的报文发送方法的实现方式相同,这里不再赘述。It should be noted that other implementations of the message sending method implemented by executing the computer program stored in the computer-readable storage medium above are the same as those mentioned in the foregoing method embodiment section and applied to the centralized session synchronization device. The implementation manner of the text sending method is the same, which is not repeated here.

本发明实施例提供的计算机可读存储介质所存储的计算机程序能够实现:集中式会话同步设备接收到交换发送的目标数据报文后,根据集中式会话同步设备的本地存储的会话,将目标数据报文发送至应用服务器群。可见,本发明实施例提供的计算机可读存储介质所存储的计算机程序,能够在负载均衡设备本地不存在目标数据报文对应的会话时,由集中式会话同步设备实现目标数据报文的发送,避免云计算网络中的负载均衡设备均需要存储集群中所有负载均衡设备的会话信息导致的CPU资源占用过度的情况,从而提高单台负载均衡设备会话管理的能力和整个集群转发用户流量的能力。The computer program stored in the computer-readable storage medium provided by the embodiment of the present invention can realize: after the centralized session synchronization device receives the target data message sent by the exchange, according to the locally stored session of the centralized session synchronization device, the target data The message is sent to the application server farm. It can be seen that the computer program stored in the computer-readable storage medium provided by the embodiment of the present invention can realize the sending of the target data packet by the centralized session synchronization device when the session corresponding to the target data packet does not exist locally on the load balancing device, This avoids excessive CPU resource occupation caused by the need to store session information of all load balancing devices in the cluster on the load balancing devices in the cloud computing network, thereby improving the session management capability of a single load balancing device and the ability of the entire cluster to forward user traffic.

本发明实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的负载均衡设备的报文发送方法。Embodiments of the present invention also provide a computer program product containing instructions, which, when running on a computer, cause the computer to execute the above-mentioned packet sending method applied to a load balancing device in a cloud computing network.

本发明实施例还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的负载均衡设备的报文发送方法。Embodiments of the present invention also provide a computer program, which, when running on a computer, causes the computer to execute the above-mentioned method for sending packets applied to a load balancing device in a cloud computing network.

本发明实施例还提供了另一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的交换机的报文发送方法。Embodiments of the present invention also provide another computer program product containing instructions, which, when running on a computer, cause the computer to execute the above-mentioned method for sending a packet applied to a switch in a cloud computing network.

本发明实施例还提供了另一种计算机程序,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的交换机的报文发送方法。The embodiment of the present invention also provides another computer program, which, when running on the computer, causes the computer to execute the above-mentioned packet sending method applied to the switch in the cloud computing network.

本发明实施例还提供了另一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的集中式会话同步设备的报文发送方法。Embodiments of the present invention also provide another computer program product containing instructions, which, when running on a computer, cause the computer to execute the above-mentioned message sending method applied to a centralized session synchronization device in a cloud computing network.

本发明实施例还提供了另一种计算机程序,当其在计算机上运行时,使得计算机执行上述应用于云计算网络中的集中式会话同步设备的报文发送方法。The embodiment of the present invention also provides another computer program, which, when running on a computer, causes the computer to execute the above-mentioned method for sending a message applied to a centralized session synchronization device in a cloud computing network.

对于装置、系统、电子设备、存储介质、包含指令的计算机程序产品、计算机程序实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the apparatus, system, electronic device, storage medium, computer program product containing instructions, and computer program embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for relevant details, please refer to the partial description of the method embodiments That's it.

需要说明的是,本发明实施例的装置、系统、电子设备、存储介质、包含指令的计算机程序产品及计算机程序分别是应用上述报文发送方法的装置、电子设备、存储介质、包含指令的计算机程序产品及计算机程序,则上述报文发送方法的所有实施例均适用于该装置、电子设备、存储介质、包含指令的计算机程序产品及计算机程序,且均能达到相同或相似的有益效果。It should be noted that the apparatus, system, electronic device, storage medium, computer program product containing instructions, and computer program in the embodiments of the present invention are apparatuses, electronic equipment, storage media, and computers containing instructions that apply the above-mentioned message sending method, respectively. Program product and computer program, all the above-mentioned embodiments of the message sending method are applicable to the device, electronic device, storage medium, computer program product and computer program containing instructions, and can achieve the same or similar beneficial effects.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。Each embodiment in this specification is described in a related manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (42)

1.一种报文发送方法,其特征在于,应用于云计算网络中的负载均衡设备,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述方法包括:1. A message sending method, characterized in that it is applied to a load balancing device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the method comprising: 接收交换机发送的目标数据报文;Receive the target data message sent by the switch; 在接收了所述目标数据报文的负载均衡设备的本地存储的会话中,查找所述目标数据报文对应的会话;如果查找失败,将所述目标数据报文发送至所述交换机,以使所述交换机将所述目标数据报文发送至集中式会话同步设备,从而使得所述集中式会话同步设备根据所述集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群,其中,所述集中式会话同步设备的本地存储的会话为:从所述云计算网络中的各个负载均衡设备同步获得的会话。In the locally stored session of the load balancing device that has received the target data packet, search for the session corresponding to the target data packet; if the search fails, send the target data packet to the switch, so that the The switch sends the target data packet to the centralized session synchronization device, so that the centralized session synchronization device sends the target data packet to the centralized session synchronization device according to the locally stored session of the centralized session synchronization device. The application server farm, wherein the locally stored session of the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the cloud computing network. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 通过所述交换机向所述集中式会话同步设备发送控制报文,以使得所述集中式会话同步设备根据所述控制报文进行信息同步,其中,所述控制报文为用于进行信息同步的报文。Send a control packet to the centralized session synchronization device through the switch, so that the centralized session synchronization device performs information synchronization according to the control packet, where the control packet is used for information synchronization message. 3.根据权利要求2所述的方法,其特征在于,所述通过所述交换机向所述集中式会话同步设备发送控制报文,包括:3. The method according to claim 2, wherein the sending a control packet to the centralized session synchronization device through the switch comprises: 确定所述负载均衡设备本地存储的会话中满足预设的同步条件的会话为待同步会话;determining that a session that satisfies a preset synchronization condition among the sessions stored locally by the load balancing device is a session to be synchronized; 通过所述交换机向所述集中式会话同步设备发送包含所述待同步会话的控制报文。Send a control message including the to-be-synchronized session to the centralized session synchronization device through the switch. 4.根据权利要求3所述的方法,其特征在于,所述预设的同步条件包括第一预设子同步条件和第二预设子同步条件;4. The method according to claim 3, wherein the preset synchronization condition comprises a first preset sub-synchronization condition and a second preset sub-synchronization condition; 第一预设子同步条件为:会话的持续时间大于或等于会话持续时间预设值;The first preset sub-synchronization condition is: the session duration is greater than or equal to the session duration preset value; 第二预设子同步条件为:通过会话所转发的数据报文数超过或等于数据报文转发数预设值。The second preset sub-synchronization condition is: the number of data packets forwarded through the session exceeds or equals to the preset value of the number of forwarded data packets. 5.根据权利要求2所述的方法,其特征在于,所述通过所述交换机向所述集中式会话同步设备发送控制报文,包括:5. The method according to claim 2, wherein the sending a control packet to the centralized session synchronization device through the switch comprises: 检测目标会话的状态是否发生改变,其中,所述目标会话为:已同步至所述集中式会话同步设备的本地会话;Detecting whether the state of a target session changes, wherein the target session is: a local session that has been synchronized to the centralized session synchronization device; 若检测所述目标会话的状态发生改变,通过所述交换机向所述集中式会话同步设备发送包含所述目标会话的状态的控制报文。If it is detected that the state of the target session changes, a control packet containing the state of the target session is sent to the centralized session synchronization device through the switch. 6.一种报文发送方法,其特征在于,应用于云计算网络中的集中式会话同步设备,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述方法包括:6. A message sending method, characterized in that it is applied to a centralized session synchronization device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the method comprising: 接收交换机发送的目标数据报文;其中,所述目标数据报文是由接收了所述目标数据报文的负载均衡设备在自身本地存储的会话中未查找到所述目标数据报文对应的会话后,向所述交换机发送的目标数据报文;Receive the target data packet sent by the switch; wherein the target data packet is a session corresponding to the target data packet that is not found in the session stored locally by the load balancing device that has received the target data packet Then, the target data message sent to the switch; 根据集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群。The target data message is sent to the application server group according to the locally stored session of the centralized session synchronization device. 7.根据权利要求6所述的方法,其特征在于,所述方法还包括:7. The method according to claim 6, wherein the method further comprises: 接收交换机发送的控制报文;其中,所述控制报文为负载均衡设备向交换机发送的用于进行信息同步的报文;receiving a control packet sent by the switch; wherein the control packet is a packet sent by the load balancing device to the switch for information synchronization; 根据所述控制报文进行信息同步。Information synchronization is performed according to the control message. 8.根据权利要求6或7所述的方法,其特征在于,所述根据集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群,包括:8. The method according to claim 6 or 7, wherein the sending the target data packet to an application server group according to a session stored locally in a centralized session synchronization device, comprises: 所述集中式会话同步设备的主CPU核,从所述集中式会话同步设备的本地存储的会话中,确定所述目标数据报文对应的第一会话;The main CPU core of the centralized session synchronization device determines the first session corresponding to the target data packet from the locally stored sessions of the centralized session synchronization device; 按照预设的哈希算法,对所述第一会话的属性进行哈希计算,根据计算结果,从所述集中式会话同步设备的CPU核中选择目标CPU核;According to a preset hash algorithm, hash calculation is performed on the attribute of the first session, and according to the calculation result, a target CPU core is selected from the CPU cores of the centralized session synchronization device; 调度所述目标CPU核,使得所述目标CPU核根据所述第一会话,将所述目标数据报文发送至应用服务器群。The target CPU core is scheduled so that the target CPU core sends the target data packet to the application server group according to the first session. 9.根据权利要求8所述的方法,其特征在于,所述方法还包括:9. The method according to claim 8, wherein the method further comprises: 所述目标CPU核将所述第一会话的超时起始时刻更新为所述目标数据报文的发送完成时刻。The target CPU core updates the timeout start time of the first session to the completion time of sending the target data packet. 10.根据权利要求9所述的方法,其特征在于,所述方法还包括:10. The method according to claim 9, wherein the method further comprises: 所述目标CPU核根据已更新的所述第一会话的超时起始时刻,检测所述第一会话的会话超时时长是否达到预设时长,若所述第一会话的会话超时时长达到预设时长,销毁所述第一会话。The target CPU core detects whether the session timeout duration of the first session reaches a preset duration according to the updated timeout start time of the first session, and if the session timeout duration of the first session reaches the preset duration , destroying the first session. 11.根据权利要求7所述的方法,其特征在于,所述根据所述控制报文进行信息同步,包括:11. The method according to claim 7, wherein the performing information synchronization according to the control message comprises: 所述集中式会话同步设备的主CPU核确定所述控制报文对应的第二会话;The main CPU core of the centralized session synchronization device determines the second session corresponding to the control message; 按照预设的哈希算法,对所述第二会话的属性进行哈希计算,根据计算结果,从所述集中式会话同步设备的CPU核中选择目标CPU核;According to a preset hash algorithm, hash calculation is performed on the attribute of the second session, and according to the calculation result, a target CPU core is selected from the CPU cores of the centralized session synchronization device; 调度所述目标CPU核根据所述第二会话进行信息同步。The target CPU core is scheduled to perform information synchronization according to the second session. 12.根据权利要求11所述的方法,其特征在于,所述方法还包括:12. The method of claim 11, wherein the method further comprises: 所述目标CPU核将所述第二会话的超时起始时刻更新为信息同步完成时刻。The target CPU core updates the timeout start time of the second session to the information synchronization completion time. 13.根据权利要求12所述的方法,其特征在于,所述方法还包括:13. The method of claim 12, wherein the method further comprises: 所述目标CPU核根据已更新的所述第二会话的超时起始时刻,检测所述第二会话的会话超时时长是否达到预设时长,若所述第二会话的会话超时时长达到预设时长,销毁所述第二会话。The target CPU core detects whether the session timeout duration of the second session reaches a preset duration according to the updated timeout start time of the second session, and if the session timeout duration of the second session reaches the preset duration , destroying the second session. 14.一种报文发送方法,其特征在于,应用于云计算网络中的交换机,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述方法包括:14. A message sending method, characterized in that it is applied to a switch in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the method comprising: 接收目标数据报文;Receive the target data message; 对所述目标数据报文进行路由分配,确定用于转发所述目标数据报文的负载均衡设备,并将所述目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找所述目标数据报文对应的会话;Perform route allocation on the target data packet, determine a load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device The device searches for the session corresponding to the target data packet in the locally stored session of the determined load balancing device; 接收所确定的负载均衡设备在查找会话失败后发送的所述目标数据报文,并将所述目标数据报文发送至所述集中式会话同步设备,以使得所述集中式会话同步设备根据所述集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群,其中,所述集中式会话同步设备的本地存储的会话为:从所述云计算网络中的各个负载均衡设备同步获得的会话。Receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the centralized session synchronization device the locally stored session of the centralized session synchronization device, and send the target data message to the application server group, wherein the locally stored session of the centralized session synchronization device is: Sessions obtained by the load balancing device synchronously. 15.根据权利要求14所述的方法,其特征在于,所述方法还包括:15. The method of claim 14, wherein the method further comprises: 接收负载均衡设备发送的控制报文,并将所述控制报文发送至所述集中式会话同步设备,以使得所述集中式会话同步设备根据所述控制报文进行信息同步,其中,所述控制报文为用于进行信息同步的报文。Receive a control packet sent by a load balancing device, and send the control packet to the centralized session synchronization device, so that the centralized session synchronization device performs information synchronization according to the control packet, wherein the The control message is a message used for information synchronization. 16.一种报文发送装置,其特征在于,应用于云计算网络中的负载均衡设备,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述装置包括:16. A message sending device, characterized in that it is applied to a load balancing device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the device comprising: 第一接收模块,用于接收交换机发送的目标数据报文;The first receiving module is used for receiving the target data message sent by the switch; 第一查找模块,用于在接收了所述目标数据报文的负载均衡设备的本地存储的会话中,查找所述目标数据报文对应的会话;a first search module, configured to search for the session corresponding to the target data packet in the session stored locally by the load balancing device that has received the target data packet; 第一发送模块,用于在查找所述目标数据报文对应的会话失败时,将所述目标数据报文发送至所述交换机,以使所述交换机将所述目标数据报文发送至集中式会话同步设备,从而使得所述集中式会话同步设备根据所述集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群,其中,所述集中式会话同步设备的本地存储的会话为:从所述云计算网络中的各个负载均衡设备同步获得的会话。a first sending module, configured to send the target data message to the switch when the session corresponding to the target data message fails to be searched, so that the switch sends the target data message to the centralized A session synchronization device, so that the centralized session synchronization device sends the target data packet to the application server group according to the session stored locally by the centralized session synchronization device, wherein the centralized session synchronization device The locally stored session is a session obtained synchronously from each load balancing device in the cloud computing network. 17.一种报文发送装置,其特征在于,应用于云计算网络中的集中式会话同步设备,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述装置包括:17. A message sending device, characterized in that it is applied to a centralized session synchronization device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the device comprising: 第九接收模块,用于接收交换机发送的目标数据报文;其中,所述目标数据报文是由接收了所述目标数据报文的负载均衡设备在自身本地存储的会话中未查找到所述目标数据报文对应的会话后,向所述交换机发送的目标数据报文;A ninth receiving module, configured to receive a target data packet sent by a switch; wherein, the target data packet is a load balancing device that has received the target data packet and does not find the target data packet in a session stored locally by itself The target data packet sent to the switch after the session corresponding to the target data packet; 第五发送模块,用于根据集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群。The fifth sending module is configured to send the target data message to the application server group according to the session stored locally in the centralized session synchronization device. 18.根据权利要求17所述的装置,其特征在于,所述装置还包括:18. The apparatus of claim 17, wherein the apparatus further comprises: 第一同步模块,用于接收交换机发送的控制报文;根据所述控制报文进行信息同步;其中,所述控制报文为负载均衡设备向交换机发送的用于进行信息同步的报文。The first synchronization module is configured to receive a control packet sent by the switch; perform information synchronization according to the control packet; wherein the control packet is a packet sent by the load balancing device to the switch for information synchronization. 19.根据权利要求17或18所述的装置,其特征在于,所述第五发送模块包括第五发送子模块;19. The apparatus according to claim 17 or 18, wherein the fifth sending module comprises a fifth sending sub-module; 所述第五发送子模块,用于调度所述集中式会话同步设备的主CPU核,从所述集中式会话同步设备本地存储的会话中,确定所述目标数据报文对应的第一会话;还用于调度所述集中式会话同步设备的主CPU核按照预设的哈希算法,对所述第一会话的属性进行哈希计算,根据计算结果,从所述集中式会话同步设备的CPU核中选择目标CPU核;还用于调度所述集中式会话同步设备的主CPU核,进一步调度所述目标CPU核,使得所述目标CPU核根据所述第一会话,将所述目标数据报文发送至应用服务器群。The fifth sending submodule is configured to schedule the main CPU core of the centralized session synchronization device, and determine the first session corresponding to the target data packet from the sessions stored locally by the centralized session synchronization device; It is also used to schedule the main CPU core of the centralized session synchronization device to perform hash calculation on the attribute of the first session according to a preset hash algorithm, and according to the calculation result, from the CPU of the centralized session synchronization device selecting a target CPU core from among the cores; it is also used to schedule the main CPU core of the centralized session synchronization device, and further schedule the target CPU core, so that the target CPU core sends the target datagram to the target datagram according to the first session. The message is sent to the application server farm. 20.根据权利要求19所述的装置,其特征在于,所述装置还包括:第二时钟模块;20. The apparatus according to claim 19, wherein the apparatus further comprises: a second clock module; 所述第二时钟模块,用于调度所述目标CPU核将所述第一会话的超时起始时刻更新为所述目标数据报文的发送完成时刻。The second clock module is configured to schedule the target CPU core to update the timeout start time of the first session to the completion time of sending the target data message. 21.根据权利要求20所述的装置,其特征在于,21. The apparatus of claim 20, wherein 所述第二时钟模块,还用于调度所述目标CPU核根据已更新的所述第一会话的超时起始时刻,检测所述第一会话的会话超时时长是否达到预设时长,若所述第一会话的会话超时时长达到预设时长,销毁所述第一会话。The second clock module is further configured to schedule the target CPU core to detect whether the session timeout duration of the first session has reached a preset duration according to the updated timeout start time of the first session, and if the When the session timeout duration of the first session reaches a preset duration, the first session is destroyed. 22.根据权利要求18所述的装置,其特征在于,所述第一同步模块包括第一同步子模块;22. The apparatus of claim 18, wherein the first synchronization module comprises a first synchronization sub-module; 所述第一同步子模块,用于调度所述集中式会话同步设备的主CPU核确定所述控制报文对应的第二会话;还用于调度所述集中式会话同步设备的主CPU核按照预设的哈希算法,对所述第二会话的属性进行哈希计算,根据计算结果,从所述集中式会话同步设备的CPU核中选择目标CPU核;还用于调度所述集中式会话同步设备的主CPU核,进一步调度所述目标CPU核根据所述第二会话进行信息同步。The first synchronization submodule is used to schedule the main CPU core of the centralized session synchronization device to determine the second session corresponding to the control message; and is also used to schedule the main CPU core of the centralized session synchronization device according to A preset hash algorithm, which performs hash calculation on the attributes of the second session, and selects a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result; and is also used for scheduling the centralized session The main CPU core of the synchronization device further schedules the target CPU core to perform information synchronization according to the second session. 23.根据权利要求22所述的装置,其特征在于,所述装置还包括:第三时钟模块;23. The apparatus according to claim 22, wherein the apparatus further comprises: a third clock module; 所述第三时钟模块,用于调度所述目标CPU核将所述第二会话的超时起始时刻更新为信息同步完成时刻。The third clock module is configured to schedule the target CPU core to update the timeout start time of the second session to the information synchronization completion time. 24.根据权利要求23所述的装置,其特征在于,24. The apparatus of claim 23, wherein 所述第三时钟模块,还用于调度所述目标CPU核根据已更新的所述第二会话的超时起始时刻,检测所述第二会话的会话超时时长是否达到预设时长,若所述第二会话的会话超时时长达到预设时长,销毁所述第二会话。The third clock module is further configured to schedule the target CPU core to detect whether the session timeout duration of the second session reaches a preset duration according to the updated timeout start time of the second session, and if the The session timeout duration of the second session reaches the preset duration, and the second session is destroyed. 25.一种报文发送装置,其特征在于,应用于云计算网络中的交换机,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述装置包括:25. A message sending device, characterized in that it is applied to a switch in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the device comprising: 第二接收模块,用于接收目标数据报文;The second receiving module is used to receive the target data message; 第一分配模块,用于对所述目标数据报文进行路由分配,确定用于转发所述目标数据报文的负载均衡设备,并将所述目标数据报文发送至所确定的负载均衡设备,以使得所确定的负载均衡设备,在所确定的负载均衡设备的本地存储的会话中,查找所述目标数据报文对应的会话;a first distribution module, configured to perform route distribution on the target data packet, determine a load balancing device for forwarding the target data packet, and send the target data packet to the determined load balancing device, so that the determined load balancing device searches for the session corresponding to the target data packet in the locally stored session of the determined load balancing device; 第三接收模块,用于接收所确定的负载均衡设备在查找会话失败后发送的所述目标数据报文,并将所述目标数据报文发送至所述集中式会话同步设备,以使得所述集中式会话同步设备根据所述集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群,其中,所述集中式会话同步设备的本地存储的会话为:从所述云计算网络中的各个负载均衡设备同步获得的会话。a third receiving module, configured to receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device, so that the The centralized session synchronization device sends the target data message to the application server group according to the locally stored session of the centralized session synchronization device, wherein the locally stored session of the centralized session synchronization device is: The session obtained by each load balancing device in the cloud computing network is synchronized. 26.一种报文发送系统,其特征在于,所述系统包括:交换机、负载均衡设备和集中式会话同步设备;其中,26. A message sending system, characterized in that the system comprises: a switch, a load balancing device and a centralized session synchronization device; wherein, 所述交换机,用于接收目标数据报文;对所述目标数据报文进行路由分配,确定用于转发所述目标数据报文的负载均衡设备;将所述目标数据报文发送至所确定的负载均衡设备;The switch is configured to receive the target data message; perform route allocation on the target data message, determine a load balancing device for forwarding the target data message; send the target data message to the determined load balancing equipment; 所述负载均衡设备,用于接收所述交换机发送的所述目标数据报文;在负载均衡设备的本地存储的会话中,查找所述目标数据报文对应的会话;如果查找失败,将所述目标数据报文发送至所述交换机;The load balancing device is configured to receive the target data packet sent by the switch; in the locally stored session of the load balancing device, search for a session corresponding to the target data packet; if the search fails, the sending the target data message to the switch; 所述交换机,还用于接收所确定的负载均衡设备在查找会话失败后发送的所述目标数据报文,并将所述目标数据报文发送至所述集中式会话同步设备;The switch is further configured to receive the target data packet sent by the determined load balancing device after the session search fails, and send the target data packet to the centralized session synchronization device; 所述集中式会话同步设备,用于接收所述交换机发送的所述目标数据报文,根据所述集中式会话同步设备的本地存储的会话,将所述目标数据报文发送至应用服务器群,其中,所述集中式会话同步设备的本地存储的会话为:从所述系统中的各个负载均衡设备同步获得的会话。The centralized session synchronization device is configured to receive the target data packet sent by the switch, and send the target data packet to the application server group according to the session stored locally by the centralized session synchronization device, Wherein, the locally stored session of the centralized session synchronization device is: the session obtained from the synchronization of each load balancing device in the system. 27.根据权利要求26所述的系统,其特征在于,27. The system of claim 26, wherein 所述负载均衡设备,还用于向所述交换机发送控制报文;The load balancing device is further configured to send a control message to the switch; 所述交换机,还用于接收所述负载均衡设备发送的所述控制报文,将所述控制报文发送至所述集中式会话同步设备;The switch is further configured to receive the control message sent by the load balancing device, and send the control message to the centralized session synchronization device; 所述集中式会话同步设备,还用于接收所述交换机发送的所述控制报文,根据所述控制报文进行信息同步,其中,所述控制报文为用于进行信息同步的报文。The centralized session synchronization device is further configured to receive the control message sent by the switch, and perform information synchronization according to the control message, where the control message is a message used for information synchronization. 28.根据权利要求27所述的系统,其特征在于,28. The system of claim 27, wherein 所述负载均衡设备,具体用于确定所述负载均衡设备本地存储的会话中满足预设的同步条件的会话为待同步会话,向所述交换机发送包含所述待同步会话的控制报文;The load balancing device is specifically configured to determine a session that satisfies a preset synchronization condition among the sessions stored locally by the load balancing device as a to-be-synchronized session, and send a control packet including the to-be-synchronized session to the switch; 所述交换机,具体用于接收所述负载均衡设备发送的所述包含所述待同步会话的控制报文,将所述包含所述待同步会话的控制报文发送至所述集中式会话同步设备;The switch is specifically configured to receive the control packet including the to-be-synchronized session sent by the load balancing device, and send the control packet including the to-be-synchronized session to the centralized session synchronization device ; 所述集中式会话同步设备,具体用于接收所述交换机发送的所述包含所述待同步会话的控制报文。The centralized session synchronization device is specifically configured to receive the control message including the to-be-synchronized session sent by the switch. 29.根据权利要求28所述的系统,其特征在于,所述预设的同步条件包括第一预设子同步条件和第二预设子同步条件;29. The system according to claim 28, wherein the preset synchronization condition comprises a first preset sub-synchronization condition and a second preset sub-synchronization condition; 第一预设子同步条件为:会话的持续时间大于或等于会话持续时间预设值;The first preset sub-synchronization condition is: the session duration is greater than or equal to the session duration preset value; 第二预设子同步条件为:通过会话所转发的数据报文数超过或等于数据报文转发数预设值。The second preset sub-synchronization condition is: the number of data packets forwarded through the session exceeds or equals to the preset value of the number of forwarded data packets. 30.根据权利要求27所述的系统,其特征在于,30. The system of claim 27, wherein 所述负载均衡设备,具体用于检测目标会话的状态是否发生改变,其中,所述目标会话为:已同步至所述集中式会话同步设备的本地会话;若检测所述目标会话的状态发生改变,向所述交换机发送包含所述目标会话的状态的控制报文;The load balancing device is specifically configured to detect whether the state of the target session changes, wherein the target session is: a local session that has been synchronized to the centralized session synchronization device; if the state of the target session is detected to change , sending a control message containing the state of the target session to the switch; 所述交换机,具体用于接收所述负载均衡设备发送的所述包含所述目标会话的状态的控制报文,将所述包含所述目标会话的状态的控制报文发送至所述集中式会话同步设备;The switch is specifically configured to receive the control packet including the state of the target session sent by the load balancing device, and send the control packet including the state of the target session to the centralized session sync device; 所述集中式会话同步设备,具体用于接收所述交换机发送的所述包含所述目标会话的状态的控制报文。The centralized session synchronization device is specifically configured to receive the control message including the state of the target session sent by the switch. 31.根据权利要求26-30中任一项所述的系统,其特征在于,31. The system of any one of claims 26-30, wherein 所述集中式会话同步设备,具体用于调度所述集中式会话同步设备的主CPU核,从所述集中式会话同步设备的本地存储的会话中,确定所述目标数据报文对应的第一会话;按照预设的哈希算法,对所述第一会话的属性进行哈希计算,根据计算结果,从所述集中式会话同步设备的CPU核中选择目标CPU核;调度所述目标CPU核,使得所述目标CPU核根据所述第一会话,将所述目标数据报文发送至应用服务器群。The centralized session synchronization device is specifically configured to schedule the main CPU core of the centralized session synchronization device, and from the locally stored sessions of the centralized session synchronization device, determine the first corresponding to the target data packet. session; perform hash calculation on the attributes of the first session according to a preset hash algorithm, and select a target CPU core from the CPU cores of the centralized session synchronization device according to the calculation result; schedule the target CPU core , so that the target CPU core sends the target data packet to the application server group according to the first session. 32.根据权利要求31所述的系统,其特征在于,32. The system of claim 31, wherein 所述集中式会话同步设备,还用于调度所述目标CPU核将所述第一会话的超时起始时刻更新为所述目标数据报文的发送完成时刻。The centralized session synchronization device is further configured to schedule the target CPU core to update the timeout start time of the first session to the completion time of sending the target data message. 33.根据权利要求32所述的系统,其特征在于,33. The system of claim 32, wherein 所述集中式会话同步设备,还用于调度所述目标CPU核根据已更新的所述第一会话的超时起始时刻,检测所述第一会话的会话超时时长是否达到预设时长,若所述第一会话的会话超时时长达到预设时长,销毁所述第一会话。The centralized session synchronization device is further configured to schedule the target CPU core to detect whether the session timeout duration of the first session reaches a preset duration according to the updated timeout start time of the first session, and if the When the session timeout duration of the first session reaches a preset duration, the first session is destroyed. 34.根据权利要求27-30所述的系统,其特征在于,34. The system of claims 27-30, wherein 所述集中式会话同步设备,具体用于调度所述集中式会话同步设备的主CPU核确定所述控制报文对应的第二会话;按照预设的哈希算法,对所述第二会话的属性进行哈希计算,根据计算结果,从所述集中式会话同步设备的CPU核中选择目标CPU核;调度所述目标CPU核根据所述第二会话进行信息同步。The centralized session synchronization device is specifically configured to schedule the main CPU core of the centralized session synchronization device to determine the second session corresponding to the control packet; Hash calculation is performed on the attribute, and according to the calculation result, a target CPU core is selected from the CPU cores of the centralized session synchronization device; the target CPU core is scheduled to perform information synchronization according to the second session. 35.根据权利要求34所述的系统,其特征在于,35. The system of claim 34, wherein 所述集中式会话同步设备,还用于调度所述目标CPU核将所述第二会话的超时起始时刻更新为信息同步完成时刻。The centralized session synchronization device is further configured to schedule the target CPU core to update the timeout start time of the second session to the information synchronization completion time. 36.根据权利要求35所述的系统,其特征在于,36. The system of claim 35, wherein 所述集中式会话同步设备,还用于调度所述目标CPU核根据已更新的所述第二会话的超时起始时刻,检测所述第二会话的会话超时时长是否达到预设时长,若所述第二会话的会话超时时长达到预设时长,销毁所述第二会话。The centralized session synchronization device is further configured to schedule the target CPU core to detect whether the session timeout duration of the second session reaches a preset duration according to the updated timeout start time of the second session, and if the When the session timeout duration of the second session reaches a preset duration, the second session is destroyed. 37.一种电子设备,其特征在于,所述电子设备为云计算网络中的负载均衡设备,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述负载均衡设备包括:处理器和存储器;37. An electronic device, characterized in that the electronic device is a load balancing device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the load balancing device comprising : processor and memory; 存储器,用于存放计算机程序;memory for storing computer programs; 处理器,用于执行存储器上所存放的程序时,实现权利要求1-5任一所述的方法步骤。The processor is configured to implement the method steps described in any one of claims 1-5 when executing the program stored in the memory. 38.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质为云计算网络中的负载均衡设备的存储介质,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-5任一项所述的方法步骤。38. A computer-readable storage medium, wherein the computer-readable storage medium is a storage medium of a load balancing device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device, and a centralized session A synchronization device, a computer program is stored in the computer-readable storage medium, and the computer program implements the method steps described in any one of claims 1-5 when the computer program is executed by the processor. 39.一种电子设备,其特征在于,所述电子设备为云计算网络中的集中式会话同步设备,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述集中式会话同步设备包括:处理器和存储器;39. An electronic device, characterized in that the electronic device is a centralized session synchronization device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device, and a centralized session synchronization device, the centralized The session synchronization device includes: a processor and a memory; 存储器,用于存放计算机程序;memory for storing computer programs; 处理器,用于执行存储器上所存放的程序时,实现权利要求6-13任一所述的方法步骤。The processor is configured to implement the method steps described in any one of claims 6-13 when executing the program stored in the memory. 40.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质为云计算网络中的集中式会话同步设备的存储介质,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求6-13任一项所述的方法步骤。40. A computer-readable storage medium, wherein the computer-readable storage medium is a storage medium of a centralized session synchronization device in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device, and a centralized The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method steps of any one of claims 6-13 are implemented. 41.一种电子设备,其特征在于,所述电子设备为云计算网络中的交换机,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述交换机包括:处理器和存储器;41. An electronic device, characterized in that the electronic device is a switch in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device and a centralized session synchronization device, the switch comprising: a processor and a memory; 存储器,用于存放计算机程序;memory for storing computer programs; 处理器,用于执行存储器上所存放的程序时,实现权利要求14-15任一所述的方法步骤。The processor is configured to implement the method steps described in any one of claims 14-15 when executing the program stored in the memory. 42.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质为云计算网络中的交换机的存储介质,所述云计算网络包括:交换机、负载均衡设备和集中式会话同步设备,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求14-15任一项所述的方法步骤。42. A computer-readable storage medium, wherein the computer-readable storage medium is a storage medium of a switch in a cloud computing network, the cloud computing network comprising: a switch, a load balancing device, and a centralized session synchronization device , a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method steps of any one of claims 14-15 are implemented.
CN201710816202.7A 2017-09-12 2017-09-12 A kind of file transmitting method, device, system, electronic equipment and storage medium Pending CN109495526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710816202.7A CN109495526A (en) 2017-09-12 2017-09-12 A kind of file transmitting method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710816202.7A CN109495526A (en) 2017-09-12 2017-09-12 A kind of file transmitting method, device, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109495526A true CN109495526A (en) 2019-03-19

Family

ID=65687237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710816202.7A Pending CN109495526A (en) 2017-09-12 2017-09-12 A kind of file transmitting method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109495526A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110913039A (en) * 2019-12-03 2020-03-24 杭州圆石网络安全技术有限公司 TCP stream drift processing method and device with separated data and control
CN112769959A (en) * 2021-03-04 2021-05-07 北京字节跳动网络技术有限公司 Session synchronization method, device, first node, second node, system and medium
CN114615355A (en) * 2022-05-13 2022-06-10 恒生电子股份有限公司 Message processing method and message analysis module
CN115484272A (en) * 2022-08-22 2022-12-16 北京百度网讯科技有限公司 Synchronous conversation method, device, equipment and storage medium
CN115567536A (en) * 2022-09-22 2023-01-03 中国联合网络通信集团有限公司 A computing power network scheduling method, device, electronic equipment, and storage medium
CN116074136A (en) * 2021-10-30 2023-05-05 慧与发展有限责任合伙企业 Session Detection and Inference
CN116192876A (en) * 2023-02-24 2023-05-30 网络通信与安全紫金山实验室 Information synchronization method, system, electronic device and computer-readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7657629B1 (en) * 2000-09-26 2010-02-02 Foundry Networks, Inc. Global server load balancing
CN103457869A (en) * 2013-08-28 2013-12-18 北京星网锐捷网络技术有限公司 Conversation maintaining method and device
CN104243591A (en) * 2014-09-24 2014-12-24 杭州华三通信技术有限公司 Method and device for synchronizing session information of security cluster
CN104380278A (en) * 2012-06-29 2015-02-25 英特尔公司 Apparatus, system and method for client management session persistence between one or more clients and a server in a data center
CN106534345A (en) * 2016-12-07 2017-03-22 东软集团股份有限公司 Message forwarding method and device
CN106789713A (en) * 2017-03-13 2017-05-31 杭州迪普科技股份有限公司 A kind of method and device of message forwarding

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7657629B1 (en) * 2000-09-26 2010-02-02 Foundry Networks, Inc. Global server load balancing
CN104380278A (en) * 2012-06-29 2015-02-25 英特尔公司 Apparatus, system and method for client management session persistence between one or more clients and a server in a data center
CN104380278B (en) * 2012-06-29 2017-07-18 英特尔公司 Apparatus, system and method for client management session persistence
CN103457869A (en) * 2013-08-28 2013-12-18 北京星网锐捷网络技术有限公司 Conversation maintaining method and device
CN104243591A (en) * 2014-09-24 2014-12-24 杭州华三通信技术有限公司 Method and device for synchronizing session information of security cluster
CN106534345A (en) * 2016-12-07 2017-03-22 东软集团股份有限公司 Message forwarding method and device
CN106789713A (en) * 2017-03-13 2017-05-31 杭州迪普科技股份有限公司 A kind of method and device of message forwarding

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110913039A (en) * 2019-12-03 2020-03-24 杭州圆石网络安全技术有限公司 TCP stream drift processing method and device with separated data and control
CN112769959A (en) * 2021-03-04 2021-05-07 北京字节跳动网络技术有限公司 Session synchronization method, device, first node, second node, system and medium
US12328368B2 (en) 2021-03-04 2025-06-10 Beijing Bytedance Network Technology Co., Ltd. Session synchronization method, apparatus and system, and first node, second node and medium
CN116074136A (en) * 2021-10-30 2023-05-05 慧与发展有限责任合伙企业 Session Detection and Inference
CN114615355A (en) * 2022-05-13 2022-06-10 恒生电子股份有限公司 Message processing method and message analysis module
CN115484272A (en) * 2022-08-22 2022-12-16 北京百度网讯科技有限公司 Synchronous conversation method, device, equipment and storage medium
CN115567536A (en) * 2022-09-22 2023-01-03 中国联合网络通信集团有限公司 A computing power network scheduling method, device, electronic equipment, and storage medium
CN115567536B (en) * 2022-09-22 2024-04-16 中国联合网络通信集团有限公司 Computing power network scheduling method and device, electronic equipment and storage medium
CN116192876A (en) * 2023-02-24 2023-05-30 网络通信与安全紫金山实验室 Information synchronization method, system, electronic device and computer-readable storage medium

Similar Documents

Publication Publication Date Title
US10917351B2 (en) Reliable load-balancer using segment routing and real-time application monitoring
US10171567B2 (en) Load balancing computer device, system, and method
CN109495526A (en) A kind of file transmitting method, device, system, electronic equipment and storage medium
US11843657B2 (en) Distributed load balancer
US9762494B1 (en) Flow distribution table for packet flow load balancing
US8825867B2 (en) Two level packet distribution with stateless first level packet distribution to a group of servers and stateful second level packet distribution to a server within the group
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
US12095855B2 (en) Distributed resilient load-balancing for multipath transport protocols
CN106549875B (en) A session management method, device and load balancer
US20150189009A1 (en) Distributed multi-level stateless load balancing
CN113826363A (en) Consistent routing advertisements between redundant controllers in a global network access point
US20140310391A1 (en) Multipath routing in a distributed load balancer
CN112087390B (en) Network routing method and device
US10148741B2 (en) Multi-homing load balancing system
WO2015101260A1 (en) Method and system for processing instant communication service
US9942153B2 (en) Multiple persistant load balancer system
WO2018045992A1 (en) Address management method and apparatus
US20130094514A1 (en) Method and switch for sending packet
CN108200158A (en) request transmission system, method, device and storage medium
WO2016175872A1 (en) Network based service discovery via unicast messages
CN106230992A (en) A kind of load-balancing method and load balancing node
CN109120556B (en) Method and system for cloud host to access object storage server
CN107332771A (en) A kind of method, router and route selection system for ensureing route uniformity
CN111953804B (en) Network data transmission method, device, medium and electronic equipment
KR101382177B1 (en) Dynamic Message Routing System and Method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190319

RJ01 Rejection of invention patent application after publication