[go: up one dir, main page]

CN118612223A - Data processing method, device, system, computer equipment and storage medium - Google Patents

Data processing method, device, system, computer equipment and storage medium Download PDF

Info

Publication number
CN118612223A
CN118612223A CN202410211386.4A CN202410211386A CN118612223A CN 118612223 A CN118612223 A CN 118612223A CN 202410211386 A CN202410211386 A CN 202410211386A CN 118612223 A CN118612223 A CN 118612223A
Authority
CN
China
Prior art keywords
server
migration
message
terminal
data request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410211386.4A
Other languages
Chinese (zh)
Other versions
CN118612223B (en
Inventor
罗明明
罗成
汪福裕
吴波
方统浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202410211386.4A priority Critical patent/CN118612223B/en
Publication of CN118612223A publication Critical patent/CN118612223A/en
Application granted granted Critical
Publication of CN118612223B publication Critical patent/CN118612223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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/1012Server selection for load balancing based on compliance of requirements or conditions with available server resources
    • 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/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • 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)
  • Information Transfer Between Computers (AREA)

Abstract

本申请涉及一种数据处理方法、装置、系统、计算机设备、存储介质和计算机程序产品。所述方法包括:原始服务器接收终端发送的第一数据请求报文,并将该第一数据请求报文重定向至第一迁移服务器;第一迁移服务器向终端反馈第一响应报文;原始服务器接收终端发送的第二数据请求报文,并将该第二数据请求报文重定向至第一迁移服务器;第一迁移服务器在自身满足报文迁移条件的情况下,向满足报文响应条件的第二迁移服务器发送迁移请求,并在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下,向原始服务器发送用于指示原始服务器将终端发送的报文重定向至第二迁移服务器的重定向信息。采用上述方法能够提高数据处理效率。

The present application relates to a data processing method, device, system, computer equipment, storage medium and computer program product. The method comprises: the original server receives a first data request message sent by a terminal, and redirects the first data request message to a first migration server; the first migration server feeds back a first response message to the terminal; the original server receives a second data request message sent by the terminal, and redirects the second data request message to the first migration server; the first migration server sends a migration request to a second migration server that meets the message response condition when the first migration server meets the message migration condition, and sends redirection information to the original server for instructing the original server to redirect the message sent by the terminal to the second migration server when receiving confirmation information fed back by the second migration server based on the migration request. The above method can improve data processing efficiency.

Description

数据处理方法、装置、系统、计算机设备和存储介质Data processing method, device, system, computer equipment and storage medium

技术领域Technical Field

本申请涉及计算机技术领域,特别是涉及一种数据处理方法、装置、计算机设备、计算机可读存储介质和计算机程序产品。The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product.

背景技术Background Art

随着计算机技术的快速发展,出现了包括多个服务器的服务器集群。终端可以通过与服务器集群中的服务器建立连接,以获取所需要的数据资源。将终端连接的服务器称为原始服务器,若原始服务器无法反馈对应的数据资源,则可以通过将数据请求迁移至服务器集群中的另一服务器,由另一服务器响应用户需求。With the rapid development of computer technology, server clusters consisting of multiple servers have emerged. Terminals can establish connections with servers in the server cluster to obtain the required data resources. The server connected to the terminal is called the original server. If the original server cannot feedback the corresponding data resources, the data request can be migrated to another server in the server cluster, and the other server responds to the user's needs.

传统技术中,若需要进行请求迁移,则由原始服务器进行迁移服务器的选择。针对多个请求均需要迁移的情况,若采用传统技术进行请求迁移,则用户需求的响应速度将严重依赖于原始服务器的性能,存在数据处理效率低的问题。In traditional technology, if request migration is required, the original server selects the migration server. If multiple requests need to be migrated, the response speed of user needs will be heavily dependent on the performance of the original server, resulting in low data processing efficiency.

发明内容Summary of the invention

基于此,有必要针对上述技术问题,提供一种能够提高数据处理效率的数据处理方法、装置、系统、计算机设备、计算机可读存储介质和计算机程序产品。Based on this, it is necessary to provide a data processing method, apparatus, system, computer equipment, computer-readable storage medium and computer program product that can improve data processing efficiency in response to the above technical problems.

第一方面,本申请提供了一种数据处理方法,应用于第一迁移服务器,所述方法包括:In a first aspect, the present application provides a data processing method, which is applied to a first migration server, and the method includes:

响应原始服务器发送的第一重定向报文中携带的第一数据请求报文,向发出所述第一数据请求报文的终端反馈第一响应报文;In response to the first data request message carried in the first redirection message sent by the original server, a first response message is fed back to the terminal that sent the first data request message;

接收所述原始服务器发送的、包含第二数据请求报文的第二重定向报文;所述第二数据请求报文由所述终端在接收到所述第一响应报文的情况下发送至所述原始服务器;receiving a second redirection message including a second data request message sent by the original server; the second data request message is sent by the terminal to the original server when the first response message is received;

若所述第一迁移服务器满足报文迁移条件,则向满足报文响应条件的第二迁移服务器发送针对所述第二数据请求报文的迁移请求;If the first migration server meets the message migration condition, sending a migration request for the second data request message to a second migration server that meets the message response condition;

在接收到所述第二迁移服务器基于所述迁移请求反馈的确认信息的情况下,向所述原始服务器发送重定向信息;所述重定向信息用于指示所述原始服务器将所述终端发送的报文重定向至所述第二迁移服务器。When receiving confirmation information fed back by the second migration server based on the migration request, redirection information is sent to the original server; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server.

第二方面,本申请提供了一种数据处理方法,应用于原始服务器,所述方法包括:In a second aspect, the present application provides a data processing method, which is applied to an original server, and the method includes:

接收终端发送的第一数据请求报文,并向第一迁移服务器发送包含所述第一数据请求报文的第一重定向报文;receiving a first data request message sent by a terminal, and sending a first redirect message including the first data request message to a first migration server;

接收所述终端发送的第二数据请求报文;所述第二数据请求报文,由所述终端在接收到第一响应报文的情况下发送;所述第一响应报文,由所述第一迁移服务器基于所述第一数据请求报文反馈至所述终端;receiving a second data request message sent by the terminal; the second data request message is sent by the terminal when the first response message is received; the first response message is fed back to the terminal by the first migration server based on the first data request message;

向所述第一迁移服务器发送包含所述第二数据请求报文的第二重定向报文;Sending a second redirection message including the second data request message to the first migration server;

在所述第一迁移服务器满足报文迁移条件的情况下,接收针对所述第二数据请求报文的重定向信息;所述重定向信息,由所述第一迁移服务器在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下发送;所述重定向信息用于指示所述原始服务器将所述终端发送的报文重定向至所述第二迁移服务器;所述第二迁移服务器满足报文响应条件。When the first migration server meets the message migration condition, it receives redirection information for the second data request message; the redirection information is sent by the first migration server when receiving confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server; the second migration server meets the message response condition.

第三方面,本申请还提供了一种数据处理系统,所述系统包括原始服务器、第一迁移服务器和第二迁移服务器;In a third aspect, the present application further provides a data processing system, the system comprising an original server, a first migration server, and a second migration server;

所述原始服务器接收终端发送的第一数据请求报文,并向所述第一迁移服务器发送包含所述第一数据请求报文的第一重定向报文;The original server receives a first data request message sent by the terminal, and sends a first redirect message including the first data request message to the first migration server;

所述第一迁移服务器向所述终端反馈所述第一数据请求报文的第一响应报文;The first migration server feeds back a first response message to the first data request message to the terminal;

所述原始服务器接收所述终端发送的第二数据请求报文,并向所述第一迁移服务器发送包含所述第二数据请求报文的第二重定向报文;所述第二数据请求报文,由所述终端在接收到第一响应报文的情况下发送;The original server receives the second data request message sent by the terminal, and sends a second redirect message including the second data request message to the first migration server; the second data request message is sent by the terminal when receiving the first response message;

所述第一迁移服务器在自身满足报文迁移条件的情况下,向满足报文响应条件的第二迁移服务器发送针对所述第二数据请求报文的迁移请求;When the first migration server satisfies the message migration condition, the first migration server sends a migration request for the second data request message to a second migration server that satisfies the message response condition;

所述第一迁移服务器在接收到所述第二迁移服务器基于所述迁移请求反馈的确认信息的情况下,向所述原始服务器发送重定向信息;所述重定向信息用于指示所述原始服务器将所述终端发送的报文重定向至所述第二迁移服务器。The first migration server sends redirection information to the original server when receiving confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server.

第四方面,本申请还提供了一种数据处理装置,应用于第一迁移服务器,所述装置包括:In a fourth aspect, the present application further provides a data processing device, applied to a first migration server, the device comprising:

响应报文反馈模块,用于响应原始服务器发送的第一重定向报文中携带的第一数据请求报文,向发出所述第一数据请求报文的终端反馈第一响应报文;A response message feedback module, used to respond to the first data request message carried in the first redirection message sent by the original server, and feed back a first response message to the terminal that sent the first data request message;

重定向报文接收模块,用于接收所述原始服务器发送的、包含第二数据请求报文的第二重定向报文;所述第二数据请求报文由所述终端在接收到所述第一响应报文的情况下发送至所述原始服务器;a redirection message receiving module, configured to receive a second redirection message including a second data request message sent by the original server; the second data request message is sent by the terminal to the original server when the terminal receives the first response message;

迁移模块,用于若所述第一迁移服务器满足报文迁移条件,则向满足报文响应条件的第二迁移服务器发送针对所述第二数据请求报文的迁移请求;a migration module, configured to send a migration request for the second data request message to a second migration server that meets a message response condition if the first migration server meets a message migration condition;

重定向信息发送模块,用于在接收到所述第二迁移服务器基于所述迁移请求反馈的确认信息的情况下,向所述原始服务器发送重定向信息;所述重定向信息用于指示所述原始服务器将所述终端发送的报文重定向至所述第二迁移服务器。The redirection information sending module is used to send redirection information to the original server when receiving confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server.

第五方面,本申请还提供了一种数据处理装置,应用于原始服务器,所述装置包括:In a fifth aspect, the present application further provides a data processing device, applied to an original server, the device comprising:

数据请求报文接收模块,用于接收终端发送的第一数据请求报文;A data request message receiving module, used for receiving a first data request message sent by a terminal;

重定向报文发送模块,用于向第一迁移服务器发送包含所述第一数据请求报文的第一重定向报文;A redirection message sending module, configured to send a first redirection message including the first data request message to a first migration server;

所述数据请求报文接收模块,还用于接收所述终端发送的第二数据请求报文;所述第二数据请求报文,由所述终端在接收到第一响应报文的情况下发送;所述第一响应报文,由所述第一迁移服务器基于所述第一数据请求报文反馈至所述终端;The data request message receiving module is further configured to receive a second data request message sent by the terminal; the second data request message is sent by the terminal after receiving the first response message; the first response message is fed back to the terminal by the first migration server based on the first data request message;

所述重定向报文发送模块,还用于向所述第一迁移服务器发送包含所述第二数据请求报文的第二重定向报文;The redirection message sending module is further configured to send a second redirection message including the second data request message to the first migration server;

重定向信息接收模块,用于在所述第一迁移服务器满足报文迁移条件的情况下,接收针对所述第二数据请求报文的重定向信息;所述重定向信息,由所述第一迁移服务器在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下发送;所述重定向信息用于指示所述原始服务器将所述终端发送的报文重定向至所述第二迁移服务器;所述第二迁移服务器满足报文响应条件。A redirection information receiving module is used to receive redirection information for the second data request message when the first migration server meets the message migration condition; the redirection information is sent by the first migration server when receiving confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server; the second migration server meets the message response condition.

第六方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述方法的步骤。In a sixth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

第七方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述方法的步骤。In a seventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above method when executed by a processor.

第八方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述方法的步骤。In an eighth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

上述数据处理方法、系统、装置、计算机设备、计算机可读存储介质和计算机程序产品,原始服务器接收终端发送的第一数据请求报文,并向第一迁移服务器发送包含第一数据请求报文的第一重定向报文;第一迁移服务器向终端反馈第一数据请求报文的第一响应报文;原始服务器接收终端发送的第二数据请求报文,并向第一迁移服务器发送包含该第二数据请求报文的第二重定向报文;第一迁移服务器在自身满足报文迁移条件的情况下,向满足报文响应条件的第二迁移服务器发送针对第二数据请求报文的迁移请求;第一迁移服务器在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下,向原始服务器发送重定向信息;该重定向信息用于指示原始服务器将终端发送的报文重定向至第二迁移服务器。上述数据处理过程中,由响应上一数据请求报文的第一迁移服务器确定响应当前数据请求报文的第二迁移服务器,并通过发送迁移请求与第二迁移服务器进行协商,在获得第二迁移服务器反馈的确认信息的情况下,再向原始服务器发送重定位信息,以指示原始服务器将终端发送的报文重定向至第二迁移服务器,与传统技术由原始服务器进行集中式迁移处理相比,相当于是一种分布式的迁移处理方式,能够降低多次迁移过程的时间损耗,有利于提高数据处理效率。In the above-mentioned data processing method, system, apparatus, computer equipment, computer-readable storage medium and computer program product, the original server receives a first data request message sent by a terminal, and sends a first redirection message containing the first data request message to a first migration server; the first migration server feeds back a first response message to the first data request message to the terminal; the original server receives a second data request message sent by the terminal, and sends a second redirection message containing the second data request message to the first migration server; the first migration server sends a migration request for the second data request message to a second migration server that meets the message response conditions when the first migration server meets the message migration conditions; the first migration server sends redirection information to the original server when receiving confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server. During the above data processing process, the first migration server that responded to the previous data request message determines the second migration server that responds to the current data request message, and negotiates with the second migration server by sending a migration request. After obtaining confirmation information fed back by the second migration server, the relocation information is sent to the original server to instruct the original server to redirect the message sent by the terminal to the second migration server. Compared with the traditional technology of centralized migration processing by the original server, this is equivalent to a distributed migration processing method, which can reduce the time loss of multiple migration processes and is conducive to improving data processing efficiency.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为一个实施例中数据处理方法的应用环境图;FIG1 is an application environment diagram of a data processing method in one embodiment;

图2为一个实施例中数据处理交互过程示意图;FIG2 is a schematic diagram of a data processing interaction process in one embodiment;

图3为一个实施例中数据处理方法的流程示意图;FIG3 is a schematic flow chart of a data processing method in one embodiment;

图4为一个实施例中重定向过程示意图;FIG4 is a schematic diagram of a redirection process in one embodiment;

图5为一个实施例中内容调度中心与服务器的交互过程示意图;FIG5 is a schematic diagram of the interaction process between the content scheduling center and the server in one embodiment;

图6为一个实施例中内容调度信息的示意图;FIG6 is a schematic diagram of content scheduling information in one embodiment;

图7为一个实施例中的迁移协商过程示意图;FIG7 is a schematic diagram of a migration negotiation process in one embodiment;

图8为另一个实施例中数据处理方法的流程示意图;FIG8 is a schematic flow chart of a data processing method in another embodiment;

图9为另一个实施例中的数据处理交互过程示意图;FIG9 is a schematic diagram of a data processing interaction process in another embodiment;

图10为一个实施例中基于双端协商的迁移方式示意图;FIG10 is a schematic diagram of a migration method based on dual-end negotiation in one embodiment;

图11为一个实施例中服务器单端迁移方式示意图;FIG11 is a schematic diagram of a single-end migration mode of a server in one embodiment;

图12为又一个实施例中数据处理方法的流程示意图;FIG12 is a schematic flow chart of a data processing method in yet another embodiment;

图13为一个实施例中数据处理装置的结构框图;FIG13 is a block diagram of a data processing device in one embodiment;

图14为另一个实施例中数据处理装置的结构框图;FIG14 is a block diagram of a data processing device in another embodiment;

图15为一个实施例中计算机设备的内部结构图。FIG. 15 is a diagram showing the internal structure of a computer device in one embodiment.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

