WO2021155656A1 - Data processing method and apparatus, and access system, electronic device and storage medium - Google Patents

Data processing method and apparatus, and access system, electronic device and storage medium Download PDF

Info

Publication number
WO2021155656A1
WO2021155656A1 PCT/CN2020/105871 CN2020105871W WO2021155656A1 WO 2021155656 A1 WO2021155656 A1 WO 2021155656A1 CN 2020105871 W CN2020105871 W CN 2020105871W WO 2021155656 A1 WO2021155656 A1 WO 2021155656A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
target content
group
server group
groups
Prior art date
Application number
PCT/CN2020/105871
Other languages
French (fr)
Chinese (zh)
Inventor
赵历
李斯睿
钱凯桦
Original Assignee
北京百度网讯科技有限公司
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 北京百度网讯科技有限公司 filed Critical 北京百度网讯科技有限公司
Publication of WO2021155656A1 publication Critical patent/WO2021155656A1/en

Links

Images

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
    • 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
    • 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/1014Server selection for load balancing based on the content of a request

Definitions

  • server A feeds back the second message to the data processing apparatus due to a network failure
  • the data processing apparatus selects one server from server B, server C, and server D for feeding back the target content.
  • the method further includes:
  • adjusting the number of servers in at least part of the server group may include increasing the number of servers in at least part of the server group, such as adding one or more servers to a certain server group; This includes reducing the number of servers in at least part of the server group, such as reducing one or more servers in a certain server group.
  • the feedback module 13 is configured to feed back the target content fed back by the first server to the object.
  • the collection module 15 is configured to collect the amount of access to the target content, and collect the load of each server in each of the server groups;

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a data processing method and apparatus, and an access system, an electronic device and a storage medium, which relate to the field of information flow. The data processing method comprises: receiving a first message, which is sent by an object and is used for accessing target content; according to the target content, selecting, from multiple server groups, a first server in a first server group used for feeding back the target content, wherein each server group comprises multiple servers; and feeding back, to the object, the target content fed back by the first server. Multiple servers form a server group so as to construct multiple server groups, such that a certain server group is selected from the multiple server groups, and a certain server which is used for feeding back target content is selected from the server group. Since the pressure resistance capacity of a server group is higher than that of a single server, and the service jitter of the server group is smaller than the service jitter of the single server, the technical effect of improving the efficiency and reliability of accessing target content is achieved.

Description

