CN112527527B - Message queue consumption speed control method, device, electronic device and medium - Google Patents
Message queue consumption speed control method, device, electronic device and medium Download PDFInfo
- Publication number
- CN112527527B CN112527527B CN202011490835.1A CN202011490835A CN112527527B CN 112527527 B CN112527527 B CN 112527527B CN 202011490835 A CN202011490835 A CN 202011490835A CN 112527527 B CN112527527 B CN 112527527B
- Authority
- CN
- China
- Prior art keywords
- task
- message queue
- execution frequency
- message
- segmentation
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000004044 response Effects 0.000 claims abstract description 21
- 238000012545 processing Methods 0.000 claims abstract description 11
- 230000000977 initiatory effect Effects 0.000 claims abstract 4
- 230000015654 memory Effects 0.000 claims description 18
- 230000011218 segmentation Effects 0.000 claims 14
- 239000012634 fragment Substances 0.000 abstract 2
- 230000008569 process Effects 0.000 description 8
- 230000001052 transient effect Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Telephonic Communication Services (AREA)
Abstract
Description
技术领域Technical Field
本发明实施例涉及计算机技术领域,尤其涉及一种消息队列的消费速度控制方法、装置、电子设备和介质。The embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, electronic device and medium for controlling the consumption speed of a message queue.
背景技术Background Art
消息生产方在产生消息以后,会将消息送入消息队列中,然后由消息消费方从消息队列中取出消息进行消息消费。由于消息消费方的负载能力有限,对消息队列的消费速度进行控制,对于保证消息消费方系统稳定性,提高消息消费方工作效率具有重要意义。After the message producer generates a message, it will send the message to the message queue, and then the message consumer will take the message from the message queue for message consumption. Since the load capacity of the message consumer is limited, controlling the consumption speed of the message queue is of great significance to ensure the stability of the message consumer system and improve the work efficiency of the message consumer.
现有的控制消息队列的消费速度的方法如滑动窗口算法、漏桶算法和令牌桶算法虽能能够控制消息队列单位时间的消费速度,但要在分布式系统扩容时实现上述算法复杂度较高。Existing methods for controlling the consumption speed of message queues, such as sliding window algorithm, leaky bucket algorithm and token bucket algorithm, can control the consumption speed of message queues per unit time, but the complexity of implementing the above algorithms is relatively high when the distributed system is expanded.
发明内容Summary of the invention
本发明实施例提供一种消息队列的消费速度控制方法、装置、电子设备和介质,以达到控制消息队列的消费速度目的。The embodiment of the present invention provides a method, device, electronic device and medium for controlling the consumption speed of a message queue, so as to achieve the purpose of controlling the consumption speed of a message queue.
第一方面,本发明实施例提供了一种消息队列的消费速度控制方法,包括:In a first aspect, an embodiment of the present invention provides a method for controlling the consumption speed of a message queue, comprising:
响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同;In response to a scheduled task start request, taking out a first number of messages from a message queue; wherein the first number is the same as the number of shard tasks of the scheduled task;
通过所述分片任务对所述消息进行处理。The message is processed by the sharding task.
第二方面,本发明实施例还提供了一种消息队列的消费速度控制装置,包括:In a second aspect, an embodiment of the present invention further provides a consumption speed control device for a message queue, comprising:
消息取出模块,用于响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同;A message fetching module, configured to fetch a first number of messages from a message queue in response to a scheduled task start request; wherein the first number is the same as the number of shard tasks of the scheduled task;
消息处理模块,用于通过所述分片任务对所述消息进行处理。The message processing module is used to process the message through the sharding task.
第三方面,本发明实施例还提供了一种电子设备,包括:In a third aspect, an embodiment of the present invention further provides an electronic device, including:
一个或多个处理器;one or more processors;
存储器,用于存储一个或多个程序,a memory for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本发明任一实施例所述的消息队列的消费速度控制方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method for controlling the consumption speed of a message queue as described in any embodiment of the present invention.
第四方面,本发明实施例还提供了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行任一实施例所述的一种消息队列的消费速度控制方法。In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute a method for controlling the consumption speed of a message queue as described in any embodiment.
本发明实施例所提供的技术方案,响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同;通过所述分片任务对所述消息进行处理。本发明实施例所提供的技术方案,将消息队列与定时任务分片相结合,通过控制定时任务的分片任务的数量,实现了对消息队列的消费速度的控制,降低了消息队列的消费速度的控制方法的实现复杂度,同时可以有效的控制消息的消费线程数。The technical solution provided by the embodiment of the present invention, in response to a scheduled task start request, takes out a first number of messages from a message queue; wherein the first number is the same as the number of shard tasks of the scheduled task; and the messages are processed by the shard tasks. The technical solution provided by the embodiment of the present invention combines the message queue with the scheduled task sharding, and controls the consumption speed of the message queue by controlling the number of shard tasks of the scheduled task, thereby reducing the implementation complexity of the method for controlling the consumption speed of the message queue, and can effectively control the number of message consumption threads.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本发明实施例一提供的消息队列的消费速度控制方法的流程图;1 is a flow chart of a method for controlling the consumption speed of a message queue provided in Embodiment 1 of the present invention;
图2是本发明实施例二提供的消息队列的消费速度控制方法的流程图;2 is a flow chart of a method for controlling the consumption speed of a message queue provided in Embodiment 2 of the present invention;
图3是本发明实施例三提供的消息队列的消费速度控制装置的结构示意图;3 is a schematic diagram of the structure of a consumption speed control device for a message queue provided in Embodiment 3 of the present invention;
图4为本发明实施例提供的消息队列的消费速度控制方法适用的电子设备的结构示意图。FIG. 4 is a schematic diagram of the structure of an electronic device to which the method for controlling the consumption speed of a message queue provided by an embodiment of the present invention is applicable.
具体实施方式DETAILED DESCRIPTION
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
实施例一Embodiment 1
图1是本发明实施例一提供的消息队列的消费速度控制方法的流程图,本实施例可适用对消息队列的消费速度进行控制的情况。该方法可以由消息队列的消费速度控制装置来执行,该装置可以采用软件和/或硬件的方式实现,并可配置在电子设备中,电子设备可以是服务器等具有通信和计算能力的电子设备。如图1所示,该方法具体包括:FIG1 is a flow chart of a method for controlling the consumption speed of a message queue provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where the consumption speed of a message queue is controlled. The method can be executed by a device for controlling the consumption speed of a message queue. The device can be implemented in software and/or hardware and can be configured in an electronic device. The electronic device can be an electronic device such as a server with communication and computing capabilities. As shown in FIG1 , the method specifically includes:
S110、响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同。S110. In response to a scheduled task start request, take out a first number of messages from a message queue; wherein the first number is the same as the number of shard tasks of the scheduled task.
其中,定时任务是指基于给定时间点,给定时间间隔或者给定执行次数执行的任务。示例性的,定时任务为每间隔1秒执行一次的任务。The scheduled task refers to a task that is executed based on a given time point, a given time interval, or a given number of executions. For example, the scheduled task is a task that is executed once every 1 second.
定时任务启动请求是在执行定时任务的同时或者执行定时任务之前发出,用于指示启动并执行定时任务。从消息队列中取出第一数量的消息,其中,消息队列是指是在消息的传输过程中保存消息的容器,消息是指存储在消息队列中数据。第一数量与定时任务的分片任务的数量相同,第一数量的具体数值,在这里不作限定,具体依据实际情况确定。其中,分片任务是指执行同一项定时任务的子任务。The scheduled task start request is issued while executing the scheduled task or before executing the scheduled task, and is used to instruct the start and execution of the scheduled task. A first number of messages are taken out from the message queue, wherein the message queue refers to a container for storing messages during the transmission of the messages, and the message refers to the data stored in the message queue. The first number is the same as the number of shard tasks of the scheduled task. The specific value of the first number is not limited here and is determined based on actual conditions. Among them, the shard task refers to a subtask that executes the same scheduled task.
在一个可选的实施例中,所述定时任务用于以设定时间间隔对所述逾期还款账单数据进行罚息计算。示例性的,定时任务为每间隔1秒对逾期还款账单数据进行罚息计算。该定时任务可以同时由多个任务执行服务器执行,每个任务执行服务器执行的任务内容一致,均是每间隔1秒对逾期还款账单数据进行罚息计算,在每个任务执行服务器执行的任务即为定时任务的分片任务。In an optional embodiment, the scheduled task is used to calculate the penalty interest on the overdue payment bill data at a set time interval. Exemplarily, the scheduled task is to calculate the penalty interest on the overdue payment bill data every 1 second. The scheduled task can be executed by multiple task execution servers at the same time. The task content executed by each task execution server is consistent, and the penalty interest is calculated on the overdue payment bill data every 1 second. The task executed on each task execution server is a shard task of the scheduled task.
定时任务的分片数量是在定时任务启动前即确定的,响应于定时任务启动请求,从消息队列中取出与定时任务的分片数量相同数量的消息。定时任务的分片数量在这里不作限定,具体依据实际情况确定。The number of shards of a scheduled task is determined before the scheduled task is started. In response to the scheduled task start request, the same number of messages as the number of shards of the scheduled task are taken out from the message queue. The number of shards of a scheduled task is not limited here and is determined based on actual conditions.
在一个可选的实施例中,所述消息队列为redis消息队列。redis队列即为将redis(remote dictionary server,远程字典服务)缓存应用作为消息队列使用。示例性的,redis缓存应用可以通过blpush和brpop两条指令或者基于Sorted-Set实现redis消息队列。redis消息队列具有实现简单的特点,基于Sorted-Set实现的redis消息队列还具有不允许存储重复消息的特点。In an optional embodiment, the message queue is a redis message queue. The redis queue is to use the redis (remote dictionary server) cache application as a message queue. Exemplarily, the redis cache application can implement the redis message queue through the two instructions blpush and brpop or based on Sorted-Set. The redis message queue has the characteristic of being simple to implement, and the redis message queue implemented based on Sorted-Set also has the characteristic of not allowing duplicate messages to be stored.
S120、通过所述分片任务对所述消息进行处理。S120: Process the message through the sharding task.
分片任务可以由分片任务执行服务器,分片任务执行服务器作为消息的消费方,对从消息队列中获取的消息进行处理,完成对消息队列中消息的消费。The sharding task can be executed by the sharding task execution server. As the consumer of the message, the sharding task execution server processes the message obtained from the message queue and completes the consumption of the message in the message queue.
在一个可选的实施例中,在所述响应于定时任务启动请求,从消息队列中取出第一数量的消息之前,还包括:获取分片任务数量更新指令;根据所述分片任务数量更新指令,将所述定时任务分片为第二数量的分片任务;其中,第一数量等于第二数量。In an optional embodiment, before taking out a first number of messages from a message queue in response to a scheduled task start request, the method further includes: obtaining a shard task quantity update instruction; sharding the scheduled task into a second number of shard tasks according to the shard task quantity update instruction; wherein the first number is equal to the second number.
其中,分片任务数量更新指令是指用于在定时任务进行分片时,更改定时任务的分片数量的指令。对于初次进行分片的定时任务,分片任务数量更新指令用于对定时任务分片数量进行初始初始化;对于已经进行过分片的定时任务,根据具体的业务需求可以通过分片任务数量更新指令,对于定时任务的分片数量进行更改。其中,分片数量更新指令中包括定时任务标识和目标分片任务数量。目标分片任务数量即为更改后预期的分片任务数量。The shard task quantity update instruction refers to an instruction for changing the shard quantity of a scheduled task when the scheduled task is sharded. For a scheduled task that is sharded for the first time, the shard task quantity update instruction is used to initialize the shard quantity of the scheduled task; for a scheduled task that has already been sharded, the shard task quantity update instruction can be used to change the shard quantity of the scheduled task according to specific business needs. The shard quantity update instruction includes the scheduled task identifier and the target shard task quantity. The target shard task quantity is the expected shard task quantity after the change.
可选的,分片任务数量更新指令是用户根据实际业务需求实时输入的,也可以是根据预设分片任务数量对照表自动生成的。其中,预设分片任务数量对照表根据业务量和系统承载能力预先设定的。其中,系统承载能力包括系统的存储能力和计算能力。预设分片数量可以是具体的数值,也可以是一个数值范围,即一定的业务量和系统承载能力可以将分片任务数量限制在一个数值范围内,分片任务数量可以是该数值范围内的任一数值。Optionally, the shard task quantity update instruction is input by the user in real time according to actual business needs, or it can be automatically generated according to a preset shard task quantity comparison table. The preset shard task quantity comparison table is pre-set according to the business volume and system carrying capacity. The system carrying capacity includes the storage capacity and computing capacity of the system. The preset shard quantity can be a specific value or a range of values, that is, a certain business volume and system carrying capacity can limit the number of shard tasks to a range of values, and the number of shard tasks can be any value within the range of values.
根据所述分片任务数量更新指令,将所述定时任务分片为第二数量的分片任务。其中,第二数量与业务量和系统承载能力相关,是根据分片任务数量更新指令确定的,具体数值在这里不作限定,根据实际情况确定。第二数量为对定时任务进行分片得到的分片任务的数量,第二数量与从消息队列中取出的消息的数量相等。本发明实施例通过在响应于定时任务启动请求,从消息队列中取出第一数量的消息之前,获取分片任务数量更新指令;根据所述分片任务数量更新指令,将所述定时任务分片为第二数量的分片任务;其中,第一数量等于第二数量,本发明实施例通过控制定时任务分片数量进而控制从消息队列中取出的消息数量从而实现了对消息队列的消费速度的控制。According to the shard task quantity update instruction, the scheduled task is sharded into a second number of shard tasks. The second number is related to the business volume and the system carrying capacity, and is determined according to the shard task quantity update instruction. The specific value is not limited here and is determined according to the actual situation. The second number is the number of shard tasks obtained by sharding the scheduled task, and the second number is equal to the number of messages taken out from the message queue. The embodiment of the present invention obtains a shard task quantity update instruction before taking out a first number of messages from the message queue in response to a scheduled task start request; according to the shard task quantity update instruction, the scheduled task is sharded into a second number of shard tasks; wherein the first number is equal to the second number. The embodiment of the present invention controls the consumption speed of the message queue by controlling the number of shards of the scheduled task and then controlling the number of messages taken out from the message queue.
在一个可选的实施例中,在所述响应于定时任务启动请求,从消息队列中取出第一数量的消息之前,还包括:根据业务属性信息对业务数据进行分类,并得到分类结果;将所述分类结果作为消息存储至所述消息队列中;其中,同一消息队列中存储的所述分类结果所属业务属性相同。In an optional embodiment, before taking out the first number of messages from the message queue in response to the scheduled task start request, it also includes: classifying the business data according to the business attribute information and obtaining the classification results; storing the classification results as messages in the message queue; wherein the classification results stored in the same message queue have the same business attributes.
接收定时任务的系统可能会同时接收多个定时任务,在接收定时任务的同时也会有大量的业务数据输入系统,在定时任务启动并执行之前,需要根据业务属性对业务数据进行分类,再将分类结果存储至消息队列中,以供定时任务对消息队列中的消息进行处理。The system that receives scheduled tasks may receive multiple scheduled tasks at the same time. While receiving scheduled tasks, a large amount of business data will also be input into the system. Before the scheduled task is started and executed, the business data needs to be classified according to business attributes, and then the classification results are stored in the message queue so that the scheduled task can process the messages in the message queue.
其中,业务数据是指未经归集整理和统计的基础记录数据。业务数据可以是由一线业务部门人工录入的也可以是由系统通过文字或者图像识别等技术自动化获取。业务属性是指业务数据的来源。根据业务属性信息对业务数据进行分类,并得到分类结果。示例性,在信用借贷的场景下,根据用户是否在期限内按时还款可以将业务数据分为逾期还款账单数据和按期还款账单数据。继续上例,将所述分类结果作为消息存储至所述消息队列中,是将逾期还款账单数据和按期还款账单数据分别存储在不同的消息队列中,同一消息队列中存储的所述分类结果所属业务属性相同,即在同一个消息队列中仅包括逾期还款账单数据或者仅包括按期还款账单数据,在同一消息队列中,不可以既包括逾期还款账单数据又包括按期还款账单数据。Among them, business data refers to basic record data that has not been collected, organized and counted. Business data can be manually entered by the front-line business department or automatically acquired by the system through text or image recognition and other technologies. Business attributes refer to the source of business data. Business data is classified according to business attribute information, and classification results are obtained. For example, in the scenario of credit lending, business data can be divided into overdue repayment bill data and on-time repayment bill data according to whether the user repays on time within the deadline. Continuing with the above example, storing the classification results as messages in the message queue means storing the overdue repayment bill data and on-time repayment bill data in different message queues respectively, and the classification results stored in the same message queue belong to the same business attributes, that is, only overdue repayment bill data or only on-time repayment bill data are included in the same message queue. In the same message queue, both overdue repayment bill data and on-time repayment bill data cannot be included.
在一个可选的实施例中,所述消息队列中存储的为逾期还款账单数据。在一个可选的实施例中,所述定时任务用于以设定时间间隔对所述逾期还款账单数据进行罚息计算。In an optional embodiment, the message queue stores overdue payment bill data. In an optional embodiment, the timed task is used to calculate penalty interest on the overdue payment bill data at set time intervals.
具体的,在信用借贷的场景下,会存在客户不能在规定还款期限内未按时还款的情况,在此情况下,信用借贷平台会计算对逾期还款的客户下一天应收的罚息。按照用户的维度将逾期还款账单数据存储至消息队列中,可选的,将逾期账单数据中的用户身份标识信息存储至消息队列中。定时任务用于以设定时间间隔对所述逾期还款账单数据进行罚息计算,示例性的,定时任务为以每间隔1秒对所述逾期还款账单数据进行罚息计算。在定时任务的分片任务数量等于20的情况下,则定时任务每间隔1秒从消息队列中取出20个用户身份标识信息,分别由20个分片任务根据用户身份标识信息对逾期还款账单数据进行罚息计算。在系统中除了此定时任务以外其他业务处理量增加,需要扩容的情况下,由于定时任务的分片任务数量为20,相应的,消息队列中消息的消费速度为每两秒消费20个。消息队列中消息的消费速度仅与定时任务的分片数量和定时任务的执行频率相关,而定时任务的分片任务本身并不受系统扩容的影响,使得消息队列中消息的消费速度可以不受系统扩容的影响,通过控制定时任务的分片任务的数量即可控制消息的消费者线程数达到预期。Specifically, in the scenario of credit lending, there may be a situation where the customer fails to repay on time within the prescribed repayment period. In this case, the credit lending platform will calculate the penalty interest to be collected by the customer who repays the overdue amount the next day. Store the overdue repayment bill data in the message queue according to the user dimension, and optionally store the user identity information in the overdue bill data in the message queue. The scheduled task is used to calculate the penalty interest on the overdue repayment bill data at a set time interval. Exemplarily, the scheduled task is to calculate the penalty interest on the overdue repayment bill data at an interval of 1 second. When the number of shard tasks of the scheduled task is equal to 20, the scheduled task takes out 20 user identity information from the message queue every 1 second, and the 20 shard tasks calculate the penalty interest on the overdue repayment bill data according to the user identity information. In the case where the processing volume of other businesses in addition to this scheduled task in the system increases and capacity expansion is required, since the number of shard tasks of the scheduled task is 20, the consumption speed of messages in the message queue is 20 every two seconds. The consumption speed of messages in the message queue is only related to the number of shards of the scheduled task and the execution frequency of the scheduled task. The shard tasks of the scheduled task themselves are not affected by the system expansion, so the consumption speed of messages in the message queue is not affected by the system expansion. By controlling the number of shard tasks of the scheduled task, the number of consumer threads of the message can be controlled to meet the expectations.
本发明实施例所提供的技术方案,响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同;通过所述分片任务对所述消息进行处理。本发明实施例所提供的技术方案,将消息队列与定时任务分片相结合,通过控制定时任务的分片任务的数量,实现了对消息队列的消费速度的控制,降低了消息队列的消费速度的控制方法的实现复杂度,同时可以有效的控制消息的消费线程数。The technical solution provided by the embodiment of the present invention, in response to a scheduled task start request, takes out a first number of messages from a message queue; wherein the first number is the same as the number of shard tasks of the scheduled task; and the messages are processed by the shard tasks. The technical solution provided by the embodiment of the present invention combines the message queue with the scheduled task sharding, and controls the consumption speed of the message queue by controlling the number of shard tasks of the scheduled task, thereby reducing the implementation complexity of the method for controlling the consumption speed of the message queue, and can effectively control the number of message consumption threads.
实施例二Embodiment 2
图2是本发明实施例二提供的消息队列的消费速度控制方法的流程图,本实施例在上述实施例的基础上进行进一步地优化,具体优化为:在所述响应于定时任务启动请求,从消息队列中取出第一数量的消息之前,还包括:获取定时任务执行频率更新指令;根据所述执行频率更新指令设置所述定时任务的执行频率。Figure 2 is a flow chart of the method for controlling the consumption speed of a message queue provided in Example 2 of the present invention. This embodiment is further optimized on the basis of the above-mentioned embodiment. Specifically, the optimization is as follows: before taking out a first number of messages from the message queue in response to the scheduled task start request, it also includes: obtaining a scheduled task execution frequency update instruction; and setting the execution frequency of the scheduled task according to the execution frequency update instruction.
如图2所示,所述方法包括:As shown in FIG. 2 , the method includes:
S210、获取定时任务执行频率更新指令。S210: Obtain a scheduled task execution frequency update instruction.
其中,定时任务执行频率更新指令是指用于调整定时任务执行频率的指令。对于初次进行分片的定时任务,定时任务执行频率更新指令用于对定时任务执行频率进行初始初始化;对于已经确定执行频率的定时任务,根据具体的业务需求可以通过定时任务执行频率更新指令,对于定时任务的执行频率进行更改。The scheduled task execution frequency update instruction is an instruction used to adjust the scheduled task execution frequency. For scheduled tasks that are being sharded for the first time, the scheduled task execution frequency update instruction is used to initialize the scheduled task execution frequency; for scheduled tasks whose execution frequency has been determined, the scheduled task execution frequency update instruction can be used to change the scheduled task execution frequency according to specific business needs.
可选的,定时任务执行频率是用户根据实际业务需求实时输入的,也可以是根据预设定时任务执行频率对照表自动生成的。其中,预设定时任务执行频率对照表根据业务量和系统承载能力预先设定的。其中,系统承载能力包括系统的存储能力和计算能力。定时任务执行频率可以是具体的数值,也可以是一个数值范围,即一定的业务量和系统承载能力可以将定时任务执行频率限制在一个数值范围内,定时任务执行频率可以是该数值范围内的任一数值。定时任务执行频率的具体数值在这里不作限定,根据实际情况确定。Optionally, the scheduled task execution frequency is input by the user in real time according to actual business needs, or it can be automatically generated according to a preset scheduled task execution frequency comparison table. Among them, the preset scheduled task execution frequency comparison table is pre-set according to the business volume and system carrying capacity. Among them, the system carrying capacity includes the storage capacity and computing capacity of the system. The scheduled task execution frequency can be a specific value or a range of values, that is, a certain business volume and system carrying capacity can limit the scheduled task execution frequency to a range of values, and the scheduled task execution frequency can be any value within the range of values. The specific value of the scheduled task execution frequency is not limited here and is determined according to actual conditions.
S220、根据所述执行频率更新指令设置所述定时任务的执行频率。S220: Setting the execution frequency of the scheduled task according to the execution frequency update instruction.
其中,定时任务执行频率更新指令中包括定时任务标识和目标定时任务执行频率。根据定时任务执行频率更新指令中定时任务标识将目标定时任务,设置为目标定时任务执行频率。目标定时任务执行频率即为更改后预期的定时任务执行频率。The scheduled task execution frequency update instruction includes a scheduled task identifier and a target scheduled task execution frequency. The target scheduled task is set to the target scheduled task execution frequency according to the scheduled task identifier in the scheduled task execution frequency update instruction. The target scheduled task execution frequency is the expected scheduled task execution frequency after the change.
S230、响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同。S230. In response to a scheduled task start request, take out a first number of messages from a message queue; wherein the first number is the same as the number of shard tasks of the scheduled task.
S240、通过所述分片任务对所述消息进行处理。S240: Process the message through the sharding task.
本发明实施例所提供的技术方案,获取定时任务执行频率更新指令;根据所述执行频率更新指令设置所述定时任务的执行频率。响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同;通过所述分片任务对所述消息进行处理。本发明实施例所提供的技术方案,可以通过将消息队列与定时任务分片结合,通过控制定时任务的执行频率与定时任务的分片任务的数量实现对消息队列的消息消费速度的控制,简化了消息消费速度控制的实现方法。The technical solution provided in the embodiment of the present invention obtains a scheduled task execution frequency update instruction; and sets the execution frequency of the scheduled task according to the execution frequency update instruction. In response to a scheduled task start request, a first number of messages are taken out from a message queue; wherein the first number is the same as the number of shard tasks of the scheduled task; and the messages are processed by the shard tasks. The technical solution provided in the embodiment of the present invention can control the message consumption speed of the message queue by combining the message queue with the scheduled task sharding, and by controlling the execution frequency of the scheduled task and the number of shard tasks of the scheduled task, thereby simplifying the implementation method of the message consumption speed control.
实施例三Embodiment 3
图3是本发明实施例三提供的消息队列的消费速度控制装置的结构示意图,本实施例可适用对消息队列的消费速度进行控制的情况。所述装置可由软件和/或硬件实现,可配置在电子设备中。Fig. 3 is a schematic diagram of the structure of a message queue consumption speed control device provided by Embodiment 3 of the present invention. This embodiment is applicable to the case of controlling the consumption speed of a message queue. The device can be implemented by software and/or hardware and can be configured in an electronic device.
如图3所示,该装置可以包括:消息取出模块310和消息处理模块320。As shown in FIG. 3 , the device may include: a message retrieving module 310 and a message processing module 320 .
消息取出模块310,用于响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同。The message fetching module 310 is used to fetch a first number of messages from the message queue in response to a scheduled task start request; wherein the first number is the same as the number of shard tasks of the scheduled task.
消息处理模块320,用于通过所述分片任务对所述消息进行处理。The message processing module 320 is used to process the message through the sharding task.
本发明实施例所提供的技术方案,响应于定时任务启动请求,从消息队列中取出第一数量的消息;其中,第一数量与所述定时任务的分片任务的数量相同;通过所述分片任务对所述消息进行处理。本发明实施例所提供的技术方案,将消息队列与定时任务分片相结合,通过控制定时任务的分片任务的数量,实现了对消息队列的消费速度的控制,降低了消息队列的消费速度的控制方法的实现复杂度,同时可以有效的控制消息的消费线程数。The technical solution provided by the embodiment of the present invention, in response to a scheduled task start request, takes out a first number of messages from a message queue; wherein the first number is the same as the number of shard tasks of the scheduled task; and the messages are processed by the shard tasks. The technical solution provided by the embodiment of the present invention combines the message queue with the scheduled task sharding, and controls the consumption speed of the message queue by controlling the number of shard tasks of the scheduled task, thereby reducing the implementation complexity of the method for controlling the consumption speed of the message queue, and can effectively control the number of message consumption threads.
可选的,所述装置还包括:分片任务数量更新指令获取模块,用于在所述响应于定时任务启动请求,从消息队列中取出第一数量的消息之前,获取分片任务数量更新指令。定时任务分片模块,用于根据所述分片任务数量更新指令,将所述定时任务分片为第二数量的分片任务;其中,第一数量等于第二数量。Optionally, the device further includes: a shard task quantity update instruction acquisition module, which is used to acquire a shard task quantity update instruction before taking out a first number of messages from the message queue in response to the scheduled task start request. A scheduled task sharding module is used to slice the scheduled task into a second number of shard tasks according to the shard task quantity update instruction; wherein the first number is equal to the second number.
可选的,业务数据分类模块,用于在所述响应于定时任务启动请求,从消息队列中取出第一数量的消息之前,根据业务属性信息对业务数据进行分类,并得到分类结果。分类结果存储模块,用于将所述分类结果作为消息存储至所述消息队列中;其中,同一消息队列中存储的所述分类结果所属业务属性相同。Optionally, a business data classification module is used to classify the business data according to the business attribute information and obtain the classification result before taking out the first number of messages from the message queue in response to the scheduled task start request. A classification result storage module is used to store the classification result as a message in the message queue; wherein the classification results stored in the same message queue belong to the same business attribute.
可选的,所述装置还包括:执行频率更新指令获取模块,用于在所述响应于定时任务启动请求,从消息队列中取出第一数量的消息之前,获取定时任务执行频率更新指令。执行频率设置模块,用于根据所述执行频率更新指令设置所述定时任务的执行频率。Optionally, the device further comprises: an execution frequency update instruction acquisition module, used to acquire a scheduled task execution frequency update instruction before taking out a first number of messages from a message queue in response to a scheduled task start request. An execution frequency setting module, used to set the execution frequency of the scheduled task according to the execution frequency update instruction.
可选的,所述消息队列为redis消息队列。Optionally, the message queue is a redis message queue.
可选的,所述消息队列中存储的为逾期还款账单数据。Optionally, the message queue stores overdue payment bill data.
可选的,所述定时任务用于以设定时间间隔对所述逾期还款账单数据进行罚息计算。Optionally, the scheduled task is used to calculate penalty interest on the overdue payment bill data at set time intervals.
本发明实施例所提供的消息队列的消费速度控制装置可执行本发明任意实施例所提供的消息队列的消费速度控制方法,具备执行消息队列的消费速度控制方法相应的功能模块和有益效果。The message queue consumption speed control device provided in the embodiment of the present invention can execute the message queue consumption speed control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the message queue consumption speed control method.
实施例四Embodiment 4
根据本发明的实施例,本发明还提供了一种电子设备和一种可读存储介质。According to an embodiment of the present invention, the present invention also provides an electronic device and a readable storage medium.
图4为实现本发明实施例的消息队列的消费速度控制方法的电子设备的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴电子设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明实施例的实现。Fig. 4 is a schematic diagram of the structure of an electronic device for implementing the consumption speed control method of the message queue of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable electronic 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 invention described and/or required herein.
如图4所示,该电子设备包括:一个或多个处理器410、存储器420,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示电子设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个电子设备提供部分必要的操作(例如,作为电子设备阵列、一组刀片式电子设备、或者多处理器系统)。图4中以一个处理器410为例。As shown in Figure 4, the electronic device includes: one or more processors 410, a memory 420, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can 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 electronic device coupled to the interface). In other embodiments, if necessary, multiple processors and/or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each electronic device provides some necessary operations (for example, as an electronic device array, a group of blade-type electronic devices, or a multi-processor system). A processor 410 is taken as an example in Figure 4.
存储器420即为本发明实施例所提供的非瞬时计算机可读存储介质。其中,存储器存储有可由至少一个处理器执行的指令,以使至少一个处理器执行本发明实施例所提供的消息队列的消费速度控制方法。本发明实施例的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本发明实施例所提供的消息队列的消费速度控制方法。The memory 420 is a non-transient computer-readable storage medium provided in an embodiment of the present invention. The memory stores instructions executable by at least one processor to enable at least one processor to execute the method for controlling the consumption speed of a message queue provided in an embodiment of the present invention. The non-transient computer-readable storage medium of an embodiment of the present invention stores computer instructions, which are used to enable a computer to execute the method for controlling the consumption speed of a message queue provided in an embodiment of the present invention.
存储器420作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本发明实施例提供的消息队列的消费速度控制方法对应的程序指令/模块(例如,附图3所示的包括消息取出模块310和消息处理模块320)。处理器410通过运行存储在存储器420中的非瞬时软件程序、指令以及模块,从而执行电子设备的各种功能应用以及数据处理,即实现上述方法实施例提供的消息队列的消费速度控制方法。The memory 420, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions/modules corresponding to the method for controlling the consumption speed of a message queue provided in an embodiment of the present invention (for example, the message retrieval module 310 and the message processing module 320 shown in FIG. 3 ). The processor 410 executes various functional applications and data processing of the electronic device by running the non-transient software programs, instructions and modules stored in the memory 420, that is, implements the method for controlling the consumption speed of a message queue provided in the above method embodiment.
存储器420可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储实现消息队列的消费速度控制方法的电子设备的使用所创建的数据等。此外,存储器420可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器420可选包括相对于处理器410远程设置的存储器,这些远程存储器可以通过网络连接至执行消息队列的消费速度控制方法的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the use of an electronic device that implements the method for controlling the consumption speed of a message queue, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the electronic device that executes the method for controlling the consumption speed of a message queue via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
执行消息队列的消费速度控制方法的电子设备还可以包括:输入装置430和输出装置440。处理器410、存储器420、输入装置430和输出装置440可以通过总线或者其他方式连接,图4中以通过总线连接为例。The electronic device executing the message queue consumption speed control method may further include: an input device 430 and an output device 440. The processor 410, the memory 420, the input device 430 and the output device 440 may be connected via a bus or other means, and FIG4 takes the bus connection as an example.
输入装置430可接收输入的数字或字符信息,以及产生与执行消息队列的消费速度控制方法的电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置440可以包括显示电子设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示电子设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示电子设备可以是触摸屏。The input device 430 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device that executes the consumption speed control method of the message queue, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 440 may include a display electronic device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display electronic 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 electronic device may be a touch screen.
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various implementations may include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、电子设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, electronic device, and/or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and/or data to a programmable processor.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or 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 (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、互联网和区块链网络。The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明实施例中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明实施例公开的技术方案所期望的结果,本文在此不进行限制。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 recorded in the embodiments of the present invention can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solutions disclosed in the embodiments of the present invention can be achieved, and this document does not limit them here.
上述具体实施方式,并不构成对本发明实施例保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明实施例的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明实施例保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of the embodiments of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011490835.1A CN112527527B (en) | 2020-12-16 | 2020-12-16 | Message queue consumption speed control method, device, electronic device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011490835.1A CN112527527B (en) | 2020-12-16 | 2020-12-16 | Message queue consumption speed control method, device, electronic device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112527527A CN112527527A (en) | 2021-03-19 |
CN112527527B true CN112527527B (en) | 2024-09-24 |
Family
ID=75000756
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011490835.1A Active CN112527527B (en) | 2020-12-16 | 2020-12-16 | Message queue consumption speed control method, device, electronic device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112527527B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114155828B (en) * | 2021-11-09 | 2024-06-18 | 国网福建省电力有限公司惠安县供电公司 | Intelligent voice-based electric charge fee-forcing method and system |
CN113961361B (en) * | 2021-11-10 | 2024-04-16 | 重庆紫光华山智安科技有限公司 | Control method and system for cache resources |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109947568A (en) * | 2019-03-15 | 2019-06-28 | 深圳市牛鼎丰科技有限公司 | Timed task processing method, system, computer equipment and storage medium |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009199365A (en) * | 2008-02-21 | 2009-09-03 | Funai Electric Co Ltd | Multi-task processing system |
CN103502943B (en) * | 2011-12-31 | 2017-06-16 | 华为技术有限公司 | A kind of method, the apparatus and system of the distributed task scheduling treatment based on message queue |
CN102710517A (en) * | 2012-05-31 | 2012-10-03 | 苏州阔地网络科技有限公司 | Information scheduling control method and system |
US20150172140A1 (en) * | 2013-12-18 | 2015-06-18 | Thomson Reuters Global Resources (Trgr) | System and method for dynamically scheduling network scanning tasks |
CN104580396B (en) * | 2014-12-19 | 2018-07-20 | 华为技术有限公司 | A kind of method for scheduling task, node and system |
CN106933672B (en) * | 2015-12-30 | 2021-04-13 | 阿里巴巴集团控股有限公司 | Distributed environment coordinated consumption queue method and device |
US9996404B2 (en) * | 2016-09-01 | 2018-06-12 | Oracle International Corporation | Message cache management for message queues |
CN110245008B (en) * | 2018-03-09 | 2023-02-03 | 阿里巴巴集团控股有限公司 | Timing task processing method, system and equipment |
CN110808922B (en) * | 2019-10-29 | 2023-06-06 | 北京大米科技有限公司 | Message processing method and device, storage medium and electronic equipment |
CN111381987A (en) * | 2020-03-13 | 2020-07-07 | 北京金山云网络技术有限公司 | Message processing method and device, electronic equipment and medium |
CN111611305A (en) * | 2020-05-11 | 2020-09-01 | 腾讯科技(深圳)有限公司 | Data processing method, device and medium |
-
2020
- 2020-12-16 CN CN202011490835.1A patent/CN112527527B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109947568A (en) * | 2019-03-15 | 2019-06-28 | 深圳市牛鼎丰科技有限公司 | Timed task processing method, system, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112527527A (en) | 2021-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11445008B2 (en) | Data processing methods, electronic devices, and storage media | |
CN111694857B (en) | Method, device, electronic equipment and computer readable medium for storing resource data | |
CN105095365A (en) | Information flow data processing method and device | |
CN112100481B (en) | Search method, search device, electronic device and storage medium | |
CN112181683A (en) | Concurrent consumption method and device for message middleware | |
CN107133309B (en) | Method and device for storing and querying process example, storage medium and electronic equipment | |
US11514090B2 (en) | Comments-ordering method, apparatus, device and computer storage medium | |
CN110619002A (en) | Data processing method, device and storage medium | |
CN112527527B (en) | Message queue consumption speed control method, device, electronic device and medium | |
CN111368153A (en) | Searching method and device | |
CN111339462A (en) | Component rendering method, device, server, terminal and medium | |
CN112084395B (en) | Search method, search device, electronic device and storage medium | |
CN112565356B (en) | Data storage method and device and electronic equipment | |
US11442930B2 (en) | Method, apparatus, device and storage medium for data aggregation | |
US20220405792A1 (en) | Method and apparatus for processing commodity information, device and storage medium | |
CN110545324B (en) | Data processing method, device, system, network equipment and storage medium | |
EP3951687A2 (en) | Business content output method, apparatus, storage medium and program product | |
US9473561B2 (en) | Data transmission for transaction processing in a networked environment | |
CN113220982A (en) | Advertisement searching method, device, electronic equipment and medium | |
CN111581049A (en) | Method, device, equipment and storage medium for monitoring running state of distributed system | |
US20210248486A1 (en) | Method, apparatus, device and storage medium for customizing personalized rules for entities | |
US11941055B2 (en) | Method and apparatus for graph computing, electronic device and storage medium | |
CN113360499A (en) | Data query method and device | |
CN112486644A (en) | Method, apparatus, device and storage medium for generating information | |
CN111767149A (en) | Scheduling method, device, equipment and storage equipment |
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 |