本申请实施例提供的数据处理方法,可以应用于如图1所示的应用环境中。其中,终端110可以通过网络与服务器集群120进行通信。该通信网络可以是有线网络或无线网络。因此,终端110和服务器集群120可以通过有线或无线通信方式进行直接或间接的连接。比如,终端110可以通过无线接入点与服务器集群120间接地连接,或者终端110通过广域网(Wide Area Network,WAN)与服务器集群120直接地连接,本申请在此不做限制。该广域网例如可以是因特网。The data processing method provided in the embodiment of the present application can be applied in the application environment as shown in Figure 1. Among them, the terminal 110 can communicate with the server cluster 120 through a network. The communication network can be a wired network or a wireless network. Therefore, the terminal 110 and the server cluster 120 can be directly or indirectly connected through wired or wireless communication. For example, the terminal 110 can be indirectly connected to the server cluster 120 through a wireless access point, or the terminal 110 can be directly connected to the server cluster 120 through a wide area network (WAN), and the present application does not limit this. The wide area network can be, for example, the Internet.

其中,终端110可以但不限于是各种台式计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。本申请实施例可应用于多媒体数据处理场景,该数据例如可以是视频或音频等。终端110上可以安装有与数据获取或数据浏览相关的客户端,该客户端可以是软件(例如浏览器、视频软件等),也可以是网页、小程序等。服务器集群120则是与软件或是网页、小程序等相对应的后台服务器,或者是专门用于进行数据分发服务的服务器。进一步地,服务器集群120可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)、以及大数据和人工智能平台等基础云计算服务的云服务器。Among them, the terminal 110 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The embodiment of the present application can be applied to multimedia data processing scenarios, and the data can be, for example, video or audio. A client related to data acquisition or data browsing can be installed on the terminal 110, and the client can be software (such as a browser, video software, etc.), or a web page, a small program, etc. The server cluster 120 is a background server corresponding to software or a web page, a small program, etc., or a server dedicated to data distribution services. Further, the server cluster 120 can be a server cluster or a distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and basic cloud computing services such as big data and artificial intelligence platforms.

云技术(Cloud technology)是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。云技术(Cloudtechnology)基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源,如视频网站、图片类网站和更多的门户网站。伴随着互联网行业的高度发展和应用,将来每个物品都有可能存在自己的识别标志,都需要传输到后台系统进行逻辑处理,不同程度级别的数据将会分开处理,各类行业数据皆需要强大的系统后盾支撑,只能通过云计算来实现。Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

可以理解的是,在本申请的应用场景下,终端110的数量可以是多个,也即,服务器集群120可以响应多个终端110的数据请求,各终端可以与服务器集群120中的各个服务器进行网络连接,以便终端与服务器之间能够进行数据交互。It can be understood that in the application scenario of the present application, the number of terminals 110 can be multiple, that is, the server cluster 120 can respond to data requests from multiple terminals 110, and each terminal can establish a network connection with each server in the server cluster 120 so that data can be exchanged between the terminal and the server.

进一步地,服务器集群120可以包括原始服务器121、第一迁移服务器122和第二迁移服务器123。其中,原始服务器121为终端110的请求报文发送对象,即终端110通过向原始服务器121发送数据请求报文,以获取数据资源。可以理解,在终端110与服务器集群120的交互过程中,终端110并不会感知到请求迁移,而是始终通过向原始服务器121发送请求报文以获取数据资源。在一个具体的实现中,原始服务器121可以是终端110发出的第一个数据请求报文的响应服务器,也即,终端110向服务器集群120发送第一个数据请求报文之后,该数据请求报文将被分发至服务器集群120中具备响应能力的服务器(即原始服务器121)进行处理,终端110获取原始服务器121反馈的响应报文,之后,终端110可以通过与原始服务器121交互,向服务器集群120发起新的数据请求。若原始服务器121能够反馈新数据请求所请求的数据资源,则由原始服务器121继续响应用户需求,若原始服务器121无法反馈新数据请求所请求的数据资源,则可以通过将数据请求迁移至服务器集群120中的另一服务器,由另一服务器响应用户需求。Further, the server cluster 120 may include an original server 121, a first migration server 122, and a second migration server 123. The original server 121 is the object of the request message of the terminal 110, that is, the terminal 110 obtains data resources by sending a data request message to the original server 121. It can be understood that during the interaction between the terminal 110 and the server cluster 120, the terminal 110 does not perceive the request migration, but always obtains data resources by sending a request message to the original server 121. In a specific implementation, the original server 121 can be the response server of the first data request message sent by the terminal 110, that is, after the terminal 110 sends the first data request message to the server cluster 120, the data request message will be distributed to the server (that is, the original server 121) with response capability in the server cluster 120 for processing, and the terminal 110 obtains the response message fed back by the original server 121. After that, the terminal 110 can initiate a new data request to the server cluster 120 by interacting with the original server 121. If the original server 121 can feedback the data resources requested by the new data request, the original server 121 will continue to respond to the user's needs. If the original server 121 cannot feedback the data resources requested by the new data request, the data request can be migrated to another server in the server cluster 120, and the other server will respond to the user's needs.

如图2所示,本申请所针对的,是发生至少两次请求迁移的数据处理场景,其中,实线代表第一次请求迁移的交互过程,虚线代表第二次请求迁移的交互过程。具体地,原始服务器121接收终端110发送的第一数据请求报文①,并向第一迁移服务器122发送包含该第一数据请求报文①的第一重定向报文②;第一迁移服务器122向终端110反馈第一数据请求报文①的第一响应报文③;终端110在接收到第一响应报文③的情况下,可以向原始服务器121发送第二数据请求报文④;原始服务器121向第一迁移服务器122发送包含该第二数据请求报文④的第二重定向报文⑤;第一迁移服务器122在自身满足报文迁移条件的情况下,向满足报文响应条件的第二迁移服务器123发送针对该第二数据请求报文④的迁移请求⑥,并在接收到第二迁移服务器123基于迁移请求⑥反馈的确认信息⑦的情况下,向原始服务器121发送重定向信息⑧;该重定向信息⑧用于指示原始服务器121将终端110发送的报文重定向至第二迁移服务器123。可以理解,第二数据请求报文④的第二响应报文⑨将由第二迁移服务器123反馈至终端110。至此,终端110向原始服务器121发送的报文,将通过重定向迁移至第二迁移服务器123,而不会再迁移至第一迁移服务器122,若后续还需要进行请求迁移,则第二迁移服务器123可以作为新的第一迁移服务器,通过执行上述数据处理逻辑完成迁移。As shown in FIG. 2 , the present application is directed to a data processing scenario in which at least two migration requests occur, wherein the solid line represents the interaction process of the first migration request, and the dotted line represents the interaction process of the second migration request. Specifically, the original server 121 receives a first data request message ① sent by the terminal 110, and sends a first redirection message ② containing the first data request message ① to the first migration server 122; the first migration server 122 feeds back a first response message ③ of the first data request message ① to the terminal 110; upon receiving the first response message ③, the terminal 110 may send a second data request message ④ to the original server 121; the original server 121 sends a second redirection message ⑤ containing the second data request message ④ to the first migration server 122; the first migration server 122, when satisfying the message migration condition, sends a migration request ⑥ for the second data request message ④ to the second migration server 123 that satisfies the message response condition, and upon receiving confirmation information ⑦ fed back by the second migration server 123 based on the migration request ⑥, sends redirection information ⑧ to the original server 121; the redirection information ⑧ is used to instruct the original server 121 to redirect the message sent by the terminal 110 to the second migration server 123. It can be understood that the second response message ⑨ of the second data request message ④ will be fed back to the terminal 110 by the second migration server 123. At this point, the message sent by the terminal 110 to the original server 121 will be migrated to the second migration server 123 through redirection, and will no longer be migrated to the first migration server 122. If a subsequent migration request is required, the second migration server 123 can serve as a new first migration server to complete the migration by executing the above data processing logic.

应当理解,尽管在本申请可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一数据请求报文也可以被称为第二数据请求报文,类似地,第二数据请求报文也可以被称为第一数据请求报文。It should be understood that although the terms first, second, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, a first data request message may also be referred to as a second data request message, and similarly, a second data request message may also be referred to as a first data request message.

也就是说,采用本申请的方案,在面对多个数据请求、涉及多次请求迁移的情况下,由响应上一数据请求报文的第一迁移服务器确定响应当前数据请求报文的第二迁移服务器,并通过发送迁移请求与第二迁移服务器进行协商,在获得第二迁移服务器反馈的确认信息的情况下,再向原始服务器发送重定位信息,以指示原始服务器将终端发送的报文重定向至第二迁移服务器,能够实现分布式的迁移处理,从而降低多次迁移过程的时间损耗,有利于提高数据处理效率,进而能够更加快速地向终端反馈其所请求的数据资源,提升服务器集群的组网能力和终端的业务体验。That is to say, by adopting the scheme of the present application, when faced with multiple data requests and involving multiple requests for migration, the first migration server that responded to the previous data request message determines the second migration server that responds to the current data request message, and negotiates with the second migration server by sending a migration request. When the confirmation information fed back by the second migration server is obtained, the relocation information is sent to the original server to instruct the original server to redirect the message sent by the terminal to the second migration server. This can realize distributed migration processing, thereby reducing the time loss of multiple migration processes, which is conducive to improving data processing efficiency, and then being able to more quickly feedback the requested data resources to the terminal, thereby improving the networking capabilities of the server cluster and the business experience of the terminal.

在一个实施例中,如图3所示,提供了一种是数据处理方法,该方法可以由计算机设备执行,该计算机设备可以是图1所示的第一迁移服务器,包括以下步骤:In one embodiment, as shown in FIG3 , a data processing method is provided. The method may be executed by a computer device, which may be the first migration server shown in FIG1 , and includes the following steps:

步骤S302,响应原始服务器发送的第一重定向报文中携带的第一数据请求报文,向发出第一数据请求报文的终端反馈第一响应报文。Step S302: In response to the first data request message carried in the first redirection message sent by the original server, a first response message is fed back to the terminal that sent the first data request message.

其中,原始服务器是终端的报文发送对象。也即,对于终端而言,并不会感知到请求迁移,而是始终通过向原始服务器发送报文,以实现终端与服务器集群的交互。在一个具体的实现中,原始服务器可以是终端发出的第一个数据请求报文的响应服务器,也即,终端向服务器集群发送第一个数据请求报文之后,该数据请求报文将被分发至服务器集群中具备响应能力的服务器(即原始服务器)进行处理,终端获取原始服务器反馈的响应报文,之后,终端可以通过与原始服务器交互,向服务器集群发起新的数据请求。若原始服务器能够反馈新数据请求所请求的数据资源,则由原始服务器继续响应用户需求,若原始服务器无法反馈新数据请求所请求的数据资源,则可以通过将数据请求迁移至服务器集群中的另一服务器,由另一服务器响应用户需求。Among them, the original server is the message sending object of the terminal. That is, for the terminal, it will not perceive the request migration, but always send messages to the original server to realize the interaction between the terminal and the server cluster. In a specific implementation, the original server can be the response server of the first data request message sent by the terminal, that is, after the terminal sends the first data request message to the server cluster, the data request message will be distributed to the server with response capability in the server cluster (that is, the original server) for processing, and the terminal obtains the response message fed back by the original server. After that, the terminal can initiate a new data request to the server cluster by interacting with the original server. If the original server can feedback the data resources requested by the new data request, the original server will continue to respond to the user's needs. If the original server cannot feedback the data resources requested by the new data request, the data request can be migrated to another server in the server cluster, and the other server will respond to the user's needs.

数据请求报文是指由终端向原始服务器发送、以请求获取数据资源的报文信息。该数据请求报文可以是基于通信协议对数据请求进行封装得到的,通信协议例如可以包括传输控制协议(Transport Control Protocol,TCP)、用户数据报协议(User DatagramProtocol,UDP)或快速UDP互联网连接(Quick UDP Internet Connection,QUIC)等。重定向报文是对原始报文进行重定向操作之后,所得到的报文信息。也即,重定向报文中携带有被重定向的原始报文。A data request message refers to a message sent by a terminal to an original server to request data resources. The data request message can be obtained by encapsulating a data request based on a communication protocol, and the communication protocol may include, for example, the Transmission Control Protocol (TCP), the User Datagram Protocol (UDP), or the Quick UDP Internet Connection (QUIC). A redirect message is a message information obtained after the original message is redirected. That is, the redirect message carries the original message being redirected.

在一个具体的实施例中,报文的重定向操作可以由服务器中的重定向器实现。重定向器具体可以基于报文的五元组信息(记为five_tuple)对原始报文进行操作,其中,五元组就是一个网络数据包的五个基本属性,包括源地址(src)、目的地址(dst)、源端口(sport)、目的端口(dport)和协议类型(ptl_type)。在网络通信中,每个数据包都包含这五个属性,它们一起构成了数据包的唯一标识。进一步地,针对原始报文的操作可以包括丢弃(drop)、接收(receive)和重定向(redirect)。“接收”代表服务器可以满足报文发送方的需求,反馈对应的响应报文,“重定向”代表服务器无法满足报文发送方的需求,需要将报文重定向至其他服务器进行处理。可以理解,报文的五元组信息能够表征该报文的数据流向,进而表征交互双方的连接。以终端发送给原始服务器的数据请求报文为例,该数据请求报文的源地址为终端地址、目的地址为原始服务器地址、源端口为终端的端口号、目的端口为原始服务器的端口号、协议类型为通信协议类型。其中,端口号和通信协议类型需要在终端向原始服务器发送第一个报文之前,由双方协商确定。In a specific embodiment, the redirection operation of the message can be implemented by a redirector in the server. The redirector can specifically operate on the original message based on the five-tuple information of the message (recorded as five_tuple), wherein the five-tuple is the five basic attributes of a network data packet, including source address (src), destination address (dst), source port (sport), destination port (dport) and protocol type (ptl_type). In network communication, each data packet contains these five attributes, which together constitute the unique identifier of the data packet. Further, the operation on the original message may include dropping (drop), receiving (receive) and redirecting (redirect). "Receive" means that the server can meet the needs of the message sender and feedback the corresponding response message, and "redirect" means that the server cannot meet the needs of the message sender and needs to redirect the message to other servers for processing. It can be understood that the five-tuple information of the message can characterize the data flow direction of the message, and then characterize the connection between the two interacting parties. Take the data request message sent by the terminal to the original server as an example. The source address of the data request message is the terminal address, the destination address is the original server address, the source port is the port number of the terminal, the destination port is the port number of the original server, and the protocol type is the communication protocol type. Among them, the port number and the communication protocol type need to be negotiated and determined by both parties before the terminal sends the first message to the original server.

可选的,重定向器中可以基于如下表所示的配置表,对原始报文进行操作。其中,五元组信息可以表征重定向器所在服务器与其他设备的连接。以原始服务器与终端的连接为例,每一五元组信息可以分别表征原始服务器与不同终端之间的连接。Optionally, the redirector can operate on the original message based on the configuration table shown in the following table. The five-tuple information can represent the connection between the server where the redirector is located and other devices. Taking the connection between the original server and the terminal as an example, each five-tuple information can represent the connection between the original server and different terminals.

响应报文是指为满足报文发送方的需求所反馈的报文信息。具体到本申请,数据请求报文的响应报文中,携带数据请求报文所请求的数据资源。该数据资源可以包括视频、音频或文本中的至少一种。与数据请求报文类似,响应报文也可以是基于通信协议对数据请求进行封装得到的。实际应用中,数据请求报文和响应报文的通信协议可以相同,从而交互双方无需进行多次通信协议的协商。A response message refers to message information fed back to meet the needs of the message sender. Specifically for the present application, the response message of the data request message carries the data resources requested by the data request message. The data resources may include at least one of video, audio or text. Similar to the data request message, the response message may also be obtained by encapsulating the data request based on the communication protocol. In practical applications, the communication protocols of the data request message and the response message may be the same, so that the interacting parties do not need to negotiate the communication protocol multiple times.