数据处理方法和装置、访问系统、电子设备和存储介质Data processing method and device, access system, electronic equipment and storage medium
本申请要求于2020年02月06日提交中国专利局、申请号为202010081833.0、申请名称为“数据处理方法和装置、访问系统、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 202010081833.0, and the application name is "data processing methods and devices, access systems, electronic equipment and storage media" on February 6, 2020, and its entire contents Incorporated in this application by reference.
技术领域Technical field
本申请实施例涉及数据处理技术领域,尤其涉及信息流技术领域,具体涉及一种数据处理方法和装置、访问系统、电子设备和存储介质。The embodiments of the present application relate to the field of data processing technology, in particular to the field of information flow technology, and in particular to a data processing method and device, an access system, an electronic device, and a storage medium.
背景技术Background technique
随着计算机技术和互联网技术的发展,网络访问量逐渐增加。With the development of computer technology and Internet technology, the amount of network visits has gradually increased.
在现有技术中,主要通过将用于访问某内容的消息分配(如通过哈希计算的方式进行分配)至相应的独立的服务器,由该服务器完成访问某内容的需求。In the prior art, the message used to access certain content is distributed (for example, distributed by hash calculation) to a corresponding independent server, and the server fulfills the requirement of accessing certain content.
然而发明人在实现本申请的过程中,发现至少存在如下问题:独立的服务器的抗压能力有限,造成服务抖动偏大。However, in the process of implementing the present application, the inventor found at least the following problem: the independent server has limited stress resistance, resulting in excessive service jitter.
发明内容Summary of the invention
根据本申请实施例的一个方面,本申请实施例提供了一种数据处理方法,所述方法包括:According to one aspect of the embodiments of the present application, the embodiments of the present application provide a data processing method, and the method includes:
接收对象发送的用于访问目标内容的第一消息;Receiving the first message sent by the object for accessing the target content;
根据所述目标内容从多个服务器群组中选取用于反馈所述目标内容的第一服务器群组中的第一服务器,其中,每个所述服务器群组均包括多个服务器;Selecting a first server in a first server group for feeding back the target content from a plurality of server groups according to the target content, wherein each of the server groups includes a plurality of servers;
将所述第一服务器反馈的所述目标内容反馈至所述对象。The target content fed back by the first server is fed back to the object.
在本申请实施例中,由于服务器群组中包括多个服务,因此,服务器群组的抗压能力强于单个的服务器,且使得服务器群组的服务抖动小于单个的服务器的服务抖动。因此,通过本申请实施例的方案,可以提高减小服务抖动,提高反馈能力的技术效果。In the embodiment of the present application, since the server group includes multiple services, the stress resistance of the server group is stronger than that of a single server, and the service jitter of the server group is smaller than the service jitter of a single server. Therefore, through the solution of the embodiment of the present application, the technical effect of reducing service jitter and improving feedback capability can be improved.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
响应于第一服务器反馈的用于表征获取失败的第二消息,或者在预设时长内所述第一服务器无反馈,从除所述第一服务器以外的所述第一服务器群组中选取用于反馈 所述目标内容的第二服务器。In response to the second message that is fed back by the first server for indicating the failure of the acquisition, or the first server has no feedback within a preset period of time, select a user from the first server group other than the first server. To a second server that feeds back the target content.
在本申请实施例中,由于各服务器群组包括多个服务器,当某个服务器群组中的某个服务器出现异常(即包括反馈第二消息和无反馈)时,可以由该服务器群组中的其他服务器继续处理,避免造成对其他服务器群组的负载的增加,以确保访问系统正常运行,从而实现提高数据处理装置反馈的效率和可靠性,且提高访问系统的工作效率和工作性能的技术效果。In the embodiment of the present application, since each server group includes multiple servers, when a certain server in a certain server group is abnormal (that is, including feedback of the second message and no feedback), the server group can be Other servers continue to process to avoid increasing the load on other server groups to ensure the normal operation of the access system, thereby improving the efficiency and reliability of the data processing device feedback, and improving the work efficiency and performance of the access system Effect.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从除所述第一服务器群组以外的服务器群组中选取用于反馈所述目标内容的服务器群组中的服务器。In response to all the servers in the first server group failing to feed back the target content, a server group for feeding back the target content is selected from server groups other than the first server group server.
在本申请实施例中,数据处理装置从其他服务器群组中选取用于反馈目标内容的服务器群组,并从该服务器群组中选取用于反馈目标内容的服务器,以确保向对象反馈目标内容的及时性和有效性,从而提高访问量。In the embodiment of the present application, the data processing device selects a server group for feeding back target content from other server groups, and selects a server for feeding back the target content from the server group, so as to ensure that the target content is fed back to the object Timeliness and effectiveness, thereby increasing the number of visits.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从预设的备用服务器群组中选取用于反馈所述目标内容的服务器,所述备用群组中包括至少一个服务器。In response to none of the servers in the first server group feeding back the target content, a server for feeding back the target content is selected from a preset backup server group, and the backup group includes at least one server.
在本申请实施例中,通过当某服务器群组中的所有服务器均未反馈目标内容时,从备用服务器群组中选取用于反馈目标内容的服务器,可以避免将增加其他服务器群组的负载,提高其他服务器群组运行的有效性和可靠性,且通过确保由备用服务器群组向对象反馈目标内容,可提高反馈的可靠性,从而可提高访问量。In the embodiment of the present application, when all the servers in a certain server group do not feed back the target content, the server used to feed back the target content is selected from the backup server group, which can avoid increasing the load of other server groups. Improve the effectiveness and reliability of the operation of other server groups, and by ensuring that the target content is fed back by the backup server group to the object, the reliability of the feedback can be improved, thereby increasing the amount of access.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
根据预设的服务器与群组的映射关系将多个服务器划分至相应的群组,生成多个所述服务器群组。According to a preset mapping relationship between servers and groups, multiple servers are divided into corresponding groups to generate multiple server groups.
在一些实施例中,所述方法还包括:In some embodiments, the method further includes:
采集针对所述目标内容的访问量,并采集每个所述服务器群组中各服务器的负载;Collecting the amount of access to the target content, and collecting the load of each server in each of the server groups;
根据所述访问量和采集到的负载,对至少部分所述服务器群组中的服务器的数量进行调整和/或对所述服务器群组的数量进行调整。Adjust the number of servers in at least part of the server group and/or adjust the number of the server group according to the amount of visits and the collected load.
在本申请实施例中,通过根据访问量和采集到的负载,对至少部分服务器群组中的服务器的数量进行调整和/或对服务器群组的数量进行调整,可以及时的调整访问系统布局,以满足访问量的需求,从而实现提高访问的可靠性和反馈的及时性的技术效 果。In the embodiment of the present application, by adjusting the number of servers in at least part of the server group and/or adjusting the number of server groups according to the amount of visits and the collected load, the layout of the access system can be adjusted in time, In order to meet the demand of visits, the technical effect of improving the reliability of visits and the timeliness of feedback is realized.
在一些实施例中,所述根据所述目标内容从多个服务器群组中选取用于反馈所述目标内容的第一服务器群组中的第一服务器包括:In some embodiments, the selecting the first server in the first server group for feeding back the target content from a plurality of server groups according to the target content includes:
确定所述第一服务器群组对应的分流比例;Determining a distribution ratio corresponding to the first server group;
根据所述分流比例选取所述第一服务器。The first server is selected according to the distribution ratio.
在本申请实施例中,通过根据确定出的分流比例对第一服务器进行选取,可以实现基于各服务器的负载选取相应的服务器,减小访问系统的抖动,从而提高访问系统的稳定性的技术效果。In the embodiment of the present application, by selecting the first server according to the determined split ratio, it is possible to select the corresponding server based on the load of each server, reduce the jitter of the access system, and improve the technical effect of the stability of the access system .
在一些实施例中,所述确定所述第一服务器群组对应的分流比例包括:In some embodiments, the determining the distribution ratio corresponding to the first server group includes:
获取为所述第一服务器群组中各服务器的初始权值;Obtaining the initial weight of each server in the first server group;
计算所述第一服务器群组中各服务器的负载;Calculating the load of each server in the first server group;
分配计算得到的各服务器的负载各自对应的负载权值;Allocate the calculated load weights corresponding to the loads of each server;
根据所述初始权值和所述负载权重确定所述分流比例。The diversion ratio is determined according to the initial weight and the load weight.
在本申请实施例中,根据初始权值和负载权值确定分流比例,即通过多个维度对分流比例进行确定,可以确保分流比例的可靠性和准确性的技术效果。In the embodiment of the present application, the shunt ratio is determined according to the initial weight and the load weight, that is, the shunt ratio is determined through multiple dimensions, which can ensure the technical effect of the reliability and accuracy of the shunt ratio.
根据本申请实施例的一个方面,本申请实施例提供了一种数据处理装置,所述装置包括:According to one aspect of the embodiments of the present application, the embodiments of the present application provide a data processing device, the device including:
接收模块,用于接收对象发送的用于访问目标内容的第一消息;The receiving module is used to receive the first message sent by the object for accessing the target content;
选取模块,用于根据所述目标内容从多个服务器群组中选取用于反馈所述目标内容的第一服务器群组中的第一服务器,其中,每个所述服务器群组均包括多个服务器;The selection module is configured to select the first server in the first server group for feeding back the target content from a plurality of server groups according to the target content, wherein each of the server groups includes a plurality of server;
反馈模块,用于将所述第一服务器反馈的所述目标内容反馈至所述对象。The feedback module is configured to feed back the target content fed back by the first server to the object.
在一些实施例中,所述选取模块还用于,响应于第一服务器反馈的用于表征获取失败的第二消息,或者在预设时长内所述第一服务器无反馈,从除所述第一服务器以外的所述第一服务器群组中选取用于反馈所述目标内容的第二服务器。In some embodiments, the selection module is further configured to respond to the second message used to indicate the failure of the acquisition fed back by the first server, or the first server has no feedback within a preset period of time, so as to remove the second message from the first server. A second server used for feeding back the target content is selected from the first server group other than a server.
在一些实施例中,所述选取模块还用于,响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从除所述第一服务器群组以外的服务器群组中选取用于反馈所述目标内容的服务器群组中的服务器。In some embodiments, the selection module is further configured to, in response to that none of the servers in the first server group feed back the target content, from a server group other than the first server group Select a server in the server group for feeding back the target content.
在一些实施例中,所述选取模块还用于,响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从预设的备用服务器群组中选取用于反馈所述目标内容的服务器,所述备用群组中包括至少一个服务器。In some embodiments, the selection module is further configured to, in response to that none of the servers in the first server group feed back the target content, select from a preset backup server group for feeding back the A server of the target content, and the backup group includes at least one server.
在一些实施例中,所述装置还包括:In some embodiments, the device further includes:
生成模块,用于根据预设的服务器与群组的映射关系将多个服务器划分至相应的群组,生成多个所述服务器群组。The generating module is used to divide multiple servers into corresponding groups according to a preset mapping relationship between servers and groups to generate multiple server groups.
在一些实施例中,所述装置还包括:In some embodiments, the device further includes:
采集模块,用于采集针对所述目标内容的访问量,并采集每个所述服务器群组中各服务器的负载;A collection module, configured to collect the amount of access to the target content, and collect the load of each server in each of the server groups;
调整模块,用于根据所述访问量和采集到的负载,对至少部分所述服务器群组中的服务器的数量进行调整和/或对所述服务器群组的数量进行调整。The adjustment module is configured to adjust the number of servers in at least part of the server group and/or adjust the number of the server group according to the amount of visits and the collected load.
在一些实施例中,所述选取模块用于,确定所述第一服务器群组对应的分流比例,根据所述分流比例选取所述第一服务器。In some embodiments, the selection module is configured to determine a distribution ratio corresponding to the first server group, and select the first server according to the distribution ratio.
在一些实施例中,所述选取模块用于,获取为所述第一服务器群组中各服务器的初始权值,计算所述第一服务器群组中各服务器的负载,分配计算得到的各服务器的负载各自对应的负载权值,根据所述初始权值和所述负载权重确定所述分流比例。In some embodiments, the selection module is configured to obtain the initial weight of each server in the first server group, calculate the load of each server in the first server group, and distribute the calculated server The load weight corresponding to each load of the load, and the shunt ratio is determined according to the initial weight and the load weight.
根据本申请实施例的一个方面,本申请实施例提供了一种电子设备,包括:According to one aspect of the embodiments of the present application, the embodiments of the present application provide an electronic device, including:
至少一个处理器;以及At least one processor; and
与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上任一实施例所述的方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described in any of the above embodiments.
根据本申请实施例的一个方面,本申请实施例提供了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行如上任一实施例所述的方法。According to one aspect of the embodiments of the present application, the embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method described in any of the above embodiments .
根据本申请实施例的一个方面,本申请实施例提供了一种访问系统,所述系统包括如上任一实施例所述的数据处理装置,还包括:多个服务器群组,每个所述服务器群组中均包括多个服务器。According to one aspect of the embodiments of the present application, the embodiments of the present application provide an access system, the system includes the data processing device as described in any of the above embodiments, and further includes: a plurality of server groups, each of the servers Each group includes multiple servers.
本申请实施例提供了一种数据处理方法和装置、访问系统、电子设备和存储介质,包括:接收对象发送的用于访问目标内容的第一消息,根据目标内容从多个服务器群组中选取用于反馈目标内容的第一服务器群组中的第一服务器,其中,每个服务器群组均包括多个服务器,将第一服务器反馈的目标内容反馈至对象,通过由多个服务器组成一个服务器群组,从而构建多个服务器群组,以便从多个服务器群组中选取某个服务器群组,并从该服务器群组中选取用于反馈目标内容的某个服务器,由于服务器群组的抗压能力强于单个的服务器,且使得服务器群组的服务抖动小于单个的服务器的服务抖动,因此实现了提高访问目标内容的效率和可靠性的技术效果。The embodiments of the present application provide a data processing method and device, an access system, an electronic device, and a storage medium, including: receiving a first message sent by an object for accessing target content, and selecting from multiple server groups according to the target content The first server in the first server group for feeding back target content, where each server group includes multiple servers, and the target content fed back by the first server is fed back to the object, and a server is formed by multiple servers Group, so as to construct multiple server groups to select a server group from multiple server groups, and select a server from the server group for feedback of the target content, due to the resistance of the server group The pressure capability is stronger than that of a single server, and the service jitter of a server group is smaller than that of a single server, thus achieving the technical effect of improving the efficiency and reliability of accessing target content.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be easily understood through the following description.
附图说明Description of the drawings
附图用于更好地理解本方案,不构成对本申请的限定。其中:The drawings are used to better understand the solution, and do not constitute a limitation to the application. in:
图1为本申请实施例的数据处理方法的应用场景的示意图;FIG. 1 is a schematic diagram of an application scenario of a data processing method according to an embodiment of the application;
图2为本申请实施例的数据处理方法的流程示意图;2 is a schematic flowchart of a data processing method according to an embodiment of the application;
图3为本申请实施例中,当对象为用户时,两种不同的发送第一消息的方式的示意图;3 is a schematic diagram of two different ways of sending a first message when the object is a user in an embodiment of the application;
图4为本申请实施例的方案与现有技术的方案的对比示意图;FIG. 4 is a schematic diagram of comparison between the solution of the embodiment of the application and the solution of the prior art;
图5为本申请另一实施例的数据处理方法的流程示意图;FIG. 5 is a schematic flowchart of a data processing method according to another embodiment of the application;
图6为本申请另一实施例的数据处理方法的流程示意图;FIG. 6 is a schematic flowchart of a data processing method according to another embodiment of this application;
图7为本申请另一实施例的数据处理方法的流程示意图;FIG. 7 is a schematic flowchart of a data processing method according to another embodiment of the application;
图8为本申请另一实施例的数据处理方法的流程示意图;FIG. 8 is a schematic flowchart of a data processing method according to another embodiment of the application;
图9为本申请另一实施例的数据处理方法的流程示意图;FIG. 9 is a schematic flowchart of a data processing method according to another embodiment of the application;
图10为本申请实施例的根据目标内容从多个服务器群组中选取用于反馈目标内容的第一服务器群组中的第一服务器的方法的流程示意图;10 is a schematic flowchart of a method for selecting a first server in a first server group for feeding back target content from a plurality of server groups according to target content according to an embodiment of the present application;
图11为本申请实施例的根据分流比例选取第一服务器的方法的流程示意图;FIG. 11 is a schematic flowchart of a method for selecting a first server according to a distribution ratio according to an embodiment of the application;
图12为本申请实施例的数据处理装置的示意图;FIG. 12 is a schematic diagram of a data processing device according to an embodiment of the application;
图13为本申请另一实施例的数据处理装置的示意图;FIG. 13 is a schematic diagram of a data processing device according to another embodiment of the application;
图14为本申请实施例的电子设备的框图。FIG. 14 is a block diagram of an electronic device according to an embodiment of the application.
具体实施方式Detailed ways
以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be regarded as merely exemplary. Therefore, those of ordinary skill in the art should realize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Likewise, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
本申请实施例提供的数据处理方法可以适用于如图1所示的应用场景。The data processing method provided in the embodiment of the present application may be applicable to the application scenario shown in FIG. 1.
在如图1所示的应用场景中,用户100可通过终端200对各种内容进行访问,如对网页、微博、论坛和视频等进行访问。In the application scenario shown in FIG. 1, the user 100 can access various contents through the terminal 200, such as accessing web pages, microblogs, forums, and videos.
其中,终端200可以包括如图1中所示的手机,还可以包括计算机、笔记本、iPad、 智能音箱、智能手环和车载终端等。Among them, the terminal 200 may include a mobile phone as shown in FIG. 1, and may also include a computer, a notebook, an iPad, a smart speaker, a smart bracelet, a vehicle-mounted terminal, and the like.
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
根据本申请实施例的一个方面,本申请实施例提供了一种数据处理方法。According to one aspect of the embodiments of the present application, the embodiments of the present application provide a data processing method.
请参阅图2,图2为本申请实施例的数据处理方法的流程示意图。Please refer to FIG. 2, which is a schematic flowchart of a data processing method according to an embodiment of the application.
如图2所示,该方法包括:As shown in Figure 2, the method includes:
S101:接收对象发送的用于访问目标内容的第一消息。S101: Receive a first message sent by an object for accessing target content.
其中,本申请实施例的执行主体可以为数据处理装置,数据处理装置可以为处理器CPU;也可以为服务器,且服务器可以包括本地服务器和云端服务器;还可以为终端,且终端包括但不限于计算机、iPad和车载终端;还可以为芯片,芯片可以为嵌入式芯片,可以嵌入至其他设备(如终端和服务器等)中。Among them, the execution subject of the embodiment of the present application may be a data processing device, which may be a processor CPU; it may also be a server, and the server may include a local server and a cloud server; it may also be a terminal, and the terminal includes but is not limited to Computer, iPad and vehicle-mounted terminal; it can also be a chip, the chip can be an embedded chip, and it can be embedded in other devices (such as terminals and servers, etc.).
其中,目标内容用于表征用户希望读取的相关信息,包括新闻资讯和网页网址等。Among them, the target content is used to characterize the relevant information that the user wants to read, including news information and web page URLs.
在一些实施例中,对象可以为用户,如对象可以为如图1所示的应用场景中的用户100。且当对象为用户时,对象可至少通过两种方式发送第一消息,第一种方式为在数据处理装置的显示界面通过手动的方式输入或点击等向数据处理装置发送第一消息;第二种方式为通过语音的方式向数据处理装置发送第一消息。In some embodiments, the object may be a user, for example, the object may be a user 100 in an application scenario as shown in FIG. 1. And when the object is a user, the object can send the first message in at least two ways. The first method is to manually input or click on the display interface of the data processing device to send the first message to the data processing device; One way is to send the first message to the data processing device by voice.
请参阅图3,图3为本申请实施例中,当对象为用户时,两种不同的发送第一消息的方式的示意图。Please refer to FIG. 3. FIG. 3 is a schematic diagram of two different ways of sending the first message when the object is a user in an embodiment of the application.
其中,图3中的3-1为用户通过手动的方式在数据处理装置的显示界面上手动输入希望访问的目标内容,并在点击“开始搜索”时向数据处理装置发起第一消息。Among them, 3-1 in FIG. 3 is that the user manually enters the target content desired to be accessed on the display interface of the data processing device by manual means, and initiates the first message to the data processing device when clicking "start search".
图3中的3-2为用户通过语音的方式说出希望访问的目标内容,并在说出结束语“开始搜索”时向数据处理装置(图3中的3-2中的数据处理装置具体为智能音箱)发起第一消息。3-2 in Figure 3 means that the user speaks the target content that he wants to access through voice, and when he speaks the concluding sentence "start search", he will report to the data processing device (the data processing device in 3-2 in Figure 3 is specifically The smart speaker) initiates the first message.
值得说明地是,图3只是用于示范性地说明当对象为用户时,用户可以至少从两个方面向数据处理装置发起第一消息,而不能理解为对显示界面,以及结束语等的限定。It is worth noting that FIG. 3 is only used to exemplarily illustrate that when the object is a user, the user can initiate a first message to the data processing device from at least two aspects, and cannot be understood as a limitation on the display interface and the concluding remarks.
如,在一些实施例中,用户还可以通过“唤醒词”对数据处理装置进行唤醒,数据处理装置对“唤醒词”进行应答后,用户可开始发起用于访问目标内容的语音,数据处理装置在用户语音结束时间达到预设时长时,确定用户语音结束,开始搜索。For example, in some embodiments, the user can also wake up the data processing device through a "wake-up word". After the data processing device responds to the "wake-up word", the user can start to initiate a voice for accessing the target content, and the data processing device When the end time of the user's voice reaches the preset duration, it is determined that the user's voice is over, and the search is started.
以数据处理装置为智能音箱为例进行阐述如下:Taking the data processing device as a smart speaker as an example, the explanation is as follows:
用户发起“小度小度”(即唤醒词)的语音,智能音箱回应“在了在了”,用户发起“访问百度论坛”的语音(即用于访问访问目标内容的语音),智能音箱在3秒钟没有收到用户发起的其他语音,确定语音结束,搜索并显示百度论坛的相关内容。The user initiates the voice of "Xiaodu Xiaodu" (that is, the wake-up word), the smart speaker responds with "I am here", the user initiates the voice of "Visit Baidu Forum" (that is, the voice used to access the target content), and the smart speaker is in If no other voice initiated by the user is received for 3 seconds, it is determined that the voice is over, and the relevant content of the Baidu forum is searched and displayed.
当然,在另一些实施例中,对象还可以是用户终端、计算机、智能音箱和车载终端等。Of course, in other embodiments, the object may also be a user terminal, a computer, a smart speaker, a vehicle-mounted terminal, and so on.
以对象为车载终端为例进行示范性说明如下:Take the vehicle-mounted terminal as an example for an exemplary explanation as follows:
当用户与车辆之间的距离小于预设距离阈值时,用户可通过用户终端(如手机)开启车载终端(可通过蓝牙连接实现),并向车载终端发起查询指令,查询指令中携带用户想要访问的目标内容(如查询从当前所在地至某地驾驶路线),车载终端根据查询指令向云端服务器发起用于获取目标内容的第一消息,即查询从当前所在地至某地驾驶路线,并在车载终端的显示界面上显示驾驶路线,以便避免用户上车后再确定路线浪费时间的问题。When the distance between the user and the vehicle is less than the preset distance threshold, the user can use the user terminal (such as a mobile phone) to turn on the vehicle terminal (which can be realized through Bluetooth connection), and initiate a query command to the vehicle terminal. The query command carries the user's desire To access the target content (such as querying the driving route from the current location to a certain place), the vehicle-mounted terminal initiates the first message for obtaining the target content to the cloud server according to the query instruction, that is, querying the driving route from the current location to a certain place, and in the vehicle The driving route is displayed on the display interface of the terminal, so as to avoid the problem of wasting time for the user to determine the route after getting in the car.
S102:根据目标内容从多个服务器群组中选取用于反馈目标内容的第一服务器群组中的第一服务器,其中,每个服务器群组均包括多个服务器。S102: Select a first server in the first server group for feeding back the target content from a plurality of server groups according to the target content, where each server group includes a plurality of servers.
其中,数据处理装置可以与各服务器群组一体合成,即数据处理装置和各服务器群组组成一个系统(以下简称为访问系统),数据处理装置和各服务器群组均为该访问系统中的部分组成要素;数据处理装置也可以与各服务器群组为相互独立的个体。Among them, the data processing device can be integrated with each server group, that is, the data processing device and each server group form a system (hereinafter referred to as the access system), and the data processing device and each server group are part of the access system. Component; the data processing device and each server group can also be independent individuals.
该步骤可具体包括:根据目标内容从多个服务器群组中选取用于反馈目标内容的第一服务器群组,再从第一服务器群组中选取用于反馈目标内容的第一服务器。This step may specifically include: selecting a first server group for feeding back the target content from a plurality of server groups according to the target content, and then selecting a first server for feeding back the target content from the first server group.
其中,根据目标内容从多个服务器群组中选取用于反馈目标内容的第一服务器群组可采用计算哈希值的方式实现。如确定目标内容的ID,根据哈希算法对ID进行计算,得到哈希值,基于计算得到哈希值确定出用于反馈目标内容的第一服务器群组。而具体基于哈希值确定第一服务器群组的方法与基于哈希值确定独立的服务器的方法相同,具体可参见现有技术,此处不再赘述。Wherein, selecting the first server group for feeding back the target content from a plurality of server groups according to the target content can be implemented by calculating a hash value. For example, the ID of the target content is determined, the ID is calculated according to a hash algorithm to obtain a hash value, and the first server group for feeding back the target content is determined based on the calculated hash value. The method for determining the first server group based on the hash value is the same as the method for determining the independent server based on the hash value. For details, please refer to the prior art, which will not be repeated here.
请参阅图4,图4为本申请实施例的方案与现有技术的方案的对比示意图。Please refer to FIG. 4, which is a schematic diagram of comparison between the solution of the embodiment of this application and the solution of the prior art.
结合图4中的4-1可知,现有技术的发明构思为:各服务器之间相互独立,数据处理装置从多个相互独立的服务器中选取用于反馈目标内容的某个独立的服务器。It can be seen from 4-1 in FIG. 4 that the inventive concept of the prior art is that the servers are independent of each other, and the data processing device selects an independent server for feeding back target content from a plurality of independent servers.
而本申请实施例的发明构思为:由多个服务器组成一个服务器群组,从多个服务器群组中选取某个服务器群组,并从该服务器群组中选取用于反馈目标内容的某个服务器。The inventive concept of the embodiment of the present application is: a server group is formed by multiple servers, a certain server group is selected from the multiple server groups, and a certain server group for feeding back target content is selected from the server group. server.
值得说明地是,由于服务器群组中包括多个服务,因此,服务器群组的抗压能力强于单个的服务器,且使得服务器群组的服务抖动小于单个的服务器的服务抖动。因此,通过本申请实施例的方案,可以提高减小服务抖动,提高反馈能力的技术效果。It is worth noting that because the server group includes multiple services, the stress resistance of the server group is stronger than that of a single server, and the service jitter of the server group is smaller than that of a single server. Therefore, through the solution of the embodiment of the present application, the technical effect of reducing service jitter and improving feedback capability can be improved.
其中,服务抖动用于表征执行对象的第一消息产生的抖动的现象。Among them, service jitter is used to characterize the phenomenon of jitter generated by the first message of the execution object.
S103:将第一服务器反馈的目标内容反馈至对象。S103: Feed back the target content fed back by the first server to the object.
基于上述分析可知,本申请实施例提供了一种数据处理方法,该方法包括:接收对象发送的用于访问目标内容的第一消息,根据目标内容从多个服务器群组中选取用于反馈目标内容的第一服务器群组中的第一服务器,其中,每个服务器群组均包括多个服务器,将第一服务器反馈的目标内容反馈至对象,通过由多个服务器组成一个服务器群组,从而构建多个服务器群组,以便从多个服务器群组中选取某个服务器群组,并从该服务器群组中选取用于反馈目标内容的某个服务器,由于服务器群组的抗压能力强于单个的服务器,且使得服务器群组的服务抖动小于单个的服务器的服务抖动,因此实现了提高访问目标内容的效率和可靠性的技术效果。Based on the above analysis, it can be seen that an embodiment of the present application provides a data processing method, which includes: receiving a first message sent by an object for accessing target content, and selecting from multiple server groups for feedback of the target according to the target content The first server in the first server group of the content, where each server group includes multiple servers, and the target content fed back by the first server is fed back to the object, and a server group is formed by multiple servers, thereby Build multiple server groups in order to select a server group from multiple server groups, and select a server from the server group for feedback of target content, because the server group is more resistant to stress than A single server, and the service jitter of the server group is made smaller than the service jitter of a single server, thus achieving the technical effect of improving the efficiency and reliability of accessing target content.
结合图5可知,在一些实施例中,在S102之后,该方法还包括:It can be seen from FIG. 5 that, in some embodiments, after S102, the method further includes:
S104:响应于第一服务器反馈的用于表征获取失败的第二消息,或者在预设时长内第一服务器无反馈,从除第一服务器以外的第一服务器群组中选取用于反馈目标内容的第二服务器,以便将第二服务器反馈的目标内容反馈至对象。S104: In response to the second message that is fed back by the first server to indicate the failure of the acquisition, or the first server has no feedback within a preset time period, select from a group of first servers other than the first server for feedback of target content The second server in order to feed back the target content fed back by the second server to the object.
其中,一方面,该步骤可具体包括:如果数据处理装置接收到了第一服务器反馈的第二消息,且第二消息用于表征获取失败,则数据处理装置从第一服务器群组中重新选取用于反馈目标内容的第二服务器。Among them, on the one hand, this step may specifically include: if the data processing device receives the second message fed back by the first server, and the second message is used to characterize the failure of the acquisition, the data processing device reselects the user from the first server group. For the second server that feeds back the target content.
其中,用于表征获取识别的第二消息可以至少包括两种情况,一种为没有目标内容,所以访问失败,另一种为因网络等各方面因素造成的无法访问目标内容,所以获取失败。Wherein, the second message used to characterize the acquisition and identification may include at least two situations, one is that there is no target content and therefore access fails, and the other is that the target content cannot be accessed due to various factors such as the network, and therefore the acquisition fails.
另一方面,该步骤可具体包括:可由工作人员或者其他设备等,预先基于需求、历史记录和试验测试等为数据处理装置配置一时长(即预设时长),如果数据处理装置在该预设时长内未曾接收到第一服务器的反馈,则数据处理装置从第一服务器群组中重新选取用于反馈目标内容的第二服务器。On the other hand, this step may specifically include: the data processing device can be configured for a period of time (that is, the preset period of time) based on requirements, historical records, and test tests in advance by staff or other equipment, if the data processing device is in the preset If the feedback from the first server is not received within the time period, the data processing device reselects the second server for feeding back the target content from the first server group.
例如:访问目标内容为访问百度新一代智能音箱的上市信息,第一服务器群组共包括四个服务器,且四个服务器分别为服务器A、服务器B、服务器C和服务器D,第一服务器为服务器A。For example: the access target content is to access the listing information of Baidu's new generation of smart speakers. The first server group includes four servers, and the four servers are server A, server B, server C, and server D. The first server is the server A.
在一些实施例中,如果服务器A因为网络故障向数据处理装置反馈了第二消息, 则数据处理装置从服务器B、服务器C和服务器D中选取一个服务器用于反馈目标内容。In some embodiments, if server A feeds back the second message to the data processing apparatus due to a network failure, the data processing apparatus selects one server from server B, server C, and server D for feeding back the target content.
在另一些实施例中,如果服务器A因为自身负载或者百度官网的访问量大等原因,无法在预设时长内进入百度官网,而导致服务器A在预设时长内未能向数据处理装置反馈,则数据处理装置从服务器B、服务器C和服务器D中选取一个服务器用于反馈目标内容In other embodiments, if server A is unable to access Baidu official website within the preset time period due to its own load or heavy visits to the Baidu official website, which results in server A failing to provide feedback to the data processing device within the preset time period, Then the data processing device selects a server from server B, server C, and server D to feed back the target content
值得说明的是,在现有技术中,每个服务器均是独立的个体,当某个服务器在预设时长内没有向数据处理装置反馈,或者当服务器向数据处理装置反馈第二消息时,数据处理装置只能将第一消息重新分配至其他独立的服务器,而每个服务器的抗压能力是一定的,因此,很容易造成将其他服务器压垮的现象,从而导致访问系统崩塌。It is worth noting that in the prior art, each server is an independent individual. When a certain server does not feed back to the data processing device within a preset period of time, or when the server feeds back a second message to the data processing device, the data The processing device can only redistribute the first message to other independent servers, and the stress resistance of each server is certain. Therefore, it is easy to cause the phenomenon of overwhelming other servers, leading to the collapse of the access system.
而在本申请实施例中,由于各服务器群组包括多个服务器,当某个服务器群组中的某个服务器出现异常(即包括反馈第二消息和无反馈)时,可以由该服务器群组中的其他服务器继续处理,避免造成对其他服务器群组的负载的增加,以确保访问系统正常运行,从而实现提高数据处理装置反馈的效率和可靠性,且提高访问系统的工作效率和工作性能的技术效果。In the embodiment of the present application, since each server group includes multiple servers, when a certain server in a certain server group is abnormal (that is, including feedback of the second message and no feedback), the server group can be The other servers in the server continue to process to avoid increasing the load on other server groups to ensure the normal operation of the access system, thereby improving the efficiency and reliability of the data processing device feedback, and improving the work efficiency and performance of the access system Technical effect.
结合图6可知,在一些实施例中,在S104之后,该方法还包括:It can be seen from FIG. 6 that, in some embodiments, after S104, the method further includes:
S105:响应于第一服务器群组中的所有服务器均未反馈目标内容,从除第一服务器群组以外的服务器群组中选取用于反馈目标内容的服务器群组中的服务器,以便将选取的服务器反馈的目标内容反馈至对象。S105: In response to that none of the servers in the first server group feed back the target content, select a server in the server group for feeding back the target content from a server group other than the first server group, so that the selected The target content fed back by the server is fed back to the target.
其中,第一服务器群组中的所有服务器均未反馈目标内容包括以下几种情况:一种为第一服务器群组中的所有服务器向数据处理装置均反馈的第二消息;一种为数据处理装置在预设时长内未收到第一服务器群组中的任一服务器的反馈;一种为第一服务器群组中的部分服务器向数据处理装置反馈了第二消息,而数据处理装置在预设时长内未收到第一服务器群组中的其他服务器的反馈。Among them, all servers in the first server group fail to feed back the target content, including the following situations: one is the second message that all servers in the first server group feed back to the data processing device; the other is data processing The device does not receive feedback from any server in the first server group within a preset time period; one is that some servers in the first server group feed back the second message to the data processing device, and the data processing device is in advance It is assumed that no feedback from other servers in the first server group is received within the time period.
在本申请实施例中,数据处理装置从其他服务器群组中选取用于反馈目标内容的服务器群组,并从该服务器群组中选取用于反馈目标内容的服务器,以确保向对象反馈目标内容的及时性和有效性,从而提高访问量。In the embodiment of the present application, the data processing device selects a server group for feeding back target content from other server groups, and selects a server for feeding back the target content from the server group, so as to ensure that the target content is fed back to the object Timeliness and effectiveness, thereby increasing the number of visits.
结合图7可知,在一些实施例中,在S104之后,该方法还包括:It can be seen in conjunction with FIG. 7 that, in some embodiments, after S104, the method further includes:
S106:响应于第一服务器群组中的所有服务器均未反馈目标内容,从预设的备用服务器群组中选取用于反馈目标内容的服务器,备用服务器群组中包括至少一个服务器,以便将选取出的服务器反馈的目标内容反馈至对象。S106: In response to that none of the servers in the first server group feed back the target content, select a server for feeding back the target content from a preset backup server group. The backup server group includes at least one server so that the selected The target content returned by the server is fed back to the object.
同理,第一服务器群组中的所有服务器均未反馈目标内容包括三种情况,具体可参见上述示例,此处不再赘述。Similarly, none of the servers in the first server group feedback the target content, including three situations. For details, please refer to the above example, which will not be repeated here.
在本申请实施例中,可以预先设置备用服务器群组,该备用服务器群组可以包括一个服务器,也可以包括多个服务器。通过当某服务器群组中的所有服务器均未反馈目标内容时,从备用服务器群组中选取用于反馈目标内容的服务器,可以避免将增加其他服务器群组的负载,提高其他服务器群组运行的有效性和可靠性,且通过确保由备用服务器群组向对象反馈目标内容,可提高反馈的可靠性,从而可提高访问量。In the embodiment of the present application, a backup server group may be preset, and the backup server group may include one server or multiple servers. When all servers in a server group do not feed back the target content, select the server used to feed back the target content from the backup server group, which can avoid increasing the load of other server groups and improve the operation of other server groups. Effectiveness and reliability, and by ensuring that the target content is fed back to the target by the backup server group, the reliability of the feedback can be improved, thereby increasing the amount of visits.
结合图8可知,在一些实施例中,在S101之前,该方法还包括:It can be seen in conjunction with FIG. 8 that, in some embodiments, before S101, the method further includes:
S01:根据预设的服务器与群组的映射关系将多个服务器划分至相应的群组,生成多个服务器群组。S01: According to a preset mapping relationship between servers and groups, multiple servers are divided into corresponding groups to generate multiple server groups.
结合图9可知,在一些实施例中,该方法还包括:It can be seen in conjunction with FIG. 9 that, in some embodiments, the method further includes:
S107:采集针对目标内容的访问量,并采集每个服务器群组中各服务器的负载。S107: Collect the amount of access to the target content, and collect the load of each server in each server group.
需要说明地是,S107与上述步骤之间并无必然的先后顺序关系,如S107可以在S102之后执行,也可以在S101之前执行,且可与任意步骤并列执行,而图8只是用于示范性地说明各步骤之间的某一种执行顺序,而不能理解为对各步骤的执行顺序的限定。It should be noted that there is no inevitable sequence relationship between S107 and the above steps. For example, S107 can be executed after S102, or before S101, and can be executed in parallel with any step, and FIG. 8 is only for exemplary purposes. Describes a certain order of execution between the steps, but cannot be understood as a limitation on the order of execution of the steps.
其中,采集针对目标内容的访问量可通过对访问量进行预估的方式实现。Among them, the collection of visits to the target content can be achieved by estimating the visits.
在一些实施例中,预估的方式可具体包括:从历史访问记录中,确定与目标内容相似度较高的相似内容的访问量,并通过确定出的访问量预估此次目标内容的访问量。In some embodiments, the estimation method may specifically include: determining the number of visits of similar content with high similarity to the target content from the historical visit records, and predicting the visit of the target content based on the determined number of visits quantity.
在另一些实施例中,预估的方式还可具体包括:发布与目标内容相关的信息,采集该相关的信息的访问信息(包括访问量和评论等),根据访问信息预估此次目标内容的访问量。In other embodiments, the estimation method may also specifically include: publishing information related to the target content, collecting access information (including visits and comments, etc.) of the related information, and predicting the target content based on the access information Of visits.
当然,也可通过其他的预估的方式实现,此处不再一一赘述。Of course, it can also be achieved by other estimation methods, which will not be repeated here.
S108:根据访问量和采集到的负载,对至少部分服务器群组中的服务器的数量进行调整和/或对服务器群组的数量进行调整。S108: Adjust the number of servers in at least part of the server group and/or adjust the number of server groups according to the amount of visits and the collected load.
其中,该步骤可具体包括:根据访问量和采集到的负载,对至少部分服务器群组中的服务器的数量进行调整;根据访问量和采集到的负载,对服务器群组的数量进行调整;在根据访问量和采集到的负载对至少部分服务器群组中的服务器的数量进行调整的同时,根据访问量和采集到的负载对服务器群组的数量进行调整。Wherein, this step may specifically include: adjusting the number of servers in at least part of the server group according to the amount of visits and the collected load; adjusting the number of server groups according to the amount of visits and the collected load; While adjusting the number of servers in at least part of the server group according to the amount of visits and the collected load, the number of server groups is adjusted according to the amount of visits and the collected load.
具体地,对至少部分服务器群组中的服务器的数量进行调整可包括对一个服务器群组中的服务器的数量进行调整,也可包括对多个服务器群组中的服务器的数量进行 调整。Specifically, adjusting the number of servers in at least part of the server group may include adjusting the number of servers in one server group, and may also include adjusting the number of servers in multiple server groups.
需要说明地是,对至少部分服务器群组中的服务器的数量进行调整可包括对至少部分服务器群组中的服务器的数量进行增加,如在某服务器群组中增加一个或多个服务器;也可包括对至少部分服务器群组中的服务器的数量进行减少,如在某服务器群组中减少一个或多个服务器。It should be noted that adjusting the number of servers in at least part of the server group may include increasing the number of servers in at least part of the server group, such as adding one or more servers to a certain server group; This includes reducing the number of servers in at least part of the server group, such as reducing one or more servers in a certain server group.
具体地,对服务器群组的数量进行调整可包括对服务器群组数量进行增加,如创建新的服务器群组;也可包括对服务器群组数量进行减少,如删除至少一个服务器群组。Specifically, adjusting the number of server groups may include increasing the number of server groups, such as creating a new server group; or reducing the number of server groups, such as deleting at least one server group.
需要说明地是,创建新的服务器群组可以为添加新的服务器,由添加的新的服务器构建新的服务器群组;也可以为从已创建的服务器群组中选取部分服务器,并构建新的服务器群组;也可以为由添加的新的服务器和从已创建的服务器群组中选取的部分服务器创建新的服务器群组。It should be noted that creating a new server group can be to add a new server and construct a new server group from the added new server; it can also be to select some servers from the created server group and build a new server group. Server group; it is also possible to create a new server group for the newly added server and some servers selected from the created server group.
在本申请实施例中,通过根据访问量和采集到的负载,对至少部分服务器群组中的服务器的数量进行调整和/或对服务器群组的数量进行调整,可以及时的调整访问系统布局,以满足访问量的需求,从而实现提高访问的可靠性和反馈的及时性的技术效果。In the embodiment of the present application, by adjusting the number of servers in at least part of the server group and/or adjusting the number of server groups according to the amount of visits and the collected load, the layout of the access system can be adjusted in time, In order to meet the demand of visits, the technical effect of improving the reliability of visits and the timeliness of feedback is realized.
结合图10可知,在一些实施例中,S102包括:With reference to FIG. 10, it can be seen that, in some embodiments, S102 includes:
S21:确定第一服务器群组对应的分流比例。S21: Determine the distribution ratio corresponding to the first server group.
S22:根据分流比例选取第一服务器。S22: Select the first server according to the distribution ratio.
结合图11可知,在一些实施例中,S21包括:With reference to FIG. 11, it can be seen that, in some embodiments, S21 includes:
S211:获取为第一服务器群组中各服务器的初始权值。S211: Acquire as the initial weight of each server in the first server group.
其中,初始权值可以为第一服务器群组中的各服务器预先配置的权值。Wherein, the initial weight value may be a weight value pre-configured for each server in the first server group.
在一些实施例中,初始权值可是动态调整的权值,且初始权值最初的默认值可以设置为0,即任一服务器在初始状态时的初始权值为0,初始状态可以理解为没有执行本申请实施例的数据处理方法时的状态,也可以理解为某服务器被新增时的状态,以减小访问系统的抖动,从而提高访问系统的稳定性。In some embodiments, the initial weight can be a dynamically adjusted weight, and the initial default value of the initial weight can be set to 0, that is, the initial weight of any server in the initial state is 0, and the initial state can be understood as no The state when the data processing method of the embodiment of the present application is executed can also be understood as the state when a certain server is added to reduce the jitter of the access system, thereby improving the stability of the access system.
而初始权值的可动态调整可以基于各服务器的负载实现,且对初始权值的动态调整可以为正向调整,正向调整可以理解为当某服务器的负载增加时,则其对应的初始权值也相应地增加。The dynamic adjustment of the initial weight can be realized based on the load of each server, and the dynamic adjustment of the initial weight can be a positive adjustment, which can be understood as when the load of a server increases, the corresponding initial weight The value increases accordingly.
其中,在一些实施例中,初始权值可设置为[-100,0]区间的值。Among them, in some embodiments, the initial weight may be set to a value in the interval [-100, 0].
S212:计算第一服务器群组中各服务器的负载。S212: Calculate the load of each server in the first server group.
其中,计算第一服务器群组中各服务器的负载可以通过如下方式实现:Among them, calculating the load of each server in the first server group can be implemented in the following manner:
分别采集第一服务器群组中各服务器的CPU利用率、内存利用率、磁盘使用信息、访问连接数和进程数等参数信息,根据第一服务器群组中各服务器的参数信息计算各参数信息各自对应的服务器的负载。Collect parameter information such as CPU utilization, memory utilization, disk usage information, number of access connections, and number of processes of each server in the first server group, and calculate each parameter information according to the parameter information of each server in the first server group. The load of the corresponding server.
以计算服务器A的负载为例进行说明如下:Taking the calculation of the load of server A as an example, the description is as follows:
采集服务器A的CPU利用率、内存利用率、磁盘使用信息、访问连接数和进程数等参数信息,根据采集到的参数计算服务器A的负载,其中,具体计算服务器A的负载的公式可参见现有技术中计算负载的公式,此处不再赘述。Collect the parameter information of server A's CPU utilization, memory utilization, disk usage information, number of access connections, and number of processes, and calculate the load of server A according to the collected parameters. The specific formula for calculating the load of server A can be found here There is a formula for calculating the load in the technology, so I won't repeat it here.
S213:分配计算得到的各服务器的负载各自对应的负载权值。S213: Allocate the calculated load weights corresponding to the loads of each server.
该步骤可以采用下述方法实现:This step can be implemented using the following methods:
方法一:可基于需求、经验和试验数据等预先设置映射表,映射表用于表征负载与负载权值之间的对应,即当知道某服务器的负载时,可从映射表中查找与该服务器的负载对应的负载权值。Method 1: The mapping table can be set up in advance based on requirements, experience and test data. The mapping table is used to characterize the correspondence between the load and the load weight. That is, when the load of a certain server is known, the server can be found in the mapping table. The corresponding load weight of the load.
方法二:可基于需求、经验和试验数据等设置一负载阈值,并将各服务器的负载与负载阈值进行比较,根据比较得到的二者之间的差值向量为各服务器分配负载权值,若差值向量为负,即若某服务器的负载小于负载阈值,则分配给该服务器的负载权值较大;若差值向量为正,即若某服务器的负载大于负载阈值,则分配给该服务器的负载权值较小。且,若差值向量为正,则差值向量对应的值越大,则对应的负载权值就越小。如,若服务器A的负载和服务器B的负载均大于负载阈值,且服务器A的负载大于服务器B的负载,则服务器A的负载权值小于服务器B的负载权值。且,若差值向量为负,则差值向量对应的值越大,则对应的负载权值就越大。如,若服务器A的负载和服务器B的负载均小于负载阈值,且服务器A的负载小于服务器B的负载,则服务器A的负载权值大于服务器B的负载权值。Method 2: Set a load threshold based on demand, experience, and test data, and compare the load of each server with the load threshold, and assign load weights to each server according to the difference vector between the two obtained from the comparison. If The difference vector is negative, that is, if the load of a server is less than the load threshold, the load weight assigned to the server is larger; if the difference vector is positive, that is, if the load of a server is greater than the load threshold, then it is assigned to the server The load weight is smaller. And, if the difference vector is positive, the larger the value corresponding to the difference vector, the smaller the corresponding load weight. For example, if the load of server A and the load of server B are both greater than the load threshold, and the load of server A is greater than the load of server B, then the load weight of server A is less than the load weight of server B. Moreover, if the difference vector is negative, the larger the value corresponding to the difference vector, the larger the corresponding load weight. For example, if the load of server A and the load of server B are both less than the load threshold, and the load of server A is less than the load of server B, then the load weight of server A is greater than the load weight of server B.
其中,在一些实施例中,负载权值可设置为[0,100]区间的值。Among them, in some embodiments, the load weight may be set to a value in the interval [0,100].
S214:根据初始权值和负载权重确定分流比例。S214: Determine the shunt ratio according to the initial weight and the load weight.
其中,可将初始权值与负载权值的和确定为分流比例。Among them, the sum of the initial weight and the load weight can be determined as the shunt ratio.
根据本申请实施例的另一个方面,本申请实施例还提供了一种数据处理装置。According to another aspect of the embodiments of the present application, the embodiments of the present application also provide a data processing device.
请参阅图12,图12为本申请实施例的数据处理装置的示意图。Please refer to FIG. 12, which is a schematic diagram of a data processing device according to an embodiment of the application.
如图12所示,该装置包括:As shown in Figure 12, the device includes:
接收模块11,用于接收对象发送的用于访问目标内容的第一消息;The receiving module 11 is configured to receive the first message sent by the object for accessing the target content;
选取模块12,用于根据所述目标内容从多个服务器群组中选取用于反馈所述目标 内容的第一服务器群组中的第一服务器,其中,每个所述服务器群组均包括多个服务器;The selection module 12 is configured to select a first server in a first server group for feeding back the target content from a plurality of server groups according to the target content, wherein each of the server groups includes multiple server groups. Servers;
反馈模块13,用于将所述第一服务器反馈的所述目标内容反馈至所述对象。The feedback module 13 is configured to feed back the target content fed back by the first server to the object.
在一些实施例中,所述选取模块12还用于,响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从除所述第一服务器群组以外的服务器群组中选取用于反馈所述目标内容的服务器群组中的服务器。In some embodiments, the selection module 12 is further configured to, in response to all servers in the first server group failing to feed back the target content, from a server group other than the first server group Select a server in the server group for feeding back the target content.
在一些实施例中,所述选取模块12还用于,响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从预设的备用服务器群组中选取用于反馈所述目标内容的服务器,所述备用群组中包括至少一个服务器。In some embodiments, the selection module 12 is further configured to, in response to all the servers in the first server group failing to feed back the target content, select from a preset backup server group for feedback. For the server of the target content, the backup group includes at least one server.
结合图13可知,在一些实施例中,所述装置还包括:With reference to FIG. 13, it can be seen that, in some embodiments, the device further includes:
生成模块14,用于根据预设的服务器与群组的映射关系将多个服务器划分至相应的群组,生成多个所述服务器群组。The generating module 14 is configured to divide multiple servers into corresponding groups according to a preset mapping relationship between servers and groups, and generate multiple server groups.
结合图13可知,在一些实施例中,所述装置还包括:With reference to FIG. 13, it can be seen that, in some embodiments, the device further includes:
采集模块15,用于采集针对所述目标内容的访问量,并采集每个所述服务器群组中各服务器的负载;The collection module 15 is configured to collect the amount of access to the target content, and collect the load of each server in each of the server groups;
调整模块16,用于根据所述访问量和采集到的负载,对至少部分所述服务器群组中的服务器的数量进行调整和/或对所述服务器群组的数量进行调整。The adjustment module 16 is configured to adjust the number of servers in at least part of the server group and/or adjust the number of the server groups according to the amount of visits and the collected load.
在一些实施例中,所述选取模块12用于,确定所述第一服务器群组对应的分流比例,根据所述分流比例选取所述第一服务器。In some embodiments, the selection module 12 is configured to determine a distribution ratio corresponding to the first server group, and select the first server according to the distribution ratio.
在一些实施例中,所述选取模块12用于,获取为所述第一服务器群组中各服务器的初始权值,计算所述第一服务器群组中各服务器的负载,分配计算得到的各服务器的负载各自对应的负载权值,根据所述初始权值和所述负载权重确定所述分流比例。In some embodiments, the selection module 12 is configured to obtain the initial weight of each server in the first server group, calculate the load of each server in the first server group, and distribute the calculated values of each server. The load weight value corresponding to the load of the server is determined according to the initial weight value and the load weight.
根据本申请的实施例,本申请还提供了一种电子设备和一种可读存储介质。According to the embodiments of the present application, the present application also provides an electronic device and a readable storage medium.
如图14所示,是根据本申请实施例的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请实施例的实现。As shown in FIG. 14, it is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described and/or required herein.
如图14所示,该电子设备包括:一个或多个处理器101、存储器102,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接, 并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图14中以一个处理器101为例。As shown in FIG. 14, the electronic device includes: one or more processors 101, a memory 102, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. The various components are connected to each other by using different buses, and can be installed on a common motherboard or installed in other ways as required. The processor may process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors and/or multiple buses can be used with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). In FIG. 14, a processor 101 is taken as an example.
存储器102即为本申请实施例所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本申请实施例所提供的数据处理方法。本申请实施例的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请实施例所提供的数据处理方法。The memory 102 is a non-transitory computer-readable storage medium provided by an embodiment of the application. Wherein, the memory stores instructions executable by at least one processor, so that the at least one processor executes the data processing method provided in the embodiment of the present application. The non-transitory computer-readable storage medium of the embodiment of the present application stores computer instructions, and the computer instruction is used to make a computer execute the data processing method provided by the embodiment of the present application.
存储器102作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的数据处理方法对应的程序指令/模块。处理器101通过运行存储在存储器102中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的数据处理方法。As a non-transitory computer-readable storage medium, the memory 102 can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the data processing method in the embodiment of the present application. The processor 101 executes various functional applications and data processing of the server by running non-transient software programs, instructions, and modules stored in the memory 102, that is, realizing the data processing method in the foregoing method embodiment.
存储器102可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器102可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器102可选包括相对于处理器101远程设置的存储器,这些远程存储器可以通过网络连接至电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、区块链服务网络(Block-chain-based Service Network,BSN)、移动通信网及其组合。The memory 102 may include a program storage area and a data storage area. The program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the electronic device, and the like. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 102 may optionally include a memory remotely provided with respect to the processor 101, and these remote memories may be connected to an electronic device through a network. Examples of the foregoing network include, but are not limited to, the Internet, corporate intranet, local area network, Block-chain-based Service Network (BSN), mobile communication network, and combinations thereof.
电子设备还可以包括:输入装置103和输出装置104。处理器101、存储器102、输入装置103和输出装置104可以通过总线或者其他方式连接,图14中以通过总线连接为例。The electronic device may further include: an input device 103 and an output device 104. The processor 101, the memory 102, the input device 103, and the output device 104 may be connected by a bus or in other ways. In FIG. 14, the connection by a bus is taken as an example.
输入装置103可接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置104可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离 子体显示器。在一些实施方式中,显示设备可以是触摸屏。The input device 103 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more Input devices such as mouse buttons, trackballs, joysticks, etc. The output device 104 may include a display device, an auxiliary lighting device (for example, LED), a tactile feedback device (for example, a vibration motor), and the like. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, the programmable processor It can be a dedicated or general-purpose programmable processor that can receive data and instructions from the storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device. An output device.
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computing programs (also referred to as programs, software, software applications, or codes) include machine instructions for programmable processors, and can be implemented using high-level procedures and/or object-oriented programming languages, and/or assembly/machine language Calculation program. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and/or device used to provide machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memory, programmable logic devices (PLD)), including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。In order to provide interaction with the user, the systems and techniques described here can be implemented on a computer that has: a display device for displaying information to the user (for example, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) ); and a keyboard and a pointing device (for example, a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (for example, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, voice input, or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、区块链服务网络(Block-chain-based Service Network,BSN)、广域网(WAN)和互联网。The systems and technologies described herein can be implemented in a computing system that includes back-end components (for example, as a data server), or a computing system that includes middleware components (for example, an application server), or a computing system that includes front-end components (for example, A user computer with a graphical user interface or a web browser, through which the user can interact with the implementation of the system and technology described herein), or includes such back-end components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be connected to each other through any form or medium of digital data communication (for example, a communication network). Examples of communication networks include: Local Area Network (LAN), Block-chain-based Service Network (BSN), Wide Area Network (WAN), and the Internet.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。 例如,本申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present application can be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution of the present application can be achieved, there is no limitation herein.
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The foregoing specific implementations do not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent replacement and improvement made within the spirit and principle of this application shall be included in the protection scope of this application.

Claims (19)

  1. 一种数据处理方法,其特征在于,所述方法包括:A data processing method, characterized in that the method includes:
    接收对象发送的用于访问目标内容的第一消息;Receiving the first message sent by the object for accessing the target content;
    根据所述目标内容从多个服务器群组中选取用于反馈所述目标内容的第一服务器群组中的第一服务器,其中,每个所述服务器群组均包括多个服务器;Selecting a first server in a first server group for feeding back the target content from a plurality of server groups according to the target content, wherein each of the server groups includes a plurality of servers;
    将所述第一服务器反馈的所述目标内容反馈至所述对象。The target content fed back by the first server is fed back to the object.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    响应于第一服务器反馈的用于表征获取失败的第二消息,或者在预设时长内所述第一服务器无反馈,从除所述第一服务器以外的所述第一服务器群组中选取用于反馈所述目标内容的第二服务器。In response to the second message that is fed back by the first server for indicating the failure of the acquisition, or the first server has no feedback within a preset period of time, select a user from the first server group other than the first server. To a second server that feeds back the target content.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从除所述第一服务器群组以外的服务器群组中选取用于反馈所述目标内容的服务器群组中的服务器。In response to all the servers in the first server group failing to feed back the target content, a server group for feeding back the target content is selected from server groups other than the first server group server.
  4. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从预设的备用服务器群组中选取用于反馈所述目标内容的服务器,所述备用群组中包括至少一个服务器。In response to none of the servers in the first server group feeding back the target content, a server for feeding back the target content is selected from a preset backup server group, and the backup group includes at least one server.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    根据预设的服务器与群组的映射关系将多个服务器划分至相应的群组,生成多个所述服务器群组。According to a preset mapping relationship between servers and groups, multiple servers are divided into corresponding groups to generate multiple server groups.
  6. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    采集针对所述目标内容的访问量,并采集每个所述服务器群组中各服务器的负载;Collecting the amount of access to the target content, and collecting the load of each server in each of the server groups;
    根据所述访问量和采集到的负载,对至少部分所述服务器群组中的服务器的数量进行调整和/或对所述服务器群组的数量进行调整。Adjust the number of servers in at least part of the server group and/or adjust the number of the server group according to the amount of visits and the collected load.
  7. 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据所述目标内容从多个服务器群组中选取用于反馈所述目标内容的第一服务器群组中的第一服务器包括:The method according to any one of claims 1 to 4, wherein the first server group in the first server group for feeding back the target content is selected from a plurality of server groups according to the target content One server includes:
    确定所述第一服务器群组对应的分流比例;Determining a distribution ratio corresponding to the first server group;
    根据所述分流比例选取所述第一服务器。The first server is selected according to the distribution ratio.
  8. 根据权利要求1至4中任一项所述的方法,其特征在于,所述确定所述第一服务器群组对应的分流比例包括:The method according to any one of claims 1 to 4, wherein the determining the distribution ratio corresponding to the first server group comprises:
    获取为所述第一服务器群组中各服务器的初始权值;Obtaining the initial weight of each server in the first server group;
    计算所述第一服务器群组中各服务器的负载;Calculating the load of each server in the first server group;
    分配计算得到的各服务器的负载各自对应的负载权值;Allocate the calculated load weights corresponding to the loads of each server;
    根据所述初始权值和所述负载权重确定所述分流比例。The diversion ratio is determined according to the initial weight and the load weight.
  9. 一种数据处理装置,其特征在于,所述装置包括:A data processing device, characterized in that the device comprises:
    接收模块,用于接收对象发送的用于访问目标内容的第一消息;The receiving module is used to receive the first message sent by the object for accessing the target content;
    选取模块,用于根据所述目标内容从多个服务器群组中选取用于反馈所述目标内容的第一服务器群组中的第一服务器,其中,每个所述服务器群组均包括多个服务器;The selection module is configured to select the first server in the first server group for feeding back the target content from a plurality of server groups according to the target content, wherein each of the server groups includes a plurality of server;
    反馈模块,用于将所述第一服务器反馈的所述目标内容反馈至所述对象。The feedback module is configured to feed back the target content fed back by the first server to the object.
  10. 根据权利要求9所述的装置,其特征在于,所述选取模块还用于,响应于第一服务器反馈的用于表征获取失败的第二消息,或者在预设时长内所述第一服务器无反馈,从除所述第一服务器以外的所述第一服务器群组中选取用于反馈所述目标内容的第二服务器。The device according to claim 9, wherein the selection module is further configured to respond to a second message that is fed back by the first server and used to characterize the failure of the acquisition, or the first server does not have any information within a preset period of time. Feedback: selecting a second server for feeding back the target content from the first server group except the first server.
  11. 根据权利要求10所述的装置,其特征在于,所述选取模块还用于,响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从除所述第一服务器群组以外的服务器群组中选取用于反馈所述目标内容的服务器群组中的服务器。10. The device according to claim 10, wherein the selection module is further configured to, in response to all servers in the first server group failing to feed back the target content, remove from the first server group A server in the server group used for feeding back the target content is selected from the server group outside the group.
  12. 根据权利要求10所述的装置,其特征在于,所述选取模块还用于,响应于所述第一服务器群组中的所有服务器均未反馈所述目标内容,从预设的备用服务器群组 中选取用于反馈所述目标内容的服务器,所述备用群组中包括至少一个服务器。The device according to claim 10, wherein the selection module is further configured to, in response to all servers in the first server group failing to feed back the target content, from a preset backup server group The server used for feeding back the target content is selected from the group, and the backup group includes at least one server.
  13. 根据权利要求9至12中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 9 to 12, wherein the device further comprises:
    生成模块,用于根据预设的服务器与群组的映射关系将多个服务器划分至相应的群组,生成多个所述服务器群组。The generating module is used to divide multiple servers into corresponding groups according to a preset mapping relationship between servers and groups to generate multiple server groups.
  14. 根据权利要求9至12中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 9 to 12, wherein the device further comprises:
    采集模块,用于采集针对所述目标内容的访问量,并采集每个所述服务器群组中各服务器的负载;A collection module, configured to collect the amount of access to the target content, and collect the load of each server in each of the server groups;
    调整模块,用于根据所述访问量和采集到的负载,对至少部分所述服务器群组中的服务器的数量进行调整和/或对所述服务器群组的数量进行调整。The adjustment module is configured to adjust the number of servers in at least part of the server group and/or adjust the number of the server group according to the amount of visits and the collected load.
  15. 根据权利要求9至12中任一项所述的装置,其特征在于,所述选取模块用于,确定所述第一服务器群组对应的分流比例,根据所述分流比例选取所述第一服务器。The device according to any one of claims 9 to 12, wherein the selection module is configured to determine a distribution ratio corresponding to the first server group, and select the first server according to the distribution ratio .
  16. 根据权利要求9至12中任一项所述的装置,其特征在于,所述选取模块用于,获取为所述第一服务器群组中各服务器的初始权值,计算所述第一服务器群组中各服务器的负载,分配计算得到的各服务器的负载各自对应的负载权值,根据所述初始权值和所述负载权重确定所述分流比例。The device according to any one of claims 9 to 12, wherein the selection module is configured to obtain the initial weight of each server in the first server group, and calculate the first server group For the load of each server in the group, the calculated load weights corresponding to the loads of each server are allocated, and the diversion ratio is determined according to the initial weight and the load weight.
  17. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    至少一个处理器;以及At least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-8中任一项所述的方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute any one of claims 1-8 Methods.
  18. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行权利要求1-8中任一项所述的方法。A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to make the computer execute the method according to any one of claims 1-8.
  19. 一种访问系统,其特征在于,所述系统包括如权利要求9至16中任一项所述的数据处理装置,还包括:多个服务器群组,每个所述服务器群组中均包括多个服务 器。An access system, characterized in that the system comprises the data processing device according to any one of claims 9 to 16, and further comprises: a plurality of server groups, and each of the server groups includes Servers.
PCT/CN2020/105871 2020-02-06 2020-07-30 Data processing method and apparatus, and access system, electronic device and storage medium WO2021155656A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010081833.0A CN111343235A (en) 2020-02-06 2020-02-06 Data processing method and device, access system, electronic equipment and storage medium
CN202010081833.0 2020-02-06

Publications (1)

Publication Number Publication Date
WO2021155656A1 true WO2021155656A1 (en) 2021-08-12

Family

ID=71187789

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105871 WO2021155656A1 (en) 2020-02-06 2020-07-30 Data processing method and apparatus, and access system, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN111343235A (en)
WO (1) WO2021155656A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114884944A (en) * 2022-04-28 2022-08-09 广东电网有限责任公司 Data processing method, device, equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343235A (en) * 2020-02-06 2020-06-26 北京百度网讯科技有限公司 Data processing method and device, access system, electronic equipment and storage medium
CN111885133B (en) * 2020-07-10 2023-06-09 深圳力维智联技术有限公司 Block chain-based data processing method and device and computer storage medium
CN113608751B (en) * 2021-08-04 2023-04-07 北京百度网讯科技有限公司 Operation method, device and equipment of reasoning service platform and storage medium
CN115589391B (en) * 2022-12-09 2023-03-21 北京百度网讯科技有限公司 Instant messaging processing method, device and equipment based on block chain and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110213884A1 (en) * 2010-02-26 2011-09-01 James Michael Ferris Methods and systems for matching resource requests with cloud computing environments
CN108322502A (en) * 2017-12-22 2018-07-24 杭州大搜车汽车服务有限公司 Method, gateway system and storage medium for equalization server load
CN109558246A (en) * 2018-12-04 2019-04-02 北京字节跳动网络技术有限公司 A kind of load-balancing method, device, electronic equipment and storage medium
CN110650209A (en) * 2019-10-09 2020-01-03 北京百度网讯科技有限公司 Method and device for realizing load balance
CN111343235A (en) * 2020-02-06 2020-06-26 北京百度网讯科技有限公司 Data processing method and device, access system, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110213884A1 (en) * 2010-02-26 2011-09-01 James Michael Ferris Methods and systems for matching resource requests with cloud computing environments
CN108322502A (en) * 2017-12-22 2018-07-24 杭州大搜车汽车服务有限公司 Method, gateway system and storage medium for equalization server load
CN109558246A (en) * 2018-12-04 2019-04-02 北京字节跳动网络技术有限公司 A kind of load-balancing method, device, electronic equipment and storage medium
CN110650209A (en) * 2019-10-09 2020-01-03 北京百度网讯科技有限公司 Method and device for realizing load balance
CN111343235A (en) * 2020-02-06 2020-06-26 北京百度网讯科技有限公司 Data processing method and device, access system, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114884944A (en) * 2022-04-28 2022-08-09 广东电网有限责任公司 Data processing method, device, equipment and storage medium
CN114884944B (en) * 2022-04-28 2024-04-30 广东电网有限责任公司 Data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111343235A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2021155656A1 (en) Data processing method and apparatus, and access system, electronic device and storage medium
WO2021008285A1 (en) Data synchronization method and apparatus for distributed system, medium, and electronic device
US20150058308A1 (en) Generating cache query requests
US9721015B2 (en) Providing a query results page
WO2021218144A1 (en) Data processing method and apparatus, computer device, and storage medium
US20170295077A1 (en) Optimal service provider selection
US20210357461A1 (en) Method, apparatus and storage medium for searching blockchain data
KR102563165B1 (en) Memory access request scheduling method, device, apparatus, and storage medium
US20170310583A1 (en) Segment routing for load balancing
WO2022111313A1 (en) Request processing method and micro-service system
CN112202938A (en) ID generation method, device and system
US20210108930A1 (en) Method and apparatus for recommending a travel plan, device and storage medium
CN107636655B (en) System and method for providing data as a service (DaaS) in real time
US11711285B2 (en) Method, apparatus, electronic device and readable storage medium for adjusting instance number
WO2021218468A1 (en) Data update method and device, search server, terminal, and storage medium
CN112579897B (en) Information searching method and device
WO2020238131A1 (en) Web crawler system testing method and apparatus, storage medium, and electronic device
US11847161B2 (en) Data processing method and apparatus, device, and storage medium
WO2020024392A1 (en) Node processing method and apparatus, storage medium and electronic device
US11671370B2 (en) Method and apparatus for adjusting network flow
WO2021203635A1 (en) Distributed system running state monitoring method and apparatus, device, and storage medium
CN111935327B (en) Domain name assignment method, device, equipment and computer readable storage medium
CN113986391A (en) Request processing method, device, medium and computing equipment
CN114268558B (en) Method, device, equipment and medium for generating monitoring graph
US20220164317A1 (en) Remote file access apparatus and method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20917971

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20917971

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15/03/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20917971

Country of ref document: EP

Kind code of ref document: A1