具体地,终端可以向原始服务器发送第一数据请求报文,该第一数据请求报文中,携带终端所请求数据资源的资源标识。其中,资源标识是指能够唯一表征数据资源的标识信息。该资源标识例如可以是资源存储地址或URI(Uniform Resource Identifier,统一资源标识符)等。原始服务器可以根据实际情况确定是否需要将请求迁移至其他服务器。若不需要迁移,则向终端反馈第一数据请求报文对应的第一响应报文,可以理解,该第一响应报文中携带第一数据请求报文所请求的数据资源。若需要迁移,则原始服务器可以从服务器集群中,确定第一数据请求报文的迁移对象,记为第一迁移服务器,并向该第一迁移服务器发送携带第一数据请求报文的第一重定向报文。从而,第一迁移服务器可以响应于该第一数据请求报文,向终端反馈第一响应报文。Specifically, the terminal may send a first data request message to the original server, in which the resource identifier of the data resource requested by the terminal is carried. The resource identifier refers to identification information that can uniquely characterize the data resource. The resource identifier may be, for example, a resource storage address or a URI (Uniform Resource Identifier). The original server may determine whether it is necessary to migrate the request to another server according to actual conditions. If migration is not required, the first response message corresponding to the first data request message is fed back to the terminal. It can be understood that the first response message carries the data resource requested by the first data request message. If migration is required, the original server may determine the migration object of the first data request message from the server cluster, record it as the first migration server, and send a first redirect message carrying the first data request message to the first migration server. Thus, the first migration server may respond to the first data request message and feed back the first response message to the terminal.

确定是否需要进行请求迁移的具体方式并不唯一。There is no single way to determine whether a requested migration is necessary.

在一个具体的实施例中,原始服务器可以从第一数据请求报文中提取资源标识,并基于该资源标识确定是否需要进行请求迁移。具体地,若原始服务器本地可以获取资源标识所表征的数据资源,则不进行迁移;若原始服务器本地无法获取资源标识所表征的数据资源,则需要进行迁移。In a specific embodiment, the original server can extract the resource identifier from the first data request message, and determine whether to request migration based on the resource identifier. Specifically, if the original server can obtain the data resource represented by the resource identifier locally, migration is not performed; if the original server cannot obtain the data resource represented by the resource identifier locally, migration is required.

在一个具体的实施例中,原始服务器还可以结合资源标识和当前负载信息,确定是否需要进行请求迁移。该负载信息例如可以包括CPU(Central Processing Unit,中央处理器)利用率、内存占用、流量大小等。例如,若原始服务器本地可以获取资源标识所表征的数据资源,且当前负载相对较低,能够满足报文响应需求,则不进行迁移。若原始服务器本地无法获取资源标识所表征的数据资源,和/或,当前负载相对较高以至于无法满足报文响应需求,则需要进行迁移。In a specific embodiment, the original server may also determine whether request migration is required in combination with the resource identifier and the current load information. The load information may include, for example, CPU (Central Processing Unit) utilization, memory usage, traffic size, etc. For example, if the original server can locally obtain the data resource represented by the resource identifier, and the current load is relatively low and can meet the message response requirements, then migration is not performed. If the original server cannot locally obtain the data resource represented by the resource identifier, and/or the current load is relatively high so that the message response requirements cannot be met, then migration is required.

在一个具体的实施例中,数据处理方法还包括:获取终端基于第一响应报文反馈的确认报文;在基于确认报文确定第一响应报文出现丢包的情况下,执行针对第一响应报文的丢包修复操作。In a specific embodiment, the data processing method further includes: obtaining a confirmation message fed back by the terminal based on the first response message; and when it is determined based on the confirmation message that packet loss occurs in the first response message, performing a packet loss repair operation on the first response message.

其中,确认报文由原始服务器从终端接收、并重定向至第一迁移服务器。具体地,终端在接收到第一响应报文之后,可以向原始服务器反馈确认报文,以声明终端收到或未收到的报文信息。该确认报文,由原始服务器根据重定向规则重定向至第一迁移服务器,从而,第一迁移服务器可以根据终端收到或未收到的报文信息,判断第一响应报文是否出现丢包现象。若终端声明收到的报文信息与第一迁移服务器通过第一响应报文实际发送的报文信息不一致,或者终端声明未收到所请求的全部数据资源,则第一迁移服务器确定存在丢包现象,执行针对第一响应报文的丢包修复操作,重传丢失的报文。Among them, the confirmation message is received by the original server from the terminal and redirected to the first migration server. Specifically, after receiving the first response message, the terminal can feed back a confirmation message to the original server to declare the message information received or not received by the terminal. The confirmation message is redirected to the first migration server by the original server according to the redirection rule, so that the first migration server can judge whether the first response message has a packet loss phenomenon based on the message information received or not received by the terminal. If the message information declared received by the terminal is inconsistent with the message information actually sent by the first migration server through the first response message, or the terminal declares that all the requested data resources have not been received, the first migration server determines that there is a packet loss phenomenon, performs a packet loss repair operation for the first response message, and retransmits the lost message.

本实施例中,根据终端反馈的确认报文进行丢包判断,并在出现丢包的情况下进行丢包修复,能够确保服务器能够提供终端所需的数据资源,提升数据处理效果。In this embodiment, packet loss is determined based on the confirmation message fed back by the terminal, and packet loss repair is performed when packet loss occurs, which can ensure that the server can provide the data resources required by the terminal and improve the data processing effect.

步骤S304,接收原始服务器发送的、包含第二数据请求报文的第二重定向报文。Step S304: Receive a second redirection message including a second data request message sent by the original server.

其中,第二数据请求报文由终端在接收到第一响应报文的情况下发送至原始服务器。第二数据请求报文是区别于第一数据请求报文的新的数据请求报文。可以理解,同一终端在与服务器集群的交互过程中,随着交互的推进,可能产生新的数据需求。从而,终端在接收到第一数据请求报文对应的第一响应报文的情况下,可以通过向原始服务器发送第二数据请求报文,以请求获取新的数据资源。The second data request message is sent by the terminal to the original server when the terminal receives the first response message. The second data request message is a new data request message different from the first data request message. It can be understood that during the interaction between the same terminal and the server cluster, new data requirements may be generated as the interaction progresses. Therefore, when the terminal receives the first response message corresponding to the first data request message, it can send a second data request message to the original server to request new data resources.

如前文所述的,原始服务器可以根据报文的五元组信息,确定针对报文的操作。而第二数据请求报文的五元组信息与第一数据请求报文的五元组信息相同。在第一数据请求报文被重定向至第一迁移服务器的情况下,该五元组信息对应的操作为重定向,从而,原始服务器会按照与第一数据请求报文相同的重定向规则,将该第二数据请求报文封装至第二重定向报文,并发送至第一迁移服务器。在此情形下,第一迁移服务器可以接收原始服务器发送的、包含第二数据请求报文的第二重定向报文。As described above, the original server can determine the operation for the message based on the five-tuple information of the message. The five-tuple information of the second data request message is the same as the five-tuple information of the first data request message. In the case where the first data request message is redirected to the first migration server, the operation corresponding to the five-tuple information is redirection, so the original server will encapsulate the second data request message into a second redirection message according to the same redirection rule as the first data request message, and send it to the first migration server. In this case, the first migration server can receive the second redirection message containing the second data request message sent by the original server.

示例性的,如图4所示,终端可以向原始服务器发送第二数据请求报文(Pkt_req),该第一数据请求报文中,携带终端所请求数据资源的资源标识。原始服务器会按照与第一数据请求报文相同的重定向规则,将该第二数据请求报文封装至第二重定向报文(Pkt_req_redirect),并发送至第一迁移服务器。第一迁移服务器获取第二重定向报文后,识别到新的数据请求,判断是否需要进行迁移。Exemplarily, as shown in FIG4 , the terminal may send a second data request message (Pkt_req) to the original server, in which the first data request message carries the resource identifier of the data resource requested by the terminal. The original server will encapsulate the second data request message into a second redirect message (Pkt_req_redirect) according to the same redirection rule as the first data request message, and send it to the first migration server. After the first migration server obtains the second redirect message, it identifies the new data request and determines whether migration is required.

步骤S306,若第一迁移服务器满足报文迁移条件,则向满足报文响应条件的第二迁移服务器发送针对第二数据请求报文的迁移请求。Step S306: If the first migration server meets the message migration condition, the first migration server sends a migration request for the second data request message to the second migration server that meets the message response condition.

其中,第一迁移服务器满足报文迁移条件,可以是指第一迁移服务器本地无法获取第二数据请求报文所请求的数据资源,也可以是指第一迁移服务器的当前负载较高,以至于无法满足第二数据请求报文的报文响应需求。报文响应条件与报文迁移条件可以是互斥的。也即,第二迁移服务器满足报文响应条件,可以是指第二迁移服务器本地可以获取第二数据请求报文所请求的数据资源,也可以是指第二移服务器本地可以获取第二数据请求报文所请求的数据资源,且,第一迁移服务器的当前负载较低,能够满足第二数据请求报文的报文响应需求。Among them, the first migration server satisfies the message migration condition, which may mean that the first migration server cannot obtain the data resources requested by the second data request message locally, or it may mean that the current load of the first migration server is so high that it cannot meet the message response requirements of the second data request message. The message response condition and the message migration condition may be mutually exclusive. That is, the second migration server satisfies the message response condition, which may mean that the second migration server can obtain the data resources requested by the second data request message locally, or it may mean that the second migration server can obtain the data resources requested by the second data request message locally, and the current load of the first migration server is low, which can meet the message response requirements of the second data request message.

迁移请求,用于第一迁移服务器和第二迁移服务器针对第二数据请求报文的迁移操作进行协商,也即,迁移请求中携带第二数据请求报文的关联信息。该关联信息,可以包括连接状态信息和应用状态信息。其中,连接状态信息包括但不限于终端的终端信息、原始服务器的服务器信息、协议类型,第一迁移服务器和终端各自的传输层状态信息,报文编号等等。终端信息和服务器信息均可以包括IP地址、端口号等,第一迁移服务器的传输层状态信息可以包括发送窗口值、在途数据量等,终端的传输层状态信息可以包括接收窗口值、有效可用带宽等。应用状态信息可以包括第二数据请求报文所请求数据资源的资源标识,还可以包括用户数据加解密的密钥。The migration request is used for the first migration server and the second migration server to negotiate the migration operation of the second data request message, that is, the migration request carries the associated information of the second data request message. The associated information may include connection status information and application status information. The connection status information includes but is not limited to the terminal information of the terminal, the server information of the original server, the protocol type, the transport layer status information of the first migration server and the terminal, the message number, etc. The terminal information and the server information may include the IP address, the port number, etc. The transport layer status information of the first migration server may include the sending window value, the amount of data in transit, etc., and the transport layer status information of the terminal may include the receiving window value, the effective available bandwidth, etc. The application status information may include the resource identifier of the data resource requested by the second data request message, and may also include the key for encrypting and decrypting the user data.

具体地,第一迁移服务器在接收到第二重定向报文的情况下,可以根据该第二重定向报文中所包含第二数据请求报文,确定自身是否满足报文迁移条件。若是,则从服务器集群的各服务器中,确定满足第一数据请求报文的报文响应条件的第二迁移服务器,并向该第二迁移服务器发送针对该第二数据请求报文的迁移请求。Specifically, when the first migration server receives the second redirection message, it can determine whether it meets the message migration condition according to the second data request message included in the second redirection message. If so, it determines a second migration server that meets the message response condition of the first data request message from each server in the server cluster, and sends a migration request for the second data request message to the second migration server.

进一步地,第一迁移服务器可以通过获取服务器集群中各服务器各自的负载信息、以及各服务器各自所能提供数据资源的资源标识,确定满足第一数据请求报文的报文响应条件的第二迁移服务器;第一迁移服务器也可以直接获取满足第一数据请求报文的报文响应条件的第二迁移服务器的服务器标识,进而向该第二迁移服务器发送针对该第二数据请求报文的迁移请求。该服务器标识,可以由服务器集群中的内容调度中心确定。Furthermore, the first migration server can determine the second migration server that meets the message response condition of the first data request message by obtaining the load information of each server in the server cluster and the resource identifier of the data resources that each server can provide; the first migration server can also directly obtain the server identifier of the second migration server that meets the message response condition of the first data request message, and then send a migration request for the second data request message to the second migration server. The server identifier can be determined by the content scheduling center in the server cluster.

其中,内容调度中心可以是单独的服务器,也可以位于每个服务器内部,特别地,如图5所示,内容调度中心可以周期性地向服务器集群中的每个服务器同步其自身的用于选择迁移服务器的内容调度信息。如图6所示,该内容调度信息例如可以包括资源标识、以及能够读取该资源标识所表征数据资源的服务器的服务器信息和负载信息。The content scheduling center may be a separate server or may be located inside each server. In particular, as shown in Figure 5, the content scheduling center may periodically synchronize its own content scheduling information for selecting a migration server to each server in the server cluster. As shown in Figure 6, the content scheduling information may include, for example, a resource identifier, and server information and load information of a server that can read the data resource represented by the resource identifier.

步骤S308,在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下,向原始服务器发送重定向信息。Step S308: upon receiving confirmation information fed back by the second migration server based on the migration request, redirection information is sent to the original server.

其中,重定向信息用于指示原始服务器将终端发送的报文重定向至第二迁移服务器。该终端,是指第二数据请求报文的发起终端。终端发送的报文,可以包括在原始服务器接收到重定向信息之后,终端发送给原始服务器的所有报文,具体可以包括数据请求报文,数据确认报文等等。The redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server. The terminal refers to the initiator of the second data request message. The message sent by the terminal may include all messages sent by the terminal to the original server after the original server receives the redirection information, and may specifically include data request messages, data confirmation messages, etc.

具体地,接收到针对第二数据请求报文的迁移请求的情况下,第二迁移服务器可以同意迁移,也可以不同意迁移。在同意迁移的情况下,第二迁移服务器可以基于该迁移请求向第一迁移服务器发送确认信息,从而,第一迁移服务器可以在接收到该确认信息的情况下,向原始服务器发送针对从终端接收的报文的重定向信息,以便后续原始服务器可以将终端发送的报文重定向至第二迁移服务器。进一步地,第二迁移服务器同一迁移的情况下,可以向终端反馈第二数据请求报文的第二响应报文,该第二响应报文中携带第二数据请求报文所请求的数据资源。Specifically, when receiving a migration request for the second data request message, the second migration server may agree to the migration or not. When agreeing to migrate, the second migration server may send confirmation information to the first migration server based on the migration request, so that the first migration server may send redirection information for the message received from the terminal to the original server when receiving the confirmation information, so that the original server may redirect the message sent by the terminal to the second migration server later. Furthermore, when the second migration server migrates, it may feed back a second response message to the second data request message to the terminal, and the second response message carries the data resources requested by the second data request message.

在一个具体的实施例中,数据处理方法还包括:在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下,向第二迁移服务器发送响应启动通知。In a specific embodiment, the data processing method further includes: upon receiving confirmation information fed back by the second migration server based on the migration request, sending a response start notification to the second migration server.

其中,响应启动通知用于指示第二迁移服务器向终端反馈第二数据请求报文的第二响应报文。具体地,如图7所示,第一迁移服务器在自身满足报文迁移条件、判断需要进行迁移的情况下,与第二迁移服务器进行协商迁移。第一迁移服务器可以向第二迁移服务器发送针对第二数据请求报文的迁移请求(Pkt_mig_req),在收到第二迁移服务器基于迁移请求反馈的协商确认报文(Pkt_mig_ack),且该协商确认报文中携带支持迁移的确认信息的情况下,第一迁移服务器一方面向原始服务器发送携带重定向信息的重定向规则更新指令,以指示原始服务器将后续终端发送的报文重定向至第二迁移服务器;另一方面,第一迁移服务器向第二迁移服务器发送响应启动通知,以通知第二迁移服务器向终端反馈第二数据请求报文的第二响应报文。Among them, the response start notification is used to instruct the second migration server to feed back a second response message to the second data request message to the terminal. Specifically, as shown in FIG7 , when the first migration server meets the message migration conditions and determines that migration is required, it negotiates migration with the second migration server. The first migration server can send a migration request (Pkt_mig_req) for the second data request message to the second migration server. When receiving a negotiation confirmation message (Pkt_mig_ack) fed back by the second migration server based on the migration request, and the negotiation confirmation message carries confirmation information that supports migration, the first migration server sends a redirection rule update instruction carrying redirection information to the original server on the one hand, to instruct the original server to redirect subsequent messages sent by the terminal to the second migration server; on the other hand, the first migration server sends a response start notification to the second migration server to notify the second migration server to feed back a second response message to the second data request message to the terminal.

本实施例中,通过向第二迁移服务器发送响应启动通知,以指示第二迁移服务器向终端反馈第二数据请求报文的第二响应报文,能够灵活地控制报文响应和重定向规则的更新时间,从而避免重定向规则更新不及时而导致的系统混论。In this embodiment, by sending a response start notification to the second migration server to instruct the second migration server to feed back a second response message to the second data request message to the terminal, the message response and redirection rule update time can be flexibly controlled, thereby avoiding system confusion caused by untimely redirection rule update.

至此,终端向原始服务器发送的报文,将通过重定向迁移至第二迁移服务器,而不会再迁移至第一迁移服务器,若后续还需要进行请求迁移,则第二迁移服务器可以作为新的第一迁移服务器,通过执行上述的数据处理逻辑完成迁移。在此情形下,上一次迁移处理过程中的第二数据请求报文,对应下一次迁移处理过程中的第一数据请求报文。At this point, the message sent by the terminal to the original server will be migrated to the second migration server through redirection, and will no longer be migrated to the first migration server. If a request for migration is required later, the second migration server can be used as the new first migration server to complete the migration by executing the above data processing logic. In this case, the second data request message in the previous migration process corresponds to the first data request message in the next migration process.

需要说明的是,在第二迁移服务器不同意迁移的情况下,则第一迁移服务器可以向满足报文响应条件的其他第二迁移服务器发送迁移请求。若服务器集群中不存在满足报文响应条件的第二迁移服务器,则第一迁移服务器可以向终端反馈响应失败的提示信息。It should be noted that, if the second migration server does not agree to the migration, the first migration server can send a migration request to other second migration servers that meet the message response conditions. If there is no second migration server that meets the message response conditions in the server cluster, the first migration server can feedback a prompt message of response failure to the terminal.

上述数据处理方法,由响应上一数据请求报文的第一迁移服务器确定响应当前数据请求报文的第二迁移服务器,并通过发送迁移请求与第二迁移服务器进行协商,在获得第二迁移服务器反馈的确认信息的情况下,再向原始服务器发送重定位信息,以指示原始服务器将终端发送的报文重定向至第二迁移服务器,与传统技术由原始服务器进行集中式迁移处理相比,相当于是一种分布式的迁移处理方式,能够降低多次迁移过程的时间损耗,有利于提高数据处理效率。The above-mentioned data processing method is that the first migration server that responds to the previous data request message determines the second migration server that responds to the current data request message, and negotiates with the second migration server by sending a migration request. After obtaining the confirmation information fed back by the second migration server, the relocation information is sent to the original server to instruct the original server to redirect the message sent by the terminal to the second migration server. Compared with the traditional technology of centralized migration processing by the original server, it is equivalent to a distributed migration processing method, which can reduce the time loss of multiple migration processes and is conducive to improving data processing efficiency.

在一个实施例中,数据处理方法还包括:提取第二数据请求报文中携带的资源标识;在第一迁移服务器未存储资源标识所表征的数据资源的情况下,确定第一迁移服务器满足报文迁移条件。In one embodiment, the data processing method further includes: extracting a resource identifier carried in the second data request message; and determining that the first migration server meets the message migration condition when the first migration server does not store the data resource represented by the resource identifier.

其中,资源标识用于表征第二数据请求报文所请求的数据资源。该资源标识例如可以是资源存储地址或URI等。具体地,第一迁移服务器可以提取第二数据请求报文中携带的资源标识,并将该资源标识与本地存储的数据资源进行匹配,若匹配成功,则说明本地存储有该资源标识所表征的数据资源,第一迁移服务器可以满足终端的数据需求。此时,第一迁移服务器无需进行后续的迁移处理,只需从本地读取相应的数据资源,并向终端反馈包含该数据资源的响应报文即可。若匹配不成功,则说明本地未存储该资源标识所表征的数据资源,第一迁移服务器无法满足终端的数据需求,也即第一迁移服务器满足报文迁移条件,需要进行后续的迁移处理。Among them, the resource identifier is used to represent the data resource requested by the second data request message. The resource identifier can be, for example, a resource storage address or URI, etc. Specifically, the first migration server can extract the resource identifier carried in the second data request message, and match the resource identifier with the locally stored data resources. If the match is successful, it means that the data resource represented by the resource identifier is stored locally, and the first migration server can meet the data needs of the terminal. At this time, the first migration server does not need to perform subsequent migration processing, but only needs to read the corresponding data resources from the local area and feedback a response message containing the data resources to the terminal. If the match is unsuccessful, it means that the data resource represented by the resource identifier is not stored locally, and the first migration server cannot meet the data needs of the terminal, that is, the first migration server meets the message migration conditions and needs to perform subsequent migration processing.

本实施例中,基于资源标识确定第一迁移服务器是否满足报文迁移条件,算法简单,能够进一步提高数据处理效率。In this embodiment, whether the first migration server meets the message migration condition is determined based on the resource identifier. The algorithm is simple and can further improve data processing efficiency.

在一个实施例中,向满足报文响应条件的第二迁移服务器发送针对第二数据请求报文的迁移请求,包括:确定满足报文响应条件的第二迁移服务器;向第二迁移服务器发送针对第二数据请求报文的迁移请求。In one embodiment, sending a migration request for a second data request message to a second migration server that meets the message response condition includes: determining a second migration server that meets the message response condition; and sending a migration request for the second data request message to the second migration server.

其中,报文响应条件与资源标识匹配。具体地,第一迁移服务器可以基于从第二数据请求报文中提取的资源标识,确定满足报文响应条件的第二迁移服务器,并向该第二迁移服务器发送针对第二数据请求报文的迁移请求。Specifically, the first migration server may determine a second migration server that meets the message response condition based on the resource identifier extracted from the second data request message, and send a migration request for the second data request message to the second migration server.

在一个具体的实施例中,第一迁移服务器可以基于资源标识所表征数据资源的资源量,确定与该资源标识匹配的报文响应条件,还可以向内容调度中心请求资源标识对应的内容调度信息。然后,第一迁移服务器可以基于内容调度信息,确定能够提供该数据资源的多个候选服务器,并从这些候选服务器中,确定满足报文响应条件的第二迁移服务器。该报文响应条件,可以是指可用负载能够满足资源量的传输需求。可以理解,资源标识所表征数据资源的资源量越大,需求的可用负载越多。In a specific embodiment, the first migration server can determine the message response condition that matches the resource identifier based on the resource amount of the data resource represented by the resource identifier, and can also request content scheduling information corresponding to the resource identifier from the content scheduling center. Then, the first migration server can determine multiple candidate servers that can provide the data resource based on the content scheduling information, and determine the second migration server that meets the message response condition from these candidate servers. The message response condition can refer to the transmission requirement that the available load can meet the resource amount. It can be understood that the larger the resource amount of the data resource represented by the resource identifier, the more available load is required.

上述实施例中,报文响应条件与资源标识匹配,使得所确定的第二迁移服务器满足第二数据请求报文的个性化需求,能够确保数据请求能够被及时响应,有利于进一步提高数据处理效率。In the above embodiment, the message response condition matches the resource identifier, so that the determined second migration server meets the personalized requirements of the second data request message, which can ensure that the data request can be responded to in time, which is conducive to further improving data processing efficiency.

在一个具体的实施例中,确定满足报文响应条件的第二迁移服务器,包括:向内容调度中心发送携带资源标识的服务器信息获取请求;获取内容调度中心响应于服务器信息获取请求、反馈的服务器标识;将服务器标识所表征的服务器,确定为满足报文响应条件的第二迁移服务器。In a specific embodiment, determining the second migration server that meets the message response condition includes: sending a server information acquisition request carrying a resource identifier to a content scheduling center; obtaining a server identifier that the content scheduling center responds to the server information acquisition request and feeds back; and determining the server represented by the server identifier as the second migration server that meets the message response condition.

其中,关于内容调度中心的具体限定参见上文,此处不再赘述。服务器标识是能够唯一表征服务器的标识信息。该标识信息可以包括IP地址、端口号、协议类型等信息,在此不作限定。具体地,第一迁移服务器可以向内容调度中心发送携带资源标识的服务器信息获取请求,内容调度中心根据上述资源标识查询能够为终端所请求的数据资源提供传输服务的服务器,再将该服务器的服务器标识反馈给第一迁移服务器,进而,第一迁移服务器可以将该服务器标识所表征的服务器,确定为满足报文响应条件的第二迁移服务器。Among them, please refer to the above for the specific limitations of the content scheduling center, which will not be repeated here. The server identifier is identification information that can uniquely represent the server. The identification information may include information such as IP address, port number, protocol type, etc., which are not limited here. Specifically, the first migration server can send a server information acquisition request carrying a resource identifier to the content scheduling center. The content scheduling center queries the server that can provide transmission services for the data resources requested by the terminal based on the above resource identifier, and then feeds back the server identifier of the server to the first migration server. Then, the first migration server can determine the server represented by the server identifier as the second migration server that meets the message response conditions.

上述实施例中,第一迁移服务器通过与内容调度中心交互,确定满足报文响应条件的第二迁移服务器,能够降低第一迁移服务器的负载,有利于进一步提高数据处理效率。In the above embodiment, the first migration server determines the second migration server that meets the message response condition by interacting with the content scheduling center, which can reduce the load of the first migration server and is conducive to further improving data processing efficiency.

可以理解,针对某一资源标识,若内容调度中心反馈的服务器标识的数量为一个,则说明当前服务器集群中,仅有一个服务器能够提供该资源标识所表征的数据资源,此时,第一迁移服务器将该资源标识所表征的服务器确定为第二迁移服务器即可。若内容调度中心反馈的服务器标识的数量为多个,则代表当前服务器集群中,有多个服务器均可以提供该资源标识所表征的数据资源。此时,第一迁移服务器需要进行进一步的筛选才能确定第二迁移服务器。It can be understood that for a certain resource identifier, if the number of server identifiers fed back by the content scheduling center is one, it means that in the current server cluster, only one server can provide the data resource represented by the resource identifier. At this time, the first migration server can determine the server represented by the resource identifier as the second migration server. If the number of server identifiers fed back by the content scheduling center is multiple, it means that in the current server cluster, multiple servers can provide the data resource represented by the resource identifier. At this time, the first migration server needs to perform further screening to determine the second migration server.

在一个具体的实施例中,服务器标识的数量为多个。在该实施例的情形下,将服务器标识所表征的服务器,确定为满足报文响应条件的第二迁移服务器,包括:确定各服务器标识各自表征的候选服务器,并获取各候选服务器各自的负载信息;将负载最小的候选服务器,确定为满足报文响应条件的第二迁移服务器。In a specific embodiment, the number of server identifiers is multiple. In the case of this embodiment, the server represented by the server identifier is determined as the second migration server that meets the message response condition, including: determining the candidate server represented by each server identifier, and obtaining the load information of each candidate server; determining the candidate server with the smallest load as the second migration server that meets the message response condition.

具体地,第一迁移服务器从内容调度中心获取多个服务器标识的情况下,可以确定各服务器标识各自表征的候选服务器,并获取各候选服务器各自的负载信息。然后,基于各负载信息,将负载最小的候选服务器,确定为满足报文响应条件的第二迁移服务器。Specifically, when the first migration server obtains multiple server identifiers from the content scheduling center, it can determine the candidate servers represented by each server identifier and obtain the load information of each candidate server. Then, based on the load information, the candidate server with the smallest load is determined as the second migration server that meets the message response condition.

本实施例中,在存在多个候选服务器的情况下,将负载最小的候选服务器,确定为满足报文响应条件的第二迁移服务器,能够确保第二迁移服务器的数据处理效率。In this embodiment, when there are multiple candidate servers, the candidate server with the smallest load is determined as the second migration server that meets the message response condition, which can ensure the data processing efficiency of the second migration server.

在一个实施例中,如图8所示,本申请还提供了一种数据处理方法,该方法可以由计算机设备执行,该计算机设备可以是图1所示的原始服务器,包括以下步骤:In one embodiment, as shown in FIG8 , the present application further provides a data processing method, which may be executed by a computer device, and the computer device may be the original server shown in FIG1 , and includes the following steps:

步骤S802,接收终端发送的第一数据请求报文,并向第一迁移服务器发送包含第一数据请求报文的第一重定向报文。Step S802: receiving a first data request message sent by a terminal, and sending a first redirect message including the first data request message to a first migration server.

其中,关于第一数据请求报文和第一重定向报文的具体限定参见上文,此处不再赘述。具体地,原始服务器可以接收终端发送的第一数据请求报文,并在自身无法向终端提供该第一数据请求报文所请求的数据资源的情况下,向第一迁移服务器发送包含第一数据请求报文的第一重定向报文。The specific limitations of the first data request message and the first redirect message are as mentioned above and will not be repeated here. Specifically, the original server can receive the first data request message sent by the terminal, and when it is unable to provide the data resources requested by the first data request message to the terminal, it can send the first redirect message containing the first data request message to the first migration server.

在一个具体的实施例中,将来自终端的数据请求报文重定向至迁移服务器的重定向报文具有以下特征:报文的源地址为原始服务器的IP地址;报文的目的地址为迁移服务器的IP地址;报文的源端口为原始服务器(与迁移服务器通信)的端口号,该端口号是两者之前协商的端口号;报文的目的端口为迁移服务器(与原始服务器通信)的端口号,该端口号是两者之前协商的端口号;报文的协议类型为两者协商的通信协议类型,包括TCP或UDP。In a specific embodiment, the redirection message for redirecting the data request message from the terminal to the migration server has the following characteristics: the source address of the message is the IP address of the original server; the destination address of the message is the IP address of the migration server; the source port of the message is the port number of the original server (communicating with the migration server), which is the port number previously negotiated by the two; the destination port of the message is the port number of the migration server (communicating with the original server), which is the port number previously negotiated by the two; the protocol type of the message is the communication protocol type negotiated by the two, including TCP or UDP.

步骤S804,接收终端发送的第二数据请求报文。Step S804: receiving a second data request message sent by the terminal.

其中,第二数据请求报文,由终端在接收到第一响应报文的情况下发送;第一响应报文,由第一迁移服务器基于第一数据请求报文反馈至终端。具体地,终端在接收到第一迁移服务器基于第一数据请求报文反馈的第一响应报文的情况下,可以通过向原始服务器发送第二数据请求报文,以请求获得新的数据资源。从而,原始服务器可以接收终端发送的第二数据请求报文。The second data request message is sent by the terminal when the first response message is received; the first response message is fed back to the terminal by the first migration server based on the first data request message. Specifically, when the terminal receives the first response message fed back by the first migration server based on the first data request message, the terminal can send the second data request message to the original server to request to obtain new data resources. Thus, the original server can receive the second data request message sent by the terminal.

步骤S806,向第一迁移服务器发送包含第二数据请求报文的第二重定向报文。Step S806: Send a second redirection message including a second data request message to the first migration server.

具体地,原始服务器可以根据报文的五元组信息,确定针对报文的操作。而第二数据请求报文的五元组信息与第一数据请求报文的五元组信息相同。在第一数据请求报文被重定向至第一迁移服务器的情况下,该五元组信息对应的操作为重定向,从而,原始服务器会按照与第一数据请求报文相同的重定向规则,将该第二数据请求报文封装至第二重定向报文,并发送至第一迁移服务器。Specifically, the original server can determine the operation for the message according to the five-tuple information of the message. The five-tuple information of the second data request message is the same as the five-tuple information of the first data request message. In the case where the first data request message is redirected to the first migration server, the operation corresponding to the five-tuple information is redirection, so the original server will encapsulate the second data request message into the second redirection message according to the same redirection rule as the first data request message, and send it to the first migration server.

步骤S808,在第一迁移服务器满足报文迁移条件的情况下,接收针对第二数据请求报文的重定向信息。Step S808: When the first migration server meets the message migration condition, receiving redirection information for the second data request message.

其中,重定向信息,由第一迁移服务器在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下发送;重定向信息用于指示原始服务器将终端发送的报文重定向至第二迁移服务器;第二迁移服务器满足报文响应条件。具体地,在第一迁移服务器满足报文迁移条件的情况下,接收针对第二数据请求报文的重定向信息,以便后续将终端发送的报文重定向至第二迁移服务器。The redirection information is sent by the first migration server when receiving confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server; and the second migration server meets the message response condition. Specifically, when the first migration server meets the message migration condition, the redirection information for the second data request message is received so as to subsequently redirect the message sent by the terminal to the second migration server.

上述数据处理方法,由响应上一数据请求报文的第一迁移服务器确定响应当前数据请求报文的第二迁移服务器,并通过发送迁移请求与第二迁移服务器进行协商,在获得第二迁移服务器反馈的确认信息的情况下,再向原始服务器发送重定位信息,以指示原始服务器将终端发送的报文重定向至第二迁移服务器,与传统技术由原始服务器进行集中式迁移处理相比,相当于是一种分布式的迁移处理方式,能够降低多次迁移过程的时间损耗,有利于提高数据处理效率。The above-mentioned data processing method is that the first migration server that responds to the previous data request message determines the second migration server that responds to the current data request message, and negotiates with the second migration server by sending a migration request. After obtaining the confirmation information fed back by the second migration server, the relocation information is sent to the original server to instruct the original server to redirect the message sent by the terminal to the second migration server. Compared with the traditional technology of centralized migration processing by the original server, it is equivalent to a distributed migration processing method, which can reduce the time loss of multiple migration processes and is conducive to improving data processing efficiency.

在一个实施例中,数据处理方法还包括:确定第一数据请求报文对应的重定向规则、以及针对重定向规则的重定向释放条件;在满足重定向释放条件的情况下,释放第一数据请求报文对应的重定向规则。In one embodiment, the data processing method further includes: determining a redirection rule corresponding to the first data request message and a redirection release condition for the redirection rule; and releasing the redirection rule corresponding to the first data request message when the redirection release condition is met.

如前文所述的,原始服务器可以通过五元组信息进行重定向规则的维护。该五元组信息可以表征原始服务器与终端之间的连接。原始服务器可以连接多个终端,对应多个五元组信息。在五元组信息对应的操作为重定向的情况下,原始服务器存储有该五元组信息对应的重定向规则。该重定向规则用于指示从五元组信息对应的终端所接收的报文的迁移对象。As described above, the original server can maintain the redirection rule through the five-tuple information. The five-tuple information can represent the connection between the original server and the terminal. The original server can be connected to multiple terminals, corresponding to multiple five-tuple information. In the case where the operation corresponding to the five-tuple information is redirection, the original server stores the redirection rule corresponding to the five-tuple information. The redirection rule is used to indicate the migration object of the message received from the terminal corresponding to the five-tuple information.

具体地,原始服务器可以根据第一数据请求报文的五元组信息,确定该第一数据请求报文对应的重定向规则、以及针对重定向规则的重定向释放条件。该重定向释放条件,例如可以是重定向规则更改次数达到设定次数,也可以是设定时长内没有收到关联报文。该设定时长可以由管理员配置,并在配置文件中声明,也可以采用默认值,例如30S。原始服务器可以基于五元组信息对应的交互情况,确定当前是否满足重定向释放条件,并在满足重定向释放条件的情况下,释放第一数据请求报文对应的重定向规则,以为其他连接的终端提供计算资源。Specifically, the original server can determine the redirection rule corresponding to the first data request message and the redirection release condition for the redirection rule according to the five-tuple information of the first data request message. The redirection release condition can be, for example, that the number of changes to the redirection rule reaches a set number of times, or that no associated message is received within a set time. The set time can be configured by an administrator and declared in a configuration file, or a default value, such as 30S, can be used. The original server can determine whether the redirection release condition is currently met based on the interaction situation corresponding to the five-tuple information, and release the redirection rule corresponding to the first data request message when the redirection release condition is met to provide computing resources for other connected terminals.

上述实施例中,针对重定向规则配置重定向释放条件,并在满足重定向释放条件的情况下,释放第一数据请求报文对应的重定向规则,能够确保原始服务器的计算资源能够被合理配置,有利于进一步提高数据处理效率。In the above embodiment, a redirection release condition is configured for the redirection rule, and when the redirection release condition is met, the redirection rule corresponding to the first data request message is released, which can ensure that the computing resources of the original server can be reasonably configured, which is conducive to further improving data processing efficiency.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的数据处理方法的数据处理系统。该系统所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个数据处理系统实施例中的具体限定可以参见上文中对于数据处理方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides a data processing system for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data processing system embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.

在一个实施例中,数据处理系统包括原始服务器、第一迁移服务器和第二迁移服务器;原始服务器接收终端发送的第一数据请求报文,并向第一迁移服务器发送包含第一数据请求报文的第一重定向报文;第一迁移服务器向终端反馈第一数据请求报文的第一响应报文;原始服务器接收终端发送的第二数据请求报文,并向第一迁移服务器发送包含第二数据请求报文的第二重定向报文;第一迁移服务器在自身满足报文迁移条件的情况下,向满足报文响应条件的第二迁移服务器发送针对第二数据请求报文的迁移请求;第一迁移服务器在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下,向原始服务器发送重定向信息。其中,第二数据请求报文,由终端在接收到第一响应报文的情况下发送;重定向信息用于指示原始服务器将终端发送的报文重定向至第二迁移服务器。In one embodiment, the data processing system includes an original server, a first migration server, and a second migration server; the original server receives a first data request message sent by a terminal, and sends a first redirect message containing the first data request message to the first migration server; the first migration server feeds back a first response message of the first data request message to the terminal; the original server receives a second data request message sent by the terminal, and sends a second redirect message containing the second data request message to the first migration server; the first migration server sends a migration request for the second data request message to the second migration server that meets the message response condition when the first migration server meets the message migration condition; the first migration server sends redirection information to the original server when receiving confirmation information fed back by the second migration server based on the migration request. The second data request message is sent by the terminal when the first response message is received; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server.

在一个具体的实施例中,如图9所示,服务器集群中的各服务器包括重定向器、迁移模块和迁移栈,且每一个服务器均存储有数据资源。其中,重定向器用于实现重定向功能。协议栈用于构建符合通信协议的数据报文。迁移模块用于进行迁移协商。In a specific embodiment, as shown in FIG9 , each server in the server cluster includes a redirector, a migration module and a migration stack, and each server stores data resources. The redirector is used to implement the redirection function. The protocol stack is used to construct a data message that complies with the communication protocol. The migration module is used to perform migration negotiation.

具体地,在开始介绍本申请设计的分布式多次迁移之前,需要先对上一次迁移的流量传递过程进行阐述。如图9所示,实线表示现有连接迁移在执行成功之后的报文流向示意图(也就是说,现有连接已经完成至少一次的连接迁移),迁移之后的第一迁移服务器将数据资源传递至自身的协议栈(如TCP/IP协议栈),由协议栈将这些数据资源构建响应报文,并将响应报文传递至终端。该响应报文中携带终端所请求的数据资源,因此也可称作流量报文。在上述过程中,第一迁移服务器发往终端的响应报文使用该连接最原始的连接信息(即原始服务器与终端的信息),终端在收到上述响应报文后,回复消息确认报文(ACK报文),该ACK报文发往原始服务器,而原始服务器将收到的来自终端的ACK报文重定向至负责流量发送服务的第一迁移服务器,而第一迁移服务器将根据收到的ACK报文执行接下来的流量发送与丢包修复(若有)操作。Specifically, before introducing the distributed multiple migrations designed in this application, it is necessary to first explain the traffic delivery process of the previous migration. As shown in Figure 9, the solid line represents the message flow diagram after the existing connection migration is successfully executed (that is, the existing connection has completed at least one connection migration). After the migration, the first migration server passes the data resources to its own protocol stack (such as TCP/IP protocol stack), and the protocol stack constructs a response message with these data resources and delivers the response message to the terminal. The response message carries the data resources requested by the terminal, so it can also be called a traffic message. In the above process, the response message sent by the first migration server to the terminal uses the most original connection information of the connection (that is, the information of the original server and the terminal). After receiving the above response message, the terminal replies with a message confirmation message (ACK message), which is sent to the original server, and the original server redirects the ACK message received from the terminal to the first migration server responsible for the traffic sending service, and the first migration server will perform the subsequent traffic sending and packet loss repair (if any) operations according to the received ACK message.

终端发送新的流量请求时,对应的数据资源不存在于第一迁移服务器中,此时连接需要尽快地迁移至包含对应数据资源的服务器(记为第二迁移服务器)中,并由第二迁移服务器响应终端的请求。除上文所述的第一次迁移以外,每次迁移的步骤如下:(1.1)终端在现有连接的基础上,发送数据请求报文(即第二数据请求报文);(1.2)该请求报文通过网络传递至原始服务器,并由原始服务器的重定向器“转发”至当前的迁移服务器(记为第一迁移服务器);(1.3)第一迁移服务器在收到上述新的请求报文后,由其重定向器传递至协议栈;(2.1)第一迁移服务器的协议栈通过查询数据资源列表,发现终端最新请求的流量数据不存在于本地(或本地无法获得终端请求的数据资源),第一迁移服务器的协议栈向自身的迁移模块发送连接迁移请求;(2.2)此时第一迁移服务器通过内容调度中心获得能够为用户最新的请求提供服务的服务器信息,作为接下来的用于连接迁移的目标服务器(记为第二迁移服务器);(2.3)迁移模块向自身的重定向器发出更新指令;(3.1)第一迁移服务器向第二迁移服务器发送连接迁移协商报文;(3.2)该协商报文中携带连接状态以及应用状态等信息,这些信息将用于第二迁移服务器的协议栈响应用户请求时使用;(3.3)在上述连接迁移协商完成之后,第一迁移服务器向原始服务器发送重定向规则更新指令,该指令将来自终端的报文重定向至第二迁移服务器;(4)第二迁移服务器根据上述协商过程中携带的用户请求信息,以及传输层和应用层状态,将对应的数据资源发送至终端;(5.1)终端在收到自身请求的流量报文后,回复消息确认报文(ACK报文),(5.2)该报文被原始服务器的重定向器“转发”至第二迁移服务器中;(6.1)第二迁移服务器的重定向器将收到的ACK报文传递至自身的协议栈;(6.2)第二迁移服务器的协议栈执行接下来的流量报文发送或丢包修复报文重传(若有);(7)如步骤(4)所示,第二迁移服务器将需要重传的报文发送至终端;后续将依次循环执行步骤(5)(6)(7)操作,直至连接(流)结束。When the terminal sends a new traffic request, the corresponding data resource does not exist in the first migration server. At this time, the connection needs to be migrated to the server containing the corresponding data resource (referred to as the second migration server) as soon as possible, and the second migration server responds to the terminal's request. Except for the first migration described above, the steps of each migration are as follows: (1.1) The terminal sends a data request message (i.e., the second data request message) based on the existing connection; (1.2) The request message is transmitted to the original server through the network and is "forwarded" to the current migration server (referred to as the first migration server) by the redirector of the original server; (1.3) After receiving the above new request message, the first migration server passes it to the protocol stack through its redirector; (2.1) The protocol stack of the first migration server queries the data resource list and finds that the traffic data requested by the terminal does not exist locally (or the data resource requested by the terminal cannot be obtained locally), and the protocol stack of the first migration server sends a connection migration request to its own migration module; (2.2) At this time, the first migration server obtains the server information that can provide services for the user's latest request through the content scheduling center, which serves as the next target server for connection migration (referred to as the second migration server); (2.3) The migration module sends an update instruction to its own redirector; (3.1) The first migration server sends a connection migration negotiation message to the second migration server; (3.2 ) The negotiation message carries information such as the connection status and application status, which will be used by the protocol stack of the second migration server to respond to user requests; (3.3) After the above connection migration negotiation is completed, the first migration server sends a redirection rule update instruction to the original server, which redirects the message from the terminal to the second migration server; (4) The second migration server sends the corresponding data resources to the terminal based on the user request information carried in the above negotiation process, as well as the transport layer and application layer status; (5.1) After the terminal receives the traffic message it requested, , reply message confirmation message (ACK message), (5.2) the message is "forwarded" by the redirector of the original server to the second migration server; (6.1) the redirector of the second migration server passes the received ACK message to its own protocol stack; (6.2) the protocol stack of the second migration server executes the next traffic message sending or packet loss repair message retransmission (if any); (7) as shown in step (4), the second migration server sends the message that needs to be retransmitted to the terminal; subsequently, steps (5) (6) (7) operations will be executed in sequence until the connection (flow) ends.

上述数据处理系统,在面对多个数据请求、涉及多次请求迁移的情况下,由响应上一数据请求报文的第一迁移服务器确定响应当前数据请求报文的第二迁移服务器,并通过发送迁移请求与第二迁移服务器进行协商,在获得第二迁移服务器反馈的确认信息的情况下,再向原始服务器发送重定位信息,以指示原始服务器将终端发送的报文重定向至第二迁移服务器,能够实现分布式的迁移处理,从而降低多次迁移过程的时间损耗,有利于提高数据处理效率,进而能够更加快速地向终端反馈其所请求的数据资源,提升服务器集群的组网能力和终端的业务体验。The above-mentioned data processing system, when facing multiple data requests and involving multiple requests for migration, determines the second migration server that responds to the current data request message by the first migration server that responds to the previous data request message, and negotiates with the second migration server by sending a migration request. After obtaining the confirmation information fed back by the second migration server, the relocation information is sent to the original server to instruct the original server to redirect the message sent by the terminal to the second migration server. This can realize distributed migration processing, thereby reducing the time loss of multiple migration processes, which is conducive to improving data processing efficiency, and then can more quickly feedback the requested data resources to the terminal, thereby improving the networking capability of the server cluster and the business experience of the terminal.

在一个实施例中,迁移请求中携带连接状态信息和应用状态信息。在该实施例的情形下,第二迁移服务器具体用于基于连接状态信息和应用状态信息,向终端反馈第二数据请求报文的第二响应报文。In one embodiment, the migration request carries connection status information and application status information. In this embodiment, the second migration server is specifically configured to feed back a second response message of the second data request message to the terminal based on the connection status information and the application status information.

其中,连接状态信息包括但不限于终端的终端信息、原始服务器的服务器信息、协议类型,第一迁移服务器和终端各自的传输层状态信息,报文编号等等。终端信息和服务器信息均可以包括IP地址、端口号等,第一迁移服务器的传输层状态信息可以包括发送窗口值、在途数据量等,终端的传输层状态信息可以包括接收窗口值、有效可用带宽等。应用状态信息可以包括第二数据请求报文所请求数据资源的资源标识,还可以包括用户数据加解密的密钥。The connection status information includes, but is not limited to, the terminal information of the terminal, the server information of the original server, the protocol type, the transport layer status information of the first migration server and the terminal, the message number, etc. The terminal information and the server information may include an IP address, a port number, etc. The transport layer status information of the first migration server may include a sending window value, an amount of data in transit, etc. The transport layer status information of the terminal may include a receiving window value, an effective available bandwidth, etc. The application status information may include a resource identifier of the data resource requested by the second data request message, and may also include a key for encrypting and decrypting user data.

具体地,第二迁移服务器可以基于连接状态信息和应用状态信息,确定第二响应报文的配置信息,进而基于该配置信息向终端反馈第二数据请求报文的第二响应报文。其中,配置信息包括但不限于是五元组信息、传输参数等等。该传输参数可以包括发送窗口和发送速率等。Specifically, the second migration server can determine the configuration information of the second response message based on the connection state information and the application state information, and then feed back the second response message of the second data request message to the terminal based on the configuration information. The configuration information includes but is not limited to five-tuple information, transmission parameters, etc. The transmission parameters may include a sending window and a sending rate, etc.

本实施例中,迁移请求中携带连接状态信息和应用状态信息,从而不需要在迁移协商完成之后再额外进行连接状态信息和应用状态信息的发送,能够进一步提高数据处理效率。In this embodiment, the migration request carries the connection status information and the application status information, so that there is no need to send the connection status information and the application status information additionally after the migration negotiation is completed, which can further improve the data processing efficiency.

在一个实施例中,连接状态信息包括原始服务器的服务器信息、以及终端的终端信息。在该实施例的情形下,第二迁移服务器具体用于基于服务器信息和终端信息,配置并向终端反馈第二数据请求报文的第二响应报文。In one embodiment, the connection state information includes server information of the original server and terminal information of the terminal. In this embodiment, the second migration server is specifically configured to feed back a second response message of the second data request message to the terminal based on the server information and the terminal information.

具体地,第二迁移服务器可以基于服务器信息和终端信息,配置报文的五元组信息,进而向终端反馈第二数据请求报文的第二响应报文。其中,第二响应报文的五元组信息如下:源地址为原始服务器的IP地址;目标地址为终端的IP地址;源端口号为原始服务器的端口号;目的端口号为终端的端口号;协议类型为原始服务器的端口号和终端通信的协议类型。进一步地,第二响应报文的报文编号可以延续当前连接(原始服务器与终端之间连接)的报文编号,该报文编号可以由第一迁移服务器通过迁移请求同步至第二迁移服务器。Specifically, the second migration server can configure the five-tuple information of the message based on the server information and the terminal information, and then feed back the second response message of the second data request message to the terminal. The five-tuple information of the second response message is as follows: the source address is the IP address of the original server; the target address is the IP address of the terminal; the source port number is the port number of the original server; the destination port number is the port number of the terminal; the protocol type is the port number of the original server and the protocol type of the terminal communication. Furthermore, the message number of the second response message can continue the message number of the current connection (the connection between the original server and the terminal), and the message number can be synchronized from the first migration server to the second migration server through the migration request.

本实施例中,迁移请求中携带原始服务器的服务器信息和终端的终端信息,能够便于第二迁移服务器基于当前连接配置第二响应报文,使得终端不会感知迁移,继续通过与原始服务器交互获取数据资源,有利于提高交互的便利性。In this embodiment, the migration request carries the server information of the original server and the terminal information of the terminal, which can facilitate the second migration server to configure the second response message based on the current connection, so that the terminal will not perceive the migration and continue to obtain data resources by interacting with the original server, which is conducive to improving the convenience of interaction.

在一个具体的实施例中,应用状态信息包括资源标识和密钥。在该实施例的情形下,第二迁移服务器具体用于获取资源标识所表征的数据资源,使用密钥对数据资源进行加密处理得到加密资源,并向终端反馈携带加密资源的第二响应报文。In a specific embodiment, the application state information includes a resource identifier and a key. In this embodiment, the second migration server is specifically used to obtain the data resource represented by the resource identifier, encrypt the data resource using the key to obtain an encrypted resource, and feed back a second response message carrying the encrypted resource to the terminal.

其中,资源标识用于表征第二数据请求报文所请求的数据资源。具体地,在迁移请求中携带密钥的情况下,说明所请求数据存在加密需求。基于此,第二迁移服务器可以获取资源标识所表征的数据资源,使用密钥对数据资源进行加密处理得到加密资源,并向终端反馈携带加密资源的第二响应报文。The resource identifier is used to represent the data resource requested by the second data request message. Specifically, when the migration request carries a key, it indicates that the requested data needs to be encrypted. Based on this, the second migration server can obtain the data resource represented by the resource identifier, encrypt the data resource using the key to obtain the encrypted resource, and feed back a second response message carrying the encrypted resource to the terminal.

本实施例中,应用状态信息包括资源标识和密钥,能够匹配加密应用场景的需求,有利于提高数据处理方法的灵活性。In this embodiment, the application state information includes a resource identifier and a key, which can match the requirements of encryption application scenarios and is conducive to improving the flexibility of the data processing method.

在一个实施例中,连接状态信息包括第一迁移服务器和终端各自的传输层状态信息;第二迁移服务器具体用于根据传输层状态信息确定传输参数,并基于传输参数向终端反馈第二数据请求报文的第二响应报文。In one embodiment, the connection status information includes transport layer status information of the first migration server and the terminal respectively; the second migration server is specifically configured to determine transmission parameters according to the transport layer status information, and feed back a second response message of the second data request message to the terminal based on the transmission parameters.

其中,第一迁移服务器的传输层状态信息可以包括发送窗口值、在途数据量等,终端的传输层状态信息可以包括接收窗口值、有效可用带宽等。传输参数可以包括发送窗口和发送速率等。具体地,第二迁移服务器向终端发送流量报文的初始阶段,使用由第一迁移服务器同步过来的发送窗口send_cwnd和接收窗口receive_cwnd来计算拥塞窗口cwnd,如公式(1)所示:The transport layer status information of the first migration server may include the sending window value, the amount of data in transit, etc., and the transport layer status information of the terminal may include the receiving window value, the effective available bandwidth, etc. The transmission parameters may include the sending window and the sending rate, etc. Specifically, in the initial stage of the second migration server sending traffic packets to the terminal, the sending window send_cwnd and the receiving window receive_cwnd synchronized by the first migration server are used to calculate the congestion window cwnd, as shown in formula (1):

cwnd = min{send_cwnd, receive_cwnd} (1)cwnd = min{send_cwnd, receive_cwnd} (1)

第二迁移服务器根据计算得到的拥塞窗口cwnd和在途流量inflight_size计算初始发送窗口大小init_cwnd,如公式(2)所示:The second migration server calculates the initial sending window size init_cwnd according to the calculated congestion window cwnd and the in-flight flow inflight_size, as shown in formula (2):

Init_cwnd = cwnd - inflight_size (2)Init_cwnd = cwnd - inflight_size (2)

第二迁移服务器向终端发送流量报文的初始阶段,使用由第一迁移服务器同步过来的有效可用带宽BtlBW来配置初始发送速率init_pacing,具体如公式(3)所示:In the initial stage of sending traffic packets to the terminal, the second migration server uses the effective available bandwidth BtlBW synchronized from the first migration server to configure the initial sending rate init_pacing, as shown in formula (3):

Init_pacing = BtlBW (3)Init_pacing = BtlBW (3)

上述初始发送窗口大小和初始发送速率在第二迁移服务器收到来自终端的消息确认报文(ACK报文)后将不再使用。The above initial sending window size and initial sending rate will no longer be used after the second migration server receives the message confirmation message (ACK message) from the terminal.

本实施例中,基于第一迁移服务器和终端各自的传输层状态信息确定传输参数,能够确保第二响应报文的顺利传输,进而确保数据处理的可靠性。In this embodiment, the transmission parameters are determined based on the transport layer status information of each of the first migration server and the terminal, which can ensure the smooth transmission of the second response message, thereby ensuring the reliability of data processing.

传统技术中,目前连接从一台服务器迁移至另一台服务器的方法有很多,主要可以分为两类:一种是双端协商迁移的方法;另一种是服务器单端迁移的方法。In traditional technology, there are many methods for migrating a connection from one server to another, which can be mainly divided into two categories: one is a two-end negotiation migration method; the other is a server single-end migration method.

双端协商迁移是指:原始服务器在收到来自终端的流量请求报文后,向该终端发送迁移服务器的相关信息;终端在收到上述信息后,向该迁移服务器重新发送流量请求报文,迁移服务器在收到上述请求报文后,发送流量报文作为请求的响应;后续终端与该迁移报文将直接进行交互,直至连接关闭或请求结束。如图10所示,终端向原始服务器发送请求报文后,被告知该原始服务器无法为该终端提供云服务;同时原始服务器“希望”该终端向另一台服务器(迁移服务器)重新发送请求报文;此时,终端将请求报文重新发送至上述迁移服务器,后者将请求的数据资源发送至终端。Bilateral negotiation migration means: after receiving the traffic request message from the terminal, the original server sends the relevant information of the migration server to the terminal; after receiving the above information, the terminal resends the traffic request message to the migration server, and after receiving the above request message, the migration server sends the traffic message as a response to the request; the subsequent terminal and the migration message will interact directly until the connection is closed or the request ends. As shown in Figure 10, after the terminal sends a request message to the original server, it is informed that the original server cannot provide cloud services for the terminal; at the same time, the original server "hopes" that the terminal resends the request message to another server (migration server); at this time, the terminal resends the request message to the above migration server, and the latter sends the requested data resources to the terminal.

这种方法主要面临以下问题:原始服务器与终端的协商时间较长,其频繁地交互将严重影响终端获取请求数据的时间;终端出于安全角度,可能不支持上述与服务器协商连接迁移的功能,造成CDN厂商无法继续为终端提供云服务,造成服务中断的问题;这也是该方法在真实的网络环境中无法使用的主要原因。This method mainly faces the following problems: the negotiation time between the original server and the terminal is relatively long, and their frequent interactions will seriously affect the time it takes for the terminal to obtain the requested data; for security reasons, the terminal may not support the above-mentioned function of negotiating connection migration with the server, causing the CDN manufacturer to be unable to continue to provide cloud services to the terminal, resulting in service interruption; this is also the main reason why this method cannot be used in a real network environment.

服务器单端迁移是指:原始服务器在收到来自终端的请求报文后,“主动”联系可以为该终端提供服务的另一台服务器,并告知其连接信息和请求信息,另一台服务器将根据上述信息响应终端的请求。如图11所示,原始服务器在收到来自终端的请求报文后,与另一台服务器进行协商,后者使用获取的连接信息和请求信息,向终端发送流量报文作为响应;终端在收到请求的流量报文后,向原始服务器发送消息确认报文;原始服务器将上述消息确认报文转发至选择的迁移服务器,后者将继续为该终端提供云服务。Single-end server migration means that after receiving a request message from a terminal, the original server "actively" contacts another server that can provide services for the terminal and informs it of the connection information and request information. The other server will respond to the terminal's request based on the above information. As shown in Figure 11, after receiving a request message from a terminal, the original server negotiates with another server, which uses the acquired connection information and request information to send a traffic message to the terminal as a response; after receiving the requested traffic message, the terminal sends a message confirmation message to the original server; the original server forwards the message confirmation message to the selected migration server, which will continue to provide cloud services for the terminal.

这种方法主要面临以下问题:该方法主要适用于连接单请求的场景,即一个连接中至包括一个流量请求;如果遇到复杂的连接(包含多个请求),迁移服务器在收到来自终端的新的请求报文后,将该请求报文“发回”至原始服务器,后者将对连接进行“重新迁移”,在该过程中,如果遇到原始服务器升级更新等不可用的问题,CDN将无法为该终端提供云服务功能,造成连接中断等严重影响客户端业务体验的事件。This method mainly faces the following problems: This method is mainly applicable to the scenario of single connection request, that is, one connection includes only one traffic request; if a complex connection (including multiple requests) is encountered, the migration server will "send back" the request message to the original server after receiving the new request message from the terminal, and the latter will "re-migrate" the connection. During this process, if the original server is unavailable due to upgrade or update, the CDN will not be able to provide cloud service functions for the terminal, resulting in connection interruption and other events that seriously affect the client's business experience.

本申请重点解决在面临多个请求、多个数据源的情况下,连接多次迁移所面临的过度依赖集中式迁移服务器选择而导致的迁移效率低、业务受损明显的问题,提出一种分布式的无损迁移方法,可显著改善迁移效率、优化终端的业务体验,增强CDN厂商的核心竞争力。This application focuses on solving the problem of low migration efficiency and obvious business damage caused by over-reliance on centralized migration server selection when facing multiple requests and multiple data sources. It proposes a distributed lossless migration method that can significantly improve migration efficiency, optimize terminal business experience, and enhance the core competitiveness of CDN manufacturers.

在一个具体的实施例中,如图12所示,本申请的实现过程包括以下步骤:In a specific embodiment, as shown in FIG12 , the implementation process of the present application includes the following steps:

(1)终端在现有连接的基础上,发送新的流量请求报文,该报文经过原始服务器被重定向至上一次连接迁移之后的服务器(第一迁移服务器),该服务器的协议栈意识到该连接需要迁移至另一台服务器。(1) Based on the existing connection, the terminal sends a new traffic request message. The message is redirected to the server after the last connection migration (the first migration server) through the original server. The protocol stack of the server realizes that the connection needs to be migrated to another server.

其中,终端向原始服务器发送新的流量请求报文Pkt_req,该报文中携带请求数据资源的标识URI(统一资源标识符)。原始服务器在收到上述Pkt_req报文后,将该报文重定向至该连接当前提供数据发送任务的迁移服务器(记为第一迁移服务器),该重定向报文Pkt_req_redirect中包含Pkt_req报文。可选的,可以由服务器的重定向器实现针对报文的重定向操作。本申请重点关注连接已经从原始服务器迁移至其它服务器时,该迁移服务器能够响应终端的请求;但无法响应来自终端的新的流量请求时,应该如何将连接迁移至其它能够响应用户请求的服务器。Among them, the terminal sends a new traffic request message Pkt_req to the original server, and the message carries the identifier URI (Uniform Resource Identifier) of the requested data resource. After receiving the above Pkt_req message, the original server redirects the message to the migration server (referred to as the first migration server) that currently provides the data sending task for the connection. The redirection message Pkt_req_redirect contains the Pkt_req message. Optionally, the redirection operation for the message can be implemented by the server's redirector. This application focuses on how to migrate the connection to other servers that can respond to user requests when the connection has been migrated from the original server to other servers; but when it cannot respond to new traffic requests from the terminal.

进一步地,将来自终端的Pkt_req报文重定向至第一迁移服务器的重定向报文Pkt_req_redirect具有以下特征:Pkt_req_redirect报文的源地址为原始服务器的IP地址;Pkt_req_redirect报文的目的地址为第一迁移服务器的IP地址;Pkt_req_redirect报文的源端口为原始服务器(与第一迁移服务器通信)的端口号;该端口号是两者之前协商的端口号;Pkt_req_redirect报文的目的端口为第一迁移服务器(与原始服务器通信)的端口号;该端口号是两者之前协商的端口号;Pkt_req_redirect报文的协议类型为两者协商的通信协议类型,包括TCP或UDP。Furthermore, the redirection message Pkt_req_redirect that redirects the Pkt_req message from the terminal to the first migration server has the following characteristics: the source address of the Pkt_req_redirect message is the IP address of the original server; the destination address of the Pkt_req_redirect message is the IP address of the first migration server; the source port of the Pkt_req_redirect message is the port number of the original server (communicating with the first migration server); the port number is the port number negotiated by the two before; the destination port of the Pkt_req_redirect message is the port number of the first migration server (communicating with the original server); the port number is the port number negotiated by the two before; the protocol type of the Pkt_req_redirect message is the communication protocol type negotiated by the two, including TCP or UDP.

第一迁移服务器在收到来自原始服务器的Pkt_req_redirect报文后,提取该报文中Pkt_req报文携带的流量请求的数据资源标识URI,并判断该连接是否需要迁移至其它服务器。可选的,第一迁移服务器满足如下条件时会将当前连接迁移至其它服务器:服务器本地无法获取终端请求的数据资源;当前服务器的负载(如CPU利用率、内存占用、流量大小等)较高。如果当前迁移服务器需要将当前连接迁移至其它服务器,具体执行步骤(2);否则,将获取用户请求的数据资源,并响应用户的请求。After receiving the Pkt_req_redirect message from the original server, the first migration server extracts the data resource identifier URI of the traffic request carried in the Pkt_req message in the message, and determines whether the connection needs to be migrated to another server. Optionally, the first migration server will migrate the current connection to another server when the following conditions are met: the server cannot obtain the data resource requested by the terminal locally; the load of the current server (such as CPU utilization, memory usage, traffic size, etc.) is high. If the current migration server needs to migrate the current connection to another server, specifically execute step (2); otherwise, it will obtain the data resource requested by the user and respond to the user's request.

(2)在收到来自终端的新的请求报文后,第一迁移服务器如果判断需要执行连接的再次迁移,则启动自身迁移模块,该模块首先执行连接迁移之前的准备操作,包括获取满足报文响应条件的目标服务器(记为第二迁移服务器)的信息、重置针对该连接的重定向规则等,具体如下:第一迁移服务器的协议栈向其迁移模块发送指令,“告知”需要将当前连接进行迁移;第一迁移服务器从内容调度中心获取目标服务器的信息。(2) After receiving a new request message from the terminal, if the first migration server determines that it is necessary to perform another migration of the connection, it starts its own migration module. The module first performs the preparation operations before the connection migration, including obtaining the information of the target server (referred to as the second migration server) that meets the message response conditions, resetting the redirection rules for the connection, etc. Specifically, the protocol stack of the first migration server sends an instruction to its migration module to "inform" it that the current connection needs to be migrated; the first migration server obtains the information of the target server from the content scheduling center.

第一迁移服务器从内容调度中心获取目标服务器的信息的具体过程可以是:第一迁移服务器向内容调度中心发送获取请求报文Pkt_obtain_target,该报文携带用于标识用户请求数据资源URI;内容调度中心根据上述URI查询能够为终端请求数据资源提供传输服务的目标服务器信息,即目标服务器具有对应的数据资源,且该目标服务器的负载不高。其中内容调度中心反馈的目标服务器信息包括但不限于:目标服务器的IP地址(IP_target);目标服务器的端口号(Port_target);目标服务器支持的协议类型(Ptl_type_target)。内容调度中心可以是单独的服务器,也可以位于每个服务器内部,特别地,内容调度中心可以周期性地向每个服务器同步其自身的用于选择目标服务器的信息。The specific process of the first migration server obtaining the target server information from the content scheduling center may be: the first migration server sends an acquisition request message Pkt_obtain_target to the content scheduling center, and the message carries a URI for identifying the user's request for data resources; the content scheduling center queries the target server information that can provide transmission services for the terminal's request for data resources according to the above URI, that is, the target server has the corresponding data resources, and the load of the target server is not high. The target server information fed back by the content scheduling center includes but is not limited to: the IP address of the target server (IP_target); the port number of the target server (Port_target); the protocol type supported by the target server (Ptl_type_target). The content scheduling center can be a separate server or located inside each server. In particular, the content scheduling center can periodically synchronize its own information for selecting the target server to each server.

进一步地,迁移模块向第一迁移服务器的重定向器下发针对该连接的规则,将重定向器中针对该连接的操作更新为丢弃,将重定向器中针对five_tuple操作设置为drop。此时,第一迁移服务器在收到终端的关于该连接的报文后,将执行丢弃操作;此操作用于避免连接迁移协商过程前后的状态混乱。Furthermore, the migration module sends a rule for the connection to the redirector of the first migration server, updates the operation for the connection in the redirector to discard, and sets the operation for five_tuple in the redirector to drop. At this time, after receiving the message about the connection from the terminal, the first migration server will perform a discard operation; this operation is used to avoid state confusion before and after the connection migration negotiation process.

(3)第一迁移服务器与目标服务器连接迁移协商,期间同步该连接的应用层和传输层状态信息;并通知原始服务器更新器重定向器的规则。(3) The first migration server negotiates the connection migration with the target server, during which the application layer and transport layer status information of the connection are synchronized; and the original server is notified to update the rules of the redirector.

具体地,第一迁移服务器可以向第二迁移服务器发送连接迁移请求报文Pkt_mig_req,其中该报文中携带连接状态与应用状态等信息。第二迁移服务器的迁移模块在收到来自第一迁移服务器的Pkt_mig_req报文后,传递至自身的协议栈;第二迁移服务器的协议栈根据Pkt_mig_req中的连接状态初始化待迁移的连接。第二迁移服务器根据URI查询自身是否存储终端请求的数据资源;并向第一迁移服务器回复迁移协商确认报文Pkt_mig_ack,其中该报文中携带第而迁移服务器是否支持对该连接进行迁移的反馈信息。Specifically, the first migration server can send a connection migration request message Pkt_mig_req to the second migration server, wherein the message carries information such as the connection status and the application status. After receiving the Pkt_mig_req message from the first migration server, the migration module of the second migration server passes it to its own protocol stack; the protocol stack of the second migration server initializes the connection to be migrated according to the connection status in Pkt_mig_req. The second migration server queries whether it stores the data resources requested by the terminal according to the URI; and replies to the first migration server with a migration negotiation confirmation message Pkt_mig_ack, wherein the message carries feedback information on whether the second migration server supports the migration of the connection.

若第二迁移服务器支持连接迁移,则第一迁移服务器分别向第二迁移服务器和原始服务器发送响应启动通知和重定向规则更新指令,具体如下:第一迁移服务器在收到来自第二迁移服务器的连接迁移确认报文后,向第二迁移服务器发送响应启动通知,后者在收到该通知信息后,将基于初始化的连接发送终端请求的数据资源。第一迁移服务器在收到来自第二迁移服务器的连接迁移确认报文后,向原始服务器发送重定向规则更新指令,后者在收到之后将该连接的后续所有报文重定向至第二迁移服务器。If the second migration server supports connection migration, the first migration server sends a response start notification and a redirection rule update instruction to the second migration server and the original server respectively, as follows: after receiving the connection migration confirmation message from the second migration server, the first migration server sends a response start notification to the second migration server, and after receiving the notification information, the latter sends the data resource requested by the terminal based on the initialized connection. After receiving the connection migration confirmation message from the second migration server, the first migration server sends a redirection rule update instruction to the original server, and after receiving the instruction, the latter redirects all subsequent messages of the connection to the second migration server.

(4)第二迁移服务器在收到来自第一迁移服务器发来的响应启动通知后,使用步骤(3)中同步的连接状态和应用状态,将终端请求的数据资源发送至终端。(4) After receiving the response start notification from the first migration server, the second migration server uses the connection state and application state synchronized in step (3) to send the data resource requested by the terminal to the terminal.

具体地,由第二迁移服务器发往终端的流量报文(即第二响应报文)具有以下特征:流量报文的源地址和目的地址分别为原始服务器的IP地址和终端的IP地址;流量报文的源端口号和目的端口号分别为原始服务器的端口号和终端的端口号;流量报文的协议类型为原始服务器的端口号和终端通信的协议类型;流量报文的报文编号为当前连接的报文编号;上述内容均是连接协商过程中由第一迁移服务器同步给第二迁移服务器的。进一步地,流量报文中携带的数据是终端请求报文Pkt_req携带URI对应的数据资源;流量报文中数据如果需要加密,则使用迁移协商过程中同步的用于数据加解密的密钥来进行加密。Specifically, the traffic message (i.e., the second response message) sent by the second migration server to the terminal has the following characteristics: the source address and destination address of the traffic message are the IP address of the original server and the IP address of the terminal respectively; the source port number and destination port number of the traffic message are the port number of the original server and the port number of the terminal respectively; the protocol type of the traffic message is the port number of the original server and the protocol type of the terminal communication; the message number of the traffic message is the message number of the current connection; the above contents are all synchronized from the first migration server to the second migration server during the connection negotiation process. Furthermore, the data carried in the traffic message is the data resource corresponding to the URI carried by the terminal request message Pkt_req; if the data in the traffic message needs to be encrypted, it is encrypted using the key for data encryption and decryption synchronized during the migration negotiation process.

由第二迁移服务器发往终端的流量报文遵循以下发送控制规则:The traffic packets sent from the second migration server to the terminal follow the following sending control rules:

第二迁移服务器向终端发送流量报文的初始阶段,使用由第一迁移服务器同步过来的发送窗口send_cwnd和接收窗口receive_cwnd来计算拥塞窗口cwnd,如公式(1)所示:In the initial stage of sending traffic packets to the terminal, the second migration server uses the sending window send_cwnd and receiving window receive_cwnd synchronized from the first migration server to calculate the congestion window cwnd, as shown in formula (1):

cwnd = min{send_cwnd, receive_cwnd} (1)cwnd = min{send_cwnd, receive_cwnd} (1)

第二迁移服务器根据计算的拥塞窗口cwnd和在途流量inflight_size计算初始发送窗口大小init_cwnd,如公式(2)所示:The second migration server calculates the initial sending window size init_cwnd according to the calculated congestion window cwnd and the in-flight traffic inflight_size, as shown in formula (2):

Init_cwnd = cwnd - inflight_size (2)Init_cwnd = cwnd - inflight_size (2)

第二迁移服务器向终端发送流量报文的初始阶段,使用由第一迁移服务器同步过来的有效可用带宽BtlBW来配置初始发送速率init_pacing,具体如公式(3)所示:In the initial stage of sending traffic packets to the terminal, the second migration server uses the effective available bandwidth BtlBW synchronized from the first migration server to configure the initial sending rate init_pacing, as shown in formula (3):

Init_pacing = BtlBW (3)Init_pacing = BtlBW (3)

上述初始发送窗口大小和初始发送速率在第二迁移服务器收到来自终端的消息确认报文(ACK报文)后将不再使用。The above initial sending window size and initial sending rate will no longer be used after the second migration server receives the message confirmation message (ACK message) from the terminal.

终端在收到来自第二迁移服务器发送的流量报文后,回复消息确认报文Pkt_ack;该报文经原始服务器重定向至第二迁移服务器。原始服务器重定向至第二迁移服务器的报文记为Pkt_redirect,该报文具有以下特征:源地址和源端口分别为原始服务器的IP地址和端口号;目的地址和目的端口分别为第二迁移服务器的IP地址和端口号;Pkt_redirect报文包含了Pkt_ack报文的所有内容。After receiving the traffic message sent from the second migration server, the terminal replies with a message confirmation message Pkt_ack; the message is redirected to the second migration server via the original server. The message redirected from the original server to the second migration server is recorded as Pkt_redirect, which has the following characteristics: the source address and source port are the IP address and port number of the original server respectively; the destination address and destination port are the IP address and port number of the second migration server respectively; the Pkt_redirect message contains all the contents of the Pkt_ack message.

第二迁移服务器在收到来自由原始服务器重定向的Pkt_redirect报文后,提取其携带的由终端发送的Pkt_ack报文,并根据该报文判断接下来的流量报文发送策略,具体如下:第二迁移服务器的重定向器在收到Pkt_redirect报文后,传递至协议栈;后者将从Pkt_redirect报文中提取其携带的Pkt_ack报文;协议栈根据Pkt_ack报文中“声明”的终端收到的(或未收到的)报文信息,判断是否出现丢包;若出现丢包,则执行丢包修复操作(重传丢失的报文);若未出现丢包,则获取接下来要发送的数据资源,并继续向终端发送数据报文。After receiving the Pkt_redirect message redirected by the original server, the second migration server extracts the Pkt_ack message sent by the terminal and determines the next traffic message sending strategy based on the message, as follows: After receiving the Pkt_redirect message, the redirector of the second migration server passes it to the protocol stack; the latter extracts the Pkt_ack message carried by it from the Pkt_redirect message; the protocol stack determines whether packet loss occurs based on the message information received (or not received) by the terminal "declared" in the Pkt_ack message; if packet loss occurs, a packet loss repair operation is performed (the lost message is retransmitted); if packet loss does not occur, the data resources to be sent next are obtained, and data messages continue to be sent to the terminal.

第二迁移服务器根据Pkt_ack报文向终端继续发送流量报文(或丢包修复报文),上述流量报文在发送过程中,将不再遵循初始的发送规则或参数(如init_cwnd和init_pacing);而是基于Pkt_ack报文获得的网络质量信息(如丢包率、RTT、网络带宽等),使用现有的拥塞控制算法计算最新的拥塞窗口cwnd和发送速率pacing来执行这些流量报文的发送工作。终端在收到上述流量报文后,可以发送确认报文,也可以再次发起新的数据请求报文,直至连接关闭,即终端与原始服务器断开连接。The second migration server continues to send traffic messages (or packet loss repair messages) to the terminal according to the Pkt_ack message. During the sending process, the above traffic messages will no longer follow the initial sending rules or parameters (such as init_cwnd and init_pacing); instead, based on the network quality information (such as packet loss rate, RTT, network bandwidth, etc.) obtained from the Pkt_ack message, the existing congestion control algorithm is used to calculate the latest congestion window cwnd and sending rate pacing to perform the sending of these traffic messages. After receiving the above traffic messages, the terminal can send a confirmation message or initiate a new data request message again until the connection is closed, that is, the terminal is disconnected from the original server.

在本申请中,当连接结束时,原始服务器的针对该连接的重定向规则将被释放(或删除);特别地,如果服务器的重定向规则在一段时间阈值T内没有遇到相关连接的报文,将会被自动释放;其中,时间阈值T可由管理员配置,并在配置文件中声明,在默认情况下,T=30s。In this application, when the connection ends, the redirection rule of the original server for the connection will be released (or deleted); in particular, if the server's redirection rule does not encounter a message of the related connection within a time threshold T, it will be automatically released; where the time threshold T can be configured by the administrator and declared in the configuration file. By default, T=30s.

本申请赋能连接在多请求多数据源情况下,支持灵活高效的分布式迁移方法,其中,当服务器收到来自终端的请求报文后,能够自主选择目标服务器,并将当前连接迁移至目标服务器,而不再依赖集中式的服务器管控,有效降低了连接多次迁移过程中的时间损耗,提升了连接迁移的效率,有利于保证客户端的业务体验,提升CDN厂商的核心竞争力。This application enables connections to support flexible and efficient distributed migration methods in the case of multiple requests and multiple data sources. When the server receives a request message from the terminal, it can independently select the target server and migrate the current connection to the target server, without relying on centralized server management and control. This effectively reduces the time loss during multiple connection migrations and improves the efficiency of connection migration, which is conducive to ensuring the client's business experience and enhancing the core competitiveness of CDN manufacturers.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的数据处理方法的数据处理装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个数据处理装置实施例中的具体限定可以参见上文中对于数据处理方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.

在一个实施例中,如图13所示,提供了一种数据处理装置,应用于第一迁移服务器,包括响应报文反馈模块1302、重定向报文接收模块1304、迁移模块1306和重定向信息发送模块1308,其中:In one embodiment, as shown in FIG. 13 , a data processing device is provided, which is applied to a first migration server and includes a response message feedback module 1302, a redirect message receiving module 1304, a migration module 1306, and a redirect information sending module 1308, wherein:

响应报文反馈模块1302,用于响应原始服务器发送的第一重定向报文中携带的第一数据请求报文,向发出第一数据请求报文的终端反馈第一响应报文;A response message feedback module 1302 is used to respond to the first data request message carried in the first redirection message sent by the original server, and feed back a first response message to the terminal that sent the first data request message;

重定向报文接收模块1304,用于接收原始服务器发送的、包含第二数据请求报文的第二重定向报文;第二数据请求报文由终端在接收到第一响应报文的情况下发送至原始服务器;The redirection message receiving module 1304 is used to receive a second redirection message including a second data request message sent by the original server; the second data request message is sent to the original server by the terminal when the first response message is received;

迁移模块1306,用于若第一迁移服务器满足报文迁移条件,则向满足报文响应条件的第二迁移服务器发送针对第二数据请求报文的迁移请求;The migration module 1306 is configured to send a migration request for the second data request message to a second migration server that meets the message response condition if the first migration server meets the message migration condition;

重定向信息发送模块1308,用于在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下,向原始服务器发送重定向信息;重定向信息用于指示原始服务器将终端发送的报文重定向至第二迁移服务器。The redirection information sending module 1308 is used to send redirection information to the original server when receiving confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server.

在一个实施例中,数据处理装置还包括迁移判断模块,用于:提取第二数据请求报文中携带的资源标识;在第一迁移服务器未存储数据资源的情况下,确定第一迁移服务器满足报文迁移条件。资源标识用于表征第二数据请求报文所请求的数据资源。In one embodiment, the data processing device further includes a migration judgment module, which is used to: extract a resource identifier carried in the second data request message; and determine that the first migration server meets the message migration condition when the first migration server does not store the data resource. The resource identifier is used to represent the data resource requested by the second data request message.

在一个实施例中,迁移模块1306包括:服务器确定子模块,用于确定满足报文响应条件的第二迁移服务器;报文响应条件与资源标识匹配;迁移请求发送子模块,用于向第二迁移服务器发送针对第二数据请求报文的迁移请求。In one embodiment, the migration module 1306 includes: a server determination submodule, used to determine a second migration server that meets the message response condition; the message response condition matches the resource identifier; and a migration request sending submodule, used to send a migration request for the second data request message to the second migration server.

在一个实施例中,服务器确定子模块具体用于:向内容调度中心发送携带资源标识的服务器信息获取请求;获取内容调度中心响应于服务器信息获取请求、反馈的服务器标识;将服务器标识所表征的服务器,确定为满足报文响应条件的第二迁移服务器。In one embodiment, the server determination submodule is specifically used to: send a server information acquisition request carrying a resource identifier to the content scheduling center; obtain the server identifier fed back by the content scheduling center in response to the server information acquisition request; and determine the server represented by the server identifier as the second migration server that meets the message response condition.

在一个实施例中,服务器标识的数量为多个,在该实施例的情形下,服务器确定子模块具体用于:确定各服务器标识各自表征的候选服务器,并获取各候选服务器各自的负载信息;将负载最小的候选服务器,确定为满足报文响应条件的第二迁移服务器。In one embodiment, there are multiple server identifiers. In this embodiment, the server determination submodule is specifically used to: determine the candidate server represented by each server identifier, and obtain the load information of each candidate server; determine the candidate server with the smallest load as the second migration server that meets the message response conditions.

在一个实施例中,数据处理装置还包括响应启动通知模块,用于在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下,向第二迁移服务器发送响应启动通知;响应启动通知,用于指示第二迁移服务器向终端反馈第二数据请求报文的第二响应报文。In one embodiment, the data processing device further includes a response start notification module, which is used to send a response start notification to the second migration server upon receiving confirmation information fed back by the second migration server based on the migration request; the response start notification is used to instruct the second migration server to feed back a second response message to the second data request message to the terminal.

在一个实施例中,数据处理装置还包括丢包修复模块,用于:获取终端基于第一响应报文反馈的确认报文;确认报文由所述原始服务器从终端接收、并重定向至第一迁移服务器;在基于确认报文确定第一响应报文出现丢包的情况下,执行针对第一响应报文的丢包修复操作。In one embodiment, the data processing device also includes a packet loss repair module, which is used to: obtain a confirmation message fed back by the terminal based on the first response message; the confirmation message is received by the original server from the terminal and redirected to the first migration server; when it is determined based on the confirmation message that the first response message has packet loss, perform a packet loss repair operation on the first response message.

在一个实施例中,如图14所示,本申请还提供了另一种数据处理装置,应用于原始服务器,该装置包括数据请求报文接收模块1402、重定向报文发送模块1404和重定向信息接收模块1406,其中:In one embodiment, as shown in FIG. 14 , the present application further provides another data processing device, which is applied to an original server. The device includes a data request message receiving module 1402, a redirect message sending module 1404, and a redirect information receiving module 1406, wherein:

数据请求报文接收模块1402,用于接收终端发送的第一数据请求报文;The data request message receiving module 1402 is used to receive a first data request message sent by a terminal;

重定向报文发送模块1404,用于向第一迁移服务器发送包含第一数据请求报文的第一重定向报文;A redirection message sending module 1404, configured to send a first redirection message including a first data request message to a first migration server;

数据请求报文接收模块1402,还用于接收终端发送的第二数据请求报文;第二数据请求报文,由终端在接收到第一响应报文的情况下发送;第一响应报文,由第一迁移服务器基于第一数据请求报文反馈至终端;The data request message receiving module 1402 is further configured to receive a second data request message sent by the terminal; the second data request message is sent by the terminal after receiving the first response message; the first response message is fed back to the terminal by the first migration server based on the first data request message;

重定向报文发送模块1404,还用于向第一迁移服务器发送包含第二数据请求报文的第二重定向报文;The redirection message sending module 1404 is further configured to send a second redirection message including a second data request message to the first migration server;

重定向信息接收模块1406,用于在第一迁移服务器满足报文迁移条件的情况下,接收针对第二数据请求报文的重定向信息;重定向信息,由第一迁移服务器在接收到第二迁移服务器基于迁移请求反馈的确认信息的情况下发送;重定向信息用于指示原始服务器将终端发送的报文重定向至第二迁移服务器;第二迁移服务器满足报文响应条件。The redirection information receiving module 1406 is used to receive redirection information for the second data request message when the first migration server meets the message migration condition; the redirection information is sent by the first migration server when receiving the confirmation information fed back by the second migration server based on the migration request; the redirection information is used to instruct the original server to redirect the message sent by the terminal to the second migration server; the second migration server meets the message response condition.

在一个实施例中,数据处理装置还包括重定向释放模块,用于:确定第一数据请求报文对应的重定向规则、以及针对重定向规则的重定向释放条件;在满足重定向释放条件的情况下,释放第一数据请求报文对应的重定向规则。In one embodiment, the data processing device also includes a redirection release module, which is used to: determine the redirection rule corresponding to the first data request message, and the redirection release condition for the redirection rule; when the redirection release condition is met, release the redirection rule corresponding to the first data request message.

上述数据处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above data processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图15所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储上述数据处理方法所涉及的数据。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种数据处理方法。In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG15. The computer device includes a processor, a memory, an input/output interface (Input/Output, referred to as I/O) and a communication interface. The processor, the memory and the input/output interface are connected via a system bus, and the communication interface is connected to the system bus via the input/output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the above-mentioned data processing method. The input/output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.

本领域技术人员可以理解,图15中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in FIG. 15 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关地域和地区的相关法律法规和标准。并且,对象可以选择不进行对象信息和相关数据的授权,也可以拒绝或可以便捷拒绝推送信息等。It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions and areas. In addition, the subject can choose not to authorize the subject information and related data, or refuse or conveniently refuse to push information, etc.

本申请中,在实例应用时进行相关数据收集处理的过程中,应该严格根据相关地区法律法规的要求,获取个人信息主体的知情同意或单独同意,并在法律法规及个人信息主体的授权范围内,开展后续数据使用及处理行为。In this application, when collecting and processing relevant data during the instance application, the requirements of relevant local laws and regulations should be strictly followed to obtain the informed consent or separate consent of the personal information subject, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims (19)

1. A data processing method, applied to a first migration server, the method comprising:
Responding to a first data request message carried in a first redirection message sent by an original server, and feeding back a first response message to a terminal sending the first data request message;
Receiving a second redirection message which is sent by the original server and contains a second data request message; the second data request message is sent to the original server by the terminal under the condition that the first response message is received;
If the first migration server meets the message migration conditions, a migration request aiming at the second data request message is sent to a second migration server meeting the message response conditions;
Sending redirection information to the original server under the condition that confirmation information fed back by the second migration server based on the migration request is received; the redirection information is used for indicating the original server to redirect the message sent by the terminal to the second migration server.
2. The method according to claim 1, wherein the method further comprises:
Extracting a resource identifier carried in the second data request message; the resource identifier is used for representing the data resource requested by the second data request message;
and under the condition that the first migration server does not store the data resource, determining that the first migration server meets the message migration condition.
3. The method according to claim 2, wherein the sending a migration request for the second data request message to a second migration server that satisfies a message response condition includes:
Determining a second migration server meeting the message response condition; the message response condition is matched with the resource identifier;
And sending a migration request for the second data request message to the second migration server.
4. The method of claim 3, wherein the determining a second migration server that satisfies the message response condition comprises:
Sending a server information acquisition request carrying the resource identifier to a content scheduling center;
Acquiring a server identifier of the content scheduling center in response to the server information acquisition request and feedback;
and determining the server identification represented by the server as a second migration server meeting the message response condition.
5. The method of claim 4, wherein the number of server identifications is a plurality; the determining the server identified by the server identifier as a second migration server meeting the message response condition comprises the following steps:
determining each server to identify each characterized candidate server, and acquiring each load information of each candidate server;
and determining the candidate server with the smallest load as a second migration server meeting the message response condition.
6. The method according to any one of claims 1 to 5, further comprising:
Sending a response start notification to the second migration server under the condition that confirmation information fed back by the second migration server based on the migration request is received;
And the response starting notice is used for indicating the second migration server to feed back a second response message of the second data request message to the terminal.
7. The method according to any one of claims 1 to 5, further comprising:
Acquiring a confirmation message fed back by the terminal based on the first response message; the confirmation message is received from the terminal by the original server and redirected to the first migration server;
and executing packet loss repairing operation for the first response message under the condition that the packet loss of the first response message is determined based on the confirmation message.
8. A data processing method, applied to an origin server, the method comprising:
receiving a first data request message sent by a terminal, and sending a first redirection message containing the first data request message to a first migration server;
receiving a second data request message sent by the terminal; the second data request message is sent by the terminal under the condition of receiving the first response message; the first response message is fed back to the terminal by the first migration server based on the first data request message;
Sending a second redirection message containing the second data request message to the first migration server;
Receiving redirection information aiming at the second data request message under the condition that the first migration server meets the message migration condition; the redirection information is sent by the first migration server under the condition that confirmation information fed back by the second migration server based on the migration request is received; the redirection information is used for indicating the original server to redirect the message sent by the terminal to the second migration server; and the second migration server meets the message response condition.
9. The method of claim 8, wherein the method further comprises:
determining a redirection rule corresponding to the first data request message and a redirection release condition aiming at the redirection rule;
And under the condition that the redirection release condition is met, releasing the redirection rule corresponding to the first data request message.
10. A data processing system, the system comprising an origin server, a first migration server, and a second migration server;
the original server receives a first data request message sent by a terminal and sends a first redirection message containing the first data request message to the first migration server;
The first migration server feeds back a first response message of the first data request message to the terminal;
The original server receives a second data request message sent by the terminal and sends a second redirection message containing the second data request message to the first migration server; the second data request message is sent by the terminal under the condition of receiving the first response message;
the first migration server sends a migration request aiming at the second data request message to a second migration server meeting the message response condition under the condition that the first migration server meets the message migration condition;
The first migration server sends redirection information to the original server under the condition that confirmation information fed back by the second migration server based on the migration request is received; the redirection information is used for indicating the original server to redirect the message sent by the terminal to the second migration server.
11. The system of claim 10, wherein the migration request carries connection status information and application status information;
the second migration server is configured to feed back a second response message of the second data request message to the terminal based on the connection status information and the application status information.
12. The system according to claim 11, wherein the connection state information includes server information of the origin server, and terminal information of the terminal;
The second migration server is specifically configured to configure and feed back a second response message of the second data request message to the terminal based on the server information and the terminal information.
13. The system of claim 11, wherein the application state information includes a resource identification and a key; the resource identifier is used for representing the data resource requested by the second data request message;
The second migration server is specifically configured to obtain the data resource represented by the resource identifier, encrypt the data resource with the key to obtain an encrypted resource, and feed back a second response message carrying the encrypted resource to the terminal.
14. The system of claim 11, wherein the connection state information comprises transport layer state information of each of the first migration server and the terminal;
The second migration server is specifically configured to determine a transmission parameter according to each transmission layer status information, and feed back a second response message of the second data request message to the terminal based on the transmission parameter.
15. A data processing apparatus for application to a first migration server, the apparatus comprising:
The response message feedback module is used for responding to a first data request message carried in a first redirection message sent by the original server and feeding back a first response message to a terminal sending the first data request message;
The redirection message receiving module is used for receiving a second redirection message which is sent by the original server and contains a second data request message; the second data request message is sent to the original server by the terminal under the condition that the first response message is received;
The migration module is used for sending a migration request aiming at the second data request message to a second migration server meeting the message response condition if the first migration server meets the message migration condition;
The redirection information sending module is used for sending redirection information to the original server under the condition that confirmation information fed back by the second migration server based on the migration request is received; the redirection information is used for indicating the original server to redirect the message sent by the terminal to the second migration server.
16. A data processing apparatus for application to an origin server, the apparatus comprising:
The data request message receiving module is used for receiving a first data request message sent by the terminal;
The redirection message sending module is used for sending a first redirection message containing the first data request message to a first migration server;
The data request message receiving module is further used for receiving a second data request message sent by the terminal; the second data request message is sent by the terminal under the condition of receiving the first response message; the first response message is fed back to the terminal by the first migration server based on the first data request message;
The redirection message sending module is further configured to send a second redirection message including the second data request message to the first migration server;
The redirection information receiving module is used for receiving redirection information aiming at the second data request message under the condition that the first migration server meets the message migration condition; the redirection information is sent by the first migration server under the condition that confirmation information fed back by the second migration server based on the migration request is received; the redirection information is used for indicating the original server to redirect the message sent by the terminal to the second migration server; and the second migration server meets the message response condition.
17. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 9 when the computer program is executed.
18. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 9.
19. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 9.
CN202410211386.4A 2024-02-26 2024-02-26 Data processing method, device, system, computer equipment and storage medium Active CN118612223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410211386.4A CN118612223B (en) 2024-02-26 2024-02-26 Data processing method, device, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410211386.4A CN118612223B (en) 2024-02-26 2024-02-26 Data processing method, device, system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118612223A true CN118612223A (en) 2024-09-06
CN118612223B CN118612223B (en) 2025-07-01

Family

ID=92557823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410211386.4A Active CN118612223B (en) 2024-02-26 2024-02-26 Data processing method, device, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118612223B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110264765A1 (en) * 2010-04-22 2011-10-27 Salesforce.Com, Inc. System, method and computer program product for routing messages to a server
US20160241664A1 (en) * 2013-10-28 2016-08-18 Huawei Technologies Co., Ltd. Method, device, and system for redirecting data by using service proxy
CN107872486A (en) * 2016-09-28 2018-04-03 华为技术有限公司 Communication method and device
WO2021223637A1 (en) * 2020-05-08 2021-11-11 大唐移动通信设备有限公司 Application migration method and device
CN113973114A (en) * 2020-07-21 2022-01-25 阿里巴巴集团控股有限公司 Cloud server live migration method, virtual switch and software defined network architecture
CN116614548A (en) * 2022-02-09 2023-08-18 华为技术有限公司 Application service migration method and system, network equipment and storage medium
CN116684468A (en) * 2023-08-02 2023-09-01 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110264765A1 (en) * 2010-04-22 2011-10-27 Salesforce.Com, Inc. System, method and computer program product for routing messages to a server
US20160241664A1 (en) * 2013-10-28 2016-08-18 Huawei Technologies Co., Ltd. Method, device, and system for redirecting data by using service proxy
CN107872486A (en) * 2016-09-28 2018-04-03 华为技术有限公司 Communication method and device
WO2021223637A1 (en) * 2020-05-08 2021-11-11 大唐移动通信设备有限公司 Application migration method and device
CN113973114A (en) * 2020-07-21 2022-01-25 阿里巴巴集团控股有限公司 Cloud server live migration method, virtual switch and software defined network architecture
CN116614548A (en) * 2022-02-09 2023-08-18 华为技术有限公司 Application service migration method and system, network equipment and storage medium
CN116684468A (en) * 2023-08-02 2023-09-01 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN118612223B (en) 2025-07-01

Similar Documents

Publication Publication Date Title
RU2380746C2 (en) Network load balancing using host status information
US9300733B2 (en) System and/or method for client-driven server load distribution
US20220303197A1 (en) Real-time scalable virtual session and network analytics
CN106790420B (en) A kind of more session channel method for building up and system
JP2012095098A (en) Data communication method and information processor
WO2016082371A1 (en) Ssh protocol-based session parsing method and system
WO2022148363A1 (en) Data transmission method and data transmission server
EP3417367B1 (en) Implementing a storage system using a personal user device and a data distribution device
EP4503800A1 (en) Data processing method and apparatus, and computer-readable medium and electronic device
KR20170016281A (en) Transferring state in content centric network stacks
US10154116B1 (en) Efficient synchronization of locally-available content
US20250190246A1 (en) Data request processing method and apparatus, and computer device and storage medium
US20220337615A1 (en) Dynamic sessional redirection and proxy
US10728291B1 (en) Persistent duplex connections and communication protocol for content distribution
WO2022100199A1 (en) Data transmission method and apparatus, and medium, electronic device and network access device
US20130054691A1 (en) Flexible rule based multi-protocol peer-to-peer caching
RU2387002C2 (en) Levelling network load through connection control
US11444882B2 (en) Methods for dynamically controlling transmission control protocol push functionality and devices thereof
CN106230902B (en) A modular family cloud system and its control method
US20190238637A1 (en) Data replication in scalable messaging system
CN118612223B (en) Data processing method, device, system, computer equipment and storage medium
CN111240867B (en) Information communication system and method
CN104601351A (en) Method for capacity allocation of network equipment, network equipment and system
CN117062043A (en) Data processing method, device, computer readable medium and terminal equipment
CN115801298A (en) Method, system, device and storage medium for file transmission

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant